:root {
  --bg: #050505;
  --panel: #111111;
  --panel-2: #161616;
  --soft: #242424;
  --line: rgba(255, 255, 255, 0.12);
  --text: #f4f4f4;
  --muted: rgba(255, 255, 255, 0.62);
  --accent: #ffffff;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
  --radius-xl: 28px;
  --radius-lg: 20px;
  --radius-md: 16px;
  --radius-sm: 12px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; background: linear-gradient(180deg, #0b0b0b 0%, #050505 100%); color: var(--text); font-family: "Inter", system-ui, sans-serif; }
body { min-height: 100vh; }
a { color: inherit; text-decoration: none; }
button, input, textarea { font: inherit; }
button { cursor: pointer; }

.page-shell {
  display: grid;
  grid-template-columns: minmax(320px, 410px) 1fr;
  min-height: 100vh;
}

.cart-panel {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 28px;
  background: rgba(15, 15, 15, 0.96);
  border-right: 1px solid var(--line);
  backdrop-filter: blur(18px);
  overflow: auto;
}

.content {
  padding: 34px;
}

.hero,
.filters-section,
.catalog-section,
.summary-box,
.checkout-form,
.status-bar,
.product-card,
.category-card {
  background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0.01));
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.hero, .filters-section, .catalog-section {
  border-radius: var(--radius-xl);
  padding: 28px;
  margin-bottom: 22px;
}

.hero {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: flex-end;
}

.hero h1, .section-head h2, .panel-header h2 {
  margin: 0;
  font-size: clamp(28px, 5vw, 54px);
  line-height: 0.95;
  letter-spacing: -0.04em;
}

.section-head h2, .panel-header h2 { font-size: 24px; line-height: 1; }
.hero-copy {
  max-width: 720px;
  font-size: 16px;
  color: var(--muted);
  line-height: 1.7;
}
.eyebrow {
  margin: 0 0 10px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--muted);
}
.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.primary-btn,
.secondary-btn,
.ghost-btn,
.ghost-link,
.chip {
  border-radius: 999px;
  border: 1px solid var(--line);
  transition: 0.2s ease;
}
.primary-btn {
  background: var(--accent);
  color: #000;
  padding: 14px 18px;
  font-weight: 700;
  border: none;
}
.primary-btn:hover { transform: translateY(-1px); filter: brightness(0.96); }
.secondary-btn, .ghost-btn, .ghost-link {
  background: transparent;
  color: var(--text);
  padding: 13px 18px;
}
.secondary-btn:hover, .ghost-btn:hover, .ghost-link:hover, .chip:hover { background: rgba(255,255,255,0.06); }

.status-bar {
  border-radius: var(--radius-lg);
  padding: 16px 18px;
  margin-bottom: 20px;
  color: var(--muted);
}
.section-head {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
  margin-bottom: 18px;
}
.cards-grid, .product-grid {
  display: grid;
  gap: 16px;
}
.cards-grid { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.product-grid { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.category-card, .product-card {
  border-radius: var(--radius-lg);
  padding: 20px;
}
.category-card {
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.category-card.active {
  border-color: rgba(255,255,255,0.34);
  background: rgba(255,255,255,0.06);
}
.category-emoji { font-size: 28px; }
.category-name { font-size: 18px; font-weight: 700; }
.category-description { color: var(--muted); line-height: 1.6; }

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.chip {
  background: transparent;
  color: var(--text);
  padding: 12px 16px;
}
.chip.active {
  background: var(--accent);
  color: #000;
  border-color: var(--accent);
}

.product-card {
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.product-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}
.product-type, .catalog-meta, .stock-note, .mini-note {
  margin: 0;
  color: var(--muted);
}
.product-name {
  margin: 6px 0 0;
  font-size: 22px;
  letter-spacing: -0.03em;
}
.product-price {
  min-width: fit-content;
  padding: 10px 12px;
  border-radius: 999px;
  background: rgba(255,255,255,0.06);
  font-weight: 700;
}
.tags-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
}
.notes-block {
  display: grid;
  gap: 10px;
  padding: 14px;
  background: rgba(255,255,255,0.035);
  border-radius: var(--radius-md);
}
.notes-block p { margin: 0; line-height: 1.6; color: var(--muted); }
.notes-block strong { color: var(--text); }
.product-bottom {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
}
.qty-box {
  display: inline-flex;
  align-items: center;
  background: rgba(255,255,255,0.045);
  border-radius: 999px;
  padding: 4px;
}
.qty-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: none;
  background: transparent;
  color: var(--text);
  font-size: 22px;
}
.qty-input {
  width: 54px;
  text-align: center;
  background: transparent;
  border: none;
  color: var(--text);
}
.qty-input::-webkit-outer-spin-button,
.qty-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

.panel-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-bottom: 18px;
}
.cart-list {
  display: grid;
  gap: 12px;
  margin-bottom: 16px;
}
.cart-item {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 14px;
  background: rgba(255,255,255,0.03);
}
.cart-item-top, .summary-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.cart-item-name { margin: 0; font-weight: 700; }
.cart-item-meta { margin: 6px 0 0; color: var(--muted); font-size: 13px; line-height: 1.5; }
.cart-item-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}
.summary-box, .checkout-form {
  border-radius: var(--radius-lg);
  padding: 18px;
  margin-top: 18px;
}
.summary-line.total {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
  font-size: 20px;
}
.checkout-form {
  display: grid;
  gap: 14px;
}
.checkout-form label {
  display: grid;
  gap: 8px;
}
.checkout-form span {
  color: var(--muted);
  font-size: 13px;
}
.checkout-form input,
.checkout-form textarea {
  width: 100%;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.035);
  color: var(--text);
  padding: 14px 16px;
}
.mini-note {
  margin-top: 14px;
  line-height: 1.6;
}
.empty-state {
  min-height: 220px;
  display: grid;
  place-items: center;
  text-align: center;
  border-radius: var(--radius-lg);
  border: 1px dashed var(--line);
  color: var(--muted);
  padding: 24px;
}
.empty-state.compact { min-height: 160px; }
.hidden { display: none; }
.success-toast, .error-toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  padding: 16px 18px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: rgba(17,17,17,0.98);
  box-shadow: var(--shadow);
  max-width: 340px;
  z-index: 99;
}

@media (max-width: 1080px) {
  .page-shell { grid-template-columns: 1fr; }
  .cart-panel {
    position: fixed;
    inset: 0 0 0 auto;
    width: min(100%, 420px);
    z-index: 30;
    transform: translateX(100%);
    transition: 0.25s ease;
  }
  .cart-panel.open { transform: translateX(0); }
  .content { padding: 18px; }
  .hero { flex-direction: column; align-items: stretch; }
}
