/* ============================================================
   Zebra Roasters — Styles
   ============================================================ */
:root {
  --black: #0a0a0a;
  --white: #fafaf9;
  --warm:  #b8860b;       /* dark goldenrod / amber */
  --warm-light: #d4a84b;
  --warm-bg: #f5f0e8;
  --gray-100: #f5f5f4;
  --gray-200: #e7e5e4;
  --gray-400: #a8a29e;
  --gray-600: #57534e;
  --gray-800: #292524;
  --radius: 8px;
  --shadow: 0 4px 24px rgba(0,0,0,.08);
  --transition: .25s ease;
}

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

html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--white);
  color: var(--black);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { cursor: pointer; font-family: inherit; }

/* ---- Typography ---- */
.font-display {
  font-family: 'Playfair Display', Georgia, serif;
}

/* ---- Container ---- */
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

/* ============================================================
   NAV
   ============================================================ */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: rgba(10,10,10,.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255,255,255,.06);
}
nav .container {
  display: flex; align-items: center; justify-content: space-between;
  height: 64px;
}
.nav-logo {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.25rem; font-weight: 700; color: var(--white);
  letter-spacing: 3px; text-transform: uppercase;
}
.nav-links { display: flex; gap: 28px; align-items: center; }
.nav-links a {
  color: var(--gray-400); font-size: .85rem; letter-spacing: 1px;
  text-transform: uppercase; transition: color var(--transition);
}
.nav-links a:hover { color: var(--white); }

/* Cart icon */
.cart-btn {
  position: relative; background: none; border: none;
  color: var(--white); font-size: 1.25rem; padding: 8px;
}
.cart-badge {
  position: absolute; top: 0; right: 0;
  background: var(--warm); color: var(--white);
  font-size: .65rem; font-weight: 700;
  width: 18px; height: 18px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; transform: scale(.5);
  transition: all var(--transition);
}
.cart-badge.visible { opacity: 1; transform: scale(1); }

/* ============================================================
   HERO
   ============================================================ */
.hero {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  text-align: center; position: relative; overflow: hidden;
  background: linear-gradient(160deg, #0a0a0a 0%, #1a1614 50%, #0a0a0a 100%);
  padding-top: 64px;
}
.hero::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(ellipse at 50% 40%, rgba(184,134,11,.12) 0%, transparent 70%);
}
.hero-content { position: relative; z-index: 1; }
.hero h1 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(3rem, 8vw, 6rem);
  font-weight: 700; color: var(--white);
  letter-spacing: 8px; text-transform: uppercase;
  line-height: 1.1; margin-bottom: 20px;
}
.hero h1 span { color: var(--warm); }
.hero-tagline {
  font-size: clamp(1rem, 2.5vw, 1.25rem);
  color: var(--gray-400); letter-spacing: 3px;
  text-transform: uppercase; margin-bottom: 40px;
}
.hero-cta {
  display: inline-block; padding: 16px 48px;
  background: var(--warm); color: var(--white);
  font-size: .9rem; font-weight: 600; letter-spacing: 2px;
  text-transform: uppercase; border: none; border-radius: var(--radius);
  transition: all var(--transition);
}
.hero-cta:hover { background: var(--warm-light); transform: translateY(-2px); }

/* ============================================================
   PRODUCTS
   ============================================================ */
.products-section {
  padding: 120px 0;
  background: var(--white);
}
.section-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 2.5rem; font-weight: 700; text-align: center;
  margin-bottom: 12px;
}
.section-subtitle {
  text-align: center; color: var(--gray-600);
  font-size: 1rem; margin-bottom: 64px; letter-spacing: 1px;
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 32px;
}

.product-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: 12px;
  overflow: hidden;
  transition: all var(--transition);
}
.product-card:hover {
  box-shadow: var(--shadow);
  transform: translateY(-4px);
  border-color: var(--warm);
}

.product-img {
  height: 260px;
  display: flex; align-items: center; justify-content: center;
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 2rem; color: rgba(255,255,255,.6);
  letter-spacing: 4px; text-transform: uppercase;
}

/* Unique warm gradient per card */
.product-card:nth-child(1) .product-img { background: linear-gradient(135deg, #3e2723, #5d4037); }
.product-card:nth-child(2) .product-img { background: linear-gradient(135deg, #33291a, #6d4c21); }
.product-card:nth-child(3) .product-img { background: linear-gradient(135deg, #1b3a2a, #4e6b52); }
.product-card:nth-child(4) .product-img { background: linear-gradient(135deg, #1a1a2e, #4a3f6b); }
.product-card:nth-child(5) .product-img { background: linear-gradient(135deg, #2c1810, #8b6914); }

.product-body { padding: 24px; }
.product-origin {
  font-size: .75rem; text-transform: uppercase; letter-spacing: 2px;
  color: var(--warm); font-weight: 600; margin-bottom: 8px;
}
.product-name {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.25rem; font-weight: 700; margin-bottom: 6px;
  line-height: 1.3;
}
.product-meta {
  font-size: .85rem; color: var(--gray-600); margin-bottom: 16px;
}
.product-footer {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; flex-wrap: wrap;
}
.product-price {
  font-size: 1.5rem; font-weight: 700; color: var(--black);
}

/* Qty + Add */
.product-actions { display: flex; align-items: center; gap: 8px; }
.qty-control {
  display: flex; align-items: center; border: 1px solid var(--gray-200); border-radius: 6px; overflow: hidden;
}
.qty-control button {
  width: 32px; height: 36px; border: none; background: var(--gray-100);
  font-size: 1rem; color: var(--gray-800); transition: background var(--transition);
}
.qty-control button:hover { background: var(--gray-200); }
.qty-control input {
  width: 38px; height: 36px; border: none; text-align: center;
  font-size: .9rem; font-weight: 600; font-family: inherit;
  -moz-appearance: textfield;
}
.qty-control input::-webkit-inner-spin-button { -webkit-appearance: none; }

.add-btn {
  padding: 10px 20px; background: var(--black); color: var(--white);
  border: none; border-radius: 6px; font-size: .8rem; font-weight: 600;
  letter-spacing: 1px; text-transform: uppercase;
  transition: all var(--transition);
}
.add-btn:hover { background: var(--warm); }

/* ============================================================
   ABOUT
   ============================================================ */
.about-section {
  padding: 100px 0;
  background: var(--gray-100);
  text-align: center;
}
.about-section .section-title { margin-bottom: 24px; }
.about-text {
  max-width: 640px; margin: 0 auto;
  color: var(--gray-600); font-size: 1.05rem; line-height: 1.8;
}

/* ============================================================
   FOOTER
   ============================================================ */
footer {
  background: var(--black); color: var(--gray-400);
  text-align: center; padding: 48px 24px;
  font-size: .85rem; letter-spacing: 1px;
}
footer span { color: var(--warm); }

/* ============================================================
   CART DRAWER
   ============================================================ */
.cart-overlay {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(0,0,0,.5); opacity: 0; pointer-events: none;
  transition: opacity var(--transition);
}
.cart-overlay.open { opacity: 1; pointer-events: auto; }

.cart-drawer {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 201;
  width: 420px; max-width: 90vw;
  background: var(--white);
  box-shadow: -8px 0 40px rgba(0,0,0,.15);
  display: flex; flex-direction: column;
  transform: translateX(100%);
  transition: transform .35s cubic-bezier(.4,0,.2,1);
}
.cart-drawer.open { transform: translateX(0); }

.cart-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 24px; border-bottom: 1px solid var(--gray-200);
}
.cart-header h2 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.3rem; font-weight: 700;
}
.cart-close {
  background: none; border: none; font-size: 1.5rem; color: var(--gray-600);
  padding: 4px 8px; transition: color var(--transition);
}
.cart-close:hover { color: var(--black); }

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

.cart-item {
  display: flex; gap: 16px; padding: 16px 0;
  border-bottom: 1px solid var(--gray-200);
}
.cart-item-color {
  width: 56px; height: 56px; border-radius: 8px; flex-shrink: 0;
}
.cart-item-info { flex: 1; }
.cart-item-name { font-weight: 600; font-size: .9rem; margin-bottom: 4px; }
.cart-item-price { font-size: .85rem; color: var(--gray-600); }
.cart-item-qty {
  display: flex; align-items: center; gap: 6px; margin-top: 8px;
}
.cart-item-qty button {
  width: 26px; height: 26px; border: 1px solid var(--gray-200);
  border-radius: 4px; background: var(--white); font-size: .85rem;
  transition: all var(--transition);
}
.cart-item-qty button:hover { background: var(--gray-100); }
.cart-item-qty span { font-size: .85rem; font-weight: 600; min-width: 20px; text-align: center; }
.cart-item-remove {
  background: none; border: none; color: var(--gray-400);
  font-size: .75rem; margin-top: 4px; transition: color var(--transition);
}
.cart-item-remove:hover { color: #dc2626; }

.cart-empty {
  text-align: center; color: var(--gray-400);
  padding: 60px 0; font-size: .95rem;
}

.cart-footer {
  padding: 20px 24px; border-top: 1px solid var(--gray-200);
}
.cart-total {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 16px;
}
.cart-total-label { font-size: .9rem; color: var(--gray-600); text-transform: uppercase; letter-spacing: 1px; }
.cart-total-amount { font-size: 1.4rem; font-weight: 700; }

.checkout-btn {
  width: 100%; padding: 16px; background: var(--warm); color: var(--white);
  border: none; border-radius: var(--radius);
  font-size: .9rem; font-weight: 700; letter-spacing: 2px; text-transform: uppercase;
  transition: all var(--transition);
}
.checkout-btn:hover { background: var(--warm-light); }
.checkout-btn:disabled { opacity: .5; cursor: not-allowed; }

/* Toast */
.toast {
  position: fixed; bottom: 32px; left: 50%; transform: translateX(-50%) translateY(80px);
  background: var(--black); color: var(--white);
  padding: 14px 28px; border-radius: var(--radius);
  font-size: .9rem; font-weight: 500; z-index: 300;
  opacity: 0; transition: all .4s cubic-bezier(.4,0,.2,1);
  pointer-events: none;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 768px) {
  .nav-links a:not(.cart-btn-wrap) { display: none; }
  .products-grid { grid-template-columns: 1fr; gap: 24px; }
  .product-footer { flex-direction: column; align-items: flex-start; }
  .hero h1 { letter-spacing: 4px; }
}
@media (max-width: 480px) {
  .product-body { padding: 16px; }
  .cart-drawer { width: 100vw; max-width: 100vw; }
}

/* ============================================================
   SUCCESS PAGE
   ============================================================ */
.success-page {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(160deg, #0a0a0a 0%, #1a1614 50%, #0a0a0a 100%);
  text-align: center; padding: 24px;
}
.success-card {
  background: var(--white); border-radius: 16px; padding: 60px 48px;
  max-width: 520px; width: 100%; box-shadow: 0 20px 60px rgba(0,0,0,.3);
}
.success-icon { font-size: 4rem; margin-bottom: 16px; }
.success-card h1 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 2rem; margin-bottom: 12px;
}
.success-card p { color: var(--gray-600); margin-bottom: 24px; line-height: 1.7; }
.success-card a {
  display: inline-block; padding: 14px 40px;
  background: var(--black); color: var(--white);
  border-radius: var(--radius); font-weight: 600;
  font-size: .85rem; letter-spacing: 1px; text-transform: uppercase;
  transition: all var(--transition);
}
.success-card a:hover { background: var(--warm); }
