/* KelCommerce storefront. Editorial, quiet, photography first. Tokens from /shared/tokens.css;
   the shop theme sets --brand (accent) and --display (heading font) on <html> at runtime. */

:root {
  --display: var(--font-sans);
  --gutter: clamp(16px, 4vw, 40px);
  --wrap: 1320px;
  --header-h: 64px;
}
/* Shop accent: derived shades; dark scheme lightens the brand so it keeps contrast on dark paper. */
:root[data-brand] {
  --accent: var(--brand);
  --accent-ink: var(--brand-ink);
  --accent-strong: color-mix(in srgb, var(--brand) 80%, #000);
  --accent-soft: color-mix(in srgb, var(--brand) 10%, var(--paper));
}
@media (prefers-color-scheme: dark) {
  :root[data-brand]:not([data-theme="light"]) {
    --accent: color-mix(in srgb, var(--brand) 55%, #fff);
    --accent-ink: #141311;
    --accent-strong: color-mix(in srgb, var(--brand) 35%, #fff);
    --accent-soft: color-mix(in srgb, var(--brand) 24%, var(--paper));
  }
}
:root[data-brand][data-theme="dark"] {
  --accent: color-mix(in srgb, var(--brand) 55%, #fff);
  --accent-ink: #141311;
  --accent-strong: color-mix(in srgb, var(--brand) 35%, #fff);
  --accent-soft: color-mix(in srgb, var(--brand) 24%, var(--paper));
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 16px); }
body {
  margin: 0; min-height: 100dvh; display: flex; flex-direction: column;
  background: var(--paper); color: var(--ink);
  font: 400 1rem/1.55 var(--font-sans);
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "kern", "liga";
}
main { flex: 1; outline: none; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 3px; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3, h4, p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
address { font-style: normal; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 2px; }
::selection { background: var(--accent-soft); }

.vh { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
.wrap.narrow { max-width: calc(760px + 2 * var(--gutter)); }
.center { text-align: center; }
.fine { font-size: .8125rem; color: var(--ink-3); line-height: 1.45; }
.hint { font-size: .875rem; color: var(--ink-2); }
.icon { flex: none; }

/* ---------- type ---------- */
.display, .h2, .h3, .brand, .foot-name, .cat-name {
  font-family: var(--display); font-weight: 600; letter-spacing: -0.02em; line-height: 1.08;
  text-wrap: balance;
}
:root[data-font="serif"] :is(.display, .h2, .h3, .brand, .foot-name, .cat-name) { font-weight: 500; letter-spacing: -0.01em; }
.display { font-size: clamp(2rem, 1.3rem + 2.6vw, 3.25rem); }
.h2 { font-size: clamp(1.5rem, 1.1rem + 1.2vw, 2.125rem); }
.h3 { font-size: 1.25rem; letter-spacing: -0.01em; }
.h4 { font-size: .75rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }
.eyebrow { font-size: .75rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); }
.lead { font-size: clamp(1.0625rem, 1rem + .3vw, 1.25rem); color: var(--ink-2); line-height: 1.5; text-wrap: pretty; }
.prose { color: var(--ink-2); max-width: 64ch; }
.prose p + p { margin-top: 1em; }
.lead-prose { font-size: 1.125rem; }

/* ---------- controls ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 20px; border: 1px solid transparent; border-radius: var(--r-sm);
  font-size: .9375rem; font-weight: 600; line-height: 1.2; text-decoration: none; white-space: nowrap;
  transition: background var(--t-fast), border-color var(--t-fast), color var(--t-fast);
  -webkit-tap-highlight-color: transparent;
}
.btn.primary { background: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { background: var(--accent-strong); }
.btn.secondary { background: transparent; border-color: var(--line-strong); color: var(--ink); }
.btn.secondary:hover { border-color: var(--ink); }
.btn.ghost { background: none; color: var(--ink-2); font-weight: 500; }
.btn.ghost:hover { color: var(--ink); text-decoration: underline; }
.btn.lg { min-height: 52px; font-size: 1rem; padding: 0 28px; }
.btn.block { width: 100%; }
.btn:disabled, .btn[aria-disabled="true"] { background: var(--surface-2); color: var(--ink-3); border-color: var(--line); cursor: not-allowed; }
.btn[aria-busy="true"] { cursor: progress; }
.btn .icon { margin-inline: -2px; }
.link-btn { background: none; border: 0; padding: 0; color: var(--ink-2); font-size: .8125rem; text-decoration: underline; text-underline-offset: 3px; }
.link-btn:hover { color: var(--ink); }
.icon-btn {
  display: inline-grid; place-items: center; width: 44px; height: 44px; position: relative;
  background: none; border: 0; border-radius: var(--r-pill); color: var(--ink); text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}
.icon-btn:hover { background: var(--surface-2); }

input:not([type="checkbox"], [type="radio"]), select {
  width: 100%; height: 48px; padding: 0 14px;
  background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--r-sm);
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
}
input:not([type="checkbox"], [type="radio"]):focus, select:focus { outline: none; border-color: var(--accent); box-shadow: var(--focus); }
input[aria-invalid] { border-color: var(--bad) !important; }
input::placeholder { color: var(--ink-3); }
input[type="search"]::-webkit-search-cancel-button { -webkit-appearance: none; }
input[type="checkbox"], input[type="radio"] { accent-color: var(--accent); width: 18px; height: 18px; margin: 0; flex: none; }
.select { position: relative; display: block; }
.select select { appearance: none; -webkit-appearance: none; padding-right: 40px; cursor: pointer; }
.select::after {
  content: ""; position: absolute; right: 16px; top: 50%; width: 7px; height: 7px; margin-top: -6px;
  border-right: 1.5px solid var(--ink-2); border-bottom: 1.5px solid var(--ink-2); transform: rotate(45deg); pointer-events: none;
}

.stepper { display: inline-flex; align-items: stretch; height: 44px; border: 1px solid var(--line-strong); border-radius: var(--r-sm); background: var(--surface); }
.stepper button { width: 40px; display: grid; place-items: center; background: none; border: 0; color: var(--ink-2); }
.stepper button:hover { color: var(--ink); background: var(--surface-2); }
.stepper input { width: 44px !important; height: auto !important; padding: 0 !important; border: 0 !important; text-align: center; background: none !important; box-shadow: none !important; font-variant-numeric: tabular-nums; -moz-appearance: textfield; }
.stepper input::-webkit-inner-spin-button, .stepper input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }

.notice { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: var(--r-sm); font-size: .9375rem; line-height: 1.4; margin: 12px 0; }
.notice.bad { background: var(--bad-soft); color: var(--ink); }
.notice.bad .icon { color: var(--bad); }
.notice.ok { background: var(--ok-soft); }
.notice.ok .icon { color: var(--ok); }
.err { display: block; color: var(--bad); font-size: .8125rem; margin-top: 4px; min-height: 0; }
.err:empty { display: none; }

.spinner { width: 16px; height: 16px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; display: inline-block; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- chrome ---------- */
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; padding: 10px 16px; background: var(--ink); color: var(--paper); border-radius: var(--r-sm); }
.skip:focus { top: 12px; }
#progress { position: fixed; inset: 0 auto auto 0; height: 2px; width: 0; background: var(--accent); z-index: 90; opacity: 0; }
#progress.on { opacity: 1; animation: progress 1.6s cubic-bezier(.1,.7,.3,1) forwards; }
@keyframes progress { from { width: 0; } to { width: 85%; } }

.boot-bar { height: var(--header-h); }
.site-header { position: sticky; top: 0; z-index: 30; background: var(--paper); border-bottom: 1px solid var(--line); }
#header { position: sticky; top: 0; z-index: 30; }
.bar { height: var(--header-h); display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px; }
.menu-btn { justify-self: start; margin-left: -10px; }
.brand { justify-self: center; font-size: 1.375rem; text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 56vw; }
.brand img { height: 32px; width: auto; }
.main-nav { display: none; }
.tools { justify-self: end; display: flex; gap: 2px; margin-right: -10px; }
.badge {
  position: absolute; top: 5px; right: 3px; min-width: 18px; height: 18px; padding: 0 5px;
  border-radius: var(--r-pill); background: var(--accent); color: var(--accent-ink);
  font-size: .6875rem; font-weight: 700; line-height: 18px; text-align: center; font-variant-numeric: tabular-nums;
}
.search-bar { display: none; border-top: 1px solid var(--line); background: var(--paper); }
.searching .search-bar { display: block; }
.search-inner { display: flex; align-items: center; gap: 12px; height: 64px; color: var(--ink-3); }
.search-inner input { border: 0 !important; box-shadow: none !important; background: none; padding: 0; font-size: 1.125rem; color: var(--ink); }

@media (min-width: 960px) {
  .bar { grid-template-columns: auto 1fr auto; gap: 40px; }
  .menu-btn { display: none; }
  .brand { justify-self: start; max-width: 320px; }
  .main-nav { display: block; }
  .main-nav ul { display: flex; gap: 28px; }
  .main-nav a { font-size: .9375rem; color: var(--ink-2); text-decoration: none; padding: 8px 0; }
  .main-nav a:hover, .main-nav a[aria-current] { color: var(--ink); }
  .main-nav a[aria-current] { text-decoration: underline; text-underline-offset: 8px; }
}

/* drawers (cart, mobile menu) use <dialog> for focus trapping + Esc */
dialog.drawer {
  position: fixed; inset: 0 0 0 auto; margin: 0; padding: 0; border: 0;
  width: min(440px, 100vw); height: 100dvh; max-height: none; max-width: none;
  background: var(--paper); color: var(--ink); box-shadow: var(--shadow-2);
}
dialog.drawer[open] { display: flex; flex-direction: column; animation: slide-in var(--t) ease-out; }
dialog.drawer.left { inset: 0 auto 0 0; width: min(360px, 88vw); }
dialog.drawer.left[open] { animation-name: slide-in-left; }
dialog.drawer::backdrop { background: rgb(20 19 17 / .45); animation: fade var(--t); }
@keyframes slide-in { from { transform: translateX(32px); opacity: 0; } }
@keyframes slide-in-left { from { transform: translateX(-32px); opacity: 0; } }
@keyframes fade { from { opacity: 0; } }
.drawer-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px 10px 20px; border-bottom: 1px solid var(--line); min-height: var(--header-h); }
.drawer-head h2 { font-size: 1.0625rem; font-weight: 600; }
.drawer-count { color: var(--ink-3); font-weight: 400; font-size: .9375rem; }
.drawer-msg { padding: 0 20px; }
.drawer-body { flex: 1; overflow-y: auto; padding: 0 20px; overscroll-behavior: contain; }
.drawer-foot { padding: 20px; border-top: 1px solid var(--line); display: grid; gap: 10px; }
.drawer-foot:empty { display: none; }
.drawer-empty { display: grid; gap: 20px; justify-items: start; padding: 32px 0; color: var(--ink-2); }
.menu-list { padding-top: 8px; }
.menu-cats a { display: flex; align-items: center; justify-content: space-between; padding: 14px 0; border-bottom: 1px solid var(--line); text-decoration: none; font-family: var(--display); font-size: 1.25rem; }
.menu-cats .icon { color: var(--ink-3); }
.menu-pages { padding: 20px 0; display: grid; gap: 12px; }
.menu-pages a { color: var(--ink-2); text-decoration: none; }

#toast { position: fixed; left: 50%; bottom: 24px; z-index: 80; transform: translate(-50%, 16px); opacity: 0; pointer-events: none;
  background: var(--ink); color: var(--paper); padding: 10px 16px; border-radius: var(--r-pill); font-size: .875rem; transition: opacity var(--t), transform var(--t); }
#toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- footer ---------- */
.site-footer { margin-top: clamp(64px, 10vw, 128px); border-top: 1px solid var(--line); padding-top: 48px; color: var(--ink-2); font-size: .9375rem; }
.booting .site-footer { visibility: hidden; }
.foot-grid { display: grid; gap: 36px; grid-template-columns: 1fr 1fr; }
.foot-brand { grid-column: 1 / -1; display: grid; gap: 10px; align-content: start; }
.foot-name { font-size: 1.5rem; color: var(--ink); }
.foot-h { font-size: .75rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 14px; }
.site-footer ul { display: grid; gap: 10px; }
.site-footer a { text-decoration: none; }
.site-footer a:hover { color: var(--ink); text-decoration: underline; }
.foot-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; margin-top: 48px; padding: 20px 0 28px; border-top: 1px solid var(--line); font-size: .8125rem; color: var(--ink-3); }
.powered a { color: var(--ink-2); font-weight: 600; }
@media (min-width: 760px) {
  .foot-grid { grid-template-columns: 2fr 1fr 1fr 1fr; }
  .foot-brand { grid-column: auto; }
}
.langs { display: flex; flex-wrap: wrap; gap: 6px; }
.langs button { min-width: 44px; height: 36px; padding: 0 10px; border: 1px solid var(--line-strong); border-radius: var(--r-sm); background: none; color: var(--ink-2); font-size: .8125rem; font-weight: 600; letter-spacing: .04em; }
.langs button:hover { border-color: var(--ink); color: var(--ink); }
.langs button[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--paper); }

/* ---------- product cards ---------- */
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px 12px; }
@media (min-width: 720px) { .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px 20px; } }
@media (min-width: 1100px) { .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 48px 24px; } }
.card-link { display: block; text-decoration: none; color: inherit; }
.card-media { position: relative; display: block; aspect-ratio: 4 / 5; overflow: hidden; background: var(--surface-2); border-radius: 3px; }
.card-media img, .card-media .ph { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: opacity 400ms ease, transform 600ms ease; }
.card-media .alt { opacity: 0; }
@media (hover: hover) {
  .card-link:hover .card-media img { transform: scale(1.025); }
  .card-link:hover .card-media .alt { opacity: 1; }
}
.tag { position: absolute; top: 10px; left: 10px; padding: 4px 8px; border-radius: 2px; background: var(--paper); color: var(--ink); font-size: .6875rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }
.tag.sale { color: var(--accent); }
.card-body { display: grid; gap: 2px; padding-top: 12px; }
.card-vendor { font-size: .6875rem; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }
.card-title { font-size: .9375rem; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-link:hover .card-title { text-decoration: underline; text-underline-offset: 3px; }
.price { font-size: .9375rem; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.price .compare, .compare { color: var(--ink-3); font-size: .875em; margin-left: 4px; }
.ph { display: block; background: var(--surface-2); }

/* ---------- home ---------- */
.hero { padding-block: clamp(16px, 4vw, 48px) clamp(48px, 8vw, 96px); }
.hero-grid { display: grid; gap: 28px; }
.hero-media { order: -1; margin-inline: calc(-1 * var(--gutter)); aspect-ratio: 1 / 1; background: var(--surface-2); overflow: hidden; }
.hero-media img { width: 100%; height: 100%; object-fit: cover; }
.hero-text { display: grid; gap: 20px; justify-items: start; align-content: center; }
.hero-text .display { font-size: clamp(2.25rem, 1.4rem + 3.4vw, 4.25rem); line-height: 1.02; max-width: 15ch; }
.hero-text .lead { max-width: 38ch; }
.hero-text .btn { margin-top: 8px; }
.hero.plain { text-align: center; padding-block: clamp(64px, 12vw, 160px); }
.hero.plain .hero-text { justify-items: center; }
@media (min-width: 900px) {
  .hero-grid { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(40px, 5vw, 80px); align-items: center; }
  .hero-media { order: 0; margin: 0; aspect-ratio: 6 / 5; border-radius: 3px; }
}
.sec { padding-block: clamp(32px, 5vw, 56px); }
.sec-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: clamp(20px, 3vw, 32px); }
.more { display: inline-flex; align-items: center; gap: 6px; color: var(--ink-2); font-size: .9375rem; text-decoration: none; white-space: nowrap; }
.more:hover { color: var(--ink); }
.more .icon { transition: transform var(--t-fast); }
.more:hover .icon { transform: translateX(3px); }
.cat-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 12px; }
@media (min-width: 900px) { .cat-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; } .cat-grid.few { grid-template-columns: repeat(var(--cols), minmax(0, 1fr)); } .cat-grid.few .cat-media { aspect-ratio: 3 / 2; } }
.cat-tile { display: grid; gap: 4px; text-decoration: none; }
.cat-media { position: relative; display: block; aspect-ratio: 4 / 5; overflow: hidden; background: var(--surface-2); border-radius: 3px; margin-bottom: 10px; }
.cat-media img, .cat-media .ph { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 600ms ease; }
.cat-tile:hover .cat-media img { transform: scale(1.03); }
.type-tile { display: grid; place-items: end start; padding: clamp(16px, 3vw, 28px); background: var(--accent-soft); color: var(--accent-strong); }
.type-tile.small span { font-size: clamp(1.125rem, 1rem + 1vw, 1.5rem); }
.type-tile span { font-family: var(--display); font-size: clamp(1.75rem, 1rem + 3vw, 3rem); line-height: 1; letter-spacing: -0.02em; text-wrap: balance; }
.cat-name { display: flex; align-items: center; gap: 8px; font-size: clamp(1.125rem, 1rem + .4vw, 1.375rem); }
.cat-name .icon { color: var(--ink-3); transition: transform var(--t-fast), color var(--t-fast); }
.cat-tile:hover .cat-name .icon { transform: translateX(4px); color: var(--ink); }
.cat-count { font-size: .8125rem; color: var(--ink-3); }
.text-sec { text-align: center; padding-block: clamp(56px, 9vw, 112px); }
.text-sec .wrap { display: grid; gap: 20px; justify-items: center; }
.text-sec .prose { font-family: var(--display); font-size: clamp(1.125rem, 1rem + .5vw, 1.4rem); line-height: 1.5; color: var(--ink-2); max-width: 46ch; }
.image-sec img { width: 100%; aspect-ratio: 21 / 9; object-fit: cover; border-radius: 3px; background: var(--surface-2); }

/* ---------- listing ---------- */
.crumbs { padding-top: 20px; font-size: .8125rem; color: var(--ink-3); }
.crumbs ol { display: flex; flex-wrap: wrap; gap: 6px; }
.crumbs li + li::before { content: "/"; margin-right: 6px; color: var(--line-strong); }
.crumbs a { text-decoration: none; color: var(--ink-2); }
.crumbs a:hover { color: var(--ink); text-decoration: underline; }
.crumbs [aria-current] { color: var(--ink-3); }
.page-head { display: grid; gap: 16px; padding: clamp(20px, 3vw, 36px) 0 clamp(24px, 3vw, 40px); }
.page-head.row { display: flex; align-items: baseline; gap: 16px; flex-wrap: wrap; }
.page-head .count { color: var(--ink-3); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; height: 36px; padding: 0 14px; border: 1px solid var(--line-strong); border-radius: var(--r-pill); font-size: .875rem; text-decoration: none; color: var(--ink-2); }
.chip:hover { border-color: var(--ink); color: var(--ink); }
.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 10px 0; margin-bottom: 28px; border-block: 1px solid var(--line); }
.toolbar .count { font-size: .875rem; color: var(--ink-2); }
.sort { display: flex; align-items: center; gap: 10px; font-size: .875rem; color: var(--ink-2); }
.sort select { height: 40px; width: auto; border-color: transparent; background: none; font-size: .875rem; color: var(--ink); padding-left: 8px; }
.sort select:hover { border-color: var(--line-strong); }
@media (max-width: 480px) { .sort > span:first-child { display: none; } }
.search-page { display: flex; align-items: center; gap: 10px; max-width: 640px; position: relative; }
.search-page > .icon { position: absolute; left: 14px; color: var(--ink-3); pointer-events: none; }
.search-page input { padding-left: 44px; }
.search-page .btn { min-height: 48px; }
.search-sum { color: var(--ink-2); margin-bottom: 12px; }
.pager { display: flex; justify-content: center; align-items: center; gap: 4px; margin-top: clamp(40px, 6vw, 72px); }
.pg-num, .pg-step { display: inline-grid; place-items: center; min-width: 44px; height: 44px; padding: 0 6px; border-radius: var(--r-pill); text-decoration: none; color: var(--ink-2); font-variant-numeric: tabular-nums; }
a.pg-num:hover, a.pg-step:hover { background: var(--surface-2); color: var(--ink); }
.pg-num[aria-current] { background: var(--ink); color: var(--paper); font-weight: 600; }
span.pg-step { color: var(--line-strong); }
.pg-gap { color: var(--ink-3); padding: 0 4px; }
.empty { display: grid; gap: 16px; justify-items: center; text-align: center; padding: clamp(64px, 10vw, 120px) 0; color: var(--ink-2); }
.empty .btn { margin-top: 8px; }

/* ---------- product ---------- */
.p-grid { display: grid; gap: 28px; padding-top: 16px; }
@media (min-width: 900px) {
  .p-grid { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(40px, 5vw, 80px); padding-top: 24px; align-items: start; }
  .p-info { position: sticky; top: calc(var(--header-h) + 24px); }
}
.gallery { display: grid; gap: 12px; min-width: 0; }
.g-stage { position: relative; }
.g-track {
  display: grid; grid-auto-flow: column; grid-auto-columns: 100%; overflow-x: auto; scroll-snap-type: x mandatory;
  scrollbar-width: none; aspect-ratio: 4 / 5; background: var(--surface-2); overscroll-behavior-x: contain;
}
.g-track::-webkit-scrollbar { display: none; }
.g-track:focus-visible { outline-offset: -2px; }
.g-slide { margin: 0; scroll-snap-align: start; position: relative; }
.g-slide img, .g-slide .ph { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.g-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; border-radius: 50%; border: 0; display: none; place-items: center; background: var(--paper); color: var(--ink); box-shadow: var(--shadow-2); transition: opacity var(--t-fast); }
.g-nav.prev { left: 16px; } .g-nav.next { right: 16px; }
.g-nav:disabled { opacity: 0; pointer-events: none; }
@media (hover: hover) { .gallery.multi .g-nav { display: grid; opacity: 0; } .g-stage:hover .g-nav:not(:disabled), .g-nav:focus-visible { opacity: 1; } }
.g-count { position: absolute; right: 12px; bottom: 12px; padding: 3px 10px; border-radius: var(--r-pill); background: var(--paper); font-size: .75rem; font-variant-numeric: tabular-nums; color: var(--ink-2); }
.g-count:empty { display: none; }
.g-thumbs { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 2px; }
.g-thumbs button { flex: none; width: 64px; aspect-ratio: 4 / 5; padding: 0; border: 1px solid transparent; border-radius: 3px; overflow: hidden; background: var(--surface-2); opacity: .7; transition: opacity var(--t-fast); }
.g-thumbs button:hover { opacity: 1; }
.g-thumbs button[aria-current] { opacity: 1; border-color: var(--ink); }
.g-thumbs img { width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 899px) {
  .gallery { margin-inline: calc(-1 * var(--gutter)); }
  .g-thumbs { padding-inline: var(--gutter); }
}
@media (min-width: 900px) { .g-track { aspect-ratio: 1 / 1; max-height: calc(100dvh - 180px); } .g-thumbs button { width: 76px; } .g-count { display: none; } }

.p-info { display: grid; gap: 20px; align-content: start; }
.p-info .eyebrow { margin-bottom: -10px; }
.p-title { font-size: clamp(1.875rem, 1.3rem + 1.8vw, 2.75rem); }
.p-price { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; font-variant-numeric: tabular-nums; }
.p-price .now { font-size: 1.375rem; font-weight: 500; }
.p-price .compare { font-size: 1.0625rem; margin: 0; }
.p-price .save { font-size: .75rem; font-weight: 600; padding: 3px 8px; border-radius: 2px; background: var(--accent-soft); color: var(--accent-strong); }
.p-price .vat { flex-basis: 100%; font-size: .8125rem; color: var(--ink-3); }
.p-buy { display: grid; gap: 20px; padding-top: 4px; }
.p-options { display: grid; gap: 20px; }
.p-options:empty { display: none; }
.opt legend { display: flex; gap: 8px; font-size: .875rem; color: var(--ink-2); margin-bottom: 10px; padding: 0; }
.opt legend span:first-child::after { content: ":"; }
.opt-value { color: var(--ink); font-weight: 600; }
.opt-values { display: flex; flex-wrap: wrap; gap: 8px; }
.pill { position: relative; }
.pill input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.pill span { display: inline-flex; align-items: center; justify-content: center; min-width: 52px; height: 44px; padding: 0 16px; border: 1px solid var(--line-strong); border-radius: var(--r-sm); font-size: .9375rem; background: var(--surface); transition: border-color var(--t-fast), background var(--t-fast); }
.pill:hover span { border-color: var(--ink); }
.pill input:checked + span { border-color: var(--ink); background: var(--ink); color: var(--paper); }
.pill input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.pill.oos span { color: var(--ink-3); text-decoration: line-through; text-decoration-color: var(--line-strong); border-style: dashed; }
.pill.oos input:checked + span { background: var(--surface-2); color: var(--ink-3); border-color: var(--ink-3); }
.p-qty-row { display: flex; align-items: center; gap: 16px; }
.p-qty { display: flex; align-items: center; gap: 14px; }
.p-qty .lbl { font-size: .875rem; color: var(--ink-2); }
.p-msg .notice { margin: 0; }
.p-stock { display: flex; align-items: center; gap: 8px; font-size: .875rem; color: var(--ink-2); margin-top: -6px; }
.p-stock .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); }
.p-stock.no .dot { background: var(--ink-3); }
.p-assure { display: grid; gap: 10px; padding: 18px 0; border-block: 1px solid var(--line); font-size: .875rem; color: var(--ink-2); }
.p-assure li { display: flex; align-items: center; gap: 10px; }
.p-assure .icon { color: var(--ink-3); }
.p-desc { display: grid; gap: 12px; }
.p-desc .h3 { font-family: var(--font-sans); font-size: .75rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }
.p-details { display: grid; grid-template-columns: auto 1fr; gap: 6px 20px; font-size: .875rem; margin: 0; }
.p-details dt { color: var(--ink-3); }
.p-details dd { margin: 0; color: var(--ink-2); }
.p-details .sku { font-family: var(--font-mono); font-size: .8125rem; }
.related { margin-top: clamp(32px, 6vw, 72px); }

/* ---------- cart lines ---------- */
.lines { display: grid; }
.line { display: grid; grid-template-columns: 88px minmax(0, 1fr) auto; gap: 16px; padding: 20px 0; border-bottom: 1px solid var(--line); transition: opacity var(--t-fast); }
.lines.compact .line { grid-template-columns: 72px minmax(0, 1fr) auto; }
.line.busy { opacity: .5; pointer-events: none; }
.line-media { display: block; aspect-ratio: 4 / 5; background: var(--surface-2); border-radius: 3px; overflow: hidden; }
.line-media img, .line-media .ph { width: 100%; height: 100%; object-fit: cover; }
.line-main { display: grid; gap: 2px; align-content: start; min-width: 0; }
.line-title { font-weight: 500; text-decoration: none; line-height: 1.35; }
.line-title:hover { text-decoration: underline; }
.line-variant, .line-unit { font-size: .8125rem; color: var(--ink-3); }
.line-warn { display: inline-flex; gap: 6px; align-items: center; font-size: .8125rem; color: var(--bad); }
.line-actions { display: flex; align-items: center; gap: 16px; margin-top: 10px; }
.line-actions .stepper { height: 36px; }
.line-actions .stepper button { width: 34px; }
.line-actions .stepper input { width: 36px !important; }
.line-total { font-variant-numeric: tabular-nums; font-weight: 500; }
.sum-row { display: flex; justify-content: space-between; gap: 16px; padding: 5px 0; font-variant-numeric: tabular-nums; }
.sum-row.strong { font-weight: 600; font-size: 1.0625rem; }
.sum-row.disc > span:last-child { color: var(--ok); }
.sum-row.total { font-size: 1.25rem; font-weight: 600; border-top: 1px solid var(--line); margin-top: 8px; padding-top: 14px; }
.code-tag { margin-left: 8px; font-family: var(--font-mono); font-size: .75rem; padding: 2px 6px; border-radius: 2px; background: var(--surface); border: 1px solid var(--line); }

.cart-grid { display: grid; gap: 32px; }
.cart-page .lines { border-top: 1px solid var(--line); }
.summary { display: grid; gap: 12px; align-content: start; padding: 24px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); }
.summary .btn.primary { margin-top: 8px; }
@media (min-width: 900px) {
  .cart-grid { grid-template-columns: minmax(0, 1fr) 380px; gap: 56px; align-items: start; }
  .summary { position: sticky; top: calc(var(--header-h) + 24px); }
}

/* ---------- checkout ---------- */
.checkout > .display { padding: clamp(20px, 3vw, 36px) 0 8px; font-size: clamp(1.75rem, 1.3rem + 1.6vw, 2.5rem); }
.co-grid { display: grid; gap: 24px; }
.co-summary { order: -1; }
@media (min-width: 900px) {
  .co-grid { grid-template-columns: minmax(0, 1fr) minmax(340px, 420px); gap: clamp(40px, 5vw, 72px); align-items: start; }
  .co-summary { order: 0; position: sticky; top: calc(var(--header-h) + 24px); }
  .sum-toggle > summary { pointer-events: none; }
  .sum-toggle > summary .mob-total { display: none; }
}
.co-form { display: grid; gap: 0; }
.co-step { padding: 28px 0; border-bottom: 1px solid var(--line); display: grid; gap: 16px; }
.co-step:first-of-type { padding-top: 12px; }
.co-h { display: flex; align-items: center; gap: 12px; font-size: 1.125rem; font-weight: 600; }
.co-n { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--accent-soft); color: var(--accent-strong); font-size: .8125rem; font-weight: 700; }
.fields { display: grid; gap: 14px 14px; grid-template-columns: 1fr; }
@media (min-width: 560px) { .fields { grid-template-columns: 1fr 1fr; } .field.wide { grid-column: 1 / -1; } }
.field { display: grid; gap: 6px; align-content: start; }
.field label { font-size: .8125rem; color: var(--ink-2); font-weight: 500; }
.field .hint { font-size: .8125rem; color: var(--ink-3); }
.check { display: flex; gap: 10px; align-items: center; font-size: .9375rem; cursor: pointer; }
.co-billing { display: grid; gap: 16px; padding-top: 8px; }
.co-rates, .co-pay { display: grid; gap: 8px; }
.choice { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border: 1px solid var(--line-strong); border-radius: var(--r-md); background: var(--surface); cursor: pointer; transition: border-color var(--t-fast), box-shadow var(--t-fast); }
.choice:hover { border-color: var(--ink-3); }
.choice:has(input:checked) { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.choice-main { flex: 1; display: grid; gap: 1px; min-width: 0; }
.choice-title { font-weight: 500; }
.choice-sub { font-size: .8125rem; color: var(--ink-3); }
.choice-price { font-variant-numeric: tabular-nums; font-weight: 500; white-space: nowrap; }
.pay-mark { font-size: .625rem; font-weight: 700; letter-spacing: .08em; color: var(--ink-3); border: 1px solid var(--line); border-radius: 3px; padding: 3px 6px; }
.pay-btn { margin-top: 28px; }
.terms { text-align: center; margin-top: 12px; }
.co-banner .notice { margin: 8px 0 0; }

.sum-toggle { background: var(--surface-2); border-radius: var(--r-md); padding: 0 20px; }
.sum-toggle > summary { list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 16px 0; cursor: pointer; font-weight: 600; }
.sum-toggle > summary::-webkit-details-marker { display: none; }
.sum-toggle > summary > span:first-child::after { content: ""; display: inline-block; width: 6px; height: 6px; margin: 0 0 3px 10px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg); transition: transform var(--t-fast); }
.sum-toggle[open] > summary > span:first-child::after { transform: rotate(-135deg); margin-bottom: -1px; }
@media (min-width: 900px) { .sum-toggle > summary > span:first-child::after { display: none; } .sum-toggle { padding: 4px 24px 20px; } }
.mob-total { font-variant-numeric: tabular-nums; }
.sum-lines { display: grid; gap: 14px; padding: 6px 0 18px; }
.sum-lines li { display: flex; align-items: center; gap: 14px; }
.sum-media { position: relative; flex: none; width: 56px; aspect-ratio: 4 / 5; border-radius: 3px; background: var(--surface); border: 1px solid var(--line); }
.sum-media img, .sum-media .ph { width: 100%; height: 100%; object-fit: cover; border-radius: 3px; }
.qty-badge { position: absolute; top: -8px; right: -8px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: var(--r-pill); background: var(--ink-2); color: var(--paper); font-size: .6875rem; font-weight: 700; line-height: 20px; text-align: center; }
.sum-name { flex: 1; display: grid; min-width: 0; font-size: .9375rem; line-height: 1.35; }
.sum-price { font-variant-numeric: tabular-nums; font-size: .9375rem; }
.code-form { display: flex; gap: 8px; padding: 16px 0; border-block: 1px solid var(--line); }
.code-form input { height: 44px; text-transform: uppercase; }
.code-form input::placeholder { text-transform: none; }
.code-form .btn { min-height: 44px; }
.code-msg .notice { margin: 10px 0 0; }
.code-ok { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; padding-top: 10px; font-size: .875rem; color: var(--ok); }
.code-ok > span { color: var(--ink-2); }
.sum-totals { padding-top: 12px; display: grid; }
.sum-totals .fine { margin-top: 2px; }
.edit-cart { display: inline-block; margin-top: 14px; font-size: .8125rem; color: var(--ink-2); }

/* ---------- order ---------- */
.order-page { display: grid; gap: 28px; padding-top: clamp(32px, 6vw, 72px); }
.order-status { display: grid; gap: 14px; justify-items: center; text-align: center; }
.order-status .display { font-size: clamp(2rem, 1.4rem + 2.2vw, 3rem); }
.order-status .lead { max-width: 46ch; }
.st-icon { display: grid; place-items: center; width: 64px; height: 64px; border-radius: 50%; background: var(--accent-soft); color: var(--accent-strong); margin-bottom: 4px; }
.st-paid .st-icon, .st-fulfilled .st-icon { background: var(--ok-soft); color: var(--ok); }
.st-failed .st-icon, .st-cancelled .st-icon { background: var(--bad-soft); color: var(--bad); }
.st-icon .spinner { width: 24px; height: 24px; }
.order-card { padding: 24px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); }
.order-meta { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding-bottom: 12px; }
.order-card .sum-lines { border-bottom: 1px solid var(--line); }
.order-info { display: grid; gap: 24px; font-size: .9375rem; color: var(--ink-2); }
.order-info .h4 { margin-bottom: 8px; }
@media (min-width: 720px) { .order-info { grid-template-columns: repeat(3, 1fr); } }

/* ---------- content pages ---------- */
.content-page { display: grid; gap: 24px; }
.content-page .display { padding-top: 12px; }
.content-page .prose { font-size: 1.0625rem; line-height: 1.7; }

.noscript { max-width: 640px; margin: 96px auto; padding: 0 16px; display: grid; gap: 10px; color: var(--ink-2); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 1ms !important; transition-duration: 1ms !important; scroll-behavior: auto !important; }
}
