/* =========================================
   Dice3D Forge — shared stylesheet
   3D-printed board games & organisers
   ========================================= */

:root {
  --ink: #14121f;          /* deep charcoal-violet (brand dark) */
  --ink-soft: #221f33;
  --ember: #e0533d;        /* molten filament orange-red (accent) */
  --ember-soft: #ef6a54;
  --brass: #d9a441;        /* warm metallic highlight */
  --light: #f7f6f3;        /* warm off-white */
  --panel: #ffffff;
  --text: #2b2833;
  --muted: #6f6a7d;
  --border: #ece9f0;
  --shadow-sm: 0 2px 8px rgba(20, 18, 31, 0.06);
  --shadow-md: 0 6px 24px rgba(20, 18, 31, 0.10);
  --shadow-lg: 0 12px 40px rgba(20, 18, 31, 0.20);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', sans-serif;
  color: var(--text);
  background: var(--panel);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: 'Space Grotesk', sans-serif;
  color: var(--ink);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.4px;
}

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

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

section { padding: 80px 20px; }

.container { max-width: 1100px; margin: auto; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  padding: 14px 30px;
  border-radius: 12px;
  font-weight: 600;
  margin: 6px;
  border: none;
  cursor: pointer;
  font-family: inherit;
  font-size: 15px;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.btn:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.btn-primary { background: var(--ember); color: #fff; }
.btn-primary:hover { background: var(--ember-soft); }
.btn-outline { border: 1.5px solid rgba(255,255,255,0.7); color: white; background: transparent; }
.btn-outline:hover { background: rgba(255,255,255,0.1); }
.btn-dark { background: var(--ink); color: white; }
.btn-dark:hover { background: var(--ink-soft); }
.btn-wa { background: #25D366; color: #08331b; }
.btn-wa:hover { background: #2ee574; }

/* ---------- Top Bar (hamburger) ---------- */
.topbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  background: rgba(255,255,255,0.0);
  transition: background 0.3s ease, box-shadow 0.3s ease;
}
.topbar.scrolled,
.topbar.solid {
  background: var(--panel);
  box-shadow: var(--shadow-sm);
}
.topbar.scrolled .hamburger span,
.topbar.solid .hamburger span { background: var(--ink); }
.topbar.scrolled .topbar-brand,
.topbar.solid .topbar-brand { color: var(--ink); }

.hamburger {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: transparent;
  border: none;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  transition: background 0.2s ease;
}
.hamburger:hover { background: rgba(255,255,255,0.12); }
.topbar.scrolled .hamburger:hover,
.topbar.solid .hamburger:hover { background: rgba(20,18,31,0.06); }
.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: white;
  border-radius: 2px;
  transition: all 0.3s ease;
}

.topbar-brand {
  font-family: 'Space Grotesk', sans-serif;
  color: white;
  font-size: 20px;
  font-weight: 600;
  letter-spacing: 0.3px;
  display: flex;
  align-items: center;
  gap: 9px;
}
.topbar-brand .cube { color: var(--ember); display: flex; }

/* ---------- Drawer ---------- */
.drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(20, 18, 31, 0.55);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  z-index: 200;
}
.drawer-overlay.open { opacity: 1; pointer-events: auto; }

.drawer {
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  width: 320px;
  max-width: 85vw;
  background: var(--ink);
  color: white;
  z-index: 201;
  transform: translateX(-100%);
  transition: transform 0.35s cubic-bezier(0.22, 0.61, 0.36, 1);
  display: flex;
  flex-direction: column;
  padding: 30px 28px;
  box-shadow: var(--shadow-lg);
}
.drawer.open { transform: translateX(0); }

.drawer-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 40px;
}
.drawer-logo {
  display: flex;
  align-items: center;
  gap: 12px;
}
.drawer-logo .cube { color: var(--ember); display: flex; }
.drawer-logo span {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 18px;
  letter-spacing: 0.3px;
  font-weight: 600;
}
.drawer-close {
  background: none;
  border: none;
  color: white;
  font-size: 28px;
  cursor: pointer;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease;
}
.drawer-close:hover { background: rgba(255,255,255,0.1); }

.drawer-nav { display: flex; flex-direction: column; gap: 4px; }
.drawer-nav a {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 14px;
  border-radius: 10px;
  font-size: 16px;
  color: rgba(255,255,255,0.9);
  transition: background 0.2s ease, color 0.2s ease, padding-left 0.2s ease;
  position: relative;
}
.drawer-nav a:hover {
  background: rgba(255,255,255,0.06);
  color: var(--ember-soft);
  padding-left: 18px;
}
.drawer-nav a.active {
  background: rgba(224, 83, 61, 0.14);
  color: var(--ember-soft);
}
.drawer-nav .nav-icon {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  opacity: 0.85;
}

.drawer-footer {
  margin-top: auto;
  padding-top: 30px;
  border-top: 1px solid rgba(255,255,255,0.1);
  font-size: 13px;
  color: rgba(255,255,255,0.6);
  line-height: 1.7;
}
.drawer-footer a { color: var(--ember-soft); }

/* ---------- Page hero (for non-home pages) ---------- */
.page-hero {
  background: linear-gradient(135deg, var(--ink) 0%, var(--ink-soft) 100%);
  color: white;
  text-align: center;
  padding: 160px 20px 100px;
  position: relative;
  overflow: hidden;
}
.page-hero h1 {
  color: white;
  font-size: 44px;
  margin-bottom: 14px;
}
.page-hero p {
  font-size: 18px;
  opacity: 0.9;
  max-width: 700px;
  margin: auto;
}
.page-hero .accent {
  display: inline-block;
  width: 50px;
  height: 3px;
  background: var(--ember);
  margin-bottom: 20px;
  border-radius: 2px;
}

/* ---------- Footer ---------- */
.site-footer {
  background: #0d0b16;
  color: rgba(255,255,255,0.7);
  padding: 50px 20px 30px;
  text-align: center;
}
.site-footer .container { display: flex; flex-direction: column; gap: 20px; }
.site-footer a { color: var(--ember-soft); }
.site-footer .copy { font-size: 13px; opacity: 0.7; padding-top: 20px; border-top: 1px solid rgba(255,255,255,0.08); }

/* ---------- WhatsApp floating ---------- */
.whatsapp-fab {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: #25D366;
  color: white;
  padding: 14px 22px;
  border-radius: 50px;
  font-weight: 600;
  box-shadow: 0 4px 14px rgba(0,0,0,0.25);
  z-index: 50;
  transition: transform 0.2s ease;
}
.whatsapp-fab:hover { transform: translateY(-2px); }

/* ---------- Shared status badges ---------- */
.badge-instock     { background: rgba(34, 197, 94, 0.95); color: white; }
.badge-madetoorder { background: rgba(217, 164, 65, 0.95); color: #111; }
.badge-soldout     { background: rgba(107, 114, 128, 0.95); color: white; }

/* ---------- Reviews: stars ---------- */
/* Fixed-width star row. The filled layer is clipped by width % so half-stars
   render correctly for averages like 4.6. */
.stars {
  position: relative;
  display: inline-block;
  white-space: nowrap;
  line-height: 1;
  font-size: 15px;
  letter-spacing: 2px;
  color: #d8d3e0;              /* empty state */
  font-family: 'Inter', sans-serif;
}
.stars .fill {
  position: absolute;
  top: 0; left: 0;
  overflow: hidden;
  color: var(--brass);
  white-space: nowrap;
}
.stars.lg { font-size: 26px; }
.stars.sm { font-size: 12px; letter-spacing: 1px; }

/* Rating chip used on shop product cards */
.rating-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 10px;
}
.rating-chip .score { font-weight: 700; color: var(--ink); }

/* ---------- Reviews: card ---------- */
.review-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 12px;
  break-inside: avoid;
}
.review-card .rc-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.review-card .who { font-family: 'Space Grotesk', sans-serif; font-weight: 600; color: var(--ink); font-size: 16px; }
.review-card .where { font-size: 13px; color: var(--muted); }
.review-card .rc-text {
  color: var(--text);
  font-size: 15px;
  line-height: 1.7;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.review-card .rc-foot {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding-top: 4px; font-size: 12px; color: var(--muted);
}
.review-card .rc-product {
  display: inline-block;
  background: rgba(20,18,31,0.05);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 4px 12px;
  font-size: 12px; font-weight: 600; color: var(--ink);
}
.verified-badge {
  display: inline-flex; align-items: center; gap: 5px;
  background: rgba(34,197,94,0.12);
  color: #15803d;
  border-radius: 20px;
  padding: 4px 11px;
  font-size: 11px; font-weight: 700;
  letter-spacing: 0.3px; text-transform: uppercase;
}

/* Review photo strip inside a card */
.rc-photos { display: flex; gap: 8px; flex-wrap: wrap; }
.rc-photos .shot {
  width: 74px; height: 74px; border-radius: 10px; overflow: hidden;
  border: 1px solid var(--border); cursor: zoom-in; background: var(--light);
  transition: transform 0.2s ease;
}
.rc-photos .shot:hover { transform: scale(1.05); }
.rc-photos .shot img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- Lightbox (review photos) ---------- */
.lightbox {
  position: fixed; inset: 0; z-index: 400;
  background: rgba(13,11,22,0.92);
  display: flex; align-items: center; justify-content: center;
  padding: 30px;
  opacity: 0; pointer-events: none; transition: opacity 0.25s ease;
}
.lightbox.open { opacity: 1; pointer-events: auto; }
.lightbox img { max-width: 100%; max-height: 88vh; border-radius: 12px; object-fit: contain; }
.lightbox .lb-close {
  position: absolute; top: 20px; right: 22px;
  width: 42px; height: 42px; border-radius: 50%; border: none; cursor: pointer;
  background: rgba(255,255,255,0.14); color: #fff; font-size: 24px;
  display: flex; align-items: center; justify-content: center;
}
.lightbox .lb-close:hover { background: rgba(255,255,255,0.28); }
.lightbox .lb-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 46px; height: 46px; border-radius: 50%; border: none; cursor: pointer;
  background: rgba(255,255,255,0.14); color: #fff;
  display: flex; align-items: center; justify-content: center;
}
.lightbox .lb-nav:hover { background: rgba(255,255,255,0.28); }
.lightbox .lb-nav.prev { left: 18px; }
.lightbox .lb-nav.next { right: 18px; }
.lightbox .lb-nav[hidden] { display: none; }

/* ---------- Responsive ---------- */
@media (max-width: 600px) {
  section { padding: 60px 18px; }
  .page-hero { padding: 130px 18px 70px; }
  .page-hero h1 { font-size: 34px; }
  .review-card { padding: 20px; }
}
