:root {
  --bg: #ffffff;
  --surface: #f5f7fa;
  --surface-2: #eceff3;
  --line: #e3e7ec;
  --line-strong: #c9d0d8;
  --ink: #141c25;
  --muted: #5f6b78;
  --faint: #8b95a1;
  --accent: #0d4ba0;
  --accent-dark: #0a3c80;
  --accent-soft: #e8eff9;
  --header-h: 121px;
  --ok: #1a7f4b;
  --ok-soft: #e6f4ec;
  --warn: #b7791f;
  --warn-soft: #fbf1df;
  --danger: #c0392b;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 10px 30px rgba(20, 28, 37, .10), 0 2px 6px rgba(20, 28, 37, .06);
  --font: "Instrument Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --wrap: 1360px;
  --gutter: 20px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition: none !important; animation: none !important; } }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--bg);
  font-feature-settings: "tnum" 1;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }
input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4 { margin: 0; line-height: 1.15; letter-spacing: -0.01em; }
h1 { font-size: clamp(26px, 3vw, 36px); font-weight: 600; }
h2 { font-size: clamp(20px, 2.2vw, 26px); font-weight: 600; }
h3 { font-size: 17px; font-weight: 600; }
p { margin: 0; }
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter); }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: #fff; padding: 8px 12px; border-radius: 6px; z-index: 100; }
.skip:focus { left: 8px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
[hidden] { display: none !important; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 44px; padding: 0 18px; border-radius: var(--radius-sm);
  border: 1px solid var(--line-strong); background: #fff; color: var(--ink);
  font-weight: 600; white-space: nowrap; transition: background .15s, border-color .15s, color .15s;
}
.btn:hover { background: var(--surface); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover { background: var(--accent-dark); border-color: var(--accent-dark); }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.ghost:hover { background: var(--surface); }
.btn.sm { height: 36px; padding: 0 12px; font-size: 14px; }
.btn.block { width: 100%; }
.btn:disabled { opacity: .5; cursor: default; }
.icon-btn { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 10px; border: 0; background: transparent; }
.icon-btn:hover { background: var(--surface); }
.link { color: var(--accent); font-weight: 500; }
.link:hover { text-decoration: underline; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 50; background: #fff; border-bottom: 1px solid var(--line); }
.header-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 28px; height: 72px; }
.menu-btn { display: none; }
.logo { display: inline-flex; align-items: center; gap: 10px; }
.logo-mark { display: block; width: 44px; height: 44px; }
.logo-text { font-weight: 600; font-size: 17px; letter-spacing: -0.01em; }
.search { position: relative; width: 100%; }
.search-icon { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.search input {
  width: 100%; height: 48px; padding: 0 44px 0 46px; border-radius: 12px;
  border: 1.5px solid var(--line-strong); background: var(--surface); font-size: 16px;
  transition: border-color .15s, background .15s;
}
.search input::-webkit-search-cancel-button { display: none; }
.search input:focus { outline: none; border-color: var(--accent); background: #fff; box-shadow: 0 0 0 4px var(--accent-soft); }
.search-clear { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); width: 32px; height: 32px; border: 0; border-radius: 8px; background: transparent; color: var(--muted); display: none; }
.search.has-text .search-clear { display: inline-flex; align-items: center; justify-content: center; }
.search-clear:hover { background: var(--surface-2); color: var(--ink); }
.search-results {
  position: absolute; left: 0; right: 0; top: calc(100% + 8px); background: #fff; border: 1px solid var(--line);
  border-radius: 14px; box-shadow: var(--shadow); overflow: hidden; z-index: 60; max-height: min(70vh, 640px); overflow-y: auto;
}
.sr-section { padding: 10px 8px 6px; }
.sr-section + .sr-section { border-top: 1px solid var(--line); }
.sr-title { font-size: 12.5px; color: var(--muted); font-weight: 500; padding: 4px 10px 6px; }
.sr-item { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 8px 10px; border-radius: 10px; }
.sr-item:hover, .sr-item.active { background: var(--surface); }
.sr-item img { width: 44px; height: 44px; object-fit: contain; border-radius: 8px; background: #fff; border: 1px solid var(--line); }
.sr-name { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sr-sku { font-size: 13px; color: var(--muted); }
.sr-price { font-weight: 600; font-size: 14px; }
.sr-cat { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 10px; font-weight: 500; }
.sr-cat:hover, .sr-cat.active { background: var(--surface); }
.sr-cat small { color: var(--muted); font-weight: 400; }
.sr-all { display: block; padding: 12px 18px; text-align: center; font-weight: 600; color: var(--accent); border-top: 1px solid var(--line); background: var(--surface); }
.sr-all:hover, .sr-all.active { background: var(--accent-soft); }
.sr-empty { padding: 20px 18px; color: var(--muted); }
mark { background: transparent; color: var(--accent); font-weight: 600; }

.header-actions { display: flex; align-items: center; justify-content: flex-end; gap: 4px; margin-right: -12px; }
.header-action { position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 12px; border-radius: 10px; font-size: 12px; font-weight: 500; color: var(--muted); }
.header-action:hover { background: var(--surface); color: var(--ink); }
.header-action svg { color: var(--ink); }
.header-action .count { position: absolute; top: 2px; right: 6px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--accent); color: #fff; font-size: 11px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }

.nav-row { display: flex; align-items: center; gap: 8px; height: 48px; border-top: 1px solid var(--line); }
.all-products { display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 12px; border-radius: 8px; border: 0; background: var(--ink); color: #fff; font-weight: 600; font-size: 14px; }
.all-products:hover { background: #26323f; }
.all-products[aria-expanded="true"] .chev { transform: rotate(180deg); }
.quick-links { display: flex; align-items: center; gap: 2px; overflow-x: auto; scrollbar-width: none; }
.quick-links::-webkit-scrollbar { display: none; }
.quick-links a { padding: 8px 12px; border-radius: 8px; font-weight: 500; font-size: 14px; color: var(--muted); white-space: nowrap; }
.quick-links a:hover { color: var(--ink); background: var(--surface); }
.ship-note { margin-left: auto; font-size: 13px; color: var(--muted); white-space: nowrap; }

.mega { position: absolute; left: 0; right: 0; top: 100%; background: #fff; border-bottom: 1px solid var(--line); box-shadow: 0 20px 40px rgba(20,28,37,.12); }
.mega-inner { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px 24px; padding: 20px var(--gutter) 24px; max-width: var(--wrap); margin: 0 auto; }
.mega a { display: flex; align-items: center; gap: 12px; padding: 8px 10px; border-radius: 10px; font-weight: 500; }
.mega a img { width: 40px; height: 40px; object-fit: contain; border-radius: 8px; border: 1px solid var(--line); background: #fff; }
.mega a small { color: var(--muted); font-weight: 400; margin-left: auto; }
.mega a:hover { background: var(--surface); }

/* Drawer (mobile) */
.drawer-backdrop { position: fixed; inset: 0; background: rgba(20,28,37,.45); z-index: 70; }
.drawer { position: fixed; top: 0; bottom: 0; left: 0; width: min(88vw, 360px); background: #fff; z-index: 80; display: flex; flex-direction: column; box-shadow: var(--shadow); }
.drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.drawer-body { overflow-y: auto; padding: 10px 10px 30px; }
.drawer-body h4 { padding: 12px 10px 4px; font-size: 13px; color: var(--muted); font-weight: 500; }
.drawer-body a { display: flex; align-items: center; justify-content: space-between; padding: 11px 10px; border-radius: 10px; font-weight: 500; }
.drawer-body a:hover { background: var(--surface); }
.drawer-body a small { color: var(--muted); font-weight: 400; }
body.locked { overflow: hidden; }

/* Layout bits */
.main { min-height: 60vh; }
.section { padding: 40px 0; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.section-head p { color: var(--muted); margin-top: 4px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.pill { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; border-radius: 999px; font-size: 12.5px; font-weight: 600; background: var(--surface-2); color: var(--ink); }
.pill.ok { background: var(--ok-soft); color: var(--ok); }
.pill.warn { background: var(--warn-soft); color: var(--warn); }
.pill.accent { background: var(--accent-soft); color: var(--accent); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; }

/* Home */
.hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 48px; align-items: center; padding: 40px 0; min-height: calc(100vh - var(--header-h)); }
.hero h1 { font-size: clamp(32px, 4.2vw, 52px); letter-spacing: -0.025em; line-height: 1.05; }
.hero p.lead { font-size: 18px; color: var(--muted); margin-top: 16px; max-width: 52ch; }
.hero-search { margin-top: 28px; display: flex; gap: 10px; }
.hero-search input { flex: 1; height: 54px; padding: 0 18px; border-radius: 12px; border: 1.5px solid var(--line-strong); font-size: 17px; }
.hero-search input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.hero-search .btn { height: 54px; padding: 0 24px; }
.hero-pop { margin-top: 14px; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; color: var(--muted); font-size: 14px; }
.hero-pop a { padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); font-weight: 500; color: var(--ink); }
.hero-pop a:hover { border-color: var(--line-strong); background: var(--surface); }
.hero-mosaic { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-template-rows: repeat(3, minmax(0, 1fr)); gap: 12px; height: min(calc(100vh - var(--header-h) - 80px), 760px); }
.hero-mosaic a { border-radius: 16px; background: var(--surface); border: 1px solid var(--line); overflow: hidden; display: block; }
.hero-mosaic a:nth-child(1) { grid-column: span 2; grid-row: span 2; }
.hero-mosaic img { width: 100%; height: 100%; object-fit: contain; padding: 10%; mix-blend-mode: multiply; }

.cat-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 14px; }
.cat-card { display: flex; flex-direction: column; gap: 10px; padding: 12px; border-radius: 14px; border: 1px solid var(--line); background: #fff; transition: border-color .15s, transform .15s; }
.cat-card:hover { border-color: var(--line-strong); }
.cat-card .thumb { aspect-ratio: 1; border-radius: 10px; background: var(--surface); overflow: hidden; }
.cat-card img { width: 100%; height: 100%; object-fit: contain; padding: 12%; mix-blend-mode: multiply; }
.cat-card b { font-weight: 600; font-size: 14px; line-height: 1.25; }
.cat-card small { color: var(--muted); font-size: 12.5px; }

.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 40px; align-items: center; padding: 40px 0; }
.split.flip .split-media { order: 2; }
.split-media { border-radius: 18px; background: var(--surface); border: 1px solid var(--line); aspect-ratio: 4 / 3; display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 10px; padding: 14px; }
.split-media img { width: 100%; height: 100%; object-fit: contain; mix-blend-mode: multiply; padding: 8%; background: #fff; border-radius: 12px; border: 1px solid var(--line); }
.split h2 { font-size: clamp(24px, 2.8vw, 34px); letter-spacing: -0.02em; }
.split p { color: var(--muted); margin-top: 12px; font-size: 16px; max-width: 48ch; }
.split .btn { margin-top: 20px; }
.stat-row { display: flex; gap: 28px; margin-top: 22px; flex-wrap: wrap; }
.stat-row b { display: block; font-size: 26px; font-weight: 600; letter-spacing: -0.02em; }
.stat-row span { color: var(--muted); font-size: 14px; }

/* Product cards */
.product-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.product-grid.cols-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.card { position: relative; display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 14px; background: #fff; overflow: hidden; transition: border-color .15s, box-shadow .15s; }
.card:hover { border-color: var(--line-strong); box-shadow: 0 6px 18px rgba(20,28,37,.06); }
.card-media { position: relative; aspect-ratio: 1; background: #fff; display: block; }
.card-media img { width: 100%; height: 100%; object-fit: contain; padding: 10%; }
.card-fav { position: absolute; top: 10px; right: 10px; width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--line); background: #fff; display: inline-flex; align-items: center; justify-content: center; color: var(--muted); }
.card-fav:hover { color: var(--ink); border-color: var(--line-strong); }
.card-fav.on { color: var(--danger); border-color: var(--danger); }
.card-fav.on svg { fill: currentColor; }
.card-tags { position: absolute; top: 10px; left: 10px; display: flex; gap: 6px; }
.card-body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.card-name { font-weight: 500; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.6em; }
.card-name:hover { color: var(--accent); }
.card-sku { font-size: 13px; color: var(--muted); }
.card-price { display: flex; align-items: baseline; gap: 8px; margin-top: 2px; }
.card-price b { font-size: 17px; font-weight: 600; }
.card-price s { color: var(--faint); font-size: 13px; }
.card-price small { color: var(--muted); font-size: 12.5px; }
.card-stock { font-size: 13px; color: var(--ok); display: flex; align-items: center; gap: 6px; }
.card-stock.low { color: var(--warn); }
.card-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; padding-top: 8px; }
.card-actions .qty { flex: 0 0 92px; }
.card-actions .btn { flex: 1 1 112px; min-width: 0; padding: 0 10px; font-size: 14px; }
.card .qty { grid-template-columns: 28px minmax(0, 1fr) 28px; }
.qty { display: inline-grid; grid-template-columns: 32px minmax(0, 1fr) 32px; height: 40px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); overflow: hidden; background: #fff; }
.qty button { border: 0; background: transparent; color: var(--muted); font-size: 18px; }
.qty button:hover { background: var(--surface); color: var(--ink); }
.qty input { width: 100%; min-width: 0; border: 0; text-align: center; font-weight: 600; padding: 0; -moz-appearance: textfield; }
.qty input::-webkit-outer-spin-button, .qty input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.qty.lg { height: 48px; grid-template-columns: 44px minmax(0,1fr) 44px; font-size: 16px; }

/* Shop */
.shop { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 32px; padding: 28px 0 60px; }
.shop-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.shop-head p { color: var(--muted); }
.cat-strip { display: flex; gap: 8px; overflow-x: auto; padding: 14px 0 4px; scrollbar-width: none; }
.cat-strip::-webkit-scrollbar { display: none; }
.cat-strip a { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line); white-space: nowrap; font-weight: 500; font-size: 14px; }
.cat-strip a small { color: var(--faint); font-weight: 500; }
.cat-strip a.on small { color: rgba(255,255,255,.7); }
.cat-strip a:hover { border-color: var(--line-strong); background: var(--surface); }
.cat-strip a.on { border-color: var(--ink); background: var(--ink); color: #fff; }
.toolbar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 14px 0; border-bottom: 1px solid var(--line); margin-bottom: 18px; }
.toolbar .count-text { color: var(--muted); }
.toolbar-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.select { position: relative; display: inline-flex; align-items: center; height: 40px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: #fff; padding: 0 10px 0 12px; gap: 8px; font-weight: 500; }
.select select { appearance: none; border: 0; background: transparent; padding-right: 18px; font-weight: 600; cursor: pointer; }
.select::after { content: ""; position: absolute; right: 12px; top: 50%; width: 7px; height: 7px; border-right: 1.8px solid var(--muted); border-bottom: 1.8px solid var(--muted); transform: translateY(-70%) rotate(45deg); pointer-events: none; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 10px 0 12px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-weight: 600; font-size: 13px; border: 0; }
.chip:hover { background: #dbe6ff; }
.chip.clear { background: transparent; color: var(--muted); text-decoration: underline; padding: 0 6px; }
.filter-btn { display: none; }

.filters { position: sticky; top: 136px; align-self: start; max-height: calc(100vh - 150px); overflow-y: auto; padding-right: 6px; }
.fgroup { padding: 16px 0; border-bottom: 1px solid var(--line); }
.fgroup:first-child { padding-top: 4px; }
.fgroup h4 { font-size: 14px; font-weight: 600; margin-bottom: 10px; display: flex; justify-content: space-between; align-items: center; }
.fgroup h4 button { border: 0; background: transparent; color: var(--accent); font-size: 13px; font-weight: 500; }
.fopt { display: flex; align-items: center; gap: 10px; padding: 5px 0; cursor: pointer; font-size: 14px; }
.fopt input { width: 17px; height: 17px; margin: 0; accent-color: var(--accent); }
.fopt .n { margin-left: auto; color: var(--faint); font-size: 12.5px; }
.fopt .sw { width: 14px; height: 14px; border-radius: 50%; border: 1px solid rgba(0,0,0,.15); }
.fopt.more { color: var(--accent); font-weight: 500; }
.price-inputs { display: grid; grid-template-columns: minmax(0,1fr) auto minmax(0,1fr) auto; gap: 8px; align-items: center; }
.price-inputs input { width: 100%; height: 38px; border: 1px solid var(--line-strong); border-radius: 8px; padding: 0 10px; }
.price-inputs .btn { height: 38px; padding: 0 12px; }
.price-presets { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.price-presets button { height: 28px; padding: 0 10px; border-radius: 999px; border: 1px solid var(--line); background: #fff; font-size: 13px; }
.price-presets button:hover, .price-presets button.on { border-color: var(--ink); background: var(--ink); color: #fff; }

.pagination { display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: 28px; flex-wrap: wrap; }
.pagination a, .pagination span { display: inline-flex; align-items: center; justify-content: center; min-width: 40px; height: 40px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--line); font-weight: 500; }
.pagination a:hover { background: var(--surface); }
.pagination .on { background: var(--ink); color: #fff; border-color: var(--ink); }
.pagination .gap { border: 0; }
.empty { padding: 60px 20px; text-align: center; color: var(--muted); border: 1px dashed var(--line-strong); border-radius: 16px; }
.empty h3 { color: var(--ink); margin-bottom: 6px; }

/* Product page */
.product { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 48px; padding: 28px 0 40px; }
.gallery { display: grid; grid-template-columns: 84px minmax(0, 1fr); gap: 14px; align-self: start; position: sticky; top: 140px; }
.thumbs { display: flex; flex-direction: column; gap: 10px; }
.thumbs button { width: 84px; height: 84px; border-radius: 12px; border: 1.5px solid var(--line); background: #fff; padding: 6px; }
.thumbs button img { width: 100%; height: 100%; object-fit: contain; }
.thumbs button.on { border-color: var(--ink); }
.gallery-main { position: relative; aspect-ratio: 1; border-radius: 18px; border: 1px solid var(--line); background: #fff; overflow: hidden; }
.gallery-main img { width: 100%; height: 100%; object-fit: contain; padding: 8%; cursor: zoom-in; }
.gallery-main .zoom-hint { position: absolute; bottom: 12px; right: 12px; font-size: 12.5px; color: var(--muted); background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 4px 10px; }
.buy h1 { font-size: clamp(22px, 2.4vw, 30px); letter-spacing: -0.02em; }
.buy .meta { display: flex; gap: 14px; flex-wrap: wrap; color: var(--muted); margin-top: 10px; font-size: 14px; align-items: center; }
.buy .meta b { color: var(--ink); font-weight: 600; }
.variants { margin-top: 20px; }
.variants h4 { font-size: 14px; font-weight: 500; color: var(--muted); margin-bottom: 8px; }
.variants h4 b { color: var(--ink); }
.swatches { display: flex; gap: 8px; flex-wrap: wrap; }
.swatches a { width: 56px; height: 56px; border-radius: 10px; border: 1.5px solid var(--line); background: #fff; padding: 4px; }
.swatches a img { width: 100%; height: 100%; object-fit: contain; }
.swatches a.on { border-color: var(--ink); }
.tiers { margin-top: 22px; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.tiers table { width: 100%; border-collapse: collapse; }
.tiers th, .tiers td { padding: 10px 14px; text-align: left; font-size: 14px; }
.tiers th { background: var(--surface); color: var(--muted); font-weight: 500; }
.tiers td { border-top: 1px solid var(--line); }
.tiers td:last-child, .tiers th:last-child { text-align: right; }
.tiers tr.on td { background: var(--accent-soft); font-weight: 600; }
.tiers tr.on td:first-child::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); margin-right: 8px; }
.tiers .save { color: var(--ok); font-weight: 600; font-size: 12.5px; margin-left: 8px; }
.tiers caption { caption-side: top; text-align: left; padding: 10px 14px 0; font-size: 13px; color: var(--muted); }
.buy-row { display: grid; grid-template-columns: 150px minmax(0, 1fr) 48px; gap: 10px; margin-top: 18px; }
.buy-row .btn { height: 48px; }
.fav-btn { width: 48px; height: 48px; border-radius: var(--radius-sm); border: 1px solid var(--line-strong); background: #fff; display: inline-flex; align-items: center; justify-content: center; color: var(--muted); }
.fav-btn:hover { color: var(--ink); }
.fav-btn.on { color: var(--danger); border-color: var(--danger); }
.fav-btn.on svg { fill: currentColor; }
.line-total { margin-top: 12px; display: flex; justify-content: space-between; align-items: baseline; }
.line-total b { font-size: 24px; font-weight: 600; letter-spacing: -0.02em; }
.line-total span { color: var(--muted); font-size: 14px; }
.stock-box { margin-top: 20px; border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; display: grid; gap: 10px; }
.stock-line { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 14px; }
.stock-line b { font-weight: 600; }
.stock-line .ok { color: var(--ok); }
.stock-line .warn { color: var(--warn); }
.stock-box .link { font-size: 13.5px; }
.live-note { font-size: 12.5px; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.live-note .dot { background: var(--ok); animation: pulse 1.6s infinite; }
@keyframes pulse { 50% { opacity: .35; } }

.tabs { position: sticky; top: 120px; z-index: 5; background: #fff; display: flex; gap: 4px; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs button { height: 48px; padding: 0 16px; border: 0; background: transparent; font-weight: 500; color: var(--muted); white-space: nowrap; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs button:hover { color: var(--ink); }
.tabs button.on { color: var(--ink); border-bottom-color: var(--ink); font-weight: 600; }
.tab-panel { padding: 28px 0 10px; }
.details-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 40px; }
.details-grid p.lead { font-size: 16px; color: var(--ink); max-width: 70ch; margin-bottom: 18px; }
.spec { width: 100%; border-collapse: collapse; }
.spec th, .spec td { text-align: left; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 14px; vertical-align: top; }
.spec th { color: var(--muted); font-weight: 500; width: 42%; padding-right: 16px; }
.usability { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 18px; }
.usability div { display: flex; align-items: center; gap: 8px; font-size: 14px; padding: 6px 0; }
.usability .yes { color: var(--ok); }
.usability .no { color: var(--faint); }
.usability .no span { color: var(--muted); }
.inv-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 36px; align-items: start; }
.map { width: 100%; height: auto; }
.map .land { fill: var(--surface); stroke: var(--line-strong); stroke-width: 1; }
.map .wh circle { fill: var(--accent); }
.map .wh.zero circle { fill: var(--faint); }
.map .wh.home circle { stroke: var(--ink); stroke-width: 2; }
.map .wh text { font-family: var(--font); font-size: 11px; fill: var(--ink); font-weight: 600; }
.map .wh text.city { font-weight: 400; fill: var(--muted); font-size: 10px; }
.inv-table { width: 100%; border-collapse: collapse; }
.inv-table th, .inv-table td { padding: 9px 10px; text-align: left; font-size: 14px; border-bottom: 1px solid var(--line); }
.inv-table th { color: var(--muted); font-weight: 500; font-size: 13px; }
.inv-table td.num, .inv-table th.num { text-align: right; }
.inv-table tr.home td { background: var(--accent-soft); }
.inv-table tr.home td:first-child::after { content: "Nearest"; margin-left: 8px; font-size: 11px; font-weight: 600; color: var(--accent); }
.inv-summary { display: flex; gap: 24px; margin-bottom: 14px; flex-wrap: wrap; }
.inv-summary b { display: block; font-size: 24px; letter-spacing: -0.02em; font-weight: 600; }
.inv-summary span { color: var(--muted); font-size: 13.5px; }
.steps { display: grid; gap: 14px; max-width: 72ch; }
.step { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 12px; }
.step .tick { width: 28px; height: 28px; border-radius: 50%; background: var(--surface-2); display: inline-flex; align-items: center; justify-content: center; color: var(--ink); }
.step h4 { font-size: 15px; font-weight: 600; }
.step p { color: var(--muted); font-size: 14px; }
.video { position: relative; max-width: 760px; aspect-ratio: 16/9; border-radius: 16px; background: var(--ink); overflow: hidden; display: grid; place-items: center; }
.video img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; opacity: .55; padding: 8%; }
.video .play { position: relative; width: 72px; height: 72px; border-radius: 50%; background: #fff; display: grid; place-items: center; border: 0; }
.video-meta { display: flex; gap: 16px; margin-top: 12px; color: var(--muted); font-size: 14px; }
.downloads { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; max-width: 900px; }
.download { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 14px; border: 1px solid var(--line); border-radius: 14px; }
.download .ext { width: 44px; height: 44px; border-radius: 10px; background: var(--surface-2); display: grid; place-items: center; font-weight: 700; font-size: 12px; }
.download b { display: block; font-weight: 600; }
.download small { color: var(--muted); }
.scroller { display: grid; grid-auto-flow: column; grid-auto-columns: 256px; gap: 14px; overflow-x: auto; padding-bottom: 6px; scroll-snap-type: x proximity; }
.scroller > * { scroll-snap-align: start; }

/* Cart */
.cart { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 40px; padding: 28px 0 60px; align-items: start; }
.cart-list { display: grid; gap: 0; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.cart-item { display: grid; grid-template-columns: 96px minmax(0, 1fr) 150px 110px 40px; gap: 16px; align-items: center; padding: 16px; }
.cart-item + .cart-item { border-top: 1px solid var(--line); }
.cart-item img { width: 96px; height: 96px; object-fit: contain; border: 1px solid var(--line); border-radius: 12px; }
.cart-item .name { font-weight: 500; }
.cart-item .sub { color: var(--muted); font-size: 13px; margin-top: 4px; }
.cart-item .tier-note { color: var(--ok); font-size: 12.5px; font-weight: 500; margin-top: 4px; }
.cart-item .money { text-align: right; }
.cart-item .money b { font-size: 17px; }
.cart-item .money small { display: block; color: var(--muted); }
.remove { width: 36px; height: 36px; border-radius: 8px; border: 0; background: transparent; color: var(--faint); display: inline-flex; align-items: center; justify-content: center; }
.remove:hover { background: var(--surface); color: var(--danger); }
.summary { border: 1px solid var(--line); border-radius: 16px; padding: 20px; position: sticky; top: 140px; }
.summary h3 { margin-bottom: 14px; }
.sum-line { display: flex; justify-content: space-between; padding: 7px 0; font-size: 14.5px; }
.sum-line.total { border-top: 1px solid var(--line); margin-top: 8px; padding-top: 14px; font-size: 17px; font-weight: 600; }
.freight { margin: 14px 0; padding: 12px 14px; border-radius: 12px; background: var(--surface); font-size: 13.5px; }
.freight .bar { height: 6px; border-radius: 3px; background: var(--surface-2); margin-top: 8px; overflow: hidden; }
.freight .bar i { display: block; height: 100%; background: var(--ok); border-radius: 3px; }
.promo { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; margin-top: 12px; }
.promo input { height: 40px; border: 1px solid var(--line-strong); border-radius: 8px; padding: 0 12px; min-width: 0; }
.cart-tools { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 14px; flex-wrap: wrap; }

/* Checkout */
.checkout { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 40px; padding: 28px 0 60px; align-items: start; }
.co-steps { display: flex; gap: 6px; margin-bottom: 20px; flex-wrap: wrap; }
.co-steps span { padding: 8px 14px; border-radius: 999px; font-weight: 500; font-size: 14px; color: var(--muted); background: var(--surface); }
.co-steps span.on { background: var(--ink); color: #fff; }
.co-steps span.done { color: var(--ok); background: var(--ok-soft); }
.panel { border: 1px solid var(--line); border-radius: 16px; padding: 22px; }
.panel + .panel { margin-top: 16px; }
.panel h3 { margin-bottom: 14px; }
.addr-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.addr { position: relative; padding: 14px 16px; border: 1.5px solid var(--line); border-radius: 12px; cursor: pointer; font-size: 14px; line-height: 1.45; }
.addr.on { border-color: var(--ink); }
.addr b { display: block; font-weight: 600; margin-bottom: 2px; }
.addr .tag { position: absolute; top: 12px; right: 12px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.form-grid .full { grid-column: 1 / -1; }
label.field { display: grid; gap: 6px; font-size: 13.5px; font-weight: 500; color: var(--muted); }
label.field input, label.field select, label.field textarea { height: 44px; border: 1px solid var(--line-strong); border-radius: 8px; padding: 0 12px; background: #fff; color: var(--ink); font-weight: 400; }
label.field textarea { height: auto; padding: 10px 12px; min-height: 90px; resize: vertical; }
label.field input:focus, label.field select:focus, label.field textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.option-list { display: grid; gap: 10px; }
.option { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 14px 16px; border: 1.5px solid var(--line); border-radius: 12px; cursor: pointer; }
.option.on { border-color: var(--ink); }
.option input { width: 18px; height: 18px; margin: 0; accent-color: var(--ink); }
.option b { display: block; font-weight: 600; }
.option small { color: var(--muted); display: block; }
.option .price { font-weight: 600; }
.co-actions { display: flex; justify-content: space-between; gap: 12px; margin-top: 20px; }
.review-items { display: grid; gap: 10px; }
.review-item { display: grid; grid-template-columns: 48px minmax(0, 1fr) auto; gap: 12px; align-items: center; font-size: 14px; }
.review-item img { width: 48px; height: 48px; object-fit: contain; border: 1px solid var(--line); border-radius: 8px; }
.review-item small { color: var(--muted); display: block; }
.confirm { max-width: 640px; margin: 60px auto; text-align: center; padding: 0 20px; }
.confirm .big { width: 72px; height: 72px; border-radius: 50%; background: var(--ok-soft); color: var(--ok); display: grid; place-items: center; margin: 0 auto 20px; }
.confirm p { color: var(--muted); margin-top: 10px; font-size: 16px; }
.confirm .btn { margin-top: 24px; }

/* Account & orders */
.account { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 40px; padding: 28px 0 60px; align-items: start; }
.acct-nav { position: sticky; top: 140px; display: grid; gap: 2px; }
.acct-nav h4 { font-size: 12.5px; color: var(--muted); font-weight: 500; padding: 14px 12px 6px; }
.acct-nav a { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 10px; font-weight: 500; color: var(--muted); }
.acct-nav a:hover { background: var(--surface); color: var(--ink); }
.acct-nav a.on { background: var(--surface-2); color: var(--ink); font-weight: 600; }
.acct-nav select { width: 100%; height: 44px; border: 1px solid var(--line-strong); border-radius: 8px; padding: 0 10px; display: none; }
.acct-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.acct-head p { color: var(--muted); margin-top: 4px; }
.tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 24px; }
.tile { padding: 16px; border: 1px solid var(--line); border-radius: 14px; }
.tile span { color: var(--muted); font-size: 13.5px; }
.tile b { display: block; font-size: 24px; font-weight: 600; letter-spacing: -0.02em; margin-top: 4px; }
.tile small { color: var(--ok); font-size: 12.5px; font-weight: 500; }
.table { width: 100%; border-collapse: collapse; }
.table th, .table td { text-align: left; padding: 12px 12px; border-bottom: 1px solid var(--line); font-size: 14px; vertical-align: middle; }
.table th { color: var(--muted); font-weight: 500; font-size: 13px; background: var(--surface); }
.table tr:hover td { background: #fafbfc; }
.table td.num, .table th.num { text-align: right; }
.table a.row-link { font-weight: 600; color: var(--accent); }
.table-wrap { border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.status { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: 13px; }
.status::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.status.pending { color: var(--warn); }
.status.processing { color: var(--accent); }
.status.shipped, .status.invoiced, .status.delivered { color: var(--ok); }
.status.returned { color: var(--danger); }
.seg { display: inline-flex; gap: 2px; padding: 3px; border-radius: 10px; background: var(--surface); }
.seg a, .seg button { height: 34px; padding: 0 14px; border-radius: 8px; border: 0; background: transparent; font-weight: 500; color: var(--muted); display: inline-flex; align-items: center; gap: 6px; }
.seg a.on, .seg button.on { background: #fff; color: var(--ink); box-shadow: 0 1px 2px rgba(20,28,37,.08); font-weight: 600; }
.seg small { color: var(--faint); font-weight: 500; }
.order-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 16px; align-items: start; margin-bottom: 20px; }
.order-head .btns { display: flex; gap: 8px; flex-wrap: wrap; }
.order-meta { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 20px; }
.order-meta div { padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; font-size: 14px; }
.order-meta span { display: block; color: var(--muted); font-size: 13px; margin-bottom: 4px; }
.timeline { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-bottom: 22px; }
.timeline div { position: relative; padding: 12px 0 0; font-size: 13.5px; color: var(--muted); }
.timeline div::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 4px; border-radius: 2px; background: var(--surface-2); }
.timeline div.done::before { background: var(--ok); }
.timeline div.now::before { background: var(--accent); }
.timeline b { display: block; color: var(--ink); font-weight: 600; }
.search-row { display: flex; gap: 10px; align-items: center; margin-bottom: 14px; flex-wrap: wrap; }
.search-row input { flex: 1; min-width: 200px; height: 42px; border: 1px solid var(--line-strong); border-radius: 8px; padding: 0 12px; }
.key-box { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 10px; align-items: end; }
.key-status { margin-top: 12px; display: flex; align-items: center; gap: 10px; font-size: 14px; }
.code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 14px; overflow-x: auto; white-space: pre; }
.qop { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 24px; align-items: start; }
.qop textarea { width: 100%; min-height: 220px; border: 1px solid var(--line-strong); border-radius: 12px; padding: 12px 14px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 14px; resize: vertical; }
.qop-preview { display: grid; gap: 8px; }
.qop-line { display: grid; grid-template-columns: 40px minmax(0,1fr) auto; gap: 10px; align-items: center; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; font-size: 13.5px; }
.qop-line img { width: 40px; height: 40px; object-fit: contain; }
.qop-line.bad { border-color: var(--danger); color: var(--danger); }
.fav-grid .card-actions { grid-template-columns: 104px minmax(0,1fr); }
.notice { padding: 14px 16px; border-radius: 12px; background: var(--surface); font-size: 14px; color: var(--muted); }
.notice.ok { background: var(--ok-soft); color: var(--ok); }
.notice.bad { background: #fdecea; color: var(--danger); }

/* Toast + lightbox */
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 12px 16px; border-radius: 12px; box-shadow: var(--shadow); z-index: 90; display: flex; align-items: center; gap: 14px; font-weight: 500; max-width: calc(100vw - 32px); }
.toast a { color: #9cc0ff; font-weight: 600; white-space: nowrap; }
.lightbox { position: fixed; inset: 0; background: rgba(20,28,37,.9); z-index: 95; display: grid; place-items: center; padding: 20px; cursor: zoom-out; }
.lightbox img { max-width: min(92vw, 1100px); max-height: 90vh; object-fit: contain; background: #fff; border-radius: 16px; }

/* Responsive */
@media (max-width: 1180px) {
  .product-grid, .product-grid.cols-5 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .cat-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ship-note { display: none; }
}
@media (max-width: 1000px) {
  .header-row { grid-template-columns: auto auto minmax(0, 1fr) auto; gap: 12px; height: 64px; }
  .header-actions { margin-right: -8px; }
  .menu-btn { display: inline-flex; }
  .logo-text { display: none; }
  .header-action span { display: none; }
  .header-action { padding: 8px; }
  .header-action .count { top: 0; right: 0; }
  .nav-row { display: none; }
  .mega { display: none !important; }
  .hero { grid-template-columns: 1fr; gap: 28px; padding: 28px 0 24px; min-height: 0; }
  .hero-mosaic { height: auto; grid-template-rows: auto; }
  .hero-mosaic a { aspect-ratio: 1; }
  .split { grid-template-columns: 1fr; gap: 20px; padding: 28px 0; }
  .split.flip .split-media { order: 0; }
  .shop { grid-template-columns: 1fr; gap: 0; }
  .filters { position: fixed; inset: 0 auto 0 0; width: min(88vw, 360px); max-height: none; background: #fff; z-index: 80; padding: 16px; overflow-y: auto; transform: translateX(-105%); transition: transform .2s; box-shadow: var(--shadow); }
  .filters.open { transform: none; }
  .filter-btn { display: inline-flex; }
  .product { grid-template-columns: 1fr; gap: 24px; }
  .gallery { position: static; }
  .cart, .checkout, .account { grid-template-columns: 1fr; gap: 24px; }
  .summary { position: static; }
  .acct-nav { position: static; display: block; }
  .acct-nav h4, .acct-nav a { display: none; }
  .acct-nav select { display: block; }
  .inv-grid, .details-grid { grid-template-columns: 1fr; }
  .tabs { top: 64px; }
  .order-meta, .timeline { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .qop { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  :root { --gutter: 16px; }
  .header-row { grid-template-columns: auto auto minmax(0, 1fr) auto; }
  .search { grid-column: 1 / -1; grid-row: 2; max-width: none; }
  .header-row { grid-template-rows: auto auto; height: auto; padding: 10px 0 10px; row-gap: 10px; }
  .search input { height: 44px; }
  .product-grid, .product-grid.cols-5 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .card .qty { display: none; }
  .cat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero-mosaic { gap: 8px; }
  .cart-item { grid-template-columns: 72px minmax(0, 1fr) 36px; }
  .cart-item img { width: 72px; height: 72px; }
  .cart-item .qty { grid-column: 2; }
  .cart-item .money { grid-column: 2; text-align: left; }
  .cart-item .money small { display: inline; margin-left: 6px; }
  .gallery { grid-template-columns: 1fr; }
  .thumbs { flex-direction: row; order: 2; overflow-x: auto; }
  .thumbs button { width: 64px; height: 64px; flex: 0 0 auto; }
  .buy-row { grid-template-columns: 120px minmax(0, 1fr) 48px; }
  .addr-grid, .form-grid, .usability { grid-template-columns: 1fr; }
  .tiles { grid-template-columns: 1fr 1fr; }
  .key-box { grid-template-columns: 1fr; }
  .table-wrap { overflow-x: auto; }
  .table { min-width: 640px; }
  .section { padding: 28px 0; }
  .co-actions { flex-direction: column-reverse; }
  .co-actions .btn { width: 100%; }
}

/* Footer */
.site-footer { margin-top: 60px; border-top: 1px solid var(--line); background: var(--surface); }
.footer-grid { display: grid; grid-template-columns: 1.6fr repeat(3, minmax(0, 1fr)); gap: 32px; padding: 44px 0 30px; }
.footer-grid h4 { font-size: 14px; font-weight: 600; margin-bottom: 10px; }
.footer-grid a { display: block; padding: 4px 0; color: var(--muted); font-size: 14px; }
.footer-grid a:hover { color: var(--ink); }
.footer-blurb { color: var(--muted); font-size: 14px; margin: 14px 0 10px; max-width: 42ch; }
.footer-contact a { display: inline; color: var(--ink); font-weight: 500; }
.footer-bottom { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 16px 0 28px; border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); }
@media (max-width: 720px) { .footer-grid { grid-template-columns: 1fr 1fr; gap: 24px; padding: 32px 0 20px; } .footer-grid > div:first-child { grid-column: 1 / -1; } }
