:root {
  --bg: #08090a;
  --bg-soft: #0e0f11;
  --panel: #141518;
  --panel-2: #1a1c20;
  --line: #26282d;
  --line-soft: #1e2024;
  --text: #eceef1;
  --muted: #8d919b;
  --accent: #76b900;
  --accent-2: #9ade1a;
  --danger: #ff4d4d;
  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 18px 50px rgba(0, 0, 0, .45);
  --font: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "Cascadia Mono", Consolas, monospace;
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }

.container { width: min(1240px, 92vw); margin: 0 auto; }

/* ---------- header ---------- */
.topbar {
  background: #000;
  border-bottom: 1px solid var(--line-soft);
  font-size: 12.5px;
  color: var(--muted);
}
.topbar .container {
  display: flex; justify-content: space-between; gap: 16px;
  padding: 7px 0;
}
.topbar b { color: var(--text); font-weight: 600; }

.header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(8, 9, 10, .92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.header .container {
  display: flex; align-items: center; gap: 22px;
  height: 64px;
}

.logo { display: flex; align-items: center; gap: 9px; font-weight: 800; letter-spacing: .5px; }
.logo .mark {
  width: 30px; height: 30px; border-radius: 8px;
  background: linear-gradient(135deg, var(--accent), #4f7d00);
  display: grid; place-items: center; color: #061000; font-size: 13px; font-weight: 900;
}
.logo span { font-size: 16px; }
.logo small { color: var(--muted); font-weight: 500; font-size: 11px; letter-spacing: 1.6px; text-transform: uppercase; }

.nav { display: flex; gap: 4px; margin-left: 8px; }
.nav a {
  padding: 8px 11px; border-radius: 8px; font-size: 14px; color: #c9ccd2;
}
.nav a:hover { background: var(--panel); color: #fff; }
.nav a.active { color: var(--accent-2); }

.header-tools { margin-left: auto; display: flex; align-items: center; gap: 8px; }

.search {
  display: flex; align-items: center; gap: 8px;
  background: var(--panel); border: 1px solid var(--line);
  border-radius: 9px; padding: 0 11px; height: 38px; min-width: 210px;
}
.search input { background: none; border: 0; outline: 0; width: 100%; font-size: 13.5px; }
.search input::placeholder { color: #6f737c; }
.search svg { width: 15px; height: 15px; stroke: #7e828b; }

.icon-btn {
  position: relative; display: inline-flex; align-items: center; gap: 7px;
  height: 38px; padding: 0 12px; border-radius: 9px;
  border: 1px solid var(--line); background: var(--panel);
  cursor: pointer; font-size: 13.5px; color: #d6d8dd;
}
.icon-btn:hover { border-color: #3a3d43; color: #fff; }
.icon-btn svg { width: 17px; height: 17px; stroke: currentColor; fill: none; stroke-width: 1.7; }
.badge {
  position: absolute; top: -6px; right: -6px;
  min-width: 18px; height: 18px; padding: 0 5px;
  border-radius: 9px; background: var(--accent); color: #061000;
  font-size: 11px; font-weight: 800; display: grid; place-items: center;
}

.lang { display: flex; border: 1px solid var(--line); border-radius: 9px; overflow: hidden; height: 38px; }
.lang button {
  background: var(--panel); border: 0; padding: 0 10px; cursor: pointer;
  font-size: 12px; font-weight: 700; color: var(--muted); letter-spacing: .5px;
}
.lang button.on { background: var(--accent); color: #061000; }

/* ---------- generic ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 42px; padding: 0 18px; border-radius: 9px; cursor: pointer;
  border: 1px solid transparent; font-weight: 650; font-size: 14px;
  transition: transform .12s ease, background .12s ease, border-color .12s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); color: #061000; }
.btn-primary:hover { background: var(--accent-2); }
.btn-ghost { background: transparent; border-color: var(--line); color: var(--text); }
.btn-ghost:hover { border-color: #3d4046; background: var(--panel); }
.btn-block { width: 100%; }

.section { padding: 46px 0; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 22px; }
.section-head h2 { margin: 0; font-size: 26px; letter-spacing: -.4px; }
.section-head p { margin: 6px 0 0; color: var(--muted); font-size: 14px; }
.eyebrow { color: var(--accent-2); font-size: 11.5px; letter-spacing: 2px; text-transform: uppercase; font-weight: 700; }

.page-head { padding: 30px 0 6px; }
.page-head h1 { margin: 0 0 6px; font-size: 30px; letter-spacing: -.6px; }
.breadcrumbs { color: var(--muted); font-size: 12.5px; margin-bottom: 14px; }
.breadcrumbs a:hover { color: var(--text); }

/* ---------- hero ---------- */
.hero {
  position: relative; overflow: hidden;
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(900px 420px at 78% -10%, rgba(118, 185, 0, .16), transparent 60%),
    radial-gradient(600px 300px at 10% 110%, rgba(60, 90, 255, .10), transparent 60%),
    #0a0b0c;
}
.hero .container { display: grid; grid-template-columns: 1.05fr .95fr; gap: 40px; align-items: center; padding: 62px 0 58px; }
.hero h1 { margin: 12px 0 14px; font-size: 46px; line-height: 1.08; letter-spacing: -1.6px; }
.hero h1 em { font-style: normal; color: var(--accent-2); }
.hero p { color: #b9bdc6; max-width: 480px; margin: 0 0 24px; font-size: 15.5px; }
.hero-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.hero-stats { display: flex; gap: 26px; margin-top: 30px; }
.hero-stats div b { display: block; font-size: 21px; }
.hero-stats div span { color: var(--muted); font-size: 12.5px; }

.hero-art {
  position: relative; border-radius: 18px; overflow: hidden;
  border: 1px solid var(--line); background: linear-gradient(160deg, #16181c, #0b0c0e);
  box-shadow: var(--shadow);
}
.hero-art img { width: 100%; height: 100%; object-fit: cover; }
.hero-art .tag {
  position: absolute; left: 16px; top: 14px;
  background: rgba(0, 0, 0, .55); border: 1px solid rgba(255, 255, 255, .12);
  padding: 5px 10px; border-radius: 20px; font-size: 11.5px; letter-spacing: .6px;
}

/* ---------- category tiles ---------- */
.cats { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; }
.cat {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px 14px; transition: .15s ease; min-height: 108px;
  display: flex; flex-direction: column; justify-content: space-between;
}
.cat:hover { border-color: #3b4a1e; background: #171a12; transform: translateY(-2px); }
.cat svg { width: 26px; height: 26px; stroke: var(--accent-2); fill: none; stroke-width: 1.6; }
.cat b { font-size: 13.5px; font-weight: 600; }
.cat span { color: var(--muted); font-size: 11.5px; }

/* ---------- product grid ---------- */
.grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.card {
  background: linear-gradient(180deg, #151619, #101113);
  border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; display: flex; flex-direction: column;
  transition: .16s ease;
}
.card:hover { border-color: #3a3d43; transform: translateY(-3px); box-shadow: 0 16px 40px rgba(0,0,0,.45); }
.card-media {
  position: relative; aspect-ratio: 4 / 3;
  background: linear-gradient(180deg, #fdfdfe, #eef0f3);
  display: grid; place-items: center; padding: 0;
  border-bottom: 1px solid var(--line);
}
.card-media img { width: 100%; height: 100%; object-fit: contain; }
.card-media:hover img { transform: scale(1.04); }
.card-media img { transition: transform .25s ease; }
.badge-tl {
  position: absolute; left: 10px; top: 10px;
  font-size: 10.5px; font-weight: 800; letter-spacing: .8px; text-transform: uppercase;
  padding: 4px 8px; border-radius: 6px; background: var(--accent); color: #061000;
}
.badge-tl.sale { background: #ff5a3c; color: #1a0500; }
.badge-tl.new { background: #3d6bff; color: #fff; }
.card-body { padding: 13px 14px 15px; display: flex; flex-direction: column; gap: 7px; flex: 1; }
.card-brand { color: var(--muted); font-size: 11px; letter-spacing: 1.2px; text-transform: uppercase; }
.card-title { display: block; font-size: 14px; font-weight: 600; line-height: 1.35; min-height: 38px; }
.card-title:hover { color: var(--accent-2); }
.card-specs { color: #7f838c; font-size: 11.5px; }
.price-row { display: flex; align-items: baseline; gap: 9px; margin-top: auto; padding-top: 8px; }
.price { font-size: 18px; font-weight: 750; letter-spacing: -.3px; }
.price-old { color: #6c7078; text-decoration: line-through; font-size: 12.5px; }
.stock { font-size: 11.5px; color: var(--accent-2); }
.stock.low { color: #ffb020; }
.stock.out { color: #7c8089; }
.card-actions { display: flex; gap: 7px; margin-top: 9px; }
.card-actions .btn { height: 36px; font-size: 13px; padding: 0 12px; }

/* ---------- trust / reviews ---------- */
.trust { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.trust div {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px 16px;
}
.trust b { display: block; font-size: 20px; margin-bottom: 3px; }
.trust span { color: var(--muted); font-size: 12.5px; }

.reviews { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.review {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px;
}
.review .stars { color: var(--accent-2); font-size: 13px; letter-spacing: 2px; }
.review p { color: #c3c6cd; font-size: 13.5px; margin: 10px 0 14px; }
.review footer { display: flex; justify-content: space-between; color: var(--muted); font-size: 12px; }

/* ---------- catalog layout ---------- */
.catalog { display: grid; grid-template-columns: 250px 1fr; gap: 26px; padding-bottom: 50px; }
.filters {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px; align-self: start; position: sticky; top: 84px;
}
.filters h3 { margin: 0 0 12px; font-size: 13px; text-transform: uppercase; letter-spacing: 1.4px; color: var(--muted); }
.filter-group { border-top: 1px solid var(--line-soft); padding: 14px 0; }
.filter-group:first-of-type { border-top: 0; padding-top: 0; }
.filter-group label { display: flex; align-items: center; gap: 9px; padding: 5px 0; font-size: 13.5px; cursor: pointer; color: #cfd2d8; }
.filter-group input[type="checkbox"] { accent-color: var(--accent); width: 15px; height: 15px; }
.filter-group select, .filter-group input[type="number"] {
  width: 100%; background: #0c0d0f; border: 1px solid var(--line); border-radius: 8px;
  padding: 8px 10px; outline: 0; font-size: 13px;
}
.price-inputs { display: flex; gap: 8px; }

.toolbar {
  display: flex; align-items: center; gap: 12px; margin-bottom: 16px;
  padding: 12px 14px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
}
.toolbar .count { color: var(--muted); font-size: 13px; }
.toolbar select {
  margin-left: auto; background: #0c0d0f; border: 1px solid var(--line);
  border-radius: 8px; padding: 8px 10px; font-size: 13px; outline: 0;
}

/* ---------- product page ---------- */
.product { display: grid; grid-template-columns: 1.05fr 1fr; gap: 34px; padding: 10px 0 40px; }
.product-media {
  background: linear-gradient(180deg, #fdfdfe, #e9ebef);
  border: 1px solid var(--line); border-radius: 18px; padding: 0;
  display: grid; place-items: center; min-height: 380px; overflow: hidden;
}
.product-media img { width: 100%; height: 100%; max-height: 460px; object-fit: contain; }
.product h1 { margin: 6px 0 10px; font-size: 28px; letter-spacing: -.5px; }
.product .brand-line { color: var(--muted); font-size: 12px; letter-spacing: 1.6px; text-transform: uppercase; }
.product .price-line { display: flex; align-items: baseline; gap: 12px; margin: 18px 0 6px; }
.product .price-line .price { font-size: 30px; }
.product .desc { color: #b7bbc3; font-size: 14px; margin: 14px 0 18px; }
.buy-row { display: flex; gap: 10px; margin: 18px 0 10px; }
.specs { width: 100%; border-collapse: collapse; margin-top: 20px; }
.specs td { padding: 9px 0; border-bottom: 1px solid var(--line-soft); font-size: 13.5px; }
.specs td:first-child { color: var(--muted); width: 42%; }
.chips { display: flex; gap: 7px; flex-wrap: wrap; margin-top: 12px; }
.chip {
  border: 1px solid var(--line); background: var(--panel); border-radius: 20px;
  padding: 5px 11px; font-size: 12px; color: #c2c5cc;
}

/* ---------- cart ---------- */
.cart-wrap { display: grid; grid-template-columns: 1fr 340px; gap: 22px; padding-bottom: 50px; }
.cart-list { display: flex; flex-direction: column; gap: 10px; }
.cart-item {
  display: grid; grid-template-columns: 78px 1fr auto auto; gap: 16px; align-items: center;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px;
}
.cart-item img { width: 78px; height: 62px; object-fit: contain; background: #f4f5f7; border-radius: 8px; }
.cart-item .name { font-weight: 600; font-size: 14px; }
.cart-item .meta { color: var(--muted); font-size: 12px; }
.qty { display: flex; align-items: center; gap: 0; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.qty button { width: 30px; height: 32px; background: #0c0d0f; border: 0; cursor: pointer; font-size: 15px; }
.qty button:hover { background: #1b1d21; }
.qty span { width: 34px; text-align: center; font-size: 13.5px; }
.cart-item .sum { font-weight: 700; min-width: 96px; text-align: right; }
.link-danger { color: #8b8f98; font-size: 12px; cursor: pointer; background: none; border: 0; padding: 0; }
.link-danger:hover { color: var(--danger); }

.summary {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px; align-self: start; position: sticky; top: 84px;
}
.summary h3 { margin: 0 0 14px; font-size: 16px; }
.summary .row { display: flex; justify-content: space-between; padding: 7px 0; font-size: 13.5px; color: #c3c6cd; }
.summary .row.total { border-top: 1px solid var(--line); margin-top: 8px; padding-top: 12px; font-size: 18px; font-weight: 750; color: #fff; }
.promo { display: flex; gap: 7px; margin: 12px 0; }
.promo input { flex: 1; background: #0c0d0f; border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; outline: 0; font-size: 13px; }
.promo .btn { height: 36px; padding: 0 12px; font-size: 13px; }
.hint { font-size: 12px; color: var(--muted); }
.hint.ok { color: var(--accent-2); }
.hint.bad { color: var(--danger); }

.empty { text-align: center; padding: 60px 20px; color: var(--muted); }
.empty h3 { color: var(--text); margin: 0 0 8px; }

/* ---------- auth ---------- */
.auth-wrap { max-width: 420px; margin: 40px auto 70px; }
.auth-card { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 26px; }
.tabs { display: flex; gap: 6px; background: #0c0d0f; padding: 5px; border-radius: 10px; margin-bottom: 20px; }
.tabs button {
  flex: 1; height: 34px; border: 0; border-radius: 7px; background: transparent;
  color: var(--muted); cursor: pointer; font-size: 13.5px; font-weight: 600;
}
.tabs button.on { background: var(--panel-2); color: #fff; }
.field { margin-bottom: 13px; }
.field label { display: block; font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.field input {
  width: 100%; height: 40px; background: #0c0d0f; border: 1px solid var(--line);
  border-radius: 8px; padding: 0 12px; outline: 0; font-size: 14px;
}
.field input:focus { border-color: #4d6a12; }
.form-note { font-size: 12px; color: var(--muted); margin-top: 12px; text-align: center; }
.alert {
  border-radius: 9px; padding: 11px 13px; font-size: 13px; margin-bottom: 14px;
  border: 1px solid #2f4a08; background: #16200a; color: #c7ef86;
}
.alert.error { border-color: #57201f; background: #210e0e; color: #ffb3b3; }

.user-box { display: flex; align-items: center; gap: 10px; }
.avatar {
  width: 34px; height: 34px; border-radius: 50%; background: var(--accent); color: #061000;
  display: grid; place-items: center; font-weight: 800; font-size: 13px;
}

/* ---------- content pages ---------- */
.prose { max-width: 780px; padding-bottom: 60px; }
.prose h2 { margin: 30px 0 10px; font-size: 20px; }
.prose h2:first-child { margin-top: 0; }
.prose p, .prose li { color: #b9bdc5; font-size: 14.5px; }
.prose ul { padding-left: 20px; }
.info-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; max-width: 900px; padding-bottom: 60px; }
.info-card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.info-card h3 { margin: 0 0 10px; font-size: 15px; }
.info-card p { margin: 4px 0; color: #b9bdc5; font-size: 13.5px; }
.info-card a { color: var(--accent-2); }
.map {
  height: 220px; border-radius: var(--radius); border: 1px solid var(--line);
  background:
    linear-gradient(90deg, transparent 49.6%, #1c1f24 49.6%, #1c1f24 50.4%, transparent 50.4%),
    linear-gradient(0deg, transparent 49.6%, #1c1f24 49.6%, #1c1f24 50.4%, transparent 50.4%),
    repeating-linear-gradient(35deg, #101215, #101215 22px, #0c0e10 22px, #0c0e10 44px);
  display: grid; place-items: center; margin-top: 14px; color: var(--muted); font-size: 13px;
}

/* ---------- credits ---------- */
.credits { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; padding-bottom: 60px; max-width: 1150px; }
.credit {
  display: flex; gap: 12px; align-items: flex-start;
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 10px;
}
.credit img {
  width: 84px; height: 72px; object-fit: contain; flex: none;
  background: #f4f5f7; border-radius: 8px;
}
.credit .t { font-size: 12.5px; line-height: 1.35; color: #d8dbe1; word-break: break-word; }
.credit .a { font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.credit a { color: var(--accent-2); }
@media (max-width: 900px) { .credits { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .credits { grid-template-columns: 1fr; } }

/* ---------- footer ---------- */
.footer { border-top: 1px solid var(--line); background: #060708; margin-top: 20px; }
.footer .container { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 30px; padding: 42px 0 30px; }
.footer h4 { margin: 0 0 12px; font-size: 12px; letter-spacing: 1.6px; text-transform: uppercase; color: var(--muted); }
.footer a, .footer p { display: block; color: #b9bdc5; font-size: 13px; margin: 6px 0; }
.footer a:hover { color: var(--accent-2); }
.footer .bottom {
  border-top: 1px solid var(--line-soft); padding: 16px 0;
  display: flex; justify-content: space-between; gap: 16px;
  color: #6f737c; font-size: 12px;
}
.pay { display: flex; gap: 8px; align-items: center; }
.pay span {
  border: 1px solid var(--line); border-radius: 5px; padding: 2px 7px;
  font-size: 10.5px; color: #9a9ea7; letter-spacing: .5px;
}

/* ---------- toast ---------- */
.toast {
  position: fixed; right: 20px; bottom: 20px; z-index: 200;
  background: #16200a; border: 1px solid #3c5a10; color: #d7f0ab;
  padding: 12px 16px; border-radius: 10px; font-size: 13.5px;
  opacity: 0; transform: translateY(10px); transition: .2s ease; pointer-events: none;
}
.toast.show { opacity: 1; transform: none; }

/* ---------- responsive ---------- */
@media (max-width: 1080px) {
  .grid { grid-template-columns: repeat(3, 1fr); }
  .cats { grid-template-columns: repeat(3, 1fr); }
  .hero .container { grid-template-columns: 1fr; }
  .hero-art { display: none; }
  .trust { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 820px) {
  .nav, .search { display: none; }
  .catalog { grid-template-columns: 1fr; }
  .filters { position: static; }
  .product, .cart-wrap { grid-template-columns: 1fr; }
  .grid, .cats, .reviews { grid-template-columns: repeat(2, 1fr); }
  .footer .container { grid-template-columns: 1fr 1fr; }
  .hero h1 { font-size: 34px; }
}
@media (max-width: 640px) {
  .header .container { gap: 10px; height: 58px; }
  .icon-btn { padding: 0 10px; }
  .icon-btn > span:not(.badge) { display: none; }
  .logo small { display: none; }
  .lang button { padding: 0 8px; }
  .section { padding: 34px 0; }
  .section-head h2 { font-size: 22px; }
}
@media (max-width: 520px) {
  .grid, .cats, .reviews, .trust, .info-grid { grid-template-columns: 1fr; }
  .topbar { display: none; }
  .cart-item { grid-template-columns: 60px 1fr; }
  .cart-item .sum { text-align: left; }
}
