:root {
  --bg: #070708;
  --bg-2: #0b0b0d;
  --panel: #111114;
  --panel-2: #141419;
  --panel-3: #181820;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.14);
  --text: #f5f7fa;
  --muted: #9b9ca5;
  --muted-2: #777984;
  --accent: #6d5efc;
  --accent-soft: rgba(109, 94, 252, 0.18);
  --shadow: 0 18px 60px rgba(0, 0, 0, 0.28);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Space Grotesk", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top center, rgba(109, 94, 252, 0.06), transparent 26%),
    linear-gradient(180deg, #080809 0%, #0a0a0c 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.02), transparent 14%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240' viewBox='0 0 240 240'%3E%3Cpath d='M0 120h240M120 0v240' stroke='rgba(255,255,255,0.018)'/%3E%3C/svg%3E");
  opacity: 0.45;
}

.page-shell {
  position: relative;
  width: min(1540px, calc(100% - 48px));
  margin: 0 auto;
  padding: 0 0 64px;
}

.backdrop-grid {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.hero,
.catalog-shell,
.topbar,
.hero-panel,
.catalog-grid,
.catalog-filters {
  position: relative;
  z-index: 1;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 60px;
  padding: 0 6px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.brand-group,
.brand,
.topbar-links,
.topbar-actions,
.toolbar-controls {
  display: flex;
  align-items: center;
}

.brand-group,
.topbar-actions {
  gap: 22px;
}

.brand {
  gap: 12px;
}

.brand-logo {
  width: 34px;
  height: 34px;
  object-fit: contain;
}

.brand p,
.brand span,
.eyebrow,
.category,
.hero-card-label {
  margin: 0;
}

.brand p,
.hero-copy h1,
.section-heading h2,
.product-copy h3,
.state-card h1 {
  font-family: "Sora", sans-serif;
}

.brand p {
  font-size: 0.96rem;
  font-weight: 700;
}

.brand span,
.hero-text,
.toolbar-note,
.section-heading p,
.product-copy .description,
.state-card p {
  color: var(--muted);
}

.topbar-links,
.topbar-actions {
  gap: 8px;
}

.cart-toggle,
.cart-close {
  border: 0;
  cursor: pointer;
}

.nav-link,
.primary-btn,
.secondary-btn,
.buy-btn,
.filter-btn,
.toolbar-select,
.search-box input {
  font: inherit;
}

.nav-link,
.primary-btn,
.buy-btn,
.filter-btn,
.toolbar-select {
  transition: background 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.nav-link,
.primary-btn,
.filter-btn,
.toolbar-select,
.cart-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 14px;
  border-radius: 10px;
  text-decoration: none;
  border: 1px solid transparent;
}

.nav-link {
  color: var(--muted);
}

.nav-link:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.03);
}

.subtle-link {
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.02);
}

.primary-btn,
.buy-btn,
.filter-btn.active {
  color: white;
  background: var(--accent);
  border-color: transparent;
}

.primary-btn:hover,
.buy-btn:hover,
.filter-btn.active:hover {
  transform: translateY(-1px);
  background: #7b6dff;
}

.cart-toggle {
  position: relative;
  min-width: 44px;
  padding: 0;
  color: var(--text);
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--line);
}

.cart-icon {
  width: 18px;
  height: 18px;
  display: inline-flex;
}

.cart-icon svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.cart-pill {
  position: absolute;
  top: -7px;
  right: -7px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  font-size: 0.72rem;
  font-weight: 700;
  background: var(--accent);
  color: white;
}

.hero-panel {
  min-height: 320px;
  padding: 64px 8px 24px;
}

.crumbs {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--muted-2);
  font-size: 0.95rem;
  margin-bottom: 42px;
}

.crumb-sep {
  color: var(--muted);
}

.hero-copy {
  max-width: 700px;
}

.eyebrow {
  color: var(--accent);
  font-size: 0.88rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-weight: 700;
}

.hero-copy h1 {
  margin: 10px 0 16px;
  font-size: clamp(2.8rem, 5vw, 4.2rem);
  line-height: 1.02;
  letter-spacing: -0.04em;
}

.hero-text {
  max-width: 820px;
  margin: 0;
  font-size: 1.06rem;
  line-height: 1.75;
}

.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 52px;
}

.toolbar-note {
  font-size: 0.98rem;
}

.toolbar-controls {
  gap: 14px;
}

.toolbar-select,
.search-box {
  min-height: 40px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--line);
}

.toolbar-select {
  min-width: 180px;
  color: var(--muted);
}

.search-box {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 260px;
  padding: 0 14px;
  border-radius: 10px;
}

.search-box span {
  color: var(--muted-2);
  font-size: 0.92rem;
}

.search-box input {
  width: 100%;
  color: var(--text);
  background: transparent;
  border: 0;
  outline: 0;
}

.search-box input::placeholder {
  color: var(--muted-2);
}

.catalog-shell {
  padding-top: 6px;
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 28px 0 0;
  margin-top: 36px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.footer-copy {
  display: grid;
  gap: 6px;
}

.footer-copy strong {
  font-family: "Sora", sans-serif;
}

.footer-copy span,
.footer-links a {
  color: var(--muted);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.footer-links a,
.policy-links a,
.checkout-agreement a {
  color: var(--text);
  text-decoration: none;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 20px;
}

.compact-heading .eyebrow {
  margin-bottom: 6px;
}

.section-heading h2 {
  margin: 0;
  font-size: 1.7rem;
}

.section-heading p {
  margin: 0;
}

.catalog-filters {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 22px;
}

.filter-btn {
  cursor: pointer;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--line);
}

.filter-btn:hover {
  color: var(--text);
  border-color: var(--line-strong);
}

.catalog-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  align-items: start;
}

.product-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(17, 17, 20, 0.96), rgba(12, 12, 14, 0.98));
  box-shadow: var(--shadow);
}

.product-art-wrap {
  position: relative;
  aspect-ratio: 16 / 9;
  padding: 16px;
}

.product-art {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 12px;
  display: block;
}

.badge {
  position: absolute;
  top: 28px;
  right: 28px;
  padding: 8px 12px;
  border-radius: 999px;
  color: #f4f4f6;
  background: rgba(7, 7, 8, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 0.82rem;
}

.product-copy {
  padding: 0 18px 14px;
}

.category {
  color: var(--accent);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  margin-bottom: 8px;
}

.product-copy h3 {
  margin: 0 0 10px;
  font-size: 1.2rem;
}

.description {
  margin: 0;
  min-height: 58px;
  line-height: 1.55;
  font-size: 0.98rem;
}

.product-details {
  margin: 14px 0 0;
  padding-left: 18px;
  color: var(--muted);
  line-height: 1.55;
}

.product-details li + li {
  margin-top: 6px;
}

.product-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 0 18px 18px;
}

.price {
  font-family: "Sora", sans-serif;
  font-size: 1.7rem;
  color: var(--accent);
}

.buy-btn {
  min-height: 42px;
  padding: 0 16px;
  border-radius: 10px;
  border: 0;
  cursor: pointer;
}

.cart-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  opacity: 0;
  transition: opacity 180ms ease;
  z-index: 19;
}

.cart-overlay.is-open {
  opacity: 1;
}

.cart-drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: min(420px, 100%);
  height: 100vh;
  padding: 14px;
  transform: translateX(100%);
  transition: transform 220ms ease;
  z-index: 20;
}

.cart-drawer.is-open {
  transform: translateX(0);
}

.cart-panel {
  height: 100%;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(17, 17, 20, 0.96), rgba(12, 12, 14, 0.98));
  box-shadow: var(--shadow);
  padding: 18px;
  overflow-y: auto;
}

.cart-header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.cart-header h2 {
  margin: 6px 0 0;
  font-family: "Sora", sans-serif;
  font-size: 1.5rem;
}

.cart-count {
  color: var(--muted);
  font-size: 0.92rem;
}

.cart-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.cart-close {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--line);
  font-size: 1.2rem;
}

.cart-items {
  display: grid;
  gap: 12px;
  margin-bottom: 16px;
}

.empty-cart {
  margin: 0;
  color: var(--muted);
}

.cart-item {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 12px;
  padding: 12px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.02);
}

.cart-thumb {
  width: 64px;
  height: 64px;
  object-fit: cover;
  border-radius: 10px;
}

.cart-copy {
  display: grid;
  gap: 4px;
}

.cart-copy strong {
  font-size: 0.98rem;
}

.cart-copy span,
.cart-note {
  color: var(--muted);
  font-size: 0.9rem;
}

.cart-note {
  color: var(--accent);
}

.cart-remove {
  justify-self: start;
  margin-top: 4px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--muted-2);
  cursor: pointer;
}

.promo-label {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 0.92rem;
}

.promo-input {
  width: 100%;
  min-height: 44px;
  margin-bottom: 16px;
  padding: 0 14px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--line);
  border-radius: 10px;
  outline: 0;
}

.checkout-agreement {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 16px;
  color: var(--muted);
  line-height: 1.5;
  font-size: 0.92rem;
}

.checkout-agreement input {
  margin-top: 3px;
}

.cart-totals {
  display: grid;
  gap: 10px;
  margin-bottom: 16px;
}

.cart-totals div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
}

.cart-totals strong {
  color: var(--text);
  font-family: "Sora", sans-serif;
}

.checkout-btn {
  width: 100%;
  min-height: 44px;
  border: 0;
  cursor: pointer;
}

.buy-btn:disabled {
  opacity: 0.72;
  cursor: progress;
}

.state-page {
  display: grid;
  place-items: center;
  padding: 24px;
}

.policy-page {
  display: grid;
  place-items: center;
  min-height: 100vh;
  padding: 24px;
}

.policy-card {
  width: min(900px, 100%);
  padding: 36px;
  border-radius: 24px;
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.policy-card h1,
.policy-card h2 {
  font-family: "Sora", sans-serif;
}

.policy-card h1 {
  margin: 10px 0 10px;
  font-size: clamp(2rem, 4vw, 3rem);
}

.policy-card h2 {
  margin: 28px 0 10px;
  font-size: 1.15rem;
}

.policy-card p {
  color: var(--muted);
  line-height: 1.7;
  margin: 0;
}

.policy-updated {
  margin-bottom: 14px;
}

.policy-links {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 28px;
}

.state-card {
  width: min(680px, 100%);
  padding: 40px;
  border-radius: 24px;
  background: var(--panel);
  border: 1px solid var(--line);
}

.load-error {
  padding: 20px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.02);
  color: var(--muted);
}

@media (max-width: 1100px) {
  .catalog-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .toolbar {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 760px) {
  .page-shell {
    width: min(100% - 20px, 1540px);
  }

  .topbar,
  .brand-group,
  .topbar-actions {
    flex-direction: column;
    align-items: flex-start;
  }

  .topbar {
    padding: 14px 0 16px;
  }

  .toolbar-controls,
  .section-heading,
  .catalog-grid,
  .site-footer {
    width: 100%;
  }

  .topbar-links,
  .topbar-actions,
  .toolbar-controls,
  .catalog-filters {
    flex-wrap: wrap;
  }

  .nav-link,
  .primary-btn,
  .filter-btn,
  .toolbar-select,
  .search-box,
  .buy-btn {
    width: 100%;
  }

  .catalog-grid {
    grid-template-columns: 1fr;
  }

  .section-heading {
    flex-direction: column;
    align-items: flex-start;
  }

  .hero-panel {
    padding-top: 40px;
  }

  .cart-drawer {
    width: 100%;
    padding: 8px;
  }

  .site-footer {
    flex-direction: column;
    align-items: flex-start;
  }

  .policy-card {
    padding: 24px;
  }
}
