:root {
  --bg: #12091f;
  --surface: #1b102d;
  --surface-2: #271842;
  --text: #fff7ff;
  --muted: #cab8dc;
  --line: rgba(255, 255, 255, 0.14);
  --brand: #ff4fa3;
  --brand-2: #7c5cff;
  --accent: #ffe45c;
  --success: #38e8a6;
  --danger: #ff6b6b;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.3);
  --radius: 8px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--text);
  font-family: "Segoe UI", Tahoma, Arial, sans-serif;
  line-height: 1.6;
  background:
    radial-gradient(circle at 16% 18%, rgba(255, 79, 163, 0.22), transparent 28%),
    radial-gradient(circle at 88% 12%, rgba(124, 92, 255, 0.26), transparent 30%),
    radial-gradient(circle at 48% 88%, rgba(255, 228, 92, 0.1), transparent 28%),
    var(--bg);
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button, input, textarea { font: inherit; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 18px;
  align-items: center;
  padding: 14px clamp(18px, 5vw, 72px);
  border-bottom: 1px solid var(--line);
  background: rgba(18, 9, 31, 0.86);
  backdrop-filter: blur(18px);
}
.brand, .nav, .account-nav, .hero-actions, .row-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}
.brand { font-weight: 950; }
.brand img { width: 42px; height: 42px; }
.nav { justify-content: center; color: var(--muted); font-weight: 850; }
.nav a, .account-nav a, .account-nav button, .button, .icon-button {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius);
  border: 1px solid transparent;
  white-space: nowrap;
  font-weight: 900;
}
.nav a { padding: 8px 11px; }
.nav a:hover, .nav a.is-active { color: var(--text); background: rgba(255,255,255,0.1); }
.account-nav { justify-content: flex-end; }
.account-nav a, .account-nav button {
  padding: 8px 12px;
  color: var(--text);
  border-color: var(--line);
  background: rgba(255,255,255,0.07);
  cursor: pointer;
}
.account-nav .cart-link {
  color: #fff;
  border-color: rgba(255,79,163,0.5);
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
}

.button {
  min-height: 46px;
  padding: 10px 16px;
  cursor: pointer;
}
.button.primary {
  color: #fff;
  border-color: rgba(255,255,255,0.08);
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  box-shadow: 0 16px 38px rgba(255, 79, 163, 0.28);
}
.button.secondary { color: var(--text); border-color: var(--line); background: rgba(255,255,255,0.08); }
.button.success { color: #061911; background: var(--success); }
.button.danger { color: #fff; background: var(--danger); }

.hero {
  min-height: calc(100vh - 70px);
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.78fr);
  gap: clamp(28px, 6vw, 82px);
  align-items: center;
  padding: clamp(48px, 7vw, 100px) clamp(18px, 6vw, 92px) 44px;
}
.eyebrow { margin: 0 0 12px; color: var(--accent); font-weight: 950; }
h1, h2, h3, p { margin-top: 0; }
h1 { max-width: 880px; margin-bottom: 18px; font-size: clamp(42px, 6vw, 84px); line-height: 1.02; letter-spacing: 0; }
h2 { margin-bottom: 12px; font-size: clamp(30px, 4vw, 48px); line-height: 1.14; }
.lead { max-width: 730px; margin-bottom: 28px; color: var(--muted); font-size: 18px; }
.hero-actions { flex-wrap: wrap; }

.hero-panel, .product-card, .stock-card, .flow-card, .panel, .auth-box, .payment-card, .order-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(150deg, rgba(255,255,255,0.12), rgba(255,255,255,0.045));
  box-shadow: var(--shadow);
}
.hero-panel { overflow: hidden; }
.hero-art { min-height: 340px; display: grid; place-items: center; padding: 28px; }
.hero-art img { width: min(90%, 410px); filter: drop-shadow(0 24px 42px rgba(0,0,0,0.28)); }
.ticker { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); }
.ticker div { padding: 18px; border-right: 1px solid var(--line); }
.ticker div:last-child { border-right: 0; }
.ticker strong { display: block; color: var(--accent); font-size: 28px; line-height: 1.1; }
.ticker span, .muted, .product-card p, .stock-card p, .footer { color: var(--muted); }

.section { padding: clamp(48px, 7vw, 92px) clamp(18px, 6vw, 92px); }
.section.alt { border-block: 1px solid var(--line); background: rgba(255,255,255,0.035); }
.section-heading { max-width: 780px; margin-bottom: 28px; }
.product-grid, .stock-grid, .flow-grid, .payment-grid, .orders-list { display: grid; gap: 16px; }
.product-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.flow-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.payment-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.product-card { overflow: hidden; }
.product-card img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; background: var(--surface-2); }
.product-body { display: grid; gap: 14px; padding: 20px; }
.product-meta, .stock-card, .cart-item, .order-head {
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
}
.price { color: var(--accent); font-size: 28px; font-weight: 950; }
.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  padding: 5px 10px;
  border-radius: var(--radius);
  color: #1d0820;
  background: var(--accent);
  font-size: 13px;
  font-weight: 950;
}
.pill.success { background: var(--success); color: #061911; }
.stock-card { padding: 18px; }
.stock-left { display: grid; grid-template-columns: 76px 1fr; gap: 16px; align-items: center; }
.stock-left img { width: 76px; height: 76px; border-radius: var(--radius); object-fit: cover; background: var(--surface-2); }
.stock-card h3, .stock-card p { margin-bottom: 0; }
.stock-price { min-width: 210px; display: grid; gap: 6px; justify-items: end; }
.flow-card, .panel, .auth-box, .payment-card, .order-card { padding: 22px; }
.flow-step {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  margin-bottom: 16px;
  border-radius: var(--radius);
  color: #1d0820;
  background: var(--accent);
  font-weight: 950;
}

.page-layout, .auth-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 390px;
  gap: 22px;
  align-items: start;
  padding: clamp(34px, 6vw, 78px) clamp(18px, 6vw, 92px);
}
.auth-layout {
  grid-template-columns: minmax(0, 1fr) 430px;
  min-height: calc(100vh - 70px);
  align-items: center;
}
.cart-item {
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}
.cart-item:last-child { border-bottom: 0; }
.cart-info { display: grid; grid-template-columns: 82px 1fr; gap: 14px; align-items: center; }
.cart-info img { width: 82px; height: 62px; object-fit: cover; border-radius: var(--radius); background: var(--surface-2); }
.qty-control { display: inline-flex; align-items: center; gap: 8px; }
.icon-button {
  width: 34px;
  min-height: 34px;
  color: var(--text);
  border-color: var(--line);
  background: rgba(255,255,255,0.08);
  cursor: pointer;
}
.summary-total { font-size: 40px; color: var(--accent); font-weight: 950; }

label { display: block; margin-bottom: 8px; font-weight: 900; }
input, textarea {
  width: 100%;
  margin-bottom: 16px;
  padding: 12px 13px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--text);
  background: rgba(255,255,255,0.08);
}
input[type="radio"] { width: auto; margin: 0 8px 0 0; }
textarea { min-height: 96px; resize: vertical; }
input:focus, textarea:focus { outline: 3px solid rgba(255,79,163,0.22); border-color: var(--brand); }
.payment-card img { width: 100%; max-height: 250px; object-fit: contain; padding: 10px; border-radius: var(--radius); background: #fff; }
.bank-row { display: grid; grid-template-columns: 58px 1fr; gap: 14px; align-items: center; }
.bank-logo { width: 58px; height: 58px; display: grid; place-items: center; overflow: hidden; border-radius: var(--radius); background: #fff; }
.bank-logo img { width: 100%; height: 100%; object-fit: contain; padding: 7px; }
.empty-state { padding: 28px; text-align: center; color: var(--muted); }
.hidden { display: none !important; }

.notice {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 80;
  max-width: min(360px, calc(100vw - 36px));
  padding: 12px 14px;
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: var(--radius);
  color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.notice.is-visible { opacity: 1; transform: translateY(0); }
.contact-band {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: center;
  padding: clamp(32px, 5vw, 68px) clamp(18px, 6vw, 92px);
  border-top: 1px solid var(--line);
  background: rgba(255,79,163,0.1);
}
.footer {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 22px clamp(18px, 6vw, 92px);
  border-top: 1px solid var(--line);
}

@media (max-width: 980px) {
  .topbar, .hero, .page-layout, .auth-layout { grid-template-columns: 1fr; }
  .nav, .account-nav { justify-content: flex-start; overflow-x: auto; }
  .hero { min-height: auto; }
  .hero-panel { order: -1; }
  .product-grid, .flow-grid, .payment-grid { grid-template-columns: 1fr; }
  .stock-card, .contact-band, .footer { flex-direction: column; align-items: flex-start; }
  .stock-price { min-width: 0; justify-items: start; }
}
@media (max-width: 620px) {
  h1 { font-size: 38px; }
  .ticker { grid-template-columns: 1fr; }
  .ticker div { border-right: 0; border-bottom: 1px solid var(--line); }
  .ticker div:last-child { border-bottom: 0; }
  .cart-item, .order-head { flex-direction: column; align-items: flex-start; }
}
