@import url('https://fonts.googleapis.com/css2?family=Unbounded:wght@500;700;800&family=Inter:wght@400;500;600;700&display=swap');

:root {
  --ink: #1C1410;
  --paper: #FFF8F2;
  --paper-dim: #FBEFE4;
  --red: #E1272B;
  --red-dark: #B01E22;
  --red-tint: #FDE9E7;
  --ember: #FF6B3D;
  --stock-green: #2E7D5B;
  --line: #ECDFD3;
  --muted: #7A6D63;
  --radius: 14px;
  --shadow: 0 8px 24px rgba(28, 20, 16, 0.08);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: 'Inter', sans-serif;
  line-height: 1.5;
}

h1, h2, h3, .display {
  font-family: 'Unbounded', sans-serif;
  line-height: 1.15;
  margin: 0 0 0.4em;
}

a { color: inherit; text-decoration: none; }

img { max-width: 100%; display: block; }

.container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ── Header ── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}
.site-header .bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
}
.logo {
  font-family: 'Unbounded', sans-serif;
  font-weight: 800;
  font-size: 20px;
  letter-spacing: -0.01em;
}
.logo span { color: var(--red); }
.nav-links { display: flex; gap: 28px; align-items: center; }
.nav-links a { font-weight: 600; font-size: 14.5px; color: var(--ink); }
.nav-links a:hover { color: var(--red); }
.cart-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--red);
  color: #fff;
  padding: 8px 16px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 14px;
}

/* ── Hero ── */
.hero {
  padding: 64px 0 40px;
  border-bottom: 1px solid var(--line);
}
.hero .eyebrow {
  display: inline-block;
  background: var(--red-tint);
  color: var(--red-dark);
  font-weight: 700;
  font-size: 12.5px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 18px;
}
.hero h1 {
  font-size: clamp(34px, 5vw, 56px);
  max-width: 14ch;
}
.hero p { max-width: 46ch; color: var(--muted); font-size: 17px; }

/* ── Filters ── */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 28px 0 8px;
}
.filter-chip {
  border: 1px solid var(--line);
  background: #fff;
  padding: 8px 16px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 13.5px;
  cursor: pointer;
}
.filter-chip.active { background: var(--ink); color: #fff; border-color: var(--ink); }

/* ── Product grid ── */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 22px;
  padding: 24px 0 72px;
}
.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  position: relative;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.card .thumb {
  aspect-ratio: 1 / 1;
  background: var(--paper-dim);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.card .thumb img { width: 100%; height: 100%; object-fit: cover; }
.card .body { padding: 14px 16px 16px; }
.card .cat { font-size: 11.5px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; font-weight: 700; }
.card h3 { font-size: 16px; margin: 4px 0 6px; }
.card .price { font-weight: 700; color: var(--red); font-size: 16px; }

/* Stock dial — the signature element: a small ring gauge showing remaining
   stock at a glance, doubling as brand mark (red ring) and inventory info. */
.stock-dial {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10.5px;
  font-weight: 800;
}
.stock-dial svg { position: absolute; inset: 0; transform: rotate(-90deg); }
.stock-dial .n { position: relative; z-index: 1; }
.badge-preorder {
  position: absolute;
  top: 12px;
  left: 12px;
  background: var(--ember);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  padding: 5px 10px;
  border-radius: 999px;
}
.badge-outofstock {
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0.72);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  color: var(--ink);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 13px;
}

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: none;
  border-radius: 10px;
  padding: 13px 22px;
  font-weight: 700;
  font-size: 14.5px;
  cursor: pointer;
  font-family: inherit;
}
.btn-primary { background: var(--red); color: #fff; }
.btn-primary:hover { background: var(--red-dark); }
.btn-outline { background: transparent; border: 1.5px solid var(--ink); color: var(--ink); }
.btn-outline:hover { background: var(--ink); color: #fff; }
.btn-block { width: 100%; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* ── Forms ── */
.field { margin-bottom: 18px; }
.field label { display: block; font-weight: 700; font-size: 13.5px; margin-bottom: 6px; }
.field input, .field textarea, .field select {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  font-family: inherit;
  font-size: 14.5px;
  background: #fff;
  color: var(--ink);
}
.field input:focus, .field textarea:focus, .field select:focus {
  outline: none;
  border-color: var(--red);
}

/* ── Utility ── */
.section-title { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; }
.muted { color: var(--muted); }
.divider { height: 1px; background: var(--line); margin: 24px 0; }
.status-pill {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 700;
  background: var(--paper-dim);
  color: var(--ink);
}
.status-pill.paid, .status-pill.delivered { background: #E4F3EC; color: var(--stock-green); }
.status-pill.pending, .status-pill.received { background: var(--red-tint); color: var(--red-dark); }

.site-footer {
  border-top: 1px solid var(--line);
  padding: 40px 0;
  margin-top: 40px;
  color: var(--muted);
  font-size: 13.5px;
}

/* ── Admin ── */
.admin-shell { display: grid; grid-template-columns: 220px 1fr; min-height: 100vh; }
.admin-side {
  background: var(--ink);
  color: #fff;
  padding: 28px 20px;
}
.admin-side .logo { color: #fff; margin-bottom: 32px; }
.admin-side a {
  display: block;
  padding: 11px 12px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 14px;
  color: rgba(255,255,255,0.75);
  margin-bottom: 4px;
}
.admin-side a.active, .admin-side a:hover { background: rgba(255,255,255,0.1); color: #fff; }
.admin-main { padding: 32px 40px; }
table { width: 100%; border-collapse: collapse; background: #fff; border-radius: var(--radius); overflow: hidden; }
th, td { text-align: left; padding: 12px 16px; border-bottom: 1px solid var(--line); font-size: 14px; }
th { background: var(--paper-dim); font-weight: 700; font-size: 12.5px; text-transform: uppercase; letter-spacing: 0.03em; }
.auth-shell {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--paper);
}
.auth-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 40px;
  width: 100%;
  max-width: 380px;
  box-shadow: var(--shadow);
}

@media (max-width: 720px) {
  .admin-shell { grid-template-columns: 1fr; }
  .admin-side { display: flex; overflow-x: auto; gap: 4px; padding: 14px; }
  .admin-side .logo { display: none; }
  .nav-links { display: none; }
}
