:root {
  --bg: #0e0e0e;
  --surface: #1a1a1a;
  --surface2: #242424;
  --border: #2e2e2e;
  --brand: #a4141a;
  --gold: #c9a227;
  --gold-dim: #8a6d0f;
  --text: #f0ebe3;
  --muted: #9a9090;
  --radius: 8px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Segoe UI', system-ui, sans-serif;
  line-height: 1.5;
  min-height: 100vh;
}

a { color: var(--gold); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── Header ── */
header {
  background: #111;
  border-bottom: 2px solid var(--brand);
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  position: sticky;
  top: 0;
  z-index: 100;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-img {
  width: 48px;
  height: 48px;
  object-fit: cover;
  border-radius: 6px;
}

.logo-text {
  line-height: 1.1;
}

.logo-text strong {
  display: block;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.05em;
  color: var(--text);
}

.logo-text span {
  font-size: 11px;
  color: var(--gold);
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.cart-btn {
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 8px 16px;
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: border-color 0.2s;
}

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

.cart-count {
  background: var(--brand);
  color: #fff;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ── Hero ── */
.hero {
  background: linear-gradient(135deg, #111 0%, #1a0a0a 50%, #0e0e0e 100%);
  border-bottom: 1px solid var(--border);
  padding: 72px 24px 64px;
  text-align: center;
}

.hero-eyebrow {
  font-size: 11px;
  letter-spacing: 0.3em;
  color: var(--gold);
  text-transform: uppercase;
  margin-bottom: 16px;
}

.hero h1 {
  font-size: clamp(32px, 6vw, 64px);
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--text);
  margin-bottom: 16px;
}

.hero h1 span { color: var(--gold); }

.hero p {
  color: var(--muted);
  font-size: 16px;
  max-width: 480px;
  margin: 0 auto 32px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(196, 162, 39, 0.1);
  border: 1px solid var(--gold-dim);
  color: var(--gold);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 8px 20px;
  border-radius: 100px;
}

/* ── Section ── */
.section {
  max-width: 1100px;
  margin: 0 auto;
  padding: 56px 24px;
}

.section-title {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.01em;
  margin-bottom: 8px;
}

.section-sub {
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 32px;
}

/* ── Category tabs ── */
.tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 32px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0;
}

.tab-btn {
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--muted);
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: -1px;
  transition: color 0.2s, border-color 0.2s;
}

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

.tab-btn.active {
  color: var(--gold);
  border-bottom-color: var(--gold);
}

/* ── Product grid ── */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(260px, 100%), 1fr));
  gap: 20px;
}

.product-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color 0.2s, transform 0.15s;
}

.product-card:hover {
  border-color: var(--gold-dim);
  transform: translateY(-2px);
}

.product-img {
  width: 100%;
  aspect-ratio: 1;
  background: var(--surface2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--border);
  font-size: 48px;
  position: relative;
  overflow: hidden;
}

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

.product-placeholder-text {
  position: absolute;
  bottom: 12px;
  left: 12px;
  font-size: 10px;
  color: var(--muted);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  background: rgba(0,0,0,0.6);
  padding: 4px 8px;
  border-radius: 4px;
}

.product-info {
  padding: 16px;
}

.product-name {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 4px;
}

.product-desc {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 12px;
}

.product-price {
  font-size: 18px;
  font-weight: 800;
  color: var(--gold);
  margin-bottom: 12px;
}

.product-price small {
  font-size: 12px;
  color: var(--muted);
  font-weight: 400;
}

/* Size + design selectors */
.size-row, .design-row {
  margin-bottom: 12px;
}

.selector-label {
  font-size: 11px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 6px;
}

.size-opts, .design-opts {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.size-opt, .design-opt {
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 600;
  border-radius: 4px;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}

.size-opt:hover, .design-opt:hover { border-color: var(--gold-dim); }

.size-opt.selected, .design-opt.selected {
  border-color: var(--gold);
  background: rgba(201, 162, 39, 0.12);
  color: var(--gold);
}

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

.qty-btn {
  width: 30px;
  height: 30px;
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 4px;
  cursor: pointer;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.qty-num {
  min-width: 28px;
  text-align: center;
  font-weight: 700;
}

.add-btn {
  width: 100%;
  background: var(--brand);
  color: #fff;
  border: none;
  padding: 11px;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  cursor: pointer;
  transition: opacity 0.15s;
}

.add-btn:hover { opacity: 0.88; }
.add-btn:disabled { opacity: 0.4; cursor: default; }

/* ── Cart drawer ── */
.cart-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 200;
}

.cart-overlay.open { display: block; }

.cart-drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: min(420px, 100vw);
  height: 100vh;
  background: var(--surface);
  border-left: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  z-index: 201;
  transform: translateX(100%);
  transition: transform 0.25s ease;
}

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

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

.cart-head h2 { font-size: 18px; font-weight: 800; }

.close-btn {
  background: none;
  border: none;
  color: var(--muted);
  font-size: 24px;
  cursor: pointer;
  line-height: 1;
}

.cart-items {
  flex: 1;
  overflow-y: auto;
  padding: 16px 24px;
}

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

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

.cart-item-meta {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 8px;
}

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

.cart-item-price {
  font-size: 15px;
  font-weight: 700;
  color: var(--gold);
}

.remove-btn {
  background: none;
  border: none;
  color: var(--muted);
  cursor: pointer;
  font-size: 18px;
}

.remove-btn:hover { color: var(--brand); }

.cart-empty {
  text-align: center;
  color: var(--muted);
  padding: 48px 0;
  font-size: 14px;
}

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

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

.cart-total span:last-child { color: var(--gold); }

.checkout-btn {
  width: 100%;
  background: var(--brand);
  color: #fff;
  border: none;
  padding: 14px;
  border-radius: var(--radius);
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  cursor: pointer;
  transition: opacity 0.15s;
}

.checkout-btn:hover { opacity: 0.88; }
.checkout-btn:disabled { opacity: 0.4; cursor: default; }

/* ── Order form modal ── */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.75);
  z-index: 300;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-overlay.open { display: flex; }

.modal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  overflow-y: auto;
}

.modal-head {
  padding: 24px 28px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.modal-head h2 { font-size: 20px; font-weight: 800; }

.modal-body { padding: 0 28px 28px; }

/* Form */
.form-group { margin-bottom: 18px; }

label {
  display: block;
  font-size: 12px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 6px;
  font-weight: 600;
}

input, textarea {
  width: 100%;
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 10px 14px;
  border-radius: var(--radius);
  font-size: 15px;
  outline: none;
  transition: border-color 0.2s;
}

input:focus, textarea:focus { border-color: var(--gold); }
textarea { resize: vertical; min-height: 80px; }

.order-summary {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin-bottom: 20px;
}

.order-summary-title {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  margin-bottom: 10px;
}

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

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

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

.order-summary-total span:last-child { color: var(--gold); }

.submit-btn {
  width: 100%;
  background: var(--brand);
  color: #fff;
  border: none;
  padding: 14px;
  border-radius: var(--radius);
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  cursor: pointer;
  transition: opacity 0.15s;
  margin-top: 4px;
}

.submit-btn:hover { opacity: 0.88; }
.submit-btn:disabled { opacity: 0.4; cursor: default; }

.form-note {
  font-size: 12px;
  color: var(--muted);
  text-align: center;
  margin-top: 12px;
}

/* ── Confirmation modal ── */
.confirm-icon {
  width: 64px;
  height: 64px;
  background: rgba(164, 20, 26, 0.15);
  border: 2px solid var(--brand);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  margin: 0 auto 20px;
}

.ref-badge {
  background: var(--surface2);
  border: 1px solid var(--gold-dim);
  border-radius: var(--radius);
  padding: 16px;
  text-align: center;
  margin-bottom: 20px;
}

.ref-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--muted);
  margin-bottom: 8px;
}

.ref-code {
  font-size: 28px;
  font-weight: 900;
  color: var(--gold);
  letter-spacing: 0.1em;
}

.invoice-link-box {
  background: rgba(164, 20, 26, 0.08);
  border: 1px solid var(--brand);
  border-radius: var(--radius);
  padding: 14px;
  text-align: center;
  margin-bottom: 16px;
}

.invoice-link-box a {
  color: var(--text);
  font-weight: 700;
  font-size: 14px;
}

.confirm-note {
  font-size: 13px;
  color: var(--muted);
  text-align: center;
  line-height: 1.6;
}

/* ── Track section ── */
.track-bar {
  background: var(--surface2);
  border: 1px solid var(--border);
  padding: 20px 24px;
  border-radius: 12px;
  max-width: 480px;
  margin: 0 auto;
}

.track-bar label { margin-bottom: 10px; }

.track-row {
  display: flex;
  gap: 10px;
}

.track-row input { flex: 1; }

.track-btn {
  background: var(--gold);
  color: #000;
  border: none;
  padding: 10px 20px;
  border-radius: var(--radius);
  font-weight: 700;
  cursor: pointer;
}

.track-result {
  margin-top: 20px;
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  display: none;
}

.track-result.show { display: block; }

.status-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 100px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.status-awaiting_payment { background: rgba(201,162,39,0.15); color: var(--gold); }
.status-payment_received { background: rgba(40,200,100,0.15); color: #4cde88; }
.status-in_production    { background: rgba(80,140,255,0.15); color: #88b4ff; }
.status-shipped          { background: rgba(164,20,26,0.15); color: #ff7070; }
.status-delivered        { background: rgba(40,200,100,0.2); color: #4cde88; }
.status-cancelled        { background: rgba(150,150,150,0.15); color: var(--muted); }

/* ── Footer ── */
footer {
  border-top: 1px solid var(--border);
  padding: 32px 24px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
}

footer a { color: var(--muted); }
footer a:hover { color: var(--gold); }

/* ── Alerts ── */
.alert {
  padding: 12px 16px;
  border-radius: var(--radius);
  font-size: 14px;
  margin-bottom: 16px;
}

.alert-error { background: rgba(164,20,26,0.15); border: 1px solid var(--brand); color: #ff8080; }
.alert-ok    { background: rgba(40,200,100,0.1); border: 1px solid #2a8a50; color: #4cde88; }

.hidden { display: none !important; }
