/* ==========================================================================
   LORELACE — Design System
   Premium boutique POD storefront. Warm, earthy, editorial.
   Sage green + champagne gold on cream. Lace as thread, never wallpaper.
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,500;1,400&family=Inter:wght@400;500;600&family=Bebas+Neue&family=Nunito:wght@400;700&family=Caveat:wght@400;700&display=swap');

/* --------------------------------------------------------------------------
   1. Tokens
   -------------------------------------------------------------------------- */
:root {
  /* Palette */
  --sage:        #7A9E7E;
  --sage-deep:   #5E8662;   /* success / hover */
  --sage-ink:    #4A6B4E;   /* sage dark enough for text on cream */
  --sage-pale:   #D4E2D4;
  --sage-mist:   #EAF1EA;
  --gold:        #C9A84C;
  --gold-deep:   #A8883A;   /* gold dark enough for text on cream */
  --gold-pale:   #F0E4C4;
  --gold-mist:   #F9F2DF;
  --cream:       #FDFAF5;
  --surface:     #FBF8F3;
  --surface-2:   #F6F1E8;
  --ink:         #2D2A26;
  --ink-soft:    #5C594F;
  --ink-mute:    #7B7A6E;
  --sand:        #E4DDD2;
  --sand-soft:   #EFEAE1;
  --rose:        #C4616C;
  --rose-pale:   #F7E6E8;

  /* Typography */
  --font-serif: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --font-sans:  'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;

  /* Text-overlay fonts — mirror the Pillow compositor's text_overlays.font_style
     (display|body|script). Driven by JS via inline style, but the family stacks
     live here as the single source of truth. */
  --font-overlay-display: 'Bebas Neue', var(--font-sans);
  --font-overlay-body:    'Nunito', var(--font-sans);
  --font-overlay-script:  'Caveat', var(--font-serif);

  /* Fluid type scale */
  --text-xs:   0.8125rem;                            /* 13px */
  --text-sm:   0.875rem;                             /* 14px */
  --text-base: 1rem;                                 /* 16px — never below for inputs */
  --text-md:   1.0625rem;
  --text-lg:   clamp(1.125rem, 1rem + 0.5vw, 1.3125rem);
  --text-xl:   clamp(1.375rem, 1.2rem + 0.9vw, 1.75rem);
  --text-2xl:  clamp(1.75rem, 1.4rem + 1.6vw, 2.5rem);
  --text-3xl:  clamp(2.125rem, 1.6rem + 2.4vw, 3.25rem);

  /* Spacing — 4px base, no arbitrary values */
  --sp-1: 4px;  --sp-2: 8px;   --sp-3: 12px; --sp-4: 16px;
  --sp-5: 20px; --sp-6: 24px;  --sp-8: 32px; --sp-10: 40px;
  --sp-12: 48px; --sp-16: 64px; --sp-20: 80px; --sp-24: 96px;

  /* Radius */
  --r-sm: 6px; --r-md: 10px; --r-lg: 16px; --r-xl: 24px; --r-pill: 999px;

  /* Shadows — warm, never gray */
  --shadow-sm: 0 1px 3px rgba(45, 42, 38, 0.06), 0 1px 2px rgba(45, 42, 38, 0.04);
  --shadow-md: 0 4px 16px rgba(45, 42, 38, 0.08), 0 2px 4px rgba(45, 42, 38, 0.04);
  --shadow-lg: 0 12px 32px rgba(45, 42, 38, 0.12), 0 4px 8px rgba(45, 42, 38, 0.05);
  --shadow-gold: 0 4px 20px rgba(201, 168, 76, 0.25);

  /* Z-index scale */
  --z-raised: 5;
  --z-dropdown: 10;
  --z-sticky: 50;
  --z-modal: 100;
  --z-toast: 110;

  /* Motion */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --speed: 0.25s;

  /* Layout */
  --container: 1200px;
  --header-h: 72px;
}

/* --------------------------------------------------------------------------
   2. Reset & base
   -------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: 1.6;
  color: var(--ink);
  background-color: var(--cream);
  overflow-x: hidden;
  max-width: 100vw;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg, video { display: block; max-width: 100%; }

/* [hidden] must always win, even over display:flex/grid component rules */
[hidden] { display: none !important; }

h1, h2, h3, h4 {
  font-family: var(--font-serif);
  font-weight: 400;
  line-height: 1.2;
  margin: 0 0 var(--sp-4);
  color: var(--ink);
  text-wrap: balance;
}

h1 { font-size: var(--text-3xl); letter-spacing: -0.01em; }
h2 { font-size: var(--text-2xl); letter-spacing: -0.005em; }
h3 { font-size: var(--text-xl); }
h4 { font-size: var(--text-lg); }

p { margin: 0 0 var(--sp-4); }

a {
  color: var(--sage-ink);
  text-decoration: none;
  transition: color var(--speed) var(--ease-out);
}
a:hover { color: var(--gold-deep); }

button {
  font-family: inherit;
  font-size: inherit;
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
}

/* Custom focus — champagne gold, never browser blue */
:focus { outline: none; }
:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
  border-radius: var(--r-sm);
}

::selection { background: var(--gold-pale); color: var(--ink); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* --------------------------------------------------------------------------
   3. Layout utilities
   -------------------------------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding-inline: var(--sp-5);
}
@media (min-width: 768px) {
  .container { padding-inline: var(--sp-8); }
}

.section { padding-block: var(--sp-16); }
@media (min-width: 768px) {
  .section { padding-block: var(--sp-20); }
}

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* Eyebrow label — small caps accent above headings */
.eyebrow {
  display: block;
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold-deep);
  margin-bottom: var(--sp-3);
}

/* Subtle lace net texture — hero / accent sections only, never full-page */
.texture-lace { position: relative; }
.texture-lace::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='72' height='72' viewBox='0 0 72 72'%3E%3Cg fill='none' stroke='%237A9E7E' stroke-width='0.7'%3E%3Ccircle cx='36' cy='36' r='14'/%3E%3Ccircle cx='36' cy='36' r='26'/%3E%3Cpath d='M0 36 Q18 22 36 36 T72 36'/%3E%3Cpath d='M36 0 Q22 18 36 36 T36 72'/%3E%3C/g%3E%3Cg fill='%23C9A84C'%3E%3Ccircle cx='36' cy='10' r='1.1'/%3E%3Ccircle cx='36' cy='62' r='1.1'/%3E%3Ccircle cx='10' cy='36' r='1.1'/%3E%3Ccircle cx='62' cy='36' r='1.1'/%3E%3C/g%3E%3C/svg%3E");
  background-size: 72px 72px;
}
.texture-lace > * { position: relative; }

/* Lace-thread divider — thin lines meeting a small ornament */
.lace-divider {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  margin-block: var(--sp-10);
  border: none;
}
.lace-divider::before,
.lace-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(to var(--dir, right), transparent, var(--sand));
}
.lace-divider::before { --dir: right; }
.lace-divider::after  { --dir: left; }
.lace-divider .ornament { flex: none; color: var(--gold); }

/* --------------------------------------------------------------------------
   4. Header & navigation
   -------------------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: var(--z-sticky);
  background: rgba(253, 250, 245, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--sand-soft);
}

.site-header .container {
  display: flex;
  align-items: center;
  gap: var(--sp-6);
  min-height: var(--header-h);
}

.brand {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  color: var(--ink);
  min-height: 44px;
}
.brand:hover { color: var(--ink); }
.brand svg { flex: none; }
.brand-name {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  letter-spacing: 0.02em;
  line-height: 1;
}
.brand-name .accent { color: var(--gold-deep); }

.main-nav {
  display: none;
  align-items: center;
  gap: var(--sp-2);
  margin-inline-start: var(--sp-4);
}
@media (min-width: 900px) {
  .main-nav { display: flex; }
}

.nav-link {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-1);
  min-height: 44px;
  padding: var(--sp-2) var(--sp-4);
  font-size: var(--text-sm);
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--ink-soft);
  border-radius: var(--r-pill);
  transition: color var(--speed) var(--ease-out), background var(--speed) var(--ease-out);
}
.nav-link:hover { color: var(--ink); background: var(--sage-mist); }

/* Collections dropdown — scales from 2 links to 10+ via its own scroll */
.nav-dropdown { position: relative; }
.nav-dropdown-menu {
  position: absolute;
  top: calc(100% + var(--sp-2));
  left: 0;
  z-index: var(--z-dropdown);
  min-width: 260px;
  max-height: 420px;
  overflow-y: auto;
  padding: var(--sp-3);
  background: var(--cream);
  border: 1px solid var(--sand);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-lg);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity var(--speed) var(--ease-out),
              transform var(--speed) var(--ease-out),
              visibility var(--speed);
}
.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown:focus-within .nav-dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.nav-dropdown-menu a {
  display: block;
  padding: var(--sp-3) var(--sp-4);
  min-height: 44px;
  border-radius: var(--r-md);
  color: var(--ink-soft);
  font-size: var(--text-sm);
  font-weight: 500;
}
.nav-dropdown-menu a:hover { background: var(--sage-mist); color: var(--ink); }
.nav-dropdown-menu a .menu-note {
  display: block;
  font-weight: 400;
  font-size: var(--text-xs);
  color: var(--ink-mute);
  margin-top: 2px;
}
/* Mid-tier links nested under a hub entry (§13.1 hierarchical menu) */
.nav-dropdown-menu a.menu-sub {
  padding-left: calc(var(--sp-4) + var(--sp-3));
  font-size: var(--text-xs);
  font-weight: 400;
  color: var(--ink-mute);
}
.nav-dropdown-menu a.menu-sub::before { content: "↳ "; opacity: 0.6; }
.nav-dropdown-menu .menu-all {
  margin-top: var(--sp-2);
  padding-top: var(--sp-3);
  border-top: 1px solid var(--sand-soft);
  color: var(--gold-deep);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  margin-inline-start: auto;
}

.icon-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: var(--r-pill);
  color: var(--ink-soft);
  transition: background var(--speed) var(--ease-out), color var(--speed) var(--ease-out);
}
.icon-btn:hover { background: var(--sage-mist); color: var(--ink); }

.cart-badge {
  position: absolute;
  top: 4px;
  right: 2px;
  min-width: 18px;
  height: 18px;
  padding-inline: 5px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--gold);
  color: #fff;
  font-size: 0.6875rem;
  font-weight: 600;
  border-radius: var(--r-pill);
  border: 2px solid var(--cream);
}
.cart-badge[hidden] { display: none; }

/* Slide-down search row */
.search-row {
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.35s var(--ease-out);
  border-bottom: 0 solid var(--sand-soft);
}
.search-row.open { max-height: 88px; border-bottom-width: 1px; }
.search-row .container {
  display: flex;
  gap: var(--sp-3);
  padding-block: var(--sp-4);
}
.search-row input { flex: 1; }

/* Mobile nav strip (simple horizontal scroll of links under header) */
.mobile-nav {
  display: flex;
  gap: var(--sp-2);
  overflow-x: auto;
  padding: var(--sp-2) var(--sp-5) var(--sp-3);
  scrollbar-width: none;
}
.mobile-nav::-webkit-scrollbar { display: none; }
.mobile-nav .nav-link {
  flex: none;
  background: var(--surface);
  border: 1px solid var(--sand-soft);
}
@media (min-width: 900px) {
  .mobile-nav { display: none; }
}

/* --------------------------------------------------------------------------
   5. Buttons
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  min-height: 48px;
  padding: var(--sp-3) var(--sp-6);
  font-family: var(--font-sans);
  font-size: var(--text-base);
  font-weight: 500;
  letter-spacing: 0.02em;
  border-radius: var(--r-pill);
  transition: background var(--speed) var(--ease-out),
              color var(--speed) var(--ease-out),
              border-color var(--speed) var(--ease-out),
              box-shadow var(--speed) var(--ease-out),
              transform var(--speed) var(--ease-out);
}
.btn:active { transform: scale(0.98); }
.btn[disabled] { opacity: 0.55; cursor: not-allowed; }

.btn-primary {
  background: var(--sage);
  color: #fff;
  box-shadow: var(--shadow-sm);
}
.btn-primary:hover { background: var(--sage-deep); box-shadow: var(--shadow-md); }

.btn-gold {
  background: var(--gold);
  color: #fff;
  box-shadow: var(--shadow-sm);
}
.btn-gold:hover { background: var(--gold-deep); box-shadow: var(--shadow-gold); }

.btn-secondary {
  background: transparent;
  color: var(--sage-ink);
  border: 1.5px solid var(--sage);
}
.btn-secondary:hover { background: var(--sage-mist); color: var(--sage-deep); }

.btn-ghost {
  background: transparent;
  color: var(--ink-soft);
  min-height: 44px;
  padding: var(--sp-2) var(--sp-4);
}
.btn-ghost:hover { color: var(--ink); background: var(--surface-2); }

.btn-block { width: 100%; }
.btn-lg { min-height: 56px; font-size: var(--text-md); }

/* Inline spinner for loading buttons */
.spinner {
  width: 18px;
  height: 18px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* --------------------------------------------------------------------------
   6. Forms
   -------------------------------------------------------------------------- */
.field { display: flex; flex-direction: column; gap: var(--sp-2); }

.field-label {
  font-size: var(--text-sm);
  font-weight: 500;
  letter-spacing: 0.03em;
  color: var(--ink);
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--sp-3);
}
.field-hint { font-size: var(--text-xs); font-weight: 400; color: var(--ink-mute); }

input[type="text"],
input[type="email"],
input[type="search"],
textarea,
select {
  width: 100%;
  min-height: 48px;
  padding: var(--sp-3) var(--sp-4);
  font-family: var(--font-sans);
  font-size: 16px; /* ≥16px — prevents iOS zoom */
  color: var(--ink);
  background: #fff;
  border: 1.5px solid var(--sand);
  border-radius: var(--r-md);
  transition: border-color var(--speed) var(--ease-out), box-shadow var(--speed) var(--ease-out);
}
input::placeholder, textarea::placeholder { color: var(--ink-mute); opacity: 0.7; }
input:hover, textarea:hover, select:hover { border-color: var(--sage-pale); }
input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px var(--gold-pale);
}

/* --------------------------------------------------------------------------
   7. Selectors — option pills, color swatches
   -------------------------------------------------------------------------- */
.option-group {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
}

.option-pill {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-height: 48px;
  min-width: 48px;
  padding: var(--sp-2) var(--sp-4);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--ink-soft);
  background: #fff;
  border: 1.5px solid var(--sand);
  border-radius: var(--r-md);
  transition: border-color var(--speed) var(--ease-out),
              background var(--speed) var(--ease-out),
              color var(--speed) var(--ease-out),
              box-shadow var(--speed) var(--ease-out);
}
.option-pill:hover { border-color: var(--sage); color: var(--ink); }
.option-pill[aria-pressed="true"] {
  border-color: var(--sage);
  background: var(--sage-mist);
  color: var(--sage-deep);
  box-shadow: inset 0 0 0 1px var(--sage);
}
.option-pill .pill-sub {
  font-size: var(--text-xs);
  font-weight: 400;
  color: var(--ink-mute);
}
.option-pill[aria-pressed="true"] .pill-sub { color: var(--sage-ink); }

/* Color swatches */
.swatch {
  position: relative;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1.5px solid var(--sand);
  padding: 0;
  transition: transform var(--speed) var(--ease-out), box-shadow var(--speed) var(--ease-out);
}
.swatch::after {
  content: "";
  position: absolute;
  inset: 5px;
  border-radius: 50%;
  background: var(--swatch-color, #ccc);
  border: 1px solid rgba(45, 42, 38, 0.08);
}
.swatch:hover { transform: scale(1.08); }
.swatch[aria-pressed="true"] {
  border: 2px solid var(--gold);
  box-shadow: 0 0 0 3px var(--gold-pale);
}
.swatch .swatch-star {
  position: absolute;
  top: -5px;
  right: -5px;
  z-index: var(--z-raised);
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gold);
  color: #fff;
  border-radius: 50%;
  font-size: 0.625rem;
  border: 2px solid var(--cream);
}

/* Product picker — scales from 2 to 30+ whitelisted products.
   Trigger shows the current choice; options open in a grouped panel:
   anchored dropdown on desktop, bottom sheet on mobile. */
.product-picker { position: relative; }

.picker-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
  min-height: 56px;
  padding: var(--sp-3) var(--sp-4);
  text-align: left;
  font-size: var(--text-base);
  background: #fff;
  border: 1.5px solid var(--sand);
  border-radius: var(--r-md);
  transition: border-color var(--speed) var(--ease-out), box-shadow var(--speed) var(--ease-out);
}
.picker-trigger:hover { border-color: var(--sage-pale); }
.picker-trigger[aria-expanded="true"] {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px var(--gold-pale);
}
.picker-value { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.picker-name { font-weight: 500; color: var(--ink); }
.picker-meta { font-size: var(--text-xs); color: var(--ink-mute); }
.picker-chevron {
  flex: none;
  color: var(--ink-mute);
  transition: transform var(--speed) var(--ease-out);
}
.picker-trigger[aria-expanded="true"] .picker-chevron { transform: rotate(180deg); }

.picker-backdrop {
  position: fixed;
  inset: 0;
  z-index: calc(var(--z-modal) - 1);
  background: rgba(45, 42, 38, 0.35);
}
.picker-backdrop[hidden] { display: none; }

.picker-panel {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: var(--z-modal);
  max-height: 72vh;
  overflow-y: auto;
  padding: var(--sp-2) var(--sp-3) var(--sp-4);
  background: var(--cream);
  border: 1px solid var(--sand);
  border-radius: var(--r-xl) var(--r-xl) 0 0;
  box-shadow: var(--shadow-lg);
  animation: sheet-up 0.3s var(--ease-out);
}
.picker-panel[hidden] { display: none; }
@keyframes sheet-up {
  from { transform: translateY(24px); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}

.picker-handle {
  width: 36px;
  height: 4px;
  margin: var(--sp-2) auto var(--sp-1);
  border-radius: var(--r-pill);
  background: var(--sand);
}

.picker-group-label {
  padding: var(--sp-4) var(--sp-4) var(--sp-1);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold-deep);
}

.picker-option {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
  min-height: 48px;
  padding: var(--sp-3) var(--sp-4);
  border-radius: var(--r-md);
  font-size: var(--text-base);
  color: var(--ink-soft);
  transition: background var(--speed) var(--ease-out), color var(--speed) var(--ease-out);
}
.picker-option:hover { background: var(--sage-mist); color: var(--ink); }
.picker-option .opt-name { display: flex; align-items: center; gap: var(--sp-2); text-align: left; }
.picker-option .opt-name svg { flex: none; color: var(--sage-deep); }
.picker-option .opt-price { flex: none; font-size: var(--text-sm); color: var(--ink-mute); }
.picker-option[aria-selected="true"] {
  background: var(--sage-mist);
  color: var(--sage-deep);
  font-weight: 500;
}
.picker-option[aria-selected="true"] .opt-price { color: var(--sage-ink); }

@media (min-width: 920px) {
  .picker-backdrop { background: transparent; } /* click-away only, no dimming */
  .picker-panel {
    position: absolute;
    top: calc(100% + var(--sp-2));
    bottom: auto;
    max-height: 380px;
    border-radius: var(--r-lg);
    padding: var(--sp-2);
    animation: panel-in 0.25s var(--ease-out);
  }
  .picker-handle { display: none; }
  @keyframes panel-in {
    from { transform: translateY(-6px); opacity: 0; }
    to   { transform: translateY(0);    opacity: 1; }
  }
}

/* --------------------------------------------------------------------------
   8. Cards
   -------------------------------------------------------------------------- */
.product-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  background: var(--surface);
  border: 1px solid var(--sand-soft);
  border-radius: var(--r-lg);
  padding: var(--sp-4);
  color: var(--ink);
  transition: transform var(--speed) var(--ease-out),
              box-shadow var(--speed) var(--ease-out),
              border-color var(--speed) var(--ease-out);
}
.product-card:hover {
  transform: translateY(-4px) scale(1.01);
  box-shadow: var(--shadow-lg);
  border-color: var(--sand);
  color: var(--ink);
}

.card-media {
  position: relative;
  aspect-ratio: 4 / 5;
  border-radius: var(--r-md);
  overflow: hidden;
  background: var(--surface-2);
}
.card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s var(--ease-out);
}
.product-card:hover .card-media img { transform: scale(1.04); }

/* Image-failed fallback */
.card-media.no-image {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--sp-6);
  background: linear-gradient(150deg, var(--sage-pale), var(--gold-pale));
}
.card-media.no-image span {
  font-family: var(--font-serif);
  font-size: var(--text-lg);
  color: var(--ink-soft);
  text-align: center;
}

.badge {
  position: absolute;
  top: var(--sp-3);
  left: var(--sp-3);
  z-index: var(--z-raised);
  padding: var(--sp-1) var(--sp-3);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink);
  background: var(--gold-pale);
  border-radius: var(--r-pill);
}

.card-body { display: flex; flex-direction: column; gap: var(--sp-1); }
.card-title {
  font-family: var(--font-serif);
  font-size: var(--text-md);
  line-height: 1.35;
  margin: 0;
}
/* Gold thread grows under the title on hover — the lace touch */
.card-title span {
  background-image: linear-gradient(var(--gold), var(--gold));
  background-repeat: no-repeat;
  background-size: 0% 1px;
  background-position: 0 100%;
  transition: background-size 0.4s var(--ease-out);
  padding-bottom: 2px;
}
.product-card:hover .card-title span { background-size: 100% 1px; }

.card-price { font-size: var(--text-sm); font-weight: 500; color: var(--ink-soft); }
.card-collection {
  font-size: var(--text-xs);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold-deep);
}

/* Product grid — 1 / 2 / 3 columns */
.product-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-5);
}
@media (min-width: 560px)  { .product-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 960px)  { .product-grid { grid-template-columns: repeat(3, 1fr); gap: var(--sp-6); } }

/* --------------------------------------------------------------------------
   9. Skeleton / shimmer
   -------------------------------------------------------------------------- */
.skeleton {
  position: relative;
  overflow: hidden;
  background: var(--surface-2);
  border-radius: var(--r-md);
}
.skeleton::after {
  content: "";
  position: absolute;
  inset: 0;
  transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, rgba(253, 250, 245, 0.75), transparent);
  animation: shimmer 1.4s infinite;
}
@keyframes shimmer { to { transform: translateX(100%); } }

/* --------------------------------------------------------------------------
   10. Toast
   -------------------------------------------------------------------------- */
.toast {
  position: fixed;
  bottom: var(--sp-6);
  left: 50%;
  z-index: var(--z-toast);
  transform: translate(-50%, calc(100% + var(--sp-8)));
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  max-width: min(90vw, 420px);
  padding: var(--sp-3) var(--sp-5);
  background: var(--ink);
  color: var(--cream);
  font-size: var(--text-sm);
  border-radius: var(--r-pill);
  box-shadow: var(--shadow-lg);
  transition: transform 0.4s var(--ease-out);
  pointer-events: none;
}
.toast.show { transform: translate(-50%, 0); }
.toast svg { color: var(--gold); flex: none; }

/* --------------------------------------------------------------------------
   11. Breadcrumb
   -------------------------------------------------------------------------- */
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sp-2);
  padding-block: var(--sp-5);
  font-size: var(--text-xs);
  letter-spacing: 0.04em;
  color: var(--ink-mute);
}
.breadcrumb a {
  color: var(--ink-mute);
  display: inline-flex;
  align-items: center;
  min-height: 44px; /* touch target — padding, not visual bulk */
  margin-block: calc(-1 * var(--sp-3));
}
.breadcrumb a:hover { color: var(--gold-deep); }
.breadcrumb .sep { color: var(--sand); user-select: none; }
.breadcrumb .current { color: var(--ink-soft); font-weight: 500; }

/* --------------------------------------------------------------------------
   12. Product detail page
   -------------------------------------------------------------------------- */
.product-hero {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-10);
  padding-bottom: var(--sp-16);
}
@media (min-width: 920px) {
  .product-hero {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
    gap: var(--sp-12);
    align-items: start;
  }
  .preview-column { position: sticky; top: calc(var(--header-h) + var(--sp-5)); }
}

/* Preview canvas */
.preview-stage {
  position: relative;
  container-type: inline-size; /* enables cqw units for preview text scaling */
  aspect-ratio: 4 / 5;
  border-radius: var(--r-xl);
  overflow: hidden;
  background-color: #C9B99A; /* replaced by selected shirt hex via JS */
  transition: background-color 0.45s var(--ease-out);
  box-shadow: var(--shadow-md);
}

.preview-design {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--sp-4);
  padding: var(--sp-8);
  transition: opacity 0.35s var(--ease-out);
}
.preview-design img {
  width: min(62%, 340px);
  height: auto; /* neutralize the height="…" attribute hint */
  border-radius: var(--r-sm);
  box-shadow: 0 6px 24px rgba(45, 42, 38, 0.18);
}
.preview-design .no-image {
  width: min(62%, 340px);
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: var(--sp-6);
  font-family: var(--font-serif);
  border-radius: var(--r-sm);
  background: linear-gradient(150deg, var(--sage-pale), var(--gold-pale));
  color: var(--ink-soft);
}

/* Base layout only — font-family, color, and font-size are set inline per
   overlay from text_overlays metadata (font_style/color/size_hint). The
   custom properties below are per-element fallbacks if JS hasn't run yet. */
.preview-text {
  max-width: 82%;
  font-family: var(--overlay-font, var(--font-serif));
  font-weight: var(--overlay-weight, 500);
  text-align: center;
  line-height: 1.15;
  letter-spacing: 0.04em;
  overflow-wrap: break-word;
  color: var(--overlay-color, var(--preview-ink, #2D2A26));
  text-shadow: 0 1px 6px rgba(45, 42, 38, 0.12);
  transition: color 0.45s var(--ease-out);
}
/* size_hint scale reference (1024px-wide Pillow canvas → cqw of the preview
   stage): small 36px≈3.5cqw, medium 56px≈5.5cqw, large 80px≈7.8cqw,
   xlarge 110px≈10.75cqw. Exact per-overlay size is computed in JS. */
.preview-text-primary { font-size: clamp(1.5rem, 5cqw + 0.5rem, 2.375rem); }
.preview-text-secondary {
  font-size: clamp(0.875rem, 2.5cqw + 0.375rem, 1.1875rem);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-weight: 400;
}

.preview-text-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-2);
  max-width: 100%;
}
.preview-text-group:empty { display: none; }

.preview-mockup {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s var(--ease-out);
  background: var(--surface-2);
}
.preview-mockup img { width: 100%; height: 100%; object-fit: cover; }

.preview-stage.show-mockup .preview-design { opacity: 0; pointer-events: none; }
.preview-stage.show-mockup .preview-mockup { opacity: 1; pointer-events: auto; }

/* Non-blocking render indicator — the live canvas stays visible beneath */
.render-pill {
  position: absolute;
  bottom: var(--sp-4);
  left: 50%;
  z-index: var(--z-raised);
  transform: translate(-50%, calc(100% + var(--sp-5)));
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  padding: var(--sp-2) var(--sp-4);
  background: rgba(253, 250, 245, 0.92);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border-radius: var(--r-pill);
  box-shadow: var(--shadow-md);
  font-size: var(--text-xs);
  font-weight: 500;
  color: var(--ink-soft);
  transition: transform 0.35s var(--ease-out);
  pointer-events: none;
}
.preview-stage.generating .render-pill { transform: translate(-50%, 0); }
.render-pill .spinner { width: 14px; height: 14px; color: var(--gold-deep); }

.preview-chip {
  position: absolute;
  top: var(--sp-4);
  left: var(--sp-4);
  z-index: var(--z-raised);
  padding: var(--sp-1) var(--sp-3);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  background: rgba(253, 250, 245, 0.85);
  backdrop-filter: blur(4px);
  color: var(--ink-soft);
  border-radius: var(--r-pill);
}

.preview-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
  margin-top: var(--sp-4);
}
.share-link {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  min-height: 44px;
  font-size: var(--text-sm);
  color: var(--ink-mute);
}
.share-link:hover { color: var(--gold-deep); }

/* Info panel */
.product-panel { display: flex; flex-direction: column; gap: var(--sp-6); }

.product-title { margin-bottom: var(--sp-2); }
.product-collection-tag {
  font-size: var(--text-xs);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold-deep);
  font-weight: 500;
}

.price-row {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: var(--sp-3);
}
.price {
  font-family: var(--font-serif);
  font-size: var(--text-xl);
  color: var(--ink);
}
.shipping-note {
  font-size: var(--text-sm);
  color: var(--sage-deep);
  font-weight: 500;
}

.panel-section { display: flex; flex-direction: column; gap: var(--sp-3); }
.panel-heading {
  font-size: var(--text-sm);
  font-weight: 500;
  letter-spacing: 0.03em;
  color: var(--ink);
  margin: 0;
  font-family: var(--font-sans);
  display: flex;
  align-items: baseline;
  gap: var(--sp-2);
}
.panel-heading .selected-value { font-weight: 400; color: var(--ink-mute); }

.personalize-card {
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
  padding: var(--sp-5);
  background: var(--surface);
  border: 1px solid var(--sand-soft);
  border-radius: var(--r-lg);
}
.personalize-card .personalize-title {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  font-family: var(--font-serif);
  font-size: var(--text-lg);
  color: var(--ink);
}
.personalize-card .personalize-title svg { color: var(--gold); }
.personalize-hint { margin: 0; font-size: var(--text-xs); color: var(--ink-mute); }

.cta-stack { display: flex; flex-direction: column; gap: var(--sp-3); }

.assurance {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  padding: var(--sp-4) var(--sp-5);
  background: var(--sage-mist);
  border-radius: var(--r-lg);
}
.assurance-row {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  font-size: var(--text-sm);
  color: var(--ink-soft);
}
.assurance-row svg { color: var(--sage-deep); flex: none; }
.assurance-row strong { color: var(--ink); font-weight: 500; }

/* Email capture — gentle, dashed gold */
.email-capture {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  padding: var(--sp-5);
  border: 1.5px dashed var(--gold-pale);
  border-radius: var(--r-lg);
  background: var(--gold-mist);
}
.email-capture p { margin: 0; font-size: var(--text-sm); color: var(--ink-soft); }
.email-capture form { display: flex; gap: var(--sp-2); flex-wrap: wrap; }
.email-capture input { flex: 1 1 180px; background: #fff; }
.email-capture .success {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  font-size: var(--text-sm);
  color: var(--sage-deep);
  font-weight: 500;
}

/* Description / story */
.product-story {
  max-width: 720px;
}
.product-story p {
  font-size: var(--text-md);
  line-height: 1.75;
  color: var(--ink-soft);
}
.story-detail-list {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  margin: var(--sp-6) 0 0;
  padding: 0;
  list-style: none;
}
.story-detail-list li {
  display: flex;
  gap: var(--sp-3);
  align-items: baseline;
  font-size: var(--text-sm);
  color: var(--ink-soft);
}
.story-detail-list li::before {
  content: "";
  flex: none;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--gold);
  transform: translateY(-2px);
}

/* --------------------------------------------------------------------------
   13. Footer
   -------------------------------------------------------------------------- */
.site-footer {
  margin-top: var(--sp-20);
  background: var(--surface);
  border-top: 1px solid var(--sand-soft);
}
.site-footer .container {
  display: flex;
  flex-direction: column;
  gap: var(--sp-8);
  padding-block: var(--sp-12);
}
@media (min-width: 768px) {
  .footer-main {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: var(--sp-10);
  }
}
.footer-brand { max-width: 320px; display: flex; flex-direction: column; gap: var(--sp-4); }
.footer-brand p { margin: 0; font-size: var(--text-sm); color: var(--ink-mute); }

.footer-cols { display: flex; gap: var(--sp-12); flex-wrap: wrap; margin-top: var(--sp-8); }
@media (min-width: 768px) { .footer-cols { margin-top: 0; } }
.footer-col { display: flex; flex-direction: column; gap: var(--sp-2); }
.footer-col h4 {
  font-family: var(--font-sans);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-mute);
  margin-bottom: var(--sp-2);
}
.footer-col a {
  color: var(--ink-soft);
  font-size: var(--text-sm);
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}
.footer-col a:hover { color: var(--gold-deep); }

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
  padding-top: var(--sp-6);
  border-top: 1px solid var(--sand-soft);
  font-size: var(--text-xs);
  color: var(--ink-mute);
}
.footer-social { display: flex; gap: var(--sp-2); }

/* --------------------------------------------------------------------------
   14. Related products strip
   -------------------------------------------------------------------------- */
.related-section h2 { margin-bottom: var(--sp-2); }
.related-section .section-sub {
  color: var(--ink-mute);
  margin-bottom: var(--sp-8);
}

/* --------------------------------------------------------------------------
   15. Homepage
   -------------------------------------------------------------------------- */
.home-hero { padding-block: var(--sp-12) var(--sp-16); }
.home-hero .container {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-10);
  align-items: center;
}
@media (min-width: 880px) {
  .home-hero { padding-block: var(--sp-16); }
  /* Copy top-aligned (not vertically centered against the taller image),
     and the media column kept modest so the image doesn't dominate */
  .home-hero .container { grid-template-columns: 1.2fr 0.8fr; gap: var(--sp-16); align-items: start; }
}

.hero-copy h1 { margin-bottom: var(--sp-5); }
.hero-copy .lead {
  font-size: var(--text-lg);
  line-height: 1.65;
  color: var(--ink-soft);
  max-width: 34em;
  margin-bottom: var(--sp-8);
}
.hero-ctas { display: flex; flex-wrap: wrap; gap: var(--sp-3); }

/* Hero image renders at its natural ratio — no forced aspect, no crop, and no
   decorative offset frame (it read as a misplaced container). max-width keeps
   it modest on wide screens; margin centers it in its column. */
.hero-media img {
  width: 100%;
  max-width: 420px;
  height: auto;
  margin-inline: auto;
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-lg);
}

.section-head { max-width: 640px; margin-bottom: var(--sp-10); }
.section-head p { color: var(--ink-mute); margin: 0; }
.section-head-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--sp-6);
  flex-wrap: wrap;
}
.section-head-row .section-head { margin-bottom: 0; }

/* Featured collections */
.collection-cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-6);
}
@media (min-width: 640px)  { .collection-cards { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .collection-cards { grid-template-columns: repeat(3, 1fr); } }

.collection-card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--sand-soft);
  border-radius: var(--r-xl);
  overflow: hidden;
  color: var(--ink);
  transition: transform var(--speed) var(--ease-out), box-shadow var(--speed) var(--ease-out);
}
.collection-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); color: var(--ink); }
.collection-card .card-media { aspect-ratio: 3 / 2; border-radius: 0; }
.collection-card .collection-body {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
  padding: var(--sp-6);
  flex: 1;
}
.collection-card h3 { margin: 0; }
.collection-card .collection-desc { font-size: var(--text-sm); color: var(--ink-mute); margin: 0; flex: 1; }
.collection-card .collection-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3);
  margin-top: var(--sp-3);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--sage-ink);
}
.collection-card .collection-meta .count { color: var(--ink-mute); font-weight: 400; }
.collection-card:hover .collection-meta .go { color: var(--gold-deep); }

/* Teaser card for lanes that haven't launched yet */
.collection-card.teaser {
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: var(--sp-10) var(--sp-6);
  border-style: dashed;
  border-color: var(--gold-pale);
  background: var(--gold-mist);
}
.collection-card.teaser h3 { margin-bottom: var(--sp-2); }
.collection-card.teaser p { font-size: var(--text-sm); color: var(--ink-mute); margin-bottom: var(--sp-4); }

/* How it works */
.steps {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-8);
}
@media (min-width: 760px) { .steps { grid-template-columns: repeat(3, 1fr); gap: var(--sp-10); } }

.step {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: var(--sp-3);
}
.step-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--sage-mist);
  color: var(--sage-deep);
  position: relative;
}
.step-badge .step-num {
  position: absolute;
  top: -4px;
  right: -4px;
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gold);
  color: #fff;
  font-size: var(--text-xs);
  font-weight: 600;
  border-radius: 50%;
  border: 2px solid var(--cream);
}
.step h3 { margin: 0; font-size: var(--text-lg); }
.step p { margin: 0; font-size: var(--text-sm); color: var(--ink-mute); max-width: 26em; }

/* Horizontal product scroller */
.scroll-row {
  display: flex;
  gap: var(--sp-5);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-block: var(--sp-2) var(--sp-4);
  margin-inline: calc(-1 * var(--sp-5));
  padding-inline: var(--sp-5);
  scrollbar-width: thin;
  scrollbar-color: var(--sand) transparent;
}
.scroll-row > * {
  flex: 0 0 min(72vw, 270px);
  scroll-snap-align: start;
}
.scroll-row::-webkit-scrollbar { height: 6px; }
.scroll-row::-webkit-scrollbar-thumb { background: var(--sand); border-radius: var(--r-pill); }
.scroll-row::-webkit-scrollbar-track { background: transparent; }

/* Brand story band */
.story-band {
  background: var(--surface);
  border-block: 1px solid var(--sand-soft);
}
.story-band .container {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-10);
  align-items: center;
  padding-block: var(--sp-16);
}
@media (min-width: 880px) {
  .story-band .container { grid-template-columns: 1fr 1fr; gap: var(--sp-16); }
}
.story-band .story-copy p { color: var(--ink-soft); }
.story-mark {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--sp-10);
}
.story-mark svg { width: min(60%, 260px); height: auto; }

/* Current-page marker in the nav */
.nav-link[aria-current="page"] { color: var(--ink); background: var(--sage-mist); }

/* --------------------------------------------------------------------------
   16. Page heads — shop / collection / cart
   -------------------------------------------------------------------------- */
.page-band {
  background: var(--surface);
  border-bottom: 1px solid var(--sand-soft);
}
.page-hero {
  max-width: 680px;
  margin-inline: auto;
  padding-block: var(--sp-12);
  text-align: center;
}
.page-hero h1 { margin-bottom: var(--sp-4); }
.page-hero .lead {
  font-size: var(--text-lg);
  line-height: 1.65;
  color: var(--ink-soft);
  margin: 0;
}
.page-hero .design-count {
  display: inline-block;
  margin-top: var(--sp-4);
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-mute);
}

/* Shop toolbar — filter pills + sort */
.shop-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
  padding-block: var(--sp-4);
  margin-bottom: var(--sp-8);
  border-bottom: 1px solid var(--sand-soft);
}
.filter-pills { display: flex; flex-wrap: wrap; gap: var(--sp-2); }
.toolbar-right {
  display: flex;
  align-items: center;
  gap: var(--sp-5);
  flex-wrap: wrap;
}
.results-count { font-size: var(--text-sm); color: var(--ink-mute); }
.sort-field {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-3);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--ink-soft);
}
.sort-field select { width: auto; min-width: 190px; }

/* --------------------------------------------------------------------------
   17. Cart page
   -------------------------------------------------------------------------- */
.cart-title {
  display: flex;
  align-items: baseline;
  gap: var(--sp-3);
  flex-wrap: wrap;
  margin-bottom: var(--sp-6);
}
.cart-title .cart-count-label {
  font-family: var(--font-sans);
  font-size: var(--text-base);
  color: var(--ink-mute);
}

.cart-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-8);
  align-items: start;
  padding-bottom: var(--sp-16);
}
@media (min-width: 920px) {
  .cart-layout { grid-template-columns: minmax(0, 1fr) 360px; gap: var(--sp-10); }
  .cart-summary { position: sticky; top: calc(var(--header-h) + var(--sp-5)); }
}

.cart-list { display: flex; flex-direction: column; gap: var(--sp-4); }

.cart-item {
  display: grid;
  grid-template-columns: 104px minmax(0, 1fr);
  gap: var(--sp-4);
  padding: var(--sp-4);
  background: var(--surface);
  border: 1px solid var(--sand-soft);
  border-radius: var(--r-lg);
}
.cart-item-media {
  aspect-ratio: 4 / 5;
  border-radius: var(--r-md);
  overflow: hidden;
  background: var(--surface-2);
}
.cart-item-media img { width: 100%; height: 100%; object-fit: cover; }
.cart-item-media.no-image {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--sp-2);
  background: linear-gradient(150deg, var(--sage-pale), var(--gold-pale));
}
.cart-item-media.no-image span {
  font-family: var(--font-serif);
  font-size: var(--text-xs);
  color: var(--ink-soft);
  text-align: center;
}

.cart-item-body { display: flex; flex-direction: column; gap: var(--sp-2); min-width: 0; }
.cart-item-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--sp-3);
}
.cart-item-title { margin: 0; font-size: var(--text-md); line-height: 1.3; }
.cart-item-price { flex: none; font-weight: 500; color: var(--ink); }
.cart-item-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sp-2) var(--sp-4);
  font-size: var(--text-xs);
  color: var(--ink-mute);
}
.cart-item-meta .meta-chip { display: inline-flex; align-items: center; gap: var(--sp-2); }
.color-dot {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--dot, #ccc);
  border: 1px solid rgba(45, 42, 38, 0.15);
}
.cart-personalization {
  font-size: var(--text-xs);
  color: var(--ink-soft);
  padding: var(--sp-2) var(--sp-3);
  background: var(--gold-mist);
  border-radius: var(--r-sm);
  overflow-wrap: break-word;
}
.cart-personalization strong {
  font-weight: 600;
  color: var(--gold-deep);
  letter-spacing: 0.04em;
}

.cart-item-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3);
  margin-top: auto;
}
.qty-stepper {
  display: inline-flex;
  align-items: center;
  background: #fff;
  border: 1.5px solid var(--sand);
  border-radius: var(--r-pill);
}
.qty-stepper button {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-soft);
  border-radius: var(--r-pill);
  transition: background var(--speed) var(--ease-out), color var(--speed) var(--ease-out);
}
.qty-stepper button:hover:not([disabled]) { color: var(--sage-deep); background: var(--sage-mist); }
.qty-stepper button[disabled] { opacity: 0.35; cursor: not-allowed; }
.qty-stepper .qty-value {
  min-width: 28px;
  text-align: center;
  font-size: var(--text-sm);
  font-weight: 500;
}

.remove-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  min-height: 44px;
  padding-inline: var(--sp-2);
  font-size: var(--text-sm);
  color: var(--ink-mute);
  border-radius: var(--r-sm);
  transition: color var(--speed) var(--ease-out);
}
.remove-btn:hover { color: var(--rose); }

.summary-card {
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
  padding: var(--sp-6);
  background: var(--surface);
  border: 1px solid var(--sand-soft);
  border-radius: var(--r-xl);
}
.summary-card h2 { font-size: var(--text-xl); margin: 0; }
.summary-row {
  display: flex;
  justify-content: space-between;
  gap: var(--sp-4);
  font-size: var(--text-sm);
  color: var(--ink-soft);
}
.summary-row .free { color: var(--sage-deep); font-weight: 600; }
.summary-row.total {
  padding-top: var(--sp-4);
  border-top: 1px solid var(--sand-soft);
  font-family: var(--font-serif);
  font-size: var(--text-lg);
  color: var(--ink);
}
.summary-note { margin: 0; font-size: var(--text-xs); color: var(--ink-mute); text-align: center; }

.ship-progress {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
  padding: var(--sp-3) var(--sp-4);
  background: var(--sage-mist);
  border-radius: var(--r-md);
  font-size: var(--text-xs);
  color: var(--sage-ink);
}
.ship-progress-track {
  height: 6px;
  border-radius: var(--r-pill);
  background: rgba(255, 255, 255, 0.75);
  overflow: hidden;
}
.ship-progress-fill {
  height: 100%;
  width: 0%;
  border-radius: var(--r-pill);
  background: var(--sage);
  transition: width 0.4s var(--ease-out);
}

.cart-empty {
  max-width: 460px;
  margin-inline: auto;
  padding-block: var(--sp-16) var(--sp-20);
  text-align: center;
}
.cart-empty svg { margin-inline: auto; color: var(--sage); margin-bottom: var(--sp-5); }
.cart-empty p { color: var(--ink-mute); margin-bottom: var(--sp-6); }

/* --------------------------------------------------------------------------
   18. About page
   -------------------------------------------------------------------------- */
.prose { max-width: 65ch; margin-inline: auto; }
.prose p { font-size: var(--text-md); line-height: 1.8; color: var(--ink-soft); }
.prose .eyebrow { text-align: center; }
.prose h2 { text-align: center; margin-bottom: var(--sp-6); }

.name-cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-6);
  margin-top: var(--sp-10);
}
@media (min-width: 720px) { .name-cards { grid-template-columns: 1fr 1fr; } }
.name-card {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  padding: var(--sp-8);
  background: var(--surface);
  border: 1px solid var(--sand-soft);
  border-radius: var(--r-xl);
}
.name-card .name-letter {
  font-family: var(--font-serif);
  font-size: var(--text-2xl);
  line-height: 1;
  color: var(--gold-deep);
}
.name-card h3 { margin: 0; }
.name-card p { margin: 0; font-size: var(--text-sm); line-height: 1.7; color: var(--ink-soft); }

.guarantee-band {
  max-width: 820px;
  margin-inline: auto;
  padding: var(--sp-12) var(--sp-6);
  text-align: center;
  background: var(--gold-mist);
  border: 1.5px dashed var(--gold-pale);
  border-radius: var(--r-xl);
}
.guarantee-band h2 { margin-bottom: var(--sp-4); }
.guarantee-band p {
  max-width: 48em;
  margin-inline: auto;
  color: var(--ink-soft);
}
.guarantee-band p:last-child { margin-bottom: 0; }

.about-cta { text-align: center; padding-block: var(--sp-8) var(--sp-4); }

/* --------------------------------------------------------------------------
   19. Homepage hero demo — scripted scene loop
   Scenes are DOM-scripted (not video): cheap to edit, evolves with the
   product (v1.0 typing → v1.1 photos → Ada), future scenes config-gated.
   -------------------------------------------------------------------------- */
.hero-demo {
  max-width: 420px;
  margin-inline: auto;
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
}

.demo-stage {
  position: relative;
  container-type: inline-size;
  aspect-ratio: 1 / 1;
  border-radius: var(--r-xl);
  background: transparent;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}
.demo-stage .demo-design-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
  display: block;
}

.demo-text, .demo-text-top {
  position: absolute;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 60%;
  min-height: 1.3em;
  font-family: var(--overlay-font, var(--font-serif));
  font-weight: var(--overlay-weight, 400);
  font-size: calc(clamp(0.875rem, 3.5cqw, 1.5rem) * var(--overlay-scale, 1));
  letter-spacing: 0.04em;
  text-align: center;
  color: var(--overlay-color, #FFFFFF);
  pointer-events: none;
}

.demo-text {
  top: 72%;
  font-size: calc(clamp(0.7rem, 2.8cqw, 1.2rem) * var(--overlay-scale, 1));
}

.demo-text-top {
  top: 32%;
}
.demo-caret {
  display: inline-block;
  width: 2px;
  height: 1em;
  margin-left: 3px;
  vertical-align: -0.12em;
  background: var(--gold-deep);
  animation: caret-blink 1s steps(1) infinite;
}
@keyframes caret-blink { 50% { opacity: 0; } }

/* Scene 2 — photo teaser (polaroid drops in) */
.demo-photo {
  position: absolute;
  right: var(--sp-5);
  bottom: var(--sp-5);
  transform: rotate(4deg) translateY(8px);
  opacity: 0;
  transition: opacity 0.45s var(--ease-out), transform 0.45s var(--ease-out);
}
.demo-photo.show { opacity: 1; transform: rotate(4deg) translateY(0); }
.polaroid {
  width: 118px;
  padding: 7px 7px 24px;
  background: #fff;
  border-radius: 4px;
  box-shadow: var(--shadow-md);
}
.polaroid svg { width: 100%; height: auto; border-radius: 2px; }

/* Scene 3 — Ada chat teaser */
.demo-chat {
  position: absolute;
  inset-inline: var(--sp-4);
  bottom: var(--sp-4);
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
}
.chat-bubble {
  max-width: 88%;
  padding: var(--sp-2) var(--sp-4);
  border-radius: 14px;
  font-size: var(--text-sm);
  line-height: 1.45;
  box-shadow: var(--shadow-sm);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.35s var(--ease-out), transform 0.35s var(--ease-out);
}
.chat-bubble.show { opacity: 1; transform: none; }
.chat-user {
  align-self: flex-end;
  background: var(--ink);
  color: var(--cream);
  border-bottom-right-radius: 4px;
}
.chat-ada {
  align-self: flex-start;
  background: #fff;
  color: var(--ink);
  border-bottom-left-radius: 4px;
}
.chat-ada .ada-name {
  display: block;
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--gold-deep);
  margin-bottom: 2px;
}

/* Footer: scene label + dots */
.demo-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3);
}
.demo-label { font-size: var(--text-xs); color: var(--ink-mute); letter-spacing: 0.04em; }
.demo-label .soon { color: var(--gold-deep); font-weight: 600; }
.demo-dots { display: flex; gap: var(--sp-1); flex: none; }
.demo-dot {
  position: relative;
  width: 28px;
  height: 28px;
  padding: 0;
  border-radius: 50%;
}
.demo-dot::after {
  content: "";
  position: absolute;
  inset: 10px;
  border-radius: 50%;
  background: var(--sand);
  transition: background var(--speed) var(--ease-out), transform var(--speed) var(--ease-out);
}
.demo-dot:hover::after { background: var(--gold-pale); }
.demo-dot[aria-pressed="true"]::after { background: var(--gold); transform: scale(1.25); }
