:root {
  --bg: #0b0d12;
  --bg-alt: #12151d;
  --text: #eef0f4;
  --text-dim: #9aa2b1;
  --accent: #7c9eff;
  --accent-2: #61e8c4;
  --border: rgba(255,255,255,0.08);
  --card: rgba(255,255,255,0.03);
  --danger: #ff8080;
  --max-w: 1140px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

a { color: inherit; }

.wrap {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
}

/* Header */
header {
  position: sticky;
  top: 0;
  z-index: 30;
  backdrop-filter: blur(10px);
  background: rgba(11,13,18,0.85);
  border-bottom: 1px solid var(--border);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0;
  gap: 20px;
}

.brand {
  font-weight: 700;
  font-size: 18px;
  letter-spacing: -0.02em;
  text-decoration: none;
  white-space: nowrap;
}

.brand span { color: var(--accent); }

.cart-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 8px;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
}

.cart-btn:hover { border-color: var(--accent); }

.cart-badge {
  position: absolute;
  top: -8px;
  right: -8px;
  background: var(--accent-2);
  color: #0b0d12;
  font-size: 11px;
  font-weight: 800;
  min-width: 18px;
  height: 18px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
}

.cart-badge.hidden { display: none; }

/* Hero */
.hero {
  padding: 60px 0 40px;
  text-align: center;
  border-bottom: 1px solid var(--border);
}

.eyebrow {
  display: inline-block;
  font-size: 13px;
  font-weight: 600;
  color: var(--accent-2);
  background: rgba(97,232,196,0.08);
  border: 1px solid rgba(97,232,196,0.25);
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 18px;
}

.hero h1 {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  letter-spacing: -0.03em;
  margin: 0 0 14px;
  font-weight: 800;
}

.hero p {
  color: var(--text-dim);
  max-width: 520px;
  margin: 0 auto;
}

/* Shop */
.shop-wrap { padding: 44px 0 90px; }

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

.filter-btn {
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text-dim);
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

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

.filter-btn.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #0b0d12;
}

.grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}

@media (max-width: 980px) { .grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 700px) { .grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 460px) { .grid { grid-template-columns: 1fr; } }

.product-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 20px;
  display: flex;
  flex-direction: column;
}

.product-icon {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(124,158,255,0.18), rgba(97,232,196,0.18));
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}

.product-icon svg { width: 28px; height: 28px; stroke: var(--accent-2); }

.product-image {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 16px;
  background: #fff;
}

.product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.product-category {
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-dim);
  margin-bottom: 6px;
}

.product-name {
  font-size: 15px;
  font-weight: 700;
  margin: 0 0 8px;
  line-height: 1.35;
}

.product-desc {
  font-size: 13px;
  color: var(--text-dim);
  margin: 0 0 16px;
  flex: 1;
}

.product-price {
  font-size: 18px;
  font-weight: 800;
  margin-bottom: 14px;
}

.qty-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.qty-stepper {
  display: flex;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}

.qty-stepper button {
  width: 30px;
  height: 32px;
  background: transparent;
  border: none;
  color: var(--text);
  font-size: 16px;
  cursor: pointer;
}

.qty-stepper button:hover { background: rgba(255,255,255,0.06); }

.qty-stepper span {
  width: 32px;
  text-align: center;
  font-size: 14px;
  font-weight: 600;
}

.add-btn {
  width: 100%;
  padding: 10px;
  border-radius: 8px;
  background: var(--accent);
  color: #0b0d12;
  border: none;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  transition: opacity 0.15s ease, transform 0.15s ease;
}

.add-btn:hover { opacity: 0.9; transform: translateY(-1px); }

.add-btn.added { background: var(--accent-2); }

.empty-msg {
  text-align: center;
  color: var(--text-dim);
  padding: 60px 0;
}

/* Cart drawer */
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 40;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.overlay.open { opacity: 1; pointer-events: auto; }

.drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(420px, 100%);
  background: var(--bg-alt);
  border-left: 1px solid var(--border);
  z-index: 50;
  transform: translateX(100%);
  transition: transform 0.25s ease;
  display: flex;
  flex-direction: column;
}

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

.drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 22px;
  border-bottom: 1px solid var(--border);
}

.drawer-header h2 { margin: 0; font-size: 18px; }

.drawer-close {
  background: transparent;
  border: none;
  color: var(--text-dim);
  font-size: 22px;
  cursor: pointer;
  line-height: 1;
}

.drawer-close:hover { color: var(--text); }

.drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px 22px;
}

.cart-item {
  display: flex;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}

.cart-item:last-child { border-bottom: none; }

.cart-item-info { flex: 1; }

.cart-item-name {
  font-size: 14px;
  font-weight: 600;
  margin: 0 0 4px;
}

.cart-item-price {
  font-size: 13px;
  color: var(--text-dim);
  margin: 0 0 8px;
}

.cart-item-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.remove-btn {
  background: transparent;
  border: none;
  color: var(--danger);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
}

.cart-empty {
  text-align: center;
  color: var(--text-dim);
  padding: 60px 20px;
}

.drawer-footer {
  padding: 20px 22px;
  border-top: 1px solid var(--border);
}

.drawer-total {
  display: flex;
  justify-content: space-between;
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 16px;
}

.checkout-link {
  display: block;
  width: 100%;
  text-align: center;
  padding: 12px;
  border-radius: 8px;
  background: var(--accent);
  color: #0b0d12;
  font-weight: 700;
  text-decoration: none;
  font-size: 14.5px;
}

.checkout-link.disabled {
  opacity: 0.4;
  pointer-events: none;
}

/* Checkout page */
.checkout-wrap {
  padding: 50px 0 90px;
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 40px;
  align-items: start;
}

@media (max-width: 860px) { .checkout-wrap { grid-template-columns: 1fr; } }

.checkout-wrap h1 { font-size: 1.8rem; letter-spacing: -0.02em; margin: 0 0 24px; }

.form-card, .summary-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 26px;
}

.form-row { margin-bottom: 18px; }
.form-row.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-dim);
  margin-bottom: 6px;
}

input, textarea {
  width: 100%;
  padding: 11px 13px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.03);
  color: var(--text);
  font-size: 14px;
  font-family: inherit;
}

input:focus, textarea:focus {
  outline: none;
  border-color: var(--accent);
}

textarea { resize: vertical; min-height: 70px; }

.payment-note {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  border-radius: 10px;
  background: rgba(97,232,196,0.08);
  border: 1px solid rgba(97,232,196,0.25);
  font-size: 13.5px;
  color: var(--accent-2);
  margin-bottom: 20px;
}

.form-error {
  background: rgba(255,128,128,0.1);
  border: 1px solid rgba(255,128,128,0.3);
  color: var(--danger);
  padding: 12px 14px;
  border-radius: 8px;
  font-size: 13.5px;
  margin-bottom: 18px;
  display: none;
}

.form-error.visible { display: block; }

.submit-btn {
  width: 100%;
  padding: 14px;
  border-radius: 8px;
  background: var(--accent);
  color: #0b0d12;
  border: none;
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
}

.submit-btn:hover { opacity: 0.92; }
.submit-btn:disabled { opacity: 0.5; cursor: not-allowed; }

.summary-card h2 { margin: 0 0 18px; font-size: 16px; }

.summary-item {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 13.5px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}

.summary-item .name { color: var(--text); }
.summary-item .qty { color: var(--text-dim); }

.summary-total {
  display: flex;
  justify-content: space-between;
  font-size: 17px;
  font-weight: 800;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

/* Confirmation page */
.confirm-wrap {
  padding: 80px 0;
  text-align: center;
  max-width: 560px;
  margin: 0 auto;
}

.confirm-icon {
  width: 72px;
  height: 72px;
  border-radius: 999px;
  background: rgba(97,232,196,0.15);
  border: 1px solid rgba(97,232,196,0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 24px;
}

.confirm-icon svg { width: 34px; height: 34px; stroke: var(--accent-2); }

.confirm-wrap h1 { font-size: 1.8rem; margin: 0 0 10px; }
.confirm-wrap > p { color: var(--text-dim); margin: 0 0 34px; }

.order-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 26px;
  text-align: left;
  margin-bottom: 26px;
}

.order-number {
  font-size: 13px;
  color: var(--text-dim);
  margin-bottom: 4px;
}

.order-number strong { color: var(--accent-2); }

.cod-note {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  border-radius: 10px;
  background: rgba(124,158,255,0.08);
  border: 1px solid rgba(124,158,255,0.25);
  font-size: 14px;
  margin: 18px 0;
}

.back-link {
  display: inline-block;
  padding: 12px 24px;
  border-radius: 8px;
  background: var(--accent);
  color: #0b0d12;
  font-weight: 700;
  text-decoration: none;
  font-size: 14.5px;
}

footer {
  border-top: 1px solid var(--border);
  padding: 30px 0;
  text-align: center;
  color: var(--text-dim);
  font-size: 13.5px;
}
