/* ============================================================
   TRUSTED SELLERS · stylesheet v3
   Warm-light editorial catalog. One type family (Archivo, using
   its width axis for hierarchy), one accent (cobalt), seller
   colours used only as small swatches and page washes.
   No build step: this file is the whole design system.
   ============================================================ */

/* ---------- 1. Tokens ---------- */
/* ---------- 0. Fonts (self-hosted; no third-party font requests) ---------- */
@font-face { font-family: "Archivo"; font-style: normal; font-weight: 400 800; font-stretch: 75% 125%; font-display: swap;
  src: url("../fonts/archivo-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Archivo"; font-style: normal; font-weight: 400 800; font-stretch: 75% 125%; font-display: swap;
  src: url("../fonts/archivo-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Archivo"; font-style: normal; font-weight: 400 800; font-stretch: 75% 125%; font-display: swap;
  src: url("../fonts/archivo-vietnamese.woff2") format("woff2");
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB; }

:root {
  --paper: #f3f2ee;      /* page ground: warm stone */
  --paper-2: #e9e7e1;    /* bands, hover fills, skeletons */
  --tile: #fbfbf9;       /* product tiles: near-white so seller photos blend in */
  --field: #fdfdfb;      /* inputs, popovers */
  --ink: #22211e;
  --ink-2: #55524b;      /* secondary text, 7:1 on paper */
  --ink-3: #6f6b63;      /* meta text, 4.6:1 on paper */
  --line: #dcd9d2;
  --line-2: #b9b5ab;
  --accent: #2f4fd6;     /* cobalt: links, selection, focus */
  --accent-strong: #2340bd;
  --accent-soft: #e3e7fa;
  --seller: var(--accent); /* overridden per seller via inline style */
  --on-accent: #ffffff;   /* text on accent fills */
  --ink-strong: #0f0e0c;  /* primary button hover */
  --danger: #b3261e;
  --scrim: rgba(34, 33, 30, 0.42);
  --shimmer: rgba(255, 255, 255, 0.55);
  --img-filter: none;     /* dark mode dims bright seller photos slightly */
  --caret: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 256 256' fill='%2355524b'%3E%3Cpath d='M213.66 101.66l-80 80a8 8 0 0 1-11.32 0l-80-80A8 8 0 0 1 53.66 90.34L128 164.69l74.34-74.35a8 8 0 0 1 11.32 11.32Z'/%3E%3C/svg%3E");
  color-scheme: light;

  --font: "Archivo", "Helvetica Neue", Helvetica, Arial, sans-serif;

  --r-1: 4px;   /* controls */
  --r-2: 8px;   /* tiles, panels */

  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --t-fast: 140ms;
  --t: 200ms;

  --shadow-1: 0 1px 2px rgba(34, 33, 30, 0.06), 0 10px 28px -14px rgba(34, 33, 30, 0.2);
  --shadow-2: 0 24px 60px -24px rgba(34, 33, 30, 0.38);

  --header-h: 64px;
  --wrap: 1400px;
  --gutter: clamp(1rem, 2.5vw, 2.5rem);

  --z-header: 40;
  --z-drawer: 60;
  --z-overlay: 70;
  --z-toast: 80;
  --z-lightbox: 90;
}

/* Dark theme: warm near-black, same structure. Follows the system unless the
   visitor picks a theme (theme.js sets data-theme on <html> before first paint). */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
  --paper: #151412;
  --paper-2: #1f1d1a;
  --tile: #1b1a17;
  --field: #1d1c19;
  --ink: #f1efea;
  --ink-2: #b4b0a7;
  --ink-3: #8d897f;
  --line: #2b2926;
  --line-2: #48453f;
  --accent: #7d95ff;
  --accent-strong: #99acff;
  --accent-soft: #232b4d;
  --on-accent: #0f1330;
  --ink-strong: #ffffff;
  --danger: #f0847c;
  --scrim: rgba(0, 0, 0, 0.62);
  --shimmer: rgba(255, 255, 255, 0.06);
  --img-filter: brightness(0.9);
  --caret: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 256 256' fill='%23b4b0a7'%3E%3Cpath d='M213.66 101.66l-80 80a8 8 0 0 1-11.32 0l-80-80A8 8 0 0 1 53.66 90.34L128 164.69l74.34-74.35a8 8 0 0 1 11.32 11.32Z'/%3E%3C/svg%3E");
  --shadow-1: 0 1px 2px rgba(0, 0, 0, 0.4), 0 10px 28px -14px rgba(0, 0, 0, 0.7);
  --shadow-2: 0 24px 60px -24px rgba(0, 0, 0, 0.85);
  color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #151412;
  --paper-2: #1f1d1a;
  --tile: #1b1a17;
  --field: #1d1c19;
  --ink: #f1efea;
  --ink-2: #b4b0a7;
  --ink-3: #8d897f;
  --line: #2b2926;
  --line-2: #48453f;
  --accent: #7d95ff;
  --accent-strong: #99acff;
  --accent-soft: #232b4d;
  --on-accent: #0f1330;
  --ink-strong: #ffffff;
  --danger: #f0847c;
  --scrim: rgba(0, 0, 0, 0.62);
  --shimmer: rgba(255, 255, 255, 0.06);
  --img-filter: brightness(0.9);
  --caret: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 256 256' fill='%23b4b0a7'%3E%3Cpath d='M213.66 101.66l-80 80a8 8 0 0 1-11.32 0l-80-80A8 8 0 0 1 53.66 90.34L128 164.69l74.34-74.35a8 8 0 0 1 11.32 11.32Z'/%3E%3C/svg%3E");
  --shadow-1: 0 1px 2px rgba(0, 0, 0, 0.4), 0 10px 28px -14px rgba(0, 0, 0, 0.7);
  --shadow-2: 0 24px 60px -24px rgba(0, 0, 0, 0.85);
  color-scheme: dark;
}

/* ---------- 2. Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
img { height: auto; }
button, input, select, textarea { font: inherit; color: inherit; }
button { background: none; border: 0; padding: 0; cursor: pointer; }
a { color: inherit; text-decoration: none; }
ul, ol { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4, p, figure { margin: 0; }
h1, h2, h3 { text-wrap: balance; }
p { text-wrap: pretty; }
::selection { background: var(--accent); color: var(--on-accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 2px; }
[hidden] { display: none !important; }
.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;
}
.icon { display: inline-block; width: 1.125em; height: 1.125em; flex: 0 0 auto; }
.icon svg { width: 100%; height: 100%; }

/* ---------- 3. Type ---------- */
.display {
  font-weight: 800;
  font-stretch: 115%;
  letter-spacing: -0.035em;
  line-height: 0.95;
  font-size: clamp(2.5rem, 1.5rem + 4vw, 4.75rem);
}
.title {
  font-weight: 700;
  font-stretch: 108%;
  letter-spacing: -0.025em;
  line-height: 1.05;
  font-size: clamp(1.5rem, 1.2rem + 1.4vw, 2.125rem);
}
.title-sm {
  font-weight: 700;
  font-stretch: 105%;
  letter-spacing: -0.02em;
  line-height: 1.1;
  font-size: 1.25rem;
}
.label {
  font-size: 0.75rem;
  font-weight: 600;
  font-stretch: 92%;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.lede {
  font-size: clamp(1.0625rem, 1rem + 0.35vw, 1.25rem);
  line-height: 1.5;
  color: var(--ink-2);
  max-width: 46ch;
}
.muted { color: var(--ink-2); }
.faint { color: var(--ink-3); }
.small { font-size: 0.875rem; }
.tiny { font-size: 0.8125rem; }
.num, .price { font-variant-numeric: tabular-nums; }
.price { font-weight: 600; letter-spacing: -0.01em; }
.new-tag { color: var(--accent); font-weight: 600; }

/* ---------- 4. Layout ---------- */
.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-top: clamp(2.5rem, 5vw, 4.5rem); }
.section-head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 1rem; flex-wrap: wrap; margin-bottom: 1.25rem;
}
.section-head .title { flex: 1 1 auto; }
.section-sub { color: var(--ink-2); max-width: 60ch; margin-top: 0.5rem; }
.more {
  display: inline-flex; align-items: center; gap: 0.3rem;
  font-size: 0.875rem; font-weight: 500; color: var(--ink-2);
  transition: color var(--t-fast);
}
.more:hover { color: var(--ink); }
.more .icon { width: 16px; height: 16px; }
.grid-host { container-type: inline-size; }
.mt-1 { margin-top: 0.5rem; } .mt-2 { margin-top: 1rem; } .mt-3 { margin-top: 1.5rem; } .mt-4 { margin-top: 2.5rem; }

/* ---------- 5. Header ---------- */
.skip-link {
  position: fixed; top: 0; left: 0; z-index: 200;
  transform: translateY(-130%);
  background: var(--ink); color: var(--paper);
  padding: 0.6rem 1rem; font-weight: 600; font-size: 0.875rem;
  border-radius: 0 0 var(--r-1) 0;
  transition: transform var(--t-fast);
}
.skip-link:focus { transform: none; outline: none; }

.site-header {
  position: sticky; top: 0; z-index: var(--z-header);
  background: color-mix(in oklab, var(--paper) 94%, transparent);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--t) var(--ease);
}
.site-header.is-stuck { border-bottom-color: var(--line); }
.header-bar { display: flex; align-items: center; gap: 1rem; height: var(--header-h); }
@media (min-width: 900px) { .header-bar { gap: 1.25rem; } }
@media (min-width: 1100px) { .header-bar { gap: 1.75rem; } }
@media (min-width: 900px) and (max-width: 1099px) { .icon-btn.has-label > .u-hide-sm { display: none !important; } .header-search { flex-basis: 260px; } }

.wordmark {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-weight: 700; font-stretch: 110%; letter-spacing: -0.02em;
  font-size: 1.0625rem; white-space: nowrap;
}
.wordmark .icon { width: 1.3rem; height: 1.3rem; color: var(--accent); }

.nav { display: none; gap: 1.25rem; flex: 0 0 auto; }
@media (min-width: 900px) { .nav { display: flex; } }
.nav a {
  position: relative; padding: 0.35rem 0; white-space: nowrap;
  font-size: 0.9375rem; font-weight: 500; color: var(--ink-2);
  transition: color var(--t-fast);
}
.nav a:hover, .nav a[aria-current="page"] { color: var(--ink); }
.nav a[aria-current="page"]::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -3px;
  height: 2px; background: var(--accent);
}

.header-search { display: none; flex: 0 1 340px; min-width: 0; margin-left: auto; transition: opacity var(--t) var(--ease); }
@media (min-width: 700px) { .header-search { display: flex; } }
.header-search.is-hidden { opacity: 0; pointer-events: none; }

.header-actions { display: flex; align-items: center; gap: 0.125rem; margin-left: auto; }
@media (min-width: 700px) { .header-actions { margin-left: 0; } }

.icon-btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center;
  gap: 0.4rem; height: 44px; min-width: 44px; padding: 0 0.5rem;
  border-radius: var(--r-1); color: var(--ink-2);
  font-size: 0.875rem; font-weight: 500;
  transition: color var(--t-fast), background-color var(--t-fast);
}
.icon-btn:hover { color: var(--ink); background: var(--paper-2); }
.icon-btn .icon { width: 22px; height: 22px; }
.count-badge {
  position: absolute; top: 5px; right: 3px;
  min-width: 17px; height: 17px; padding: 0 4px;
  border-radius: 999px; background: var(--accent); color: var(--on-accent);
  font-size: 0.6875rem; font-weight: 700; line-height: 17px; text-align: center;
  font-variant-numeric: tabular-nums;
  transform: scale(0); transition: transform var(--t) var(--ease);
}
.count-badge.has-items { transform: scale(1); }
@media (min-width: 700px) {
  .icon-btn.has-label .count-badge { position: static; transform: none; display: none; }
  .icon-btn.has-label .count-badge.has-items { display: inline-block; }
}

.cur {
  appearance: none; -webkit-appearance: none;
  height: 40px; padding: 0 1.3rem 0 0.5rem;
  border: 0; border-radius: var(--r-1); background: transparent;
  font-size: 0.875rem; font-weight: 500; color: var(--ink-2); cursor: pointer;
  background-image: var(--caret);
  background-repeat: no-repeat; background-position: right 0.4rem center; background-size: 12px;
  transition: color var(--t-fast), background-color var(--t-fast);
}
.cur:hover { color: var(--ink); background-color: var(--paper-2); }

.theme-ctl { position: relative; display: inline-flex; align-items: center; }
.theme-ctl > .icon { position: absolute; left: 0.55rem; width: 16px; height: 16px; color: var(--ink-2); pointer-events: none; }
.theme-ctl .cur { padding-left: 1.9rem; }
.theme-ctl .select { padding-left: 2rem; }

.mobile-nav { display: none; padding: 0.25rem 0 1rem; border-top: 1px solid var(--line); }
.mobile-nav.is-open { display: grid; }
.mobile-nav a { padding: 0.7rem 0; font-size: 1.0625rem; font-weight: 500; color: var(--ink-2); }
.mobile-nav a[aria-current="page"] { color: var(--ink); }
.mobile-nav .mobile-cur { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 0.7rem 0; font-size: 0.9375rem; color: var(--ink-2); border-top: 1px solid var(--line); margin-top: 0.25rem; }
@media (min-width: 900px) { .mobile-nav { display: none !important; } }

/* ---------- 6. Search ---------- */
.search-wrap { position: relative; width: 100%; }
.search {
  display: flex; align-items: center; gap: 0.6rem; width: 100%;
  height: 44px; padding: 0 0.85rem;
  background: var(--field); border: 1px solid var(--line-2); border-radius: var(--r-1);
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
}
.search:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.search .icon { width: 18px; height: 18px; color: var(--ink-3); }
.search input { flex: 1; min-width: 0; border: 0; background: transparent; outline: none; font-size: 0.9375rem; padding: 0; }
.search input::placeholder { color: var(--ink-3); opacity: 1; }
.search--hero { height: 56px; padding: 0 1.1rem; max-width: 620px; }
.search--hero .icon { width: 22px; height: 22px; }
.search--hero input { font-size: 1.0625rem; }

.search-pop {
  position: absolute; top: calc(100% + 6px); left: 0; right: 0; z-index: 30;
  display: none; overflow: hidden;
  background: var(--field); border: 1px solid var(--line-2); border-radius: var(--r-2);
  box-shadow: var(--shadow-2);
}
.search-pop.is-open { display: block; }
.search-pop a {
  display: grid; grid-template-columns: 44px 1fr auto; gap: 0.75rem; align-items: center;
  padding: 0.5rem 0.75rem; transition: background-color var(--t-fast);
}
.search-pop a:hover, .search-pop a:focus-visible { background: var(--paper); outline: none; }
.search-pop .thumb { width: 44px; height: 44px; border-radius: var(--r-1); overflow: hidden; background: var(--paper-2); }
.search-pop .thumb img { width: 100%; height: 100%; object-fit: cover; }
.search-pop .name { font-size: 0.875rem; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.search-pop .meta { font-size: 0.75rem; color: var(--ink-3); }
.search-pop .price { font-size: 0.875rem; }
.search-pop .foot, .search-pop .none {
  display: block; padding: 0.65rem 0.75rem; font-size: 0.8125rem;
  border-top: 1px solid var(--line);
}
.search-pop .foot { color: var(--accent); font-weight: 500; }
.search-pop .none { color: var(--ink-3); border-top: 0; }

/* ---------- 7. Buttons & chips ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  height: 44px; padding: 0 1.125rem;
  border: 1px solid transparent; border-radius: var(--r-1);
  font-size: 0.9375rem; font-weight: 600; white-space: nowrap; cursor: pointer;
  transition: background-color var(--t-fast), color var(--t-fast), border-color var(--t-fast), transform var(--t-fast);
}
.btn:active { transform: translateY(1px); }
.btn .icon { width: 18px; height: 18px; }
.btn-primary { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.btn-primary:hover { background: var(--ink-strong); border-color: var(--ink-strong); }
.btn-outline { background: transparent; border-color: var(--line-2); color: var(--ink); }
.btn-outline:hover { border-color: var(--ink); background: var(--tile); }
.btn-quiet { background: transparent; color: var(--ink-2); padding: 0 0.7rem; }
.btn-quiet:hover { color: var(--ink); background: var(--paper-2); }
.btn-accent { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
.btn-accent:hover { background: var(--accent-strong); border-color: var(--accent-strong); }
.btn.is-on { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.btn-sm { height: 36px; padding: 0 0.8rem; font-size: 0.8125rem; }
.btn-lg { height: 52px; padding: 0 1.5rem; font-size: 1rem; }
.btn-block { width: 100%; }
.btn.pop { animation: press 260ms var(--ease); }
@keyframes press { 40% { transform: scale(0.97); } 100% { transform: none; } }

.chip {
  display: inline-flex; align-items: center; gap: 0.4rem;
  height: 36px; padding: 0 0.75rem;
  border: 1px solid var(--line-2); border-radius: var(--r-1); background: transparent;
  font-size: 0.8125rem; font-weight: 500; color: var(--ink-2); white-space: nowrap; cursor: pointer;
  transition: color var(--t-fast), border-color var(--t-fast), background-color var(--t-fast);
}
.chip:hover { color: var(--ink); border-color: var(--ink-3); }
.chip.is-active { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.chip .n { opacity: 0.6; font-variant-numeric: tabular-nums; }
.chip .icon { width: 14px; height: 14px; }
.chip-row { display: flex; gap: 0.5rem; overflow-x: auto; padding-bottom: 0.25rem; scrollbar-width: none; }
.chip-row::-webkit-scrollbar { display: none; }
.chip-wrap { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.chip-static { cursor: default; }
.chip-static:hover { color: var(--ink-2); border-color: var(--line-2); }

.select {
  appearance: none; -webkit-appearance: none;
  height: 36px; padding: 0 1.75rem 0 0.7rem;
  border: 1px solid var(--line-2); border-radius: var(--r-1); background-color: var(--field);
  font-size: 0.8125rem; font-weight: 500; color: var(--ink); cursor: pointer;
  background-image: var(--caret);
  background-repeat: no-repeat; background-position: right 0.55rem center; background-size: 12px;
}
.select:hover { border-color: var(--ink-3); }

/* ---------- 8. Product tile ---------- */
.grid-products { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.5rem 0.75rem; }
@container (min-width: 560px) { .grid-products { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@container (min-width: 820px) { .grid-products { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1.75rem 1rem; } }
@container (min-width: 1180px) { .grid-products { grid-template-columns: repeat(6, minmax(0, 1fr)); } }

.tile { position: relative; min-width: 0; }
.tile-link { display: block; }
.tile-media {
  position: relative; aspect-ratio: 1; overflow: hidden;
  border-radius: var(--r-2); background: var(--tile); border: 1px solid var(--line);
  transition: border-color var(--t-fast);
}
.tile:hover .tile-media { border-color: var(--line-2); }
.tile-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 500ms var(--ease); }
.tile:hover .tile-media img { transform: scale(1.03); }
.tile-body { padding-top: 0.6rem; }
.tile-seller { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; font-size: 0.75rem; color: var(--ink-3); margin-bottom: 0.25rem; }
.tile-seller .who { display: flex; align-items: center; gap: 0.4rem; min-width: 0; }
.tile-seller .who span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.swatch { width: 8px; height: 8px; border-radius: 2px; background: var(--seller); flex: 0 0 auto; }
.tile-name {
  font-size: 0.875rem; font-weight: 500; line-height: 1.3;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.tile-row { display: flex; align-items: baseline; justify-content: space-between; gap: 0.5rem; margin-top: 0.35rem; }
.tile-price { font-size: 0.9375rem; }
.tile-meta { font-size: 0.75rem; color: var(--ink-3); white-space: nowrap; }
.tile-actions { position: absolute; top: 0.5rem; right: 0.5rem; z-index: 2; display: flex; flex-direction: column; gap: 0.35rem; }
.tile-btn {
  width: 34px; height: 34px; display: flex; align-items: center; justify-content: center;
  border-radius: var(--r-1); background: var(--field); color: var(--ink-2);
  border: 1px solid var(--line); box-shadow: var(--shadow-1);
  transition: color var(--t-fast), transform var(--t-fast), opacity var(--t-fast), border-color var(--t-fast);
}
.tile-btn:hover { color: var(--ink); border-color: var(--line-2); }
.tile-btn:active { transform: scale(0.92); }
.tile-btn .icon { width: 17px; height: 17px; }
.tile-btn.is-active { color: var(--danger); }
.tile-btn.pop { animation: press 260ms var(--ease); }
@media (hover: none) { .tile-btn[data-add-list] { display: none; } .tile-btn { width: 40px; height: 40px; } }
@media (hover: hover) {
  .tile-btn { opacity: 0; transform: translateY(-4px); }
  .tile:hover .tile-btn, .tile-btn:focus-visible, .tile-btn.is-active { opacity: 1; transform: none; }
}
.tile-media img, .cat-tile .media img, .pdp-main img, .thumb img, .avatar img, .vendor-hero-img img, .search-pop .thumb img { filter: var(--img-filter); }
.media-fallback {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  background: var(--paper-2); color: var(--ink-3); font-weight: 700; font-stretch: 115%; font-size: 1.25rem;
}

.scroll-row {
  display: grid; grid-auto-flow: column; grid-auto-columns: minmax(200px, 220px); gap: 0.75rem;
  overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 0.5rem; scrollbar-width: none;
}
.scroll-row::-webkit-scrollbar { display: none; }
.scroll-row > * { scroll-snap-align: start; }

/* ---------- 9. Home: search first, four categories that open their types, a slim photo strip ---------- */
.home-top { padding-block: clamp(1.25rem, 3vw, 2.5rem) 0.5rem; }
.home-search { max-width: 760px; margin-inline: auto; }
.home-search .search--hero { height: 60px; max-width: none; border-width: 1.5px; }
.home-search .search--hero input { font-size: 1.0625rem; }
.quick-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.4rem; margin: 0.7rem auto 0; max-width: 760px; }
.quick-chips .chip { height: 32px; padding: 0 0.7rem; font-size: 0.8125rem; text-decoration: none; }
.quick-chips .lbl { align-self: center; font-size: 0.75rem; color: var(--ink-3); margin-right: 0.2rem; }
/* category row */
.cat-nav { position: relative; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.5rem; margin-top: 1.25rem; }
@media (min-width: 700px) { .cat-nav { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 0.6rem; } }
.cat-item { position: static; }                 /* phones: the menu spans the whole row */
@media (min-width: 700px) { .cat-item { position: relative; } }
.cat-head { position: relative; }
.cat-main {
  display: flex; align-items: center; gap: 0.7rem; min-height: 60px; padding: 0.5rem 2.4rem 0.5rem 0.55rem;
  border: 1px solid var(--line); border-radius: 10px; background: var(--tile); color: var(--ink); text-decoration: none;
  transition: border-color var(--t) var(--ease), background-color var(--t) var(--ease);
}
.cat-main img { width: 44px; height: 44px; border-radius: 8px; object-fit: cover; flex: none; background: var(--paper-2); filter: var(--img-filter); }
.cat-name { display: block; font-weight: 700; font-size: 0.9375rem; letter-spacing: -0.01em; line-height: 1.15; }
.cat-count { display: block; font-size: 0.75rem; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.cat-toggle {
  position: absolute; top: 50%; right: 0.35rem; transform: translateY(-50%); width: 32px; height: 32px;
  display: grid; place-items: center; border: 0; border-radius: 6px; background: transparent; color: var(--ink-3); cursor: pointer;
  transition: transform var(--t) var(--ease), color var(--t);
}
.cat-toggle .icon { width: 16px; height: 16px; }
.cat-item:hover .cat-main, .cat-item:focus-within .cat-main, .cat-item.is-open .cat-main { border-color: color-mix(in oklab, var(--accent) 45%, var(--line)); background: var(--paper-2); }
.cat-item.is-open .cat-toggle, .cat-item:hover .cat-toggle { color: var(--ink); transform: translateY(-50%) rotate(180deg); }
/* the dropdown with the category's types */
.cat-menu {
  position: absolute; top: calc(100% + 6px); left: 0; z-index: 40; min-width: 100%;
  padding: 0.35rem; border: 1px solid var(--line); border-radius: 10px; background: var(--paper);
  box-shadow: 0 18px 40px -18px rgba(0, 0, 0, 0.35), 0 2px 6px rgba(0, 0, 0, 0.08);
  opacity: 0; visibility: hidden; transform: translateY(-4px); transition: opacity var(--t) var(--ease), transform var(--t) var(--ease), visibility 0s linear var(--t);
}
@media (min-width: 700px) { .cat-menu { min-width: 250px; } .cat-menu.cols-2 { min-width: 480px; } .cat-item:last-child .cat-menu, .cat-item:nth-last-child(2) .cat-menu.cols-2 { left: auto; right: 0; } }
@media (max-width: 699px) { .cat-menu { right: 0; } }
.cat-item.is-open .cat-menu, .cat-item:focus-within .cat-menu { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }
@media (hover: hover) { .cat-item:hover .cat-menu { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; } }
.cat-menu ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 1px; }
.cat-menu.cols-2 ul { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 0.25rem; }
.cat-menu a { display: flex; align-items: center; gap: 0.55rem; padding: 0.4rem 0.5rem; border-radius: 6px; color: var(--ink); text-decoration: none; font-size: 0.875rem; }
.cat-menu a:hover, .cat-menu a:focus-visible { background: var(--paper-2); outline: none; }
.cat-menu a img { width: 28px; height: 28px; border-radius: 6px; object-fit: cover; flex: none; background: var(--paper-2); filter: var(--img-filter); }
.cat-menu a span { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cat-menu a b { font-weight: 500; font-size: 0.75rem; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.cat-menu .cat-all { margin-top: 0.25rem; border-top: 1px solid var(--line); border-radius: 0; padding-top: 0.55rem; color: var(--accent); font-weight: 600; }
/* slim strip of product photos */
.strip-section { padding: 1.25rem 0 0.5rem; }
.hero-strip { overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent); mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent); }
.strip-track { display: flex; width: max-content; will-change: transform; animation: strip-left 80s linear infinite; }
.hero-strip:hover .strip-track { animation-play-state: paused; }
.strip-track a { display: block; flex: none; width: 72px; height: 72px; margin-right: 0.5rem; border-radius: 8px; overflow: hidden; background: var(--tile); border: 1px solid var(--line); }
@media (min-width: 700px) { .strip-track a { width: 88px; height: 88px; } }
.strip-track img { display: block; width: 100%; height: 100%; object-fit: cover; filter: var(--img-filter); }
@keyframes strip-left { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .strip-track { animation: none; } }

/* (index strip removed: replaced by the type squares) */

.seller-row { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(250px, 1fr); gap: 0.75rem; overflow-x: auto; padding-bottom: 0.5rem; scrollbar-width: none; scroll-snap-type: x proximity; }
.seller-row::-webkit-scrollbar { display: none; }
.seller-row > * { scroll-snap-align: start; }
.seller-card {
  display: grid; grid-template-columns: 56px 1fr; gap: 0.9rem; align-items: start;
  padding: 1rem; border: 1px solid var(--line); border-radius: var(--r-2); background: var(--tile);
  transition: border-color var(--t-fast);
}
.seller-card:hover { border-color: var(--line-2); }
.seller-card.is-soon { opacity: 0.8; }
.avatar { width: 56px; height: 56px; border-radius: var(--r-2); overflow: hidden; background: var(--paper-2); flex: 0 0 auto; position: relative; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.seller-card .name { display: flex; align-items: center; gap: 0.35rem; font-weight: 600; font-size: 0.9375rem; }
.seller-card .facts { font-size: 0.8125rem; color: var(--ink-2); margin-top: 0.15rem; line-height: 1.4; }
.seller-card .channels { display: block; margin-top: 0.5rem; color: var(--ink-3); font-size: 0.75rem; line-height: 1.4; }
.vetted { display: inline-flex; color: var(--accent); }
.vetted .icon { width: 16px; height: 16px; }
.soon { display: inline-block; padding: 0.1rem 0.4rem; border: 1px solid var(--line-2); border-radius: 3px; font-size: 0.6875rem; font-weight: 600; color: var(--ink-2); }

.steps { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.5rem 2rem; }
@media (min-width: 720px) { .steps { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.step .n { font-weight: 800; font-stretch: 115%; font-size: 2rem; line-height: 1; color: var(--accent); font-variant-numeric: tabular-nums; }
.step h3 { font-size: 1rem; font-weight: 600; margin: 0.6rem 0 0.25rem; }
.step p { font-size: 0.9375rem; color: var(--ink-2); line-height: 1.55; }

.band { background: var(--paper-2); border-radius: var(--r-2); padding: clamp(1.5rem, 4vw, 2.75rem); display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.25rem; align-items: center; }
@media (min-width: 800px) { .band { grid-template-columns: minmax(0, 1fr) auto; gap: 2rem; } }
.band p { color: var(--ink-2); max-width: 52ch; margin-top: 0.4rem; }

/* ---------- 10. Browse (shop) ---------- */
.page-head { padding-top: clamp(1.5rem, 3vw, 2.5rem); margin-bottom: 1.5rem; }
.page-head .title { margin-bottom: 0.35rem; }
.crumbs { display: flex; flex-wrap: wrap; gap: 0.4rem; font-size: 0.8125rem; color: var(--ink-3); margin-bottom: 1rem; }
.crumbs a:hover { color: var(--ink); }
.crumbs [aria-current] { color: var(--ink-2); }

.shop { display: grid; grid-template-columns: minmax(0, 1fr); gap: 2rem; align-items: start; }
@media (min-width: 900px) { .shop { grid-template-columns: 220px minmax(0, 1fr); gap: 2.5rem; } }

.filters { display: flex; flex-direction: column; }
.filters-head { display: flex; align-items: center; justify-content: space-between; height: var(--header-h); border-bottom: 1px solid var(--line); margin-bottom: 0.25rem; }
.filters-head h2 { font-size: 1rem; font-weight: 700; }
.filter-group { padding: 1rem 0; border-top: 1px solid var(--line); }
.filter-group:first-of-type { border-top: 0; padding-top: 0.25rem; }
.filter-group h3 { font-size: 0.8125rem; font-weight: 600; margin-bottom: 0.5rem; }
.filter-opt {
  display: flex; align-items: center; gap: 0.6rem; width: 100%;
  padding: 0.3rem 0; font-size: 0.875rem; color: var(--ink-2); text-align: left;
  transition: color var(--t-fast);
}
.filter-opt:hover { color: var(--ink); }
.filter-opt .mark { width: 14px; height: 14px; border: 1px solid var(--line-2); border-radius: 50%; flex: 0 0 auto; background: var(--field); transition: background-color var(--t-fast), border-color var(--t-fast); }
.filter-opt.is-active { color: var(--ink); font-weight: 600; }
.filter-opt.is-zero { color: var(--ink-3); }
.filter-opt.is-zero .n { opacity: 0.6; }
.filter-opt.is-active .mark { background: var(--ink); border-color: var(--ink); box-shadow: inset 0 0 0 3px var(--field); }
.filter-opt[data-group="tag"] .mark { border-radius: 3px; }
.filter-opt[data-group="tag"].is-active .mark { box-shadow: none; }
.filter-opt .t { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.filter-opt .n { font-size: 0.75rem; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.filter-more { font-size: 0.8125rem; color: var(--accent); font-weight: 500; padding: 0.3rem 0; }
.filters-foot { display: none; padding: 1rem 0; border-top: 1px solid var(--line); margin-top: auto; }
@media (min-width: 900px) {
  .filters { position: sticky; top: calc(var(--header-h) + 1rem); max-height: calc(100dvh - var(--header-h) - 2rem); overflow-y: auto; scrollbar-width: thin; }
  .filters-head { display: none; }
}
@media (max-width: 899px) {
  .filters {
    position: fixed; top: 0; left: 0; bottom: 0; z-index: var(--z-drawer);
    width: min(340px, 90vw); padding: 0 var(--gutter); background: var(--paper);
    overflow-y: auto; box-shadow: var(--shadow-2);
    transform: translateX(-102%); transition: transform 280ms var(--ease);
  }
  .filters.is-open { transform: none; }
  .filters-foot { display: block; }
}
.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; flex-wrap: wrap; margin-bottom: 1rem; }
.toolbar .count { font-size: 0.875rem; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.toolbar .tools { display: flex; align-items: center; gap: 0.5rem; }
.active-chips { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-bottom: 1rem; }
.active-chips .chip { height: 30px; font-size: 0.75rem; padding: 0 0.6rem; }
.active-chips .chip .icon { width: 12px; height: 12px; }

.pagination { display: flex; justify-content: center; gap: 0.25rem; flex-wrap: wrap; margin-top: 2.5rem; }
.page-btn {
  min-width: 40px; height: 40px; padding: 0 0.5rem;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid transparent; border-radius: var(--r-1);
  font-size: 0.875rem; font-weight: 500; color: var(--ink-2); font-variant-numeric: tabular-nums;
  transition: background-color var(--t-fast), color var(--t-fast);
}
.page-btn:hover:not(:disabled) { background: var(--paper-2); color: var(--ink); }
.page-btn.is-active { background: var(--ink); color: var(--paper); }
.page-btn:disabled { opacity: 0.35; cursor: default; }
.page-btn .icon { width: 16px; height: 16px; }
.page-ellipsis { min-width: 1.5rem; text-align: center; color: var(--ink-3); line-height: 40px; }

.empty { text-align: center; padding: 3rem 1rem; color: var(--ink-2); }
.empty .icon { width: 30px; height: 30px; margin: 0 auto 0.75rem; color: var(--ink-3); }
.empty h3 { font-size: 1.0625rem; font-weight: 600; color: var(--ink); margin-bottom: 0.3rem; }
.empty p { font-size: 0.9375rem; max-width: 34ch; margin: 0 auto; }
.empty .btn { margin-top: 1.25rem; }

/* ---------- 11. Category ---------- */
.cat-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.75rem; }
@media (min-width: 720px) { .cat-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .cat-tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; } }
.cat-tile { display: block; overflow: hidden; border: 1px solid var(--line); border-radius: var(--r-2); background: var(--tile); transition: border-color var(--t-fast); }
.cat-tile:hover { border-color: var(--line-2); }
.cat-tile .media { display: block; aspect-ratio: 5 / 4; overflow: hidden; background: var(--paper-2); }
.cat-tile .media img { width: 100%; height: 100%; object-fit: cover; transition: transform 500ms var(--ease); }
.cat-tile:hover .media img { transform: scale(1.03); }
.cat-tile .body { display: flex; width: 100%; align-items: baseline; justify-content: space-between; gap: 0.5rem; padding: 0.7rem 0.85rem; }
.cat-tile .name { font-weight: 600; font-size: 0.9375rem; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cat-tile .n { font-size: 0.8125rem; color: var(--ink-3); font-variant-numeric: tabular-nums; }

/* ---------- 12. Product page ---------- */
.pdp { display: grid; grid-template-columns: minmax(0, 1fr); gap: 2rem; }
@media (min-width: 900px) { .pdp { grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); gap: 3.5rem; align-items: start; } }
.pdp-main {
  position: relative; aspect-ratio: 1; overflow: hidden; cursor: zoom-in;
  border-radius: var(--r-2); border: 1px solid var(--line); background: var(--tile);
}
.pdp-main img { width: 100%; height: 100%; object-fit: cover; }
.pdp-zoom {
  position: absolute; right: 0.6rem; bottom: 0.6rem;
  display: inline-flex; align-items: center; gap: 0.35rem; height: 30px; padding: 0 0.6rem;
  background: var(--field); border: 1px solid var(--line); border-radius: var(--r-1);
  font-size: 0.75rem; font-weight: 500; color: var(--ink-2); pointer-events: none;
}
.pdp-zoom .icon { width: 14px; height: 14px; }
.thumb-scroller { position: relative; margin-top: 0.6rem; }
.thumbs { display: grid; grid-auto-flow: column; grid-auto-columns: 72px; gap: 0.5rem; overflow-x: auto; scrollbar-width: none; scroll-snap-type: x proximity; padding: 2px; }
.thumbs::-webkit-scrollbar { display: none; }
.thumb {
  aspect-ratio: 1; overflow: hidden; scroll-snap-align: start;
  border-radius: var(--r-1); border: 1px solid var(--line); background: var(--tile);
  opacity: 0.7; transition: opacity var(--t-fast), border-color var(--t-fast), box-shadow var(--t-fast);
}
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb:hover { opacity: 1; }
.thumb.is-active { opacity: 1; border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); }
.thumb-nav {
  position: absolute; top: 50%; z-index: 2; transform: translateY(-50%);
  width: 32px; height: 32px; display: flex; align-items: center; justify-content: center;
  background: var(--field); border: 1px solid var(--line-2); border-radius: var(--r-1); color: var(--ink);
  box-shadow: var(--shadow-1);
}
.thumb-nav .icon { width: 16px; height: 16px; }
.thumb-prev { left: -6px; }
.thumb-next { right: -6px; }

.pdp-seller { display: inline-flex; align-items: center; gap: 0.5rem; font-size: 0.875rem; font-weight: 500; color: var(--ink-2); margin-bottom: 0.9rem; transition: color var(--t-fast); }
.pdp-seller:hover { color: var(--ink); }
.pdp-seller .avatar { width: 28px; height: 28px; border-radius: 6px; }
.pdp h1 { font-weight: 700; font-stretch: 106%; letter-spacing: -0.025em; line-height: 1.08; font-size: clamp(1.625rem, 1.3rem + 1.4vw, 2.25rem); margin-bottom: 0.5rem; }
.pdp-meta { font-size: 0.875rem; color: var(--ink-2); margin-bottom: 1.25rem; }
.pdp-price { font-size: 1.75rem; font-weight: 700; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; line-height: 1.1; }
.pdp-note { font-size: 0.8125rem; color: var(--ink-3); margin-top: 0.3rem; }
.seg-label { font-size: 0.8125rem; font-weight: 600; margin: 1.25rem 0 0.5rem; }
.seg-label span { font-weight: 400; color: var(--ink-3); }
.seg { display: grid; gap: 0.5rem; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); }
.seg button {
  display: flex; flex-direction: column; align-items: flex-start; gap: 0.1rem;
  padding: 0.55rem 0.7rem; text-align: left;
  border: 1px solid var(--line-2); border-radius: var(--r-1); background: var(--tile);
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
}
.seg button .code { font-weight: 600; font-size: 0.875rem; }
.seg button .p { font-size: 0.8125rem; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.seg button:hover { border-color: var(--ink-3); }
.seg button.is-active { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.pdp-desc { font-size: 0.9375rem; color: var(--ink-2); line-height: 1.6; max-width: 60ch; margin: 1.25rem 0 1.5rem; }
.pdp-actions { display: grid; gap: 0.5rem; }
.pdp-actions .row { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 0.5rem; }
.pdp-side { display: flex; flex-wrap: wrap; gap: 0.25rem; margin-top: 0.5rem; }
.pdp-hint { display: flex; align-items: flex-start; gap: 0.5rem; font-size: 0.8125rem; color: var(--ink-3); margin: 1rem 0 1.75rem; line-height: 1.5; }
.pdp-hint .icon { width: 16px; height: 16px; margin-top: 0.15rem; color: var(--accent); }
.pdp-details { border-top: 1px solid var(--line); }
.pdp-details details { border-bottom: 1px solid var(--line); }
.pdp-details summary { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 0.9rem 0; font-weight: 600; font-size: 0.9375rem; cursor: pointer; list-style: none; }
.pdp-details summary::-webkit-details-marker { display: none; }
.pdp-details summary .icon { width: 16px; height: 16px; color: var(--ink-3); transition: transform var(--t) var(--ease); }
.pdp-details details[open] summary .icon { transform: rotate(180deg); }
.pdp-details .body { padding: 0 0 1rem; font-size: 0.9375rem; color: var(--ink-2); line-height: 1.6; max-width: 60ch; }
.checks li { display: flex; align-items: flex-start; gap: 0.6rem; padding: 0.2rem 0; }
.checks .icon { width: 16px; height: 16px; margin-top: 0.2rem; color: var(--accent); }

/* ---------- 13. Seller page ---------- */
.vendor-head { background: color-mix(in oklab, var(--seller) 11%, var(--paper)); border-bottom: 1px solid color-mix(in oklab, var(--seller) 22%, var(--line)); }
.vendor-head .wrap { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.5rem; padding-block: clamp(1.75rem, 4vw, 3.5rem); }
@media (min-width: 900px) { .vendor-head .wrap { grid-template-columns: minmax(0, 1fr) 340px; align-items: center; gap: 3rem; } }
.vendor-id { display: flex; align-items: center; gap: 1rem; margin-bottom: 1rem; }
.vendor-id .avatar { width: 72px; height: 72px; }
.vendor-id h1 { display: flex; align-items: center; gap: 0.5rem; }
.vendor-facts { display: flex; flex-wrap: wrap; gap: 0.35rem 1.25rem; font-size: 0.875rem; color: var(--ink-2); margin: 0.9rem 0 1.25rem; }
.vendor-facts li { display: inline-flex; align-items: center; gap: 0.4rem; }
.vendor-facts .icon { width: 16px; height: 16px; color: var(--ink-3); }
.vendor-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.vendor-hero-img { display: none; aspect-ratio: 4 / 3; overflow: hidden; border-radius: var(--r-2); border: 1px solid var(--line); background: var(--tile); }
.vendor-hero-img img { width: 100%; height: 100%; object-fit: cover; }
@media (min-width: 900px) { .vendor-hero-img { display: block; } }
.vendor-desc { color: var(--ink-2); max-width: 60ch; line-height: 1.6; }
.seller-list { display: grid; gap: 0.75rem; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
.show-more { display: flex; justify-content: center; margin-top: 2rem; }

/* ---------- 14. How to buy, FAQ, legal ---------- */
.howto { columns: 1; column-gap: 3rem; }
@media (min-width: 800px) { .howto { columns: 2; } }
.howto li { display: grid; grid-template-columns: 2.75rem 1fr; gap: 0.5rem; break-inside: avoid; padding-bottom: 1.75rem; }
.howto .n { font-weight: 800; font-stretch: 115%; font-size: 1.75rem; line-height: 1; color: var(--accent); font-variant-numeric: tabular-nums; padding-top: 0.15rem; }
.howto h3 { font-size: 1.0625rem; font-weight: 600; margin-bottom: 0.3rem; letter-spacing: -0.01em; }
.howto p { font-size: 0.9375rem; color: var(--ink-2); line-height: 1.6; max-width: 52ch; }
.kbd { display: inline-block; padding: 0.02rem 0.4rem; border: 1px solid var(--line-2); border-radius: 3px; background: var(--tile); font-size: 0.85em; font-weight: 500; white-space: nowrap; }
.facts { display: grid; grid-template-columns: minmax(0, 1fr); gap: 2rem; }
@media (min-width: 720px) { .facts { grid-template-columns: 1fr 1fr; gap: 3rem; } }
.facts h3 { font-size: 1.0625rem; font-weight: 600; margin-bottom: 0.5rem; }
.facts p { font-size: 0.9375rem; color: var(--ink-2); line-height: 1.6; }
.facts .chip-wrap { margin: 0.75rem 0; }
.glossary { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.5rem 3rem; }
@media (min-width: 720px) { .glossary { grid-template-columns: 1fr 1fr; } }
.glossary dt { font-weight: 600; margin-bottom: 0.25rem; }
.glossary dd { margin: 0; font-size: 0.9375rem; color: var(--ink-2); line-height: 1.6; max-width: 52ch; }

.faq { display: grid; grid-template-columns: minmax(0, 1fr); gap: 2rem 3rem; }
@media (min-width: 800px) { .faq { grid-template-columns: 1fr 1fr; } }
.faq h3 { font-size: 1.0625rem; font-weight: 600; margin-bottom: 0.4rem; letter-spacing: -0.01em; }
.faq p { font-size: 0.9375rem; line-height: 1.6; color: var(--ink-2); }
.faq a, .prose a, .link { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; text-decoration-thickness: 1px; }
.faq a:hover, .prose a:hover, .link:hover { color: var(--accent-strong); }

.prose { font-size: 1rem; line-height: 1.65; color: var(--ink-2); max-width: 68ch; }
.prose h2 { font-size: 1.125rem; font-weight: 700; color: var(--ink); margin: 2rem 0 0.5rem; letter-spacing: -0.01em; }
.prose p { margin-bottom: 1rem; }
.prose ul { list-style: disc; padding-left: 1.25rem; margin-bottom: 1rem; }
.prose li { margin-bottom: 0.35rem; }
.prose strong { color: var(--ink); font-weight: 600; }
.narrow { max-width: 760px; }

/* ---------- 15. Drawer, overlays, toast, lightbox ---------- */
.scrim {
  position: fixed; inset: 0; z-index: calc(var(--z-drawer) - 1);
  background: var(--scrim);
  opacity: 0; pointer-events: none; transition: opacity var(--t) var(--ease);
}
.scrim.is-open { opacity: 1; pointer-events: auto; }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: var(--z-drawer);
  width: min(420px, 100vw); display: flex; flex-direction: column;
  background: var(--paper); border-left: 1px solid var(--line); box-shadow: var(--shadow-2);
  transform: translateX(102%); transition: transform 280ms var(--ease);
}
.drawer.is-open { transform: none; }
.drawer-head { display: flex; align-items: center; justify-content: space-between; height: var(--header-h); padding: 0 1.25rem; border-bottom: 1px solid var(--line); flex: 0 0 auto; }
.drawer-head h2 { font-size: 1.0625rem; font-weight: 700; display: flex; align-items: baseline; gap: 0.5rem; }
.drawer-head h2 span { font-size: 0.8125rem; font-weight: 500; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.drawer-body { flex: 1; overflow-y: auto; padding: 1rem 1.25rem; }
.drawer-foot { flex: 0 0 auto; padding: 1rem 1.25rem; border-top: 1px solid var(--line); }
.ol-group { margin-bottom: 1.75rem; }
.ol-group-head { display: flex; align-items: center; gap: 0.5rem; font-size: 0.8125rem; font-weight: 600; margin-bottom: 0.5rem; }
.ol-group-head .avatar { width: 24px; height: 24px; border-radius: 5px; }
.ol-group-head .n { font-weight: 400; color: var(--ink-3); }
.ol-item { display: grid; grid-template-columns: 64px 1fr auto; gap: 0.75rem; padding: 0.5rem 0; align-items: start; }
.ol-item .thumb { width: 64px; height: 64px; opacity: 1; }
.ol-item .name { font-size: 0.8125rem; font-weight: 500; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ol-item .price { font-size: 0.875rem; margin-top: 0.2rem; }
.ol-item .ctl { display: flex; flex-direction: column; align-items: flex-end; justify-content: space-between; gap: 0.4rem; height: 64px; }
.ol-item .rm { color: var(--ink-3); width: 28px; height: 28px; display: flex; align-items: center; justify-content: center; border-radius: var(--r-1); }
.ol-item .rm:hover { color: var(--danger); background: var(--paper-2); }
.ol-item .rm .icon { width: 16px; height: 16px; }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--line-2); border-radius: var(--r-1); background: var(--field); }
.qty button { width: 30px; height: 30px; display: flex; align-items: center; justify-content: center; color: var(--ink-2); }
.qty button:hover { color: var(--ink); background: var(--paper-2); }
.qty button .icon { width: 14px; height: 14px; }
.qty span { min-width: 26px; text-align: center; font-size: 0.875rem; font-variant-numeric: tabular-nums; }
.ol-total { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 0.25rem; }
.ol-total .price { font-size: 1.125rem; }
.ol-fine { font-size: 0.75rem; color: var(--ink-3); margin-bottom: 0.75rem; line-height: 1.45; }
.ol-foot-row { display: flex; gap: 0.5rem; }

.search-overlay { position: fixed; inset: 0; z-index: var(--z-overlay); display: none; flex-direction: column; background: var(--paper); }
.search-overlay.is-open { display: flex; }
.search-overlay .top { display: flex; align-items: center; gap: 0.5rem; padding: 0.75rem var(--gutter); border-bottom: 1px solid var(--line); }
.search-overlay .results { flex: 1; overflow-y: auto; padding: 0.5rem var(--gutter) 2rem; }
.search-overlay .hint { font-size: 0.8125rem; color: var(--ink-3); padding: 0.75rem 0; }
.result-row { display: grid; grid-template-columns: 56px 1fr auto; gap: 0.75rem; align-items: center; padding: 0.55rem 0; border-bottom: 1px solid var(--line); }
.result-row .thumb { width: 56px; height: 56px; opacity: 1; }
.result-row .name { font-size: 0.875rem; font-weight: 500; }
.result-row .meta { font-size: 0.75rem; color: var(--ink-3); }

.toast {
  position: fixed; left: 50%; bottom: 1.25rem; z-index: var(--z-toast);
  display: flex; align-items: center; gap: 0.5rem; max-width: calc(100vw - 2rem);
  padding: 0.7rem 1rem; border-radius: var(--r-1);
  background: var(--ink); color: var(--paper); font-size: 0.875rem; font-weight: 500;
  box-shadow: var(--shadow-2);
  transform: translate(-50%, 150%); transition: transform 260ms var(--ease);
}
.toast.is-visible { transform: translate(-50%, 0); }
.toast .icon { width: 16px; height: 16px; }

.lightbox {
  position: fixed; inset: 0; z-index: var(--z-lightbox);
  display: flex; align-items: center; justify-content: center; gap: clamp(0.5rem, 2vw, 1.25rem);
  padding: clamp(0.75rem, 3vw, 2rem);
  background: rgba(24, 23, 21, 0.94);
  opacity: 0; visibility: hidden; transition: opacity var(--t) var(--ease), visibility var(--t);
}
.lightbox.is-open { opacity: 1; visibility: visible; }
.lb-stage { flex: 1; min-width: 0; height: 100%; display: flex; align-items: center; justify-content: center; }
.lb-img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: var(--r-1); transform: scale(0.97); transition: transform var(--t) var(--ease); }
.lightbox.is-open .lb-img { transform: none; }
.lb-btn { flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; color: #fff; border: 1px solid rgba(255, 255, 255, 0.28); border-radius: var(--r-1); background: rgba(255, 255, 255, 0.06); transition: background-color var(--t-fast); }
.lb-btn:hover { background: rgba(255, 255, 255, 0.16); }
.lb-btn .icon { width: 20px; height: 20px; }
.lb-close { position: absolute; top: clamp(0.75rem, 3vw, 1.5rem); right: clamp(0.75rem, 3vw, 1.5rem); }
.lb-count { position: absolute; bottom: clamp(0.75rem, 3vw, 1.5rem); left: 50%; transform: translateX(-50%); font-size: 0.8125rem; font-weight: 500; color: rgba(255, 255, 255, 0.75); font-variant-numeric: tabular-nums; }
.lightbox.lb-single .lb-nav { display: none; }
@media (max-width: 640px) {
  .lb-nav { position: absolute; bottom: clamp(0.75rem, 3vw, 1.5rem); z-index: 2; }
  .lb-prev { left: 1rem; } .lb-next { right: 1rem; }
}

/* ---------- 16. Footer ---------- */
.site-footer { margin-top: clamp(3.5rem, 7vw, 6rem); border-top: 1px solid var(--line); background: var(--paper-2); }
.footer-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 2rem; padding-block: 2.5rem 2rem; }
@media (min-width: 800px) { .footer-grid { grid-template-columns: 1.6fr 1fr 1fr; gap: 3rem; } }
.footer-grid p { font-size: 0.875rem; color: var(--ink-2); max-width: 38ch; margin-top: 0.75rem; line-height: 1.55; }
.footer-grid h3 { font-size: 0.8125rem; font-weight: 600; margin-bottom: 0.6rem; }
.footer-grid li { font-size: 0.875rem; color: var(--ink-2); padding: 0.2rem 0; }
.footer-grid li a:hover { color: var(--ink); }
.footer-legal { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.5rem 1.5rem; padding: 1rem 0 1.5rem; border-top: 1px solid var(--line); font-size: 0.75rem; color: var(--ink-3); }
.footer-legal nav { display: flex; flex-wrap: wrap; gap: 1rem; }
.footer-legal a:hover { color: var(--ink); }

/* ---------- 17. Skeletons ---------- */
.sk { position: relative; overflow: hidden; background: var(--paper-2); border-radius: var(--r-2); }
.sk::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, var(--shimmer), transparent); transform: translateX(-100%); animation: shimmer 1.3s infinite; }
@keyframes shimmer { 100% { transform: translateX(100%); } }
.sk-media { aspect-ratio: 1; }
.sk-line { height: 0.7rem; border-radius: 3px; margin-top: 0.55rem; }
.sk-line.w1 { width: 40%; margin-top: 0.8rem; } .sk-line.w2 { width: 75%; } .sk-line.w3 { width: 30%; }

/* ---------- 18. 404 ---------- */
.notfound { text-align: center; padding-block: clamp(4rem, 12vw, 9rem) clamp(3rem, 8vw, 6rem); }
.notfound .display { margin: 0.5rem auto 1rem; max-width: 14ch; }
.notfound p { color: var(--ink-2); max-width: 40ch; margin: 0 auto 1.75rem; }
.notfound .row { display: flex; justify-content: center; gap: 0.5rem; flex-wrap: wrap; }

/* ---------- 19. Motion preferences ---------- */
@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; }
}

/* ---------- 20. Visibility utilities (last, so they win) ---------- */
@media (max-width: 699px) { .u-hide-sm { display: none !important; } }
@media (min-width: 700px) { .u-only-sm { display: none !important; } }
@media (min-width: 900px) { .u-hide-lg { display: none !important; } }

/* ---------- 21. Colourways and batches (Weidian-backed listings) ---------- */
/* Gallery column: main photo with the colour list beside it, more photos below */
.pdp-visual { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0.75rem; }
@media (min-width: 600px) { .pdp-visual { grid-template-columns: minmax(0, 1fr) 176px; align-items: stretch; } }
@media (min-width: 900px) and (max-width: 1099px) { .pdp-visual { grid-template-columns: minmax(0, 1fr) 150px; } }
.cw-panel { display: flex; flex-direction: column; min-height: 0; }
.cw-head { display: flex; align-items: baseline; justify-content: space-between; gap: 0.5rem; padding: 0 0.15rem 0.5rem; font-size: 0.8125rem; font-weight: 600; }
.cw-head span { font-weight: 400; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.cw-list { display: flex; flex-direction: column; gap: 0.25rem; overflow-y: auto; scrollbar-width: thin; padding-right: 2px; }
@media (min-width: 600px) { .cw-list { position: absolute; inset: 0; } .cw-scroll { position: relative; flex: 1; min-height: 0; } }
@media (max-width: 599px) { .cw-list { flex-direction: row; overflow-x: auto; overflow-y: hidden; scroll-snap-type: x proximity; padding-bottom: 0.25rem; } .cw-list::-webkit-scrollbar { display: none; } }
.cw-item {
  display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 0.55rem; align-items: center;
  padding: 0.3rem; border: 1px solid transparent; border-radius: var(--r-1); text-align: left;
  transition: background-color var(--t-fast), border-color var(--t-fast);
}
@media (max-width: 599px) { .cw-item { grid-template-columns: 56px; width: 76px; flex: 0 0 auto; scroll-snap-align: start; } .cw-item .cw-price { display: none; } }
.cw-item:hover { background: var(--paper-2); }
.cw-item.is-active { border-color: var(--ink); background: var(--tile); }
.cw-item .cw-img { width: 44px; height: 44px; border-radius: 4px; overflow: hidden; background: var(--paper-2); border: 1px solid var(--line); }
@media (max-width: 599px) { .cw-item .cw-img { width: 56px; height: 56px; } }
.cw-item .cw-img img { width: 100%; height: 100%; object-fit: cover; }
.cw-item .cw-name { font-size: 0.75rem; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; color: var(--ink-2); }
.cw-item.is-active .cw-name { color: var(--ink); font-weight: 500; }
.cw-item .cw-price { font-size: 0.6875rem; color: var(--ink-3); font-variant-numeric: tabular-nums; margin-top: 0.1rem; }
.cw-item.is-out { opacity: 0.45; }

/* Animated covers: static frame under reduced motion */
.tile-media img.anim, .pdp-main img.anim { image-rendering: auto; }
@media (prefers-reduced-motion: reduce) { .anim-wrap .anim { display: none; } .anim-wrap .poster { display: block !important; } }
.anim-wrap .poster { display: none; }

/* Batch tiles carry price and, when applicable, the listing they come from */
.seg button .src { font-size: 0.6875rem; color: var(--ink-3); }

/* ---------- 23. Layout utilities (replace inline style attributes so the CSP can forbid them) ---------- */
.u-min0 { min-width: 0 !important; }
.u-block { display: block !important; }
.u-flex1 { flex: 1 1 auto !important; }
.u-span-all { grid-column: 1 / -1 !important; }
.u-chips { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.display-cat { font-size: clamp(2.25rem, 1.5rem + 3vw, 3.75rem); }
.sk-line.sk-title { width: 40%; height: 2rem; }
.sk-line.sk-h1 { width: 85%; height: 1.75rem; margin-top: 1rem; }
.sk-line.sk-price { height: 1.25rem; margin-top: 1.25rem; }
.chip-plain { border-color: transparent; }
.title-count { font-size: 1rem; font-weight: 400; font-stretch: 100%; letter-spacing: 0; }
.cw-none { padding: 0.3rem; }
