:root {
  --bg: #0d0d14;
  --card: #16161f;
  --card-hover: #1c1c28;
  --accent: #ff5c33;
  --accent2: #2b6cff;
  --text: #eee;
  --muted: #a0a0ad;
  --border: #26262f;
  --border-strong: #34343f;
  --ok: #2ecc71;
  --danger: #ff4d4d;
  --radius: 12px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  line-height: 1.55;
  min-height: 100vh;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(13, 13, 20, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  max-width: 1200px; margin: 0 auto; padding: 12px 24px;
  display: flex; align-items: center; gap: 24px;
}
.brand img { height: 40px; }
.main-nav { display: flex; gap: 18px; flex: 1; flex-wrap: wrap; }
.main-nav a { color: var(--muted); font-size: 14px; padding: 6px 2px; border-bottom: 2px solid transparent; }
.main-nav a:hover, .main-nav a.active { color: var(--text); border-bottom-color: var(--accent); }
.header-actions { display: flex; align-items: center; gap: 12px; }
.lang-select {
  background: var(--card); color: var(--text); border: 1px solid var(--border);
  border-radius: 8px; padding: 7px 10px; font-size: 13px;
}
.cart-btn {
  position: relative; background: var(--card); color: var(--text);
  border: 1px solid var(--border); border-radius: 8px; padding: 8px 12px; font-size: 15px;
}
.cart-count {
  position: absolute; top: -7px; right: -7px;
  background: var(--accent); color: #fff; font-size: 11px; font-weight: 700;
  border-radius: 50%; min-width: 20px; height: 20px; display: inline-flex;
  align-items: center; justify-content: center; padding: 0 5px;
}

/* Hero */
.hero {
  background: radial-gradient(ellipse at 20% 30%, rgba(255,92,51,0.18), transparent 55%),
              radial-gradient(ellipse at 80% 20%, rgba(43,108,255,0.18), transparent 55%),
              var(--bg);
  border-bottom: 1px solid var(--border);
}
.hero-inner { max-width: 1200px; margin: 0 auto; padding: 72px 24px; text-align: center; }
.hero h1 {
  font-size: clamp(34px, 6vw, 60px); font-weight: 800; letter-spacing: -0.5px;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  margin-bottom: 14px;
}
.hero p { color: var(--muted); font-size: 17px; max-width: 600px; margin: 0 auto 26px; }
.cta {
  display: inline-block; padding: 14px 30px; border-radius: 999px; font-weight: 700; font-size: 15px;
  background: linear-gradient(90deg, var(--accent), var(--accent2)); color: #fff;
}

/* Container + catalog */
.container { max-width: 1200px; margin: 0 auto; padding: 36px 24px 80px; }
.category-bar { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 28px; }
.category-chip {
  background: var(--card); color: var(--muted); border: 1px solid var(--border);
  border-radius: 999px; padding: 8px 18px; font-size: 14px; cursor: pointer;
}
.category-chip.active, .category-chip:hover { color: #fff; border-color: var(--accent); background: rgba(255,92,51,0.12); }

.product-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 20px;
}
.product-card {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; display: flex; flex-direction: column; transition: transform .15s ease, border-color .15s ease;
}
.product-card:hover { transform: translateY(-3px); border-color: var(--border-strong); background: var(--card-hover); }
.product-thumb { aspect-ratio: 4/3; background: #0a0a10; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.product-thumb img { width: 100%; height: 100%; object-fit: cover; }
.product-thumb .ph { font-size: 46px; opacity: .5; }
.product-body { padding: 16px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.product-cat { font-size: 11px; text-transform: uppercase; letter-spacing: .5px; color: var(--accent2); }
.product-title { font-size: 16px; font-weight: 600; line-height: 1.3; }
.product-price { display: flex; align-items: baseline; gap: 8px; margin-top: auto; }
.price-now { font-size: 20px; font-weight: 800; }
.price-was { font-size: 13px; color: var(--muted); text-decoration: line-through; }
.product-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 10px; }
.badge { font-size: 11px; padding: 3px 8px; border-radius: 6px; font-weight: 600; }
.badge.digital { background: rgba(43,108,255,.18); color: #6aa0ff; }
.badge.soldout { background: rgba(255,77,77,.15); color: var(--danger); }
.add-btn {
  background: var(--accent); color: #fff; border: none; border-radius: 8px; padding: 9px 14px;
  font-size: 14px; font-weight: 700;
}
.add-btn:disabled { background: var(--border); color: var(--muted); cursor: not-allowed; }

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

/* Footer */
.site-footer { border-top: 1px solid var(--border); padding: 28px 24px; text-align: center; color: var(--muted); font-size: 13px; }
.site-footer a { color: var(--accent2); }
.site-footer p + p { margin-top: 6px; }

/* Cart drawer */
.cart-drawer { position: fixed; top: 0; right: 0; bottom: 0; width: 380px; max-width: 92vw; transform: translateX(100%); transition: transform .25s ease; z-index: 60; }
.cart-drawer.open { transform: translateX(0); }
.cart-panel { display: flex; flex-direction: column; height: 100%; background: var(--card); border-left: 1px solid var(--border); }
.cart-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 20px; border-bottom: 1px solid var(--border); }
.cart-head h2 { font-size: 18px; }
.close { background: none; border: none; color: var(--muted); font-size: 26px; line-height: 1; }
.cart-items { flex: 1; overflow-y: auto; padding: 16px 20px; }
.cart-item { display: flex; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.cart-item .ci-thumb { width: 56px; height: 56px; border-radius: 8px; background: #0a0a10; display: flex; align-items: center; justify-content: center; overflow: hidden; flex-shrink: 0; }
.cart-item .ci-thumb img { width: 100%; height: 100%; object-fit: cover; }
.ci-info { flex: 1; }
.ci-title { font-size: 14px; font-weight: 600; }
.ci-price { font-size: 13px; color: var(--muted); }
.ci-qty { display: flex; align-items: center; gap: 8px; margin-top: 6px; }
.ci-qty button { background: var(--border); color: var(--text); border: none; width: 24px; height: 24px; border-radius: 6px; font-weight: 700; }
.ci-qty span { min-width: 20px; text-align: center; font-size: 14px; }
.ci-remove { background: none; border: none; color: var(--muted); font-size: 18px; }
.cart-foot { padding: 18px 20px; border-top: 1px solid var(--border); }
.cart-total { display: flex; justify-content: space-between; font-size: 17px; font-weight: 700; margin-bottom: 14px; }
.checkout-btn { width: 100%; padding: 14px; border: none; border-radius: 10px; font-size: 15px; font-weight: 700; background: linear-gradient(90deg, var(--accent), var(--accent2)); color: #fff; }
.overlay { position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 55; }

/* Toast */
.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%);
  background: var(--card); border: 1px solid var(--border-strong); color: var(--text);
  padding: 12px 22px; border-radius: 10px; font-size: 14px; z-index: 70;
  box-shadow: 0 8px 30px rgba(0,0,0,.4);
}

@media (max-width: 640px) {
  .header-inner { flex-wrap: wrap; gap: 12px; }
  .main-nav { order: 3; width: 100%; }
}
