/*
 * TACD Equestrian — Design System v1.0
 * Sprint 1 — April 2026
 *
 * CSS-Variablen werden durch get_css Endpoint aus DB überschrieben.
 * Diese Defaults greifen als Fallback.
 *
 * Einbindung im HTML:
 *   <link rel="stylesheet" href="/api/tacd_shop_api.php?action=get_css">
 *   <link rel="stylesheet" href="/shop/assets/tacd.css">
 */

/* ── Brand fonts ──────────────────────────────────────────────────────────────
 * Loaded here (not in each page <head>) so every shop page — including content
 * pages — picks them up in one pass. Previously --font-h / --font-b were declared
 * but never loaded, so headings silently fell back to Georgia / system-ui.
 * display=swap avoids invisible-text flash while the webfont loads.
 */
@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@500;600;700&family=Jost:wght@400;500;600&display=swap');

/* ── Fallback Variablen (werden durch API überschrieben) ──────────────────── */
:root {
  --gold:     #C8A96E;
  --gold2:    #A8843E;
  --dark:     #1A1610;
  --mid:      #4A3F2F;
  --sand:     #F5EFE6;
  --sand2:    #EDE3D5;
  --light:    #FAF7F3;
  --accent:   #8B3A3A;
  --white:    #FFFFFF;
  --font-h:   'Cormorant Garamond', Georgia, serif;
  --font-b:   'Jost', system-ui, sans-serif;

  --nav-h:    56px;
  --max-w:    1280px;
  --radius:   3px;
  --shadow:   0 2px 12px rgba(0,0,0,.08);
  --shadow-lg:0 8px 40px rgba(0,0,0,.14);
  --trans:    all .2s ease;

  /* ── Loyalty tier palette (TACD spec) ───────────────────────────────────── */
  --tier-champion-bg:       #C8A96E;  --tier-champion-border:   #A8832A;  --tier-champion-text:   #1A1A1A;
  --tier-equestrian-bg:     #A8A8A8;  --tier-equestrian-border: #888888;  --tier-equestrian-text: #1A1A1A;
  --tier-rider-bg:          #F8F5F0;  --tier-rider-border:      #D0C8BE;  --tier-rider-text:      #6B6157;
  /* Stablemate — entry level (registered, below Rider). Blue. */
  --tier-stablemate-bg:     #4A7FA5;  --tier-stablemate-border: #2E5F82;  --tier-stablemate-text: #FFFFFF;
}

/* ── Reset ────────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
  font-family: var(--font-b);
  background: var(--light);
  color: var(--mid);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; border: none; background: none; font: inherit; }

/* ── Typography ──────────────────────────────────────────────────────────── */
h1, h2, h3, h4 { font-family: var(--font-h); font-weight: 500; color: var(--dark); line-height: 1.2; letter-spacing: -.01em; }
h1 { font-size: clamp(1.8rem, 4vw, 3rem); }
h2 { font-size: clamp(1.4rem, 3vw, 2.2rem); }
h3 { font-size: clamp(1.1rem, 2vw, 1.5rem); }
h4 { font-size: 1rem; }
p  { margin-bottom: .75rem; }
p:last-child { margin-bottom: 0; }

.eyebrow {
  font-size: .7rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--gold);
  font-family: var(--font-b);
  font-weight: 500;
}

/* ── Layout ──────────────────────────────────────────────────────────────── */
.container { max-width: var(--max-w); margin: 0 auto; padding: 0 1.25rem; }
.container-wide { max-width: 1440px; margin: 0 auto; padding: 0 1.25rem; }

.section { padding: 3rem 0; }
.section-sm { padding: 1.5rem 0; }
.section-title {
  font-size: .7rem;
  font-weight: 500;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--mid);
  margin-bottom: 1.25rem;
}

/* Editorial section header: eyebrow + serif title (+ optional right-side link).
 * Replaces the bare .section-title label on landing-page sections. */
.sec-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.4rem;
}
.sec-eyebrow {
  font-size: .6rem;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--gold2);
  font-weight: 500;
  margin-bottom: .25rem;
}
.sec-title {
  font-family: var(--font-h);
  font-size: clamp(1.35rem, 2.6vw, 1.9rem);
  font-weight: 500;
  color: var(--dark);
  line-height: 1.1;
}
.sec-link {
  font-size: .65rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--gold2);
  font-weight: 500;
  white-space: nowrap;
  padding-bottom: .2rem;
  border-bottom: 1px solid rgba(168,132,62,.35);
  transition: var(--trans);
}
.sec-link:hover { color: var(--gold); border-bottom-color: var(--gold); }

/* Grid system */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; }
.grid-5 { display: grid; grid-template-columns: repeat(5, 1fr); gap: 1rem; }

@media (max-width: 1024px) {
  .grid-5 { grid-template-columns: repeat(3, 1fr); }
  .grid-4 { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 768px) {
  .grid-5, .grid-4, .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .grid-2 { grid-template-columns: 1fr; }
  .section { padding: 2rem 0; }
}
@media (max-width: 480px) {
  .grid-5, .grid-4, .grid-3 { grid-template-columns: repeat(2, 1fr); gap: .6rem; }
}

/* ── Navigation ──────────────────────────────────────────────────────────── */
.site-nav {
  height: var(--nav-h);
  background: var(--dark);
  position: sticky;
  top: var(--offline-bar-h, 0px);
  z-index: 210; /* above the mega-menu backdrop (150) so the dropdown sits on top */
  display: flex;
  align-items: center;
}
.nav-inner {
  display: flex;
  align-items: center;
  width: 100%;
  gap: 2rem;
}
.nav-logo {
  white-space: nowrap;
  flex-shrink: 0;
  display: flex;
  align-items: center;
}
/* Logo art is a white-on-transparent PNG; tint it to the brand gold (--gold #C8A96E). */
.nav-logo img { height: 48px; width: auto; filter: brightness(0) saturate(100%) invert(76%) sepia(13%) saturate(1100%) hue-rotate(2deg) brightness(89%) contrast(87%); }
.nav-logo span { color: var(--white); font-weight: 400; }
.nav-links {
  display: flex;
  gap: 1.4rem;
  flex: 1;
  justify-content: center;
}
.nav-link {
  font-size: .65rem;
  color: rgba(255,255,255,.97);
  letter-spacing: .1em;
  text-transform: uppercase;
  transition: var(--trans);
  padding: .25rem 0;
  border-bottom: 1px solid transparent;
}
.nav-link:hover, .nav-link.active { color: var(--gold); border-bottom-color: var(--gold); }
.nav-link.sale { color: var(--accent); }

/* ── Mega menu (shared dropdown, wired by nav.js) ─────────────────────────── */
.nav-trigger {
  background: none; border: none; padding: 0; margin: 0;
  font: inherit; color: rgba(255,255,255,.97); cursor: pointer;
  display: inline-flex; align-items: center; gap: .3rem;
}
.nav-trigger::after {
  content: ''; width: 0; height: 0;
  border-left: 3px solid transparent; border-right: 3px solid transparent;
  border-top: 4px solid currentColor; opacity: .5; transition: transform .2s;
}
.nav-trigger.active::after { transform: rotate(180deg); opacity: 1; }
.nav-trigger.active { color: var(--gold); }

.mega-menu {
  position: absolute; left: 0; right: 0; top: 100%;
  background: var(--dark);
  border-top: .5px solid rgba(255,255,255,.08);
  box-shadow: 0 12px 32px rgba(0,0,0,.35);
  z-index: 200;
  display: none;
  padding: 2rem 0 2.25rem;
}
.mega-menu.open { display: block; }
.mega-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1.25rem 2rem;
}
.mega-subgroup h5 {
  font-size: .62rem; letter-spacing: .14em; text-transform: uppercase;
  color: #E8DCC8; margin-bottom: .65rem;
  padding-bottom: .45rem; border-bottom: .5px solid rgba(255,255,255,.12);
  font-weight: 500;
}
.mega-subgroup a {
  display: flex; justify-content: space-between; align-items: baseline;
  padding: .28rem 0; color: rgba(255,255,255,.78); font-size: .78rem;
  text-decoration: none; line-height: 1.3;
}
.mega-subgroup a:hover { color: var(--gold); }
.mega-subgroup .mega-count { font-size: .62rem; color: rgba(255,255,255,.28); margin-left: .4rem; }
.mega-view-all {
  margin-top: 1.25rem; padding-top: 1rem;
  border-top: .5px solid rgba(255,255,255,.12);
  text-align: center;
}
.mega-view-all a {
  font-size: .78rem; font-weight: 500; color: var(--gold);
  text-decoration: none; letter-spacing: .04em;
}
.mega-view-all a:hover { color: #E8DCC8; }
.mega-backdrop {
  position: fixed; inset: 0; background: rgba(0,0,0,.18);
  z-index: 150; display: none;
}
.mega-backdrop.open { display: block; }

.nav-icons { display: flex; gap: .75rem; align-items: center; }
.nav-icon {
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; position: relative;
  border-radius: 50%;
  transition: var(--trans);
}
.nav-icon:hover { background: rgba(255,255,255,.08); }
.nav-icon svg { width: 18px; height: 18px; stroke: rgba(255,255,255,.7); fill: none; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.nav-icon:hover svg { stroke: var(--gold); }
.nav-icon .badge {
  position: absolute; top: 3px; right: 3px;
  width: 14px; height: 14px;
  background: var(--accent); color: #fff;
  border-radius: 50%; font-size: 8px;
  display: flex; align-items: center; justify-content: center;
  font-weight: 600;
}
.nav-hamburger { display: none; }

/* Mobile slide-in menu is hidden on desktop; the media query below turns it on
 * (flex) below 768px. Without this base rule the menu's links render as a stray
 * block on desktop, since .mobile-menu was only styled inside the media query. */
.mobile-menu { display: none; }

/* Subnav */
.site-subnav {
  height: 38px;
  background: var(--sand2);
  border-bottom: .5px solid rgba(0,0,0,.08);
  display: flex; align-items: center;
  overflow-x: auto;
  scrollbar-width: none;
}
.site-subnav::-webkit-scrollbar { display: none; }
.site-subnav .container { display: flex; gap: 1.5rem; }
.subnav-link {
  font-size: .65rem;
  color: var(--mid);
  letter-spacing: .07em;
  text-transform: uppercase;
  white-space: nowrap;
  padding: .25rem 0;
  border-bottom: 1.5px solid transparent;
  transition: var(--trans);
}
.subnav-link:hover, .subnav-link.active { color: var(--gold2); border-bottom-color: var(--gold); }

/* Mobile Nav */
@media (max-width: 768px) {
  .nav-links { display: none; }
  .nav-hamburger { display: flex; }
  .nav-logo { font-size: .95rem; }

  /* Mobile menu overlay */
  .mobile-menu {
    position: fixed; inset: 0; background: var(--dark);
    z-index: 200; padding: calc(var(--nav-h) + var(--offline-bar-h, 0px)) 1.5rem 2rem;
    transform: translateX(-100%);
    transition: transform .3s ease;
    display: flex; flex-direction: column; gap: 1.5rem;
  }
  .mobile-menu.open { transform: translateX(0); }
  .mobile-menu .nav-link {
    font-size: .85rem; padding: .75rem 0;
    border-bottom: .5px solid rgba(255,255,255,.08);
    display: block;
  }
}

/* ── Buttons ──────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .65rem 1.5rem;
  font-family: var(--font-b);
  font-size: .7rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  font-weight: 500;
  border-radius: var(--radius);
  transition: var(--trans);
  cursor: pointer;
  border: none;
  white-space: nowrap;
}
.btn-primary   { background: var(--gold);   color: var(--dark); }
.btn-primary:hover { background: var(--gold2); }
.btn-dark      { background: var(--dark);   color: var(--white); }
.btn-dark:hover { background: #2A2018; }
.btn-accent    { background: var(--accent); color: var(--white); }
.btn-accent:hover { background: #6B2020; }
.btn-ghost     { background: transparent; border: 1px solid rgba(255,255,255,.35); color: var(--white); }
.btn-ghost:hover { background: rgba(255,255,255,.1); }
.btn-outline   { background: transparent; border: 1px solid var(--gold); color: var(--gold); }
.btn-outline:hover { background: var(--gold); color: var(--dark); }
.btn-sm { padding: .45rem 1rem; font-size: .65rem; }
.btn-lg { padding: .85rem 2rem; font-size: .75rem; }
.btn-full { width: 100%; }
.btn:disabled { opacity: .45; cursor: not-allowed; }

/* ── Trust Bar ───────────────────────────────────────────────────────────── */
.trust-bar {
  background: var(--sand);
  border-bottom: .5px solid rgba(0,0,0,.06);
  overflow: hidden;
}
.trust-bar .container { display: flex; align-items: center; height: 40px; }
.trust-item {
  display: flex; align-items: center; gap: .4rem;
  flex: 1;
  padding: 0 1rem;
  border-right: .5px solid rgba(0,0,0,.1);
  font-size: .7rem;
  color: var(--mid);
  justify-content: center;
}
.trust-item:last-child { border-right: none; }
.trust-item svg { width: 14px; height: 14px; stroke: var(--gold); fill: none; stroke-width: 1.5; }

@media (max-width: 768px) {
  .trust-bar .container { overflow-x: auto; justify-content: flex-start; scrollbar-width: none; }
  .trust-bar .container::-webkit-scrollbar { display: none; }
  .trust-item { flex-shrink: 0; justify-content: flex-start; padding: 0 .85rem; }
}

/* ── Product Cards ───────────────────────────────────────────────────────── */
.product-card {
  background: var(--white);
  border: .5px solid rgba(0,0,0,.08);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  transition: var(--trans);
}
.product-card:hover {
  border-color: var(--gold);
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}
.product-img {
  aspect-ratio: 1;
  background: var(--sand2);
  display: flex; align-items: center; justify-content: center;
  position: relative;
  overflow: hidden;
}
.product-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.product-card:hover .product-img img { transform: scale(1.04); }
.product-badge {
  position: absolute; top: .5rem; right: .5rem;
  font-size: .6rem; padding: .2rem .45rem;
  border-radius: 1px;
  letter-spacing: .06em; text-transform: uppercase; font-weight: 600;
}
.badge-new  { background: var(--gold);   color: var(--dark); }
.badge-sale { background: var(--accent); color: var(--white); }
.badge-low  { background: var(--mid);    color: var(--white); }
.product-info { padding: .85rem; }
.product-brand { font-size: .6rem; color: var(--gold2); letter-spacing: .1em; text-transform: uppercase; margin-bottom: .2rem; }
.product-name { font-size: .85rem; color: var(--dark); margin-bottom: .4rem; line-height: 1.35; }
.product-price { font-size: 1rem; font-weight: 500; color: var(--dark); }
.product-price-old { font-size: .8rem; color: rgba(0,0,0,.3); text-decoration: line-through; margin-left: .3rem; }
.product-actions {
  display: flex; gap: .4rem;
  padding: 0 .85rem .85rem;
}
.btn-wishlist {
  width: 36px; height: 36px;
  border: .5px solid rgba(0,0,0,.1);
  border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  transition: var(--trans);
}
.btn-wishlist:hover, .btn-wishlist.active { border-color: var(--accent); }
.btn-wishlist svg { width: 15px; height: 15px; stroke: var(--mid); fill: none; stroke-width: 1.5; }
.btn-wishlist.active svg { stroke: var(--accent); fill: var(--accent); }

/* ── Category Cards ──────────────────────────────────────────────────────── */
.cat-card {
  background: var(--sand2);
  border-radius: var(--radius);
  padding: 1rem .75rem .85rem;
  text-align: center;
  cursor: pointer;
  border: .5px solid rgba(0,0,0,.06);
  transition: var(--trans);
}
.cat-card:hover { background: var(--sand); border-color: var(--gold); }
.cat-icon { font-size: 1.8rem; display: block; margin-bottom: .4rem; }
.cat-name { font-size: .65rem; color: var(--mid); letter-spacing: .07em; text-transform: uppercase; }

/* ── Promo Banner ────────────────────────────────────────────────────────── */
.promo-banner {
  border-radius: var(--radius);
  display: flex; align-items: center;
  padding: 0 1.5rem;
  height: 72px;
  gap: 1rem;
  overflow: hidden;
  position: relative;
}
.promo-banner h4 { font-family: var(--font-b); font-size: .9rem; color: var(--white); font-weight: 500; margin-bottom: .15rem; }
.promo-banner p { font-size: .7rem; color: rgba(255,255,255,.65); }
.promo-banner .btn { margin-left: auto; flex-shrink: 0; }

/* ── Loyalty Strip ───────────────────────────────────────────────────────── */
.loyalty-strip {
  background: var(--dark);
  padding: 1.25rem 0;
}
.loyalty-strip .container { display: flex; align-items: center; gap: 1.5rem; flex-wrap: wrap; }
.loyalty-text h3 { font-size: .95rem; color: var(--gold); font-family: var(--font-b); font-weight: 500; margin-bottom: .2rem; }
.loyalty-text p { font-size: .75rem; color: rgba(255,255,255,.5); }
.loyalty-tiers { display: flex; gap: .5rem; }
.tier-pill {
  padding: .25rem .75rem;
  border-radius: 20px;
  font-size: .6rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  border: .5px solid;
}
.tier-rider  { border-color: var(--tier-rider-border);      color: var(--tier-rider-bg); }
.tier-equest { border-color: var(--tier-equestrian-border); color: #D8D8D8; }
.tier-champ  { border-color: var(--tier-champion-bg);       color: var(--gold); }
.loyalty-cta { margin-left: auto; }

@media (max-width: 768px) {
  .loyalty-strip .container { flex-direction: column; align-items: flex-start; gap: .85rem; }
  .loyalty-cta { margin-left: 0; }
}

/* ── Forms ───────────────────────────────────────────────────────────────── */
.form-group { margin-bottom: 1.1rem; }
.form-label { display: block; font-size: .7rem; letter-spacing: .07em; text-transform: uppercase; color: var(--mid); margin-bottom: .4rem; font-weight: 500; }
.form-input {
  width: 100%;
  height: 44px;
  padding: 0 .9rem;
  border: 1px solid rgba(0,0,0,.15);
  border-radius: var(--radius);
  font-family: var(--font-b);
  font-size: .9rem;
  color: var(--dark);
  background: var(--white);
  transition: var(--trans);
}
.form-input:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(200,169,110,.12); }
.form-input::placeholder { color: rgba(0,0,0,.3); }
textarea.form-input { height: auto; padding: .75rem .9rem; resize: vertical; min-height: 90px; }
select.form-input { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%234A3F2F' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right .85rem center; padding-right: 2.5rem; }
.form-error { font-size: .72rem; color: var(--accent); margin-top: .3rem; }
.form-hint  { font-size: .72rem; color: rgba(0,0,0,.4); margin-top: .3rem; }

/* ── Cart ────────────────────────────────────────────────────────────────── */
.cart-drawer {
  position: fixed; top: 0; right: 0; bottom: 0;
  width: min(420px, 100vw);
  background: var(--white);
  box-shadow: var(--shadow-lg);
  z-index: 300;
  transform: translateX(100%);
  transition: transform .3s ease;
  display: flex; flex-direction: column;
}
.cart-drawer.open { transform: translateX(0); }
.cart-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.4);
  z-index: 299;
  opacity: 0; pointer-events: none;
  transition: opacity .3s;
}
.cart-overlay.open { opacity: 1; pointer-events: all; }
.cart-header { padding: 1.25rem 1.5rem; border-bottom: .5px solid rgba(0,0,0,.08); display: flex; align-items: center; justify-content: space-between; }
.cart-header h3 { font-size: 1rem; color: var(--dark); }
.cart-body { flex: 1; overflow-y: auto; padding: 1rem 1.5rem; }
.cart-item { display: flex; gap: .85rem; padding: .85rem 0; border-bottom: .5px solid rgba(0,0,0,.06); }
.cart-item-img { width: 68px; height: 68px; background: var(--sand2); border-radius: var(--radius); flex-shrink: 0; overflow: hidden; }
.cart-item-img img { width: 100%; height: 100%; object-fit: cover; }
.cart-item-info { flex: 1; min-width: 0; }
.cart-item-brand { font-size: .6rem; color: var(--gold2); letter-spacing: .08em; text-transform: uppercase; }
.cart-item-name { font-size: .82rem; color: var(--dark); line-height: 1.3; margin-bottom: .3rem; }
.cart-item-price { font-size: .9rem; font-weight: 500; color: var(--dark); }
.cart-qty { display: flex; align-items: center; gap: .5rem; margin-top: .4rem; }
.qty-btn { width: 26px; height: 26px; border: .5px solid rgba(0,0,0,.15); border-radius: 2px; display: flex; align-items: center; justify-content: center; font-size: .8rem; transition: var(--trans); }
.qty-btn:hover { border-color: var(--gold); color: var(--gold2); }
.qty-val { font-size: .85rem; min-width: 20px; text-align: center; }
.cart-footer { padding: 1.25rem 1.5rem; border-top: .5px solid rgba(0,0,0,.08); }
.cart-totals { margin-bottom: 1rem; }
.cart-total-row { display: flex; justify-content: space-between; font-size: .82rem; color: var(--mid); margin-bottom: .35rem; }
.cart-total-row.total { font-size: 1rem; font-weight: 500; color: var(--dark); margin-top: .5rem; padding-top: .5rem; border-top: .5px solid rgba(0,0,0,.1); }

/* ── Tags / Badges ───────────────────────────────────────────────────────── */
.tag {
  display: inline-block; padding: .2rem .6rem;
  font-size: .62rem; letter-spacing: .07em; text-transform: uppercase;
  border-radius: 2px; font-weight: 500;
}
.tag-gold   { background: rgba(200,169,110,.15); color: var(--gold2); }
.tag-green  { background: rgba(34,136,78,.12);   color: #1A6B3C; }
.tag-red    { background: rgba(139,58,58,.12);    color: var(--accent); }
.tag-grey   { background: rgba(0,0,0,.07);        color: var(--mid); }

/* ── Breadcrumb ──────────────────────────────────────────────────────────── */
.breadcrumb { display: flex; align-items: center; gap: .5rem; padding: .85rem 0; font-size: .72rem; color: rgba(0,0,0,.4); }
.breadcrumb a { color: var(--mid); }
.breadcrumb a:hover { color: var(--gold); }
.breadcrumb span { color: rgba(0,0,0,.3); }

/* ── Toast Notifications ─────────────────────────────────────────────────── */
.toast-wrap { position: fixed; bottom: 1.5rem; right: 1.5rem; z-index: 500; display: flex; flex-direction: column; gap: .5rem; }
.toast {
  background: var(--dark); color: var(--white);
  padding: .75rem 1.1rem;
  border-radius: var(--radius);
  font-size: .8rem;
  box-shadow: var(--shadow-lg);
  display: flex; align-items: center; gap: .6rem;
  animation: slideIn .3s ease;
  max-width: 300px;
}
.toast.success { border-left: 3px solid var(--gold); }
.toast.error   { border-left: 3px solid var(--accent); }
@keyframes slideIn { from { transform: translateX(110%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }

/* ── Footer ──────────────────────────────────────────────────────────────── */
.site-footer { background: var(--mid); padding: 3rem 0 1.5rem; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 2rem; margin-bottom: 2rem; }
.footer-logo { color: var(--gold); font-family: var(--font-h); font-size: 1.3rem; margin-bottom: .75rem; }
.footer-logo span { color: var(--white); }
.footer-tagline { font-size: .75rem; color: rgba(255,255,255,.4); line-height: 1.6; }
.footer-col h4 { font-size: .65rem; color: var(--gold); letter-spacing: .12em; text-transform: uppercase; margin-bottom: .85rem; font-family: var(--font-b); }
.footer-col a { display: block; font-size: .78rem; color: rgba(255,255,255,.45); margin-bottom: .4rem; transition: var(--trans); }
.footer-col a:hover { color: var(--white); }
.footer-bottom { border-top: .5px solid rgba(255,255,255,.1); padding-top: 1.25rem; display: flex; justify-content: space-between; align-items: center; font-size: .68rem; color: rgba(255,255,255,.3); }

@media (max-width: 768px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 1.5rem; }
  .footer-bottom { flex-direction: column; gap: .5rem; text-align: center; }
}
@media (max-width: 480px) {
  .footer-grid { grid-template-columns: 1fr; }
}

/* ── Utility ──────────────────────────────────────────────────────────────── */
.text-gold   { color: var(--gold); }
.text-accent { color: var(--accent); }
.text-mid    { color: var(--mid); }
.text-center { text-align: center; }
.flex        { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-between{ display: flex; align-items: center; justify-content: space-between; }
.gap-sm { gap: .5rem; }
.gap-md { gap: 1rem; }
.gap-lg { gap: 1.5rem; }
.mt-sm { margin-top: .75rem; }
.mt-md { margin-top: 1.5rem; }
.mt-lg { margin-top: 2.5rem; }
.mb-sm { margin-bottom: .75rem; }
.mb-md { margin-bottom: 1.5rem; }
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }

/* Loading spinner */
.spinner {
  width: 24px; height: 24px;
  border: 2px solid rgba(0,0,0,.1);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin .7s linear infinite;
  margin: 0 auto;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Skeleton loader */
.skeleton { background: linear-gradient(90deg, var(--sand2) 25%, var(--sand) 50%, var(--sand2) 75%); background-size: 200% 100%; animation: shimmer 1.4s infinite; border-radius: var(--radius); }
@keyframes shimmer { to { background-position: -200% 0; } }

/* -- Search overlay (shared across all shop pages) -- */
.search-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.55);
  z-index: 300; display: flex; align-items: flex-start; justify-content: center;
  padding-top: 5rem;
  opacity: 0; pointer-events: none; transition: opacity .25s;
}
.search-overlay.open { opacity: 1; pointer-events: all; }
.search-box {
  background: var(--white); border-radius: 8px;
  width: min(640px, 90vw); padding: 1.25rem;
  box-shadow: 0 20px 60px rgba(0,0,0,.25);
}
.search-input-wrap { display: flex; align-items: center; gap: .75rem; border-bottom: 1.5px solid var(--gold); padding-bottom: .75rem; }
.search-input {
  flex: 1; border: none; outline: none;
  font-size: 1.1rem; font-family: var(--font-b); color: var(--dark);
  background: transparent;
}
.search-input::placeholder { color: rgba(0,0,0,.25); }
.search-results { margin-top: .85rem; max-height: 320px; overflow-y: auto; }
.search-result-item {
  display: flex; align-items: center; gap: .85rem;
  padding: .65rem .5rem; border-radius: 3px;
  cursor: pointer; text-decoration: none; transition: background .15s;
}
.search-result-item:hover { background: var(--sand); }
.search-thumb { width: 44px; height: 44px; background: var(--sand2); border-radius: 2px; object-fit: cover; flex-shrink: 0; }
.search-info { flex: 1; min-width: 0; }
.search-brand { font-size: .6rem; color: var(--gold2); letter-spacing: .08em; text-transform: uppercase; }
.search-name  { font-size: .82rem; color: var(--dark); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.search-price { font-size: .85rem; font-weight: 500; color: var(--dark); flex-shrink: 0; }
.search-empty { font-size: .82rem; color: rgba(0,0,0,.4); text-align: center; padding: 1.5rem; }

/* -- Content pages (About, Contact, FAQ, Shipping, Returns, Privacy, Terms) -- */
.content-page { background: var(--sand); }
.content-hero {
  background: var(--dark);
  color: #fff;
  padding: 3rem 1.25rem 2.5rem;
  text-align: center;
}
.content-hero .eyebrow {
  font-size: .66rem; letter-spacing: .22em; text-transform: uppercase;
  color: var(--gold); margin-bottom: .6rem;
}
.content-hero h1 {
  font-family: var(--font-h); font-size: 2rem; line-height: 1.15;
  color: #fff; margin: 0 auto .4rem; max-width: 720px;
}
.content-hero p {
  font-size: .9rem; color: rgba(255,255,255,.7);
  max-width: 560px; margin: 0 auto;
}
.content-wrap {
  max-width: 880px; margin: 0 auto; padding: 2.5rem 1.25rem 4rem;
}
.content-card {
  background: var(--white); border-radius: 4px;
  padding: 2rem 1.75rem; margin-bottom: 1.25rem;
}
@media (max-width: 560px) { .content-card { padding: 1.5rem 1.1rem; } }
.content-card h2 {
  font-family: var(--font-h); font-size: 1.35rem; color: var(--dark);
  margin-bottom: .75rem; line-height: 1.25;
}
.content-card h3 {
  font-size: .72rem; letter-spacing: .1em; text-transform: uppercase;
  color: var(--gold2); margin: 1.35rem 0 .5rem; font-weight: 500;
}
.content-card h3:first-child { margin-top: 0; }
.content-card p,
.content-card li {
  font-size: .88rem; color: var(--mid); line-height: 1.65;
}
.content-card p + p { margin-top: .7rem; }
.content-card ul, .content-card ol { padding-left: 1.2rem; margin: .4rem 0 .7rem; }
.content-card li + li { margin-top: .25rem; }
.content-card strong { color: var(--dark); font-weight: 500; }
.content-card a { color: var(--gold2); text-decoration: underline; text-decoration-thickness: .5px; text-underline-offset: 2px; }
.content-card a:hover { color: var(--gold); }
.content-meta {
  font-size: .72rem; color: rgba(0,0,0,.4); margin-bottom: 1rem;
  letter-spacing: .04em;
}
.content-note {
  font-size: .72rem; color: rgba(0,0,0,.5);
  background: rgba(200,169,110,.08); border-left: 2px solid var(--gold);
  padding: .6rem .8rem; margin: 1rem 0; border-radius: 0 3px 3px 0;
}

/* Contact page specifics */
.contact-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 1rem;
  margin-bottom: 1.25rem;
}
@media (max-width: 640px) { .contact-grid { grid-template-columns: 1fr; } }
.contact-tile {
  background: var(--white); border-radius: 4px; padding: 1.35rem 1.25rem;
}
.contact-tile .label {
  font-size: .62rem; letter-spacing: .14em; text-transform: uppercase;
  color: var(--gold2); margin-bottom: .45rem;
}
.contact-tile .val { font-size: .9rem; color: var(--dark); line-height: 1.5; }
.contact-tile a { color: var(--dark); text-decoration: none; }
.contact-tile a:hover { color: var(--gold); }

/* FAQ — uses the same faq-item pattern as loyalty page (keep colours aligned) */
.faq-group h2 { font-family: var(--font-h); font-size: 1.2rem; color: var(--dark); margin: 1.5rem 0 .6rem; }
.faq-group h2:first-child { margin-top: 0; }

/* ── Micro-interactions (shared, CSS-only) ────────────────────────────────────
 * Pure-CSS polish that touches no JS. Applies to every page via tacd.css.
 */

/* Soft content fade-in on load. animation runs to completion regardless of JS,
 * so content is never left hidden if scripts fail. */
body { animation: page-fade-in .25s ease both; }
@keyframes page-fade-in { from { opacity: 0; } to { opacity: 1; } }

/* WhatsApp floating button: gentle bounce-in once on load, then idle.
 * .wa-btn already has its sizing/colour defined per-page; this only adds motion. */
.wa-btn { animation: wa-bounce-in .5s cubic-bezier(.34,1.56,.64,1) .4s backwards; }
@keyframes wa-bounce-in {
  from { opacity: 0; transform: scale(0) translateY(12px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

/* Add-to-cart confirmation flash: brief darker-green "Added" state.
 * Shared by .prod-add (home/listing) and .btn-atc (product detail). JS swaps the
 * label to a checkmark + "Added" for 1200ms via window.flashAddedButton(). */
.btn-added {
  background: #14633A !important;
  color: #fff !important;
  border-color: #14633A !important;
}

/* Cart icon pulse: window.pulseCart() adds .cart-pulse to the nav cart button. */
@keyframes cart-pulse {
  0%   { transform: scale(1); }
  50%  { transform: scale(1.25); }
  100% { transform: scale(1); }
}
.nav-icon.cart-pulse { animation: cart-pulse .35s ease-in-out; }

/* Sticky header shadow on scroll: no shadow at the top, soft shadow past 10px.
 * The .nav-scrolled class is toggled by a single passive scroll listener (nav.js). */
.site-nav { transition: box-shadow .3s ease; }
.site-nav.nav-scrolled { box-shadow: 0 2px 12px rgba(0,0,0,.10); }

/* Floating WhatsApp button — shared base so every shop page (incl. account and
 * checkout) gets identical styling. Pages that predate this may also declare it
 * inline; the rules are identical so there is no conflict. */
.wa-btn {
  position: fixed; bottom: 1.5rem; right: 1.5rem;
  width: 52px; height: 52px; background: #25D366;
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 20px rgba(37,211,102,.4); z-index: 90;
  cursor: pointer; transition: transform .2s; text-decoration: none;
}
.wa-btn:hover { transform: scale(1.08); }
.wa-btn svg { width: 26px; height: 26px; fill: #fff; }

/* Respect users who prefer reduced motion. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
}
