:root {
  --bg: #0d0e0f;
  --panel: #16181a;
  --panel-2: #1e2124;
  --line: #2a2e32;
  --text: #f1f2ee;
  --muted: #9aa09a;
  --accent: #c8ea1e;
  --accent-ink: #111400;
  --danger: #ff6b5b;
  --ok: #5fd38a;
  --radius: 14px;
  --display: 'Barlow Condensed', 'Arial Narrow', system-ui, sans-serif;
  --body: 'Barlow', system-ui, -apple-system, 'Segoe UI', sans-serif;
}
* { box-sizing: border-box; }
html { scroll-padding-top: 130px; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.45 var(--body); -webkit-font-smoothing: antialiased; }
img { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--accent); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- Header ---------- */
.top { position: sticky; top: 0; z-index: 20; background: rgba(13, 14, 15, .92); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.top-row { max-width: 1200px; margin: 0 auto; display: flex; align-items: center; gap: 14px; padding: 10px 16px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); flex-shrink: 0; }
.brand img { width: 42px; height: 42px; border-radius: 50%; }
.brand span { font: 700 24px/1 var(--display); letter-spacing: .04em; text-transform: uppercase; }
.brand b { color: var(--accent); font-weight: 700; }
.search { flex: 1; position: relative; }
.search input { width: 100%; background: var(--panel); border: 1px solid var(--line); border-radius: 999px; padding: 10px 16px 10px 40px; outline: none; }
.search input:focus { border-color: var(--accent); }
.search svg { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.cart-btn { position: relative; display: flex; align-items: center; gap: 8px; background: var(--accent); color: var(--accent-ink); border: 0; border-radius: 999px; padding: 10px 16px; font-weight: 700; flex-shrink: 0; }
.cart-btn .count { background: var(--accent-ink); color: var(--accent); border-radius: 999px; min-width: 22px; height: 22px; display: grid; place-items: center; font-size: 13px; padding: 0 6px; }
.cats { max-width: 1200px; margin: 0 auto; display: flex; gap: 8px; overflow-x: auto; padding: 0 16px 10px; scrollbar-width: none; }
.cats::-webkit-scrollbar { display: none; }
.chip { white-space: nowrap; border: 1px solid var(--line); background: var(--panel); border-radius: 999px; padding: 6px 14px; font-size: 14px; color: var(--muted); }
.chip.on, .chip:hover { color: var(--accent-ink); background: var(--accent); border-color: var(--accent); }

/* ---------- Hero ---------- */
.hero { max-width: 1200px; margin: 0 auto; padding: 36px 16px 8px; }
.hero h1 { font: 800 clamp(40px, 7vw, 76px)/.9 var(--display); text-transform: uppercase; margin: 0; letter-spacing: .01em; }
.hero h1 em { font-style: normal; color: var(--accent); }
.hero p { color: var(--muted); max-width: 560px; margin: 14px 0 0; }
.perks { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-top: 18px; color: var(--muted); font-size: 14px; }
.perks span::before { content: '■'; color: var(--accent); margin-right: 8px; font-size: 10px; vertical-align: 2px; }

/* ---------- Catalog ---------- */
main { max-width: 1200px; margin: 0 auto; padding: 8px 16px 80px; }
.section { padding-top: 28px; }
.section h2 { font: 800 34px/1 var(--display); text-transform: uppercase; margin: 0 0 4px; }
.section h3 { font: 600 17px/1.2 var(--display); text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 18px 0 10px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(178px, 1fr)); gap: 12px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; text-align: left; padding: 0; display: flex; flex-direction: column; transition: border-color .15s, transform .15s; }
.card:hover { border-color: #3d4349; transform: translateY(-2px); }
.card .ph { aspect-ratio: 1; background: #fff; position: relative; }
.card .ph img { width: 100%; height: 100%; object-fit: contain; }
.card .body { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.card .name { font-size: 15px; line-height: 1.25; }
.price { font: 700 22px/1 var(--display); letter-spacing: .02em; }
.price s { color: var(--muted); font-weight: 500; font-size: 16px; margin-left: 6px; }
.price small { font: 500 13px var(--body); color: var(--muted); margin-right: 4px; }
.card .price { margin-top: auto; }
.badge { position: absolute; top: 8px; left: 8px; background: var(--accent); color: var(--accent-ink); font: 700 13px/1 var(--display); text-transform: uppercase; letter-spacing: .05em; padding: 5px 8px; border-radius: 6px; }
.badge.out { background: #2b2b2b; color: #ddd; }
.badge.low { background: #ff9f43; color: #1b0f00; }
.card.is-out { opacity: .6; }
.empty { color: var(--muted); padding: 40px 0; text-align: center; }

/* ---------- Overlay / dialogs ---------- */
.overlay { position: fixed; inset: 0; background: rgba(0, 0, 0, .6); z-index: 40; opacity: 0; pointer-events: none; transition: opacity .2s; }
.overlay.on { opacity: 1; pointer-events: auto; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(440px, 100%); background: var(--panel); z-index: 50; transform: translateX(100%); transition: transform .25s ease; display: flex; flex-direction: column; border-left: 1px solid var(--line); }
.drawer.on { transform: none; }
.drawer header, .modal header { display: flex; align-items: center; justify-content: space-between; padding: 16px 18px; border-bottom: 1px solid var(--line); }
.drawer header h2 { font: 800 28px/1 var(--display); text-transform: uppercase; margin: 0; }
.x { background: none; border: 0; color: var(--muted); font-size: 28px; line-height: 1; padding: 4px 8px; }
.drawer .scroll { flex: 1; overflow-y: auto; padding: 8px 18px; }
.drawer footer { border-top: 1px solid var(--line); padding: 16px 18px; display: grid; gap: 10px; }
.line { display: grid; grid-template-columns: 64px 1fr auto; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); align-items: center; }
.line img { width: 64px; height: 64px; object-fit: contain; background: #fff; border-radius: 10px; }
.line .n { font-size: 14px; line-height: 1.25; }
.line .u { color: var(--muted); font-size: 13px; }
.line .r { text-align: right; display: grid; gap: 6px; justify-items: end; }
.stepper { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; }
.stepper button { background: var(--panel-2); border: 0; width: 30px; height: 30px; font-size: 18px; }
.stepper span { min-width: 30px; text-align: center; font-weight: 600; }
.stepper.lg button { width: 42px; height: 42px; }
.stepper.lg span { min-width: 40px; font-size: 18px; }
.total { display: flex; justify-content: space-between; align-items: baseline; }
.total span { color: var(--muted); }
.total b { font: 800 32px/1 var(--display); }
.btn { border: 0; border-radius: 12px; padding: 14px 18px; font-weight: 700; font-size: 16px; display: flex; align-items: center; justify-content: center; gap: 10px; text-decoration: none; }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-mp { background: #009ee3; color: #fff; }
.btn-wa { background: #25d366; color: #062b14; }
.btn-ghost { background: transparent; border: 1px solid var(--line); color: var(--text); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.link-btn { background: none; border: 0; color: var(--muted); text-decoration: underline; padding: 0; font-size: 14px; }

.modal { position: fixed; z-index: 50; left: 50%; top: 50%; transform: translate(-50%, -46%) scale(.98); width: min(860px, calc(100% - 24px)); max-height: calc(100% - 24px); background: var(--panel); border: 1px solid var(--line); border-radius: 18px; overflow: auto; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; }
.modal.on { opacity: 1; pointer-events: auto; transform: translate(-50%, -50%); }
.pd { display: grid; grid-template-columns: 1fr 1fr; }
.pd .gallery { background: #fff; position: relative; }
.pd .gallery .main { aspect-ratio: 1; width: 100%; object-fit: contain; }
.pd .thumbs { display: flex; gap: 6px; padding: 8px; background: #f3f3f3; overflow-x: auto; }
.pd .thumbs button { border: 2px solid transparent; padding: 0; border-radius: 8px; overflow: hidden; background: #fff; flex-shrink: 0; }
.pd .thumbs button.on { border-color: #111; }
.pd .thumbs img { width: 56px; height: 56px; object-fit: contain; }
.pd .info { padding: 22px; display: flex; flex-direction: column; gap: 14px; position: relative; }
.pd .info .x { position: absolute; top: 10px; right: 8px; }
.pd .cat { color: var(--accent); font: 600 14px var(--display); text-transform: uppercase; letter-spacing: .08em; }
.pd h2 { font: 800 34px/1 var(--display); margin: 0; padding-right: 30px; text-transform: uppercase; }
.pd .desc { color: #c9ccc6; white-space: pre-line; font-size: 15px; }
.opts { display: grid; gap: 8px; }
.opt { display: flex; justify-content: space-between; align-items: center; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; cursor: pointer; }
.opt input { accent-color: var(--accent); margin-right: 10px; }
.opt.on { border-color: var(--accent); background: rgba(200, 234, 30, .06); }
.opt.dis { opacity: .45; cursor: not-allowed; }
.opt small { color: var(--muted); }
.buy { display: flex; gap: 10px; align-items: center; margin-top: auto; }
.buy .btn { flex: 1; }
.stock-note { font-size: 14px; color: #ffb36b; }

/* ---------- Checkout form ---------- */
.form { display: grid; gap: 12px; padding: 8px 0 16px; }
.form label { display: grid; gap: 5px; font-size: 14px; color: var(--muted); }
.form input, .form textarea { background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 11px 12px; outline: none; color: var(--text); }
.form input:focus, .form textarea:focus { border-color: var(--accent); }
.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.seg label { display: flex; align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: 10px; padding: 11px 12px; color: var(--text); cursor: pointer; }
.seg label:has(input:checked) { border-color: var(--accent); background: rgba(200, 234, 30, .06); }
.seg input { accent-color: var(--accent); }
.err { background: rgba(255, 107, 91, .12); border: 1px solid rgba(255, 107, 91, .4); color: #ffb4aa; padding: 10px 12px; border-radius: 10px; font-size: 14px; }
.hint { color: var(--muted); font-size: 13px; text-align: center; }

.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); background: var(--accent); color: var(--accent-ink); font-weight: 700; padding: 12px 18px; border-radius: 999px; z-index: 60; opacity: 0; transition: .2s; pointer-events: none; }
.toast.on { opacity: 1; transform: translate(-50%, 0); }

.wa-float { position: fixed; right: 16px; bottom: 16px; width: 54px; height: 54px; border-radius: 50%; background: #25d366; display: grid; place-items: center; z-index: 15; box-shadow: 0 6px 20px rgba(0, 0, 0, .4); }

footer.site { border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; }
footer.site div { max-width: 1200px; margin: 0 auto; padding: 24px 16px; display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; }

@media (max-width: 700px) {
  .brand span { display: none; }
  .cart-btn .lbl { display: none; }
  .grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .pd { grid-template-columns: 1fr; }
  .modal { top: auto; bottom: 0; transform: translate(-50%, 10%); width: 100%; border-radius: 18px 18px 0 0; max-height: 92%; }
  .modal.on { transform: translate(-50%, 0); }
  .card .name { font-size: 14px; }
}
