/* =========================================================
   Neon Twenty One Shop: minimalist, sharp-cornered, light + dark
   (extends the neontwenty.one / MCR Merch theme)
   ========================================================= */
:root {
  --bg: #ffffff; --fg: #0a0a0a; --muted: #6b6b6b; --line: #e4e4e4; --line-strong: #0a0a0a;
  --surface: #f5f5f5; --inverse-bg: #0a0a0a; --inverse-fg: #ffffff;
  --danger: #c4161c; --success: #12733a; --warn: #8a5a00; --overlay: rgba(0, 0, 0, .45);
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Menlo, Consolas, monospace;
  --wrap: 1280px; --header-h: 64px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0a0a0a; --fg: #f2f2f2; --muted: #8c8c8c; --line: #262626; --line-strong: #f2f2f2;
    --surface: #141414; --inverse-bg: #f2f2f2; --inverse-fg: #0a0a0a;
    --danger: #ff5a5f; --success: #3ccf7a; --warn: #e0b04a; --overlay: rgba(0, 0, 0, .7);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0a0a0a; --fg: #f2f2f2; --muted: #8c8c8c; --line: #262626; --line-strong: #f2f2f2;
  --surface: #141414; --inverse-bg: #f2f2f2; --inverse-fg: #0a0a0a;
  --danger: #ff5a5f; --success: #3ccf7a; --warn: #e0b04a; --overlay: rgba(0, 0, 0, .7);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; border-radius: 0 !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--fg); font-family: var(--font);
  font-size: 15px; line-height: 1.55; -webkit-font-smoothing: antialiased;
  min-height: 100vh; display: flex; flex-direction: column; overflow-x: hidden;
}
main { flex: 1; }
img { max-width: 100%; display: block; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4 { margin: 0; font-weight: 600; letter-spacing: -.01em; }
p { margin: 0 0 12px; }
.mono { font-family: var(--mono); }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.xs { font-size: 12px; }
.center { text-align: center; }
.right { text-align: right; }
.nowrap { white-space: nowrap; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 16px; }
@media (min-width: 768px) { .wrap { padding: 0 32px; } }
.narrow { max-width: 560px; }
.mid { max-width: 860px; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--fg); outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.eyebrow { font-size: 11px; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); }
.page-title { font-size: 28px; text-transform: uppercase; letter-spacing: .02em; line-height: 1.15; }
@media (min-width: 900px) { .page-title { font-size: 34px; } }
.section { padding: 48px 0 0; }
.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; margin-bottom: 20px; }
.section-head h2 { font-size: 13px; letter-spacing: .2em; text-transform: uppercase; }
.stack > * + * { margin-top: 16px; }
.spacer { height: 32px; }

/* ---------- Staging banner ---------- */
.staging-bar {
  background: repeating-linear-gradient(45deg, var(--inverse-bg), var(--inverse-bg) 10px, #333 10px, #333 20px);
  color: #fff; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; text-align: center; padding: 6px 12px;
}
.staging-bar .long { display: inline; } .staging-bar .short { display: none; }
@media (max-width: 600px) { .staging-bar .long { display: none; } .staging-bar .short { display: inline; } }
:root[data-theme="dark"] .staging-bar { color: #0a0a0a; background: repeating-linear-gradient(45deg, #f2f2f2, #f2f2f2 10px, #cfcfcf 10px, #cfcfcf 20px); }
.announce { background: var(--inverse-bg); color: var(--inverse-fg); font-size: 12px; letter-spacing: .08em; text-align: center; padding: 8px 12px; }

/* ---------- Header ---------- */
.site-header { position: sticky; top: 0; z-index: 30; background: var(--bg); border-bottom: 1px solid var(--line); }
.header-inner { height: var(--header-h); display: flex; align-items: center; gap: 12px; }
/* The logo may shrink (ellipsis) so the actions never push the page wider than the screen. */
.logo { font-weight: 700; letter-spacing: .2em; text-transform: uppercase; text-decoration: none; font-size: 14px; display: flex; align-items: center; gap: 10px; white-space: nowrap; min-width: 0; flex: 0 1 auto; overflow: hidden; }
.logo > span { overflow: hidden; text-overflow: ellipsis; }
.logo img { height: 34px; width: auto; max-width: 160px; object-fit: contain; }
.logo .logo-dark { display: none; }
:root[data-theme="dark"] .logo.has-dark .logo-light { display: none; }
:root[data-theme="dark"] .logo.has-dark .logo-dark { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .logo.has-dark .logo-light { display: none; }
  :root:not([data-theme="light"]) .logo.has-dark .logo-dark { display: block; }
}
.main-nav { display: none; gap: 2px; margin-left: 8px; min-width: 0; overflow: hidden; }
.main-nav a { white-space: nowrap; text-decoration: none; font-size: 12px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; padding: 8px 8px; border-bottom: 1px solid transparent; }
.main-nav a:hover, .main-nav a.active { border-bottom-color: var(--line-strong); }
@media (min-width: 1180px) { .main-nav { display: flex; } .nav-toggle { display: none !important; } }
.header-actions { display: flex; align-items: center; gap: 2px; margin-left: auto; flex: none; }
.mobile-theme { display: none; }
@media (max-width: 560px) {
  .header-inner { gap: 6px; }
  .header-actions .theme-btn { display: none; }
  .mobile-theme { display: flex; }
  .icon-btn { width: 36px; }
}
.icon-btn {
  width: 40px; height: 40px; display: inline-flex; align-items: center; justify-content: center; position: relative;
  background: none; border: 1px solid transparent; cursor: pointer; text-decoration: none;
}
.icon-btn:hover { border-color: var(--line); }
.i-moon { display: none; }
:root[data-theme="dark"] .i-sun { display: none; }
:root[data-theme="dark"] .i-moon { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) .i-sun { display: none; }
  :root:not([data-theme]) .i-moon { display: block; }
}
.bag-btn {
  height: 40px; padding: 0 14px; display: inline-flex; align-items: center; gap: 10px; margin-left: 4px;
  background: none; border: 1px solid var(--line-strong); cursor: pointer;
  font-size: 12px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase;
}
.bag-btn:hover { background: var(--inverse-bg); color: var(--inverse-fg); }
.bag-count { font-family: var(--mono); min-width: 18px; text-align: center; }
.bag-count.bump { animation: bump .35s ease; }
@keyframes bump { 50% { transform: scale(1.4); } }
@media (max-width: 480px) { .bag-btn .bag-word { display: none; } .bag-btn { padding: 0 10px; } .logo { font-size: 12px; letter-spacing: .14em; } }

.search-bar { border-top: 1px solid var(--line); padding: 12px 0; }
.search-bar form { display: flex; gap: 8px; }
.search-bar input { flex: 1; }

/* Mobile nav */
.mobile-nav { position: fixed; inset: 0 auto 0 0; width: min(340px, 88%); background: var(--bg); border-right: 1px solid var(--line); z-index: 50; transform: translateX(-100%); transition: transform .3s cubic-bezier(.2,.7,.2,1); visibility: hidden; display: flex; flex-direction: column; }
.mobile-nav.open { transform: none; visibility: visible; }
.mobile-nav nav { padding: 8px 20px; overflow-y: auto; }
.mobile-nav nav a { display: block; padding: 14px 0; border-bottom: 1px solid var(--line); text-decoration: none; font-size: 13px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; }
.mobile-nav nav a.sub { padding-left: 14px; font-weight: 500; letter-spacing: .06em; text-transform: none; font-size: 14px; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); margin-top: 72px; }
.footer-grid { display: grid; gap: 32px; padding: 40px 0 24px; grid-template-columns: 1fr; }
@media (min-width: 700px) { .footer-grid { grid-template-columns: 1.4fr 1fr 1fr 1fr; } }
.footer-grid h4 { font-size: 11px; letter-spacing: .2em; text-transform: uppercase; margin-bottom: 12px; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; font-size: 14px; }
.footer-grid li { padding: 4px 0; }
.footer-grid a { text-decoration: none; color: var(--muted); }
.footer-grid a:hover { color: var(--fg); }
.footer-bottom { border-top: 1px solid var(--line); padding: 16px 0; display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; font-size: 12px; color: var(--muted); letter-spacing: .04em; }
.pay-badges { display: flex; gap: 6px; flex-wrap: wrap; }
.pay-badges span { border: 1px solid var(--line); padding: 2px 8px; font-size: 11px; letter-spacing: .08em; }

/* ---------- Buttons / forms ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 46px; padding: 0 22px; border: 1px solid var(--line-strong); background: none;
  font-size: 12px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase;
  cursor: pointer; text-decoration: none; transition: opacity .15s, background .15s, color .15s; white-space: nowrap;
}
.btn:hover { background: var(--inverse-bg); color: var(--inverse-fg); }
.btn-primary { background: var(--inverse-bg); color: var(--inverse-fg); }
.btn-primary:hover { opacity: .85; }
.btn-ghost { border-color: var(--line); }
.btn-block { width: 100%; }
.btn-lg { height: 54px; }
.btn-sm { height: 34px; padding: 0 12px; font-size: 11px; }
.btn-danger { border-color: var(--danger); color: var(--danger); }
.btn-danger:hover { background: var(--danger); color: #fff; }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .35; cursor: not-allowed; pointer-events: none; }
.btn.loading { opacity: .6; pointer-events: none; }
.link { background: none; border: 0; padding: 0; cursor: pointer; font-size: 13px; text-decoration: underline; text-underline-offset: 3px; color: var(--fg); }
.link.muted { color: var(--muted); }
.label, .field > span, legend { display: block; font-size: 11px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; margin-bottom: 8px; }
.field { display: block; margin-bottom: 16px; }
.field em { font-style: normal; color: var(--muted); text-transform: none; letter-spacing: 0; font-weight: 400; }
.field small { display: block; color: var(--muted); font-size: 12px; margin-top: 6px; }
input[type=text], input[type=email], input[type=tel], input[type=number], input[type=password], input[type=search],
input[type=url], input[type=date], input[type=datetime-local], select, textarea {
  width: 100%; height: 46px; padding: 0 14px; background: var(--bg); border: 1px solid var(--line); outline: none; transition: border-color .15s; appearance: none;
}
textarea { height: auto; padding: 12px 14px; resize: vertical; min-height: 96px; }
select {
  background-image: linear-gradient(45deg, transparent 50%, var(--fg) 50%), linear-gradient(135deg, var(--fg) 50%, transparent 50%);
  background-position: calc(100% - 18px) 20px, calc(100% - 13px) 20px; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 36px;
}
input:focus, select:focus, textarea:focus { border-color: var(--line-strong); }
input[type=file] { display: block; width: 100%; max-width: 100%; min-height: 46px; padding: 10px; border: 1px dashed var(--line); background: var(--bg); font-size: 13px; cursor: pointer; }
input[type=file]::file-selector-button { font: inherit; font-size: 11px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; border: 1px solid var(--line-strong); background: none; color: var(--fg); padding: 6px 10px; margin-right: 10px; cursor: pointer; }
.has-error input, .has-error select, .has-error textarea { border-color: var(--danger); }
.field-error { display: block; color: var(--danger); font-size: 12px; margin-top: 6px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; cursor: pointer; margin-bottom: 12px; }
.check input { width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--fg); flex: none; }
fieldset { border: 0; padding: 0; margin: 0 0 28px; min-width: 0; }
legend { padding: 0; margin-bottom: 16px; font-size: 12px; }
.row-2, .row-3 { display: grid; gap: 0 16px; }
@media (min-width: 600px) { .row-2 { grid-template-columns: 1fr 1fr; } .row-3 { grid-template-columns: 1fr 1fr 1fr; } }
.alert { border: 1px solid var(--line-strong); padding: 12px 16px; margin: 16px 0; font-size: 14px; }
.alert-error { border-color: var(--danger); color: var(--danger); }
.alert-success { border-color: var(--success); color: var(--success); }
.alert-info { border-color: var(--line); background: var(--surface); }
.hint { min-height: 20px; margin: 8px 0 16px; font-size: 13px; color: var(--muted); }
.hint.error { color: var(--danger); }
.hint.ok { color: var(--success); }
.badge { display: inline-block; padding: 3px 8px; font-size: 10px; font-weight: 600; letter-spacing: .12em; border: 1px solid var(--line-strong); text-transform: uppercase; white-space: nowrap; line-height: 1.4; }
.badge-solid { background: var(--inverse-bg); color: var(--inverse-fg); }
.badge-muted { border-color: var(--line); color: var(--muted); }
.badge-ok { border-color: var(--success); color: var(--success); }
.badge-bad { border-color: var(--danger); color: var(--danger); }
.badge-warn { border-color: var(--warn); color: var(--warn); }

/* ---------- Hero ---------- */
.hero { position: relative; border-bottom: 1px solid var(--line); overflow: hidden; }
.hero-inner { display: grid; min-height: 420px; }
@media (min-width: 900px) { .hero-inner { grid-template-columns: 1fr 1fr; min-height: 520px; } }
.hero-copy { padding: 56px 16px; display: flex; flex-direction: column; justify-content: center; gap: 18px; }
@media (min-width: 768px) { .hero-copy { padding: 64px 32px; } }
.hero-copy h1 { font-size: clamp(34px, 6vw, 64px); line-height: 1; text-transform: uppercase; letter-spacing: -.01em; }
.hero-copy p { font-size: 16px; color: var(--muted); max-width: 46ch; }
.hero-media { background: var(--surface); min-height: 280px; position: relative; }
@media (max-width: 899px) {
  .hero-inner { min-height: 0; }
  .hero-copy { padding-top: 36px; padding-bottom: 36px; }
  .hero-media { min-height: 0; aspect-ratio: 4 / 3; }
  .hero-media.empty { display: none; }
}
.hero-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero-media .ph { position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--mono); font-size: clamp(60px, 12vw, 160px); font-weight: 500; letter-spacing: -.04em; color: var(--line); }

.perk-strip { display: grid; grid-template-columns: repeat(2, 1fr); border-bottom: 1px solid var(--line); }
@media (min-width: 900px) { .perk-strip { grid-template-columns: repeat(4, 1fr); } }
.perk-strip div { padding: 16px; min-width: 0; font-size: 12px; letter-spacing: .06em; border-right: 1px solid var(--line); display: flex; gap: 10px; align-items: center; }
.perk-strip div:last-child { border-right: 0; }
.perk-strip strong { display: block; font-size: 11px; letter-spacing: .16em; text-transform: uppercase; }
.perk-strip div svg { flex: none; }
@media (max-width: 899px) { .perk-strip div { padding: 12px; font-size: 12px; letter-spacing: 0; align-items: flex-start; } .perk-strip div:nth-child(2) { border-right: 0; } .perk-strip div:nth-child(-n+2) { border-bottom: 1px solid var(--line); } .perk-strip strong { font-size: 10px; } }
@media (max-width: 400px) { .perk-strip div svg { display: none; } }

/* ---------- Category tiles ---------- */
.cat-grid { display: grid; gap: 8px; grid-template-columns: repeat(2, 1fr); }
@media (min-width: 768px) { .cat-grid { grid-template-columns: repeat(4, 1fr); } }
.cat-tile { position: relative; aspect-ratio: 1; background: var(--surface); text-decoration: none; overflow: hidden; border: 1px solid var(--line); }
.cat-tile img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.cat-tile:hover img { transform: scale(1.04); }
.cat-tile .cat-name { position: absolute; left: 0; bottom: 0; right: 0; padding: 12px 14px; background: var(--bg); border-top: 1px solid var(--line); display: flex; justify-content: space-between; font-size: 12px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; }
.cat-tile .ph { position: absolute; inset: 0 0 44px; display: grid; place-items: center; font-family: var(--mono); font-size: 40px; color: var(--muted); }

/* ---------- Product grid ---------- */
.product-grid { display: grid; gap: 28px 12px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 768px) { .product-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 36px 16px; } }
@media (min-width: 1100px) { .product-grid.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.card { display: block; text-decoration: none; position: relative; }
.card-media { position: relative; aspect-ratio: 4 / 5; background: var(--surface); overflow: hidden; }
.card-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: opacity .35s ease; }
.card-media img.alt { opacity: 0; }
.card:hover .card-media img.alt { opacity: 1; }
.card-media .ph, .ph-box { position: absolute; inset: 0; display: grid; place-items: center; color: var(--muted); font-size: 11px; letter-spacing: .16em; text-transform: uppercase; }
.card-flags { position: absolute; top: 10px; left: 10px; display: flex; gap: 4px; flex-wrap: wrap; z-index: 2; }
.card-flags .badge { background: var(--bg); }
.card-flags .badge-solid { background: var(--inverse-bg); }
.card-body { padding-top: 12px; }
.card-name { font-size: 14px; font-weight: 500; line-height: 1.35; }
.card-price { font-size: 14px; margin-top: 4px; font-family: var(--mono); }
.card-rating { display: flex; align-items: center; gap: 6px; margin-top: 4px; font-size: 12px; color: var(--muted); }
.price-sale { color: var(--danger); }
.card.soldout .card-media img { opacity: .5; }

/* Stars */
.stars { --s: 14px; position: relative; display: inline-block; width: calc(var(--s) * 5); height: var(--s); vertical-align: -2px;
  background: linear-gradient(90deg, var(--line) 0 0); -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2l3 7h7l-5.5 4.5 2 7.5-6.5-4.5L5.5 21l2-7.5L2 9h7z'/%3E%3C/svg%3E") 0 0 / var(--s) var(--s) repeat-x;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2l3 7h7l-5.5 4.5 2 7.5-6.5-4.5L5.5 21l2-7.5L2 9h7z'/%3E%3C/svg%3E") 0 0 / var(--s) var(--s) repeat-x; }
.stars > span { position: absolute; inset: 0 auto 0 0; background: var(--fg); }
.stars.lg { --s: 20px; }
.star-input { display: inline-flex; flex-direction: row-reverse; gap: 2px; }
.star-input input { position: absolute; opacity: 0; pointer-events: none; }
.star-input label { cursor: pointer; font-size: 26px; line-height: 1; color: var(--line); padding: 0 2px; }
.star-input input:checked ~ label, .star-input label:hover, .star-input label:hover ~ label { color: var(--fg); }
.star-input input:focus-visible + label { outline: 2px solid var(--fg); }

/* ---------- Listing ---------- */
.listing-head { padding: 32px 0 20px; border-bottom: 1px solid var(--line); margin-bottom: 24px; }
.crumbs { font-size: 12px; color: var(--muted); letter-spacing: .04em; margin-bottom: 10px; }
.crumbs a { text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }
.listing { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; }
@media (min-width: 980px) { .listing { grid-template-columns: 220px minmax(0, 1fr); gap: 40px; } }
.filters h3 { font-size: 11px; letter-spacing: .2em; text-transform: uppercase; margin-bottom: 12px; }
.filters ul { list-style: none; padding: 0; margin: 0 0 28px; font-size: 14px; }
.filters li a { display: flex; justify-content: space-between; padding: 6px 0; text-decoration: none; color: var(--muted); }
.filters li a.active, .filters li a:hover { color: var(--fg); }
.filters li a.active { font-weight: 600; }
.filters li.sub a { padding-left: 14px; }
@media (max-width: 979px) { .filters { display: none; } .filters.open { display: block; border: 1px solid var(--line); padding: 16px; } }
.toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 20px; flex-wrap: wrap; }
.toolbar select { width: auto; height: 38px; font-size: 13px; }
.price-filter { display: flex; gap: 8px; align-items: center; }
.price-filter input { height: 38px; padding: 0 10px; font-size: 13px; }
.pager { display: flex; gap: 6px; justify-content: center; margin-top: 40px; flex-wrap: wrap; }
.pager a, .pager span { min-width: 38px; height: 38px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--line); text-decoration: none; font-family: var(--mono); font-size: 13px; padding: 0 10px; }
.pager a:hover { border-color: var(--line-strong); }
.pager .current { background: var(--inverse-bg); color: var(--inverse-fg); border-color: var(--inverse-bg); }
.empty { padding: 64px 16px; text-align: center; color: var(--muted); border: 1px dashed var(--line); }

/* ---------- Product page ---------- */
.product { display: grid; grid-template-columns: minmax(0, 1fr); gap: 32px; padding-top: 24px; }
@media (min-width: 900px) {
  .product { grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 56px; padding-top: 32px; align-items: start; }
  .product-info { position: sticky; top: calc(var(--header-h) + 24px); }
}
.gallery-main { position: relative; aspect-ratio: 4 / 5; background: var(--surface); overflow: hidden; touch-action: pan-y; }
.gallery-main img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .35s ease; }
.gallery-main img.active { opacity: 1; }
.gallery-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; cursor: pointer; background: var(--bg); border: 1px solid var(--line); opacity: .9; z-index: 2; }
.gallery-nav:hover { border-color: var(--line-strong); opacity: 1; }
.gallery-nav.prev { left: 12px; } .gallery-nav.next { right: 12px; }
.gallery-counter { position: absolute; bottom: 12px; right: 12px; background: var(--bg); padding: 2px 8px; font-size: 12px; z-index: 2; }
.gallery-thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(68px, 1fr)); gap: 8px; margin-top: 8px; }
.thumb { padding: 0; border: 1px solid transparent; background: var(--surface); cursor: pointer; aspect-ratio: 4/5; overflow: hidden; }
.thumb img { width: 100%; height: 100%; object-fit: cover; opacity: .6; transition: opacity .15s; }
.thumb:hover img, .thumb.active img { opacity: 1; }
.thumb.active { border-color: var(--line-strong); }
.product-name { font-size: 26px; line-height: 1.15; font-weight: 600; text-transform: uppercase; letter-spacing: .02em; }
@media (min-width: 900px) { .product-name { font-size: 32px; } }
.product-price { font-size: 20px; margin: 12px 0 8px; font-family: var(--mono); display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; }
.product-price s { font-size: 15px; color: var(--muted); }
.product-summary { color: var(--muted); margin: 0 0 24px; }
.rating-link { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); text-decoration: none; margin-top: 8px; }
.opt-group { margin-bottom: 20px; }
.opt-head { display: flex; justify-content: space-between; align-items: baseline; }
.opt-head .label span { font-weight: 400; letter-spacing: .04em; text-transform: none; color: var(--muted); margin-left: 6px; }
.opt-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.opt { position: relative; cursor: pointer; }
.opt input { position: absolute; opacity: 0; pointer-events: none; }
.opt span { display: flex; align-items: center; justify-content: center; min-width: 56px; height: 44px; padding: 0 14px; border: 1px solid var(--line); font-size: 13px; font-weight: 500; letter-spacing: .04em; transition: border-color .15s, background .15s; }
.opt:hover span { border-color: var(--line-strong); }
.opt input:checked + span { background: var(--inverse-bg); color: var(--inverse-fg); border-color: var(--line-strong); }
.opt input:focus-visible + span { outline: 2px solid var(--fg); outline-offset: 2px; }
.opt.is-out span { color: var(--muted); border-style: dashed; background: linear-gradient(to top right, transparent calc(50% - .5px), var(--line) 50%, transparent calc(50% + .5px)); }
.opt.is-out input:checked + span { background: var(--surface); color: var(--muted); }
.stock-note { font-size: 13px; margin: 4px 0 16px; min-height: 20px; }
.stock-note.low { color: var(--warn); }
.stock-note.out { color: var(--danger); }
.buy-row { display: flex; gap: 10px; align-items: stretch; margin-bottom: 20px; }
.buy-row .btn { flex: 1; height: 48px; min-width: 0; }
@media (max-width: 360px) { .buy-row .btn { padding: 0 10px; letter-spacing: .1em; } .qty button { width: 36px; } .qty input { width: 40px; } }
.qty { display: inline-flex; border: 1px solid var(--line); }
.qty button { width: 42px; height: 46px; border: 0; background: none; cursor: pointer; font-size: 18px; }
.qty button:hover { background: var(--surface); }
.qty input { width: 48px; height: 46px; border: 0; border-left: 1px solid var(--line); border-right: 1px solid var(--line); text-align: center; padding: 0; font-family: var(--mono); -moz-appearance: textfield; }
.qty input::-webkit-outer-spin-button, .qty input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.qty.sm button, .qty.sm input { height: 32px; }
.qty.sm button { width: 32px; font-size: 15px; }
.qty.sm input { width: 38px; font-size: 13px; }
.perks { list-style: none; padding: 0; margin: 8px 0 24px; font-size: 13px; color: var(--muted); }
.perks li { padding: 5px 0 5px 20px; position: relative; }
.perks li::before { content: ""; position: absolute; left: 0; top: 14px; width: 8px; height: 1px; background: var(--fg); }
.accordion { border-top: 1px solid var(--line); }
.accordion:last-of-type { border-bottom: 1px solid var(--line); }
.accordion summary { list-style: none; cursor: pointer; padding: 18px 0; font-size: 12px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; display: flex; justify-content: space-between; }
.accordion summary::-webkit-details-marker { display: none; }
.accordion summary::after { content: "+"; font-family: var(--mono); font-size: 16px; line-height: 1; }
.accordion[open] summary::after { content: "\2212"; }
.accordion-body { padding-bottom: 20px; font-size: 14px; }
.rich p { margin: 0 0 12px; }
.sku-line { font-size: 12px; color: var(--muted); font-family: var(--mono); margin-top: 8px; }

/* Reviews */
.reviews { display: grid; gap: 32px; }
@media (min-width: 900px) { .reviews { grid-template-columns: 300px minmax(0, 1fr); gap: 56px; } }
.rating-big { font-size: 48px; font-weight: 600; font-family: var(--mono); line-height: 1; }
.dist { list-style: none; padding: 0; margin: 16px 0 0; font-size: 12px; }
.dist li { display: grid; grid-template-columns: 22px 1fr 28px; gap: 8px; align-items: center; padding: 3px 0; }
.dist .bar { height: 6px; background: var(--surface); position: relative; }
.dist .bar span { position: absolute; inset: 0 auto 0 0; background: var(--fg); }
.review { border-bottom: 1px solid var(--line); padding: 20px 0; }
.review:first-child { padding-top: 0; }
.review-head { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: 13px; color: var(--muted); }
.review h4 { font-size: 15px; margin: 8px 0 6px; }
.review .reply { border-left: 2px solid var(--line-strong); padding: 6px 0 6px 12px; margin-top: 12px; font-size: 14px; }
.review .reply strong { display: block; font-size: 11px; letter-spacing: .16em; text-transform: uppercase; margin-bottom: 4px; }

/* ---------- Drawer ---------- */
.drawer-overlay { position: fixed; inset: 0; background: var(--overlay); z-index: 40; animation: fade .2s ease; }
@keyframes fade { from { opacity: 0; } }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(440px, 100%); background: var(--bg); border-left: 1px solid var(--line); z-index: 50; display: flex; flex-direction: column; transform: translateX(100%); transition: transform .3s cubic-bezier(.2, .7, .2, 1); visibility: hidden; }
.drawer.open { transform: none; visibility: visible; }
.drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 0 16px 0 20px; height: var(--header-h); border-bottom: 1px solid var(--line); flex: none; }
.drawer-head h2 { font-size: 12px; letter-spacing: .18em; text-transform: uppercase; }
.drawer-body { flex: 1; overflow-y: auto; padding: 4px 20px; }
.drawer-foot { border-top: 1px solid var(--line); padding: 16px 20px 20px; }
.bag-empty { padding: 48px 0; text-align: center; color: var(--muted); font-size: 14px; }
.bag-line { display: grid; grid-template-columns: 72px 1fr auto; gap: 14px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.bag-line .img, .bag-line img { width: 72px; aspect-ratio: 4/5; object-fit: cover; background: var(--surface); }
.bag-line .name { font-size: 14px; font-weight: 500; text-decoration: none; display: block; }
.bag-line .meta { font-size: 12px; color: var(--muted); margin: 2px 0 10px; }
.bag-line .problem { font-size: 12px; color: var(--danger); margin: -6px 0 8px; }
.bag-line .right { display: flex; flex-direction: column; align-items: flex-end; justify-content: space-between; font-family: var(--mono); font-size: 13px; }
.remove { background: none; border: 0; padding: 8px 0; margin: -8px 0; cursor: pointer; font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); text-decoration: underline; text-underline-offset: 3px; font-family: var(--font); }
.remove:hover { color: var(--fg); }
.totals { margin: 0 0 16px; font-size: 14px; }
.totals div { display: flex; justify-content: space-between; padding: 4px 0; gap: 12px; }
.totals dt { color: var(--muted); }
.totals dd { margin: 0; font-family: var(--mono); }
.totals .grand { border-top: 1px solid var(--line); margin-top: 8px; padding-top: 12px; font-weight: 600; font-size: 16px; }
.totals .grand dt { color: var(--fg); }
.ship-note { font-size: 12px; color: var(--muted); margin: -8px 0 14px; }
body.locked { overflow: hidden; }

/* ---------- Cart / checkout ---------- */
.two-col { display: grid; grid-template-columns: minmax(0, 1fr); gap: 32px; padding-top: 24px; }
@media (min-width: 900px) {
  .two-col { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 56px; align-items: start; }
  .two-col > aside { position: sticky; top: calc(var(--header-h) + 24px); }
}
.summary { border: 1px solid var(--line); padding: 20px; background: var(--surface); }
.summary-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 8px; }
.summary-head h2 { font-size: 12px; letter-spacing: .18em; text-transform: uppercase; }
.summary-items { list-style: none; margin: 0 0 16px; padding: 0; }
.summary-items li { display: grid; grid-template-columns: 52px 1fr auto; gap: 12px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.summary-items .thumbw { position: relative; }
.summary-items img, .summary-items .img { width: 52px; aspect-ratio: 4/5; object-fit: cover; background: var(--bg); }
.summary-items .q { position: absolute; top: -6px; right: -6px; background: var(--inverse-bg); color: var(--inverse-fg); font-size: 10px; font-family: var(--mono); min-width: 18px; height: 18px; display: grid; place-items: center; }
.summary-items strong { display: block; font-weight: 500; }
.promo-form { display: flex; gap: 8px; margin: 0 0 6px; }
.promo-form input { height: 40px; text-transform: uppercase; }
.promo-form .btn { height: 40px; }
.cart-table { width: 100%; border-collapse: collapse; }
.cart-table th { font-size: 11px; letter-spacing: .16em; text-transform: uppercase; text-align: left; padding: 0 0 12px; border-bottom: 1px solid var(--line-strong); font-weight: 600; }
.cart-table td { padding: 16px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.cart-item { display: grid; grid-template-columns: 80px 1fr; gap: 16px; }
.cart-item img, .cart-item .img { width: 80px; aspect-ratio: 4/5; object-fit: cover; background: var(--surface); }
@media (max-width: 640px) { .cart-table thead { display: none; } .cart-table td.col-price { display: none; } }
.choice-list { display: grid; gap: 8px; margin-bottom: 12px; }
.choice { position: relative; cursor: pointer; display: block; }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice > span { display: flex; justify-content: space-between; gap: 12px; border: 1px solid var(--line); padding: 14px 16px; transition: border-color .15s; }
.choice strong { display: block; font-size: 14px; font-weight: 600; }
.choice em { display: block; font-style: normal; font-size: 12px; color: var(--muted); margin-top: 2px; }
.choice .fee { font-family: var(--mono); font-size: 14px; white-space: nowrap; }
.choice:hover > span { border-color: var(--line-strong); }
.choice input:checked + span { border-color: var(--line-strong); box-shadow: inset 0 0 0 1px var(--line-strong); }
.choice input:focus-visible + span { outline: 2px solid var(--fg); outline-offset: 2px; }
.choice.disabled { opacity: .5; cursor: not-allowed; }
.pay-method { display: flex; gap: 12px; align-items: center; border: 1px solid var(--line-strong); padding: 14px 16px; font-size: 13px; margin-bottom: 16px; }
.steps { display: flex; gap: 8px; font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); margin-bottom: 12px; flex-wrap: wrap; }
.steps b { color: var(--fg); }

/* ---------- Result / order pages ---------- */
.page-msg { padding: 64px 0 0; }
.page-msg h1 { font-size: 30px; text-transform: uppercase; letter-spacing: .02em; margin-bottom: 12px; }
.result-box { border: 1px solid var(--line-strong); padding: 20px; margin: 24px 0; }
.result-box .order-no { font-family: var(--mono); font-size: 18px; }
.actions { display: flex; gap: 12px; flex-wrap: wrap; }
.progress { display: grid; grid-template-columns: repeat(5, 1fr); margin: 24px 0 32px; padding: 0; }
.progress li { list-style: none; position: relative; padding-top: 22px; font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); text-align: center; }
.progress li::before { content: ""; position: absolute; top: 6px; left: 0; right: 0; height: 1px; background: var(--line); }
.progress li:first-child::before { left: 50%; }
.progress li:last-child::before { right: 50%; }
.progress li::after { content: ""; position: absolute; top: 1px; left: 50%; width: 11px; height: 11px; margin-left: -6px; background: var(--bg); border: 1px solid var(--line); }
.progress li.done { color: var(--fg); }
.progress li.done::before { background: var(--line-strong); }
.progress li.done::after { background: var(--inverse-bg); border-color: var(--line-strong); }
.progress li.now { font-weight: 600; }
@media (max-width: 520px) { .progress li { font-size: 9px; letter-spacing: .04em; } }
.timeline { list-style: none; padding: 0; margin: 0; border-left: 1px solid var(--line); }
.timeline li { padding: 0 0 18px 18px; position: relative; font-size: 14px; }
.timeline li::before { content: ""; position: absolute; left: -4px; top: 7px; width: 7px; height: 7px; background: var(--fg); }
.timeline time { display: block; font-size: 12px; color: var(--muted); font-family: var(--mono); }
.info-grid { display: grid; gap: 16px; }
@media (min-width: 700px) { .info-grid { grid-template-columns: repeat(3, 1fr); } }
.info-box { border: 1px solid var(--line); padding: 16px; font-size: 14px; }
.info-box h3 { font-size: 11px; letter-spacing: .16em; text-transform: uppercase; margin-bottom: 8px; }
.track-box { border: 1px solid var(--line-strong); padding: 16px 20px; display: flex; justify-content: space-between; gap: 16px; align-items: center; flex-wrap: wrap; margin: 16px 0 24px; }
.track-box .tn { font-family: var(--mono); font-size: 18px; }

/* ---------- Account ---------- */
.account { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; padding-top: 32px; }
@media (min-width: 900px) { .account { grid-template-columns: 220px minmax(0, 1fr); gap: 48px; } }
.account-nav { display: flex; gap: 4px; overflow-x: auto; border-bottom: 1px solid var(--line); }
.account-nav a, .account-nav button { text-decoration: none; font-size: 12px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; padding: 10px 12px; white-space: nowrap; border: 0; background: none; cursor: pointer; text-align: left; border-bottom: 1px solid transparent; }
.account-nav a.active { border-bottom-color: var(--line-strong); }
@media (min-width: 900px) { .account-nav { flex-direction: column; border-bottom: 0; border-right: 1px solid var(--line); } .account-nav a, .account-nav button { border-bottom: 0; border-left: 2px solid transparent; } .account-nav a.active { border-left-color: var(--line-strong); } }
.list-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.list-table th { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; text-align: left; padding: 10px 8px 10px 0; border-bottom: 1px solid var(--line-strong); font-weight: 600; }
.list-table td { padding: 14px 8px 14px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.list-table a { text-decoration: none; }
.list-table a:hover { text-decoration: underline; }
.table-wrap { overflow-x: auto; }
.addr-grid { display: grid; gap: 12px; }
@media (min-width: 700px) { .addr-grid { grid-template-columns: 1fr 1fr; } }
.addr { border: 1px solid var(--line); padding: 16px; font-size: 14px; }
.addr.default { border-color: var(--line-strong); }
.auth-box { max-width: 440px; margin: 0 auto; padding-top: 48px; }
.auth-box h1 { font-size: 26px; text-transform: uppercase; margin-bottom: 8px; }
.divider { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 12px; letter-spacing: .14em; text-transform: uppercase; margin: 24px 0; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.photo-row { display: flex; gap: 8px; flex-wrap: wrap; }
.photo-row img { width: 84px; height: 84px; object-fit: cover; border: 1px solid var(--line); }

/* ---------- Toast ---------- */
.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); opacity: 0; background: var(--inverse-bg); color: var(--inverse-fg); padding: 12px 18px; font-size: 13px; z-index: 60; transition: all .25s ease; max-width: calc(100% - 32px); pointer-events: none; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
body.locked .toast { bottom: auto; top: calc(var(--header-h) + 12px); }
.toast.error { background: var(--danger); color: #fff; }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; } }

/* iOS Safari zooms into any focused field under 16px: keep form text at 16px on touch-size screens. */
@media (max-width: 1024px) {
  input:not([type=checkbox]):not([type=radio]):not([type=file]), select, textarea { font-size: 16px !important; }
}
