/* Anabolic by Nature — hyper-minimal storefront.
   Black/white only, bold typography, lots of whitespace. */

:root {
  --bg: #0a0a0a;
  --fg: #f5f5f5;
  --fg-muted: #8a8a8a;
  --line: #1a1a1a;
  --accent: #ffffff;
  --hover-bg: #141414;
  --danger: #ff5b5b;
  --ok: #4ade80;
  --max: 1200px;
  --header-h: 64px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0; padding: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: ui-sans-serif, system-ui, -apple-system, "SF Pro Display",
    "Inter", "Helvetica Neue", Arial, sans-serif;
  font-feature-settings: "ss01", "cv11";
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100%;
}

body { display: flex; flex-direction: column; min-height: 100vh; }

a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }
img { max-width: 100%; height: auto; display: block; }
input, select, textarea {
  font: inherit; color: inherit;
  background: transparent; border: none; outline: none;
}

/* --- header --- */
.hdr {
  position: sticky; top: 0; z-index: 10;
  height: var(--header-h);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 24px;
  background: rgba(10, 10, 10, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.brand { display: inline-flex; align-items: center; gap: 12px; }
.brand-mark {
  display: inline-grid; place-items: center;
  width: 32px; height: 32px;
  border: 1.5px solid var(--fg);
  font-weight: 900; font-size: 14px; letter-spacing: 1px;
}
.brand-word {
  font-weight: 900; letter-spacing: 2px;
  font-size: 13px; text-transform: uppercase;
}
.brand-word em { font-style: italic; font-weight: 400; opacity: 0.7; letter-spacing: 1px; }

.nav { display: flex; gap: 28px; align-items: center; }
.nav a {
  font-size: 13px; text-transform: uppercase; letter-spacing: 2px;
  font-weight: 600; opacity: 0.7; transition: opacity 120ms;
}
.nav a:hover { opacity: 1; }
.badge {
  display: inline-grid; place-items: center;
  min-width: 18px; height: 18px;
  border-radius: 999px; background: var(--fg); color: var(--bg);
  font-size: 11px; font-weight: 700; padding: 0 6px;
  letter-spacing: 0;
}

/* --- view containers --- */
.view { flex: 1; }
.section {
  max-width: var(--max); margin: 0 auto;
  padding: 48px 24px 96px;
}
.section.tight { padding-top: 32px; padding-bottom: 64px; }

/* --- home --- */
.hero {
  min-height: calc(100vh - var(--header-h));
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding: 0 24px 48px;
  position: relative; overflow: hidden;
}
.hero::before {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(800px 400px at 50% -100px, rgba(255,255,255,0.06), transparent 60%),
    radial-gradient(600px 600px at 50% 110%, rgba(255,255,255,0.04), transparent 60%);
  pointer-events: none;
}
.hero-mark {
  font-size: clamp(56px, 14vw, 168px);
  font-weight: 900; letter-spacing: -0.04em; line-height: 0.85;
  text-transform: uppercase;
  display: flex; flex-direction: column; gap: 4px;
  z-index: 1;
}
.hero-mark .byline {
  font-size: clamp(14px, 1.6vw, 20px);
  font-weight: 300; font-style: italic;
  letter-spacing: 0.4em; opacity: 0.7;
  text-transform: lowercase;
}
.hero-cta {
  margin-top: 56px; z-index: 1;
  display: inline-block;
  padding: 22px 56px;
  border: 1.5px solid var(--fg);
  color: var(--fg);
  font-size: 14px; font-weight: 700;
  letter-spacing: 4px; text-transform: uppercase;
  transition: all 180ms ease;
}
.hero-cta:hover { background: var(--fg); color: var(--bg); transform: translateY(-1px); }
.hero-tag {
  margin-top: 24px;
  font-size: 12px; letter-spacing: 4px; text-transform: uppercase;
  opacity: 0.5; z-index: 1;
}

/* --- shop / categories grid --- */
.h-page {
  font-size: clamp(36px, 6vw, 72px);
  font-weight: 900; letter-spacing: -0.03em; line-height: 0.95;
  margin: 0 0 8px;
  text-transform: uppercase;
}
.h-sub { color: var(--fg-muted); margin-bottom: 48px; font-size: 14px; letter-spacing: 2px; text-transform: uppercase; }

.cats {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}
.cat {
  background: var(--bg);
  padding: 40px 32px;
  min-height: 220px;
  display: flex; flex-direction: column; justify-content: space-between;
  transition: background 180ms;
  position: relative;
  overflow: hidden;
}
.cat:hover { background: var(--hover-bg); }
.cat-emoji {
  font-size: 48px; line-height: 1;
  opacity: 0.85;
}
.cat-name {
  font-size: 24px; font-weight: 800; letter-spacing: -0.01em;
  text-transform: uppercase;
}
.cat-cta {
  font-size: 11px; letter-spacing: 3px; opacity: 0.5;
  text-transform: uppercase;
}
.cat:hover .cat-cta { opacity: 1; }

/* --- products grid --- */
.prods {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}
.prod {
  background: var(--bg);
  padding: 0;
  display: flex; flex-direction: column;
  transition: background 180ms;
}
.prod:hover { background: var(--hover-bg); }
.prod-img {
  aspect-ratio: 1;
  background:
    linear-gradient(135deg, #111 0%, #1a1a1a 100%);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.prod-img img { width: 100%; height: 100%; object-fit: cover; }
.prod-img-empty {
  font-size: 13px; letter-spacing: 3px; text-transform: uppercase;
  opacity: 0.3;
}
.prod-meta {
  padding: 20px 24px 24px;
  display: flex; flex-direction: column; gap: 6px;
}
.prod-name {
  font-size: 16px; font-weight: 700; letter-spacing: 0.02em;
  text-transform: uppercase;
}
.prod-price {
  font-size: 15px; font-weight: 500;
  font-variant-numeric: tabular-nums;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.prod-oos { color: var(--fg-muted); font-size: 11px; letter-spacing: 2px; text-transform: uppercase; }

/* --- product detail --- */
.prod-detail {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: start;
}
.prod-detail .img-wrap {
  aspect-ratio: 1;
  background: #111;
  border: 1px solid var(--line);
  overflow: hidden;
  display: flex; align-items: center; justify-content: center;
}
.prod-detail .img-wrap img { width: 100%; height: 100%; object-fit: cover; }
.prod-detail .info h1 {
  font-size: clamp(28px, 4vw, 48px);
  font-weight: 900; line-height: 1; margin: 0 0 20px;
  letter-spacing: -0.02em; text-transform: uppercase;
}
.prod-detail .info .price {
  font-size: 24px; font-weight: 500;
  font-variant-numeric: tabular-nums; margin-bottom: 32px;
}
.qty {
  display: inline-flex; align-items: center; gap: 0;
  border: 1px solid var(--fg);
  margin-bottom: 24px;
}
.qty button { padding: 12px 18px; }
.qty input {
  width: 56px; text-align: center;
  font-variant-numeric: tabular-nums; font-weight: 600;
}
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 16px 32px;
  border: 1.5px solid var(--fg);
  color: var(--fg); background: transparent;
  font-size: 13px; font-weight: 700; letter-spacing: 3px;
  text-transform: uppercase;
  transition: all 160ms;
  cursor: pointer;
}
.btn:hover { background: var(--fg); color: var(--bg); }
.btn-primary { background: var(--fg); color: var(--bg); }
.btn-primary:hover { background: transparent; color: var(--fg); }
.btn[disabled] { opacity: 0.35; cursor: not-allowed; }
.btn[disabled]:hover { background: transparent; color: var(--fg); }
.btn-block { display: flex; width: 100%; }

/* --- cart --- */
.cart-list { display: flex; flex-direction: column; border-top: 1px solid var(--line); }
.cart-row {
  display: grid;
  grid-template-columns: 80px 1fr auto auto auto;
  gap: 24px; align-items: center;
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
}
.cart-img { width: 80px; height: 80px; background: #111; overflow: hidden; }
.cart-img img { width: 100%; height: 100%; object-fit: cover; }
.cart-name { font-weight: 700; text-transform: uppercase; letter-spacing: 0.02em; }
.cart-unit { color: var(--fg-muted); font-size: 13px; font-variant-numeric: tabular-nums; }
.cart-total { font-weight: 700; font-variant-numeric: tabular-nums; min-width: 80px; text-align: right; }
.cart-rm { font-size: 12px; opacity: 0.5; letter-spacing: 2px; text-transform: uppercase; }
.cart-rm:hover { opacity: 1; color: var(--danger); }
.cart-totals { margin-top: 24px; display: flex; flex-direction: column; gap: 8px; font-variant-numeric: tabular-nums; }
.cart-totals .row { display: flex; justify-content: space-between; }
.cart-totals .grand {
  font-size: 20px; font-weight: 800; padding-top: 12px;
  border-top: 1px solid var(--line); margin-top: 8px;
}
.cart-actions { margin-top: 40px; display: flex; gap: 16px; flex-wrap: wrap; }

/* --- forms --- */
.form { max-width: 480px; display: flex; flex-direction: column; gap: 20px; }
.form.wide { max-width: 720px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label {
  font-size: 11px; letter-spacing: 3px; text-transform: uppercase;
  color: var(--fg-muted); font-weight: 600;
}
.field input, .field select {
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  font-size: 16px;
  transition: border-color 120ms;
}
.field input:focus, .field select:focus { border-bottom-color: var(--fg); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }

.auth-tabs { display: flex; gap: 0; margin-bottom: 32px; border-bottom: 1px solid var(--line); }
.auth-tabs button {
  padding: 16px 0; margin-right: 32px;
  font-size: 13px; font-weight: 700; letter-spacing: 3px; text-transform: uppercase;
  opacity: 0.4; border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}
.auth-tabs button.on { opacity: 1; border-bottom-color: var(--fg); }

.notice {
  padding: 14px 16px;
  border: 1px solid var(--line);
  font-size: 13px; letter-spacing: 1px;
}
.notice.err { border-color: var(--danger); color: var(--danger); }
.notice.ok { border-color: var(--ok); color: var(--ok); }

/* --- account orders --- */
.orders { display: flex; flex-direction: column; gap: 16px; }
.order {
  border: 1px solid var(--line);
  padding: 20px 24px;
  display: flex; flex-direction: column; gap: 12px;
}
.order .row { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.order .oid { font-family: ui-monospace, monospace; font-size: 12px; opacity: 0.6; }
.order .stat {
  font-size: 11px; letter-spacing: 2px; text-transform: uppercase;
  padding: 4px 10px; border: 1px solid var(--line);
}
.order .stat.paid { border-color: var(--ok); color: var(--ok); }
.order .stat.pending, .order .stat.awaiting_payment { border-color: #f5a524; color: #f5a524; }
.order .stat.cancelled, .order .stat.failed, .order .stat.refunded { border-color: var(--danger); color: var(--danger); }

/* --- footer --- */
.ftr {
  padding: 32px 24px;
  border-top: 1px solid var(--line);
  color: var(--fg-muted);
  font-size: 12px; letter-spacing: 2px; text-transform: uppercase;
  display: flex; align-items: center; justify-content: center; gap: 12px;
}
.ftr-sep { opacity: 0.4; }

/* --- empty state --- */
.empty {
  padding: 96px 0;
  text-align: center;
  color: var(--fg-muted);
  font-size: 14px; letter-spacing: 2px; text-transform: uppercase;
}

/* --- spinner --- */
.spin {
  width: 24px; height: 24px;
  border: 2px solid var(--line);
  border-top-color: var(--fg);
  border-radius: 50%;
  animation: spin 700ms linear infinite;
  margin: 64px auto;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* --- breadcrumbs --- */
.crumb {
  font-size: 12px; letter-spacing: 2px; text-transform: uppercase;
  color: var(--fg-muted); margin-bottom: 24px;
}
.crumb a:hover { color: var(--fg); }

/* --- mobile --- */
@media (max-width: 720px) {
  .hdr { padding: 0 16px; }
  .brand-word { display: none; }
  .nav { gap: 18px; }
  .nav a { font-size: 11px; letter-spacing: 1.5px; }
  .section { padding: 32px 16px 64px; }
  .prod-detail { grid-template-columns: 1fr; gap: 32px; }
  .cart-row {
    grid-template-columns: 64px 1fr auto;
    gap: 16px;
  }
  .cart-img { width: 64px; height: 64px; }
  .cart-unit { display: none; }
  .field-row { grid-template-columns: 1fr; }
}
