:root {
  --bg: #EDE6D6;
  --surface: #F7F1E4;
  --ink: #2B1B14;
  --primary: #8C2F1B;
  --primary-dark: #6E2313;
  --accent: #C97A1A;
  --line: #B8A888;
  --max: 960px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: 'Work Sans', system-ui, sans-serif;
  line-height: 1.5;
}

h1, h2, .brandmark {
  font-family: 'Fraunces', serif;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 24px;
}

/* Header */
.site-header {
  border-bottom: 3px solid var(--ink);
  background: var(--bg);
  position: sticky;
  top: 0;
  z-index: 10;
}
.header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 18px;
  padding-bottom: 18px;
}
.brandmark {
  font-size: 1.4rem;
}
.cart-toggle {
  font-family: 'Work Sans', sans-serif;
  font-weight: 600;
  background: var(--ink);
  color: var(--bg);
  border: none;
  padding: 10px 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
}
.cart-toggle:hover { background: var(--primary); }
.cart-toggle.bump { animation: cart-bump 0.4s ease; }
@keyframes cart-bump {
  0% { transform: scale(1); }
  30% { transform: scale(1.15); background: var(--accent); }
  100% { transform: scale(1); }
}
.cart-count {
  background: var(--accent);
  color: var(--ink);
  border-radius: 999px;
  min-width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  padding: 0 6px;
}

/* Hero */
.hero {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 40px;
  align-items: center;
  padding: 64px 24px 56px;
}
.kicker {
  font-weight: 600;
  color: var(--primary);
  margin: 0 0 12px;
}
.hero-text h1 {
  font-size: clamp(2.2rem, 4vw, 3.2rem);
  line-height: 1.08;
  margin: 0 0 20px;
}
.hero-copy {
  font-size: 1.1rem;
  max-width: 46ch;
  margin: 0 0 28px;
}
.hero-art { max-width: 260px; margin: 0 auto; }

.btn {
  display: inline-block;
  font-family: 'Work Sans', sans-serif;
  font-weight: 600;
  padding: 14px 26px;
  border: 2px solid var(--ink);
  text-decoration: none;
  cursor: pointer;
  background: transparent;
  color: var(--ink);
  font-size: 1rem;
}
.btn-primary {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--surface);
}
.btn-primary:hover { background: var(--primary-dark); border-color: var(--primary-dark); }
.btn-block { width: 100%; text-align: center; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* Flavours */
.flavours { padding: 40px 24px 56px; border-top: 3px solid var(--ink); }
.flavours h2, .how h2 { font-size: 1.8rem; margin: 0 0 6px; }
.section-lede { margin: 0 0 32px; color: var(--primary-dark); }

.flavour-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px;
}
.flavour-card {
  background: var(--surface);
  border: 2px solid var(--ink);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.flavour-card.just-added {
  animation: card-flash 0.5s ease;
}
@keyframes card-flash {
  0% { border-color: var(--ink); box-shadow: none; }
  30% { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent); }
  100% { border-color: var(--ink); box-shadow: none; }
}
.flavour-name { font-family: 'Fraunces', serif; font-weight: 600; font-size: 1.2rem; margin: 0; }
.flavour-desc { margin: 0; font-size: 0.92rem; color: #4a372c; min-height: 2.6em; }
.flavour-price { font-weight: 600; margin: 0; }
.qty-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 2px solid var(--ink);
  margin-top: auto;
}
.qty-row button {
  background: none;
  border: none;
  width: 40px;
  height: 40px;
  font-size: 1.2rem;
  cursor: pointer;
  color: var(--ink);
}
.qty-row button:hover { background: var(--accent); }
.qty-row .qty-value { font-weight: 600; }
.qty-row .qty-value.has-qty { color: var(--primary); font-size: 1.15rem; }
.qty-row:has(.qty-value.has-qty) { border-color: var(--primary); }

/* How it works */
.how { padding: 40px 24px 64px; border-top: 3px solid var(--ink); }
.how-list { list-style: none; padding: 0; margin: 20px 0 0; display: grid; gap: 16px; }
.how-list li { display: flex; gap: 14px; align-items: flex-start; font-size: 1.02rem; }
.how-step {
  flex-shrink: 0;
  width: 30px; height: 30px;
  background: var(--ink);
  color: var(--bg);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 600; font-size: 0.9rem;
}

/* Cart panel */
.cart-panel {
  position: fixed;
  top: 0; right: 0;
  width: min(380px, 100vw);
  height: 100vh;
  background: var(--surface);
  border-left: 3px solid var(--ink);
  transform: translateX(100%);
  transition: transform 0.25s ease;
  z-index: 30;
  overflow-y: auto;
}
.cart-panel.open { transform: translateX(0); }
.cart-scrim {
  position: fixed; inset: 0;
  background: rgba(43,27,20,0.4);
  z-index: 20;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}
.cart-scrim.open { opacity: 1; pointer-events: auto; }

.cart-panel-inner { padding: 24px; display: flex; flex-direction: column; height: 100%; }
.cart-header { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 16px; }
.cart-header h2 { margin: 0; font-size: 1.3rem; }
.cart-close { background: none; border: none; font-family: 'Work Sans'; font-weight: 600; cursor: pointer; text-decoration: underline; }
.cart-items { flex: 1; margin-bottom: 16px; }
.cart-empty { color: #7a6a5a; }
.cart-item-row { display: flex; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 0.95rem; }
.cart-summary { border-top: 2px solid var(--ink); padding-top: 12px; margin-bottom: 16px; }
.cart-line { display: flex; justify-content: space-between; padding: 4px 0; }
.cart-total { font-weight: 700; font-size: 1.1rem; border-top: 1px solid var(--line); margin-top: 6px; padding-top: 8px; }
.cart-note { color: var(--primary); font-size: 0.9rem; min-height: 1.2em; margin: 10px 0 0; }

/* Footer */
.site-footer { padding: 32px 24px 48px; border-top: 3px solid var(--ink); font-size: 0.9rem; color: #5a463a; }
.site-footer a { color: var(--primary); }

@media (max-width: 720px) {
  .hero { grid-template-columns: 1fr; padding-top: 40px; }
  .hero-art { max-width: 180px; }
}
