/* ==========================================================================
   WM Shop
   Shape rule: controls (buttons, chips, toast) = pill, inputs = 14px,
   nested media = 16px, containers (hero, blocks, dialogs, product images) = 24px.
   One accent: cobalt, taken from the hero photograph.
   ========================================================================== */

:root {
  --bg: #f4f5f8;
  --surface: #ffffff;
  --ink: #12141c;
  --ink-2: #4a4f5e;
  --line: #dcdfe8;
  --accent: #0140a1;
  --accent-hover: #0a52d6;
  --on-accent: #ffffff;
  --block: #0140a1;
  --danger: #bf1f2b;
  --img-bg: #e9ecf1;

  --r-pill: 999px;
  --r-input: 14px;
  --r-media: 16px;
  --r-box: 24px;

  --shadow: 0 24px 48px -24px rgb(1 40 140 / 0.38);
  --ease: cubic-bezier(0.16, 1, 0.3, 1);

  --font-display: "Bricolage Grotesque", "Arial Narrow", system-ui, sans-serif;
  --font-body: "Geist", system-ui, -apple-system, "Segoe UI", sans-serif;

  --gutter: 16px;
  --header-h: 64px;
}

/* Dark theme: follows the system unless the visitor picked a theme with the switch */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #0d0f15;
    --surface: #161923;
    --ink: #f1f2f6;
    --ink-2: #a9aec0;
    --line: #272b38;
    --accent: #7d9bff;
    --accent-hover: #9fb4ff;
    --on-accent: #0a0d18;
    --block: #0140a1;
    --danger: #ff8a92;
    --shadow: 0 24px 48px -24px rgb(0 0 0 / 0.7);
  }
}

:root[data-theme="dark"] {
  color-scheme: dark;
    --bg: #0d0f15;
    --surface: #161923;
    --ink: #f1f2f6;
    --ink-2: #a9aec0;
    --line: #272b38;
    --accent: #7d9bff;
    --accent-hover: #9fb4ff;
    --on-accent: #0a0d18;
    --block: #0140a1;
    --danger: #ff8a92;
    --shadow: 0 24px 48px -24px rgb(0 0 0 / 0.7);
}

:root[data-theme="light"] { color-scheme: light; }

@media (min-width: 720px) {
  :root { --gutter: 24px; }
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

body:has(dialog[open]) { overflow: hidden; }

[hidden] { display: none !important; }

img { display: block; max-width: 100%; height: auto; }
ul { list-style: none; margin: 0; padding: 0; }
h1, h2, h3, p, figure { margin: 0; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; }

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}

.wrap {
  width: min(100% - 2 * var(--gutter), 1320px);
  margin-inline: auto;
}

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

.skip {
  position: fixed;
  left: 16px; top: -64px;
  z-index: 100;
  padding: 0.75rem 1.25rem;
  border-radius: var(--r-pill);
  background: var(--ink);
  color: var(--bg);
  text-decoration: none;
  transition: top 0.2s var(--ease);
}
.skip:focus { top: 12px; }

[data-icon] { display: inline-flex; flex: none; }
[data-icon] svg { width: 1.25em; height: 1.25em; display: block; }

/* ---------- Type ---------- */
.h2, .h3, .hero-title, .logo, .mega {
  font-family: var(--font-display);
  font-stretch: 85%;
  text-wrap: balance;
}

.h2 {
  font-size: clamp(2.25rem, 5vw, 4rem);
  font-weight: 760;
  line-height: 1.04;
  letter-spacing: -0.015em;
}

.h3 {
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  font-weight: 740;
  line-height: 1.05;
  letter-spacing: -0.01em;
}

.lead {
  font-size: 1.125rem;
  color: inherit;
  max-width: 52ch;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  min-height: 52px;
  padding: 0 1.6rem;
  border: 2px solid transparent;
  border-radius: var(--r-pill);
  font-weight: 600;
  white-space: nowrap;
  text-decoration: none;
  transition: transform 0.25s var(--ease), background-color 0.2s, color 0.2s, box-shadow 0.25s var(--ease), border-color 0.2s;
}
.btn:active { transform: scale(0.97); }

.btn-primary { background: var(--accent); color: var(--on-accent); }
.btn-primary:hover { background: var(--accent-hover); transform: translateY(-2px); box-shadow: var(--shadow); }
.btn-primary:active { transform: scale(0.97); }

.btn-ghost { border-color: var(--ink); background: transparent; color: var(--ink); }
.btn-ghost:hover { background: var(--ink); color: var(--bg); }

.btn-light { background: #ffffff; color: #0a2d7a; }
.btn-light:hover { transform: translateY(-2px); box-shadow: 0 16px 32px -16px rgb(0 0 0 / 0.5); }

.btn-block { width: 100%; }

.icon-btn {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 48px; height: 48px;
  border: 0;
  border-radius: var(--r-pill);
  background: transparent;
  transition: background-color 0.2s, transform 0.2s var(--ease);
}
.icon-btn:hover { background: color-mix(in srgb, var(--ink) 9%, transparent); }
.icon-btn:active { transform: scale(0.93); }
.icon-btn [data-icon] svg { width: 24px; height: 24px; }

/* ---------- Header ---------- */
.theme-btn .i-sun { display: none; }
:root[data-theme="dark"] .theme-btn .i-moon { display: none; }
:root[data-theme="dark"] .theme-btn .i-sun { display: inline-flex; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-btn .i-moon { display: none; }
  :root:not([data-theme="light"]) .theme-btn .i-sun { display: inline-flex; }
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  height: var(--header-h);
  background: color-mix(in srgb, var(--bg) 84%, transparent);
  backdrop-filter: blur(14px) saturate(160%);
  -webkit-backdrop-filter: blur(14px) saturate(160%);
  border-bottom: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
}

.bar {
  height: 100%;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
}

.logo {
  justify-self: start;
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1;
  text-decoration: none;
  color: var(--ink);
}
.logo span { font-weight: 300; margin-left: 0.08em; color: var(--accent); }

.nav { display: flex; gap: 0.25rem; }
.nav a {
  padding: 0.5rem 1rem;
  border-radius: var(--r-pill);
  text-decoration: none;
  font-weight: 500;
  transition: background-color 0.2s;
}
.nav a:hover { background: color-mix(in srgb, var(--ink) 9%, transparent); }

.bar-actions { justify-self: end; display: flex; align-items: center; gap: 0.25rem; }

.menu-btn {
  display: none;
  min-height: 44px;
  padding: 0 1rem;
  border: 1.5px solid var(--line);
  border-radius: var(--r-pill);
  background: transparent;
  font-weight: 500;
}

.cart-count {
  position: absolute;
  top: 2px; right: 0;
  min-width: 20px; height: 20px;
  padding: 0 5px;
  display: grid; place-items: center;
  border-radius: var(--r-pill);
  background: var(--accent);
  color: var(--on-accent);
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1;
}
.cart-count[data-n="0"] { display: none; }
.cart-count.bump { animation: bump 0.45s var(--ease); }

@keyframes bump {
  0% { transform: scale(1); }
  40% { transform: scale(1.5); }
  100% { transform: scale(1); }
}

@media (max-width: 760px) {
  .bar { grid-template-columns: 1fr auto; }
  .menu-btn { display: inline-flex; align-items: center; }
  .nav {
    position: absolute;
    top: var(--header-h);
    left: 0; right: 0;
    flex-direction: column;
    gap: 0;
    padding: 0.5rem var(--gutter) 1rem;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    display: none;
  }
  .nav a { padding: 1rem 0; border-radius: 0; font-size: 1.25rem; border-bottom: 1px solid var(--line); }
  .nav a:last-child { border-bottom: 0; }
  .nav-open .nav { display: flex; }
}

/* ---------- Hero ---------- */
.hero { padding-top: 12px; }

.hero-panel {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: grid;
  grid-template-columns: 1fr;
  border-radius: var(--r-box);
  background: var(--block);
  color: #ffffff;
}

.hero-copy {
  position: relative;
  z-index: 2;
  align-self: end;
  padding: clamp(1.5rem, 4vw, 3.5rem);
  padding-bottom: clamp(1.75rem, 4vw, 3.5rem);
}

.hero-title {
  --wx: 0.5;
  font-size: clamp(4.25rem, 21vw, 13.5rem);
  font-weight: calc(700 + var(--wx) * 100);
  font-stretch: 84%;
  line-height: 0.92;
  letter-spacing: -0.02em;
}

/* masks for the reveal; padding keeps descenders from clipping */
.hero-title .line {
  display: block;
  overflow: hidden;
  padding-bottom: 0.14em;
  margin-bottom: -0.14em;
}
.hero-title .line > span { display: block; }

.hero-sub {
  margin-top: 1.5rem;
  max-width: 34ch;
  font-size: 1.1875rem;
  line-height: 1.5;
  color: rgb(255 255 255 / 0.92);
}

.hero-cta {
  margin-top: 2rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.hero .btn-primary { background: #ffffff; color: #0a2d7a; }
.hero .btn-primary:hover { background: #ffffff; }
.hero .btn-ghost { border-color: #ffffff; color: #ffffff; }
.hero .btn-ghost:hover { background: #ffffff; color: #0a2d7a; }

.hero-photo {
  position: relative;
  order: -1;
  height: min(62dvh, 520px);
}
.hero-photo img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: 50% 8%;
  /* photo backdrop matches the panel colour, so the edge dissolves */
  -webkit-mask-image: linear-gradient(to bottom, #000 70%, transparent 100%);
          mask-image: linear-gradient(to bottom, #000 70%, transparent 100%);
}

@media (min-width: 900px) {
  .hero-panel {
    grid-template-columns: 1fr 1fr;
    min-height: clamp(560px, calc(100dvh - var(--header-h) - 28px), 820px);
  }
  .hero-copy {
    grid-column: 1 / 3;
    grid-row: 1;
    align-self: end;
  }
  .hero-photo {
    grid-column: 2;
    grid-row: 1;
    order: 0;
    height: 100%;
  }
  .hero-photo img {
    object-position: 50% 14%;
    -webkit-mask-image: linear-gradient(to right, transparent 0%, #000 22%);
            mask-image: linear-gradient(to right, transparent 0%, #000 22%);
  }
  .hero-title { font-size: clamp(7rem, 13.5vw, 13.5rem); }
}

/* the one orchestrated moment: headline rises, photo wipes in */
@media (prefers-reduced-motion: no-preference) {
  .hero-title .line > span { animation: rise 1s var(--ease) both; }
  .hero-title .line:nth-child(2) > span { animation-delay: 0.1s; }
  .hero-sub { animation: fade 0.8s 0.45s var(--ease) both; }
  .hero-cta { animation: fade 0.8s 0.6s var(--ease) both; }
  .hero-photo img { animation: wipe 1.2s 0.05s var(--ease) both; }
}

@keyframes rise { from { transform: translateY(110%); } }
@keyframes fade { from { opacity: 0; transform: translateY(12px); } }
@keyframes wipe { from { clip-path: inset(0 0 0 100%); } to { clip-path: inset(0 0 0 0); } }

/* ---------- Shop ---------- */
.shop { padding-block: clamp(4rem, 9vw, 8rem) clamp(3rem, 6vw, 5rem); }

.shop-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.25rem 2rem;
}

.chips { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.chip {
  min-height: 44px;
  padding: 0 1.25rem;
  border: 1.5px solid var(--line);
  border-radius: var(--r-pill);
  background: var(--surface);
  font-weight: 500;
  transition: background-color 0.2s, color 0.2s, border-color 0.2s, transform 0.2s var(--ease);
}
.chip:hover { border-color: var(--ink); }
.chip:active { transform: scale(0.96); }
.chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--bg); }

.shop-count { margin-top: 1rem; color: var(--ink-2); }

.grid {
  margin-top: 2.5rem;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2rem 0.75rem;
  padding-bottom: 1.5rem;
}

@media (min-width: 720px) {
  .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 3rem 1.25rem; padding-bottom: 3rem; }
}
@media (min-width: 1100px) {
  .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* staggered columns: the grid breathes up and down instead of sitting on one baseline */
.card:nth-child(2n) { translate: 0 1.5rem; }
@media (min-width: 720px) and (max-width: 1099px) {
  .card:nth-child(2n) { translate: none; }
  .card:nth-child(3n + 2) { translate: 0 2.5rem; }
}
@media (min-width: 1100px) {
  .card:nth-child(2n) { translate: 0 3rem; }
}

.card-btn {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  text-align: left;
  color: inherit;
  text-decoration: none;
}

.card-img {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 4 / 5;
  border-radius: var(--r-box);
  background: var(--img-bg);
}
.card-img img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.7s var(--ease);
}
.card-btn:hover .card-img img,
.card-btn:focus-visible .card-img img { transform: scale(1.05); }

.card-add {
  position: absolute;
  right: 12px; bottom: 12px;
  display: grid; place-items: center;
  width: 48px; height: 48px;
  border-radius: var(--r-pill);
  background: var(--accent);
  color: var(--on-accent);
  box-shadow: var(--shadow);
  opacity: 0.0;
  transform: scale(0.6);
  transition: opacity 0.25s, transform 0.35s var(--ease);
}
.card-add [data-icon] svg { width: 22px; height: 22px; }
.card-btn:hover .card-add,
.card-btn:focus-visible .card-add { opacity: 1; transform: scale(1); }
@media (hover: none) {
  .card-add { opacity: 1; transform: none; width: 40px; height: 40px; right: 10px; bottom: 10px; }
}

.card-meta {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: 0.875rem;
  font-weight: 600;
}
.card-name { font-family: var(--font-display); font-stretch: 90%; font-size: 1.25rem; font-weight: 700; letter-spacing: -0.01em; line-height: 1.2; }
.card-price { font-variant-numeric: tabular-nums; white-space: nowrap; padding-top: 0.15rem; }
.card-sub { display: flex; align-items: center; gap: 0.5rem; margin-top: 0.125rem; color: var(--ink-2); font-size: 0.9375rem; }
.swatches-mini { display: inline-flex; gap: 4px; }
.swatches-mini i { width: 12px; height: 12px; border-radius: 50%; background: var(--c); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--ink) 22%, transparent); }

/* cards enter once as they scroll in; hover physics live on the image only */
@media (prefers-reduced-motion: no-preference) {
  html.js .card { opacity: 0; transform: translateY(28px); }
  html.js .card.in {
    opacity: 1;
    transform: none;
    transition: opacity 0.7s var(--ease), transform 0.8s var(--ease);
    transition-delay: calc(var(--i, 0) * 70ms);
  }
}

.empty {
  margin-top: 2rem;
  padding: 3rem 1.5rem;
  display: grid;
  justify-items: center;
  gap: 1.25rem;
  text-align: center;
  border: 1.5px dashed var(--line);
  border-radius: var(--r-box);
}

/* loading placeholders, same shape as the final cards */
.skel .card-img { background: linear-gradient(100deg, var(--img-bg) 30%, color-mix(in srgb, var(--img-bg) 55%, var(--surface)) 50%, var(--img-bg) 70%); background-size: 200% 100%; }
@media (prefers-reduced-motion: no-preference) {
  .skel .card-img { animation: shimmer 1.4s linear infinite; }
  html.js .card.skel { opacity: 1; transform: none; }
}
@keyframes shimmer { to { background-position: -200% 0; } }

/* ---------- Product page ---------- */
.pdp { padding-block: 1.25rem clamp(3rem, 7vw, 6rem); }

.crumbs { display: flex; flex-wrap: wrap; gap: 0.25rem 0.625rem; align-items: center; color: var(--ink-2); font-size: 0.9375rem; }
.crumbs a { padding-block: 0.5rem; text-underline-offset: 4px; }
.crumbs a:hover { color: var(--ink); text-decoration: underline; }
.crumbs [aria-current] { color: var(--ink); font-weight: 500; }

.pdp-grid { display: grid; gap: 2rem; margin-top: 1rem; }
.pdp-photo img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: var(--r-box); background: var(--img-bg); }
.pdp-info { display: grid; gap: 1rem; align-content: start; }
.pdp-sub { color: var(--ink-2); margin-top: -0.5rem; }
.pdp-price { font-size: 1.75rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.pdp-desc { max-width: 50ch; font-size: 1.0625rem; }
.pdp-info .sizes { margin: 0.5rem 0 0; }
.pdp-info .btn:disabled { opacity: 0.55; cursor: not-allowed; }
.pdp-facts { display: grid; gap: 0.75rem; margin-top: 1rem; padding-top: 1.5rem; border-top: 1.5px solid var(--line); color: var(--ink-2); }
.pdp-facts li { display: grid; grid-template-columns: 28px 1fr; gap: 0.75rem; align-items: start; }
.pdp-facts [data-icon] { color: var(--accent); }
.pdp-facts [data-icon] svg { width: 24px; height: 24px; }

@media (min-width: 900px) {
  .pdp-grid { grid-template-columns: 7fr 5fr; gap: clamp(2.5rem, 6vw, 6rem); align-items: start; margin-top: 1.5rem; }
  .pdp-photo { position: sticky; top: calc(var(--header-h) + 24px); }
  .pdp-info { padding-top: 1rem; }
}

.more { margin-top: clamp(4rem, 8vw, 7rem); }
.more-grid { margin-top: 1.5rem; padding-bottom: 0; }
.more-grid .card { translate: none; }
@media (max-width: 1099px) { .more-grid .card:nth-child(n + 4) { display: none; } }

.lost { display: grid; gap: 1.25rem; justify-items: start; padding-block: clamp(4rem, 10vw, 8rem); }
.lost p { max-width: 46ch; color: var(--ink-2); }

/* colour picker on the product page */
.swatches { margin: 0.25rem 0 0; padding: 0; border: 0; min-width: 0; }
.swatches legend { padding: 0; margin-bottom: 0.75rem; font-weight: 600; }
.swatches legend span { font-weight: 400; color: var(--ink-2); }
.swatch-row { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.swatch { position: relative; display: block; cursor: pointer; }
.swatch input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.swatch-chip {
  display: block;
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--c);
  box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--ink) 22%, transparent);
  transition: box-shadow 0.25s var(--ease), transform 0.25s var(--ease);
}
.swatch:hover .swatch-chip { transform: scale(1.06); }
.swatch input:checked + .swatch-chip { box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--ink) 22%, transparent), 0 0 0 3px var(--bg), 0 0 0 5px var(--ink); }
.swatch input:focus-visible + .swatch-chip { outline: 3px solid var(--accent); outline-offset: 6px; }
.swatch.out .swatch-chip { opacity: 0.4; background-image: linear-gradient(to top right, transparent calc(50% - 1px), var(--ink) 50%, transparent calc(50% + 1px)); }

/* ---------- Quality ---------- */
.quality { padding-block: clamp(3rem, 7vw, 7rem); }

.quality-grid {
  display: grid;
  gap: 2.5rem;
}

.quality-photo img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: var(--r-box);
}

.facts { margin-top: 2.5rem; }
.facts li {
  display: grid;
  grid-template-columns: 40px 1fr;
  gap: 1rem;
  padding-block: 1.75rem;
}
.facts li + li { border-top: 1.5px solid var(--line); }
.fact-icon { color: var(--accent); padding-top: 0.2rem; }
.fact-icon svg { width: 32px !important; height: 32px !important; }
.facts h3 {
  font-family: var(--font-display);
  font-stretch: 88%;
  font-size: clamp(1.5rem, 2.6vw, 2rem);
  font-weight: 720;
  letter-spacing: -0.02em;
  line-height: 1.1;
}
.facts p { margin-top: 0.5rem; color: var(--ink-2); max-width: 46ch; }

@media (min-width: 900px) {
  .quality-grid { grid-template-columns: 5fr 7fr; gap: clamp(3rem, 7vw, 7rem); align-items: start; }
  .quality-photo { position: sticky; top: calc(var(--header-h) + 24px); }
  .quality-copy { padding-top: 2rem; }
}

/* ---------- Custom print ---------- */
.custom { padding-block: clamp(3rem, 6vw, 5rem) clamp(4rem, 8vw, 7rem); }

.custom-block {
  display: grid;
  gap: 2rem;
  padding: clamp(1.25rem, 4vw, 3.5rem);
  border-radius: var(--r-box);
  background: var(--block);
  color: #ffffff;
}

.custom-photo img {
  width: 100%;
  height: 100%;
  min-height: 280px;
  max-height: 560px;
  object-fit: cover;
  border-radius: var(--r-media);
}

.custom-copy .lead { margin-top: 1rem; color: rgb(255 255 255 / 0.92); }

@media (min-width: 900px) {
  .custom-block { grid-template-columns: 5fr 6fr; gap: clamp(2.5rem, 5vw, 5rem); align-items: stretch; }
  .custom-photo img { max-height: none; }
}

.form { margin-top: 2rem; display: grid; gap: 1.25rem; }
@media (min-width: 640px) {
  .form { grid-template-columns: 1fr 1fr; }
  .form .field:nth-child(n+3), .form .btn, .form .form-ok { grid-column: 1 / -1; }
  .form .btn { justify-self: start; }
}

.field { display: grid; gap: 0.5rem; align-content: start; }
.field > label:first-child { font-weight: 600; }

input[type="text"], input[type="email"], input[type="tel"], select, textarea {
  width: 100%;
  min-height: 52px;
  padding: 0 1rem;
  border: 1.5px solid var(--line);
  border-radius: var(--r-input);
  background: var(--surface);
  color: var(--ink);
}
select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%); background-position: calc(100% - 22px) 50%, calc(100% - 16px) 50%; background-size: 6px 6px; background-repeat: no-repeat; padding-right: 2.5rem; }
input::placeholder { color: var(--ink-2); opacity: 1; }
input[aria-invalid="true"] { border-color: var(--danger); }
.custom input:focus-visible, .custom select:focus-visible, .custom .drop:focus-within { outline-color: #ffffff; }

.drop {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-height: 52px;
  padding: 0 1rem;
  border: 1.5px dashed rgb(255 255 255 / 0.7);
  border-radius: var(--r-input);
  cursor: pointer;
  transition: background-color 0.2s;
}
.drop:hover { background: rgb(255 255 255 / 0.12); }
.drop:focus-within { outline: 3px solid #ffffff; outline-offset: 3px; }
.drop span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.err { color: var(--danger); font-size: 0.9375rem; font-weight: 500; }
.custom .err {
  justify-self: start;
  padding: 0.3rem 0.7rem;
  border-radius: 8px;
  background: #ffffff;
  color: #a4161f;
}
.form-ok { font-weight: 600; }
.custom .form-ok { padding: 1rem 1.25rem; border-radius: var(--r-input); background: rgb(255 255 255 / 0.16); }

/* ---------- Footer ---------- */
.site-footer {
  overflow: hidden;
  padding-top: clamp(3rem, 6vw, 5rem);
  border-top: 1.5px solid var(--line);
}

.foot-top { display: grid; gap: 2.5rem; }
@media (min-width: 900px) {
  .foot-top { grid-template-columns: 1fr auto; align-items: start; gap: 4rem; }
}

.news-title { font-family: var(--font-display); font-stretch: 88%; font-size: 1.75rem; font-weight: 740; letter-spacing: -0.02em; }
.news-sub { margin-top: 0.25rem; color: var(--ink-2); }
.news-row { margin-top: 1.25rem; display: flex; flex-wrap: wrap; gap: 0.5rem; }
.news-row input { flex: 1 1 220px; width: auto; }
.news .err, .news .form-ok { margin-top: 0.75rem; }

.foot-links { display: grid; grid-template-columns: 1fr 1fr; gap: 0.25rem 2rem; align-content: start; }
.foot-links a { padding: 0.5rem 0; text-decoration: none; }
.foot-links a:hover { text-decoration: underline; text-underline-offset: 4px; }

.social { display: flex; gap: 0.25rem; }
.foot-box .social { margin-top: 1rem; }
.social .icon-btn { border: 1.5px solid var(--line); border-radius: var(--r-input); }

.mega {
  margin-top: clamp(2.5rem, 6vw, 5rem);
  font-size: clamp(6rem, 25vw, 23rem);
  font-weight: 800;
  font-stretch: 80%;
  letter-spacing: -0.02em;
  line-height: 0.78;
  white-space: nowrap;
  color: var(--accent);
  text-align: center;
  user-select: none;
}
.copy { padding-block: 1.5rem; color: var(--ink-2); font-size: 0.9375rem; }

/* ---------- Dialogs ---------- */
dialog { padding: 0; border: 0; color: var(--ink); }
dialog::backdrop { background: rgb(8 14 40 / 0.55); backdrop-filter: blur(4px); }
dialog[open]::backdrop { animation: fadeIn 0.3s ease both; }
dialog.closing::backdrop { animation: fadeOut 0.2s ease both; }
@keyframes fadeIn { from { opacity: 0; } }
@keyframes fadeOut { to { opacity: 0; } }

.modal {
  width: min(960px, calc(100% - 2 * var(--gutter)));
  max-height: calc(100dvh - 2 * var(--gutter));
  margin: auto;
  overflow: auto;
  border-radius: var(--r-box);
  background: var(--surface);
}
.modal[open] { animation: pop 0.45s var(--ease) both; }
.modal.closing { animation: popOut 0.2s ease both; }
@keyframes pop { from { opacity: 0; transform: translateY(24px) scale(0.97); } }
@keyframes popOut { to { opacity: 0; transform: translateY(16px) scale(0.98); } }

.modal-inner { position: relative; display: grid; }
.modal-close { position: absolute; top: 10px; right: 10px; z-index: 2; background: var(--surface); box-shadow: 0 2px 12px rgb(0 0 0 / 0.15); }
.modal-photo { background: var(--img-bg); }
.modal-photo img { width: 100%; height: 100%; max-height: 52dvh; object-fit: cover; }
.modal-info { padding: clamp(1.25rem, 3vw, 2.5rem); display: grid; gap: 0.75rem; align-content: start; }

@media (min-width: 760px) {
  .modal-inner { grid-template-columns: 1fr 1fr; }
  .modal-photo img { max-height: none; }
}

.p-sub { color: var(--ink-2); }
.p-price { font-size: 1.5rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.p-desc { max-width: 46ch; }
.p-note { color: var(--ink-2); font-size: 0.9375rem; }

.sizes { margin: 0.75rem 0 0.5rem; padding: 0; border: 0; min-width: 0; }
.sizes legend { padding: 0; margin-bottom: 0.625rem; font-weight: 600; }
.size-row { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.size {
  min-width: 52px; min-height: 48px;
  padding: 0 0.75rem;
  border: 1.5px solid var(--line);
  border-radius: var(--r-pill);
  background: transparent;
  font-weight: 600;
  transition: background-color 0.2s, border-color 0.2s, color 0.2s, transform 0.2s var(--ease);
}
.size:hover:not(:disabled) { border-color: var(--ink); }
.size:active:not(:disabled) { transform: scale(0.94); }
.size[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.size:disabled { color: var(--ink-2); text-decoration: line-through; opacity: 0.55; cursor: not-allowed; }
.sizes .err { margin-top: 0.625rem; }

.drawer {
  width: min(440px, 100%);
  height: 100dvh;
  max-height: none;
  margin: 0 0 0 auto;
  background: var(--surface);
  border-radius: var(--r-box) 0 0 var(--r-box);
}
.drawer[open] { animation: slideIn 0.5s var(--ease) both; }
.drawer.closing { animation: slideOut 0.25s ease both; }
@keyframes slideIn { from { transform: translateX(100%); } }
@keyframes slideOut { to { transform: translateX(100%); } }

.drawer-inner {
  height: 100%;
  display: flex;
  flex-direction: column;
  padding: 1rem 1.25rem 1.25rem;
}
.drawer-head { display: flex; align-items: center; justify-content: space-between; padding-block: 0.25rem 0.75rem; }

.ship { padding: 0.75rem 0 1rem; font-size: 0.9375rem; }
.ship-bar { margin-top: 0.5rem; height: 6px; border-radius: var(--r-pill); background: var(--line); overflow: hidden; }
.ship-bar span { display: block; height: 100%; width: var(--p, 0%); background: var(--accent); border-radius: inherit; transition: width 0.5s var(--ease); }

.lines { flex: 1; overflow: auto; margin-inline: -0.25rem; padding-inline: 0.25rem; }
.line-item {
  display: grid;
  grid-template-columns: 84px 1fr;
  gap: 1rem;
  padding-block: 1rem;
}
.line-item + .line-item { border-top: 1.5px solid var(--line); }
.line-item img { width: 84px; aspect-ratio: 4 / 5; object-fit: cover; border-radius: var(--r-media); background: var(--img-bg); }
.li-top { display: flex; justify-content: space-between; gap: 0.75rem; font-weight: 600; }
.li-top strong { font-family: var(--font-display); font-stretch: 90%; font-size: 1.125rem; font-weight: 700; }
.li-sub { color: var(--ink-2); font-size: 0.9375rem; }
.li-bottom { margin-top: 0.75rem; display: flex; align-items: center; justify-content: space-between; }

.qty { display: inline-flex; align-items: center; border: 1.5px solid var(--line); border-radius: var(--r-pill); }
.qty button { width: 44px; height: 44px; display: grid; place-items: center; border: 0; background: none; border-radius: var(--r-pill); }
.qty button:hover:not(:disabled) { background: color-mix(in srgb, var(--ink) 9%, transparent); }
.qty button:disabled { opacity: 0.35; cursor: not-allowed; }
.qty output { min-width: 1.75rem; text-align: center; font-weight: 600; font-variant-numeric: tabular-nums; }
.qty [data-icon] svg { width: 18px; height: 18px; }

.cart-empty { flex: 1; display: grid; place-content: center; justify-items: center; gap: 1.25rem; text-align: center; }

.drawer-foot { padding-top: 1rem; border-top: 1.5px solid var(--line); display: grid; gap: 0.75rem; }
.totals { margin: 0; display: grid; gap: 0.375rem; }
.totals > div { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; }
.totals dt { color: var(--ink-2); }
.totals dd { margin: 0; font-variant-numeric: tabular-nums; }
.totals .grand { margin-top: 0.375rem; padding-top: 0.625rem; border-top: 1.5px solid var(--line); font-size: 1.125rem; font-weight: 700; }
.totals .grand dt { color: var(--ink); }
.totals .grand dd { font-size: 1.5rem; }

.check { display: grid; grid-template-columns: 24px 1fr; gap: 0.75rem; align-items: start; font-size: 0.9375rem; cursor: pointer; }
.check input { width: 24px; height: 24px; margin: 0; accent-color: var(--accent); cursor: pointer; }
.check a { text-underline-offset: 3px; }
.legal .err { margin-top: 0.5rem; }
.pp-box { min-height: 52px; }
.pp-box.pp-failed { padding: 0.875rem 1rem; border-radius: var(--r-input); background: color-mix(in srgb, var(--danger) 12%, var(--surface)); font-size: 0.9375rem; }

.thanks { width: min(480px, calc(100% - 2 * var(--gutter))); margin: auto; border-radius: var(--r-box); background: var(--surface); }
.thanks[open] { animation: pop 0.45s var(--ease) both; }
.thanks.closing { animation: popOut 0.2s ease both; }
.thanks-inner { display: grid; gap: 1rem; justify-items: start; padding: clamp(1.5rem, 4vw, 2.5rem); }

/* ---------- Toast ---------- */
.toast {
  position: fixed;
  left: 50%; bottom: 20px;
  z-index: 200;
  max-width: calc(100% - 32px);
  padding: 0.875rem 1.25rem;
  border-radius: var(--r-pill);
  background: var(--ink);
  color: var(--bg);
  font-weight: 500;
  text-align: center;
  box-shadow: 0 16px 40px -12px rgb(0 0 0 / 0.5);
  opacity: 0;
  transform: translate(-50%, 24px);
  pointer-events: none;
  transition: opacity 0.25s, transform 0.4s var(--ease);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Reduced motion ---------- */
@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;
  }
}

/* textarea in forms */
textarea { width: 100%; min-height: 110px; padding: 0.8rem 1rem; border: 1.5px solid var(--line); border-radius: var(--r-input); background: var(--surface); color: var(--ink); line-height: 1.5; resize: vertical; }
.custom textarea:focus-visible { outline-color: #ffffff; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; } /* honeypot for bots */
.form-fine { font-size: 0.875rem; color: rgb(255 255 255 / 0.85); }
.form-fine a { color: inherit; }
@media (min-width: 640px) { .form .form-fine { grid-column: 1 / -1; } .form .field:has(textarea) { grid-column: 1 / -1; } }

/* legal pages */
.legal { padding-block: clamp(2rem, 6vw, 5rem); }
.prose { max-width: 72ch; }
.prose h2 { margin: 2.25rem 0 0.75rem; font-family: var(--font-display); font-stretch: 88%; font-size: clamp(1.5rem, 3vw, 1.875rem); font-weight: 740; letter-spacing: -0.01em; line-height: 1.15; }
.prose h2:first-child { margin-top: 0; font-size: clamp(2.25rem, 5vw, 3.25rem); font-weight: 760; }
.prose h3 { margin: 2rem 0 0.5rem; font-family: var(--font-display); font-stretch: 90%; font-size: 1.375rem; font-weight: 720; letter-spacing: -0.005em; line-height: 1.2; }
.prose p, .prose ul { margin: 0 0 1rem; }
.prose ul { padding-left: 1.25rem; list-style: disc; }
.prose li { margin-bottom: 0.375rem; }
.prose a { color: var(--accent); text-underline-offset: 3px; }
.legal-note { margin: 0 0 2rem; padding: 0.875rem 1.125rem; border-radius: var(--r-input); background: color-mix(in srgb, var(--danger) 12%, var(--surface)); font-weight: 500; }
.foot-contact { margin: 0; font-size: 1.125rem; }
.foot-contact a { color: var(--accent); text-underline-offset: 4px; }

/* custom print form: file field and rights checkbox */
.custom input[type="file"] { width: 100%; padding: 0.75rem; border-radius: var(--r-input); background: rgb(255 255 255 / 0.12); border: 1.5px solid rgb(255 255 255 / 0.5); color: inherit; font: inherit; }
.custom input[type="file"]::file-selector-button { margin-right: 0.75rem; padding: 0.5rem 1rem; border: 0; border-radius: var(--r-input); background: #ffffff; color: var(--accent); font: inherit; font-weight: 600; cursor: pointer; }
.custom .hint { font-size: 0.875rem; color: rgb(255 255 255 / 0.85); margin: 0; }
.custom .check { color: inherit; }
.custom .check input { accent-color: #ffffff; }
.custom .check input:focus-visible { outline: 3px solid #ffffff; outline-offset: 2px; }
.custom #cRightsRow[hidden] { display: none; }

/* ---------- Logo in the header ---------- */
.logo-img { display: inline-flex; align-items: center; gap: 0.6rem; }
.logo-img img { display: block; height: 42px; width: auto; }
.logo-text { font-size: 1.5rem; }
.logo-text span { font-weight: 300; margin-left: 0.08em; color: var(--accent); }
[data-brand="afromania"] .logo-img img { height: 48px; }
@media (max-width: 480px) {
  .logo-text { display: none; }
}

/* ---------- Afromania: black and white with a warm accent ---------- */
:root[data-brand="afromania"] {
  --bg: #f6f3ee;
  --ink: #14110f;
  --ink-2: #5a524a;
  --line: #e0d8cd;
  --accent: #c2410c;
  --accent-hover: #ea580c;
  --block: #14110f;
  --img-bg: #ece6dc;
  --shadow: 0 24px 48px -24px rgb(20 12 4 / 0.38);
}
@media (prefers-color-scheme: dark) {
  :root[data-brand="afromania"]:not([data-theme="light"]) {
    --bg: #0f0d0b;
    --surface: #1a1612;
    --ink: #f5efe6;
    --ink-2: #b3a899;
    --line: #2e2822;
    --accent: #ff8a4c;
    --accent-hover: #ffa670;
    --on-accent: #1a0d05;
    --block: #231d17;
  }
  :root[data-brand="afromania"]:not([data-theme="light"]) .logo-img img { filter: invert(1); }
}
:root[data-brand="afromania"][data-theme="dark"] {
  --bg: #0f0d0b;
  --surface: #1a1612;
  --ink: #f5efe6;
  --ink-2: #b3a899;
  --line: #2e2822;
  --accent: #ff8a4c;
  --accent-hover: #ffa670;
  --on-accent: #1a0d05;
  --block: #231d17;
}
:root[data-brand="afromania"][data-theme="dark"] .logo-img img { filter: invert(1); }
[data-brand="afromania"] .btn-light,
[data-brand="afromania"] .hero .btn-primary,
[data-brand="afromania"] .hero .btn-ghost:hover { color: #14110f; }
[data-brand="afromania"] .hero-title { font-size: clamp(3.5rem, 8.5vw, 8.5rem); }

/* the Afromania logo is black on transparent: shown white on the dark hero panel */
.hero-logo { display: grid; place-items: center; padding: clamp(1.5rem, 4vw, 3rem); }
.hero-logo img {
  width: 100%; height: 100%;
  object-fit: contain;
  object-position: center;
  filter: invert(1);
  -webkit-mask-image: none;
          mask-image: none;
}
@media (min-width: 900px) {
  .hero-logo img { object-position: center; -webkit-mask-image: none; mask-image: none; }
}
.mega-long { font-size: clamp(3.5rem, 17.5vw, 16rem); }

/* ---------- Switch to the other shop ---------- */
.shop-switch {
  display: inline-flex; align-items: center; gap: 0.4rem;
  margin-right: 0.5rem; padding: 0.4rem 0.9rem;
  border: 1.5px solid var(--line); border-radius: var(--r-pill);
  font-weight: 600; font-size: 0.9375rem; line-height: 1.2;
  text-decoration: none; color: var(--ink); white-space: nowrap;
  transition: background-color 0.2s, border-color 0.2s;
}
.shop-switch:hover { background: color-mix(in srgb, var(--ink) 9%, transparent); border-color: var(--ink); }
.shop-switch small { font-size: inherit; font-weight: 400; color: var(--ink-2); }
.nav .nav-switch { display: none; }
@media (max-width: 760px) {
  .bar-actions .shop-switch { display: none; }
  .nav .nav-switch { display: block; font-weight: 700; }
}

.custom-about { margin: 0 0 1.5rem; max-width: 46ch; font-size: .95rem; line-height: 1.55; color: rgb(255 255 255 / 0.78); }

/* The header logo only appears once the hero is scrolled past */
:root:has(.hero):not(.past-hero) .site-header .logo-img { opacity: 0; visibility: hidden; }
.site-header .logo-img { transition: opacity 0.3s ease, visibility 0.3s; }

.contact { padding-block: 0 clamp(4rem, 8vw, 7rem); }
.contact-grid { display: grid; gap: 2rem; align-items: start; }
@media (min-width: 860px) { .contact-grid { grid-template-columns: 1fr 1fr; gap: 4rem; } }
.contact .form { margin-top: 0; }
.contact .form-fine { color: var(--ink-2); }

.zone { margin-bottom: 1rem; }
.zone label { font-weight: 600; font-size: 0.9375rem; }
.zone select { min-height: 44px; }

.size-note { margin-top: 0.75rem; font-size: 0.9rem; color: var(--ink-2); }
.size-note a { color: inherit; text-underline-offset: 3px; }
