/* FNF — Mobile brand tokens
   White background, navy ink, electric-blue accent (matched to the fnf MOBILE logo)
*/

:root {
  --bg: #FFFFFF;
  --surface: #F5F8FC;
  --surface-2: #FFFFFF;
  --surface-sunk: #E9F1FB;
  --ink: #0B1E40;
  --ink-2: #33446A;
  --muted: #5A6B88;
  --muted-2: #93A1BA;
  --line: #E2E8F2;
  --line-soft: #EEF3F9;
  /* --clay* = primary brand blue (token names kept; values rebranded) */
  --clay: #0A66C2;
  --clay-deep: #074C95;
  --clay-soft: #BBD8F7;
  --clay-tint: #E7F1FC;
  /* electric/azure highlight from the logo's centre glow */
  --azure: #00A6E6;
  --navy: #0A1F5C;
  /* --sage* = success / secondary (e.g. free-delivery banner) */
  --sage: #1F9D78;
  --sage-soft: #A8DEC9;
  --sage-tint: #E2F5EE;
  --gold: #E0A52E;
  --rose: #D86A6A;
  /* extra status-pill hues so every order status has a distinct colour */
  --violet: #7C3AED;
  --slate:  #64748B;
  --teal:   #0D9488;
  --ok: #1F9D78;
  --shadow-sm: 0 1px 2px rgba(10,31,92,0.05), 0 2px 6px rgba(10,31,92,0.05);
  --shadow-md: 0 4px 14px rgba(10,31,92,0.08), 0 12px 32px rgba(10,31,92,0.07);
  --shadow-lg: 0 12px 28px rgba(10,31,92,0.12), 0 30px 60px rgba(10,31,92,0.12);
  --r-xs: 8px;
  --r-sm: 12px;
  --r-md: 18px;
  --r-lg: 24px;
  --r-xl: 32px;
}

[data-theme="dark"] {
  --bg: #0A1124;
  --surface: #111A33;
  --surface-2: #18233F;
  --surface-sunk: #0A1024;
  --ink: #EAF1FB;
  --ink-2: #BFCDE3;
  --muted: #8A9AB8;
  --muted-2: #5C6B86;
  --line: #21304F;
  --line-soft: #1A2740;
  --clay: #3D9BEA;
  --clay-deep: #0A66C2;
  --clay-soft: #15315A;
  --clay-tint: #122544;
  --azure: #2FC0F5;
  --navy: #0A1F5C;
  --sage: #44C79E;
  --sage-soft: #1B3F33;
  --sage-tint: #122C24;
  --gold: #E8BE5E;
  --rose: #E08A8A;
  --violet: #A78BFA;
  --slate:  #94A3B8;
  --teal:   #2DD4BF;
  --ok: #44C79E;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.40), 0 2px 6px rgba(0,0,0,0.30);
  --shadow-md: 0 4px 14px rgba(0,0,0,0.45), 0 12px 32px rgba(0,0,0,0.30);
  --shadow-lg: 0 12px 28px rgba(0,0,0,0.50), 0 30px 60px rgba(0,0,0,0.40);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  font-family: 'Manrope', -apple-system, system-ui, sans-serif;
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}

/* Mobile iOS-frame preview gets its own dark surround */
.page-wrap {
  background:
    radial-gradient(ellipse at top, #0A2A66 0%, #0A1F5C 55%, #060F2E 100%) !important;
}

/* Desktop wrap — full bleed, just shows the app */
.desktop-wrap {
  background: var(--bg);
  overflow-x: clip;
  max-width: 100vw;
}

/* ───────────────────────────────────────────────────────────
   Responsive — desktop layout collapses for small viewports
   The desktop app gets a mobile-app-style bottom tab bar
   ─────────────────────────────────────────────────────────── */
.show-md-up { display: flex; }
.show-md-down { display: none; }

/* Hide-only utilities — don't force display, just toggle visibility */
.desktop-only { /* default: inherit display */ }
.mobile-only { display: none !important; }

@media (max-width: 900px) {
  .show-md-up { display: none !important; }
  .show-md-down { display: flex !important; }
  .desktop-only { display: none !important; }
  .mobile-only { display: revert !important; }

  /* Push content above the floating bottom nav (footer-less pages: shop, account, cart, …). */
  .desktop-wrap { padding-bottom: calc(96px + env(safe-area-inset-bottom)); }
  /* Pages WITH the footer: don't add white padding below it (that showed as a blank gap under the
     dark footer). Instead give the footer its own dark bottom padding so the nav floats over the
     footer, and the page ends cleanly at the footer with no scrollable white space. */
  .desktop-wrap.has-footer { padding-bottom: 0; }
  .desktop-wrap.has-footer .site-footer { padding-bottom: calc(80px + env(safe-area-inset-bottom)); }

  /* Container paddings shrink */
  .dt-pad-x { padding-left: 16px !important; padding-right: 16px !important; }

  /* Generic grid collapse — used by hero/listings/etc */
  .dt-grid-2 { grid-template-columns: 1fr !important; }
  .dt-grid-3 { grid-template-columns: 1fr 1fr !important; }
  .dt-grid-4 { grid-template-columns: repeat(2, 1fr) !important; }
  .dt-grid-7 { grid-template-columns: repeat(3, 1fr) !important; }

  /* Hero / display type scale-down */
  .display-xxl { font-size: 38px !important; }
  .display-xl { font-size: 32px !important; }
  .display-lg { font-size: 26px !important; }
}

@media (max-width: 560px) {
  .dt-grid-3 { grid-template-columns: 1fr !important; }
  .dt-grid-4 { grid-template-columns: 1fr 1fr !important; }
  .dt-grid-7 { grid-template-columns: repeat(2, 1fr) !important; }

  /* Brand row → swipeable horizontal scroller on mobile.
     display:flex needs !important to beat the inline display:grid. */
  .brand-scroll {
    display: flex !important;
    overflow-x: auto;
    scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 4px;
  }
  .brand-scroll::-webkit-scrollbar { display: none; }
  .brand-scroll > button {
    flex: 0 0 auto;
    width: 46%;
    scroll-snap-align: start;
  }
}

/* Bottom nav (responsive desktop) */
/* Floating "liquid glass" bottom tab bar (mobile only; .show-md-down toggles display). */
.rt-bottom-nav {
  position: fixed; z-index: 100;
  left: 50%; transform: translateX(-50%);
  bottom: calc(14px + env(safe-area-inset-bottom));
  width: min(430px, calc(100% - 24px));
  gap: 4px;
  padding: 7px;
  border-radius: 26px;
  background: color-mix(in srgb, var(--surface) 60%, transparent);
  backdrop-filter: blur(26px) saturate(1.8);
  -webkit-backdrop-filter: blur(26px) saturate(1.8);
  border: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
  box-shadow: 0 16px 42px -14px rgba(11,30,64,.32), inset 0 1px 0 rgba(255,255,255,.55);
}
.rt-tab {
  position: relative; flex: 1;
  padding: 9px 0 7px;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  border-radius: 19px;
  color: var(--muted); text-decoration: none;
  transition: color .15s ease, background .18s ease, box-shadow .18s ease, transform .1s ease;
  -webkit-tap-highlight-color: transparent;
}
.rt-tab.active {   /* raised frosted-glass lozenge behind the selected tab */
  color: var(--clay);
  background: color-mix(in srgb, var(--surface) 90%, transparent);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.55), 0 6px 16px -8px color-mix(in srgb, var(--clay) 45%, transparent);
}
.rt-tab:active { transform: scale(.93); }   /* tactile press */
.rt-tab-ic { position: relative; display: inline-flex; }
.rt-tab-label { font-size: 10px; font-weight: 600; letter-spacing: .02em; }
.rt-tab.active .rt-tab-label { font-weight: 800; }
.rt-tab-badge {
  position: absolute; top: -5px; right: -9px;
  min-width: 16px; height: 16px; padding: 0 4px; border-radius: 999px;
  background: var(--clay); color: #fff; font-size: 9px; font-weight: 700;
  align-items: center; justify-content: center;
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--surface) 60%, transparent);
}
@media (prefers-reduced-motion: reduce) { .rt-tab { transition: none; } .rt-tab:active { transform: none; } }

/* Responsive type scale */
@media (max-width: 720px) {
  /* Reduce display-class headings */
  .display { font-size: 90%; }
  /* Reduce padding-x on common section paddings — selectors match the rendered DOM (no apostrophes around values) */
  .desktop-wrap [style*="padding: 32px 32px"] { padding-left: 16px !important; padding-right: 16px !important; }
  .desktop-wrap [style*="padding: 64px 32px"] { padding-left: 16px !important; padding-right: 16px !important; padding-top: 40px !important; }
  .desktop-wrap [style*="padding: 60px 32px"] { padding-left: 16px !important; padding-right: 16px !important; padding-top: 40px !important; }
  .desktop-wrap [style*="padding: 24px 32px"] { padding-left: 16px !important; padding-right: 16px !important; }
  .desktop-wrap [style*="padding: 0px 32px"],
  .desktop-wrap [style*="padding: 0 32px"] { padding-left: 16px !important; padding-right: 16px !important; }
  .desktop-wrap [style*="padding: 40px 32px"] { padding-left: 16px !important; padding-right: 16px !important; }

  /* Reduce announcement bar / hero giants */
  h1.display { font-size: clamp(28px, 8vw, 44px) !important; }
  h2.display { font-size: clamp(22px, 6vw, 32px) !important; }

  /* Hero stats row — let it wrap so things don't get cropped */
  .dt-hero-stats { gap: 16px 20px !important; margin-top: 24px !important; }
  .dt-hero-stats > div { white-space: nowrap; }

  /* Hero card collapses padding at narrow widths */
  .dt-hero { padding: 28px 20px !important; min-height: auto !important; }

  /* Account order row — collapse the 5-col grid to a 2x2 with chevron at top-right */
  .dt-order-row {
    grid-template-columns: 1fr auto !important;
    grid-template-areas:
      "id     chev"
      "items  items"
      "status total" !important;
    gap: 10px !important;
  }
  .dt-order-row > *:nth-child(1) { grid-area: id; min-width: 0; }
  .dt-order-row > *:nth-child(2) { grid-area: items; min-width: 0; flex-wrap: wrap; }
  .dt-order-row > *:nth-child(3) { grid-area: status; min-width: 0; }
  .dt-order-row > *:nth-child(4) { grid-area: total; min-width: 0; }
  .dt-order-row > *:nth-child(5) { grid-area: chev; }

  /* Cart row — collapse the 5-col grid: product + trash on top, price/qty/total below */
  .dt-cart-head { display: none !important; }
  .dt-cart-row {
    grid-template-columns: 1fr auto 1fr !important;
    grid-template-areas:
      "prod  prod del"
      "price qty  total" !important;
    gap: 14px 12px !important;
    padding: 16px !important;
    align-items: center !important;
  }
  .dt-cart-row > *:nth-child(1) { grid-area: prod; min-width: 0; }
  .dt-cart-row > *:nth-child(2) { grid-area: price; text-align: left !important; }
  .dt-cart-row > *:nth-child(3) { grid-area: qty; justify-self: center; }
  .dt-cart-row > *:nth-child(4) { grid-area: total; }
  .dt-cart-row > *:nth-child(5) { grid-area: del; justify-self: end; }
  /* Label the two prices so unit price vs line total isn't ambiguous on mobile */
  .dt-cart-row > *:nth-child(2)::before,
  .dt-cart-row > *:nth-child(4)::before {
    display: block;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 4px;
  }
  .dt-cart-row > *:nth-child(2)::before { content: "Price"; }
  .dt-cart-row > *:nth-child(4)::before { content: "Total"; }
}

/* Page chrome */
.page-wrap {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 32px 16px 80px;
  background:
    radial-gradient(ellipse at top, #0A2A66 0%, #0A1F5C 55%, #060F2E 100%);
  background-attachment: fixed;
}

/* App-internal layout — fills inside iOS frame children area */
.app-root {
  position: absolute;
  inset: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: 'Manrope', -apple-system, system-ui, sans-serif;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.screen {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--ink);
}

.screen-scroll {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.screen-scroll::-webkit-scrollbar { display: none; }

/* Type */
.display {
  font-family: 'Manrope', -apple-system, system-ui, sans-serif;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1;
}
.serif { font-family: 'Manrope', -apple-system, system-ui, sans-serif; font-weight: 700; }
.mono { font-family: 'JetBrains Mono', ui-monospace, monospace; }
.tabular { font-variant-numeric: tabular-nums; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 48px;
  padding: 0 22px;
  border-radius: 999px;
  border: none;
  font-family: inherit;
  font-weight: 600;
  font-size: 15px;
  letter-spacing: -0.01em;
  cursor: pointer;
  transition: transform 120ms ease, background 120ms ease, color 120ms ease, box-shadow 200ms ease;
  white-space: nowrap;
}
.btn:active { transform: scale(0.97); }

.btn-primary {
  background: var(--ink);
  color: var(--bg);
  box-shadow: var(--shadow-sm);
}
.btn-primary:hover { background: #000; }
[data-theme="dark"] .btn-primary { background: var(--ink); color: var(--surface-sunk); }

.btn-clay {
  background: var(--clay);
  color: #fff;
  box-shadow: 0 6px 14px -4px rgba(10,102,194,0.45);
}
.btn-clay:hover { background: var(--clay-deep); }

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line);
}
.btn-ghost:hover { background: var(--line-soft); }

.btn-sm { height: 36px; padding: 0 14px; font-size: 13px; }
.btn-xs { height: 28px; padding: 0 12px; font-size: 12px; }
.btn-block { width: 100%; }

/* Cards */
.card {
  background: var(--surface);
  color: var(--ink);                 /* own its text colour so it stays legible on any (e.g. dark) parent */
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
}

/* Segmented toggle (theme Light/Dark, etc.). Active option inverts to --ink so it's clearly
   the selected one in both light and dark themes. JS sets aria-pressed. */
.seg-toggle {
  display: inline-flex;
  gap: 4px;
  background: var(--surface-sunk);
  padding: 4px;
  border-radius: 999px;
}
.seg-opt {
  padding: 8px 18px;
  border: none;
  cursor: pointer;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  text-transform: capitalize;
  background: transparent;
  color: var(--muted);
  transition: background 160ms ease, color 160ms ease, box-shadow 160ms ease;
}
.seg-opt:hover { color: var(--ink); }
.seg-opt[aria-pressed="true"] {
  background: var(--ink);
  color: var(--surface);
  box-shadow: var(--shadow-sm);
}

/* Flash-deal banner: copy + countdown on the left, a horizontal product scroller on the right.
   The scroller (.hslider) holds any number of deal products; .deal-slide fixes each card's width. */
.deal-banner { display: grid; grid-template-columns: 1fr 2.2fr; gap: 28px; align-items: center; }
.deal-slide { flex: 0 0 248px; scroll-snap-align: start; }
@media (max-width: 900px) { .deal-banner { grid-template-columns: 1fr; gap: 22px; } }
@media (max-width: 560px) { .deal-slide { flex: 0 0 80%; } }

/* Home showcase rail (Featured collection / New arrivals) — the same component for both.
   A CSS grid whose auto-columns are exactly 1/4 of the visible width (3 × 16px gaps),
   so precisely 4 cards show on screen and the rest scroll horizontally via the arrows.
   grid-auto-columns resolves against the container's visible width, so column widths stay
   equal for any number of cards — fewer than 4 left-align at the same size, never stretched. */
.prod-rail {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: calc((100% - 48px) / 4);
  gap: 16px;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  /* overflow-x:auto forces the browser to clip vertical overflow too, which was slicing the cards'
     drop shadow into a hard line at the bottom. Pad the scroller so the soft shadow has room, and
     pull the following content back up with a negative margin so section spacing is unchanged. */
  padding-top: 4px;
  padding-bottom: 28px;
  margin-bottom: -22px;
}
/* Slide is a flex box and the card fills it, so every card in the rail is the SAME height as the
   tallest one regardless of its content (name length, colour dots, etc.). */
.prod-rail > .prod-slide { min-width: 0; scroll-snap-align: start; display: flex; }
.prod-rail > .prod-slide > * { flex: 1 1 auto; min-width: 0; }
@media (max-width: 900px) { .prod-rail { grid-auto-columns: calc((100% - 16px) / 2.2); } }
@media (max-width: 560px) { .prod-rail { grid-auto-columns: 82%; } }

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--line);
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-2);
  cursor: pointer;
  transition: all 120ms ease;
  white-space: nowrap;
}
.chip:hover { border-color: var(--ink); }
.chip-active {
  background: var(--ink);
  color: var(--bg);
  border-color: var(--ink);
}
.chip-clay-active {
  background: var(--clay);
  color: #fff;
  border-color: var(--clay);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.badge-clay { background: var(--clay); color: #fff; }
.badge-sage { background: var(--sage); color: #fff; }
.badge-ink  { background: var(--ink); color: var(--bg); }
.badge-soft { background: var(--clay-tint); color: var(--clay-deep); }
.badge-outline { border: 1px solid var(--line); color: var(--ink-2); background: transparent; }

/* Order status pill — soft tone-tinted with a leading dot (mirrors the CMS status pill). */
.status-pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 11px; border-radius: 999px;
  font-size: 11px; font-weight: 700; letter-spacing: 0.04em;
  text-transform: uppercase; line-height: 1; white-space: nowrap;
}
.status-pill::before { content: ""; width: 6px; height: 6px; border-radius: 999px; background: currentColor; flex-shrink: 0; }
.status-pill--sage { color: var(--sage); background: color-mix(in srgb, var(--sage) 16%, var(--surface-2)); }
.status-pill--rose { color: var(--rose); background: color-mix(in srgb, var(--rose) 18%, var(--surface-2)); }
.status-pill--gold { color: color-mix(in srgb, var(--gold), var(--ink) 34%); background: color-mix(in srgb, var(--gold) 22%, var(--surface-2)); }
.status-pill--clay { color: var(--clay); background: color-mix(in srgb, var(--clay) 14%, var(--surface-2)); }
.status-pill--ink  { color: var(--ink-2); background: color-mix(in srgb, var(--ink) 10%, var(--surface-2)); }
.status-pill--azure  { color: var(--azure);  background: color-mix(in srgb, var(--azure) 16%, var(--surface-2)); }
.status-pill--violet { color: var(--violet); background: color-mix(in srgb, var(--violet) 16%, var(--surface-2)); }
.status-pill--slate  { color: var(--slate);  background: color-mix(in srgb, var(--slate) 16%, var(--surface-2)); }
.status-pill--teal   { color: var(--teal);   background: color-mix(in srgb, var(--teal) 16%, var(--surface-2)); }

/* In-page confirm dialog (replaces the native browser confirm()). */
.confirm-overlay { position: fixed; inset: 0; z-index: 1200; display: flex; align-items: center; justify-content: center; padding: 20px; background: color-mix(in srgb, var(--ink) 45%, transparent); opacity: 0; transition: opacity .2s ease; }
.confirm-overlay.open { opacity: 1; }
.confirm-box { background: var(--surface-2); border: 1px solid var(--line); border-radius: 18px; padding: 24px; max-width: 380px; width: 100%; box-shadow: var(--shadow-lg); transform: translateY(10px) scale(.97); transition: transform .2s ease; }
.confirm-overlay.open .confirm-box { transform: none; }
.confirm-msg { font-size: 15px; font-weight: 600; color: var(--ink); line-height: 1.5; }
.confirm-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 22px; }

/* Inputs */
.input {
  width: 100%;
  height: 48px;
  padding: 0 16px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--surface-2);
  font-family: inherit;
  font-size: 15px;
  color: var(--ink);
  transition: border-color 120ms ease, background 120ms ease;
  outline: none;
}
[data-theme="dark"] .input { background: var(--surface-2); }
.input::placeholder { color: var(--muted); }
.input:focus { border-color: var(--ink); }

.label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

/* Product silhouette gradient — universal placeholder */
.prod-bg {
  position: relative;
  border-radius: var(--r-md);
  overflow: hidden;
  isolation: isolate;
}
.prod-bg::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 30% 20%, rgba(255,255,255,0.4) 0%, transparent 50%),
    radial-gradient(ellipse at 70% 90%, rgba(0,0,0,0.15) 0%, transparent 60%);
  pointer-events: none;
  z-index: 1;
}

/* Hairlines */
.hr {
  height: 1px;
  background: var(--line);
  border: none;
  margin: 0;
}

/* Skeleton shimmer */
@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}
.skeleton {
  background: linear-gradient(90deg, var(--line-soft) 0%, var(--surface) 50%, var(--line-soft) 100%);
  background-size: 200% 100%;
  animation: shimmer 1.6s ease-in-out infinite;
  border-radius: 8px;
}

/* Toasts */
@keyframes toast-in {
  from { transform: translate(-50%, 12px); opacity: 0; }
  to { transform: translate(-50%, 0); opacity: 1; }
}
.toast {
  animation: toast-in 240ms cubic-bezier(.2,.9,.3,1.2);
}

/* Page transitions — transform-only so a stalled animation
   never hides content (verifier-safe + screenshot-safe) */
@keyframes fade-up {
  from { transform: translateY(8px); }
  to   { transform: translateY(0); }
}
.fade-up { animation: fade-up 320ms cubic-bezier(.2,.7,.3,1) both; }

/* In-button loading state (e.g. Place order while it saves + emails the confirmation). */
@keyframes spin { to { transform: rotate(360deg); } }
.btn-spinner {
  display: inline-block; width: 15px; height: 15px; vertical-align: -2px; margin-right: 7px;
  border: 2px solid currentColor; border-top-color: transparent; border-radius: 50%;
  opacity: 0.85; animation: spin 0.6s linear infinite;   /* currentColor → adapts to any button */
}
.btn:disabled { cursor: not-allowed; }
.btn.is-loading { cursor: wait; opacity: 0.92; }

/* Value-prop / feature cards — white card, interactive hover */
.feature-item {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 28px;
  box-shadow: var(--shadow-sm);
  transition: transform 240ms cubic-bezier(.2,.8,.2,1), box-shadow 240ms ease, border-color 240ms ease;
}
.feature-item:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); border-color: var(--clay-soft); }
.feature-ic {
  transition: transform 300ms cubic-bezier(.2,.8,.2,1), background 220ms ease, color 220ms ease;
}
.feature-item:hover .feature-ic {
  background: var(--clay);
  color: #fff;
  transform: scale(1.1);
}

/* ── "Why choose FNF" feature cards — modern, motion-rich (index.php) ─────────
   Each card sets its own --accent inline (theme-aware token); tints/glows derive
   from it via color-mix, so light/dark theming keeps working. */
.why-card {
  position: relative; overflow: hidden; height: 100%;
  --accent: var(--clay);   /* single brand-blue accent for every card */
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 30px 26px 26px;
  box-shadow: var(--shadow-sm);
  transition: transform .4s cubic-bezier(.2,.8,.2,1), box-shadow .4s ease, border-color .4s ease;
}
.why-card::after {    /* soft accent glow behind the icon on hover */
  content: ""; position: absolute; top: -50px; left: -50px; width: 170px; height: 170px;
  background: radial-gradient(circle, color-mix(in srgb, var(--accent) 24%, transparent), transparent 70%);
  opacity: 0; transition: opacity .5s ease; pointer-events: none;
}
.why-card:hover {
  transform: translateY(-8px);
  border-color: color-mix(in srgb, var(--accent) 38%, var(--line));
  box-shadow: 0 22px 44px -20px color-mix(in srgb, var(--accent) 50%, transparent);
}
.why-card:hover::after  { opacity: 1; }
.why-card-num {
  position: absolute; top: 18px; right: 22px;
  font-size: 30px; font-weight: 800; letter-spacing: -.03em; line-height: 1;
  color: color-mix(in srgb, var(--accent) 15%, transparent);
  transition: color .4s ease, transform .4s ease;
}
.why-card:hover .why-card-num { color: color-mix(in srgb, var(--accent) 40%, transparent); transform: translateY(-2px); }
.why-card-ic {
  position: relative; z-index: 1;
  width: 62px; height: 62px; border-radius: 18px;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 24%, transparent);
  transition: transform .45s cubic-bezier(.34,1.56,.64,1), background .3s ease, color .3s ease, box-shadow .35s ease;
}
.why-card:hover .why-card-ic {
  background: var(--accent); color: #fff;
  transform: translateY(-2px) scale(1.08);
  box-shadow: 0 14px 24px -8px color-mix(in srgb, var(--accent) 60%, transparent);
}
.why-card-title { margin-top: 18px; font-size: 18px; font-weight: 700; color: var(--ink); transition: color .3s ease; }
.why-card:hover .why-card-title { color: var(--accent); }
.why-card-text { margin-top: 10px; font-size: 14px; color: var(--muted); line-height: 1.6; }
@keyframes why-pop { 0% { transform: scale(.55); opacity: 0; } 60% { transform: scale(1.12); } 100% { transform: scale(1); opacity: 1; } }
.reveal.in .why-card-ic { animation: why-pop .6s cubic-bezier(.34,1.56,.64,1); }
@media (prefers-reduced-motion: reduce) {
  .why-card, .why-card::after, .why-card-num, .why-card-ic, .why-card-title { transition: none; }
  .why-card:hover { transform: none; }
  .reveal.in .why-card-ic { animation: none; }
}

/* Popular categories — bento grid */
.cat-bento {
  display: grid;
  grid-template-columns: 1.25fr 1fr 1fr;
  grid-template-rows: 248px 248px;
  grid-template-areas: "a b b" "a c d";
  gap: 16px;
}
.cat-tile {
  position: relative;
  overflow: hidden;
  border: none;
  border-radius: 22px;
  cursor: pointer;
  padding: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  transition: transform 260ms cubic-bezier(.2,.8,.2,1), box-shadow 260ms ease;
}
.cat-tile:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.cat-tile-ic {
  position: absolute;
  right: -8px; bottom: -18px;
  color: rgba(255,255,255,0.14);
  transition: transform 420ms cubic-bezier(.2,.8,.2,1);
  pointer-events: none;
}
.cat-tile:hover .cat-tile-ic { transform: scale(1.14) translate(-8px, -8px); }
@media (max-width: 720px) {
  .cat-bento {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 220px 200px 200px;
    grid-template-areas: "a a" "b b" "c d";
  }
}
@media (max-width: 480px) {
  .cat-bento {
    grid-template-columns: 1fr;
    grid-template-rows: repeat(4, 170px);
    grid-template-areas: "a" "b" "c" "d";
  }
}

/* Brand-logo marquee — JS-driven (assets/js/main.js): renders ONE set from the data, then clones
   enough copies to cover the screen and animates at a constant speed, so it scales to any number of
   brands added in the CMS with no end-gap. Pauses on hover/focus. Falls back to a static row if JS is off. */
.brand-marquee {
  overflow: hidden;
  width: 100%;
  -webkit-mask-image: linear-gradient(to right, transparent, #000 6%, #000 94%, transparent);
  mask-image: linear-gradient(to right, transparent, #000 6%, #000 94%, transparent);
}

.brand-marquee-track {
  display: flex;
  align-items: center;
  width: max-content;
  padding: 14px 0;
  will-change: transform;
}
/* No card chrome — just the logo. Fixed slot + right margin gives even spacing. */
.brand-logo {
  flex: 0 0 auto;
  width: 172px;
  height: 64px;
  margin-right: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 16px;
  transition: transform 200ms ease;
}
.brand-logo:hover { transform: scale(1.06); }
.brand-logo img { max-height: 34px; max-width: 124px; width: auto; height: auto; object-fit: contain; display: block; }
.brand-logo span { font-weight: 800; font-size: 16px; letter-spacing: -0.03em; white-space: nowrap; } /* fallback when a brand has no logo */
@media (max-width: 560px) {
  .brand-logo { width: 138px; height: 56px; margin-right: 14px; padding: 0 12px; }
  .brand-logo img { max-height: 28px; max-width: 100px; }
}

/* Testimonials — auto-scrolling card marquee with faded edges */
.testi-marquee {
  overflow: hidden;
  width: 100%;
  -webkit-mask-image: linear-gradient(to right, transparent, #000 7%, #000 93%, transparent);
  mask-image: linear-gradient(to right, transparent, #000 7%, #000 93%, transparent);
}
.testi-track {
  display: flex;
  gap: 20px;
  width: max-content;
  padding: 6px 32px;
  animation: testi-marquee 60s linear infinite;
}
.testi-marquee:hover .testi-track { animation-play-state: paused; }
.testi-card {
  flex-shrink: 0;
  width: 360px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 24px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 16px;
}
@keyframes testi-marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
@media (max-width: 560px) {
  .testi-card { width: 280px; padding: 20px; }
}

/* Manual horizontal slider (drag / arrow controls, snap) */
.hslider {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  align-items: stretch;
}
.hslider::-webkit-scrollbar { display: none; }
.hslide {
  flex: 0 0 340px;
  scroll-snap-align: start;
}
.hslider-btn {
  width: 42px; height: 42px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--surface-2); color: var(--ink);
  cursor: pointer; display: inline-flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-sm);
  transition: background 160ms ease, color 160ms ease, transform 160ms ease;
}
.hslider-btn:hover { background: var(--clay); color: #fff; transform: translateY(-1px); }

/* Image cards inside a slider (e.g. About → reasons) */
.reason-card {
  transition: transform 240ms cubic-bezier(.2,.8,.2,1), box-shadow 240ms ease, border-color 240ms ease;
}
.reason-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); border-color: var(--clay-soft); }
.reason-card img { transition: transform 400ms cubic-bezier(.2,.8,.2,1); filter: brightness(0.9) saturate(0.95); }
.reason-card:hover img { transform: scale(1.05); }

@media (max-width: 560px) {
  .hslide { flex: 0 0 82%; }
}

@keyframes slide-in-r {
  from { transform: translateX(20px); }
  to   { transform: translateX(0); }
}
.slide-in-r { animation: slide-in-r 280ms cubic-bezier(.2,.7,.3,1) both; }

@keyframes slide-up {
  from { transform: translateY(100%); }
  to   { transform: translateY(0); }
}
.slide-up { animation: slide-up 320ms cubic-bezier(.2,.8,.2,1) both; }

@keyframes sd-slide-r {
  from { transform: translateX(100%); }
  to   { transform: translateX(0); }
}
@keyframes sd-slide-l {
  from { transform: translateX(-100%); }
  to   { transform: translateX(0); }
}

/* Generic phone silhouette */
.phone-silo {
  position: relative;
  z-index: 2;
  width: 38%;
  aspect-ratio: 9 / 19;
  border-radius: 14% / 6.5%;
  background: linear-gradient(160deg, rgba(255,255,255,0.10) 0%, rgba(0,0,0,0.20) 100%);
  box-shadow:
    inset 0 0 0 2px rgba(255,255,255,0.12),
    inset 0 0 30px rgba(0,0,0,0.25),
    0 20px 40px -10px rgba(0,0,0,0.45);
}
.phone-silo::after {
  content: '';
  position: absolute;
  top: 6%; left: 50%;
  transform: translateX(-50%);
  width: 36%; height: 4%;
  border-radius: 999px;
  background: rgba(0,0,0,0.45);
}

/* Tap highlight */
button, [role="button"] { -webkit-tap-highlight-color: transparent; }
/* No double-tap-to-zoom on interactive controls (keeps single-tap, scroll and pinch-zoom). Stops the
   page zooming when users rapidly tap arrows, carousel dots, quantity steppers, etc. on mobile. */
button, a, [role="button"], [role="link"] { touch-action: manipulation; }

/* ───────────────────────────────────────────────────────────
   Mobile breakpoints — phones up to ~480px and small phones ~380px
   These apply on top of the 900/720/560 breakpoints above.
   ─────────────────────────────────────────────────────────── */
@media (max-width: 480px) {
  /* All horizontal section paddings collapse to 12px */
  .dt-pad-x { padding-left: 12px !important; padding-right: 12px !important; }
  .desktop-wrap [style*="padding: 32px 32px"],
  .desktop-wrap [style*="padding: 64px 32px"],
  .desktop-wrap [style*="padding: 60px 32px"],
  .desktop-wrap [style*="padding: 24px 32px"],
  .desktop-wrap [style*="padding: 40px 32px"],
  .desktop-wrap [style*="padding: 0px 32px"],
  .desktop-wrap [style*="padding: 0 32px"] {
    padding-left: 12px !important; padding-right: 12px !important;
  }

  /* All multi-column grids collapse to 1 col */
  .dt-grid-2,
  .dt-grid-3,
  .dt-grid-4 { grid-template-columns: 1fr !important; }
  .dt-grid-7 { grid-template-columns: repeat(2, 1fr) !important; }

  /* Hero card — even tighter padding, smaller min-height */
  .dt-hero { padding: 20px 16px !important; }
  .dt-hero h1.display { font-size: clamp(24px, 7vw, 36px) !important; }

  /* Display type scale-down */
  .display-xxl { font-size: 30px !important; }
  .display-xl { font-size: 26px !important; }
  .display-lg { font-size: 22px !important; }
  h1.display { font-size: clamp(24px, 7vw, 36px) !important; }
  h2.display { font-size: clamp(20px, 5.5vw, 28px) !important; }

  /* Bottom nav: tighter spacing for 5 items on narrow widths */
  .rt-bottom-nav { padding-left: 6px; padding-right: 6px; }

  /* Buttons keep min tap target of 44px height even when fontSize shrinks */
  .btn { min-height: 44px; }
}

@media (max-width: 380px) {
  /* iPhone SE / small Android — squeeze further */
  .dt-pad-x { padding-left: 10px !important; padding-right: 10px !important; }
  .desktop-wrap [style*="padding"] {
    /* Don't let any inline section padding exceed 10px on x */
    padding-left: 10px !important; padding-right: 10px !important;
  }

  .dt-grid-7 { grid-template-columns: 1fr 1fr !important; }
  .dt-hero { padding: 16px 12px !important; }

  h1.display { font-size: clamp(20px, 7vw, 30px) !important; }
}

/* Images never overflow their container, at ANY width (was previously scoped to ≤480px only,
   which left tablet widths exposed). */
.desktop-wrap img,
.desktop-wrap svg,
.desktop-wrap video { max-width: 100%; height: auto; }

/* Grid/flex children default to min-width:auto (min-content), which lets wide content — long
   text, prices, emails, storage tiles — force its track past the viewport and break the layout.
   Letting them shrink to 0 keeps everything inside the screen (overflow then scrolls inside its
   own container). This is the site's global safety net; it MUST match the inline styles the PHP
   actually emits, which have NO space (display:grid) — the old spaced-only selector matched
   nothing. Both variants kept for safety. Applies at all widths, not just mobile. */
.desktop-wrap [style*="display:grid"] > *,
.desktop-wrap [style*="display:flex"] > *,
.desktop-wrap [style*="display: grid"] > *,
.desktop-wrap [style*="display: flex"] > * { min-width: 0; }

/* ═══════════════════════════════════════════════════════════════
   PHP port additions — utilities used by the server-rendered pages.
   (Everything above is the verbatim prototype stylesheet.)
   ═══════════════════════════════════════════════════════════════ */

/* Section horizontal padding (replaces the prototype's inline-string hack) */
.sec-x { padding-left: 32px !important; padding-right: 32px !important; }
@media (max-width: 900px) { .sec-x { padding-left: 24px !important; padding-right: 24px !important; } }
@media (max-width: 720px) { .sec-x { padding-left: 16px !important; padding-right: 16px !important; } }
@media (max-width: 480px) { .sec-x { padding-left: 12px !important; padding-right: 12px !important; } }
@media (max-width: 380px) { .sec-x { padding-left: 10px !important; padding-right: 10px !important; } }

/* Content-aligned bleed slider: first card lines up with the 1180 content column
   (matching .sec-x gutters), cards bleed off the right edge to invite scrolling.
   50% - 558px = (100% - 1180px)/2 + 32px gutter. */
.hslider-bleed { padding-left: max(32px, calc(50% - 558px)); padding-right: 32px; scroll-padding-left: max(32px, calc(50% - 558px)); }
@media (max-width: 900px) { .hslider-bleed { padding-left: 24px; padding-right: 24px; scroll-padding-left: 24px; } }
@media (max-width: 720px) { .hslider-bleed { padding-left: 16px; padding-right: 16px; scroll-padding-left: 16px; } }
@media (max-width: 480px) { .hslider-bleed { padding-left: 12px; padding-right: 12px; scroll-padding-left: 12px; } }
@media (max-width: 380px) { .hslider-bleed { padding-left: 10px; padding-right: 10px; scroll-padding-left: 10px; } }

/* Uploadable hero banner carousel. Slides are stacked and crossfade (opacity transition) so
   switching is smooth, not an instant cut. The CONTAINER carries the height because the slides are
   absolutely positioned. svh (not dvh): dvh changes as the mobile address bar hides/shows while
   scrolling, which resized the hero and shoved every section below it around — the "page jumps to
   another section" bug. svh is fixed, so the hero height (and everything below) stays put. */
[data-hero] { position: relative; height: 100vh; overflow: hidden; }
@supports (height: 100svh) { [data-hero] { height: 100svh; } }
.hero-banner { position: absolute; inset: 0; overflow: hidden; background: var(--clay-tint); opacity: 0; pointer-events: none; transition: opacity .6s ease; }
.hero-banner.is-active { opacity: 1; pointer-events: auto; z-index: 1; }
@media (prefers-reduced-motion: reduce) { .hero-banner { transition: none; } }
/* Hero carousel dots: the visible bar stays slim, but a transparent ::before enlarges the touch
   target so taps reliably switch slides on mobile instead of missing and opening the banner link. */
[data-hero-dot] { position: relative; }
[data-hero-dot]::before { content: ""; position: absolute; inset: -16px -8px; }

/* ── Top bar: solid sticky by default; transparent overlay → scroll-to-pill on hero pages ── */
.topbar { position: sticky; top: 0; z-index: 50; }
.topbar-bar {
  display: flex; align-items: center; gap: 28px; padding: 10px 32px; position: relative; z-index: 2;
  transition: background .35s cubic-bezier(.4,0,.2,1), box-shadow .35s ease, border-radius .35s ease,
              top .35s cubic-bezier(.4,0,.2,1), left .35s cubic-bezier(.4,0,.2,1), right .35s cubic-bezier(.4,0,.2,1);
}
.topbar:not(.topbar-hero) .topbar-bar {
  background: linear-gradient(90deg, color-mix(in srgb, var(--clay) 8%, var(--bg)) 0%, color-mix(in srgb, var(--clay) 12%, var(--bg)) 50%, color-mix(in srgb, var(--clay) 18%, var(--bg)) 100%);
  box-shadow: var(--shadow-sm);
}

/* Hero page: nav overlays the banner, transparent with a legibility scrim, white text + logo */
.topbar-hero { position: relative; --nav-fg: #fff; }
.topbar-hero .topbar-bar {
  position: fixed; left: 0; right: 0; top: 0;
  background: transparent;
  /* Keep the fixed bar on its own GPU layer so iOS Safari doesn't lag it to a stale mid-page
     position during momentum scrolling (the "nav gets stuck in the middle then snaps back" bug). */
  transform: translateZ(0);
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}
/* Overlay state (before docking): extra top space so the logo isn't glued to the screen edge.
   Reverts to the compact base padding once .is-scrolled docks it into the floating pill. */
.topbar-hero:not(.is-scrolled) .topbar-bar { padding-top: 22px; }
/* Full-width scrim behind the nav. It's independent of the bar so it never shrinks,
   and it crossfades out on scroll, so the docking pill has no moving side/edge lines. */
.topbar-scrim {
  position: fixed; top: 0; left: 0; right: 0; height: 150px;
  background: linear-gradient(to bottom, rgba(8,14,28,0.78) 0%, rgba(8,14,28,0.32) 38%, rgba(8,14,28,0) 100%);
  pointer-events: none; z-index: 0; opacity: 1; transition: opacity .35s ease;
}
.topbar-hero.is-scrolled .topbar-scrim { opacity: 0; }

/* Logo swap: the colour logo on light bars, the generated white logo wherever the bar is
   dark — over the hero before docking, and in dark theme once docked. Exactly one shows at
   a time (no inline display styles), so they never stack. Replaces the old CSS filter that
   flattened the logo into a featureless white blob. */
.topbar-logo, .topbar-logo-inv, .drawer-logo, .drawer-logo-inv { display: block; }
.topbar-logo-inv, .drawer-logo-inv { display: none; }
.topbar-hero:not(.is-scrolled) .topbar-logo     { display: none; }
.topbar-hero:not(.is-scrolled) .topbar-logo-inv { display: block; }
[data-theme="dark"] .topbar:not(.topbar-hero) .topbar-logo,
[data-theme="dark"] .topbar-hero.is-scrolled  .topbar-logo,
[data-theme="dark"] .drawer-logo                 { display: none; }
[data-theme="dark"] .topbar:not(.topbar-hero) .topbar-logo-inv,
[data-theme="dark"] .topbar-hero.is-scrolled  .topbar-logo-inv,
[data-theme="dark"] .drawer-logo-inv             { display: block; }

/* Scrolled: solid, squeezed, rounded floating bar with ink text */
.topbar-hero.is-scrolled { --nav-fg: var(--ink); }
.topbar-hero.is-scrolled .topbar-bar {
  top: 12px;
  left: max(16px, calc((100% - 1180px) / 2));
  right: max(16px, calc((100% - 1180px) / 2));
  background: var(--surface-2); box-shadow: var(--shadow-md); border-radius: 18px;
}
@media (max-width: 900px) {
  /* iOS Safari drifts/freezes a position:fixed bar mid-page during fast momentum scroll when the bar
     animates its coordinates as it docks. On mobile, pin the pill at ONE constant position and size in
     BOTH the overlay and scrolled states — only the background + shadow fade in on scroll (no coordinate
     or size animation). With the GPU-layer promotion above, the bar stays rock-steady at the top. */
  .topbar-hero .topbar-bar,
  .topbar-hero:not(.is-scrolled) .topbar-bar,
  .topbar-hero.is-scrolled .topbar-bar {
    top: 8px; left: 10px; right: 10px; border-radius: 14px; padding: 12px 16px;
    transition: background .25s ease, box-shadow .25s ease;
  }
}
@media (prefers-reduced-motion: reduce) { .topbar-bar { transition: none; } }

/* Links / inline text actions */
a { color: inherit; text-decoration: none; }
.link-accent { color: var(--clay); font-weight: 700; cursor: pointer; }
.unstyled-btn { background: none; border: none; padding: 0; margin: 0; font: inherit; color: inherit; cursor: pointer; }

/* Categories mega menu (JS toggles .open; also opens on hover for pointer devices) */
.mega { display: none; }
.mega.open { display: grid; }
.has-mega:hover .mega { display: grid; }
/* Bridge across the 8px gap so hover survives the trip from button to panel */
.mega::before { content: ''; position: absolute; left: 0; right: 0; top: -10px; height: 12px; }
/* Dropdown links: highlight on hover (no default-active item) */
.mega-link { padding: 8px 10px; margin: 0 -10px; border-radius: 8px; font-size: 13px; font-weight: 500; color: var(--ink); display: flex; align-items: center; gap: 8px; transition: background 120ms ease, color 120ms ease; }
.mega-link:hover { background: var(--surface-sunk); color: var(--clay); }

/* Mobile slide-in drawer */
.drawer-overlay { position: fixed; inset: 0; z-index: 200; background: rgba(8,20,48,0.45); animation: fade-up 200ms ease; }
.drawer { position: fixed; top: 0; bottom: 0; left: 0; z-index: 201; width: min(82vw, 360px); background: var(--bg); box-shadow: var(--shadow-lg); display: flex; flex-direction: column; overflow-y: auto; padding-bottom: calc(96px + env(safe-area-inset-bottom)); }
.drawer.right { left: auto; right: 0; width: min(86vw, 380px); box-shadow: -12px 0 28px rgba(10,31,92,0.18); }
body.no-scroll { overflow: hidden; }

/* Tabs / switchable panels (product detail, account, checkout) */
.tabpanel { display: none; }
.tabpanel.active { display: block; }
.fnf-tab { padding: 14px 22px; background: none; border: none; cursor: pointer; font: inherit; font-size: 16px; letter-spacing: -0.01em; font-weight: 600; color: var(--ink-2); border-bottom: 3px solid transparent; margin-bottom: -1px; }
.fnf-tab.active { font-weight: 800; color: var(--clay); border-bottom-color: var(--clay); }

/* Product option tiles — colour swatches + storage */
.swatch { width: 52px; height: 52px; border-radius: 999px; padding: 0; cursor: pointer; border: 2px solid transparent; box-shadow: 0 0 0 1px var(--line); transition: transform 100ms ease; }
.swatch.active { border-color: var(--ink); box-shadow: 0 0 0 1px var(--line), 0 4px 12px rgba(0,0,0,0.12); transform: scale(1.06); }
.stor-tile { padding: 18px 12px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); cursor: pointer; text-align: center; }
.stor-tile.active { border: 2px solid var(--ink); background: var(--surface-2); }
/* Product gallery: sticky beside the info on desktop, normal flow on mobile (no overlap) */
.pd-grid { display: grid; grid-template-columns: minmax(0, 720px) 1fr; gap: 48px; }
.pd-gallery { position: sticky; top: 100px; align-self: flex-start; min-width: 0; }
.pd-gallery-row { display: flex; gap: 14px; align-items: stretch; }
.pd-thumbs-wrap { flex: 0 0 76px; position: relative; }              /* stretches to the main image height */
.pd-thumbs-v { position: absolute; inset: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; padding: 2px; }
.pd-main { flex: 1 1 0; min-width: 0; position: relative; border-radius: 28px; overflow: hidden; }
@media (max-width: 1080px) {
  .pd-grid { grid-template-columns: 1fr; gap: 28px; }
  .pd-gallery { position: static; top: auto; }
  .pd-gallery-row { flex-direction: column; }
  .pd-thumbs-wrap { order: 2; flex: none; position: static; }
  .pd-thumbs-v { position: static; flex-direction: row; overflow-x: auto; overflow-y: hidden; padding: 2px 2px 6px; margin-top: 14px; }
  .pd-main { order: 1; flex: none; }
}
/* Gallery thumbnails (horizontal scroll; click switches the main image) */
.pd-thumb { flex: 0 0 auto; width: 72px; height: 72px; border-radius: 14px; border: 2px solid transparent; box-shadow: 0 0 0 1px var(--line); padding: 0; cursor: pointer; background-color: var(--surface); transition: border-color 120ms ease, box-shadow 120ms ease; }
.pd-thumb:hover { box-shadow: 0 0 0 1px var(--clay-soft); }
.pd-thumb.active { border-color: var(--ink); box-shadow: 0 0 0 1px var(--line), 0 4px 12px rgba(0,0,0,0.12); }
/* Gallery prev/next arrows (overlay the main image, like the hero) */
.pd-gal-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 40px; height: 40px; border-radius: 999px; background: rgba(255,255,255,0.9); color: var(--ink); border: none; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; box-shadow: var(--shadow-sm); z-index: 2; transition: background 120ms ease; }
.pd-gal-nav:hover { background: #fff; }
/* Mobile: flicking through photos by tapping the arrows / image must never trigger the browser's
   double-tap-to-zoom (it was zooming the whole page and confusing users). `manipulation` keeps
   single-tap, scroll and pinch-zoom — it only drops the double-tap zoom + tap delay. */
.pd-gallery, .pd-main, .pd-gal-nav, .pd-thumb { touch-action: manipulation; }

/* Checkbox styled to match the prototype */
.fnf-check { display: flex; align-items: center; gap: 10px; padding: 4px 0; cursor: pointer; font-size: 13px; color: var(--ink); }
.fnf-check input { position: absolute; opacity: 0; width: 0; height: 0; }
.fnf-check .box { width: 18px; height: 18px; border-radius: 5px; flex-shrink: 0; background: var(--surface-2); border: 1.5px solid var(--line); display: inline-flex; align-items: center; justify-content: center; transition: all 100ms ease; color: var(--bg); }
.fnf-check input:checked + .box { background: var(--ink); border-color: var(--ink); }
.fnf-check input:not(:checked) + .box > svg { display: none; }

/* Native select that matches the prototype's pill look */
.fnf-select { height: 40px; padding: 0 14px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); font: inherit; font-size: 13px; font-weight: 500; color: var(--ink); cursor: pointer; }

/* Scroll reveal — progressive enhancement (visible by default; hidden only when JS is on) */
html.js .reveal { opacity: 0; transform: translateY(20px); }
.reveal { transition: opacity 600ms ease, transform 600ms cubic-bezier(.2,.8,.2,1); }
.reveal.in { opacity: 1 !important; transform: none !important; }

/* FAQ / details */
details > summary { list-style: none; cursor: pointer; outline: none; }
details > summary::-webkit-details-marker { display: none; }
/* Keyboard focus only (no ring on mouse click); inset so the card's overflow:hidden doesn't clip it */
details > summary:focus-visible { outline: 2px solid var(--clay); outline-offset: -2px; }

/* Forms */
textarea.input { height: auto; padding: 14px 16px; line-height: 1.5; resize: vertical; }
.field-label { font-size: 12px; font-weight: 600; color: var(--ink-2); }
.req { color: var(--clay); }

/* Hide scrollbars on horizontal sliders consistently */
.no-bar { scrollbar-width: none; }
.no-bar::-webkit-scrollbar { display: none; }

/* Product card — hover lift + reveal quick-add (grid variant) */
.product-card { transition: transform 200ms ease, box-shadow 200ms ease; }
.product-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.product-card .quick-add { opacity: 0; transition: opacity 200ms ease; pointer-events: none; }
.product-card:hover .quick-add { opacity: 1; pointer-events: auto; }
@media (hover: none) { .product-card .quick-add { opacity: 1; pointer-events: auto; } }

/* Nav link hover (top bar) */
.dt-nav-link { padding: 10px 14px; border-radius: 10px; font-size: 14px; font-weight: 700; color: var(--nav-fg, var(--ink)); display: inline-flex; align-items: center; gap: 6px; transition: background 120ms ease; }
.dt-nav-link:hover { background: color-mix(in srgb, var(--nav-fg, var(--ink)) 12%, transparent); }
.dt-icon-btn { display: inline-flex; align-items: center; gap: 8px; padding: 8px; height: 40px; border-radius: 10px; background: transparent; border: none; cursor: pointer; color: var(--nav-fg, var(--ink)); position: relative; transition: background 120ms ease; }
.dt-icon-btn:hover { background: color-mix(in srgb, var(--nav-fg, var(--ink)) 12%, transparent); }

/* Footer link hover */
.footer-link { color: var(--muted); transition: color 160ms ease; cursor: pointer; }
.footer-link:hover { color: var(--ink); }
/* Dark footer: light links + placeholder */
.site-footer .footer-link { color: rgba(255,255,255,0.66); }
.site-footer .footer-link:hover { color: #fff; }
.site-footer input::placeholder { color: rgba(255,255,255,0.5); }

/* FAQ accordion icon — plus rotates into an × and turns accent when open */
.faq-ic { transition: background 200ms ease, color 200ms ease, transform 200ms ease; }
details[open] > summary .faq-ic { background: var(--clay); color: #fff; transform: rotate(45deg); }

/* Flagship-store gallery (About page) — horizontal slider of wide store photos. Each slide is a
   fixed-width landscape card that scroll-snaps; the arrows scroll it and mobile swipes natively.
   Overrides .hslide's default width (this rule is later in the file, so it wins). */
.store-slide {
  flex: 0 0 min(680px, 86%);
  scroll-snap-align: start;
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: 24px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--surface-2);
  margin: 0;
}
.store-slide img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 500ms cubic-bezier(.4,0,.2,1); }
.store-slide:hover img { transform: scale(1.04); }
.store-cap { position: absolute; left: 0; right: 0; bottom: 0; margin: 0; padding: 16px 18px; font-size: 13px; font-weight: 600; color: #fff; background: linear-gradient(to top, rgba(8,14,28,0.72), rgba(8,14,28,0)); }
@media (max-width: 720px) {
  .store-slide { flex-basis: 88%; aspect-ratio: 4 / 3; border-radius: 18px; }
}

/* Checkout stepper on phones: the per-step text labels overran into the next circle. Hide them (the
   "Step N of 4 · Name" line above already names the current step) so the numbered dots + connectors
   sit cleanly, and drop the trailing space after the last dot. */
@media (max-width: 560px) {
  .crumb-label { display: none; }
  .crumb-line { margin-top: 0 !important; }
  [data-step-crumb] { gap: 0 !important; }
  [data-step-crumb]:last-child { flex: 0 0 auto !important; }
}

/* Shop product grid: 3-up on desktop, 2-up on tablet and phone. Its own class (not the generic
   .dt-grid-3) so it never collapses to one giant card per row on mobile — 2 columns keeps products
   easy to scan and tap through. */
.shop-grid { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 900px) { .shop-grid { grid-template-columns: repeat(2, 1fr); gap: 12px !important; } }
@media (max-width: 400px) { .shop-grid { gap: 10px !important; } }

/* Shop toolbar (Filters / sort / view). Desktop: a right-aligned row above the grid.
   Mobile: sticks just below the (sticky) top bar so filtering is reachable while scrolling. */
.shop-tools { padding-top: 4px; padding-bottom: 14px; }
.shop-tools-inner { display: flex; gap: 8px; align-items: center; justify-content: flex-end; }
@media (max-width: 900px) {
  .shop-tools {
    position: sticky; top: var(--shop-tools-top, 78px); z-index: 40;
    background: var(--bg);
    padding-top: 12px; padding-bottom: 12px; margin-bottom: 14px;
    border-bottom: 1px solid var(--line);
    box-shadow: 0 8px 14px -10px rgba(10, 20, 40, 0.22);
  }
  .shop-tools-inner { justify-content: flex-start; }
  .shop-tools .shop-sort { flex: 1; min-width: 0; }
}

/* Product-card colour swatches — hover/tap one that has its own photo to preview that colour in the
   card image (JS swaps the src). Only image-bearing swatches get the pointer + hover ring. */
.card-swatch { width: 16px; height: 16px; border-radius: 999px; border: 1px solid var(--line); padding: 0; flex-shrink: 0; display: inline-block; transition: box-shadow 140ms ease, transform 140ms ease; }
.card-swatch[data-color-preview] { cursor: pointer; }
.card-swatch[data-color-preview]:hover { transform: scale(1.18); box-shadow: 0 0 0 2px var(--clay-soft); }
.product-card [data-card-media] img { transition: opacity 160ms ease; }
/* Product name: always occupy exactly two lines (clamp long names, reserve space for short ones) so
   every card's price/colour/stock rows line up and cards stay the same height. */
.pc-name { display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.4em; }

/* ── Smooth image loading (blur-up) ──
   Content images tagged [data-fade] start blurred + transparent over their container's soft
   background, then fade + sharpen in once decoded (main.js adds .is-loaded, immediately for cached
   images). Nothing pops in, and a slow first load looks intentional instead of stuck-then-flash. */
html.js img[data-fade] { opacity: 0; filter: blur(12px); transition: opacity .45s ease, filter .55s ease, transform .5s cubic-bezier(.4,0,.2,1); }
html.js img[data-fade].is-loaded { opacity: 1; filter: blur(0); }
@media (prefers-reduced-motion: reduce) { html.js img[data-fade] { filter: none; transition: opacity .2s ease; } }
/* Smooth programmatic/anchor scrolling (native momentum scroll is unaffected). */
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
