:root {
  --bg: #0f1116;
  --surface: #171a21;
  --surface-2: #1f2430;
  --text: #f2f5ff;
  --muted: #9ba7bf;
  --accent: #00bcd4;
  --accent-2: #22d3ee;
  --danger: #ef4444;
  --success: #22c55e;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
}

a {
  color: inherit;
}

.site-header {
  background: #0a0c10;
  border-bottom: 1px solid #262d3a;
  padding: 1rem;
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  font-size: 1.2rem;
  font-weight: 700;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.site-nav a {
  text-decoration: none;
  color: var(--text);
  font-weight: 700;
  padding: 0.45rem 0.75rem;
  border-radius: 8px;
}

.site-nav a:hover,
.site-nav a.active {
  background: #1b2230;
}

.page {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1.25rem;
}

.hero {
  background: linear-gradient(140deg, #1a1f2b, #131722);
  border: 1px solid #2b3241;
  border-radius: 14px;
  padding: 2rem;
  margin-bottom: 1.25rem;
}

.hero h1,
.hero h2 {
  margin-top: 0;
}

.muted {
  color: var(--muted);
}

.button {
  background: var(--accent);
  color: #061017;
  border: none;
  border-radius: 8px;
  padding: 0.6rem 0.95rem;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
}

.button:hover {
  background: var(--accent-2);
}

.button.secondary {
  background: #2b3241;
  color: var(--text);
}

.button.danger {
  background: var(--danger);
  color: #fff;
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1rem;
}

.card {
  background: var(--surface);
  border: 1px solid #2b3241;
  border-radius: 12px;
  padding: 1rem;
}

.card img {
  width: 100%;
  border-radius: 10px;
}

.shop-layout {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 1rem;
}

.panel {
  background: var(--surface);
  border: 1px solid #2b3241;
  border-radius: 12px;
  padding: 1rem;
}

.category-tree details {
  margin: 0.4rem 0;
}

.category-tree summary {
  cursor: pointer;
  font-weight: 700;
}

.category-button {
  width: 100%;
  text-align: left;
  background: #232a38;
  color: var(--text);
  border: 1px solid #394257;
  border-radius: 8px;
  padding: 0.45rem 0.6rem;
  margin-top: 0.35rem;
  cursor: pointer;
}

.category-button:hover,
.category-button.active {
  border-color: var(--accent);
}

.catalog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 0.9rem;
}

.product-card {
  background: var(--surface-2);
  border: 1px solid #384159;
  border-radius: 12px;
  overflow: hidden;
}

.product-image-wrap {
  position: relative;
}

.product-image-wrap img {
  display: block;
  width: 100%;
  height: 180px;
  object-fit: cover;
}

.price-badge {
  position: absolute;
  left: 8px;
  bottom: 8px;
  background: rgba(10, 15, 20, 0.88);
  border: 1px solid #344056;
  border-radius: 999px;
  padding: 0.3rem 0.55rem;
  font-weight: 700;
}

.product-body {
  padding: 0.8rem;
}

.product-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.product-description {
  margin-top: 0.65rem;
  padding-top: 0.6rem;
  border-top: 1px solid #3a435a;
  color: #dbe6ff;
}

.hidden {
  display: none !important;
}

.cart-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.cart-item {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 0.4rem;
  padding: 0.65rem 0;
  border-bottom: 1px solid #31384b;
}

.qty-controls {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.qty-controls button {
  border: 1px solid #3a4259;
  background: #242b39;
  color: var(--text);
  border-radius: 7px;
  width: 28px;
  height: 28px;
  cursor: pointer;
}

.checkout-form {
  display: grid;
  gap: 0.7rem;
}

.checkout-form input,
.checkout-form select {
  width: 100%;
  border: 1px solid #384258;
  border-radius: 8px;
  padding: 0.55rem;
  background: #161b25;
  color: var(--text);
}

.site-footer {
  border-top: 1px solid #262d3a;
  margin-top: 1.25rem;
  padding: 1.2rem;
  text-align: center;
  color: var(--muted);
}

#dropin-container {
  min-height: 140px;
  margin: 0.5rem 0;
}

@media (max-width: 900px) {
  .shop-layout {
    grid-template-columns: 1fr;
  }
}
