/* mahmya storefront — tokens and components.
   Mobile-first redesign (2026-11): warm pearl ground, cocoa accent from the brand mark, one
   serif (Alice) for display and Lato for everything read or pressed. Base rules are the desktop
   layout; tablets and phones are the max-width blocks near the end. The only min-width queries
   are the two desktop product-layout blocks, which the layout tests pin. */

/* Fonts are self-hosted rather than loaded from Google Fonts: the third-party
   stylesheet plus font fetch cost ~860ms on the critical path. `swap` keeps
   text visible in the fallback while each face loads.
   Alice is the logo face only (brand word, footer lockup); Lato carries the
   rest of the page. */
@font-face {
  font-family: 'Alice';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/alice-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Alice';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/alice-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Lato';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/lato-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Lato';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/lato-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Lato';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('/fonts/lato-700-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Lato';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('/fonts/lato-700-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  /* Page ground is a warm pearl, never pure white: the product photos are shot on white, and a
     tinted tile under a multiply blend lets them sit in the page instead of on it.
     Plain hex throughout: oklch() and color-mix() are missing on iOS 15 and old Android
     WebViews, where an unsupported colour inside a variable takes the whole rule down. */
  --color-bg: #fcf9f5;
  --color-surface: #f8f3ec;
  --color-text: #291c15;
  --color-muted: #5e4f46;
  --color-divider: #e0d9d2;
  --color-line: #e0d9d2;
  /* 3.76:1 on the page: the edge of inputs and steppers (WCAG 1.4.11 asks 3:1). */
  --color-line-strong: #8a7e75;
  --color-tile: #f5efe7;
  --color-silk: #f6edde;
  --color-clay: #a3452e;
  --color-clay-fill: #c55c43;
  --color-ok: #2f7d47;

  --color-accent: #5b3a2a;
  --color-accent-2: #c8a780;
  --color-accent-100: #f8f2ec;
  --color-accent-200: #eee1d2;
  --color-accent-300: #ddc9ae;
  --color-accent-400: #c3a37e;
  --color-accent-500: #a07a52;
  --color-accent-600: #82603e;
  --color-accent-700: #64472c;
  --color-accent-800: #4a3420;
  --color-accent-900: #322317;

  --color-neutral-100: #f8f4f4;
  --color-neutral-200: #eae7e7;
  --color-neutral-300: #d7d3d3;
  --color-neutral-400: #bab6b6;
  --color-neutral-500: #9b9797;
  --color-neutral-600: #7d7979;
  --color-neutral-700: #605d5d;
  --color-neutral-800: #444141;
  --color-neutral-900: #2d2b2b;

  /* Alice is the logo face and now the display face too: one serif, used large and rarely.
     Lato carries everything that is read or pressed. */
  --font-logo: 'Alice', Georgia, serif;
  --font-display: 'Alice', 'Iowan Old Style', Georgia, serif;
  --font-heading: 'Lato', 'Helvetica Neue', Arial, sans-serif;
  --font-body: 'Lato', 'Helvetica Neue', Arial, sans-serif;
  --font-heading-weight: 400;
  --font-mono: ui-monospace, 'SF Mono', Menlo, monospace;

  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-6: 24px;
  --space-8: 32px;

  --radius-md: 12px;
  --radius-tile: 12px;
  --gutter: 32px;
  --header-h: 64px;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  /* Sharper start, longer settle: for things that arrive (the bag bar, a count, the heart). */
  --ease-expo: cubic-bezier(0.16, 1, 0.3, 1);

  --shadow-lg: 0 12px 32px rgba(41, 28, 21, 0.22);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html { scroll-padding-top: calc(var(--header-h) + 72px); }

body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.5;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-heading);
  font-weight: var(--font-heading-weight);
  line-height: 1.12;
  margin: 0 0 var(--space-2);
}
h1 { font-size: 42px; }
h2 { font-size: 32px; }
h3 { font-size: 25px; }
h4 { font-size: 20px; }
h5 { font-size: 16px; }
h6 {
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
p { margin: 0 0 var(--space-3); }

a {
  color: var(--color-text);
  text-decoration: none;
  text-underline-offset: 3px;
}
a:hover { color: var(--color-accent-700); }

img {
  display: block;
  max-width: 100%;
}

button,
input,
select,
textarea {
  font-family: var(--font-body);
}

:focus { outline: none; }
:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}
::selection { background: var(--color-accent-300); }

/* 7.46:1 on the page and 6.9:1 on the tile: small prices and captions stay readable. */
.text-muted { color: var(--color-muted); }

.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;
}

.skip-link {
  position: absolute;
  left: 8px;
  top: -64px;
  z-index: 60;
  padding: 10px 14px;
  border-radius: 8px;
  background: var(--color-accent);
  color: var(--color-accent-100);
}
.skip-link:focus { top: 8px; color: var(--color-accent-100); }

.hr {
  height: 1px;
  border: 0;
  margin: var(--space-4) 0;
  background: var(--color-divider);
}

.text-link {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-size: 14px;
  text-decoration: underline;
}

/* ── buttons ─────────────────────────────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  text-decoration: none;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 15px;
  line-height: 1.2;
  color: var(--color-text);
  background: transparent;
  border: 1px solid transparent;
  padding: var(--space-2) 18px;
  border-radius: var(--radius-md);
}
.btn svg { display: block; flex: none; }
.btn:disabled {
  background: var(--color-neutral-200);
  border-color: var(--color-neutral-200);
  color: var(--color-neutral-700);
  cursor: not-allowed;
}
.btn-primary {
  background: var(--color-accent);
  color: var(--color-accent-100);
}
.btn-primary:hover {
  background: var(--color-accent-800);
  color: var(--color-accent-100);
}
.btn-primary:active { background: var(--color-accent-900); }
.btn-secondary { border-color: var(--color-text); }
.btn-secondary:hover { background: var(--color-tile); color: var(--color-text); }
.btn-ghost {
  color: var(--color-accent);
  font-weight: 400;
  padding-inline: var(--space-1);
}
.btn-ghost:hover { background: var(--color-tile); }
.btn-ghost:active { background: var(--color-accent-200); }
.btn-icon {
  width: 44px;
  height: 44px;
  padding: 0;
  border-radius: 50%;
}
.btn-on-dark {
  background: var(--color-accent-100);
  color: var(--color-accent-900);
}
.btn-on-dark:hover { background: var(--color-bg); color: var(--color-accent-900); }
/* On the cocoa band the accent ring would be invisible; cream is 9:1 there. */
.btn-on-dark:focus-visible { outline-color: var(--color-accent-100); }
.btn-wide { width: 100%; }

.link-btn {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  font: inherit;
  color: var(--color-text);
}
.link-btn:hover { color: var(--color-accent-700); }

.icon-btn {
  position: relative;
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: none;
  color: var(--color-text);
  cursor: pointer;
}
.icon-btn:hover { background: var(--color-tile); }
.icon-btn[aria-pressed='true'] svg { fill: var(--color-clay-fill); stroke: var(--color-clay-fill); }
.count {
  position: absolute;
  top: 5px;
  right: 3px;
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  border-radius: 9px;
  background: var(--color-accent);
  color: var(--color-accent-100);
  font-size: 11px;
  font-weight: 700;
  line-height: 17px;
  text-align: center;
}

/* ── forms ───────────────────────────────────────────────────────────── */

.radio {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-size: 15px;
  min-height: 48px;
  border-bottom: 1px solid var(--color-line);
}
.radio input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  pointer-events: none;
}
.radio .dot {
  width: 18px;
  height: 18px;
  flex: none;
  border-radius: 50%;
  border: 1.5px solid var(--color-line-strong);
}
.radio:hover .dot { border-color: var(--color-accent); }
.radio input:checked + .dot {
  border-color: var(--color-accent);
  background: var(--color-accent);
  box-shadow: inset 0 0 0 4px var(--color-bg);
}
.radio input:focus-visible + .dot {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}
.radio .radio-count { margin-left: auto; font-size: 13px; }

/* ── page frame ──────────────────────────────────────────────────────── */

.page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--color-bg);
}

.announcement {
  background: var(--color-accent);
  color: var(--color-accent-100);
  font-size: 13px;
  padding: 7px var(--gutter);
  text-align: center;
}

/* One bar, 64px (56px on phones): brand left, tools right. It sticks, and on phones it slides
   away while the buyer scrolls down so the chip row is the only fixed chrome (client/app.js sets
   body[data-bar]). */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--color-bg);
  border-bottom: 1px solid var(--color-line);
  transition: transform 0.3s var(--ease-out);
}
.header-bar {
  display: flex;
  align-items: center;
  gap: 24px;
  height: var(--header-h);
  padding: 0 calc(var(--gutter) - 10px) 0 var(--gutter);
}
.brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  color: var(--color-text);
}
.brand-lockup:hover { color: var(--color-text); }
.brand-word {
  font-family: var(--font-logo);
  font-weight: 400;
  font-size: 22px;
  line-height: 1;
  letter-spacing: 0.04em;
}
.brand-mark {
  height: 34px;
  width: 34px;
  border-radius: 50%;
}
.header-nav {
  display: flex;
  gap: 4px 26px;
  margin-left: 16px;
  font-size: 14px;
}
.header-nav a,
.header-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  white-space: nowrap;
}
.header-tools {
  display: flex;
  align-items: center;
  margin-left: auto;
}

.site-main {
  flex: 1;
  padding: 0 var(--gutter) clamp(32px, 4vw, 56px);
}

/* ── hero band (home only) ───────────────────────────────────────────── */

/* Full-bleed: the hero sits outside .site-main so it ignores the page gutter.
   `isolation` keeps the light's blend inside the band. `--rest-x/y` is where the light sits when
   nobody is touching it: on the bangles. */
.hero {
  --rest-x: 56%;
  --rest-y: 54%;
  --light-size: clamp(280px, 56vmin, 600px);
  position: relative;
  height: min(56vh, 520px);
  min-height: 320px;
  overflow: hidden;
  isolation: isolate;
  background: var(--color-silk);
}
.hero-art {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 62% 100%;
}
/* Silk-coloured wash under the copy only; the pieces on the right stay untouched. It is drawn
   over the tint and the light, so the copy keeps its contrast whatever the scene is doing. */
.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, rgba(246, 237, 222, 0.9) 0%, rgba(246, 237, 222, 0.7) 26%, rgba(246, 237, 222, 0) 48%);
  pointer-events: none;
}
.hero-copy {
  position: relative;
  z-index: 1;
  max-width: 30rem;
  padding: 56px var(--gutter) 0;
}
.hero-title {
  font-family: var(--font-display);
  font-size: clamp(36px, 4.6vw, 46px);
  line-height: 1.08;
  letter-spacing: -0.01em;
  text-wrap: balance;
  margin: 0;
}
.hero-line,
.hero-note {
  margin: 10px 0 0;
  max-width: 22rem;
  font-size: 17px;
  line-height: 1.4;
  color: var(--color-accent-900);
}
.hero-line b { white-space: nowrap; }

/* ── spotlight: the hero as a lit scene ──────────────────────────────── */

/* The light of the scene follows the visitor's own clock (client/app.js sets data-light):
   as shot by day, warmer towards sunset, dimmer and warmer at night. A multiply layer, so the
   photograph keeps its detail and only its light changes. */
.hero-tint {
  position: absolute;
  inset: 0;
  mix-blend-mode: multiply;
  pointer-events: none;
}
.hero[data-light='golden'] .hero-tint { background: rgba(255, 214, 170, 0.34); }
.hero[data-light='night'] .hero-tint { background: rgba(196, 160, 132, 0.46); }

/* One soft light, lying on the gold. The script moves it with a transform: to the pointer, to
   a tap, and across the pieces as a phone starts to scroll. Without the script it stays at
   rest, which is still a lit photograph. `soft-light` lifts the gold it lands on and does
   almost nothing to pale silk, so it reads as light on metal, not as a white disc. */
.hero-light {
  position: absolute;
  left: var(--rest-x);
  top: var(--rest-y);
  width: var(--light-size);
  height: var(--light-size);
  margin: calc(var(--light-size) / -2) 0 0 calc(var(--light-size) / -2);
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(255, 248, 230, 0.95) 0%, rgba(255, 242, 212, 0.5) 34%, rgba(255, 238, 200, 0) 74%);
  mix-blend-mode: soft-light;
  opacity: 0.8;
  pointer-events: none;
  transition: opacity 0.45s var(--ease-out);
  will-change: transform;
}
/* Pressed: the light gathers (the script tightens it) and brightens. At night it is the one
   warm thing in the frame, so it is a touch stronger. */
.hero[data-press] .hero-light { opacity: 1; transition-duration: 0.12s; }
.hero[data-light='night'] .hero-light { opacity: 0.95; }

/* A returning visitor with saved pieces reads about them where the materials line was. */
.hero[data-returning] .hero-line { display: none; }
.hero-saved {
  padding: 6px 0;
  margin: -6px 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  text-align: left;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}
.hero-saved:hover { color: var(--color-accent-700); }

/* Arrival, once per page load: the photograph settles back a little, the headline arrives a
   word at a time, the line follows, the light comes up. Nothing overshoots. */
@keyframes hero-settle {
  from { transform: scale(1.06); }
}
@keyframes hero-rise {
  from { opacity: 0; transform: translateY(0.45em); }
}
@keyframes hero-glow {
  from { opacity: 0; }
}
@media (prefers-reduced-motion: no-preference) {
  .hero-art { animation: hero-settle 1.8s var(--ease-expo) backwards; }
  .hero-word {
    display: inline-block;
    animation: hero-rise 0.9s var(--ease-expo) backwards;
  }
  .hero-word:nth-child(1) { animation-delay: 0.1s; }
  .hero-word:nth-child(2) { animation-delay: 0.17s; }
  .hero-word:nth-child(3) { animation-delay: 0.24s; }
  .hero-word:nth-child(4) { animation-delay: 0.31s; }
  .hero-word:nth-child(5) { animation-delay: 0.38s; }
  .hero-word:nth-child(6) { animation-delay: 0.45s; }
  .hero-word:nth-child(n + 7) { animation-delay: 0.52s; }
  .hero-line,
  .hero-note { animation: hero-rise 0.9s var(--ease-expo) 0.62s backwards; }
  .hero-light { animation: hero-glow 1.4s var(--ease-out) 0.25s backwards; }
}

/* ── category chips ──────────────────────────────────────────────────── */

/* Sticks under the header. The negative margin lets the row bleed through the page gutter so
   the last chip scrolls off the screen edge, not into a wall. */
.filters {
  position: sticky;
  top: var(--header-h);
  z-index: 15;
  display: flex;
  align-items: center;
  margin: 0 calc(var(--gutter) * -1);
  background: var(--color-bg);
  border-bottom: 1px solid var(--color-line);
  transition: transform 0.3s var(--ease-out);
}
.chips {
  flex: 1;
  min-width: 0;
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 8px 8px 8px var(--gutter);
  scrollbar-width: none;
}
.chips::-webkit-scrollbar { display: none; }
/* 38px tall to the eye; the 44px touch target comes from the row's own padding. */
.chip {
  position: relative;
  flex: none;
  height: 38px;
  padding: 0 15px;
  border: 1px solid var(--color-line-strong);
  border-radius: 19px;
  background: none;
  color: var(--color-text);
  font: inherit;
  font-size: 14px;
  white-space: nowrap;
  cursor: pointer;
}
.chip::after {
  content: '';
  position: absolute;
  inset: -4px 0;
}
.chip small {
  margin-left: 6px;
  font-size: 12px;
  color: var(--color-muted);
}
.chip[aria-pressed='true'],
.chip-on {
  background: var(--color-text);
  border-color: var(--color-text);
  color: var(--color-bg);
}
.chip[aria-pressed='true'] small { color: var(--color-accent-200); }
.chip:disabled {
  border-style: dashed;
  color: var(--color-muted);
  cursor: default;
}
.chip-on { height: 32px; padding: 0 12px; font-size: 13px; }
/* Press feedback for an unselected chip; the selected one is already the darkest thing in the row. */
.chip:active:not(:disabled):not([aria-pressed='true']):not(.chip-on) { background: var(--color-accent-200); }
.sort-btn {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 44px;
  padding: 0 var(--gutter) 0 12px;
  border: 0;
  border-left: 1px solid var(--color-line);
  background: none;
  color: var(--color-text);
  font: inherit;
  font-size: 14px;
  cursor: pointer;
}
.sort-btn:active { background: var(--color-accent-200); }
.sort-btn[data-active='true'] { color: var(--color-clay); }

.result-line {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px 12px;
  min-height: 44px;
  padding: 6px 0 4px;
  font-size: 13px;
  color: var(--color-muted);
}
.result-line .text-link { margin-left: auto; font-size: 13px; color: var(--color-text); }

/* ── product grid ────────────────────────────────────────────────────── */

/* dense: cards after the occasion band fill the short row above it, so no hole on wide screens. */
.shop-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  grid-auto-flow: dense;
  gap: 36px 18px;
}

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.card[hidden] { display: none; }
.card-media { position: relative; }
.card-image-link {
  display: block;
  aspect-ratio: 640 / 717;
  background: var(--color-tile);
  border-radius: var(--radius-tile);
  overflow: hidden;
  cursor: pointer;
}
.card-image-link img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  mix-blend-mode: multiply;
  transition: transform 0.6s var(--ease-out);
}
.badge-discount,
.badge-sold {
  position: absolute;
  top: 10px;
  left: 10px;
  padding: 4px 9px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 700;
}
.badge-discount {
  background: var(--color-accent);
  color: var(--color-accent-100);
}
.badge-sold {
  background: var(--color-text);
  color: var(--color-bg);
}
.wish-btn {
  position: absolute;
  top: 0;
  right: 0;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  cursor: pointer;
  color: var(--color-text);
}
.wish-btn svg { fill: none; width: 20px; height: 20px; }
.wish-btn[aria-pressed='true'] { color: var(--color-clay-fill); }
.wish-btn[aria-pressed='true'] svg { fill: currentColor; }
/* 36px to the eye, 44px to the thumb. */
.quick-btn {
  position: absolute;
  right: 8px;
  bottom: 8px;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 1px solid var(--color-line);
  border-radius: 50%;
  background: var(--color-bg);
  color: var(--color-text);
  cursor: pointer;
}
.quick-btn::after {
  content: '';
  position: absolute;
  inset: -5px;
}
.quick-btn:active { background: var(--color-accent-200); }
.quick-btn[data-done='true'] {
  background: var(--color-accent);
  border-color: var(--color-accent);
  color: var(--color-accent-100);
}

/* The body takes the height the row leaves over and the price sits at its foot, so prices line
   up across a row when one name runs to two lines and its neighbour to one. */
.card-body {
  flex: 1;
  padding-top: 9px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.card-name {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  font-size: 14px;
  line-height: 1.3;
  overflow-wrap: break-word;
}
.card-prices {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-top: auto;
}
.card-price { font-size: 14px; font-weight: 700; }
.card-old-price { font-size: 13px; }
.card-sold-note { font-size: 14px; }

.empty-state {
  padding: 48px 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
  align-items: flex-start;
}
.empty-state h2 { margin: 0; font-family: var(--font-display); font-size: 24px; }

/* Occasion tiles sit inside the grid after the first rows: rhythm without delaying products.
   On a wide screen the question stands to the left and the tiles share the rest of the band, so
   five tiles fill it; stacked, they stopped two thirds of the way across. Tablets and phones
   stack the question over a rail (see the max-width blocks). */
.wear {
  grid-column: 1 / -1;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 32px 0 32px var(--gutter);
  background: var(--color-tile);
  border-radius: 16px;
}
.wear[hidden] { display: none; }
.wear h2,
.recent h2,
.faq h2 {
  font-family: var(--font-display);
  font-size: 24px;
  line-height: 1.15;
}
/* The question's column and its type grow with the band, so on a very wide screen the tiles
   still reach the far edge without growing past the product cards around them. */
.wear h2 {
  flex: 0 0 clamp(200px, 22%, 420px);
  margin: 0;
  font-size: clamp(28px, 1.9vw, 38px);
  line-height: 1.12;
  text-wrap: balance;
}
.wear .rail {
  flex: 1;
  min-width: 0;
  padding-left: 0;
  scroll-padding-inline: 0 var(--gutter);
}
.rail {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  scrollbar-width: none;
  padding: 0 var(--gutter) 4px;
  scroll-padding-inline: var(--gutter);
}
.rail::-webkit-scrollbar { display: none; }
.rail .card { flex: none; width: 200px; scroll-snap-align: start; }
.wear-tile {
  flex: 1 0 150px;
  max-width: 280px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--color-text);
  font: inherit;
  text-align: left;
  cursor: pointer;
  scroll-snap-align: start;
}
.wear-photo {
  display: block;
  aspect-ratio: 640 / 717;
  background: var(--color-bg);
  border-radius: var(--radius-tile);
  overflow: hidden;
}
.wear-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  mix-blend-mode: multiply;
  transition: transform 0.6s var(--ease-out);
}
.wear-tile b { display: block; margin-top: 9px; font-size: 14px; line-height: 1.25; }
.wear-tile small { display: block; margin-top: 2px; font-size: 12px; line-height: 1.3; color: var(--color-muted); }

.recent { margin: 48px calc(var(--gutter) * -1) 0; }
.recent h2 { margin: 0 0 14px; padding: 0 var(--gutter); }

/* ── good to know + ask band ─────────────────────────────────────────── */

/* On a wide screen the questions and the WhatsApp panel share one row and fill it: the written
   answers on the left, the person to ask on the right. Capped at 760px and stacked, the
   questions left two thirds of a large display empty. Tablets and phones stack them again and
   the panel goes back to a full-bleed band (see the max-width blocks). */
.help {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
  align-items: start;
  gap: clamp(32px, 4vw, 72px);
  /* A rule closes the catalogue above and opens the questions: equal air on both sides of it. */
  margin-top: 56px;
  padding-top: 56px;
  border-top: 1px solid var(--color-line);
}
.faq { min-width: 0; }
.faq h2 { margin: 0 0 8px; }
.faq details,
.detail-more details { border-bottom: 1px solid var(--color-line); }
.faq summary,
.detail-more summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 52px;
  cursor: pointer;
  list-style: none;
  font-weight: 700;
  font-size: 15px;
}
.faq summary::-webkit-details-marker,
.detail-more summary::-webkit-details-marker { display: none; }
.faq summary::after,
.detail-more summary::after {
  content: '';
  flex: none;
  width: 9px;
  height: 9px;
  margin-right: 4px;
  border-right: 1.5px solid var(--color-text);
  border-bottom: 1.5px solid var(--color-text);
  transform: rotate(45deg) translate(-2px, -2px);
  transition: transform 0.25s var(--ease-out);
}
.faq details[open] summary::after,
.detail-more details[open] summary::after { transform: rotate(-135deg) translate(-2px, -2px); }
.faq details p,
.detail-more details p {
  margin: 0;
  padding: 0 0 16px;
  max-width: 62ch;
  font-size: 14px;
  color: var(--color-muted);
}
.faq details a,
.detail-more details a { color: var(--color-text); text-decoration: underline; }

.ask {
  padding: 36px 40px 40px;
  border-radius: 16px;
  background: var(--color-accent);
  color: var(--color-accent-100);
}
.ask h2 { font-family: var(--font-display); font-size: 28px; line-height: 1.1; }
.ask p { margin: 10px 0 20px; max-width: 30rem; color: var(--color-accent-200); }

/* ── button motion ───────────────────────────────────────────────────── */

/* How buttons answer a hand, in one place.
   - Colour changes ease rather than snap.
   - Press: every button gives a little and settles back. In fast (80ms), out slow, so the tap
     is answered at once and the release is soft.
   - Three earned moments, each played once by a tap and never on page load: a halo round the
     heart when a piece is saved, a tick that draws itself when a piece goes in the bag, and the
     count landing on the bag in the header. The bag bar then rises and catches the light once.
   Nothing overshoots: things slow into place, they do not bounce. All movement sits inside
   `prefers-reduced-motion: no-preference`, so asking for less motion leaves the colour
   feedback and removes the rest. Hover styles are kept to devices that hover: on a touch
   screen a hover rule sticks to the last thing tapped until the next tap elsewhere. */
.btn,
.chip,
.sort-btn,
.icon-btn,
.quick-btn,
.wish-btn,
.bagbar,
.qty button,
.faq summary {
  transition:
    background-color 0.18s var(--ease-out),
    border-color 0.18s var(--ease-out),
    color 0.18s var(--ease-out),
    transform 0.36s var(--ease-out);
}
.btn-secondary:active,
.btn-on-dark:active { background: var(--color-accent-200); }

/* Checkout while the payment page is being fetched: still the brand colour, a shade lighter,
   not the grey of a button that cannot be used. */
.btn-primary[aria-busy='true'] {
  background: var(--color-accent-700);
  border-color: var(--color-accent-700);
  color: var(--color-accent-100);
  cursor: progress;
}

@keyframes glint {
  from { transform: translateX(-110%); }
  to { transform: translateX(110%); }
}
@keyframes bagbar-in {
  from { transform: translateY(140%); opacity: 0; }
}
@keyframes wish-halo {
  from { transform: scale(0.5); opacity: 0.6; }
  to { transform: scale(1.55); opacity: 0; }
}
@keyframes wish-in {
  from { transform: scale(0.55); }
}
@keyframes count-land {
  from { transform: scale(1.5); }
}
@keyframes tick-draw {
  to { stroke-dashoffset: 0; }
}
@keyframes plus-back {
  from { transform: rotate(-90deg); opacity: 0; }
}

@media (prefers-reduced-motion: no-preference) {
  /* Press. */
  .btn:active:not(:disabled),
  .bagbar:active {
    transform: scale(0.97);
    transition-duration: 0.08s;
  }
  .chip:active:not(:disabled) {
    transform: scale(0.96);
    transition-duration: 0.08s;
  }
  .btn-icon:active:not(:disabled),
  .icon-btn:active,
  .quick-btn:active,
  .wish-btn:active,
  .qty button:active:not(:disabled):not(.link-btn) {
    transform: scale(0.9);
    transition-duration: 0.08s;
  }
  .btn svg,
  .quick-btn svg { transition: transform 0.36s var(--ease-out); }

  /* The light that crosses a cocoa button: once across the bag bar after it lands, and on a
     loop across Checkout while it works. A pale band, a quarter opaque at its brightest. */
  .btn-primary {
    position: relative;
    overflow: hidden;
  }
  .bagbar { overflow: hidden; }
  .btn-primary::after,
  .bagbar::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(105deg, rgba(248, 242, 236, 0) 38%, rgba(248, 242, 236, 0.26) 50%, rgba(248, 242, 236, 0) 62%);
    transform: translateX(-110%);
    pointer-events: none;
  }
  .btn-primary[aria-busy='true']::after { animation: glint 1.15s linear infinite; }

  /* The bag bar rises when the first piece goes in, then catches the light. `backwards`, not
     `both`: once it has played, the bar's own transform (the press) is in charge again. */
  .bagbar { animation: bagbar-in 0.5s var(--ease-expo) backwards; }
  .bagbar::after { animation: glint 1s var(--ease-out) 0.4s backwards; }

  /* Saved: the heart grows into place while a ring leaves it. */
  .wish-btn::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    width: 30px;
    height: 30px;
    margin: -15px 0 0 -15px;
    border: 1.5px solid var(--color-clay-fill);
    border-radius: 50%;
    opacity: 0;
    pointer-events: none;
  }
  .wish-btn[data-pop]::before { animation: wish-halo 0.6s var(--ease-out); }
  .wish-btn[data-pop] svg { animation: wish-in 0.5s var(--ease-expo); }

  /* In the bag: the tick draws itself, the "+" turns back in afterwards, and the header count
     lands from a size up. */
  .tick path {
    stroke-dasharray: 1;
    stroke-dashoffset: 1;
    animation: tick-draw 0.34s var(--ease-out) 0.1s forwards;
  }
  .quick-btn[data-back] svg { animation: plus-back 0.36s var(--ease-out); }
  .count[data-tick] { animation: count-land 0.5s var(--ease-expo); }
}

@media (hover: hover) {
  .chip:hover:not(:disabled):not([aria-pressed='true']):not(.chip-on) {
    background: var(--color-tile);
    border-color: var(--color-text);
  }
  .sort-btn:hover { background: var(--color-tile); }
  .quick-btn:hover { border-color: var(--color-text); }
  .wish-btn:hover { color: var(--color-clay); }
  .faq summary:hover { color: var(--color-accent-700); }
  /* The photo leans in a little; the tile clips it, so nothing around the card moves. */
  .card:hover .card-image-link img,
  .wear-tile:hover .wear-photo img { transform: scale(1.04); }
  .wear-tile:hover b { text-decoration: underline; text-underline-offset: 3px; }
}

@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  /* Icons lean into the pointer: the close cross and the "+" take a quarter turn, the WhatsApp
     mark tips towards the reader, and a cocoa button catches the light once. */
  .btn-icon:hover svg,
  .quick-btn:hover svg:not(.tick) { transform: rotate(90deg); }
  .btn:not(.btn-icon):hover svg { transform: rotate(-10deg) scale(1.08); }
  .btn-primary:hover:not(:disabled)::after { animation: glint 0.9s var(--ease-out); }
}

/* ── overlays: search and sort, bag, size check, size guide ──────────── */

@keyframes panel-in {
  from { transform: translateX(100%); }
  to { transform: translateX(0); }
}
@keyframes sheet-up {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

.overlay {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: flex;
  justify-content: flex-end;
}
.overlay[hidden] { display: none; }
/* The size guide can open over the size check, so it stacks above every other overlay. */
.overlay-top { z-index: 50; }
.overlay-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(41, 28, 21, 0.42);
  border: none;
  padding: 0;
  cursor: pointer;
}
.side-panel {
  position: relative;
  width: min(430px, 100%);
  background: var(--color-bg);
  padding: 12px 24px 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  overflow: auto;
  overscroll-behavior: contain;
  animation: panel-in 320ms var(--ease-out);
}
.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-right: -10px;
}
.panel-head h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 22px;
}
.panel-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.panel-group h3 {
  margin: 0;
  font-size: 13px;
  font-weight: 400;
  color: var(--color-muted);
}
.radio-group {
  display: flex;
  flex-direction: column;
}
.panel-actions {
  margin-top: auto;
  display: flex;
  gap: 10px;
}
.panel-actions .btn-primary { flex: 1; }

/* ── bag ─────────────────────────────────────────────────────────────── */

.cart-lines {
  display: flex;
  flex-direction: column;
  margin: 0;
  padding: 0;
  list-style: none;
}
.cart-line {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr) auto;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid var(--color-line);
}
.cart-line-photo {
  aspect-ratio: 640 / 717;
  background: var(--color-tile);
  border-radius: 8px;
  overflow: hidden;
}
.cart-line-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  mix-blend-mode: multiply;
}
.cart-line-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.cart-line-name {
  font-size: 14px;
  line-height: 1.3;
  overflow-wrap: break-word;
}
.cart-line-meta { font-size: 13px; }
.cart-line-price { font-size: 14px; font-weight: 700; text-align: right; }
.qty {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 8px;
}
.qty button {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: 1px solid var(--color-line-strong);
  border-radius: 10px;
  cursor: pointer;
  font: inherit;
  font-size: 18px;
  color: var(--color-text);
}
.qty button:disabled {
  border-color: var(--color-line);
  color: var(--color-neutral-500);
  cursor: not-allowed;
}
.qty output {
  min-width: 28px;
  text-align: center;
  font-size: 14px;
}
.qty-cap {
  flex-basis: 100%;
  font-size: 12px;
}
.qty .link-btn {
  width: auto;
  min-height: 44px;
  padding: 0 8px;
  border: 0;
  font-size: 13px;
  text-decoration: underline;
  color: var(--color-muted);
}
.cart-totals {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 14px;
}
.cart-totals div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}
.cart-total-row {
  font-size: 17px;
  font-weight: 700;
  padding-top: 8px;
  border-top: 1px solid var(--color-line);
}
.cart-note { font-size: 13px; margin: 0; }
.cart-terms { text-align: center; font-size: 12px; }

/* Once something is in the bag, checkout stays one thumb-tap away while browsing. */
.bagbar {
  position: fixed;
  right: var(--gutter);
  bottom: 16px;
  z-index: 17;
  width: 340px;
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  border: 0;
  border-radius: 12px;
  background: var(--color-accent);
  color: var(--color-accent-100);
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  box-shadow: 0 6px 20px rgba(41, 28, 21, 0.26);
  cursor: pointer;
}
.bagbar-go { text-decoration: underline; text-underline-offset: 3px; }
.bagbar:focus-visible { outline-offset: 3px; }

/* ── size check + size guide ─────────────────────────────────────────── */

.fit-piece {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr) auto;
  gap: 12px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--color-line);
}
.fit-label { margin: 16px 0 0; font-size: 13px; color: var(--color-muted); }
.fit-value { margin: 2px 0 0; font-family: var(--font-display); font-size: 24px; line-height: 1.2; }
.fit-hint { margin: 4px 0 0; font-size: 14px; }
.fit-note { margin: 12px 0 0; font-size: 13px; color: var(--color-muted); }
.fit-note a { color: var(--color-text); text-decoration: underline; }
.fit-actions { display: grid; gap: 10px; margin-top: 18px; }

.guide h2,
.guide h3 {
  margin: 22px 0 8px;
  font-family: var(--font-display);
  font-size: 20px;
  letter-spacing: 0;
}
.guide > :first-child { margin-top: 0; }
.guide ol { margin: 0; padding-left: 20px; font-size: 14px; }
.guide li { padding: 3px 0; margin: 0; }
.guide table {
  width: 100%;
  margin-top: 10px;
  border-collapse: collapse;
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}
.guide th { text-align: left; font-weight: 400; font-size: 13px; color: var(--color-muted); }
.guide th,
.guide td { padding: 8px 8px 8px 0; border-bottom: 1px solid var(--color-line); }
.guide .lengths { list-style: none; margin: 0; padding: 0; }
.guide .lengths li {
  display: grid;
  gap: 2px;
  padding: 9px 0;
  border-bottom: 1px solid var(--color-line);
  font-size: 14px;
}
.lengths i { height: 3px; border-radius: 2px; background: var(--color-accent); margin-bottom: 5px; }
.len-35 { width: 35%; }
.len-42 { width: 42%; }
.len-50 { width: 50%; }
.len-58 { width: 58%; }
.len-80 { width: 80%; }
.lengths span { font-size: 13px; color: var(--color-muted); }
.guide-note { margin: 14px 0 18px; font-size: 13px; color: var(--color-muted); }

/* ── product detail (drawer + standalone page) ───────────────────────── */

@keyframes drawer-up {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

.detail-overlay {
  position: fixed;
  inset: 0;
  z-index: 45;
  display: flex;
}
.detail-overlay[hidden] { display: none; }
.detail-panel {
  position: relative;
  flex: 1;
  background: var(--color-bg);
  padding: 20px 14px 32px;
  overflow: auto;
  animation: drawer-up 260ms cubic-bezier(0.22, 1, 0.36, 1);
}
@media (prefers-reduced-motion: reduce) {
  .detail-panel { animation: none; }
}
.detail-close-row {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 8px;
}

.drawer-body {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.gallery {
  position: relative;
  background: var(--color-tile);
}
.gal-track {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  /* Capped at 42% of the screen so the name and price stay above the buy bar on short phones
     (measured at 320x568 with a two-line name). */
  height: clamp(220px, 42vh, 620px);
  height: clamp(220px, 42svh, 620px);
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.gal-track::-webkit-scrollbar { display: none; }
.gal-slide {
  flex: 0 0 100%;
  scroll-snap-align: center;
  overflow: hidden;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}
.gal-slide img {
  width: 100%;
  height: 100%;
  /* The owner shoots on white. Multiply lets that white take the tile colour, so uneven
     studio whites between photos disappear into one warm ground. */
  mix-blend-mode: multiply;
  /* Contain, not cover: slides span the full drawer width, so on wide
     screens cover would crop the portrait shots down to a sliver. */
  object-fit: contain;
  display: block;
}
/* Arrows and counter sit on the photo, and the owner shoots on white, so a
   white chip alone vanishes. Each control is a white chip with a 1px ink
   hairline: the chip carries it on dark photos, the hairline on white, grey
   and skin tones (one of the two clears 3:1 against any photo colour; see
   carousel-controls.test.ts). The border sits inside the old box, so size
   and position are unchanged. */
.gal-counter {
  position: absolute;
  bottom: 12px;
  right: 12px;
  background: var(--color-bg);
  border: 1px solid var(--color-text);
  font-size: 12px;
  letter-spacing: 0.06em;
  padding: 4px 8px;
}
.gal-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-bg);
  border: 1px solid var(--color-text);
  padding: 0;
  cursor: pointer;
  color: var(--color-text);
}
.gal-nav:hover:not(:disabled) {
  background: var(--color-accent-100);
  color: var(--color-accent-700);
}
/* A white ring under the accent ring, so focus shows on dark photos too. */
.gal-nav:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
  box-shadow: 0 0 0 2px var(--color-bg);
}
.gal-nav:disabled {
  color: var(--color-neutral-500);
  border-color: var(--color-neutral-500);
  cursor: default;
}
.gal-prev { left: 8px; }
.gal-next { right: 8px; }
.gal-dots {
  display: flex;
  gap: 10px;
  align-items: center;
}
.gal-dot {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
}
/* Inactive dashes: neutral-300 measured 1.5:1 on the white page and all but
   vanished; neutral-600 clears 3:1 and stays well apart from the ink dash. */
.gal-dot span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--color-neutral-600);
}
.gal-dot[aria-current='true'] span { background: var(--color-text); }

/* The heart sits on the photo, top right; the slide counter moves to the bottom right. */
.gallery {
  border-radius: 16px;
  overflow: hidden;
}

.detail-info {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.detail-heading {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.detail-category { font-size: 13px; }
.detail-name {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(24px, 7.2vw, 30px);
  line-height: 1.1;
  overflow-wrap: break-word;
}
.detail-prices {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 4px 10px;
  margin-top: 6px;
}
.detail-price { font-size: 21px; font-weight: 700; }
.detail-old-price { font-size: 15px; }
.detail-terms { font-size: 13px; }
.detail-sold { font-size: 17px; font-weight: 700; }
.detail-stock {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 2px 8px;
  margin: 0;
  font-size: 14px;
}
.detail-stock::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-ok);
}
.detail-stock[data-sold='true'] { color: var(--color-muted); }
.detail-stock[data-sold='true']::before { content: none; }
.detail-stock .text-muted { font-size: 13px; }
.detail-description {
  margin: 0;
  max-width: 62ch;
}
.detail-facts {
  margin: 0;
  border-top: 1px solid var(--color-line);
}
.detail-facts div {
  display: flex;
  gap: 16px;
  padding: 11px 0;
  border-bottom: 1px solid var(--color-line);
  font-size: 14px;
}
.detail-facts dt { flex: none; width: 108px; color: var(--color-muted); }
.detail-facts dd { margin: 0; }
.spec-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 14px;
}
.spec-list li {
  display: flex;
  gap: 10px;
  align-items: baseline;
}
.spec-marker {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--color-accent);
  flex: none;
}
.detail-more { border-top: 1px solid var(--color-line); }
.detail-info > .text-link { margin: -8px 0; }

/* The buy bar: WhatsApp as a square beside the primary button. Without JavaScript the primary
   button is not there, so WhatsApp takes the full width and shows its label. */
.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  padding-top: 4px;
}
.detail-actions .btn { min-height: 52px; }
.detail-actions .btn-add { flex: 1; font-size: 16px; }
.detail-actions .btn-wa {
  flex: none;
  width: 52px;
  padding: 0;
}
html.js .btn-wa-label {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
html:not(.js) .detail-actions .btn-wa { flex: 1; width: auto; padding: 0 18px; }
.detail-feedback { flex-basis: 100%; font-size: 13px; }

/* Desktop popup: photos left, details right. 1001px is the far side of the
   grid's `max-width: 1000px` step, so tablets and phones keep the stacked
   drawer above untouched. Everything is scoped to .detail-panel: the
   standalone /p/<slug>/ page reuses .drawer-body and has its own desktop
   block below.
   The photos are square, so the photo column is held to the height the
   viewport leaves for it (panel padding 20 + 32, close row 44 + 8, slide
   indicators 44 + 12 gap = 160px) and the popup's width follows from that at
   7 : 5 — no letterbox bands, and no stretching on very wide screens. */
@media (min-width: 1001px) {
  .detail-panel {
    --detail-gap: clamp(32px, 3.5vw, 56px);
    --detail-photo-max: calc(100vh - 160px);
    --detail-photo-max: calc(100dvh - 160px);
    --detail-width: clamp(880px, calc(var(--detail-photo-max) * 12 / 7 + var(--detail-gap)), 1440px);
    display: flex;
    flex-direction: column;
    padding: 20px max(32px, calc((100% - var(--detail-width)) / 2)) 32px;
  }
  .detail-panel > [data-detail-slot] {
    flex: 1;
    min-height: 0;
  }
  .detail-panel .drawer-body {
    display: grid;
    grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
    grid-template-rows: auto minmax(0, 1fr);
    gap: 12px var(--detail-gap);
    height: 100%;
  }
  /* A square as wide as the column; only a viewport too short for the 880px
     floor makes it narrower than the column, never taller than the panel.
     Arrows and counter sit on the gallery, so they stay on the photo. */
  .detail-panel .gallery {
    grid-column: 1;
    grid-row: 1;
    width: min(100%, var(--detail-photo-max));
    aspect-ratio: 1;
  }
  .detail-panel .gal-track { height: 100%; }
  .detail-panel .gal-dots {
    grid-column: 1;
    grid-row: 2;
    align-self: start;
  }
  /* Scrolls on its own so the photo stays put. The 4px padding (cancelled by
     the margin) keeps focus outlines from being clipped by the scroller. */
  .detail-panel .detail-info {
    grid-column: 2;
    grid-row: 1 / -1;
    min-height: 0;
    overflow-y: auto;
    padding: 4px;
    margin: -4px;
  }
}

/* Standalone /p/<slug>/ page reuses the drawer body at a readable measure. */
.detail-standalone {
  max-width: 980px;
  margin: 0 auto;
}
.detail-back {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 44px;
  font-size: 14px;
  color: var(--color-muted);
}

/* Desktop standalone page: photos left, details right, 7 : 5, from the same
   1001px step as the popup; tablets and phones keep the column above. Unlike
   the popup there is no inner scroller: the page scrolls as a whole and the
   photo column is sticky. Sticky items never leave their grid area, so the
   photo releases at the end of the product block and cannot overlap what
   follows it.
   - The site header is sticky and 64px tall from 1001px (--header-h), so
     the photo sticks 24px below that.
   - The photos are square. The photo is held to the height the viewport
     leaves under the header (24 above; slide dashes 12 + 44 and 24 below)
     and the page width follows from it at 7 : 5, like the popup, clamped to
     880-1440px.
   - The slide dashes are their own grid item: they share the photo's area
     and stick just under it, and the photo keeps their 56px free below
     itself so the two never meet when the column releases. 100cqw is the
     width of this container. */
@media (min-width: 1001px) {
  .detail-standalone {
    --detail-gap: clamp(32px, 3.5vw, 56px);
    --detail-sticky-top: calc(64px + 24px);
    --detail-photo-max: calc(100dvh - var(--detail-sticky-top) - 104px);
    --detail-photo: min(calc((100cqw - var(--detail-gap)) * 7 / 12), var(--detail-photo-max));
    container-type: inline-size;
    max-width: clamp(880px, calc(var(--detail-photo-max) * 12 / 7 + var(--detail-gap)), 1440px);
  }
  .detail-standalone .drawer-body {
    display: grid;
    grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
    column-gap: var(--detail-gap);
    align-items: start;
  }
  .detail-standalone .gallery {
    grid-column: 1;
    grid-row: 1;
    position: sticky;
    top: var(--detail-sticky-top);
    width: var(--detail-photo);
    aspect-ratio: 1;
  }
  .detail-standalone .gallery:has(+ .gal-dots) { margin-bottom: 56px; }
  .detail-standalone .gal-track { height: 100%; }
  .detail-standalone .gal-dots {
    grid-column: 1;
    grid-row: 1;
    position: sticky;
    top: calc(var(--detail-sticky-top) + var(--detail-photo) + 12px);
    margin-top: calc(var(--detail-photo) + 12px);
  }
  .detail-standalone .detail-info {
    grid-column: 2;
    grid-row: 1;
  }
}

/* ── content pages (about, guides, contact, account, policies, 404) ──── */

/* Wide screens: the page title stands in a first column and the copy reads in the second, on
   the same two columns the footer uses, so the title sits over the footer brand and the copy
   over the footer links. The title stays put while a long page scrolls under the header.
   Tablets and phones stack title over copy (see the max-width blocks).
   Copy is 16px on a 1.6 line: these pages are read, not scanned like the grid. */
.prose {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(0, 3fr);
  align-items: start;
  column-gap: clamp(32px, 4vw, 72px);
  padding-top: clamp(40px, 4.5vw, 64px);
  font-size: 16px;
  line-height: 1.6;
}
.prose-head {
  position: sticky;
  top: calc(var(--header-h) + 32px);
}
.prose-body {
  min-width: 0;
  max-width: 68ch;
}
.prose-body > :first-child { margin-top: 0; }
.prose h1 {
  margin: 0;
  font-size: clamp(30px, 3vw, 42px);
  line-height: 1.08;
  text-wrap: balance;
}
.prose h2 {
  font-size: clamp(22px, 2.2vw, 28px);
  line-height: 1.15;
  margin: 40px 0 10px;
}
.prose h3 { font-size: 18px; margin-top: var(--space-6); }
.prose h1,
.prose h2 {
  font-family: var(--font-display);
  letter-spacing: 0;
}
/* `:where` keeps this at the weight of a bare `p`, so a paragraph with its own class (the help
   line, a note in the size guide) keeps its own margins. */
:where(.prose) p { margin: 0 0 14px; }
/* The opening paragraph is a step larger: it says what the page is before the detail starts. */
.prose-body > p:first-child {
  font-size: 18px;
  line-height: 1.5;
}
.prose ul,
.prose ol {
  padding-left: 1.2em;
  margin: 0 0 14px;
}
.prose li { margin-bottom: var(--space-1); }
/* Buttons inside the copy keep their own look; only text links are underlined. */
.prose a:not(.btn) { text-decoration: underline; }
/* A phone number or an address is one thing: it moves to the next line whole. */
.prose a[href^='mailto:'],
.prose a[href^='https://wa.me'] { white-space: nowrap; }

/* Labelled terms on the policy pages: label beside its answer, a rule between rows, the same
   shape as the facts on a product page. */
.terms {
  margin: 28px 0 0;
  border-top: 1px solid var(--color-line);
}
.terms > div {
  display: grid;
  grid-template-columns: minmax(0, 11.5rem) minmax(0, 1fr);
  gap: 4px 24px;
  padding: 16px 0;
  border-bottom: 1px solid var(--color-line);
}
.terms dt { font-weight: 700; }
.terms dd { margin: 0; }
.prose h2 + .terms,
.prose p + .terms { margin-top: 24px; }

.prose-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}
.prose-help {
  margin-top: 28px;
  font-size: 14px;
  color: var(--color-muted);
}
.prose-help a { color: var(--color-text); }

/* The size guide as a page: its lists and tables were sized for a narrow sheet, so they take a
   step up beside 16px copy. */
.prose .guide { margin-top: 32px; }
.prose .guide h2 {
  margin: 40px 0 10px;
  font-size: clamp(22px, 2.2vw, 28px);
}
.prose .guide > :first-child { margin-top: 0; }
.prose .guide ol,
.prose .guide table,
.prose .guide .lengths li { font-size: 15px; }
.prose .guide .btn { margin-top: 8px; }

/* ── instagram banner ────────────────────────────────────────────────── */

/* A quiet strip, not a campaign: copy on the left, the feed on the right, and
   the whole band no taller than the footer it introduces. */
/* Side padding is the page gutter, so the handle starts on the same line as the footer lockup
   and the grid above it. */
.insta {
  background: var(--color-surface);
  padding: clamp(14px, 1.8vw, 20px) var(--gutter);
}
/* The band and its contents both run edge to edge: the handle holds the page gutter on the
   left, like the footer below it, and the tiles hold the right. Centred at 1440px, the copy
   floated in mid-page on a large display, in line with nothing. */
.insta-inner {
  display: flex;
  align-items: center;
  gap: clamp(20px, 3vw, 48px);
}
.insta-copy {
  flex: 0 0 auto;
  max-width: 220px;
}
.insta-handle {
  font-size: 15px;
  margin: 0 0 var(--space-2);
}
.insta-title {
  font-family: var(--font-heading);
  font-weight: var(--font-heading-weight);
  font-size: 14px;
  line-height: 1.4;
  color: var(--color-muted);
  margin: 0 0 var(--space-4);
}
/* Same shape as every other button on the site; only the size is quieter. */
.insta-cta {
  padding-inline: var(--space-6);
  font-size: 14px;
}
/* Capped, not 1fr: letting the tiles take the leftover width blew the band up
   to 260px on a desktop. They stay thumbnail-sized and sit against the right
   edge, with the slack falling between them and the copy. */
/* One row, ten frames, and the count drops with the viewport rather than the
   tiles shrinking to stamps. `--insta-tiles` drives both the track count and
   the width cap; each breakpoint hides the tail it no longer shows. Tracks are
   1fr under that cap, so the tiles fill the row they are given and the slack
   falls between the copy and the strip. */
.insta-grid {
  --insta-tiles: 10;
  flex: 1 1 auto;
  display: grid;
  grid-template-columns: repeat(var(--insta-tiles), minmax(0, 1fr));
  /* 176px a tile while all ten show: enough to fill the row on a 2000px display. Narrower
     screens, which show fewer, keep the 132px thumbnail so the band stays a strip. */
  --insta-tile-max: 176px;
  max-width: calc(var(--insta-tiles) * var(--insta-tile-max) + (var(--insta-tiles) - 1) * 12px);
  gap: clamp(8px, 1vw, 12px);
  list-style: none;
  /* Left auto margin, not `margin: 0` — the row holds the right edge of the
     capped inner while the copy holds the left. */
  margin: 0 0 0 auto;
  padding: 0;
  min-width: 0;
}
@media (max-width: 1439px) {
  .insta-grid { --insta-tiles: 8; --insta-tile-max: 132px; }
  .insta-grid li:nth-child(n + 9) { display: none; }
}
@media (max-width: 1199px) {
  .insta-grid { --insta-tiles: 6; }
  .insta-grid li:nth-child(n + 7) { display: none; }
}
@media (max-width: 999px) {
  .insta-grid { --insta-tiles: 4; }
  .insta-grid li:nth-child(n + 5) { display: none; }
}
/* Square crops out of portrait sources — the pieces sit mid-frame, so the
   centre cover crop keeps them. */
.insta-grid img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  object-fit: cover;
}
@media (max-width: 760px) {
  /* Stays a row on phones: copy left, one frame right. Dropping to a single
     tile is what buys the room — two side by side left neither readable. */
  .insta-inner { gap: var(--space-4); }
  .insta-grid { --insta-tiles: 1; }
  .insta-grid li:nth-child(n + 2) { display: none; }
}

/* ── footer ──────────────────────────────────────────────────────────── */

/* Wide screens: the brand stands in a narrow first column and the links take the rest of the
   row, so the footer fills the page like everything above it. Tablets and phones stack. */
.site-footer {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(0, 3fr);
  column-gap: clamp(32px, 4vw, 72px);
  padding: 40px var(--gutter) 32px;
  background: var(--color-bg);
  border-top: 1px solid var(--color-line);
}
.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.footer-lockup {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-logo);
  font-weight: 400;
  font-size: 22px;
  letter-spacing: 0.04em;
}
.footer-lockup img {
  height: 34px;
  width: 34px;
  border-radius: 50%;
}
.footer-blurb {
  margin: 0;
  font-size: 14px;
  max-width: 34ch;
}
.footer-links {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--color-line);
  font-size: 14px;
}
.footer-links a {
  display: flex;
  align-items: center;
  min-height: 46px;
  border-bottom: 1px solid var(--color-line);
  overflow-wrap: anywhere;
}
/* "Cookie settings" is a button (it opens the banner), dressed as one more footer link. Its base
   styles are in consent.css, shared with the pre-launch page. */
.footer-links .footer-cookie {
  display: flex;
  align-items: center;
  min-height: 46px;
  border-bottom: 1px solid var(--color-line);
  font-size: 14px;
}
.footer-legal {
  grid-column: 1 / -1;
  margin-top: 20px;
  font-size: 12px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 4px 24px;
}
/* Each legal fact stays whole: the line breaks between facts, never inside a number. */
.footer-legal span span { white-space: nowrap; }


/* ── narrower screens ────────────────────────────────────────────────── */

/* Below 1200px five tiles no longer fit beside the occasion question, so it goes back over
   them and the tiles become a rail. */
@media (max-width: 1199px) {
  .wear {
    display: block;
    padding: 30px 0 32px;
  }
  .wear h2 {
    margin: 0 0 16px;
    padding: 0 var(--gutter);
    font-size: 24px;
    line-height: 1.15;
  }
  .wear .rail {
    padding-left: var(--gutter);
    scroll-padding-inline: var(--gutter);
  }
  .wear-tile { flex: none; width: 170px; max-width: none; }
}

/* ── tablets and phones ──────────────────────────────────────────────── */

@media (max-width: 1000px) {
  /* The page links move to the footer; the bar keeps brand and tools. */
  .header-nav { display: none; }

  /* Questions over the WhatsApp panel, which goes back to a band from edge to edge that meets
     the Instagram strip below it. */
  .help {
    display: block;
    margin-top: 40px;
    padding-top: 40px;
  }
  .ask {
    margin: 48px calc(var(--gutter) * -1) calc(clamp(32px, 4vw, 56px) * -1);
    padding: 40px var(--gutter) 44px;
    border-radius: 0;
  }

  /* Content pages: title over copy. */
  .prose {
    display: block;
    padding-top: 32px;
  }
  .prose-head {
    position: static;
    margin-bottom: 20px;
  }

  /* Footer: brand over links. */
  .site-footer { display: block; }
  .footer-links { margin-top: 22px; }
  .footer-legal { justify-content: flex-start; }

  /* The buy bar stays in the thumb zone, in the popup and on the product page alike. */
  .detail-actions {
    position: sticky;
    bottom: 0;
    z-index: 2;
    flex-wrap: nowrap;
    margin: 0 -14px;
    padding: 10px 14px calc(10px + env(safe-area-inset-bottom));
    background: var(--color-bg);
    border-top: 1px solid var(--color-line);
  }
  .detail-feedback {
    position: absolute;
    left: 14px;
    right: 14px;
    bottom: 100%;
    padding: 8px 12px;
    border-radius: 10px 10px 0 0;
    background: var(--color-text);
    color: var(--color-bg);
  }
}

@media (max-width: 699px) {
  :root {
    --gutter: 16px;
    --header-h: 56px;
  }
  .site-main { padding-inline: var(--gutter); }

  /* The brand bar slides away while she scrolls down and returns on the first scroll up, so the
     fixed chrome is the chip row alone. */
  body[data-bar='up'] .site-header { transform: translateY(-100%); }
  body[data-bar='up'] .filters { transform: translateY(calc(var(--header-h) * -1)); }

  /* Fixed 3:2 shape: the photo crops the same way at every phone width, which keeps the pieces
     in the right half and the copy on clear silk in the left half. */
  .hero {
    height: auto;
    min-height: 0;
    aspect-ratio: 3 / 2;
    max-height: 400px;
    --rest-x: 70%;
    --rest-y: 62%;
  }
  .hero-art { object-position: 5% 100%; }
  .hero::after {
    background: linear-gradient(to right, rgba(246, 237, 222, 0.92) 0%, rgba(246, 237, 222, 0.8) 36%, rgba(246, 237, 222, 0) 60%);
  }
  .hero-copy {
    width: 54%;
    max-width: none;
    padding: 20px 0 0 var(--gutter);
  }
  .hero-title { font-size: clamp(23px, 7.3vw, 34px); }
  .hero-line,
  .hero-note { margin-top: 8px; font-size: clamp(13px, 3.7vw, 15px); }

  .shop-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px 10px;
  }
  .wear {
    margin: 10px calc(var(--gutter) * -1);
    padding: 26px 0 28px;
    border-radius: 0;
  }
  .wear-tile { flex: none; width: 38vw; max-width: 170px; }
  .rail .card { width: 42vw; max-width: 200px; }

  /* Sheets rise from the bottom on a phone: the close button and every action sit where the
     thumb already is. */
  .overlay { align-items: flex-end; }
  .side-panel {
    width: 100%;
    max-height: 88vh;
    max-height: 88dvh;
    padding: 10px var(--gutter) calc(20px + env(safe-area-inset-bottom));
    border-radius: 20px 20px 0 0;
    animation-name: sheet-up;
  }

  .bagbar {
    left: var(--gutter);
    right: var(--gutter);
    bottom: calc(10px + env(safe-area-inset-bottom));
    width: auto;
  }
  /* Room for the bag bar under the last thing on the page. */
  body[data-has-bagbar='true'] .site-footer { padding-bottom: calc(84px + env(safe-area-inset-bottom)); }

  /* Policy terms: label over its answer. The contact buttons share the row's width. */
  .prose { padding-top: 24px; }
  .terms > div { grid-template-columns: minmax(0, 1fr); }
  .prose-actions .btn { flex: 1 1 100%; }

  .footer-links { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  /* A phone column is too narrow for the WhatsApp number or the address on one line, so the
     three contact lines take the full row. The shadow redraws the rule above each one, which
     closes the gap an odd number of page links would leave beside the last of them. */
  .footer-contact {
    grid-column: 1 / -1;
    box-shadow: 0 -1px 0 var(--color-line);
  }
}

@media (prefers-reduced-motion: reduce) {
  .site-header,
  .filters { transition: none; }
  .side-panel { animation: none; }
  .card-image-link img,
  .wear-photo img { transition: none; }
  .card:hover .card-image-link img,
  .wear-tile:hover .wear-photo img { transform: none; }
}

/* Interactive-only affordances are hidden when there is no client script, so a
   no-JS visitor never sees a control that cannot work. The rule is written as
   "hide when .js is absent" rather than "restore when present": restoring with
   `display: revert` would throw away each element's own display value and
   silently flatten the flex layouts these classes sit on. The .js class is set
   by an inline script in <head>, so nothing flashes. */
html:not(.js) .js-only { display: none; }
html.js .no-js-only { display: none; }

/* `display` declarations elsewhere in this sheet have the same specificity as
   the [hidden] rules, so the attribute needs the last word — otherwise a
   drawer marked hidden in the markup renders open on first paint. */
[hidden] { display: none !important; }

/* ── checkout fields in the cart drawer ──────────────────────────────── */

.checkout-fields {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.checkout-fields[hidden] { display: none; }
/* The delivery address, asked for before payment. The legend separates "who" from "where"
   without a second box; the two optional lines stay folded so the bag is not a long form. */
.checkout-legend {
  margin: 8px 0 0;
  font-size: 13px;
  color: var(--color-text);
}
.checkout-more > summary {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  font-size: 13px;
  cursor: pointer;
  list-style: none;
}
.checkout-more > summary::-webkit-details-marker { display: none; }
.checkout-more-label {
  text-decoration: underline;
  text-underline-offset: 3px;
}
.checkout-more[open] > summary { margin-bottom: 4px; }
.checkout-more > .field + .field { margin-top: 10px; }
/* The bag's honeypot: in the page for scripts that fill every input, never seen, focused or
   announced. Clipped off-screen, not display:none, which the simplest bots already skip. */
.honeypot {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
/* "Use my current location": one quiet button, its result on the line under it. */
.checkout-pin {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 6px;
}
.checkout-pin .btn { gap: 8px; }
.checkout-pin .link-button { align-self: flex-start; font-size: 13px; }
.checkout-remember {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  font-size: 13px;
  color: var(--color-text);
  cursor: pointer;
}
.checkout-remember input {
  flex: none;
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--color-text);
}
/* A text button: an action that should read as a link, not compete with the page's buttons. */
.link-button {
  padding: 0;
  min-height: 44px;
  border: 0;
  background: none;
  font: inherit;
  font-size: 14px;
  color: var(--color-text);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}
.field > label {
  display: block;
  font-size: 12px;
  margin-bottom: 5px;
  color: var(--color-muted);
}
.input {
  width: 100%;
  min-height: 44px;
  padding: 6px 10px;
  font: inherit;
  /* 16px, not 14: iOS Safari force-zooms the page when focusing any input
     whose font-size is below 16px. */
  font-size: 16px;
  color: var(--color-text);
  caret-color: var(--color-accent);
  background: var(--color-bg);
  border: 1px solid var(--color-line-strong);
  border-radius: var(--radius-md);
}
.input:hover { border-color: var(--color-text); }
.input:focus-visible {
  border-color: var(--color-accent);
  outline-offset: 0;
}

/* ── utility classes ─────────────────────────────────────────────────── */

.hr-flush { margin: 0; }
.btn-touch { min-height: 44px; }
.btn-tall { min-height: 52px; }
.panel-actions-stacked {
  flex-direction: column;
  align-items: stretch;
  gap: 12px;
}

/* ── thank-you page (/order/success/) ────────────────────────────────── */

/* One narrow column, centred: this is read on a phone seconds after paying, so the
   confirmation and the form share a single reading line and nothing sits side by side. */
.thankyou {
  max-width: 46ch;
  margin: 0 auto;
  padding-top: var(--space-4);
}
.thankyou h1 {
  font-size: clamp(26px, 6vw, 38px);
  letter-spacing: 0.02em;
  margin-bottom: var(--space-4);
}
.thankyou h2 {
  font-size: clamp(18px, 4vw, 24px);
  letter-spacing: 0.02em;
  margin-bottom: var(--space-2);
}
.thankyou-ref {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: var(--space-2);
  margin-bottom: var(--space-2);
}
.thankyou-ref strong {
  font-family: var(--font-mono);
  font-size: 15px;
  letter-spacing: 0.04em;
}
.thankyou-items {
  list-style: none;
  margin: var(--space-4) 0 0;
  padding: var(--space-3) 0 0;
  border-top: 1px solid var(--color-divider);
  font-size: 14px;
}
.thankyou-items li {
  display: flex;
  justify-content: space-between;
  gap: var(--space-4);
  padding: var(--space-1) 0;
}
.thankyou-address,
.thankyou-received {
  margin-top: var(--space-8);
  padding-top: var(--space-6);
  border-top: 2px solid var(--color-divider);
}
.thankyou-received h2 { margin-bottom: var(--space-2); }
.thankyou-help {
  margin-top: var(--space-8);
  font-size: 13px;
}
.thankyou-help a { text-decoration: underline; }

.address-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  margin-top: var(--space-4);
}
.field-hint {
  font-size: 12px;
  margin: 0 0 5px;
}
/* Errors sit under their field and are announced by the field's aria-describedby, so no
   aria-live here — a live region would re-read every message on every keystroke. */
.field-error {
  margin: 5px 0 0;
  font-size: 13px;
  color: var(--color-accent-800);
}
.input[aria-invalid='true'] { border-color: var(--color-accent-800); }
.form-status {
  margin: 0;
  font-size: 13px;
}
/* Native select arrow kept: a hand-drawn one loses the platform's touch behaviour on iOS,
   and this control is used almost entirely on phones. */
.select {
  appearance: auto;
  padding-right: var(--space-2);
}

/* ── order outcome pages (/order/cancelled/, /order/failed/) ─────────── */

/* Same narrow column as the thank-you page, minus the address form. The two actions stack
   full-width rather than sitting side by side: on a 375px phone a row of two buttons puts the
   secondary one under the thumb, and "try again" is the one that should be. */
.order-outcome .thankyou-ref { margin-top: var(--space-2); }
.outcome-actions {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  margin-top: var(--space-6);
}
.outcome-actions .btn { width: 100%; }
/* Appears after the API confirms the hold was handed back. Marked rather than merely muted:
   it is the one line on the page that is good news. */
.outcome-released {
  margin-top: var(--space-3);
  padding-left: var(--space-3);
  border-left: 2px solid var(--color-accent);
}
