:root {
  --bg: #060810; --bg2: #0a0d16; --panel: #0e1320; --panel2: #121a2c;
  --text: #e2e5f0; --muted: #8890ab; --faint: #4a5070; --line: rgba(255,255,255,.08);
  --cyan: #66f7ff; --cyan-ink: #04222a; --green: #34d399; --red: #f87171; --amber: #fbbf24;
  --radius: 16px;
}
* { box-sizing: border-box; }
html { color-scheme: dark; }
body { margin: 0; font: 16px/1.55 "Segoe UI Variable Text", "Segoe UI", Inter, system-ui, sans-serif; color: var(--text); background: var(--bg); min-height: 100vh; position: relative; overflow-x: hidden; }
body::before { content: ""; position: fixed; width: 760px; height: 760px; right: -260px; top: -360px; border-radius: 50%; filter: blur(100px); background: radial-gradient(circle, rgba(102,247,255,.14), transparent 62%); pointer-events: none; }
body::after { content: ""; position: fixed; width: 620px; height: 620px; left: -280px; bottom: -320px; border-radius: 50%; filter: blur(100px); background: radial-gradient(circle, rgba(79,140,255,.10), transparent 62%); pointer-events: none; }
a { color: var(--cyan); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }
.wrap { position: relative; max-width: 1120px; margin: 0 auto; padding: 0 20px; }
.skip { position: absolute; left: -9999px; top: 8px; background: var(--cyan); color: var(--cyan-ink); padding: 8px 12px; border-radius: 8px; z-index: 20; }
.skip:focus { left: 12px; }

/* header */
.top { position: sticky; top: 0; z-index: 10; background: rgba(6,8,16,.82); backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
.bar { display: flex; align-items: center; gap: 22px; height: 64px; }
.brand { display: flex; align-items: center; gap: 12px; color: var(--text); }
.brand:hover { text-decoration: none; }
.brand span { display: flex; flex-direction: column; line-height: 1.05; }
.brand b { letter-spacing: .1em; text-transform: uppercase; font-size: 13px; }
.brand small { color: var(--muted); font-size: 12px; }
.cats { display: flex; gap: 4px; flex: 1; overflow-x: auto; scrollbar-width: none; }
.cats a { color: var(--muted); padding: 8px 12px; border-radius: 999px; font-size: 14px; white-space: nowrap; }
.cats a:hover, .cats a.on { color: var(--text); background: rgba(255,255,255,.06); text-decoration: none; }
.basket-link { display: inline-flex; align-items: center; gap: 8px; color: var(--text); padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line); font-size: 14px; }
.basket-link:hover, .basket-link.on { background: rgba(255,255,255,.06); text-decoration: none; }
.basket-link svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.basket-link b { min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px; background: var(--cyan); color: var(--cyan-ink); font-size: 12px; display: grid; place-items: center; }
.mockbar { margin-top: 10px; padding: 8px 14px; border-radius: 10px; background: rgba(251,191,36,.12); color: var(--amber); font-size: 13px; }

main { padding: 36px 20px 72px; }

/* hero + headings */
.hero { padding: 36px 0 20px; max-width: 760px; }
.eyebrow { color: var(--cyan); letter-spacing: .14em; text-transform: uppercase; font-size: 12px; font-weight: 600; margin: 0 0 10px; }
.eyebrow.ok { color: var(--green); }
h1 { font-size: clamp(30px, 4.6vw, 46px); line-height: 1.08; letter-spacing: -.02em; margin: 0 0 14px; }
h2 { font-size: 22px; margin: 0 0 6px; letter-spacing: -.01em; }
h2 a { color: var(--text); }
h3 { font-size: 16px; margin: 0 0 8px; }
.lead { color: var(--muted); font-size: 18px; max-width: 640px; margin: 0 0 22px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line); color: var(--text); font-size: 14px; background: rgba(255,255,255,.03); }
.chip:hover { border-color: rgba(102,247,255,.5); text-decoration: none; }
.page-head { padding: 8px 0 20px; }
.page-head.center, .center { text-align: center; }
.page-head.center .lead { margin-left: auto; margin-right: auto; }
.crumbs { color: var(--faint); font-size: 13px; margin-bottom: 12px; }
.crumbs span { margin: 0 4px; }
.sec-head { display: flex; align-items: baseline; gap: 16px; flex-wrap: wrap; margin: 36px 0 14px; }
.sec-head p { color: var(--muted); margin: 0; font-size: 14px; }
.empty { color: var(--muted); padding: 40px 0; }
.flash { padding: 12px 16px; border-radius: 12px; background: rgba(251,191,36,.12); color: var(--amber); }

/* cards */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.card { background: rgba(255,255,255,.03); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; transition: border-color .15s, transform .15s; }
.card:hover { border-color: rgba(102,247,255,.35); transform: translateY(-2px); }
.thumb { display: block; aspect-ratio: 16 / 9; background: var(--panel2); overflow: hidden; }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.card-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.card-body h3 a { color: var(--text); }
.card-body p { color: var(--muted); font-size: 14px; margin: 0; flex: 1; }
.card-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 8px; }
.price { font-weight: 600; font-size: 16px; }
.price s { color: var(--faint); font-weight: 400; margin-right: 6px; }
.price small { color: var(--muted); font-weight: 400; margin-left: 4px; font-size: 13px; }
.price.big { font-size: 28px; margin: 6px 0 18px; }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 44px; padding: 0 20px; border-radius: 12px; font-weight: 600; font-size: 15px; color: var(--text); background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.14); cursor: pointer; font-family: inherit; transition: background .15s, transform .1s; }
.btn:hover { background: rgba(255,255,255,.1); text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn.primary { background: linear-gradient(180deg, #7ef9ff, #4fd8e8); color: var(--cyan-ink); border-color: transparent; box-shadow: 0 10px 28px rgba(102,247,255,.22); }
.btn.primary:hover { background: linear-gradient(180deg, #8dfbff, #5fe2f0); }
.btn.small { height: 36px; padding: 0 14px; font-size: 14px; }
.btn.wide { width: 100%; }
.btn.disabled, .btn:disabled, .btn.busy { opacity: .55; cursor: not-allowed; pointer-events: none; }
.icon { width: 32px; height: 32px; border-radius: 8px; border: 1px solid var(--line); background: rgba(255,255,255,.04); color: var(--text); cursor: pointer; font-size: 16px; font-family: inherit; }
.icon:hover { background: rgba(255,255,255,.1); }
.icon.danger:hover { color: var(--red); border-color: rgba(248,113,113,.4); }
.icon.busy, .icon:disabled { opacity: .5; cursor: progress; }
.link { background: none; border: 0; color: var(--cyan); cursor: pointer; font: inherit; font-size: 13px; margin-left: 8px; padding: 0; }

/* product */
.product { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(280px, 1fr); gap: 32px; align-items: start; }
.media img#product-image { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--radius); border: 1px solid var(--line); background: var(--panel2); }
.gallery { display: flex; gap: 8px; margin-top: 10px; overflow-x: auto; }
.gallery .g { width: 88px; flex: 0 0 auto; aspect-ratio: 16 / 9; padding: 0; border-radius: 8px; overflow: hidden; border: 2px solid transparent; background: var(--panel2); cursor: pointer; }
.gallery .g.on { border-color: var(--cyan); }
.gallery .g img { width: 100%; height: 100%; object-fit: cover; }
.videos { color: var(--muted); font-size: 14px; }
.buy { background: rgba(255,255,255,.03); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 24px; position: sticky; top: 84px; }
.buy h1 { font-size: 28px; }
.add-form { display: flex; flex-wrap: wrap; gap: 12px; align-items: end; margin-bottom: 18px; }
.qty { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--muted); }
.qty input { width: 84px; height: 44px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg2); color: var(--text); padding: 0 12px; font: inherit; }
.facts { list-style: none; padding: 0; margin: 0 0 14px; display: grid; gap: 8px; font-size: 14px; color: var(--muted); }
.facts b { color: var(--text); display: inline-block; min-width: 76px; }
.note { color: var(--muted); font-size: 13px; margin: 8px 0 0; }
.desc-block { margin-top: 40px; max-width: 760px; }
.desc { color: var(--muted); }
.desc h1, .desc h2, .desc h3, .desc h4 { color: var(--text); font-size: 18px; margin: 20px 0 6px; }
.desc p { margin: 0 0 12px; }
.desc ul, .desc ol { padding-left: 22px; }
.desc img { border-radius: 12px; margin: 10px 0; }
.desc code, .desc pre { font-family: Consolas, "Cascadia Mono", monospace; font-size: 13px; }
.desc pre { background: rgba(0,0,0,.35); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; overflow: auto; }
.desc table { border-collapse: collapse; width: 100%; }
.desc th, .desc td { border: 1px solid var(--line); padding: 6px 10px; text-align: left; }

/* basket */
.basket-layout { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(280px, 1fr); gap: 28px; align-items: start; }
.rows { list-style: none; padding: 0; margin: 0 0 24px; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.row { display: grid; grid-template-columns: 96px minmax(0, 1fr) auto auto 32px; gap: 14px; align-items: center; padding: 12px 14px; background: rgba(255,255,255,.02); border-top: 1px solid var(--line); }
.row:first-child { border-top: 0; }
.row .thumb { aspect-ratio: 16 / 9; border-radius: 8px; }
.row-main a { color: var(--text); }
.row-main small { display: block; color: var(--muted); font-size: 12px; }
.row-qty { display: inline-flex; align-items: center; gap: 8px; }
.row-qty span { min-width: 20px; text-align: center; }
.row-price { font-weight: 600; white-space: nowrap; }
.promos { background: rgba(255,255,255,.03); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; display: grid; gap: 10px; }
.promos form { display: flex; gap: 8px; }
.promos input { flex: 1; height: 38px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg2); color: var(--text); padding: 0 12px; font: inherit; font-size: 14px; min-width: 0; }
.applied { list-style: none; padding: 0; margin: 0 0 6px; font-size: 14px; color: var(--muted); }
.applied code { color: var(--text); font-family: Consolas, "Cascadia Mono", monospace; }
.summary { background: rgba(255,255,255,.03); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px; position: sticky; top: 84px; }
.summary dl { margin: 0 0 16px; }
.summary dl div { display: flex; justify-content: space-between; padding: 6px 0; color: var(--muted); }
.summary dl .total { border-top: 1px solid var(--line); margin-top: 6px; padding-top: 12px; color: var(--text); font-weight: 600; font-size: 18px; }
.summary dt, .summary dd { margin: 0; }
.signin { border-top: 1px solid var(--line); padding-top: 14px; margin-bottom: 14px; }
.signin p { color: var(--muted); font-size: 14px; margin: 0 0 12px; }
.signed { color: var(--muted); font-size: 14px; }
.signed b { color: var(--green); }

/* complete */
.bought { list-style: none; padding: 0; margin: 0 auto 8px; max-width: 480px; text-align: center; }
.steps { max-width: 640px; margin: 36px auto; background: rgba(255,255,255,.03); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 26px; }
.steps ol { color: var(--muted); padding-left: 20px; margin: 0; }
.steps li { margin: 6px 0; }

/* footer, toasts */
.foot { display: flex; justify-content: space-between; gap: 28px; flex-wrap: wrap; padding: 28px 20px 48px; border-top: 1px solid var(--line); color: var(--faint); font-size: 13px; }
.foot p { margin: 0 0 6px; max-width: 640px; }
.foot nav { display: flex; gap: 16px; }
#toasts { position: fixed; right: 16px; bottom: 16px; display: grid; gap: 8px; z-index: 30; }
.toast { background: var(--panel2); border: 1px solid var(--line); color: var(--text); padding: 10px 14px; border-radius: 12px; font-size: 14px; opacity: 0; transform: translateY(8px); transition: opacity .25s, transform .25s; box-shadow: 0 10px 30px rgba(0,0,0,.4); }
.toast.in { opacity: 1; transform: none; }
.toast.ok { border-color: rgba(52,211,153,.4); }
.toast.err { border-color: rgba(248,113,113,.5); }

@media (max-width: 820px) {
  .bar { gap: 12px; }
  .brand small { display: none; }
  .basket-link span { display: none; }
  .product, .basket-layout { grid-template-columns: 1fr; }
  .buy, .summary { position: static; }
  .row { grid-template-columns: 72px minmax(0, 1fr) 32px; }
  .row-qty, .row-price { grid-column: 2; }
}
