/* ===========================================================================
   Krila storefront
   ---------------------------------------------------------------------------
   THREE PALETTES, ONE STYLESHEET.

   The owner asked to see soft, bold and deep before choosing. They are not
   three stylesheets: every colour in this file is a token, and a theme is only
   a different set of token values on <html data-theme="...">. That means a
   layout fix lands in all three at once and they can never drift apart.

   The live theme comes from the site_theme setting, so it is changed in the
   console. Adding ?theme=bold or ?theme=deep to any URL previews another one
   without changing the setting.

   FILL COLOURS ARE NOT TEXT COLOURS. The logo red is beautiful as a button and
   fails AA as a word on ivory, so it exists twice: --accent for fills, shapes
   and borders, --accent-ink for the same colour used as letters. Contrast is
   not eyeballed here: tests/contrast.test.js measures every pair in this file
   and fails the build under 4.5:1 for body text and 3:1 for large text and
   interface edges.
   =========================================================================== */

/* --- Soft luxe: the default, and the one chosen for launch ---------------- */
:root {
  --bg: #FBF8F5;
  --surface: #FFFFFF;
  --surface-2: #F7F1EC;
  --panel: #F1E4DE;
  --panel-2: #E9D9D2;

  --ink: #221D1B;
  --ink-2: #574E49;
  --ink-3: #6E635D;
  --on-accent: #FFFFFF;

  --line: #E4DAD2;
  --line-2: #D6C9BF;
  /* The edge of a control is a user interface boundary and has to clear 3:1,
     which a decorative hairline does not. They were the same token until
     tests/contrast.test.mjs measured it at 1.6:1 and the input borders were
     effectively invisible. Two tokens now: --line-2 divides, --control outlines
     something you can click. */
  --control: #948779;
  /* Text sitting ON a panel. In the bold palette a panel is near black, so
     --ink on --panel was black on black: invisible copy that read as a blank
     hero. Every palette now states what colour words go on its panel. */
  --on-panel: #221D1B;
  --on-panel-2: #574E49;

  --accent: #C8202A;
  --accent-shape: #C8202A;
  --accent-ink: #AB1A22;
  --accent-soft: #F6E4E2;
  --accent-hover: #A5141C;

  --ok: #1F6B4B;
  --warn: #8A5A12;
  --error: #A32017;

  --focus: #1F5FBF;

  --radius: 14px;
  --radius-sm: 10px;
  --radius-pill: 999px;
  --shadow-1: 0 1px 2px rgba(34, 29, 27, .06), 0 4px 14px rgba(34, 29, 27, .05);
  --shadow-2: 0 12px 34px rgba(34, 29, 27, .12);

  --display: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  --wrap: 1240px;
  --header-h: 68px;
}

/* --- Bold: the logo's own red and black ---------------------------------- */
:root[data-theme="bold"] {
  --bg: #FFFFFF;
  --surface: #FFFFFF;
  --surface-2: #F4F4F4;
  --panel: #111111;
  --panel-2: #1D1D1D;

  --ink: #111111;
  --ink-2: #444444;
  --ink-3: #595959;
  --on-accent: #FFFFFF;

  --line: #E0E0E0;
  --line-2: #C4C4C4;
  --control: #8A8A8A;
  /* A bold panel is a black block, so the words on it are white. */
  --on-panel: #FFFFFF;
  --on-panel-2: #D8D8D8;

  --accent: #D81F26;
  --accent-shape: #D81F26;
  --accent-ink: #B8161C;
  --accent-soft: #FDECEC;
  --accent-hover: #9E1218;

  --ok: #14663F;
  --warn: #7A4E0B;
  --error: #A81C13;

  --radius: 4px;
  --radius-sm: 3px;
  --shadow-1: 0 1px 2px rgba(0, 0, 0, .08), 0 3px 10px rgba(0, 0, 0, .06);
  --shadow-2: 0 14px 34px rgba(0, 0, 0, .18);
}

/* --- Deep: charcoal and plum, an evening palette ------------------------- */
:root[data-theme="deep"] {
  --bg: #17161A;
  --surface: #201E24;
  --surface-2: #29262E;
  --panel: #3A2833;
  --panel-2: #46303D;

  --ink: #F4EFEA;
  --ink-2: #CFC5BE;
  --ink-3: #B4A9A2;
  --on-accent: #FFFFFF;

  --line: #38333C;
  --line-2: #4A434F;
  --control: #7A7182;
  --on-panel: #F4EFEA;
  --on-panel-2: #CFC5BE;

  /* White on #E23237 measures 4.43:1, which is under AA, and 3.63:1 on the
     brighter hover. A button is words, so the fill darkens; --accent-shape
     keeps the true logo red for anything that is not carrying text. */
  --accent: #C41F27;
  --accent-shape: #E23237;
  --accent-ink: #FF8A86;
  --accent-soft: #3A2226;
  --accent-hover: #AD1720;

  --ok: #6FD6A6;
  --warn: #E9BE72;
  --error: #FF938C;

  --focus: #8FB8FF;

  --shadow-1: 0 1px 2px rgba(0, 0, 0, .4), 0 6px 18px rgba(0, 0, 0, .35);
  --shadow-2: 0 16px 40px rgba(0, 0, 0, .55);
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

a { color: var(--accent-ink); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4 {
  font-family: var(--display);
  font-weight: 600;
  line-height: 1.15;
  color: var(--ink);
  margin: 0 0 .5em;
  letter-spacing: .002em;
}
h1 { font-size: clamp(2.1rem, 1.4rem + 3.2vw, 4rem); }
h2 { font-size: clamp(1.7rem, 1.2rem + 2.1vw, 2.7rem); }
h3 { font-size: clamp(1.25rem, 1.05rem + .8vw, 1.6rem); }
p { margin: 0 0 1em; }

/* Every interactive thing shows where the keyboard is. Never remove this
   without replacing it: a shopper on a keyboard loses the page otherwise. */
:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
  border-radius: 3px;
}

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.wrap-narrow { max-width: 780px; }

.kicker {
  font-size: .74rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--ink-2);
  font-weight: 600;
  margin: 0 0 .8em;
}

.section { padding: clamp(48px, 6vw, 88px) 0; }
.section-head { text-align: center; max-width: 620px; margin: 0 auto clamp(28px, 4vw, 48px); }
.section-head p { color: var(--ink-2); margin: 0; }

.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--ink); color: var(--bg);
  padding: 12px 18px; z-index: 200; border-radius: 0 0 var(--radius-sm) 0;
}
.skip-link:focus { left: 0; }

/* ===========================================================================
   Buttons
   =========================================================================== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 12px 26px;
  border: 1px solid transparent; border-radius: var(--radius-pill);
  font-family: var(--body); font-size: .95rem; font-weight: 600; letter-spacing: .01em;
  cursor: pointer; text-decoration: none; text-align: center;
  transition: background-color .18s ease, color .18s ease, border-color .18s ease, transform .12s ease;
}
.btn:hover { text-decoration: none; }
.btn:active { transform: translateY(1px); }

.btn-primary { background: var(--accent); color: var(--on-accent); }
.btn-primary:hover { background: var(--accent-hover); }

.btn-ink { background: var(--ink); color: var(--bg); }
.btn-ink:hover { background: var(--ink-2); }

.btn-outline { background: transparent; color: var(--ink); border-color: var(--control); }
.btn-outline:hover { background: var(--surface-2); border-color: var(--ink-3); }
/* On a panel the outline button borrows the panel's own text colour, or it
   vanishes wherever the panel is dark. */
.hero-copy .btn-outline, .band-copy .btn-outline {
  color: var(--on-panel); border-color: currentColor;
}
.hero-copy .btn-outline:hover, .band-copy .btn-outline:hover {
  background: color-mix(in srgb, var(--on-panel) 12%, transparent); border-color: currentColor;
}

/* Used on a bare <button> as well as on the .btn base, so it carries its own
   reset. Without it the browser's default button border drew a grey box around
   "Size chart" and "Find my size", which looked like a mistake and is one. */
.btn-quiet {
  display: inline-flex; align-items: center; gap: 6px;
  background: transparent; color: var(--accent-ink);
  border: 0; padding: 12px 8px; min-height: 44px;
  font: inherit; font-size: .88rem; font-weight: 600; cursor: pointer;
}
.btn-quiet:hover { text-decoration: underline; }

.btn-block { width: 100%; }
.btn-sm { min-height: 44px; padding: 9px 16px; font-size: .875rem; }

/* A disabled control must LOOK unavailable and still be readable, or a shopper
   reads a sold-out size as an available one. */
.btn:disabled, .btn[aria-disabled="true"] {
  background: var(--surface-2); color: var(--ink-3);
  border-color: var(--line); cursor: not-allowed; transform: none;
}

/* ===========================================================================
   Header
   =========================================================================== */
.announce {
  background: var(--ink); color: var(--bg);
  font-size: .78rem; letter-spacing: .09em; text-transform: uppercase;
  text-align: center; padding: 9px 16px; font-weight: 500;
}
:root[data-theme="deep"] .announce { background: var(--panel); color: var(--ink); }

.site-header {
  position: sticky; top: 0; z-index: 60;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav {
  display: flex; align-items: center; gap: 16px;
  min-height: var(--header-h);
}
.brand { display: flex; align-items: center; flex: 0 0 auto; min-height: 44px; padding: 5px 0; }
.brand img { height: 34px; width: auto; }
.logo-light { display: none; }
:root[data-theme="deep"] .logo-dark { display: none; }
:root[data-theme="deep"] .logo-light { display: block; }
/* The bold palette paints panels near black, and the footer sits on a light
   ground, so the dark lockup is right there too. Stated rather than assumed. */

.menu { display: none; margin-left: auto; margin-right: auto; }
.menu > * { position: relative; }
.menu a.top {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 10px 14px; min-height: 44px;
  color: var(--ink); font-size: .9rem; font-weight: 500; letter-spacing: .02em;
}
.menu a.top:hover { color: var(--accent-ink); text-decoration: none; }
.menu .caret { font-size: .6rem; opacity: .7; }

.drop {
  position: absolute; top: 100%; left: 0; min-width: 250px;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow-2);
  padding: 10px; opacity: 0; visibility: hidden; transform: translateY(6px);
  transition: opacity .16s ease, transform .16s ease, visibility .16s;
}
.has-drop:hover .drop, .has-drop:focus-within .drop { opacity: 1; visibility: visible; transform: translateY(0); }
.drop a {
  display: block; padding: 9px 12px; border-radius: var(--radius-sm);
  color: var(--ink); font-size: .9rem; min-height: 40px;
}
.drop a:hover { background: var(--surface-2); color: var(--accent-ink); text-decoration: none; }
.drop .drop-all { font-weight: 600; border-bottom: 1px solid var(--line); border-radius: 0; margin-bottom: 6px; }

.nav-actions { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border: 0; background: transparent;
  color: var(--ink); cursor: pointer; border-radius: var(--radius-pill); position: relative;
}
.icon-btn:hover { background: var(--surface-2); }
.icon-btn svg { width: 21px; height: 21px; }
.count {
  position: absolute; top: 4px; right: 2px; min-width: 18px; height: 18px;
  padding: 0 5px; border-radius: 9px; background: var(--accent); color: var(--on-accent);
  font-size: .7rem; font-weight: 700; line-height: 18px; text-align: center;
}
.burger { display: inline-flex; }

/* Search opens as a row under the header rather than a modal, so it cannot
   trap a keyboard and never covers the cart. */
.searchbar { display: none; border-top: 1px solid var(--line); background: var(--surface); }
.searchbar.open { display: block; }
.searchbar form { display: flex; gap: 10px; padding: 14px 20px; max-width: var(--wrap); margin: 0 auto; }
.searchbar input {
  flex: 1; min-height: 48px; padding: 10px 16px;
  border: 1px solid var(--control); border-radius: var(--radius-pill);
  background: var(--bg); color: var(--ink); font-family: var(--body); font-size: 1rem;
}

.mobile-menu {
  display: none; border-top: 1px solid var(--line); background: var(--surface);
  max-height: calc(100dvh - var(--header-h)); overflow-y: auto; padding: 8px 0 20px;
}
.mobile-menu.open { display: block; }
.mobile-menu a {
  display: block; padding: 13px 20px; color: var(--ink);
  font-size: .97rem; border-bottom: 1px solid var(--line); min-height: 48px;
}
.mobile-menu a:hover { background: var(--surface-2); text-decoration: none; }
.mobile-menu .mm-group {
  padding: 18px 20px 6px; font-size: .72rem; letter-spacing: .16em;
  text-transform: uppercase; color: var(--ink-2); font-weight: 700;
}
.mobile-menu .mm-sub { padding-left: 38px; font-size: .92rem; color: var(--ink-2); }

@media (min-width: 1000px) {
  .menu { display: flex; }
  .burger { display: none; }
}

/* ===========================================================================
   Hero
   =========================================================================== */
.hero {
  position: relative;
  display: grid; grid-template-columns: 1fr;
  background: var(--panel);
  overflow: hidden;
}
.hero-copy { padding: clamp(44px, 7vw, 96px) 20px; max-width: 640px; margin: 0 auto; text-align: center; }
.hero-copy h1 { margin-bottom: .35em; }
.hero-copy, .hero-copy h1 { color: var(--on-panel); }
.hero-lead { font-size: clamp(1rem, .95rem + .3vw, 1.15rem); color: var(--on-panel-2); margin-bottom: 1.8em; }
.hero-copy .kicker { color: var(--on-panel-2); }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }
.hero-art { position: relative; min-height: 280px; background: var(--panel-2); color: var(--on-panel); }
.hero-art .feather {
  position: absolute; right: 6%; top: 50%; transform: translateY(-50%);
  width: min(46%, 220px); opacity: .9;
}

@media (min-width: 900px) {
  .hero { grid-template-columns: 1.05fr .95fr; align-items: stretch; }
  .hero-copy { text-align: left; margin: 0; padding-left: max(20px, calc((100vw - var(--wrap)) / 2 + 20px)); align-self: center; }
  .hero-cta { justify-content: flex-start; }
  .hero-art { min-height: 520px; }
}

/* ===========================================================================
   Category tiles
   =========================================================================== */
.cat-grid {
  display: grid; gap: 18px;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
}
.cat-card {
  display: block; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden; color: var(--ink);
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}
.cat-card:hover { border-color: var(--line-2); box-shadow: var(--shadow-1); transform: translateY(-2px); text-decoration: none; }
.cat-card .art { aspect-ratio: 4 / 5; background: var(--panel); position: relative; }
.cat-card .art-empty {
  aspect-ratio: 16 / 11;
  background:
    url('/assets/img/mark.png') center / auto 44% no-repeat,
    linear-gradient(160deg, var(--panel), var(--panel-2));
  opacity: .95;
}
:root[data-theme="deep"] .cat-card .art-empty { opacity: .8; }
.cat-card .art img { width: 100%; height: 100%; object-fit: cover; }
.cat-card .body { padding: 16px 18px 20px; }
.cat-card h3 { font-size: 1.2rem; margin: 0 0 .3em; line-height: 1.2; }
.cat-card p { margin: 0; font-size: .86rem; color: var(--ink-2); line-height: 1.5; }

/* ===========================================================================
   Product cards
   =========================================================================== */
.product-grid {
  display: grid; gap: clamp(14px, 2vw, 26px);
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
@media (min-width: 720px) { .product-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1040px) { .product-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.product-grid.cols-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 900px) { .product-grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

.p-card { position: relative; display: flex; flex-direction: column; }
.p-card .shot {
  position: relative; display: block; aspect-ratio: 4 / 5; overflow: hidden;
  border-radius: var(--radius); background: var(--surface-2); border: 1px solid var(--line);
}
.p-card .shot img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .5s cubic-bezier(.2, .7, .3, 1), opacity .3s ease;
}
.p-card:hover .shot img { transform: scale(1.04); }
/* The second photograph fades in on hover. It is stacked, never swapped by
   changing src: a swap shows a blank frame while the new file loads. */
.p-card .shot .alt-shot { position: absolute; inset: 0; opacity: 0; }
.p-card:hover .shot .alt-shot { opacity: 1; }

.p-card .info { padding: 12px 2px 0; }
.p-card .p-name { font-family: var(--body); font-size: .93rem; font-weight: 600; margin: 0 0 4px; color: var(--ink); line-height: 1.4; }
.p-card .p-name a { color: inherit; }
.p-card .p-cat { font-size: .76rem; color: var(--ink-3); margin: 0 0 6px; letter-spacing: .04em; }
.p-price { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.p-price .now { font-weight: 700; font-size: 1rem; color: var(--ink); }
.p-price .was { font-size: .84rem; color: var(--ink-3); text-decoration: line-through; }
.p-price .off { font-size: .78rem; font-weight: 700; color: var(--accent-ink); }

.swatches { display: flex; gap: 6px; margin-top: 9px; flex-wrap: wrap; }
.swatch {
  width: 18px; height: 18px; border-radius: 50%;
  border: 1px solid var(--line-2); box-shadow: inset 0 0 0 2px var(--surface);
}
.swatch-more { font-size: .74rem; color: var(--ink-3); align-self: center; }

.tag {
  position: absolute; top: 10px; left: 10px; z-index: 2;
  padding: 5px 10px; border-radius: var(--radius-pill);
  font-size: .7rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
}
.tag-badge { background: var(--ink); color: var(--bg); }
.tag-off { background: var(--accent); color: var(--on-accent); }
/* A seeded placeholder is labelled wherever it appears. A demo product that
   looks real is how a demo product ends up live. */
.tag-sample { background: var(--warn); color: #FFFFFF; top: auto; bottom: 10px; }
.tag-soldout { background: var(--surface); color: var(--ink-2); border: 1px solid var(--line-2); }

/* ===========================================================================
   Shop layout, filters
   =========================================================================== */
.shop-layout { display: grid; gap: 28px; grid-template-columns: 1fr; align-items: start; }
@media (min-width: 960px) { .shop-layout { grid-template-columns: 248px minmax(0, 1fr); gap: 40px; } }

.filters { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.filters .f-group { border-bottom: 1px solid var(--line); padding: 16px 18px; }
.filters .f-group:last-child { border-bottom: 0; }
.filters h4 { font-family: var(--body); font-size: .78rem; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-2); margin: 0 0 12px; }
.filters label { display: flex; align-items: center; gap: 9px; padding: 7px 0; min-height: 40px; font-size: .9rem; color: var(--ink); cursor: pointer; }
.filters input[type="checkbox"], .filters input[type="radio"] { width: 18px; height: 18px; accent-color: var(--accent); flex: 0 0 auto; }
.filters .f-count { margin-left: auto; color: var(--ink-3); font-size: .8rem; }

.shop-bar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 22px; }
.shop-bar .result-count { color: var(--ink-2); font-size: .9rem; }
.shop-bar .spacer { margin-left: auto; }
.select {
  min-height: 44px; padding: 9px 38px 9px 14px;
  border: 1px solid var(--control); border-radius: var(--radius-pill);
  background: var(--surface); color: var(--ink); font-family: var(--body); font-size: .9rem;
  appearance: none; cursor: pointer;
  background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%);
  background-position: calc(100% - 19px) calc(50% + 1px), calc(100% - 14px) calc(50% + 1px);
  background-size: 5px 5px, 5px 5px; background-repeat: no-repeat;
}
.filter-toggle { display: inline-flex; }
@media (min-width: 960px) { .filter-toggle { display: none; } .filters { display: block !important; } }

.chips { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; }
.chip {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 10px 16px; min-height: 44px; border-radius: var(--radius-pill);
  background: var(--surface-2); border: 1px solid var(--line);
  font-size: .85rem; color: var(--ink);
}
.chip a { color: var(--ink-2); font-weight: 700; line-height: 1; }

/* ===========================================================================
   Product page
   =========================================================================== */
.pdp { display: grid; gap: 34px; grid-template-columns: 1fr; }
@media (min-width: 900px) { .pdp { grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr); gap: 56px; } }

.gallery { display: grid; gap: 12px; }
.gallery .main {
  aspect-ratio: 4 / 5; border-radius: var(--radius); overflow: hidden;
  background: var(--surface-2); border: 1px solid var(--line); position: relative;
}
.gallery .main img { width: 100%; height: 100%; object-fit: cover; }
.thumbs { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 4px; }
.thumbs button {
  flex: 0 0 74px; width: 74px; aspect-ratio: 4 / 5; padding: 0;
  border: 1px solid var(--control); border-radius: var(--radius-sm);
  overflow: hidden; background: var(--surface-2); cursor: pointer;
}
.thumbs button[aria-current="true"] { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.thumbs img { width: 100%; height: 100%; object-fit: cover; }

.pdp-head h1 { margin-bottom: .2em; }
.pdp .price-row { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin: 6px 0 4px; }
.pdp .price-row .now { font-size: 1.6rem; font-weight: 700; }
.pdp .price-row .was { font-size: 1rem; color: var(--ink-3); text-decoration: line-through; }
.pdp .price-row .off { color: var(--accent-ink); font-weight: 700; }
.pdp .tax-note { font-size: .82rem; color: var(--ink-3); margin: 0 0 20px; }

.opt-group { margin: 22px 0; }
.opt-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.opt-head .lbl { font-size: .78rem; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-2); font-weight: 600; }
.opt-head .chosen { font-size: .9rem; color: var(--ink); font-weight: 600; }

.opt-list { display: flex; gap: 9px; flex-wrap: wrap; }
.opt {
  min-width: 52px; min-height: 46px; padding: 10px 15px;
  border: 1px solid var(--control); border-radius: var(--radius-sm);
  background: var(--surface); color: var(--ink);
  font-family: var(--body); font-size: .9rem; font-weight: 600; cursor: pointer;
  transition: border-color .15s ease, background-color .15s ease;
}
.opt:hover { border-color: var(--ink-3); }
.opt[aria-pressed="true"] { border-color: var(--ink); background: var(--ink); color: var(--bg); }
/* Sold out is struck through AND dimmed AND says so to a screen reader, because
   colour alone is not a message. */
.opt[disabled] {
  color: var(--ink-3); background: var(--surface-2); border-color: var(--line);
  cursor: not-allowed; text-decoration: line-through;
}
.opt-colour {
  display: inline-flex; align-items: center; gap: 8px; min-width: 0;
  border-radius: var(--radius-pill); padding: 8px 16px 8px 9px;
}
.opt-colour .dot { width: 20px; height: 20px; border-radius: 50%; border: 1px solid var(--line-2); flex: 0 0 auto; }

.stock-note { font-size: .86rem; margin: 10px 0 0; }
.stock-low { color: var(--warn); font-weight: 600; }
.stock-out { color: var(--error); font-weight: 600; }
.stock-in { color: var(--ok); font-weight: 600; }

.buy-row { display: flex; gap: 12px; align-items: stretch; margin: 24px 0 10px; flex-wrap: wrap; }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--control); border-radius: var(--radius-pill); overflow: hidden; }
.qty button {
  width: 46px; height: 48px; border: 0; background: var(--surface);
  color: var(--ink); font-size: 1.15rem; cursor: pointer;
}
.qty button:hover { background: var(--surface-2); }
.qty output { min-width: 44px; text-align: center; font-weight: 700; font-size: .95rem; }
.buy-row .btn { flex: 1 1 200px; }

.accordion { border-top: 1px solid var(--line); margin-top: 30px; }
.accordion details { border-bottom: 1px solid var(--line); }
.accordion summary {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 16px 2px; min-height: 56px; cursor: pointer; list-style: none;
  font-weight: 600; font-size: .95rem; color: var(--ink);
}
.accordion summary::-webkit-details-marker { display: none; }
.accordion summary::after { content: "+"; font-size: 1.3rem; color: var(--ink-2); font-weight: 400; }
.accordion details[open] summary::after { content: "\2212"; }
.accordion .acc-body { padding: 0 2px 20px; color: var(--ink-2); font-size: .93rem; }
.accordion ul { margin: 0; padding-left: 20px; }
.accordion li { margin-bottom: 6px; }

/* ===========================================================================
   Size chart
   =========================================================================== */
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--line); border-radius: var(--radius); }
table.data { width: 100%; border-collapse: collapse; font-size: .9rem; min-width: 460px; }
table.data th, table.data td { padding: 11px 14px; text-align: left; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.data th { background: var(--surface-2); font-family: var(--body); font-weight: 600; font-size: .8rem; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-2); }
table.data tr:last-child td { border-bottom: 0; }
table.data tbody tr:hover { background: var(--surface-2); }

/* ===========================================================================
   Modal
   =========================================================================== */
.modal { position: fixed; inset: 0; z-index: 120; display: none; }
.modal.open { display: block; }
.modal-back { position: absolute; inset: 0; background: rgba(20, 16, 15, .55); }
.modal-card {
  position: relative; margin: 6vh auto; max-width: 700px; width: calc(100% - 32px);
  background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow-2);
  max-height: 88vh; overflow-y: auto;
}
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 22px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--surface); }
.modal-head h3 { margin: 0; }
.modal-body { padding: 22px; }

/* ===========================================================================
   Forms
   =========================================================================== */
.field { margin-bottom: 16px; }
.field label { display: block; font-size: .82rem; font-weight: 600; color: var(--ink-2); margin-bottom: 6px; letter-spacing: .03em; }
.field input, .field select, .field textarea {
  width: 100%; min-height: 48px; padding: 11px 14px;
  border: 1px solid var(--control); border-radius: var(--radius-sm);
  background: var(--surface); color: var(--ink);
  font-family: var(--body); font-size: 1rem;
}
.field textarea { min-height: 110px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--focus); }
.field .hint { font-size: .8rem; color: var(--ink-3); margin: 6px 0 0; }
.field .err { font-size: .82rem; color: var(--error); margin: 6px 0 0; font-weight: 600; }
.field-row { display: grid; gap: 0 14px; grid-template-columns: 1fr; }
@media (min-width: 620px) { .field-row.two { grid-template-columns: 1fr 1fr; } .field-row.three { grid-template-columns: 1fr 1fr 1fr; } }

.note {
  padding: 13px 16px; border-radius: var(--radius-sm);
  border: 1px solid var(--line); background: var(--surface-2);
  font-size: .9rem; color: var(--ink-2); margin-bottom: 18px;
}
.note-error { border-color: var(--error); background: var(--accent-soft); color: var(--ink); }
.note-ok { border-color: var(--ok); background: var(--surface-2); color: var(--ink); }

/* ===========================================================================
   Cart and checkout
   =========================================================================== */
.two-col { display: grid; gap: 30px; grid-template-columns: 1fr; align-items: start; }
@media (min-width: 900px) { .two-col { grid-template-columns: minmax(0, 1.35fr) minmax(320px, .65fr); gap: 44px; } }

.line-item { display: grid; grid-template-columns: 88px minmax(0, 1fr); gap: 16px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.line-item .shot { width: 88px; aspect-ratio: 4 / 5; border-radius: var(--radius-sm); overflow: hidden; background: var(--surface-2); border: 1px solid var(--line); }
.line-item .shot img { width: 100%; height: 100%; object-fit: cover; }
.line-item h4 { font-family: var(--body); font-size: .95rem; margin: 0 0 4px; }
.line-item .meta { font-size: .84rem; color: var(--ink-2); margin: 0 0 10px; }
.line-item .li-foot { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.line-item .li-price { margin-left: auto; font-weight: 700; }

.summary { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; position: sticky; top: calc(var(--header-h) + 16px); }
.summary h3 { font-size: 1.3rem; margin-bottom: 16px; }
.sum-row { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; font-size: .93rem; color: var(--ink-2); }
.sum-row.total { border-top: 1px solid var(--line); margin-top: 10px; padding-top: 14px; font-size: 1.12rem; font-weight: 700; color: var(--ink); }
.sum-row .free { color: var(--ok); font-weight: 600; }

.coupon-row { display: flex; gap: 8px; margin: 14px 0; }
.coupon-row input { flex: 1; min-height: 46px; padding: 10px 14px; border: 1px solid var(--control); border-radius: var(--radius-sm); background: var(--surface); color: var(--ink); font-family: var(--body); text-transform: uppercase; }

.pay-option { display: flex; gap: 12px; align-items: flex-start; padding: 16px; border: 1px solid var(--control); border-radius: var(--radius-sm); margin-bottom: 12px; cursor: pointer; }
.pay-option input { margin-top: 3px; width: 19px; height: 19px; accent-color: var(--accent); flex: 0 0 auto; }
.pay-option[data-selected="true"] { border-color: var(--ink); background: var(--surface-2); }
.pay-option .t { font-weight: 600; display: block; }
.pay-option .d { font-size: .85rem; color: var(--ink-2); }

.steps { display: flex; gap: 0; margin-bottom: 26px; border-bottom: 1px solid var(--line); }
.steps .step { padding: 10px 4px 12px; margin-right: 26px; font-size: .85rem; color: var(--ink-3); border-bottom: 2px solid transparent; }
.steps .step[aria-current="step"] { color: var(--ink); font-weight: 600; border-bottom-color: var(--accent); }

/* ===========================================================================
   Order tracking
   =========================================================================== */
.timeline { list-style: none; padding: 0; margin: 22px 0 0; }
.timeline li { position: relative; padding: 0 0 26px 34px; }
.timeline li::before {
  content: ""; position: absolute; left: 6px; top: 4px; width: 13px; height: 13px;
  border-radius: 50%; background: var(--surface); border: 2px solid var(--line-2);
}
.timeline li::after { content: ""; position: absolute; left: 12px; top: 20px; bottom: 0; width: 1px; background: var(--line); }
.timeline li:last-child::after { display: none; }
.timeline li.done::before { background: var(--ok); border-color: var(--ok); }
.timeline li.now::before { background: var(--accent); border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.timeline .t-name { font-weight: 600; }
.timeline .t-note { font-size: .87rem; color: var(--ink-2); }

.status-pill {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 6px 14px; border-radius: var(--radius-pill);
  font-size: .82rem; font-weight: 600;
  background: var(--surface-2); color: var(--ink); border: 1px solid var(--line);
}

/* ===========================================================================
   Editorial blocks
   =========================================================================== */
.promises { display: grid; gap: 22px; grid-template-columns: 1fr; }
@media (min-width: 760px) { .promises { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 30px; } }
.promise { text-align: center; }
.promise .ic { width: 44px; height: 44px; margin: 0 auto 14px; color: var(--accent-ink); }
.promise h3 { font-size: 1.2rem; margin-bottom: .35em; }
.promise p { color: var(--ink-2); font-size: .92rem; margin: 0; }

.band { background: var(--panel); }
.band-split { display: grid; gap: 0; grid-template-columns: 1fr; align-items: center; }
@media (min-width: 900px) { .band-split { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
.band-copy { padding: clamp(36px, 5vw, 72px) 20px; max-width: 560px; margin: 0 auto; color: var(--on-panel-2); }
.band-copy h2, .band-copy .kicker { color: var(--on-panel); }
.band-art { min-height: 260px; background: var(--panel-2); position: relative; color: var(--on-panel-2); }
@media (min-width: 900px) { .band-art { min-height: 440px; } }

.quote-grid { display: grid; gap: 20px; grid-template-columns: 1fr; }
@media (min-width: 760px) { .quote-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.quote { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.quote .stars { color: var(--accent-ink); letter-spacing: .12em; font-size: .9rem; margin-bottom: 10px; }
.quote p { font-family: var(--display); font-size: 1.15rem; line-height: 1.5; color: var(--ink); margin: 0 0 14px; }
.quote .who { font-size: .84rem; color: var(--ink-2); margin: 0; }

.empty { text-align: center; padding: clamp(44px, 8vw, 90px) 20px; }
.empty .ic { width: 60px; height: 60px; margin: 0 auto 18px; color: var(--ink-3); }
.empty h2 { margin-bottom: .3em; }
.empty p { color: var(--ink-2); max-width: 420px; margin: 0 auto 24px; }

.crumbs { font-size: .82rem; color: var(--ink-3); padding: 18px 0 0; }
.crumbs a { color: var(--ink-2); }
.crumbs span { margin: 0 7px; opacity: .6; }

.page-head { padding: clamp(26px, 4vw, 46px) 0 clamp(20px, 3vw, 34px); }
.page-head h1 { margin-bottom: .2em; }
.page-head p { color: var(--ink-2); max-width: 640px; margin: 0; }

.prose { max-width: 720px; }
.prose h2 { margin-top: 1.6em; }
.prose h3 { margin-top: 1.4em; font-size: 1.2rem; }
.prose ul, .prose ol { padding-left: 22px; color: var(--ink-2); }
.prose li { margin-bottom: 8px; }
.prose p { color: var(--ink-2); }

/* ===========================================================================
   Footer
   =========================================================================== */
.site-footer { background: var(--surface-2); border-top: 1px solid var(--line); margin-top: clamp(50px, 7vw, 90px); }
.foot-grid { display: grid; gap: 30px; grid-template-columns: 1fr; padding: clamp(40px, 5vw, 64px) 0 34px; }
@media (min-width: 700px) { .foot-grid { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr) minmax(0, 1fr); } }
@media (min-width: 1000px) { .foot-grid { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1.2fr); gap: 44px; } }
.foot-grid h4 { font-family: var(--body); font-size: .76rem; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-2); margin: 0 0 14px; }
.foot-grid ul { list-style: none; padding: 0; margin: 0; }
.foot-grid li { margin-bottom: 9px; }
.foot-grid a { color: var(--ink-2); font-size: .9rem; }
.foot-grid a:hover { color: var(--accent-ink); }
.foot-brand img { height: 40px; width: auto; margin-bottom: 14px; }
.foot-brand p { font-size: .89rem; color: var(--ink-2); max-width: 320px; }
.foot-bottom {
  border-top: 1px solid var(--line); padding: 18px 0 26px;
  display: flex; gap: 12px; flex-wrap: wrap; align-items: center;
  font-size: .82rem; color: var(--ink-3);
}
.foot-bottom .spacer { margin-left: auto; }
.socials { display: flex; gap: 8px; }
.socials a { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line-2); color: var(--ink-2); }
.socials a:hover { border-color: var(--accent); color: var(--accent-ink); }
.socials svg { width: 18px; height: 18px; }

/* A sticky buy bar on a phone, because the add to cart button scrolls away on a
   long product page and a shopper should never have to hunt for it. */
.buy-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 70;
  display: none; gap: 12px; align-items: center;
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
  background: var(--surface); border-top: 1px solid var(--line); box-shadow: 0 -6px 20px rgba(0, 0, 0, .07);
}
.buy-bar .bb-price { font-weight: 700; }
.buy-bar .btn { flex: 1; }
@media (max-width: 899px) { .buy-bar.on { display: flex; } }

.toast-host { position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); z-index: 200; display: flex; flex-direction: column; gap: 8px; width: calc(100% - 32px); max-width: 400px; }
.toast {
  background: var(--ink); color: var(--bg); padding: 13px 18px; border-radius: var(--radius-sm);
  box-shadow: var(--shadow-2); font-size: .9rem; display: flex; gap: 10px; align-items: center;
}
.toast a { color: var(--bg); text-decoration: underline; font-weight: 600; }

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

/* The theme preview strip, shown only when ?theme= is on the URL, so the owner
   can compare the three without a deploy and nobody can land on it by accident. */
.theme-bar {
  position: fixed; right: 16px; bottom: 16px; z-index: 150;
  /* On a phone the sticky Add to Bag bar owns the bottom of the screen, so the
     preview switcher sits above it rather than on top of the button it is
     meant to let you look at. */
  display: flex; gap: 6px; align-items: center;
  background: var(--surface); border: 1px solid var(--control);
  border-radius: var(--radius-pill); padding: 7px 9px; box-shadow: var(--shadow-2);
}
.theme-bar span { font-size: .74rem; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-2); padding: 0 6px; }
.theme-bar a {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 44px; padding: 8px 14px; border-radius: var(--radius-pill);
  font-size: .82rem; font-weight: 600; color: var(--ink); background: var(--surface-2);
}
.theme-bar a[aria-current="true"] { background: var(--ink); color: var(--bg); }
@media (max-width: 899px) { .theme-bar { bottom: 88px; right: 10px; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
  .p-card:hover .shot img { transform: none; }
}

@media print {
  .site-header, .site-footer, .buy-bar, .theme-bar, .announce, .toast-host { display: none !important; }
  body { background: #FFFFFF; color: #000000; }
}

/* ===========================================================================
   Product page extras
   =========================================================================== */
.pdp-info { min-width: 0; }

.reassure {
  display: flex; align-items: flex-start; gap: 9px;
  margin: 10px 0 0; font-size: .88rem; color: var(--ink-2);
}
.reassure svg { flex: 0 0 auto; margin-top: 3px; color: var(--accent-ink); }

.note-warn { border-color: var(--warn); background: var(--surface-2); color: var(--ink); }

/* The fit meter. Reviews are turned into one sentence and one position on a
   scale, because "78% said true to size" is a statistic and "true to size" is
   an answer. */
.fit-meter {
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 14px 16px; margin: 0 0 20px; background: var(--surface);
}
.fm-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.fm-verdict { font-weight: 600; font-size: .95rem; }
.fm-count { font-size: .8rem; color: var(--ink-3); }
.fm-scale { position: relative; height: 8px; margin: 0 4px 8px; }
.fm-track {
  position: absolute; inset: 0; border-radius: 999px;
  background: linear-gradient(90deg, var(--panel-2), var(--accent-soft), var(--panel-2));
  border: 1px solid var(--line);
}
.fm-marker {
  position: absolute; top: 50%; width: 14px; height: 14px; margin: -7px 0 0 -7px;
  border-radius: 50%; background: var(--accent); border: 2px solid var(--surface);
  box-shadow: 0 1px 4px rgba(0, 0, 0, .25);
}
.fm-labels { display: flex; justify-content: space-between; font-size: .74rem; color: var(--ink-3); }

/* How to measure. Four small figures that stay legible down to a 320px phone,
   which is why they are a grid of two rather than a row of four. */
.measure-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin: 16px 0; }
@media (min-width: 700px) { .measure-grid.wide { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.measure-grid figure { margin: 0; text-align: center; }
.measure-grid figcaption { font-size: .8rem; color: var(--ink-2); margin-top: 6px; line-height: 1.45; }
.measure-fig { width: 100%; height: auto; max-height: 260px; color: var(--ink-2); }
.measure-band { display: flex; align-items: center; justify-content: center; padding: 30px; }
.measure-band .measure-fig { max-height: 340px; color: var(--ink-2); }

.finder-answer {
  margin-top: 18px; padding: 18px; border-radius: var(--radius-sm);
  background: var(--accent-soft); border: 1px solid var(--line);
}
.fa-size { font-family: var(--display); font-size: 2.2rem; font-weight: 600; margin: 0 0 4px; color: var(--ink); }
.fa-note { margin: 0 0 6px; font-size: .92rem; color: var(--ink); }
.fa-fit { margin: 0; font-size: .86rem; color: var(--ink-2); }

.two-up { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 760px) { .two-up { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }

/* ===========================================================================
   Returns
   =========================================================================== */
.steps-strip {
  display: grid; gap: 14px; grid-template-columns: 1fr;
  margin: 0 0 34px;
}
@media (min-width: 640px) { .steps-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1040px) { .steps-strip { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
.step-card {
  position: relative; padding: 20px 18px;
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface);
}
.step-card .step-n {
  display: inline-flex; align-items: center; justify-content: center;
  width: 26px; height: 26px; border-radius: 50%;
  background: var(--accent); color: var(--on-accent);
  font-size: .78rem; font-weight: 700; margin-bottom: 12px;
}
.step-card .step-ic { display: block; color: var(--accent-ink); margin-bottom: 8px; }
.step-card h3 { font-family: var(--body); font-size: .95rem; margin: 0 0 6px; }
.step-card p { font-size: .86rem; color: var(--ink-2); margin: 0; line-height: 1.5; }

.mini-steps { list-style: none; padding: 0; margin: 14px 0 18px; counter-reset: ms; }
.mini-steps li { display: flex; gap: 10px; margin-bottom: 12px; font-size: .86rem; color: var(--ink-2); line-height: 1.5; }
.mini-steps .ms-n {
  flex: 0 0 auto; width: 22px; height: 22px; border-radius: 50%;
  background: var(--surface-2); border: 1px solid var(--line-2); color: var(--ink);
  font-size: .74rem; font-weight: 700; display: inline-flex; align-items: center; justify-content: center;
}
.mini-steps b { color: var(--ink); }

.return-cta {
  display: flex; gap: 14px; align-items: center; flex-wrap: wrap;
  padding: 16px; margin-top: 18px;
  border: 1px solid var(--line-2); border-radius: var(--radius-sm); background: var(--surface-2);
}
.return-cta > div { flex: 1 1 240px; }
.return-cta b { display: block; }

.pick-row {
  display: flex; gap: 11px; align-items: flex-start;
  padding: 12px; margin-bottom: 8px; min-height: 48px;
  border: 1px solid var(--line); border-radius: var(--radius-sm); cursor: pointer;
}
.pick-row:hover { background: var(--surface-2); }
.pick-row input { width: 19px; height: 19px; margin-top: 2px; accent-color: var(--accent); flex: 0 0 auto; }
.hygiene-note { color: var(--warn); font-weight: 600; font-size: .8rem; }

.label-text {
  display: block; font-size: .82rem; font-weight: 600;
  color: var(--ink-2); margin-bottom: 6px; letter-spacing: .03em;
}

/* ===========================================================================
   Order cards, on tracking and in the account
   =========================================================================== */
.order-card {
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--surface); padding: 22px;
}
.oc-head {
  display: flex; gap: 14px; align-items: flex-start; justify-content: space-between;
  flex-wrap: wrap; padding-bottom: 16px; border-bottom: 1px solid var(--line);
}
.oc-head h2, .oc-head h3 { font-size: 1.25rem; }
.order-card .timeline { margin-top: 20px; }
.order-card .line-item:last-of-type { border-bottom: 0; }
.track-form { margin-bottom: 26px; }

.faq { border-bottom: 1px solid var(--line); }
.faq summary {
  padding: 15px 2px; min-height: 52px; cursor: pointer; font-weight: 600;
  list-style: none; display: flex; justify-content: space-between; gap: 12px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--ink-2); font-size: 1.25rem; font-weight: 400; }
.faq[open] summary::after { content: "\2212"; }
.faq .acc-body { padding: 0 2px 18px; color: var(--ink-2); font-size: .93rem; }
