:root {
  color-scheme: dark;
  --bg: #020617;
  --panel: rgba(8, 14, 31, .78);
  --line: rgba(148, 163, 184, .14);
  --text: #e2e8f0;
  --muted: rgba(226, 232, 240, .64);
  --pink: #e879f9;
  --cyan: #38bdf8;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  background:
    radial-gradient(900px 560px at 8% -8%, rgba(232, 121, 249, .13), transparent 62%),
    radial-gradient(850px 540px at 92% 2%, rgba(56, 189, 248, .10), transparent 60%),
    var(--bg);
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid rgba(148, 163, 184, .08);
  background: rgba(2, 6, 23, .92);
  backdrop-filter: blur(14px);
}
.topbar-inner {
  width: min(1180px, calc(100% - 32px));
  min-height: 44px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 16px;
}
.brand {
  flex: 0 0 auto;
  color: rgba(226, 232, 240, .72);
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .3px;
}
.topnav { display: flex; align-items: center; flex-wrap: wrap; gap: 2px; }
.topnav a, .topnav span {
  padding: 5px 9px;
  border-radius: 5px;
  color: rgba(226, 232, 240, .52);
  text-decoration: none;
  font-size: 12px;
  font-weight: 500;
}
.topnav a:hover { color: rgba(226, 232, 240, .9); background: rgba(255, 255, 255, .05); }
.topnav a.active { color: var(--pink); background: rgba(232, 121, 249, .1); }

.page { width: min(1180px, calc(100% - 32px)); margin: 0 auto; padding: 54px 0 72px; }
.hero { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(300px, .75fr); align-items: end; gap: 40px; }
.eyebrow {
  margin: 0 0 10px;
  color: var(--pink);
  font-size: 11px;
  font-weight: 750;
  letter-spacing: .13em;
  text-transform: uppercase;
}
h1 { margin: 0; font-size: clamp(38px, 6vw, 68px); line-height: .98; letter-spacing: -.055em; }
.hero-copy { max-width: 700px; margin: 20px 0 0; color: var(--muted); font-size: 16px; line-height: 1.65; }
.delivery-note {
  display: flex;
  gap: 14px;
  padding: 17px;
  border: 1px solid rgba(56, 189, 248, .17);
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(56, 189, 248, .075), rgba(2, 6, 23, .28));
}
.delivery-icon {
  display: grid;
  place-items: center;
  flex: 0 0 32px;
  height: 32px;
  border: 1px solid rgba(56, 189, 248, .22);
  border-radius: 50%;
  color: var(--cyan);
}
.delivery-note strong { font-size: 13px; }
.delivery-note p { margin: 5px 0 0; color: var(--muted); font-size: 12px; line-height: 1.55; }
code { color: #bae6fd; font: inherit; }

.shop-tabs {
  display: flex;
  gap: 24px;
  margin-top: 52px;
  border-bottom: 1px solid var(--line);
}
.shop-tabs a {
  position: relative;
  padding: 0 1px 13px;
  color: var(--muted);
  text-decoration: none;
  font-size: 13px;
  font-weight: 650;
}
.shop-tabs a:hover { color: var(--text); }
.shop-tabs a.active { color: var(--text); }
.shop-tabs a.active::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--pink), var(--cyan));
}

.catalog { min-height: 310px; padding-top: 24px; }
.product-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.product-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
  box-shadow: 0 18px 45px rgba(0, 0, 0, .2);
}
.product-image {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: contain;
  border-bottom: 1px solid var(--line);
  background: #050507;
}
.product-body { padding: 20px; }
.product-meta { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.product-kind { color: var(--cyan); font-size: 10px; font-weight: 750; letter-spacing: .1em; text-transform: uppercase; }
.product-price { font-size: 13px; font-weight: 750; }
.product-card h2 { margin: 12px 0 7px; font-size: 22px; letter-spacing: -.025em; }
.product-summary, .product-description { color: var(--muted); font-size: 13px; line-height: 1.62; }
.product-summary { margin: 0; }
details { margin: 16px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
summary { padding: 12px 0; cursor: pointer; color: rgba(226, 232, 240, .78); font-size: 12px; font-weight: 650; }
.product-description { padding: 0 0 14px; white-space: pre-line; }

.empty-state {
  display: grid;
  justify-items: center;
  max-width: 580px;
  margin: 46px auto 0;
  padding: 42px 28px;
  border: 1px dashed rgba(148, 163, 184, .2);
  border-radius: 12px;
  text-align: center;
  background: rgba(8, 14, 31, .38);
}
.empty-mark { color: rgba(232, 121, 249, .72); font-size: 30px; }
.empty-state h2 { margin: 12px 0 7px; font-size: 18px; }
.empty-state p { max-width: 430px; margin: 0; color: var(--muted); font-size: 13px; line-height: 1.6; }

.license-notice {
  display: flex;
  gap: 8px;
  margin-top: 26px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  color: rgba(226, 232, 240, .52);
  font-size: 11px;
  line-height: 1.55;
}
.license-notice strong { flex: 0 0 auto; color: rgba(226, 232, 240, .78); }

button, .primary-button, .secondary-button { font: inherit; }
.primary-button, .secondary-button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 38px;
  margin-top: 18px;
  padding: 8px 15px;
  border-radius: 6px;
  cursor: pointer;
  text-decoration: none;
  font-size: 12px;
  font-weight: 750;
}
.primary-button { border: 1px solid rgba(232, 121, 249, .4); color: #fff; background: rgba(232, 121, 249, .15); }
.primary-button:hover { background: rgba(232, 121, 249, .24); }
.primary-button:disabled { cursor: wait; opacity: .52; }
.secondary-button { border: 1px solid var(--line); color: var(--text); background: rgba(255, 255, 255, .035); }

.checkout-panel {
  max-width: 720px;
  margin: 30px auto 0;
  padding: 20px;
  border: 1px solid rgba(232, 121, 249, .24);
  border-radius: 12px;
  background: var(--panel);
}
.checkout-head { display: flex; justify-content: space-between; gap: 20px; }
.checkout-head h2 { margin: 0 0 20px; font-size: 19px; }
.close-button, .dialog-close, .text-button {
  border: 0;
  cursor: pointer;
  color: var(--muted);
  background: transparent;
}
.close-button, .dialog-close { font-size: 25px; }
.shop-message { min-height: 18px; margin-top: 10px; color: var(--muted); font-size: 12px; }
.shop-message.error { color: #fca5a5; }

.auth-dialog {
  width: min(420px, calc(100% - 32px));
  padding: 0;
  border: 1px solid rgba(148, 163, 184, .22);
  border-radius: 12px;
  color: var(--text);
  background: #070d1d;
  box-shadow: 0 24px 80px rgba(0, 0, 0, .6);
}
.auth-dialog::backdrop { background: rgba(0, 0, 0, .7); backdrop-filter: blur(4px); }
.auth-dialog form { position: relative; display: grid; gap: 10px; padding: 24px; }
.dialog-close { position: absolute; top: 12px; right: 15px; }
.auth-dialog h2 { margin: 0; font-size: 23px; }
.auth-copy { margin: 0 0 5px; color: var(--muted); font-size: 12px; line-height: 1.5; }
.auth-dialog input {
  width: 100%;
  padding: 10px 11px;
  border: 1px solid var(--line);
  border-radius: 6px;
  outline: none;
  color: var(--text);
  background: #020617;
}
.auth-dialog input:focus { border-color: rgba(56, 189, 248, .5); }
.auth-error { min-height: 17px; color: #fca5a5; font-size: 12px; }
.text-button { margin-top: 2px; font-size: 12px; }

@media (max-width: 820px) {
  .topbar-inner { align-items: flex-start; padding: 9px 0; }
  .hero { grid-template-columns: 1fr; gap: 25px; }
  .product-grid { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .page { width: min(100% - 22px, 1180px); padding-top: 32px; }
  .topbar-inner { width: calc(100% - 22px); display: block; }
  .topnav { margin-top: 7px; }
  .shop-tabs { gap: 18px; }
  .shop-tabs a { font-size: 12px; }
  .license-notice { display: block; }
  .license-notice strong { display: block; margin-bottom: 4px; }
}
