@font-face {
  font-family: "BebasKai";
  src: url("./assets/fonts/BebasKai.ttf") format("truetype");
  font-display: swap;
}

@font-face {
  font-family: "Pervitina";
  src: url("./assets/fonts/Pervitina-Dex-FFP.ttf") format("truetype");
  font-display: swap;
}

:root {
  --bg: #060606;
  --surface: #111111;
  --surface-2: #171717;
  --card: rgba(255, 255, 255, 0.04);
  --text: #f5f5f5;
  --muted: #adadad;
  --border: rgba(255, 255, 255, 0.09);
  --accent: #d7fa00;
  --accent-2: #b8d700;
  --danger: #ff7474;
  --success: #7ff58b;
  --shadow: 0 22px 48px rgba(0, 0, 0, 0.35);
}

:root.light {
  --bg: #f5f5f3;
  --surface: #ffffff;
  --surface-2: #efefeb;
  --card: rgba(0, 0, 0, 0.03);
  --text: #101010;
  --muted: #5b5b5b;
  --border: rgba(0, 0, 0, 0.1);
  --accent: #93ab00;
  --accent-2: #7f9500;
  --danger: #da4141;
  --success: #168d31;
  --shadow: 0 18px 34px rgba(0, 0, 0, 0.08);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-width: 320px;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

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

h1, h2, h3, .brand-text, .section-kicker, .card-title, .product-title, .hero-title, .page-title {
  font-family: "BebasKai", "Pervitina", Impact, sans-serif;
  letter-spacing: 0.08em;
}

.promo-bar {
  background: var(--accent);
  color: #000;
  text-align: center;
  padding: 10px 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.9rem;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.nav-wrap {
  max-width: 1400px;
  margin: 0 auto;
  padding: 18px 22px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 22px;
}
.nav-left { justify-content: flex-start; }
.nav-right { justify-content: flex-end; }
.nav-links a, .theme-toggle {
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
  color: var(--text);
}
.nav-links a:hover, .mobile-menu a:hover { color: var(--accent); }

.brand {
  display: inline-flex;
  justify-content: center;
  align-items: center;
}
.brand img {
  width: 108px;
  height: auto;
}

.theme-toggle, .nav-toggle, .button, .chip, .qty-btn, .ghost-button, .danger-button {
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
  border-radius: 999px;
  cursor: pointer;
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease, color 0.18s ease;
}
.theme-toggle:hover, .nav-toggle:hover, .button:hover, .chip:hover, .qty-btn:hover, .ghost-button:hover, .danger-button:hover {
  transform: translateY(-1px);
  border-color: var(--accent);
}
.theme-toggle { padding: 10px 14px; }
.nav-toggle { display: none; padding: 10px 16px; }
.mobile-menu {
  display: none;
  padding: 0 20px 18px;
  gap: 10px;
  flex-direction: column;
}
.mobile-menu a {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 14px 16px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.mobile-menu.open { display: flex; }

.cart-link {
  position: relative;
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.cart-link img {
  width: 18px;
  height: 18px;
  object-fit: contain;
}
.cart-count {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--accent);
  color: #000;
  font-size: 0.72rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
}

main#app {
  min-height: calc(100vh - 260px);
}

.page-shell {
  max-width: 1400px;
  margin: 0 auto;
  padding: 40px 22px 90px;
}

.hero {
  position: relative;
  overflow: hidden;
  border-radius: 30px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  min-height: 72vh;
  background: var(--surface);
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url("./assets/hero-bg.png") center/cover no-repeat;
  filter: blur(3px);
  opacity: 0.34;
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, color-mix(in srgb, var(--surface) 90%, transparent), color-mix(in srgb, var(--surface) 38%, transparent), color-mix(in srgb, var(--surface) 82%, transparent));
}
.hero-inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.2fr 0.95fr;
  gap: 20px;
  align-items: center;
  padding: clamp(28px, 6vw, 72px);
  min-height: 72vh;
}
.hero-title {
  font-size: clamp(3.6rem, 11vw, 8rem);
  margin: 0;
  color: var(--accent);
}
.hero-subtitle {
  font-size: clamp(1.8rem, 3.8vw, 3.4rem);
  margin: 10px 0 12px;
}
.hero-copy {
  max-width: 680px;
  color: var(--muted);
  font-size: 1.08rem;
  line-height: 1.75;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 24px;
}
.button {
  padding: 14px 24px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.button.primary {
  background: var(--accent);
  color: #000;
  border-color: var(--accent);
}
.button.primary:hover { background: var(--accent-2); }
.hero-visual img {
  width: 100%;
  max-width: 520px;
  margin-left: auto;
  border-radius: 26px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.section {
  margin-top: 38px;
}
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 20px;
  margin-bottom: 18px;
}
.section-kicker {
  color: var(--accent);
  font-size: clamp(1.6rem, 4vw, 2.8rem);
  margin: 0;
}
.section-subtext {
  color: var(--muted);
  max-width: 680px;
  margin: 0;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
}
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 24px;
  overflow: hidden;
  box-shadow: var(--shadow);
}
.card-media {
  aspect-ratio: 1 / 1.08;
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
}
.card-body {
  padding: 16px 16px 18px;
}
.card-title {
  margin: 0 0 8px;
  font-size: 1.34rem;
}
.card-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 0.95rem;
  margin-bottom: 12px;
}
.card-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.small-button, .ghost-button, .danger-button {
  padding: 10px 14px;
  border-radius: 14px;
  font-weight: 700;
}
.ghost-button { background: transparent; }
.danger-button { color: var(--danger); }
.price {
  color: var(--accent);
  font-weight: 800;
}

.category-tiles {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.category-tile {
  position: relative;
  border-radius: 28px;
  min-height: 280px;
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  background-size: cover;
  background-position: center;
}
.category-tile::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent, rgba(0,0,0,0.75));
}
.category-content {
  position: absolute;
  left: 20px;
  right: 20px;
  bottom: 20px;
  z-index: 1;
}
.category-content h3 {
  margin: 0 0 10px;
  font-size: 2rem;
}

.benefit-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.benefit {
  padding: 22px;
  border-radius: 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}
.benefit-icon {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  margin-bottom: 16px;
  background: color-mix(in srgb, var(--accent) 18%, transparent);
}
.benefit-icon img { width: 22px; height: 22px; object-fit: contain; }
.benefit h3 { margin: 0 0 10px; font-size: 1.5rem; }
.benefit p { margin: 0; color: var(--muted); line-height: 1.7; }

.page-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 20px;
  margin-bottom: 28px;
}
.page-title {
  margin: 0;
  font-size: clamp(2.8rem, 7vw, 4.6rem);
  color: var(--accent);
}
.page-copy {
  max-width: 720px;
  color: var(--muted);
  margin-top: 8px;
  line-height: 1.7;
}

.toolbar {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 18px;
}
.search, .select, .input, .textarea {
  width: 100%;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  border-radius: 16px;
  padding: 14px 16px;
  outline: none;
}
.search-wrap {
  flex: 1 1 280px;
}
.select-wrap {
  width: min(220px, 100%);
}
.chips {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.chip {
  padding: 10px 14px;
  font-weight: 700;
}
.chip.active {
  background: color-mix(in srgb, var(--accent) 20%, var(--surface));
  border-color: var(--accent);
}

.product-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
  align-items: start;
}
.product-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 28px;
  padding: 20px;
  box-shadow: var(--shadow);
}
.product-image {
  width: 100%;
  border-radius: 22px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--surface-2);
}
.product-image img {
  width: 100%;
  aspect-ratio: 1 / 1.02;
  object-fit: cover;
}
.product-title {
  margin: 10px 0 12px;
  font-size: clamp(2rem, 5vw, 3rem);
}
.product-description {
  color: var(--muted);
  line-height: 1.8;
}
.meta-row {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin: 18px 0;
}
.meta-pill {
  border-radius: 999px;
  padding: 10px 14px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  font-size: 0.92rem;
}
.qty-control {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin: 16px 0 22px;
}
.qty-btn {
  width: 42px;
  height: 42px;
  border-radius: 14px;
}
.qty-number {
  min-width: 34px;
  text-align: center;
  font-weight: 800;
}
.notice {
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid var(--border);
  background: var(--surface);
  margin: 16px 0 0;
}
.notice.success { border-color: color-mix(in srgb, var(--success) 40%, var(--border)); color: var(--success); }
.notice.error { border-color: color-mix(in srgb, var(--danger) 40%, var(--border)); color: var(--danger); }
.notice.info { color: var(--muted); }

.checkout-grid {
  display: grid;
  grid-template-columns: 1.3fr 0.9fr;
  gap: 24px;
}
.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 28px;
  padding: 22px;
  box-shadow: var(--shadow);
}
.panel h2 {
  margin: 0 0 16px;
  font-size: 2rem;
}
.cart-item {
  display: grid;
  grid-template-columns: 104px 1fr auto;
  gap: 16px;
  align-items: center;
  padding: 14px 0;
  border-top: 1px solid var(--border);
}
.cart-item:first-of-type { border-top: 0; }
.cart-item img {
  width: 104px;
  height: 104px;
  object-fit: cover;
  border-radius: 16px;
  border: 1px solid var(--border);
}
.cart-item h3 {
  margin: 0 0 6px;
  font-size: 1.3rem;
}
.cart-item p {
  margin: 4px 0;
  color: var(--muted);
}
.cart-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 8px;
}
.summary-line {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}
.summary-line.total {
  font-weight: 800;
  font-size: 1.08rem;
  border-bottom: 0;
}
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}
.full { grid-column: 1 / -1; }
.label {
  display: flex;
  flex-direction: column;
  gap: 8px;
  color: var(--muted);
}
.checkbox-line {
  display: flex;
  gap: 10px;
  align-items: center;
  color: var(--muted);
}
.stack { display: flex; flex-direction: column; gap: 14px; }
.inline { display: flex; gap: 12px; flex-wrap: wrap; }
.tiny {
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.6;
}
.empty-state {
  text-align: center;
  color: var(--muted);
  padding: 28px 0 10px;
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: color-mix(in srgb, var(--accent) 18%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 42%, var(--border));
  color: var(--text);
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 0.86rem;
  font-weight: 700;
}

.account-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
.order-card {
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 16px;
  background: var(--surface-2);
}
.order-card h3 {
  margin: 0 0 8px;
  font-size: 1.4rem;
}
.order-card p { margin: 6px 0; color: var(--muted); }

.content-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 28px;
  padding: clamp(20px, 4vw, 34px);
  box-shadow: var(--shadow);
}
.content-card p {
  color: var(--muted);
  line-height: 1.82;
}

.site-footer {
  padding: 34px 22px 42px;
  border-top: 1px solid var(--border);
  background: var(--surface);
}
.footer-grid {
  max-width: 1400px;
  margin: 0 auto 20px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.footer-grid h3 {
  margin: 0 0 12px;
  font-size: 1.4rem;
}
.footer-grid a {
  display: block;
  color: var(--muted);
  margin: 10px 0;
}
.payment-row {
  max-width: 1400px;
  margin: 0 auto 14px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.payment-row img {
  width: 42px;
  height: 42px;
  object-fit: contain;
  padding: 8px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface-2);
}
.footer-note, .footer-copy {
  max-width: 1400px;
  margin: 12px auto 0;
  color: var(--muted);
}

@media (max-width: 1100px) {
  .hero-inner,
  .product-layout,
  .checkout-grid,
  .account-grid {
    grid-template-columns: 1fr;
  }
  .category-tiles,
  .benefit-grid,
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 900px) {
  .nav-wrap {
    grid-template-columns: auto 1fr auto;
  }
  .nav-left,
  .nav-right a:not(.cart-link),
  .nav-right #accountLink {
    display: none;
  }
  .nav-right {
    gap: 10px;
  }
  .nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
  .brand { justify-self: center; }
}

@media (max-width: 760px) {
  .page-shell { padding: 28px 16px 70px; }
  .promo-bar { font-size: 0.8rem; }
  .hero { min-height: auto; }
  .hero-inner { min-height: auto; padding: 24px 18px 22px; }
  .category-tiles,
  .benefit-grid,
  .footer-grid,
  .form-grid {
    grid-template-columns: 1fr;
  }
  .toolbar { flex-direction: column; align-items: stretch; }
  .select-wrap { width: 100%; }
  .cart-item {
    grid-template-columns: 88px 1fr;
  }
  .cart-item > :last-child {
    grid-column: 2;
    justify-self: start;
  }
}
