:root {
  --bg: #07080d;
  --surface: #111522;
  --surface-2: #171d2e;
  --text: #f5f7fb;
  --muted: #a8b0c3;
  --line: rgba(255, 255, 255, .12);
  --cyan: #22d3ee;
  --lime: #bef264;
  --pink: #fb3e8d;
  --amber: #fbbf24;
  --radius: 8px;
  --shadow: 0 22px 70px rgba(0, 0, 0, .42);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 12% 4%, rgba(34, 211, 238, .2), transparent 30rem),
    radial-gradient(circle at 82% 10%, rgba(251, 62, 141, .2), transparent 26rem),
    linear-gradient(180deg, #07080d 0%, #0e111b 48%, #07080d 100%);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
}

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

.noise {
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: .18;
  background-image: linear-gradient(120deg, rgba(255,255,255,.04) 1px, transparent 1px);
  background-size: 10px 10px;
  z-index: -1;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px clamp(18px, 5vw, 72px);
  background: rgba(7, 8, 13, .78);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--line);
}

.brand, .main-nav, .hero-actions, .hero-stats, .product-actions, .form-actions, .admin-actions {
  display: flex;
  align-items: center;
}

.brand { gap: 10px; font-weight: 900; }
.brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: var(--radius);
  color: #071014;
  background: linear-gradient(135deg, var(--cyan), var(--lime));
  box-shadow: 0 0 28px rgba(34, 211, 238, .35);
}

.main-nav { gap: 18px; color: var(--muted); font-weight: 700; }
.main-nav a:hover { color: var(--text); }
.cart-link span {
  display: inline-grid;
  place-items: center;
  min-width: 22px;
  height: 22px;
  margin-left: 4px;
  color: #071014;
  border-radius: 999px;
  background: var(--lime);
  font-size: 12px;
}
.nav-toggle { display: none; }

.flash {
  max-width: 1180px;
  margin: 18px auto 0;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(17, 21, 34, .9);
}
.flash-success { border-color: rgba(190, 242, 100, .45); }
.flash-error { border-color: rgba(251, 62, 141, .55); }

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, .95fr);
  gap: clamp(28px, 5vw, 72px);
  align-items: center;
  min-height: calc(100vh - 74px);
  padding: clamp(48px, 7vw, 96px) clamp(18px, 5vw, 72px);
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--lime);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1, h2, h3, p { margin-top: 0; }
h1 {
  margin-bottom: 22px;
  max-width: 920px;
  font-size: clamp(42px, 6vw, 88px);
  line-height: .95;
}
h2 { font-size: clamp(28px, 4vw, 46px); line-height: 1.04; }
h3 { font-size: 20px; line-height: 1.15; }
.hero-lead { max-width: 700px; color: var(--muted); font-size: clamp(18px, 2vw, 22px); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 12px 18px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  cursor: pointer;
  font-weight: 900;
  transition: transform .18s ease, border-color .18s ease, background .18s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary {
  color: #071014;
  background: linear-gradient(135deg, var(--lime), var(--cyan));
  box-shadow: 0 16px 44px rgba(34, 211, 238, .22);
}
.btn-secondary {
  color: var(--text);
  background: rgba(255, 255, 255, .06);
  border-color: var(--line);
}
.wide { width: 100%; }

.hero-actions { gap: 12px; flex-wrap: wrap; margin: 30px 0; }
.hero-stats { gap: 14px; flex-wrap: wrap; color: var(--muted); }
.hero-stats span {
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255,255,255,.04);
}
.hero-stats strong { color: var(--text); }

.hero-panel {
  position: relative;
  min-height: 520px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(34, 211, 238, .18), transparent),
    linear-gradient(315deg, rgba(251, 62, 141, .22), transparent),
    rgba(17, 21, 34, .72);
  box-shadow: var(--shadow);
}
.hero-panel::before {
  content: "";
  position: absolute;
  inset: 12%;
  border: 1px solid rgba(255,255,255,.1);
  transform: rotate(-12deg);
}
.orbit-card {
  position: absolute;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(7, 8, 13, .8);
  backdrop-filter: blur(14px);
  box-shadow: var(--shadow);
}
.orbit-card.main {
  left: 10%;
  right: 10%;
  top: 28%;
  padding: 30px;
}
.orbit-card.small { padding: 14px 16px; font-weight: 900; }
.orbit-card.top { top: 12%; right: 8%; }
.orbit-card.mid { left: 8%; bottom: 24%; }
.orbit-card.bottom { right: 12%; bottom: 10%; }
.status-dot {
  display: block;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--lime);
  box-shadow: 0 0 24px var(--lime);
}
.meter { height: 10px; margin-top: 22px; border-radius: 99px; background: rgba(255,255,255,.1); overflow: hidden; }
.meter span { display: block; width: 78%; height: 100%; background: linear-gradient(90deg, var(--pink), var(--cyan), var(--lime)); }

.section, .page {
  max-width: 1220px;
  margin: 0 auto;
  padding: clamp(48px, 7vw, 90px) clamp(18px, 4vw, 28px);
}
.page { min-height: 70vh; }
.narrow { max-width: 850px; }
.section-heading { margin-bottom: 28px; }
.section-heading.split {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
}
.section-heading h1, .section-heading h2 { margin-bottom: 0; }

.category-grid, .product-grid, .detail-grid, .admin-grid, .form-grid {
  display: grid;
  gap: 18px;
}
.category-grid { grid-template-columns: repeat(3, 1fr); }
.product-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.detail-grid { grid-template-columns: repeat(2, 1fr); }
.admin-grid { grid-template-columns: 1.2fr .8fr; align-items: start; }
.form-grid { grid-template-columns: repeat(2, 1fr); }

.category-card, .product-card, .detail-grid article, .admin-panel, .order-card, .download-card, .panel-form, .product-form {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(17, 21, 34, .78);
  box-shadow: 0 18px 45px rgba(0,0,0,.22);
}
.category-card {
  padding: 24px;
  transition: transform .18s ease, border-color .18s ease;
}
.category-card:hover, .product-card:hover { transform: translateY(-4px); border-color: rgba(34,211,238,.5); }
.category-card span { font-size: 34px; }
.category-card p, .product-card p, .detail-grid p, .microcopy { color: var(--muted); }

.dark-band {
  max-width: none;
  padding-left: clamp(18px, 5vw, 72px);
  padding-right: clamp(18px, 5vw, 72px);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: rgba(255,255,255,.035);
}

.product-card {
  overflow: hidden;
  transition: transform .18s ease, border-color .18s ease;
}
.product-media {
  position: relative;
  aspect-ratio: 16 / 10;
  background: var(--surface-2);
}
.product-media img { width: 100%; height: 100%; object-fit: cover; }
.type-pill {
  position: absolute;
  left: 12px;
  bottom: 12px;
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(7, 8, 13, .78);
  border: 1px solid var(--line);
  font-size: 12px;
  font-weight: 900;
}
.product-body { padding: 18px; }
.badges, .tag-row { display: flex; flex-wrap: wrap; gap: 8px; }
.badges span, .mini-badge {
  padding: 5px 8px;
  border-radius: 999px;
  color: #071014;
  background: var(--amber);
  font-size: 12px;
  font-weight: 900;
}
.tag-row span { color: var(--cyan); font-size: 13px; }
.product-actions { justify-content: space-between; gap: 12px; margin-top: 18px; }
.product-actions strong, .price-row strong { font-size: 24px; }

.cta-band {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  max-width: 1220px;
  margin: 70px auto;
  padding: 28px;
  border: 1px solid rgba(190,242,100,.35);
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(190,242,100,.16), rgba(34,211,238,.1));
}
.cta-band h2 { margin: 0; max-width: 780px; }

.filter-bar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}
.filter-bar a {
  padding: 10px 13px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--muted);
}
.filter-bar a.active, .filter-bar a:hover { color: #071014; background: var(--cyan); }

.product-detail {
  display: grid;
  grid-template-columns: 1fr .8fr;
  gap: 28px;
  max-width: 1220px;
  margin: 0 auto;
  padding: clamp(36px, 5vw, 72px) clamp(18px, 4vw, 28px);
}
.gallery-main, .buy-box {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}
.gallery-main { width: 100%; aspect-ratio: 16 / 11; object-fit: cover; }
.gallery-thumbs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-top: 10px; }
.gallery-thumbs button { border: 1px solid var(--line); border-radius: var(--radius); padding: 0; overflow: hidden; cursor: pointer; background: transparent; }
.gallery-thumbs img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.buy-box { padding: 26px; align-self: start; }
.back-link { color: var(--cyan); font-weight: 800; }
.price-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: 22px 0;
}
.price-row span, .trust-row { color: var(--muted); }
.trust-row { display: grid; gap: 8px; margin-top: 18px; font-size: 14px; }
.detail-grid article { padding: 24px; }

.cart-list, .download-list { display: grid; gap: 14px; }
.cart-item {
  display: grid;
  grid-template-columns: 92px 1fr 90px 120px;
  gap: 16px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(17, 21, 34, .72);
}
.cart-item img { width: 92px; aspect-ratio: 1; object-fit: cover; border-radius: var(--radius); }
.cart-item input { width: 76px; }
.cart-summary, .summary-line {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 14px 0;
  border-top: 1px solid var(--line);
}
.cart-summary strong, .summary-line.total strong { font-size: 24px; }

.checkout-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: 24px;
}
.panel-form, .product-form, .order-card, .download-card { padding: 22px; }
label { display: grid; gap: 7px; margin-bottom: 14px; color: var(--muted); font-weight: 800; }
input, textarea, select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px 13px;
  color: var(--text);
  background: rgba(7, 8, 13, .72);
  outline: none;
}
input:focus, textarea:focus, select:focus { border-color: var(--cyan); }
small, .error { color: #ff8ab8; }
.checkbox { display: flex; align-items: flex-start; gap: 10px; }
.checkbox input { width: auto; margin-top: 5px; }
.check-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }

.admin-panel { padding: 18px; overflow: hidden; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; min-width: 620px; }
th, td { padding: 12px 10px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
th { color: var(--muted); font-size: 13px; text-transform: uppercase; }
.table-actions { display: flex; gap: 10px; align-items: center; }
.table-actions a, .table-actions button {
  color: var(--cyan);
  border: 0;
  background: transparent;
  padding: 0;
  cursor: pointer;
  font-weight: 800;
}
.empty-state {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(17, 21, 34, .72);
  color: var(--muted);
}
pre {
  white-space: pre-wrap;
  padding: 14px;
  border-radius: var(--radius);
  color: var(--lime);
  background: rgba(0,0,0,.24);
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 34px clamp(18px, 5vw, 72px);
  border-top: 1px solid var(--line);
  color: var(--muted);
}
.footer-links { display: flex; gap: 16px; }

@media (max-width: 980px) {
  .hero, .product-detail, .checkout-layout, .admin-grid { grid-template-columns: 1fr; }
  .hero { min-height: auto; }
  .product-grid, .category-grid, .detail-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 720px) {
  .nav-toggle {
    display: inline-grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    color: var(--text);
    background: rgba(255,255,255,.06);
  }
  .main-nav {
    display: none;
    position: absolute;
    left: 18px;
    right: 18px;
    top: 72px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(7, 8, 13, .96);
  }
  .main-nav.is-open { display: grid; }
  h1 { font-size: 42px; }
  .hero-panel { min-height: 400px; }
  .product-grid, .category-grid, .detail-grid, .form-grid, .check-grid { grid-template-columns: 1fr; }
  .section-heading.split, .cta-band, .site-footer { align-items: stretch; flex-direction: column; }
  .cart-item { grid-template-columns: 70px 1fr; }
  .cart-item input, .cart-item strong { grid-column: 2; }
  .hero-actions, .form-actions, .admin-actions { align-items: stretch; flex-direction: column; }
}
