/* ==========================================================================
   Kaidora — site.css
   Hand-written design system for the Kaidora storefront (dark canvas + day skin).
   No frameworks, no external requests. Tokens first, then primitives, then
   components in DOM order: header → hero → commerce → cart → checkout → prose →
   footer → flashes → admin → errors → motion/print.

   Contents
   01. Self-hosted fonts (@font-face)
   02. Design tokens (dark default)
   03. Day skin overrides
   04. Reset and base
   05. Typography
   06. Layout and utilities
   07. Buttons and badges
   08. Forms
   09. Header, navigation, drawer
   10. Hero and section furniture
   11. Product grid and cards
   12. Product gallery, swatches, quantity
   13. Cart and totals
   14. Checkout
   15. Prose, policy and long-form pages
   16. Footer
   17. Flashes and notices
   18. Admin shell
   19. Errors, empty states, pagination
   20. Motion, print, display-mode quirks
   ========================================================================== */

/* 01. Self-hosted fonts -----------------------------------------------------
   WOFF2 subsets pulled from the Google Fonts CSS (SIL Open Font License) and
   served from /assets/fonts. Relative URLs keep working whatever BASE_PATH is.
   font-display: swap keeps first paint fast; the fallback stacks are the same
   ones the live site declares. */

@font-face {
  font-family: "Caudex"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("../fonts/caudex-400.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: "Caudex"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("../fonts/caudex-400-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-20C4, U+2113, U+2C60-2C7F,
      U+A720-A7FF;
}

@font-face {
  font-family: "Caudex"; font-style: normal; font-weight: 700; font-display: swap;
  src: url("../fonts/caudex-700.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: "Caudex"; font-style: normal; font-weight: 700; font-display: swap;
  src: url("../fonts/caudex-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-20C4, U+2113, U+2C60-2C7F,
      U+A720-A7FF;
}

@font-face {
  font-family: "Caudex"; font-style: italic; font-weight: 400; font-display: swap;
  src: url("../fonts/caudex-400-italic.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: "Caudex"; font-style: italic; font-weight: 400; font-display: swap;
  src: url("../fonts/caudex-400-italic-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-20C4, U+2113, U+2C60-2C7F,
      U+A720-A7FF;
}

/* Space Grotesk is shipped as one variable file per subset (wght 300–700). */

@font-face {
  font-family: "Space Grotesk"; font-style: normal; font-weight: 300 700; font-display: swap;
  src: url("../fonts/space-grotesk-var.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: "Space Grotesk"; font-style: normal; font-weight: 300 700; font-display: swap;
  src: url("../fonts/space-grotesk-var-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-20C4, U+2113, U+2C60-2C7F,
      U+A720-A7FF;
}

/* 02. Design tokens ---------------------------------------------------------
   The brand palette is fixed; surfaces, text and lines are semantic so the day
   skin only has to re-point the semantic layer. */

:root {
  /* brand */
  --c-abyss: #081118; --c-ink: #0f222d; --c-ink-2: #16323f; --c-teal: #254b59; --c-cream: #ebe7d9;
  --c-butter: #fff5d0; --c-clay: #b42101; --c-clay-2: #d9542f; --c-moss: #7fa88b; --c-blush: #fbd3c0;
  /* surfaces */
  --bg: var(--c-ink); --bg-deep: var(--c-abyss); --surface: rgba(255, 255, 255, 0.045);
  --bg-mesh-1: rgba(37, 75, 89, 0.55); --bg-mesh-2: rgba(127, 168, 139, 0.13); --bg-mesh-3: rgba(180, 33, 1, 0.16);
  --surface-2: rgba(255, 255, 255, 0.072); --surface-3: rgba(255, 255, 255, 0.105);
  --surface-solid: #15303d; --surface-solid-2: #1b3b4a; --glass-bg: rgba(15, 34, 45, 0.62);
  --glass-bg-strong: rgba(11, 26, 34, 0.9); --glass-blur: saturate(170%) blur(20px);
  /* text */
  --text: #ece9de; --text-2: #a7b3b6; --text-3: #8b999c; --text-invert: #0f222d; --placeholder: #93a1a4;
  /* lines */
  --line: rgba(235, 231, 217, 0.12); --line-2: rgba(235, 231, 217, 0.2);
  --line-strong: rgba(235, 231, 217, 0.34);
  /* accent */
  --accent: var(--c-clay); --accent-2: var(--c-clay-2); --accent-ink: #fff6f1; --accent-text: #ff9d7a;
  --accent-hover: #f6b096; --accent-grad: linear-gradient(135deg, #b42101 0%, #bd2c0c 62%, #d9542f 100%);
  --accent-soft: rgba(217, 84, 47, 0.14); --ok: var(--c-moss); --ok-text: #b8d7c2;
  --ok-soft: rgba(127, 168, 139, 0.14); --warn: var(--c-butter); --danger-text: #ffc2b2;
  --focus-ring: var(--accent-text);
  /* type */
  --font-display: "Caudex", "Iowan Old Style", Georgia, "Times New Roman", serif;
  --font-body: "Space Grotesk", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --fs-hero: clamp(2.15rem, 1.1rem + 4.35vw, 4.35rem); --fs-h1: clamp(1.85rem, 1.15rem + 2.4vw, 3rem);
  --fs-h2: clamp(1.5rem, 1.1rem + 1.5vw, 2.2rem); --fs-h3: clamp(1.18rem, 1.02rem + 0.65vw, 1.55rem);
  --fs-h4: clamp(1.02rem, 0.96rem + 0.3vw, 1.2rem); --fs-body: clamp(0.975rem, 0.94rem + 0.16vw, 1.06rem);
  --fs-small: 0.875rem; --fs-micro: 0.75rem; --lh-body: 1.72; --track-display: -0.012em;
  --track-eyebrow: 0.3em;
  /* space */
  --s-3xs: 0.35rem; --s-2xs: 0.55rem; --s-xs: 0.85rem; --s-sm: 1.25rem; --s-md: 1.9rem; --s-lg: 3rem;
  --s-xl: clamp(3rem, 2rem + 4vw, 5.5rem); --s-section: clamp(3.25rem, 2rem + 5vw, 6.5rem);
  /* radii */
  --r-xs: 8px; --r-sm: 12px; --r-md: 16px; --r-lg: 22px; --r-xl: 30px; --r-2xl: 40px; --r-pill: 999px;
  /* shadows */
  --sh-1: 0 1px 2px rgba(3, 8, 11, 0.32); --sh-2: 0 10px 26px -14px rgba(3, 8, 11, 0.62);
  --sh-3: 0 24px 60px -30px rgba(3, 8, 11, 0.72); --sh-4: 0 40px 96px -44px rgba(3, 8, 11, 0.8);
  --sh-inset: inset 0 1px 0 rgba(255, 255, 255, 0.06);
  --sh-glow: 0 0 0 1px rgba(217, 84, 47, 0.38), 0 14px 40px -20px rgba(180, 33, 1, 0.62);
  /* motion */
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1); --ease-out: cubic-bezier(0.16, 1, 0.3, 1); --dur: 260ms;
  --dur-lg: 460ms;
  /* layout */
  --shell: 1300px; --shell-wide: 1560px; --shell-narrow: 880px; --shell-prose: 68ch;
  --gutter: clamp(1.1rem, 4vw, 2.75rem); --header-h: 74px; --header-h-sm: 62px;
  /* paint helpers */
  --field-bg: rgba(255, 255, 255, 0.04); --field-bg-hover: rgba(255, 255, 255, 0.06); --media-bg: #0b1a22;
  color-scheme: dark;
}

/* 03. Day skin --------------------------------------------------------------
   Activated by [data-theme="day"] on <html>. The light-preference media query
   below is the no-JS first-visit fallback; site.js writes an explicit value as
   soon as it runs, so there is no flash for returning visitors. */

:root[data-theme="day"] {
  --bg: #f3efe4; --bg-deep: #e8e2d3; --surface: rgba(15, 34, 45, 0.04);
  --bg-mesh-1: rgba(37, 75, 89, 0.12); --bg-mesh-2: rgba(127, 168, 139, 0.16); --bg-mesh-3: rgba(180, 33, 1, 0.07);
  --surface-2: rgba(15, 34, 45, 0.065); --surface-3: rgba(15, 34, 45, 0.1); --surface-solid: #fbf8ee;
  --surface-solid-2: #fffdf6; --glass-bg: rgba(243, 239, 228, 0.72);
  --glass-bg-strong: rgba(248, 245, 236, 0.94); --text: #14252d; --text-2: #4d5f66; --text-3: #63747a;
  --text-invert: #f7f3e8; --placeholder: #5f7177; --line: rgba(15, 34, 45, 0.14);
  --line-2: rgba(15, 34, 45, 0.22); --line-strong: rgba(15, 34, 45, 0.4); --accent-text: #a8401f;
  --accent-hover: #8a3216; --accent-ink: #fff8f3; --accent-soft: rgba(180, 33, 1, 0.1); --ok-text: #2f6448;
  --ok-soft: rgba(63, 112, 82, 0.12); --danger-text: #8c2a12; --sh-1: 0 1px 2px rgba(15, 34, 45, 0.08);
  --sh-2: 0 10px 26px -18px rgba(15, 34, 45, 0.24); --sh-3: 0 24px 60px -34px rgba(15, 34, 45, 0.28);
  --sh-4: 0 40px 96px -46px rgba(15, 34, 45, 0.32); --sh-inset: inset 0 1px 0 rgba(255, 255, 255, 0.7);
  --sh-glow: 0 0 0 1px rgba(180, 33, 1, 0.24), 0 14px 40px -22px rgba(180, 33, 1, 0.32);
  --field-bg: rgba(255, 255, 255, 0.72); --field-bg-hover: #fffdf6; --media-bg: #e2ddce;
  color-scheme: light;
}

/* No stored preference yet: follow the OS light preference. site.js keeps this
   in sync by setting data-theme explicitly on first interaction. */

@media (prefers-color-scheme: light) {
  :root:not([data-theme]) {
    --bg: #f3efe4; --bg-deep: #e8e2d3; --surface: rgba(15, 34, 45, 0.04);
    --bg-mesh-1: rgba(37, 75, 89, 0.12); --bg-mesh-2: rgba(127, 168, 139, 0.16); --bg-mesh-3: rgba(180, 33, 1, 0.07);
    --surface-2: rgba(15, 34, 45, 0.065); --surface-3: rgba(15, 34, 45, 0.1); --surface-solid: #fbf8ee;
    --surface-solid-2: #fffdf6; --glass-bg: rgba(243, 239, 228, 0.72);
    --glass-bg-strong: rgba(248, 245, 236, 0.94); --text: #14252d; --text-2: #4d5f66; --text-3: #63747a;
    --text-invert: #f7f3e8; --placeholder: #5f7177; --line: rgba(15, 34, 45, 0.14);
    --line-2: rgba(15, 34, 45, 0.22); --line-strong: rgba(15, 34, 45, 0.4); --accent-text: #a8401f;
    --accent-hover: #8a3216; --ok-text: #2f6448; --danger-text: #8c2a12;
    --field-bg: rgba(255, 255, 255, 0.72); --field-bg-hover: #fffdf6; color-scheme: light;
  }
}

/* 04. Reset and base -------------------------------------------------------- */

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

html {
  -webkit-text-size-adjust: 100%; text-size-adjust: 100%;
  scrollbar-gutter: stable; scroll-behavior: smooth;
}

body {
  margin: 0; min-height: 100svh; display: flex; flex-direction: column; font-family: var(--font-body);
  font-size: var(--fs-body); line-height: var(--lh-body); color: var(--text); background-color: var(--bg);
  position: relative; isolation: isolate;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility; overflow-x: hidden;
}

/* Mesh-gradient canvas matching the live theme: teal wash top-left, moss
   top-right, clay glow bottom-left, over a vertical base gradient. Fixed so
   content scrolls over it. */

body::before {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
      radial-gradient(58rem 42rem at 12% -8%, var(--bg-mesh-1) 0%, transparent 62%),
      radial-gradient(46rem 40rem at 108% 12%, var(--bg-mesh-2) 0%, transparent 60%),
      radial-gradient(48rem 44rem at -6% 104%, var(--bg-mesh-3) 0%, transparent 58%),
      linear-gradient(180deg, var(--bg) 0%, var(--bg-deep) 100%);
}

.site-main { flex: 1 0 auto; min-width: 0; }

img, svg, video, canvas { display: block; max-width: 100%; }

img { height: auto; border-style: none; }

button, input, select, textarea { font: inherit; color: inherit; margin: 0; }

button { cursor: pointer; background: none; border: 0; padding: 0; }

/* Lists default to unstyled because almost every list in the chrome is a nav
   or a card list; .prose puts markers and indentation back. */

ul, ol { margin: 0; padding: 0; list-style: none; }

p { margin: 0 0 var(--s-xs); text-wrap: pretty; }

p:last-child, ul:last-child, ol:last-child { margin-bottom: 0; }

a {
  color: var(--accent-text); text-decoration-thickness: 1px; text-underline-offset: 0.18em;
  transition: color var(--dur) var(--ease);
}

a:hover { color: var(--accent-hover); }

strong, b { font-weight: 600; }

hr { border: 0; border-top: 1px solid var(--line); margin-block: var(--s-md); }

::selection { background: rgba(217, 84, 47, 0.38); color: var(--text); }

:root[data-theme="day"] ::selection { background: rgba(180, 33, 1, 0.22); }

/* Consistent keyboard affordance everywhere, including custom controls. */

:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
  outline: 2px solid var(--focus-ring); outline-offset: 3px; border-radius: var(--r-xs);
}

/* Hide the UA outline only when we know a visible ring replaces it. */

:where(a, button, input, select, textarea, summary):focus:not(:focus-visible) { outline: none; }

[hidden] { display: none !important; }

/* Sticky header means anchors need breathing room. */

[id] { scroll-margin-top: calc(var(--header-h) + 1rem); }

@supports (scrollbar-width: thin) {
  html { scrollbar-width: thin; scrollbar-color: var(--line-strong) transparent; }
}

/* 05. Typography ------------------------------------------------------------ */

h1, h2, h3, h4, h5, h6 {
  margin: 0 0 0.5em; font-family: var(--font-display); font-weight: 400; line-height: 1.14;
  letter-spacing: var(--track-display); color: var(--text); text-wrap: balance;
}

h1 { font-size: var(--fs-h1); line-height: 1.06; }

h2 { font-size: var(--fs-h2); line-height: 1.12; }

h3 { font-size: var(--fs-h3); line-height: 1.2; }

h4 { font-size: var(--fs-h4); line-height: 1.3; }

h5, h6 {
  font-family: var(--font-body); font-size: var(--fs-small); font-weight: 600; line-height: 1.4;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-2);
}

/* Fluid display sizes usable on any element. */

.display {
  font-family: var(--font-display); font-size: var(--fs-hero); line-height: 1.02;
  letter-spacing: var(--track-display); text-wrap: balance;
}

.lead {
  font-size: clamp(1.02rem, 0.95rem + 0.4vw, 1.22rem); line-height: 1.6; color: var(--text-2);
  max-width: 56ch;
}

/* The tracked, uppercase label used above headings and in the header. */

.eyebrow {
  display: flex; align-items: center; gap: 0.7rem; margin: 0 0 var(--s-2xs); font-family: var(--font-body);
  font-size: 0.72rem; font-weight: 500; letter-spacing: var(--track-eyebrow); line-height: 1.4;
  text-transform: uppercase; color: var(--accent-text);
}

.eyebrow::before {
  content: ""; inline-size: 1.6rem; block-size: 1px; background: currentColor; opacity: 0.7;
  flex: 0 0 auto;
}

.eyebrow--plain::before { display: none; }

.muted { color: var(--text-2); }

.micro {
  font-size: var(--fs-micro); letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-3);
}

/* 06. Layout and utilities -------------------------------------------------- */

.container { width: 100%; max-width: var(--shell); margin-inline: auto; padding-inline: var(--gutter); }

.container--wide { max-width: var(--shell-wide); }

.container--narrow { max-width: var(--shell-narrow); }

.page { padding-block: clamp(1.75rem, 1rem + 3vw, 4rem) var(--s-section); }

.page--narrow { max-width: var(--shell-narrow); margin-inline: auto; }

.section { position: relative; padding-block: var(--s-section); }

.section--tight { padding-block: var(--s-xl); }

.section--flush-top { padding-top: 0; }

.section--rule { border-top: 1px solid var(--line); }

.stack { display: grid; gap: var(--s-sm); align-content: start; }

.stack--tight { gap: var(--s-2xs); }

.stack--loose { gap: var(--s-md); }

.cluster { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-xs); }

.cluster--between { justify-content: space-between; }

.cluster--end { justify-content: flex-end; }

.split, .product-layout { display: grid; gap: var(--s-md); align-items: start; }

.grid {
  display: grid; gap: var(--s-sm); grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
}

.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: clamp(1rem, 3vw, 1.6rem);
}

.divider { border: 0; border-top: 1px solid var(--line); margin-block: var(--s-sm); }

.sr-only {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0, 0, 0, 0); clip-path: inset(50%); white-space: nowrap; border: 0;
}

/* Keyboard users land here first; it is off-screen until focused. */

.skip-link {
  position: fixed; top: 0.75rem; left: 0.75rem; z-index: 400; display: inline-flex; align-items: center;
  gap: 0.5rem; padding: 0.7rem 1.1rem; border-radius: var(--r-pill); background: var(--c-butter);
  color: var(--c-ink); font-size: 0.82rem; font-weight: 600; letter-spacing: 0.06em;
  text-transform: uppercase; text-decoration: none; box-shadow: var(--sh-2);
  transform: translateY(calc(-100% - 1rem)); transition: transform var(--dur) var(--ease);
}

.skip-link:focus-visible { transform: translateY(0); color: var(--c-ink); }

/* Shared media treatment: covers, rounded, with a faint inner keyline so
   photography does not blend into the dark canvas. */

.media { position: relative; overflow: hidden; background: var(--media-bg); border-radius: var(--r-lg); }

.media > img, .media > picture > img { width: 100%; height: 100%; object-fit: cover; }

.media::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06); pointer-events: none;
}

:root[data-theme="day"] .media::after { box-shadow: inset 0 0 0 1px rgba(15, 34, 45, 0.08); }

/* 07. Buttons and badges ---------------------------------------------------- */

.btn {
  --btn-bg: var(--surface-2); --btn-fg: var(--text); --btn-border: var(--line-2); position: relative;
  display: inline-flex; align-items: center; justify-content: center; gap: 0.55em; min-height: 46px;
  padding: 0.78rem 1.4rem; border: 1px solid var(--btn-border); border-radius: var(--r-pill);
  background: var(--btn-bg); color: var(--btn-fg); font-family: var(--font-body); font-size: 0.92rem;
  font-weight: 500; line-height: 1.2; letter-spacing: 0.04em; text-align: center; text-decoration: none;
  white-space: nowrap; cursor: pointer; isolation: isolate;
  transition: background-color var(--dur) var(--ease), border-color var(--dur) var(--ease), color
      var(--dur) var(--ease), box-shadow var(--dur) var(--ease), transform var(--dur) var(--ease);
}

.btn:hover { color: var(--btn-fg); border-color: var(--line-strong); background: var(--surface-3); }

.btn:active { transform: translateY(1px); }

.btn[disabled], .btn[aria-disabled="true"], .btn.is-disabled {
  opacity: 0.45; cursor: not-allowed; transform: none; box-shadow: none;
}

.btn--primary {
  --btn-bg: var(--accent-grad); --btn-fg: var(--accent-ink); --btn-border: transparent; font-weight: 600;
  box-shadow: var(--sh-2), var(--sh-inset);
}

/* A soft top sheen keeps the clay gradient from reading as flat. */

.btn--primary::before {
  content: ""; position: absolute; inset: 1px 1px auto; height: 45%; border-radius: inherit;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.14), transparent); pointer-events: none;
  z-index: -1;
}

.btn--primary:hover {
  background: var(--accent-grad); color: var(--accent-ink); border-color: transparent;
  box-shadow: var(--sh-glow), var(--sh-inset); transform: translateY(-1px);
  filter: saturate(1.06) brightness(1.04);
}

.btn--ghost { --btn-bg: transparent; --btn-fg: var(--text); --btn-border: var(--line-2); }

.btn--ghost:hover { background: var(--surface); border-color: var(--line-strong); color: var(--text); }

.btn--butter {
  --btn-bg: var(--c-butter); --btn-fg: var(--c-ink); --btn-border: transparent; font-weight: 600;
}

.btn--butter:hover { background: #fffbe6; color: var(--c-ink); }

.btn--small {
  min-height: 38px; padding: 0.5rem 0.95rem; font-size: 0.8rem; letter-spacing: 0.06em; gap: 0.4em;
}

.btn--block { display: flex; width: 100%; }

.btn--icon { min-height: 44px; inline-size: 44px; padding: 0; border-radius: 50%; }

.btn.is-added {
  border-color: rgba(127, 168, 139, 0.55); background: var(--ok-soft); color: var(--ok-text);
}

.btn[aria-busy="true"] { cursor: progress; opacity: 0.72; }

.btn-row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-xs); }

.badge {
  display: inline-flex; align-items: center; gap: 0.35em; padding: 0.28em 0.7em;
  border: 1px solid var(--line-2); border-radius: var(--r-pill); background: var(--surface-2);
  color: var(--text-2); font-family: var(--font-body); font-size: 0.7rem; font-weight: 500;
  letter-spacing: 0.12em; line-height: 1.5; text-transform: uppercase; white-space: nowrap;
  vertical-align: middle;
}

.badge--accent {
  background: var(--accent-soft); border-color: rgba(217, 84, 47, 0.42); color: var(--accent-text);
}

.badge--moss {
  background: var(--ok-soft); border-color: rgba(127, 168, 139, 0.4); color: var(--ok-text);
}

.badge--muted { background: transparent; color: var(--text-3); }

.badge--solid { background: var(--c-cream); border-color: transparent; color: var(--c-ink); }

:root[data-theme="day"] .badge--accent { border-color: rgba(180, 33, 1, 0.35); }

.tool-link, .nav__link, .cart-link, .nav-toggle, .drawer__close, .footer__col a, .pagination a, .pagination span {
  -webkit-tap-highlight-color: transparent;
}

/* 08. Forms ---------------------------------------------------------------- */

.field { display: grid; gap: 0.4rem; min-width: 0; align-content: start; }

.field__label, label.field__label {
  display: flex; align-items: center; gap: 0.4rem; font-size: 0.78rem; font-weight: 500;
  letter-spacing: 0.1em; line-height: 1.4; text-transform: uppercase; color: var(--text-2);
}

.field__req { color: var(--accent-text); }

.field__hint { font-size: 0.8rem; line-height: 1.5; color: var(--text-3); }

.input, .select, .textarea {
  width: 100%; min-height: 46px; padding: 0.7rem 0.95rem; border: 1px solid var(--line-2);
  border-radius: var(--r-sm); background-color: var(--field-bg); color: var(--text);
  font-family: var(--font-body); font-size: 0.95rem; line-height: 1.45; box-shadow: var(--sh-1);
  transition: background-color var(--dur) var(--ease), border-color var(--dur) var(--ease), box-shadow
      var(--dur) var(--ease);
}

.input::placeholder, .textarea::placeholder { color: var(--placeholder); opacity: 1; }

.input:hover, .select:hover, .textarea:hover {
  background-color: var(--field-bg-hover); border-color: var(--line-strong);
}

.input:focus, .select:focus, .textarea:focus {
  outline: none; border-color: rgba(217, 84, 47, 0.7); background-color: var(--field-bg-hover);
  box-shadow: 0 0 0 3px rgba(217, 84, 47, 0.18);
}

:root[data-theme="day"] .input:focus, :root[data-theme="day"] .select:focus, :root[data-theme="day"] .textarea:focus {
  border-color: rgba(180, 33, 1, 0.72); box-shadow: 0 0 0 3px rgba(180, 33, 1, 0.14);
}

.input[disabled], .select[disabled], .textarea[disabled], .input[readonly] {
  opacity: 0.62; cursor: not-allowed; background-color: var(--surface);
}

.textarea { min-height: 9rem; resize: vertical; }

.select {
  appearance: none; -webkit-appearance: none; padding-right: 2.75rem;
  background-image:
      url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5 6 6.5 11 1.5' fill='none' stroke='%23a7b3b6' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 1rem center; background-size: 12px 8px;
  cursor: pointer;
}

:root[data-theme="day"] .select {
  background-image:
      url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5 6 6.5 11 1.5' fill='none' stroke='%234d5f66' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

.select option { background: var(--surface-solid); color: var(--text); }

input[type="file"] { padding: 0.55rem; font-size: 0.85rem; color: var(--text-2); }

input[type="file"]::file-selector-button {
  margin-right: 0.75rem; padding: 0.45rem 0.8rem; border: 1px solid var(--line-2);
  border-radius: var(--r-pill); background: var(--surface-2); color: var(--text); font: inherit;
  font-size: 0.82rem; cursor: pointer;
}

/* Error states are driven by aria-invalid so they survive any markup change. */

.input[aria-invalid="true"], .textarea[aria-invalid="true"], .select[aria-invalid="true"], .field--error .input, .field--error .select, .field--error .textarea {
  border-color: rgba(217, 84, 47, 0.72); background-color: rgba(180, 33, 1, 0.06);
}

.input[aria-invalid="true"]:focus, .field--error .input:focus {
  box-shadow: 0 0 0 3px rgba(217, 84, 47, 0.24);
}

.form-error {
  display: flex; align-items: flex-start; gap: 0.5rem; margin: 0; padding: 0.6rem 0.8rem;
  border: 1px solid rgba(217, 84, 47, 0.45); border-radius: var(--r-xs);
  background: rgba(180, 33, 1, 0.12); color: var(--danger-text); font-size: 0.86rem; line-height: 1.5;
}

.form-error::before {
  content: "!"; display: grid; place-items: center; flex: 0 0 auto; inline-size: 1.05rem;
  block-size: 1.05rem; margin-top: 0.12rem; border-radius: 50%; background: rgba(217, 84, 47, 0.9);
  color: #fff6f1; font-size: 0.68rem; font-weight: 700; line-height: 1;
}

:root[data-theme="day"] .form-error {
  background: rgba(180, 33, 1, 0.07); border-color: rgba(180, 33, 1, 0.4);
}

.form-grid {
  display: grid; gap: var(--s-sm); grid-template-columns: minmax(0, 1fr); align-items: start;
}

.form-grid__full { grid-column: 1 / -1; }

.form-actions {
  display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-xs); margin-top: var(--s-sm);
}

.form-note { font-size: 0.8rem; color: var(--text-3); }

fieldset { min-width: 0; margin: 0; padding: 0; border: 0; }

legend {
  padding: 0; margin-bottom: var(--s-xs); font-family: var(--font-display); font-size: var(--fs-h3);
  line-height: 1.2;
}

/* Checkbox and radio share one custom control shell. The tick/dot is painted
   with background images so it works in every browser that supports
   appearance: none. */

.checkbox {
  display: flex; align-items: flex-start; gap: 0.65rem; color: var(--text-2); font-size: 0.9rem;
  line-height: 1.55; cursor: pointer;
}

.checkbox input[type="checkbox"], .checkbox input[type="radio"] {
  appearance: none; -webkit-appearance: none; flex: 0 0 auto; inline-size: 1.15rem; block-size: 1.15rem;
  margin: 0.2rem 0 0; border: 1px solid var(--line-strong); border-radius: 4px;
  background-color: var(--field-bg); background-position: center; background-repeat: no-repeat;
  cursor: pointer;
  transition: background-color var(--dur) var(--ease), border-color var(--dur) var(--ease), box-shadow
      var(--dur) var(--ease);
}

.checkbox input[type="radio"] { border-radius: 50%; }

.checkbox input[type="checkbox"]:hover, .checkbox input[type="radio"]:hover {
  border-color: var(--text-2);
}

.checkbox input[type="checkbox"]:checked {
  border-color: var(--accent); background-color: var(--accent);
  background-image:
      url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3.4 8.5l2.9 2.9 6.3-7.1' fill='none' stroke='%23fff6f1' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-size: 0.8rem 0.8rem;
}

.checkbox input[type="radio"]:checked {
  border-color: var(--accent-2);
  background-image: radial-gradient( circle at center, var(--accent-2) 0 0.3rem, transparent 0.31rem );
}

.checkbox input:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; }

.checkbox input:disabled { opacity: 0.5; cursor: not-allowed; }

.checkbox a { color: var(--accent-text); }

.checkbox:hover { color: var(--text); }

.checkbox--inline { display: inline-flex; align-items: center; }

.checkbox--inline input { margin-top: 0; }

@media (min-width: 640px) {
  .form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-sm); }

  .form-grid--tight { gap: var(--s-xs); }
}

@media (min-width: 900px) {
  .form-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* 09. Header, navigation, drawer ------------------------------------------- */

.site-header {
  position: sticky; top: 0; z-index: 120; display: flex; align-items: center; block-size: var(--header-h);
  background: var(--glass-bg); -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur); border-bottom: 1px solid var(--line);
  transition: block-size var(--dur) var(--ease), background-color var(--dur) var(--ease), border-color
      var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}

.site-header.is-condensed {
  block-size: var(--header-h-sm); background: var(--glass-bg-strong); border-bottom-color: var(--line-2);
  box-shadow: var(--sh-2);
}

.site-header__inner {
  display: flex; align-items: center; gap: clamp(0.75rem, 2vw, 1.75rem); min-block-size: 100%;
}

.brand {
  display: inline-flex; align-items: center; gap: 0.7rem; flex: 0 0 auto; color: var(--text);
  text-decoration: none; transition: opacity var(--dur) var(--ease);
}

.brand:hover { color: var(--text); opacity: 0.9; }

.brand__mark {
  inline-size: 44px; block-size: 44px; object-fit: contain;
  filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.35));
  transition: inline-size var(--dur) var(--ease), block-size var(--dur) var(--ease);
}

.site-header.is-condensed .brand__mark { inline-size: 34px; block-size: 34px; }

.brand__name {
  font-family: var(--font-display); font-size: 1.02rem; letter-spacing: 0.24em; line-height: 1.1;
  text-transform: uppercase; white-space: nowrap;
}

.nav { display: none; margin-inline: auto; }

.nav__list { display: flex; align-items: center; gap: 0.15rem; }

.nav__item { position: relative; }

.nav__link {
  position: relative; display: inline-flex; align-items: center; gap: 0.4rem; min-height: 40px;
  padding: 0.55rem 0.78rem; border: 1px solid transparent; border-radius: var(--r-pill);
  background: transparent; color: var(--text-2); font-family: var(--font-body); font-size: 0.8rem;
  font-weight: 500; letter-spacing: 0.1em; line-height: 1.2; text-decoration: none;
  text-transform: uppercase; white-space: nowrap;
  transition: color var(--dur) var(--ease), background-color var(--dur) var(--ease), border-color
      var(--dur) var(--ease);
}

.nav__link:hover, .nav__link:focus-visible, .nav__link[aria-expanded="true"], .nav__item.is-open > .nav__link {
  color: var(--text); background: var(--surface);
}

.nav__link[aria-current="page"], .nav__link.is-active { color: var(--text); }

.nav__link[aria-current="page"]::after {
  content: ""; position: absolute; inset-inline-start: 50%; inset-block-end: 0.12rem; inline-size: 4px;
  block-size: 4px; border-radius: 50%; background: var(--accent-2); translate: -50% 0;
}

.nav__chev {
  inline-size: 6px; block-size: 6px; margin-top: -0.22rem; border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor; transform: rotate(45deg);
  transition: transform var(--dur) var(--ease);
}

.nav__link[aria-expanded="true"] .nav__chev { transform: rotate(225deg); margin-top: 0.15rem; }

.nav__dropdown {
  position: absolute; inset-block-start: calc(100% + 0.7rem); inset-inline-start: 50%; z-index: 130;
  min-inline-size: 15rem; max-inline-size: 21rem; padding: 0.55rem; border: 1px solid var(--line-2);
  border-radius: var(--r-lg); background: var(--glass-bg-strong);
  -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur); box-shadow: var(--sh-3);
  opacity: 0; visibility: hidden; transform: translate(-50%, -0.4rem);
  transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease), visibility var(--dur)
      var(--ease);
}

.nav__dropdown a {
  display: block; padding: 0.55rem 0.75rem; border-radius: var(--r-sm); color: var(--text-2);
  font-size: 0.9rem; letter-spacing: 0; line-height: 1.35; text-decoration: none; text-transform: none;
  transition: color var(--dur) var(--ease), background-color var(--dur) var(--ease);
}

.nav__dropdown a:hover, .nav__dropdown a:focus-visible {
  color: var(--text); background: var(--surface-2);
}

.nav__sub {
  margin: 0.1rem 0 0.25rem 0.4rem; padding-inline-start: 0.55rem;
  border-inline-start: 1px solid var(--line);
}

.nav__sub a { padding: 0.4rem 0.65rem; color: var(--text-3); font-size: 0.84rem; }

.nav__item.is-open > .nav__dropdown { opacity: 1; visibility: visible; transform: translate(-50%, 0); }

@media (hover: hover) and (pointer: fine) {
  .nav__item--has-menu:hover > .nav__dropdown {
    opacity: 1; visibility: visible; transform: translate(-50%, 0);
  }
}

.header-tools { display: flex; align-items: center; gap: 0.3rem; margin-inline-start: auto; }

.tool-link {
  display: inline-flex; align-items: center; min-height: 40px; padding: 0.5rem 0.7rem;
  border-radius: var(--r-pill); color: var(--text-2); font-size: 0.78rem; letter-spacing: 0.1em;
  text-decoration: none; text-transform: uppercase; white-space: nowrap;
  transition: color var(--dur) var(--ease), background-color var(--dur) var(--ease);
}

.tool-link:hover { color: var(--text); background: var(--surface); }

.cart-link {
  display: inline-flex; align-items: center; gap: 0.5rem; min-height: 44px;
  padding: 0.35rem 0.45rem 0.35rem 0.85rem; border: 1px solid var(--line-2); border-radius: var(--r-pill);
  background: var(--surface); color: var(--text); font-size: 0.78rem; letter-spacing: 0.1em;
  text-decoration: none; text-transform: uppercase; white-space: nowrap;
  transition: border-color var(--dur) var(--ease), background-color var(--dur) var(--ease);
}

.cart-link:hover { color: var(--text); border-color: var(--line-strong); background: var(--surface-2); }

.cart-link__label { line-height: 1; }

.cart-count {
  display: inline-grid; place-items: center; min-inline-size: 1.5rem; block-size: 1.5rem;
  padding-inline: 0.3rem; border-radius: var(--r-pill); background: var(--accent); color: #fff6f1;
  font-size: 0.7rem; font-weight: 600; font-variant-numeric: tabular-nums; line-height: 1;
  transition: transform var(--dur) var(--ease), background-color var(--dur) var(--ease);
}

.cart-count[data-empty="true"] { background: var(--surface-3); color: var(--text-2); }

.cart-count.is-bump { animation: cart-bump 420ms var(--ease); }

@keyframes cart-bump {
  0% { transform: scale(1); }

  35% { transform: scale(1.28); }

  100% { transform: scale(1); }
}

.nav-toggle {
  display: inline-grid; place-items: center; inline-size: 44px; block-size: 44px;
  border: 1px solid var(--line-2); border-radius: 50%; background: var(--surface); color: var(--text);
  transition: background-color var(--dur) var(--ease), border-color var(--dur) var(--ease);
}

.nav-toggle:hover { background: var(--surface-2); border-color: var(--line-strong); }

.nav-toggle__bars {
  position: relative; inline-size: 18px; block-size: 2px; border-radius: 2px; background: currentColor;
  transition: background-color 160ms var(--ease);
}

.nav-toggle__bars::before, .nav-toggle__bars::after {
  content: ""; position: absolute; inset-inline-start: 0; inline-size: 18px; block-size: 2px;
  border-radius: 2px; background: currentColor; transition: transform var(--dur) var(--ease);
}

.nav-toggle__bars::before { top: -6px; }

.nav-toggle__bars::after { top: 6px; }

.nav-toggle[aria-expanded="true"] .nav-toggle__bars { background: transparent; }

.nav-toggle[aria-expanded="true"] .nav-toggle__bars::before { transform: translateY(6px) rotate(45deg); }

.nav-toggle[aria-expanded="true"] .nav-toggle__bars::after {
  transform: translateY(-6px) rotate(-45deg);
}

.overlay {
  position: fixed; inset: 0; z-index: 190; background: rgba(4, 10, 14, 0.6);
  -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); opacity: 0; pointer-events: none;
  transition: opacity var(--dur-lg) var(--ease);
}

.overlay.is-open { opacity: 1; pointer-events: auto; }

.drawer {
  position: fixed; inset-block: 0; inset-inline-end: 0; z-index: 200; display: flex;
  flex-direction: column; inline-size: min(88vw, 400px); block-size: 100dvh;
  border-inline-start: 1px solid var(--line-2); background: var(--glass-bg-strong);
  -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur); box-shadow: var(--sh-4);
  visibility: hidden; transform: translateX(100%);
  transition: transform var(--dur-lg) var(--ease), visibility 0s linear var(--dur-lg);
}

.drawer.is-open {
  visibility: visible; transform: translateX(0);
  transition: transform var(--dur-lg) var(--ease), visibility 0s linear 0s;
}

.drawer__head {
  display: flex; align-items: center; justify-content: space-between; gap: var(--s-xs);
  padding: 0.9rem 1.1rem; border-bottom: 1px solid var(--line); font-family: var(--font-display);
  font-size: 0.86rem; letter-spacing: 0.26em; text-transform: uppercase; color: var(--text-2);
}

.drawer__close {
  display: grid; place-items: center; inline-size: 40px; block-size: 40px; border: 1px solid var(--line-2);
  border-radius: 50%; background: var(--surface); color: var(--text); font-size: 1.35rem; line-height: 1;
  transition: background-color var(--dur) var(--ease), border-color var(--dur) var(--ease);
}

.drawer__close:hover { background: var(--surface-2); border-color: var(--line-strong); }

.drawer__body {
  flex: 1 1 auto; overflow-y: auto; overscroll-behavior: contain; padding: 0.5rem 1.1rem 2rem;
}

.drawer-nav > li > a, .drawer-nav summary {
  display: flex; align-items: center; justify-content: space-between; gap: var(--s-xs);
  padding: 0.85rem 0.25rem; border-bottom: 1px solid var(--line); color: var(--text); font-size: 1.02rem;
  letter-spacing: 0.01em; text-decoration: none; cursor: pointer; transition: color var(--dur) var(--ease);
}

.drawer-nav > li > a:hover, .drawer-nav summary:hover { color: var(--accent-text); }

.drawer-nav summary { list-style: none; }

.drawer-nav summary::-webkit-details-marker { display: none; }

.drawer-nav summary::after {
  content: ""; inline-size: 8px; block-size: 8px; border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor; transform: rotate(45deg);
  transition: transform var(--dur) var(--ease);
}

.drawer-nav details[open] summary::after { transform: rotate(225deg); }

.drawer-nav details > ul {
  padding: 0.35rem 0 0.6rem 0.85rem; border-inline-start: 1px solid var(--line);
  margin-inline-start: 0.25rem;
}

.drawer-nav details > ul a {
  display: block; padding: 0.5rem 0.25rem; color: var(--text-2); font-size: 0.94rem; text-decoration: none;
}

.drawer-nav details > ul a:hover { color: var(--text); }

body.nav-open { overflow: hidden; }

html.nav-open { overflow: hidden; }

/* Desktop navigation replaces the hamburger at 1000px. */

@media (min-width: 1000px) {
  .nav { display: block; }

  .nav-toggle { display: none; }

  .site-header__inner { gap: 2rem; }

  .brand__name { font-size: 1.08rem; }
}

/* Phones drop the textual account link from the header; the drawer carries it. */

@media (max-width: 519.98px) {
  .site-header .tool-link { display: none; }

  .cart-link { padding-inline-start: 0.7rem; }
}

/* 10. Hero and section furniture ------------------------------------------- */

.hero { position: relative; padding-block: clamp(2rem, 1rem + 5vw, 4.5rem) var(--s-section); }

.hero__inner { display: grid; gap: clamp(1.75rem, 4vw, 3rem); align-items: center; }

.hero__title {
  margin: 0 0 var(--s-sm); font-family: var(--font-display); font-size: var(--fs-hero); font-weight: 400;
  line-height: 1.02; letter-spacing: var(--track-display); text-wrap: balance;
}

.hero__title em { font-style: italic; color: var(--c-blush); }

:root[data-theme="day"] .hero__title em { color: var(--c-clay); }

.hero__lead {
  max-width: 46ch; margin: 0; color: var(--text-2); font-size: clamp(1rem, 0.94rem + 0.35vw, 1.18rem);
  line-height: 1.65;
}

.hero__actions {
  display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-xs); margin-top: var(--s-md);
}

.hero__media {
  position: relative; overflow: hidden; aspect-ratio: 4 / 5; border: 1px solid var(--line);
  border-radius: var(--r-2xl); background: var(--media-bg); box-shadow: var(--sh-3);
}

.hero__media img { inline-size: 100%; block-size: 100%; object-fit: cover; }

.hero__media::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08); pointer-events: none;
}

.hero__caption {
  position: absolute; inset-inline: 1rem; inset-block-end: 1rem; padding: 0.7rem 0.9rem;
  border: 1px solid var(--line-2); border-radius: var(--r-md); background: var(--glass-bg-strong);
  -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur); color: var(--text-2);
  font-size: 0.8rem; line-height: 1.5;
}

@media (min-width: 900px) {
  .hero__inner {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); gap: clamp(2rem, 5vw, 5rem);
  }

  .hero__media { aspect-ratio: 5 / 6; }
}

/* Section headings pair an eyebrow with a title and an optional action. */

.section-head {
  display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: var(--s-sm);
  margin-bottom: var(--s-md);
}

.section-head__text { max-width: 62ch; }

.section-head h2, .section-head h1 { margin-bottom: 0; }

.section-head p { margin: 0.4rem 0 0; color: var(--text-2); }

.section-head__action { flex: 0 0 auto; }

.page-head { max-width: var(--shell-narrow); margin-bottom: var(--s-md); }

.page-head h1 { margin-bottom: var(--s-xs); }

.page-head p { max-width: 60ch; color: var(--text-2); }

.breadcrumbs {
  display: flex; flex-wrap: wrap; align-items: center; gap: 0.45rem; margin-bottom: var(--s-xs);
  color: var(--text-3); font-size: 0.8rem; letter-spacing: 0.04em;
}

.breadcrumbs li { display: inline-flex; align-items: center; gap: 0.45rem; }

.breadcrumbs li + li::before { content: "/"; color: var(--line-strong); }

.breadcrumbs a { color: var(--text-2); text-decoration: none; }

.breadcrumbs a:hover { color: var(--text); }

/* 11. Product grid and cards ------------------------------------------------ */

.product-grid {
  display: grid; grid-template-columns: minmax(0, 1fr); gap: clamp(1rem, 2.5vw, 2rem); margin: 0;
  padding: 0; list-style: none;
}

.product-card {
  position: relative; display: flex; flex-direction: column; overflow: hidden;
  border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface);
  container-type: inline-size;
  transition: transform var(--dur) var(--ease), border-color var(--dur) var(--ease), background-color
      var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}

.product-card:hover, .product-card:focus-within {
  border-color: var(--line-2); background: var(--surface-2); box-shadow: var(--sh-3);
  transform: translateY(-4px);
}

.product-card__media {
  position: relative; display: block; overflow: hidden; aspect-ratio: 4 / 5; background: var(--media-bg);
}

.product-card__media img {
  inline-size: 100%; block-size: 100%; object-fit: cover; transition: transform var(--dur-lg) var(--ease);
}

.product-card:hover .product-card__media img, .product-card:focus-within .product-card__media img {
  transform: scale(1.045);
}

/* Bottom shade keeps badges and titles legible over bright photography. */

.product-card__media::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 55%, rgba(8, 17, 24, 0.4)); opacity: 0;
  transition: opacity var(--dur) var(--ease); pointer-events: none;
}

.product-card:hover .product-card__media::after { opacity: 1; }

.product-card__media .badge {
  position: absolute; inset-block-start: 0.75rem; inset-inline-start: 0.75rem; z-index: 2;
  box-shadow: var(--sh-1);
}

.product-card__body {
  display: flex; flex: 1 1 auto; flex-direction: column; gap: 0.3rem; padding: 0.95rem 1rem 1.1rem;
}

.product-card__title {
  margin: 0; font-family: var(--font-display); font-size: 1.06rem; font-weight: 400; line-height: 1.3;
  letter-spacing: var(--track-display);
}

.product-card__title a { color: var(--text); text-decoration: none; }

.product-card__title a:hover { color: var(--accent-text); }

.product-card__meta {
  color: var(--text-3); font-size: 0.78rem; letter-spacing: 0.08em; text-transform: uppercase;
}

.product-card__footer {
  display: flex; align-items: center; justify-content: space-between; gap: 0.6rem; margin-top: auto;
  padding-top: 0.55rem;
}

.product-card__add {
  display: inline-flex; align-items: center; justify-content: center; inline-size: 2.25rem;
  block-size: 2.25rem; border: 1px solid var(--line-2); border-radius: 50%; background: var(--surface);
  color: var(--text);
  transition: background-color var(--dur) var(--ease), border-color var(--dur) var(--ease), transform
      var(--dur) var(--ease);
}

.product-card__add:hover {
  background: var(--accent); border-color: transparent; color: var(--accent-ink); transform: scale(1.06);
}

.price {
  display: inline-flex; flex-wrap: wrap; align-items: baseline; gap: 0.5rem; color: var(--text);
  font-size: 0.98rem; font-weight: 500; font-variant-numeric: tabular-nums; letter-spacing: 0.02em;
}

.price--was, .price del {
  color: var(--text-3); font-size: 0.85em; font-weight: 400; text-decoration: line-through;
  text-decoration-thickness: 1px; text-decoration-color: var(--line-strong);
}

.price--sale, .price ins { color: var(--accent-text); text-decoration: none; }

.product-card .price { font-size: 0.92rem; }

@container (min-width: 300px) {
  .product-card__body { padding: 1.15rem 1.25rem 1.3rem; }

  .product-card__title { font-size: 1.16rem; }
}

/* Two-up on small phones, three at tablet, four on desktop. */

@media (min-width: 520px) {
  .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 900px) {
  .product-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (min-width: 1200px) {
  .product-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }

  .product-grid--three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* Gallery beside the summary from 760px; thumbs stay under the image so the
   summary column keeps its full width. */

@media (min-width: 760px) {
  .split, .product-layout {
    display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
    gap: clamp(1.5rem, 4vw, 3.5rem); align-items: start;
  }
}

/* 12. Product gallery, swatches, quantity ---------------------------------- */

.product-gallery { display: grid; gap: var(--s-xs); align-content: start; }

.product-gallery__main {
  position: relative; overflow: hidden; aspect-ratio: 4 / 5; border: 1px solid var(--line);
  border-radius: var(--r-lg); background: var(--media-bg); box-shadow: var(--sh-2);
}

.product-gallery__main img { inline-size: 100%; block-size: 100%; object-fit: cover; }

.product-gallery__main::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06); pointer-events: none;
}

.product-gallery__thumbs {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); gap: 0.55rem; padding: 0;
  list-style: none;
}

.product-gallery__thumb, .product-gallery__thumbs button, .product-gallery__thumbs a {
  display: block; overflow: hidden; padding: 0; aspect-ratio: 1 / 1; border: 1px solid var(--line);
  border-radius: var(--r-sm); background: var(--media-bg); opacity: 0.68; cursor: pointer;
  transition: opacity var(--dur) var(--ease), border-color var(--dur) var(--ease), box-shadow var(--dur)
      var(--ease);
}

.product-gallery__thumbs img { inline-size: 100%; block-size: 100%; object-fit: cover; }

.product-gallery__thumb:hover, .product-gallery__thumbs button:hover, .product-gallery__thumbs a:hover {
  opacity: 1; border-color: var(--line-strong);
}

.product-gallery__thumb[aria-current="true"], .product-gallery__thumb.is-active, .product-gallery__thumbs [aria-selected="true"] {
  opacity: 1; border-color: var(--accent-2); box-shadow: 0 0 0 2px rgba(217, 84, 47, 0.28);
}

:root[data-theme="day"] .product-gallery__thumb[aria-current="true"], :root[data-theme="day"] .product-gallery__thumbs [aria-selected="true"] {
  box-shadow: 0 0 0 2px rgba(180, 33, 1, 0.2);
}

/* Colour swatches: the hex comes from the database via an inline background
   colour on .swatch, so only the shell and states live here. */

.swatches { display: flex; flex-wrap: wrap; align-items: center; gap: 0.55rem; }

.swatch {
  position: relative; inline-size: 2rem; block-size: 2rem; padding: 0;
  border: 1px solid var(--line-strong); border-radius: 50%; background-color: var(--surface-2);
  cursor: pointer; transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}

.swatch:hover { transform: scale(1.08); }

.swatch:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 3px; }

.swatch[aria-checked="true"], .swatch[aria-pressed="true"], .swatch.is-active {
  box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--text);
}

/* Unavailable colourway: faded, struck through, and visibly inert. */

.swatch:disabled, .swatch[aria-disabled="true"], .swatch.is-disabled {
  cursor: not-allowed; opacity: 0.38; transform: none;
}

.swatch:disabled::after, .swatch[aria-disabled="true"]::after, .swatch.is-disabled::after {
  content: ""; position: absolute; inset: -1px; border-radius: 50%;
  background: linear-gradient( 45deg, transparent calc(50% - 1px), var(--text-2) calc(50% - 1px),
      var(--text-2) calc(50% + 1px), transparent calc(50% + 1px) );
  pointer-events: none;
}

.swatch-option { display: inline-flex; align-items: center; gap: 0.5rem; }

.swatch-label { color: var(--text-2); font-size: 0.82rem; letter-spacing: 0.04em; }

.quantity { display: flex; flex-wrap: wrap; align-items: center; gap: 0.7rem; }

.qty {
  display: inline-flex; align-items: stretch; overflow: hidden; border: 1px solid var(--line-2);
  border-radius: var(--r-pill); background: var(--surface);
}

.qty button, .qty__btn {
  display: grid; place-items: center; inline-size: 2.75rem; min-block-size: 44px; border: 0;
  background: transparent; color: var(--text); font-size: 1.05rem; line-height: 1; cursor: pointer;
  transition: background-color var(--dur) var(--ease), color var(--dur) var(--ease);
}

.qty button:hover, .qty__btn:hover { background: var(--surface-2); }

.qty button:active, .qty__btn:active { background: var(--surface-3); }

.qty button[disabled], .qty__btn[disabled] { opacity: 0.4; cursor: not-allowed; }

.qty__input, .qty input[type="number"] {
  inline-size: 3.25rem; min-block-size: 44px; padding: 0.4rem 0; border: 0;
  border-inline: 1px solid var(--line); background: transparent; color: var(--text);
  font-family: var(--font-body); font-size: 0.95rem; font-variant-numeric: tabular-nums;
  text-align: center; appearance: textfield; -moz-appearance: textfield;
}

.qty__input:focus, .qty input[type="number"]:focus {
  outline: none; background: var(--surface-2); box-shadow: inset 0 0 0 2px rgba(217, 84, 47, 0.4);
}

.qty__input::-webkit-outer-spin-button, .qty__input::-webkit-inner-spin-button, .qty input[type="number"]::-webkit-outer-spin-button, .qty input[type="number"]::-webkit-inner-spin-button {
  margin: 0; -webkit-appearance: none;
}

.qty--sm button, .qty--sm .qty__btn { inline-size: 2.1rem; min-block-size: 36px; }

.qty--sm .qty__input, .qty--sm input[type="number"] {
  inline-size: 2.5rem; min-block-size: 36px; font-size: 0.86rem;
}

.product-buy {
  display: grid; gap: var(--s-sm); margin-block: var(--s-sm); padding-block: var(--s-sm);
  border-block: 1px solid var(--line);
}

.product-buy__row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-xs); }

.product-summary { display: grid; gap: var(--s-xs); align-content: start; }

.product-summary h1 { margin-bottom: 0; }

.product-summary .price { font-size: 1.2rem; }

.product-summary__meta {
  display: flex; flex-wrap: wrap; gap: var(--s-xs); color: var(--text-3); font-size: 0.8rem;
  letter-spacing: 0.06em; text-transform: uppercase;
}

/* 13. Cart and totals ------------------------------------------------------ */

.cart-layout { display: grid; gap: var(--s-md); align-items: start; }

.cart-list { display: grid; gap: var(--s-sm); padding: 0; list-style: none; }

.cart-line {
  display: grid; grid-template-columns: 84px minmax(0, 1fr); gap: 0.9rem; padding: 0.9rem;
  border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface);
  align-items: start;
  transition: background-color var(--dur) var(--ease), border-color var(--dur) var(--ease);
}

.cart-line:hover, .cart-line:focus-within { background: var(--surface-2); border-color: var(--line-2); }

.cart-line__media {
  display: block; overflow: hidden; aspect-ratio: 1 / 1; border: 1px solid var(--line);
  border-radius: var(--r-sm); background: var(--media-bg);
}

.cart-line__media img { inline-size: 100%; block-size: 100%; object-fit: cover; }

.cart-line__body { display: grid; gap: 0.3rem; min-width: 0; }

.cart-line__title { margin: 0; font-family: var(--font-display); font-size: 1.02rem; line-height: 1.3; }

.cart-line__title a { color: var(--text); text-decoration: none; }

.cart-line__title a:hover { color: var(--accent-text); }

.cart-line__options, .cart-line__meta { color: var(--text-3); font-size: 0.8rem; line-height: 1.5; }

.cart-line__price { color: var(--text); font-size: 0.92rem; font-variant-numeric: tabular-nums; }

.cart-line__controls {
  display: flex; flex-wrap: wrap; align-items: center; gap: 0.65rem; margin-top: 0.4rem;
}

.cart-line__remove {
  color: var(--text-3); font-size: 0.76rem; letter-spacing: 0.08em; text-decoration: none;
  text-transform: uppercase; border-bottom: 1px solid transparent;
  transition: color var(--dur) var(--ease), border-color var(--dur) var(--ease);
}

.cart-line__remove:hover { color: var(--accent-text); border-bottom-color: currentColor; }

.cart-line__side {
  display: flex; grid-column: 2; align-items: center; justify-content: space-between; gap: 0.5rem;
  justify-self: stretch;
}

.cart-totals {
  display: grid; gap: 0.35rem; padding: clamp(1rem, 3vw, 1.6rem); border: 1px solid var(--line-2);
  border-radius: var(--r-lg); background: var(--surface); box-shadow: var(--sh-2);
}

.cart-totals h2, .cart-totals h3 { margin-bottom: 0.5rem; font-size: var(--fs-h3); }

.cart-total__row {
  display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; padding-block: 0.2rem;
  color: var(--text-2); font-size: 0.92rem;
}

.cart-total__row > :last-child {
  color: var(--text); font-variant-numeric: tabular-nums; white-space: nowrap;
}

.cart-total__row--grand {
  margin-top: 0.45rem; padding-top: 0.85rem; border-top: 1px solid var(--line-2);
  font-family: var(--font-display); font-size: 1.12rem; color: var(--text);
}

.cart-total__row--grand > :last-child { font-size: 1.4rem; line-height: 1.1; }

.cart-total__row--discount > :last-child { color: var(--ok-text); }

.cart-totals form { display: flex; gap: 0.5rem; margin-block: 0.5rem; }

.cart-totals form .input { flex: 1 1 auto; min-width: 0; }

.cart-totals .btn { flex: 0 0 auto; }

@media (min-width: 640px) {
  .cart-line { grid-template-columns: 96px minmax(0, 1fr) auto; gap: 1.1rem; padding: 1rem; }

  .cart-line__side {
    grid-column: auto; flex-direction: column; align-items: flex-end; justify-content: flex-start;
    min-inline-size: 7.5rem;
  }
}

@media (min-width: 900px) {
  .cart-layout { grid-template-columns: minmax(0, 1.55fr) minmax(300px, 0.85fr); gap: var(--s-lg); }

  .cart-totals { position: sticky; top: calc(var(--header-h-sm) + 1rem); }
}

/* 14. Checkout ------------------------------------------------------------- */

.checkout { display: grid; gap: var(--s-md); align-items: start; }

.checkout__main, .checkout__aside { display: grid; gap: var(--s-sm); min-width: 0; }

.checkout-panel {
  padding: clamp(1rem, 3vw, 1.6rem); border: 1px solid var(--line); border-radius: var(--r-lg);
  background: var(--surface);
}

.checkout-panel > h2, .checkout-panel > h3, .checkout-panel > legend {
  margin-bottom: var(--s-xs); font-size: var(--fs-h3);
}

.checkout-panel p.muted { font-size: 0.88rem; }

.checkout-steps {
  display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem 1rem; margin: 0 0 var(--s-md);
  padding: 0; list-style: none; color: var(--text-3); font-size: 0.74rem; letter-spacing: 0.1em;
  text-transform: uppercase;
}

.checkout-step { display: inline-flex; align-items: center; gap: 0.5rem; }

.checkout-step__num {
  display: grid; place-items: center; inline-size: 1.5rem; block-size: 1.5rem;
  border: 1px solid var(--line-2); border-radius: 50%; font-size: 0.7rem; letter-spacing: 0;
}

.checkout-step[aria-current="step"] { color: var(--text); }

.checkout-step[aria-current="step"] .checkout-step__num {
  border-color: transparent; background: var(--accent); color: #fff6f1;
}

.checkout-step.is-complete { color: var(--text-2); }

.checkout-step.is-complete .checkout-step__num {
  border-color: transparent; background: var(--ok-soft); color: var(--ok-text);
}

.shipping-options { display: grid; gap: 0.6rem; margin-block: 0.5rem; }

.shipping-option {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 0.75rem; align-items: start;
  padding: 0.85rem 1rem; border: 1px solid var(--line-2); border-radius: var(--r-md);
  background: var(--field-bg); color: var(--text-2); font-size: 0.92rem; cursor: pointer;
  transition: border-color var(--dur) var(--ease), background-color var(--dur) var(--ease);
}

.shipping-option:hover { border-color: var(--line-strong); background: var(--field-bg-hover); }

.shipping-option:has(input:checked) {
  border-color: rgba(217, 84, 47, 0.6); background: var(--accent-soft);
}

.shipping-option input { margin-top: 0.25rem; }

.shipping-option__name { color: var(--text); font-weight: 500; }

.shipping-option__note { display: block; color: var(--text-3); font-size: 0.8rem; }

.shipping-option__price { color: var(--text); font-variant-numeric: tabular-nums; white-space: nowrap; }

.summary-card {
  padding: clamp(1rem, 3vw, 1.5rem); border: 1px solid var(--line-2); border-radius: var(--r-lg);
  background: var(--surface); box-shadow: var(--sh-2);
}

@media (min-width: 900px) {
  .checkout { grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.75fr); gap: var(--s-lg); }

  .checkout__aside { position: sticky; top: calc(var(--header-h-sm) + 1rem); }
}

/* 15. Prose, policy and long-form pages ------------------------------------ */

.prose {
  max-width: var(--shell-prose); color: var(--text); font-size: clamp(1rem, 0.97rem + 0.15vw, 1.08rem);
  line-height: 1.78;
}

.prose > :first-child { margin-top: 0; }

.prose > * + * { margin-top: var(--s-sm); }

.prose h2 { margin-top: var(--s-lg); font-size: var(--fs-h2); }

.prose h3 { margin-top: var(--s-md); font-size: var(--fs-h3); }

.prose h4 { margin-top: var(--s-sm); }

.prose p { margin: 0; }

.prose a {
  color: var(--accent-text); text-decoration: underline; text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

.prose a:hover { color: var(--accent-hover); }

.prose ul, .prose ol { padding-inline-start: 1.35em; list-style: disc; }

.prose ol { list-style: decimal; }

.prose li + li { margin-top: 0.4em; }

.prose li::marker { color: var(--accent-text); }

.prose blockquote {
  margin-inline: 0; padding: var(--s-xs) var(--s-sm); border-inline-start: 3px solid var(--accent-2);
  border-radius: 0 var(--r-sm) var(--r-sm) 0; background: var(--surface); color: var(--text);
  font-family: var(--font-display); font-size: 1.12em; font-style: italic; line-height: 1.6;
}

.prose img { width: auto; max-width: 100%; margin-block: var(--s-md); border-radius: var(--r-lg); }

.prose figure { margin: var(--s-md) 0; }

.prose figcaption { margin-top: 0.5rem; color: var(--text-3); font-size: 0.82rem; }

.prose table { width: 100%; border-collapse: collapse; font-size: 0.92rem; }

.prose th, .prose td {
  padding: 0.6rem 0.7rem; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top;
}

.prose th {
  color: var(--text-3); font-size: 0.75rem; font-weight: 500; letter-spacing: 0.08em;
  text-transform: uppercase;
}

.prose code {
  padding: 0.12em 0.4em; border: 1px solid var(--line); border-radius: 6px; background: var(--surface-2);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.88em;
}

.prose pre {
  overflow-x: auto; padding: var(--s-xs); border: 1px solid var(--line); border-radius: var(--r-sm);
  background: var(--bg-deep);
}

.prose pre code { padding: 0; border: 0; background: none; }

.prose hr { margin-block: var(--s-lg); }

/* Page-intro paragraphs on policy/404 pages sit under the h1. */

.page--narrow > p { max-width: 56ch; color: var(--text-2); }

.page--narrow > .btn { margin-top: var(--s-sm); }

/* 16. Footer --------------------------------------------------------------- */

.site-footer {
  position: relative; margin-top: var(--s-section); overflow: hidden; border-top: 1px solid var(--line);
  background: linear-gradient(180deg, transparent, var(--bg-deep) 55%);
}

.site-footer::before {
  content: ""; position: absolute; inset-block-start: -30%; inset-inline-start: 50%;
  inline-size: min(70rem, 110vw); block-size: 20rem; translate: -50% 0; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(217, 84, 47, 0.1), transparent); pointer-events: none;
}

.footer__grid {
  display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s-md) var(--s-sm);
  padding-block: var(--s-xl) var(--s-lg);
}

.footer__brand { max-width: 32ch; }

.footer__name {
  display: block; margin-bottom: 0.6rem; font-family: var(--font-display); font-size: 1.3rem;
  letter-spacing: 0.22em; line-height: 1.2; text-transform: uppercase;
}

.footer__brand p { color: var(--text-2); font-size: 0.92rem; }

.footer__small { margin-top: 0.6rem; color: var(--text-3); font-size: 0.8rem; line-height: 1.6; }

.footer__col h2 {
  margin: 0 0 0.8rem; font-family: var(--font-body); font-size: 0.72rem; font-weight: 500;
  letter-spacing: 0.18em; text-transform: uppercase; color: var(--text-3);
}

.footer__col ul { display: grid; gap: 0.45rem; }

.footer__col a {
  color: var(--text-2); font-size: 0.9rem; text-decoration: none; transition: color var(--dur) var(--ease);
}

.footer__col a:hover { color: var(--text); }

.footer__bottom {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 0.6rem var(--s-sm); padding-block: var(--s-sm); border-top: 1px solid var(--line);
  color: var(--text-3); font-size: 0.78rem;
}

.footer__bottom p { margin: 0; }

.footer__social { display: inline-flex; flex-wrap: wrap; gap: var(--s-xs); }

.footer__social a {
  color: var(--text-2); text-decoration: none; letter-spacing: 0.06em; text-transform: uppercase;
  font-size: 0.74rem;
}

.footer__social a:hover { color: var(--text); }

@media (min-width: 520px) {
  .footer__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  .footer__brand { grid-column: 1 / -1; max-width: 46ch; }
}

@media (min-width: 900px) {
  .footer__grid {
    grid-template-columns: minmax(0, 1.35fr) repeat(3, minmax(0, 0.8fr)); gap: var(--s-md);
  }

  .footer__brand { grid-column: auto; max-width: 34ch; }
}

/* 17. Flashes and notices -------------------------------------------------- */

.flash {
  display: flex; align-items: flex-start; gap: 0.6rem; margin-block: var(--s-sm); padding: 0.85rem 1.1rem;
  border: 1px solid var(--line-2); border-inline-start: 3px solid var(--text-2);
  border-radius: var(--r-sm); background: var(--surface-2); color: var(--text); font-size: 0.92rem;
  line-height: 1.55; box-shadow: var(--sh-1);
}

.flash--error {
  border-color: rgba(217, 84, 47, 0.45); border-inline-start-color: var(--accent-2);
  background: rgba(180, 33, 1, 0.14); color: var(--danger-text);
}

.flash--success {
  border-color: rgba(127, 168, 139, 0.4); border-inline-start-color: var(--c-moss);
  background: var(--ok-soft); color: var(--ok-text);
}

.flash--info { border-inline-start-color: var(--c-butter); }

:root[data-theme="day"] .flash--error { background: rgba(180, 33, 1, 0.08); }

:root[data-theme="day"] .flash { color: var(--text); }

:root[data-theme="day"] .flash--success { color: var(--ok-text); }

/* Preview banner is rendered by the layout above <main>. */

.preview-banner {
  padding: 0.5rem var(--gutter); background: var(--c-butter); color: var(--c-ink); font-size: 0.8rem;
  letter-spacing: 0.05em; text-align: center;
}

/* 18. Admin shell ---------------------------------------------------------- */

.admin {
  display: grid; grid-template-columns: minmax(0, 1fr); min-height: 100vh; background: var(--bg);
}

.admin-sidebar {
  position: sticky; top: 0; z-index: 50; display: flex; flex-direction: column; gap: var(--s-sm);
  padding: var(--s-sm); border-bottom: 1px solid var(--line); background: var(--bg-deep);
}

.admin-nav { display: grid; gap: 0.1rem; }

.admin-nav a {
  display: flex; align-items: center; gap: 0.5rem; padding: 0.6rem 0.8rem; border-radius: var(--r-sm);
  color: var(--text-2); font-size: 0.88rem; text-decoration: none; white-space: nowrap;
  transition: color var(--dur) var(--ease), background-color var(--dur) var(--ease);
}

.admin-nav a:hover { color: var(--text); background: var(--surface); }

.admin-nav a[aria-current="page"], .admin-nav a.is-active {
  color: var(--text); background: var(--surface-2); box-shadow: inset 2px 0 0 var(--accent-2);
}

.admin-main { min-width: 0; padding: clamp(1rem, 3vw, 2rem); }

.admin-header {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s-sm);
  margin-bottom: var(--s-md); padding-bottom: var(--s-xs); border-bottom: 1px solid var(--line);
}

.admin-header h1 { margin: 0; font-size: var(--fs-h2); }

.admin-card {
  padding: clamp(1rem, 2.5vw, 1.5rem); border: 1px solid var(--line); border-radius: var(--r-md);
  background: var(--surface); box-shadow: var(--sh-1);
}

.admin-card + .admin-card { margin-top: var(--s-sm); }

.admin-card h2, .admin-card h3 { font-size: var(--fs-h4); margin-bottom: var(--s-xs); }

.admin-card__head {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s-xs);
  margin-bottom: var(--s-sm);
}

.admin-card--flush { padding: 0; overflow: hidden; }

.table-wrap {
  overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface);
  -webkit-overflow-scrolling: touch;
}

.admin-table { width: 100%; border-collapse: collapse; font-size: 0.88rem; }

.admin-table caption {
  padding: 0.7rem 0.9rem; color: var(--text-3); font-size: 0.8rem; text-align: left;
}

.admin-table th {
  padding: 0.7rem 0.65rem; border-bottom: 1px solid var(--line-2); background: var(--surface);
  color: var(--text-3); font-size: 0.7rem; font-weight: 500; letter-spacing: 0.1em; text-align: left;
  text-transform: uppercase; white-space: nowrap;
}

.admin-table td {
  padding: 0.7rem 0.65rem; border-bottom: 1px solid var(--line); color: var(--text-2); vertical-align: top;
}

.admin-table td:first-child, .admin-table td strong { color: var(--text); }

.admin-table tbody tr:last-child td { border-bottom: 0; }

.admin-table tbody tr:hover { background: var(--surface); }

.admin-table .num, .admin-table .is-numeric {
  text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap;
}

.admin-table a { color: var(--accent-text); text-decoration: none; }

.admin-table a:hover { text-decoration: underline; }

.stat-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 0.75rem;
  margin-bottom: var(--s-sm);
}

.stat {
  display: grid; gap: 0.25rem; align-content: start; padding: 1rem 1.1rem; border: 1px solid var(--line);
  border-radius: var(--r-md); background: var(--surface);
}

.stat__label, .stat dt {
  color: var(--text-3); font-size: 0.7rem; letter-spacing: 0.12em; text-transform: uppercase;
}

.stat__value, .stat dd {
  margin: 0; font-family: var(--font-display); font-size: clamp(1.45rem, 1.15rem + 0.8vw, 1.95rem);
  line-height: 1.1; color: var(--text); font-variant-numeric: tabular-nums;
}

.stat__meta { color: var(--text-3); font-size: 0.78rem; }

.stat__trend--up { color: var(--ok-text); }

.stat__trend--down { color: var(--accent-text); }

@media (max-width: 999.98px) {
  .admin-sidebar { position: static; gap: var(--s-xs); padding: 0.7rem var(--s-sm); }

  .admin-nav {
    grid-auto-flow: column; grid-auto-columns: max-content; overflow-x: auto; padding-bottom: 0.2rem;
    scrollbar-width: none;
  }

  .admin-nav::-webkit-scrollbar { display: none; }

  .admin-nav a { padding: 0.5rem 0.7rem; font-size: 0.82rem; }
}

@media (min-width: 1000px) {
  .admin { grid-template-columns: 260px minmax(0, 1fr); align-items: start; }

  .admin-sidebar {
    block-size: 100dvh; overflow-y: auto; padding: var(--s-sm); border-inline-end: 1px solid var(--line);
    border-bottom: 0;
  }

  .admin-nav { grid-auto-flow: row; }

  .stat-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* 19. Errors, empty states, pagination ------------------------------------ */

.empty-state {
  padding: var(--s-xl) var(--s-sm); border: 1px dashed var(--line-2); border-radius: var(--r-lg);
  background: var(--surface); color: var(--text-2); text-align: center;
}

.empty-state h2 { margin-bottom: var(--s-2xs); font-size: var(--fs-h3); }

.empty-state p { max-width: 46ch; margin-inline: auto; }

.pagination {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 0.35rem;
  margin-top: var(--s-lg); padding: 0; list-style: none;
}

.pagination a, .pagination span {
  display: inline-grid; place-items: center; min-inline-size: 2.5rem; block-size: 2.5rem;
  padding-inline: 0.6rem; border: 1px solid var(--line); border-radius: var(--r-pill);
  background: var(--surface); color: var(--text-2); font-size: 0.84rem; text-decoration: none;
  transition: color var(--dur) var(--ease), background-color var(--dur) var(--ease), border-color
      var(--dur) var(--ease);
}

.pagination a:hover {
  color: var(--text); border-color: var(--line-strong); background: var(--surface-2);
}

.pagination [aria-current="page"], .pagination .is-active {
  border-color: transparent; background: var(--text); color: var(--text-invert);
}

.pagination .is-disabled, .pagination [aria-disabled="true"] { opacity: 0.4; pointer-events: none; }

/* 20. Motion, print, display quirks --------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  *, *::before, *::after {
    animation-duration: 0.01ms !important; animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important; scroll-behavior: auto !important;
  }

  .product-card:hover, .btn--primary:hover, .swatch:hover { transform: none; }

  .product-card:hover .product-card__media img, .product-card:focus-within .product-card__media img {
    transform: none;
  }

  .cart-count.is-bump { animation: none; }
}

/* Tablet portrait: a wider drawer and roomier panels once the phone stack has
   already resolved. */

@media (min-width: 700px) {
  .drawer { inline-size: min(420px, 78vw); }

  .checkout-panel, .cart-totals { padding: var(--s-md); }

  .section-head { align-items: flex-end; }
}

/* Very small phones (≤359px): protect the header and titles from overflow. */

@media (max-width: 359px) {
  :root { --gutter: 0.9rem; }

  .brand__mark { inline-size: 36px; block-size: 36px; }

  .brand__name { font-size: 0.9rem; letter-spacing: 0.16em; }

  .cart-link__label { display: none; }

  .hero__title { font-size: clamp(1.9rem, 1rem + 5vw, 2.4rem); }

  .product-gallery__thumbs { grid-template-columns: repeat(auto-fill, minmax(56px, 1fr)); }
}

/* Dense laptop header: tighter nav before the drawer breakpoint. */

@media (min-width: 1000px) and (max-width: 1199.98px) {
  .nav__link { padding-inline: 0.58rem; font-size: 0.74rem; letter-spacing: 0.08em; }

  .site-header__inner { gap: 1rem; }
}

/* Large desktops get airier rhythm but keep the 1300px reading shell. */

@media (min-width: 1600px) {
  :root { --s-section: 7rem; }

  .hero__inner { gap: 6rem; }

  .product-grid { gap: 2.5rem; }

  .container--wide { max-width: var(--shell-wide); }
}

@media print {
  body::before, .site-header, .site-footer, .drawer, .overlay, .skip-link, .flash, .nav-toggle, .admin-sidebar {
    display: none !important;
  }

  body { background: #fff !important; color: #111; font-size: 11pt; }

  a { color: #111; text-decoration: underline; }

  .container, .page, .checkout, .admin, .admin-main {
    display: block; max-width: none; padding: 0; margin: 0;
  }

  .cart-totals, .summary-card, .checkout-panel, .admin-card {
    border: 1px solid #ccc; box-shadow: none; background: #fff; break-inside: avoid;
  }

  .admin-table th, .admin-table td { border-bottom: 1px solid #ccc; color: #111; background: #fff; }
}

/* ==========================================================================
   21. Completion layer — classes used by the templates that the first pass
   did not cover. Kept last so it can rely on the tokens and primitives above.
   ========================================================================== */

body.site { background: var(--bg); color: var(--text); }

/* Header: the Products trigger is a button, not a link. */
.nav__link--button {
  background: none; border: 0; padding: 0; font: inherit; color: inherit;
  cursor: pointer; display: inline-flex; align-items: center; gap: 0.4rem;
}
.nav__link--button:hover { color: var(--cream, var(--text)); }

.breadcrumb {
  display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem;
  margin: 0 0 var(--s-sm); font-size: var(--fs-small); color: var(--text-2);
}
.breadcrumb a { color: var(--text-2); text-decoration: none; }
.breadcrumb a:hover { color: var(--text); text-decoration: underline; }

/* Home */
.hero__statement { max-width: 44rem; }
.hero__note { color: var(--text-2); font-size: var(--fs-body); max-width: 38rem; }
.section__narrow { max-width: var(--shell-narrow); margin-inline: auto; }
.section__head {
  display: flex; align-items: baseline; justify-content: space-between; gap: var(--s-sm);
  margin-bottom: var(--s-md); flex-wrap: wrap;
}
.section__head h2 { margin: 0; }

.story {
  display: grid; gap: var(--s-lg);
  grid-template-columns: minmax(0, 0.6fr) minmax(0, 1.6fr) minmax(0, 1fr);
  align-items: start;
}
.story__label { position: sticky; top: calc(var(--header-h) + 1rem); }
.story__body h2 { margin-top: 0; }
.story__body h3 { margin-top: var(--s-md); }
.story__media { margin: 0; }
.story__media img { width: 100%; height: auto; border-radius: var(--r-lg); }

.commission-band {
  background: linear-gradient(135deg, rgba(37, 75, 89, 0.55), rgba(15, 34, 45, 0.2));
  border-block: 1px solid var(--line);
}
.commission-band__inner {
  display: flex; align-items: center; justify-content: space-between; gap: var(--s-lg);
  flex-wrap: wrap;
}
.commission-band__inner h2 { margin: 0.2rem 0 0.6rem; }
.commission-band__inner p { max-width: 44rem; color: var(--text-2); }

/* Catalogue toolbar and pagination */
.catalog-toolbar {
  display: flex; align-items: center; justify-content: space-between; gap: var(--s-sm);
  padding-block: var(--s-xs); margin-bottom: var(--s-sm);
  border-bottom: 1px solid var(--line); flex-wrap: wrap;
}
.catalog-sort { display: flex; align-items: center; gap: 0.6rem; }
.catalog-sort .select { width: auto; min-width: 11rem; }

.pager { display: flex; flex-wrap: wrap; gap: 0.4rem; justify-content: center; margin-top: var(--s-lg); }
.pager__item {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 2.5rem; height: 2.5rem; padding-inline: 0.6rem;
  border: 1px solid var(--line); border-radius: var(--r-sm);
  color: var(--text-2); text-decoration: none; font-size: var(--fs-small);
}
.pager__item:hover { border-color: var(--line-strong); color: var(--text); }
.pager__item--current {
  background: var(--accent); border-color: var(--accent); color: var(--accent-ink);
  font-weight: 600;
}

/* Product page */
.product {
  display: grid; gap: clamp(1.5rem, 4vw, 3.5rem);
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  align-items: start;
}
.product__gallery { position: sticky; top: calc(var(--header-h) + 1rem); }
.product__info h1 { margin-top: 0; }
.product__lede { color: var(--text-2); font-size: 1.05rem; max-width: 38rem; }
.product__price { display: flex; align-items: baseline; gap: 0.75rem; margin: var(--s-sm) 0; }
.product__form { margin-top: var(--s-sm); }
.product__buy { display: flex; align-items: center; gap: var(--s-sm); flex-wrap: wrap; margin-top: var(--s-sm); }
.product__buy .qty { flex: 0 0 auto; }
.product__buy .btn { flex: 1 1 14rem; }
.product__note { margin-top: var(--s-xs); font-size: var(--fs-small); }

.swatch__dot {
  width: 1.6rem; height: 1.6rem; border-radius: 50%;
  background: var(--swatch, #999); border: 1px solid var(--line-strong);
  box-shadow: inset 0 0 0 2px var(--bg);
}
.swatch__label { font-size: var(--fs-small); color: var(--text-2); }

.accordion { border-top: 1px solid var(--line); margin-top: var(--s-sm); }
.accordion summary {
  cursor: pointer; padding-block: var(--s-xs); font-weight: 600;
  list-style: none; display: flex; justify-content: space-between; align-items: center;
}
.accordion summary::-webkit-details-marker { display: none; }
.accordion summary::after { content: "+"; color: var(--text-2); }
.accordion[open] summary::after { content: "–"; }
.accordion .prose { padding-bottom: var(--s-sm); }

/* Search */
.search-form {
  display: flex; gap: 0.6rem; margin: var(--s-sm) 0 var(--s-md); max-width: 44rem;
}
.search-form .input { flex: 1; }

/* Card pieces not covered above */
.product-card__placeholder {
  display: block; aspect-ratio: 1 / 1; width: 100%;
  background: var(--surface); border-radius: var(--r-md);
}
.product-card__desc {
  color: var(--text-2); font-size: var(--fs-small);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  min-height: 2.6em;
}
.product-card__row {
  display: flex; align-items: center; justify-content: space-between; gap: 0.6rem; margin-top: auto;
}
.product-card__add { margin: 0; }

/* Cart */
.cart-line__actions { display: flex; align-items: center; gap: var(--s-sm); flex-wrap: wrap; margin-top: var(--s-xs); }
.cart-line__total { margin: 0; font-weight: 600; text-align: right; white-space: nowrap; }
.link-button {
  background: none; border: 0; padding: 0; font: inherit; color: var(--text-2);
  text-decoration: underline; cursor: pointer;
}
.link-button:hover { color: var(--accent-text); }
.discount-form { margin-block: var(--s-sm); }
.btn--wide { width: 100%; justify-content: center; }
.empty {
  padding: var(--s-lg); text-align: center; color: var(--text-2);
  border: 1px dashed var(--line-2); border-radius: var(--r-lg);
}

/* Checkout */
.checkout { display: grid; gap: var(--s-lg); grid-template-columns: minmax(0, 1.4fr) minmax(18rem, 0.8fr); align-items: start; }
.checkout__main { display: grid; gap: var(--s-md); }
.checkout__section {
  padding: var(--s-md); border: 1px solid var(--line); border-radius: var(--r-lg);
  background: var(--surface);
}
.checkout__section h2 { margin-top: 0; font-size: var(--fs-h3); }
.checkout__summary {
  position: sticky; top: calc(var(--header-h) + 1rem);
  padding: var(--s-md); border: 1px solid var(--line-2); border-radius: var(--r-lg);
  background: var(--surface-2);
}
.checkout__summary h2 { margin-top: 0; font-size: var(--fs-h3); }
.checkout__items { list-style: none; margin: 0 0 var(--s-sm); padding: 0; display: grid; gap: 0.5rem; }
.checkout__items li { display: flex; justify-content: space-between; gap: var(--s-sm); font-size: var(--fs-small); }
.field--wide { grid-column: 1 / -1; }
.shipping-option__body { display: flex; flex-direction: column; gap: 0.15rem; flex: 1; }
.pay-note {
  padding: var(--s-sm); border-radius: var(--r-md);
  background: rgba(127, 168, 139, 0.1); border: 1px solid rgba(127, 168, 139, 0.32);
  margin-bottom: var(--s-sm);
}
.pay-note p { margin: 0; }

/* Panels */
.panel {
  padding: var(--s-md); border: 1px solid var(--line); border-radius: var(--r-lg);
  background: var(--surface); margin-block: var(--s-md);
}
.panel h2 { margin-top: 0; font-size: var(--fs-h3); }
.summary-list { list-style: none; margin: 0 0 var(--s-sm); padding: 0; display: grid; gap: 0.45rem; }
.summary-list li { display: flex; justify-content: space-between; gap: var(--s-sm); }

/* Contact and newsletter */
.contact-details { color: var(--text-2); }
.contact-details a { color: var(--text); }
.contact-form { margin-top: var(--s-md); }
.newsletter-signup {
  margin-top: var(--s-md); padding: var(--s-md);
  border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface);
}
.newsletter-form { display: flex; gap: 0.6rem; flex-wrap: wrap; }
.newsletter-form .input { flex: 1 1 16rem; }
.link-arrow {
  color: var(--accent-text); text-decoration: none; font-weight: 600;
  display: inline-flex; align-items: center; gap: 0.35rem;
}
.link-arrow::after { content: "→"; transition: transform var(--dur) var(--ease); }
.link-arrow:hover::after { transform: translateX(3px); }
.page__head { margin-bottom: var(--s-md); }

/* Commission */
.lede { color: var(--text-2); font-size: 1.06rem; max-width: 42rem; }
.commission-form { display: grid; gap: var(--s-lg); margin-top: var(--s-md); }
.form-section {
  padding: var(--s-md); border: 1px solid var(--line); border-radius: var(--r-lg);
  background: var(--surface);
}
.form-section legend, .form-section h2 { font-family: var(--font-display); font-size: var(--fs-h3); margin-bottom: var(--s-sm); }
.shape-cards { display: grid; gap: 0.7rem; grid-template-columns: repeat(auto-fill, minmax(9rem, 1fr)); }
.shape-card {
  position: relative; display: block; cursor: pointer;
  border: 1px solid var(--line-2); border-radius: var(--r-md); background: var(--surface);
  transition: border-color var(--dur) var(--ease), background var(--dur) var(--ease);
}
.shape-card:hover { border-color: var(--line-strong); }
.shape-card:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.shape-card__input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.shape-card__body { display: block; padding: var(--s-sm); }
.shape-card__label { display: block; font-weight: 600; }
.request-summary { display: grid; gap: 0.5rem; }
.next-steps { padding-left: 1.2rem; display: grid; gap: 0.5rem; }

/* Admin completion */
.admin-body { background: var(--bg); color: var(--text); }
.admin-content { padding: 0; }
.admin-grid { display: grid; gap: var(--s-md); grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr)); }
.admin-filters { display: flex; gap: 0.6rem; flex-wrap: wrap; align-items: end; margin-bottom: var(--s-sm); }
.admin-pre {
  background: var(--bg-deep); border: 1px solid var(--line); border-radius: var(--r-sm);
  padding: var(--s-sm); overflow: auto; font-size: var(--fs-micro); max-height: 24rem;
}
.admin-message { white-space: pre-wrap; overflow-wrap: anywhere; }
.admin-address { color: var(--text-2); line-height: 1.6; }
.admin-notes { display: grid; gap: 0.5rem; }
.admin-checklist { display: grid; gap: 0.4rem; grid-template-columns: repeat(auto-fill, minmax(12rem, 1fr)); max-height: 18rem; overflow: auto; }
.admin-image-grid { display: grid; gap: 0.6rem; grid-template-columns: repeat(auto-fill, minmax(8rem, 1fr)); }
.admin-image { display: grid; gap: 0.35rem; }
.admin-thumb { width: 48px; height: 48px; object-fit: cover; border-radius: var(--r-xs); }
.input--tiny { width: 4.5rem; padding: 0.25rem 0.4rem; font-size: var(--fs-small); }
.admin-nav__link {
  display: block; padding: 0.55rem 0.8rem; border-radius: var(--r-sm);
  color: var(--text-2); text-decoration: none; font-size: var(--fs-small);
}
.admin-nav__link:hover { color: var(--text); background: var(--surface); }
.admin-nav__link[aria-current="page"] { color: var(--text); background: var(--surface-2); }
.admin-sidebar__foot { margin-top: auto; display: grid; gap: 0.5rem; padding-top: var(--s-sm); border-top: 1px solid var(--line); }
.admin-header__user { display: flex; align-items: center; gap: var(--s-sm); }
.admin--login { display: grid; place-items: center; min-height: 100dvh; padding: var(--s-md); }
.admin--login .admin-main { width: min(26rem, 100%); }
.admin-login {
  padding: var(--s-lg); border: 1px solid var(--line); border-radius: var(--r-lg);
  background: var(--surface); box-shadow: var(--sh-2);
}
.admin-login h1 { margin-top: 0; font-size: var(--fs-h2); }

@media (max-width: 1000px) {
  .story, .product, .checkout { grid-template-columns: 1fr; }
  .product__gallery, .checkout__summary, .story__label { position: static; }
  .checkout__summary { order: -1; }
}
@media (max-width: 640px) {
  .product__buy { flex-direction: column; align-items: stretch; }
  .cart-line__total { text-align: left; }
  .commission-band__inner { align-items: flex-start; }
}

/* ==========================================================================
   22. Brand, theme switch and header tools (layout parity pass)
   ========================================================================== */

.site-header .brand { gap: 0.65rem; }
.site-header .brand__mark { width: 38px; height: 38px; object-fit: contain; }
.brand__mark--day { display: none; }
:root[data-theme="day"] .brand__mark--night { display: none; }
:root[data-theme="day"] .brand__mark--day { display: block; }

.site-header .brand__name {
  font-family: var(--font-display);
  font-size: clamp(1.05rem, 0.9rem + 0.5vw, 1.35rem);
  font-weight: 400;
  letter-spacing: 0.01em;
  text-transform: none;
  color: var(--text);
  line-height: 1;
  white-space: nowrap;
}

.header-tools { display: flex; align-items: center; gap: clamp(0.5rem, 1.2vw, 1.2rem); }
.tool-link {
  display: inline-flex; align-items: center; gap: 0.4rem;
  font-size: 0.78rem; letter-spacing: 0.04em; color: var(--text-2);
  text-decoration: none; background: none; border: 0; cursor: pointer;
  padding: 0.35rem 0; white-space: nowrap;
}
.tool-link:hover { color: var(--text); }
.tool-icon { width: 16px; height: 16px; flex: 0 0 auto; }
.theme-switch { font: inherit; }
.cart-link { display: inline-flex; align-items: center; gap: 0.45rem; text-decoration: none; }
.cart-count {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 1.35rem; height: 1.35rem; padding-inline: 0.3rem;
  border-radius: var(--r-pill); background: var(--accent); color: var(--accent-ink);
  font-size: 0.7rem; font-weight: 600;
}

@media (max-width: 1180px) {
  .tool-link span:not(.cart-count) { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .tool-icon { width: 18px; height: 18px; }
}
@media (max-width: 1000px) {
  .header-tools .tool-link--account,
  .header-tools .tool-link--wishlist,
  .header-tools .theme-switch { display: none; }
}

/* Cookie notice */
.cookie-banner {
  position: fixed; inset-inline: 0; inset-block-end: 0; z-index: var(--z-toast, 900);
  padding: 0.9rem var(--gutter); background: var(--bg-deep);
  border-top: 1px solid var(--line-2); box-shadow: var(--sh-3);
}
.cookie-banner__inner {
  max-width: var(--shell); margin-inline: auto;
  display: flex; align-items: center; justify-content: space-between; gap: var(--s-sm);
  flex-wrap: wrap;
}
.cookie-banner p { margin: 0; color: var(--text-2); font-size: var(--fs-small); }
.cookie-banner a { color: var(--text); }

/* Header typography/spacing to match the live shop */
.site-header__inner { justify-content: space-between; gap: clamp(1rem, 2.5vw, 2.25rem); }
.nav__list { gap: 0.15rem; }
.nav__link {
  text-transform: none;
  letter-spacing: 0.01em;
  font-size: 0.86rem;
  font-weight: 500;
  padding: 0.5rem 0.8rem;
}
.tool-link {
  text-transform: none;
  letter-spacing: 0.01em;
  font-size: 0.8rem;
}
@media (max-width: 1180px) {
  .nav__link { font-size: 0.8rem; letter-spacing: 0.01em; padding-inline: 0.55rem; }
}

/* Cart control matches the live circular bag + badge */
.header-tools { gap: 1.15rem; }
.cart-link {
  position: relative; width: 44px; height: 44px; border-radius: 50%;
  border: 1px solid var(--line-2); justify-content: center; gap: 0;
  color: var(--text-2);
}
.cart-link:hover { color: var(--text); border-color: var(--line-strong); }
.cart-link__label { display: none; }
.cart-link .tool-icon { width: 18px; height: 18px; }
.cart-link .cart-count {
  position: absolute; top: -3px; right: -3px; min-width: 1.15rem; height: 1.15rem;
  font-size: 0.65rem; padding-inline: 0.25rem;
}

/* Mobile header: burger left, wordmark centred, account/wishlist/cart right */
@media (max-width: 1000px) {
  .site-header__inner {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.4rem;
  }
  .nav-toggle {
    order: 1; grid-column: 1; justify-self: start;
    border: 0; background: none; border-radius: 0; width: 40px; height: 40px;
  }
  .brand { order: 2; grid-column: 2; justify-self: center; gap: 0.45rem; }
  .brand__mark { width: 30px; height: 30px; }
  .brand__name { font-size: 1.05rem; }
  .header-tools { order: 3; grid-column: 3; gap: 0.45rem; justify-self: end; }
  .header-tools .tool-link--account,
  .header-tools .tool-link--wishlist { display: inline-flex; }
  .header-tools .theme-switch { display: none; }
  .header-tools .tool-link span:not(.cart-count) { display: none; }
  .cart-link { width: 38px; height: 38px; }
  .cart-link .cart-count { top: -4px; right: -4px; }
}
@media (max-width: 480px) {
  .brand__mark { display: none; }
  .brand__name { font-size: 1.02rem; }
  .header-tools .tool-link--wishlist { display: none; }
}

/* Native colour picker in the commission form */
.input--color {
  inline-size: 100%; block-size: 3rem; padding: 0.25rem;
  background: var(--field-bg); border: 1px solid var(--line-2);
  border-radius: var(--r-sm); cursor: pointer;
}
.input--color::-webkit-color-swatch-wrapper { padding: 0; }
.input--color::-webkit-color-swatch { border: 0; border-radius: calc(var(--r-sm) - 2px); }
.input--color::-moz-color-swatch { border: 0; border-radius: calc(var(--r-sm) - 2px); }

.product__wish { margin-top: 0.75rem; }
.product__wish .btn { width: 100%; justify-content: center; }
.wishlist-manage { list-style: none; padding: 0; margin: var(--s-md) 0 0; display: grid; gap: 0.5rem; max-width: 32rem; }
.wishlist-manage li { display: flex; justify-content: space-between; align-items: center; gap: 1rem; border-bottom: 1px solid var(--line); padding-bottom: 0.5rem; }

/* Centre the cart glyph inside its circular control */
.cart-link { padding: 0; line-height: 0; display: inline-flex; align-items: center; justify-content: center; }
.cart-link .tool-icon { display: block; margin: 0; position: static; }

/* Newsletter welcome popup */
body.nl-open { overflow: hidden; }
.nl-popup { position: fixed; inset: 0; z-index: 1000; display: grid; place-items: center; padding: var(--s-md); }
.nl-popup[hidden] { display: none; }
.nl-popup__backdrop { position: absolute; inset: 0; background: rgba(4, 11, 15, 0.72); backdrop-filter: blur(4px); }
.nl-popup__panel {
  position: relative; width: min(30rem, 100%); padding: clamp(1.5rem, 4vw, 2.5rem);
  border-radius: var(--r-xl); border: 1px solid var(--line-2);
  background: var(--surface-solid, #15303d); color: var(--text);
  box-shadow: var(--sh-3, 0 30px 80px rgba(0,0,0,.5));
}
.nl-popup__panel h2 { margin: 0.3rem 0 0.7rem; font-size: var(--fs-h2); }
.nl-popup__panel p { color: var(--text-2); }
.nl-popup__form { display: flex; gap: 0.6rem; flex-wrap: wrap; margin: var(--s-sm) 0; }
.nl-popup__form .input { flex: 1 1 14rem; }
.nl-popup__close {
  position: absolute; top: 0.7rem; right: 0.7rem; width: 2rem; height: 2rem;
  border: 1px solid var(--line); border-radius: 50%; background: none; color: var(--text-2);
  font-size: 1.2rem; line-height: 1; cursor: pointer;
}
.nl-popup__note { font-size: var(--fs-small); margin: 0.5rem 0; }
.nl-popup__dismiss { color: var(--text-3); font-size: var(--fs-small); }
:root[data-theme="day"] .nl-popup__panel { background: #f7f3e8; }

/* Product reviews */
.sf-reviews { margin-top: var(--s-xl); border-top: 1px solid var(--line); padding-top: var(--s-lg); }
.sf-reviews__head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.sf-reviews__head h2 { margin: 0; }
.sf-stars { color: var(--butter, #fff5d0); letter-spacing: 0.08em; }
.sf-review-list { list-style: none; padding: 0; margin: var(--s-md) 0; display: grid; gap: var(--s-md); }
.sf-review { border-bottom: 1px solid var(--line); padding-bottom: var(--s-sm); }
.sf-review__top { display: flex; align-items: center; gap: 0.7rem; flex-wrap: wrap; }
.sf-review p { margin: 0.5rem 0 0; color: var(--text-2); }
.sf-review-form-wrap { margin-top: var(--s-md); }
.sf-review-form-wrap summary { cursor: pointer; display: inline-block; }
.sf-review-form { margin-top: var(--s-sm); display: grid; gap: var(--s-sm); max-width: 46rem; }
.sf-rating { display: flex; gap: 0.7rem; flex-wrap: wrap; }
.sf-rating label { display: inline-flex; align-items: center; gap: 0.35rem; cursor: pointer; }
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Header utility controls: readable labels with proper pill hit areas. */
.header-tools { gap: 0.3rem; }
.header-tools .tool-link {
  min-height: 40px;
  padding: 0.5rem 0.7rem;
  border-radius: var(--r-pill);
  transition: color var(--dur) var(--ease), background-color var(--dur) var(--ease);
}
.header-tools .tool-link:hover,
.header-tools .tool-link:focus-visible {
  background: var(--surface);
}
.header-tools .cart-link { margin-inline-start: 0.15rem; }
@media (max-width: 1180px) {
  .header-tools .tool-link { padding-inline: 0.62rem; }
}
@media (max-width: 519.98px) {
  .header-tools .cart-link { margin-inline-start: 0; }
}
