:root {
  --cream: #fff8f1;
  --cream-2: #f9f3eb;
  --cream-3: #f4ede5;
  --blush: #ffe9ee;
  --cocoa-900: #240a04;
  --cocoa-800: #3d1e16;
  --cocoa-600: #623d34;
  --cocoa-400: #b18377;
  --text: #1e1b17;
  --muted: #6b5a55;
  --berry: #c2185b;
  --berry-600: #a3134c;
  --berry-soft: #ffd9e0;
  --gold: #f59e0b;
  --gold-soft: #fef3c7;
  --green: #1faa59;
  --radius-sm: 12px;
  --radius: 20px;
  --radius-lg: 32px;
  --shadow-sm: 0 2px 10px rgba(61, 30, 22, .06);
  --shadow: 0 12px 32px rgba(61, 30, 22, .10);
  --shadow-lg: 0 24px 60px rgba(61, 30, 22, .18);
  --font-display: "Epilogue", system-ui, sans-serif;
  --font-body: "Plus Jakarta Sans", system-ui, sans-serif;
  --ease: cubic-bezier(.22, 1, .36, 1);
  --sat: env(safe-area-inset-top, 0px);
  --sab: env(safe-area-inset-bottom, 0px);
  --sal: env(safe-area-inset-left, 0px);
  --sar: env(safe-area-inset-right, 0px);
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--text);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
  padding-bottom: calc(var(--sab) + 70px); /* Leave room for mobile bottom tabbar */
}
img { max-width: 100%; display: block; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
h1, h2, h3 { font-family: var(--font-display); color: var(--cocoa-900); margin: 0; }
.container { width: min(1240px, 100% - 2rem); margin-inline: auto; padding-inline: max(0px, var(--sal)) max(0px, var(--sar)); }

/* Top bar & header */
.topbar {
  background: var(--cocoa-800);
  color: var(--berry-soft);
  text-align: center;
  font-size: 13px;
  font-weight: 600;
  padding: calc(8px + var(--sat)) 12px 8px;
  line-height: 1.4;
}
.topbar span { color: #ff7aa8; }

.header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(255, 248, 241, .92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  transition: box-shadow .3s var(--ease);
}
.header.is-scrolled { box-shadow: var(--shadow-sm); }
.header__inner { display: flex; align-items: center; gap: 1.25rem; height: 80px; }

.brand { display: flex; align-items: center; gap: .65rem; text-decoration: none; flex-shrink: 0; }
.brand__logo { width: 54px; height: 54px; object-fit: contain; transition: transform .4s var(--ease); }
.brand:hover .brand__logo { transform: rotate(-6deg) scale(1.06); }
.brand__text { display: flex; flex-direction: column; line-height: 1.15; }
.brand__text strong { font-family: var(--font-display); font-size: 19px; color: var(--berry); letter-spacing: -.01em; }
.brand__text small { font-size: 12px; color: var(--muted); }

/* Desktop Navigation Tabs */
.nav-tabs {
  display: flex;
  align-items: center;
  gap: .4rem;
  background: var(--cream-3);
  padding: 4px;
  border-radius: 999px;
  margin-left: .5rem;
}
.nav-tab {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  border: 0;
  background: transparent;
  color: var(--cocoa-800);
  font-weight: 700;
  font-size: 14px;
  padding: .55rem 1.1rem;
  border-radius: 999px;
  transition: all .2s var(--ease);
  position: relative;
  min-height: 40px;
}
.nav-tab:hover { background: rgba(255, 255, 255, .7); }
.nav-tab.is-active {
  background: var(--cocoa-800);
  color: #fff;
  box-shadow: 0 4px 12px rgba(61, 30, 22, .2);
}
.nav-tab__icon { font-size: 16px; }
.nav-tab__badge {
  background: var(--berry);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 999px;
  letter-spacing: .02em;
  animation: pulse-badge 2s infinite;
}
@keyframes pulse-badge {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.08); }
}

.search {
  flex: 1;
  max-width: 380px;
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: .5rem;
  height: 46px;
  padding: 0 1rem;
  background: #fff;
  border: 1px solid #eadfd6;
  border-radius: 999px;
  transition: border-color .2s, box-shadow .2s;
}
.search:focus-within { border-color: var(--berry); box-shadow: 0 0 0 4px rgba(194, 24, 91, .12); }
.search svg { width: 20px; fill: var(--cocoa-400); flex: none; }
.search input { border: 0; outline: 0; background: transparent; width: 100%; font-size: 14px; }

.cart-btn {
  display: flex;
  align-items: center;
  gap: .5rem;
  border: 0;
  background: var(--berry);
  color: #fff;
  font-weight: 700;
  padding: .7rem 1.15rem;
  border-radius: 999px;
  box-shadow: 0 8px 20px rgba(194, 24, 91, .28);
  transition: transform .2s var(--ease), background .2s;
  min-height: 44px;
}
.cart-btn:hover { background: var(--berry-600); transform: translateY(-2px); }
.cart-btn svg { width: 20px; fill: currentColor; }
.cart-btn__count {
  background: #fff;
  color: var(--berry);
  min-width: 22px;
  height: 22px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  font-size: 12px;
}
.cart-btn.bump { animation: bump .45s var(--ease); }
@keyframes bump { 40% { transform: scale(1.12); } }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  border: 0;
  border-radius: 999px;
  padding: .95rem 1.6rem;
  font-weight: 700;
  font-size: 15px;
  text-decoration: none;
  min-height: 48px;
  transition: transform .2s var(--ease), box-shadow .2s, background .2s;
}
.btn--primary { background: var(--berry); color: #fff; box-shadow: 0 10px 24px rgba(194, 24, 91, .3); }
.btn--primary:hover { background: var(--berry-600); transform: translateY(-2px); }
.btn--secondary { background: var(--cocoa-800); color: #fff; box-shadow: 0 10px 24px rgba(61, 30, 22, .24); }
.btn--secondary:hover { background: var(--cocoa-900); transform: translateY(-2px); }
.btn--ghost { background: transparent; color: var(--cocoa-900); border: 1.5px solid var(--cocoa-900); }
.btn--ghost:hover { background: var(--cocoa-900); color: #fff; }
.btn--whatsapp { width: 100%; background: var(--green); color: #fff; box-shadow: 0 10px 24px rgba(31, 170, 89, .3); }
.btn--whatsapp:hover { transform: translateY(-2px); filter: brightness(1.05); }
.btn--whatsapp svg { width: 22px; fill: currentColor; }
.btn:disabled { opacity: .5; pointer-events: none; }

/* Panels */
.view-panel { display: none; }
.view-panel.is-active { display: block; animation: panel-fade .35s var(--ease); }
@keyframes panel-fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }

/* Hero Section */
.hero {
  position: relative;
  background:
    radial-gradient(60% 80% at 85% 30%, #f6d9c8 0%, transparent 60%),
    radial-gradient(40% 50% at 10% 90%, var(--blush) 0%, transparent 70%),
    var(--cream);
  padding: 3rem 0 4.5rem;
  overflow: hidden;
}
.hero__inner { display: grid; grid-template-columns: 1.05fr 1fr; gap: 2rem; align-items: center; }
.eyebrow {
  display: inline-block;
  background: var(--berry-soft);
  color: var(--berry-600);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: .45rem .9rem;
  border-radius: 999px;
  margin-bottom: 1.25rem;
}
.hero h1 { font-size: clamp(2.3rem, 5vw, 4.2rem); line-height: 1.05; letter-spacing: -.035em; font-weight: 800; }
.hero h1 em { font-style: normal; color: var(--berry); position: relative; white-space: nowrap; }
.hero h1 em::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: .02em;
  height: .14em;
  background: var(--berry-soft);
  z-index: -1;
  border-radius: 99px;
}
.hero p { font-size: 17px; line-height: 1.6; color: var(--muted); max-width: 34rem; margin: 1.25rem 0 2rem; }
.hero__actions { display: flex; flex-wrap: wrap; gap: .75rem; }
.hero__trust { list-style: none; padding: 0; margin: 2.5rem 0 0; display: flex; flex-wrap: wrap; gap: 1.75rem; color: var(--muted); font-size: 14px; }
.hero__trust strong { display: block; font-family: var(--font-display); font-size: 26px; color: var(--cocoa-900); }

.hero__art { position: relative; height: 440px; }
.hero__blob {
  position: absolute;
  inset: 8% 6%;
  background: linear-gradient(145deg, var(--cocoa-800), var(--cocoa-900));
  border-radius: 46% 54% 40% 60% / 55% 45% 55% 45%;
  box-shadow: var(--shadow-lg);
  animation: morph 14s ease-in-out infinite;
}
@keyframes morph {
  50% { border-radius: 58% 42% 55% 45% / 42% 58% 42% 58%; }
}
.float { position: absolute; filter: drop-shadow(0 18px 24px rgba(0, 0, 0, .35)); animation: float 6s ease-in-out infinite; }
.float--a { width: 30%; left: 18%; top: 6%; transform: rotate(-10deg); }
.float--d { width: 28%; right: 16%; top: 12%; transform: rotate(9deg); animation-delay: -2s; }
.float--b { width: 46%; left: 4%; bottom: 10%; animation-delay: -1s; }
.float--c { width: 44%; right: 2%; bottom: 18%; animation-delay: -3s; }
@keyframes float { 50% { translate: 0 -14px; } }
.hero__wave { position: absolute; bottom: -1px; left: 0; width: 100%; height: 60px; fill: var(--cocoa-800); }

/* Catalog Section */
.catalog { padding: 4.5rem 0 5rem; }
.section-head { text-align: center; margin-bottom: 2rem; }
.section-head h2 { font-size: clamp(1.8rem, 3.5vw, 2.6rem); letter-spacing: -.02em; }
.section-head p { color: var(--muted); margin: .6rem 0 0; }
.underline { background: linear-gradient(transparent 70%, var(--berry-soft) 70%); }

.filters { display: flex; gap: .5rem; overflow-x: auto; padding: .25rem .25rem 1rem; margin-bottom: 1.5rem; -webkit-overflow-scrolling: touch; scrollbar-width: none; justify-content: center; flex-wrap: wrap; }
.filters::-webkit-scrollbar { display: none; }
.pill {
  white-space: nowrap;
  border: 1px solid #eadfd6;
  background: #fff;
  color: var(--cocoa-800);
  font-weight: 600;
  font-size: 14px;
  padding: .65rem 1.15rem;
  border-radius: 999px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  transition: all .2s var(--ease);
}
.pill:hover { border-color: var(--cocoa-400); transform: translateY(-1px); }
.pill.is-active { background: var(--cocoa-800); border-color: var(--cocoa-800); color: #fff; box-shadow: var(--shadow-sm); }

/* Product Cards Grid */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 1.25rem; }
.card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: transform .35s var(--ease), box-shadow .35s var(--ease);
  animation: rise .5s var(--ease) both;
}
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow); }
@keyframes rise { from { opacity: 0; transform: translateY(16px); } }

.card__media {
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  background: radial-gradient(75% 75% at 50% 45%, #ffffff 0%, var(--cream-3) 100%);
  position: relative;
  overflow: hidden;
}
.card__media img {
  width: 100%;
  height: 100%;
  max-height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 10px 14px rgba(61, 30, 22, .18));
  transition: transform .4s var(--ease);
}
.card:hover .card__media img { transform: scale(1.06); }

.card__badge {
  position: absolute;
  top: 12px; left: 12px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .03em;
  padding: .3rem .65rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, .92);
  color: var(--cocoa-600);
  box-shadow: var(--shadow-sm);
  z-index: 2;
}
.card__badge--low { background: var(--berry-soft); color: var(--berry-600); }

.card__body { display: flex; flex-direction: column; padding: 1rem 1.15rem 1.2rem; flex: 1; justify-content: space-between; }
.card__name {
  font-size: 15px;
  line-height: 1.35;
  font-weight: 700;
  color: var(--cocoa-900);
  min-height: 2.7em;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin: 0 0 .5rem 0;
}
.card__row { display: flex; align-items: center; justify-content: space-between; gap: .5rem; margin-top: .35rem; }
.card__price { font-family: var(--font-display); font-size: 22px; font-weight: 800; color: var(--cocoa-900); }
.card__price small { font-size: 13px; font-weight: 600; margin-right: 2px; color: var(--muted); }

.add-btn {
  border: 0;
  background: var(--cocoa-800);
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  padding: .65rem 1.1rem;
  border-radius: 999px;
  min-height: 42px;
  transition: background .2s, transform .2s var(--ease);
}
.add-btn:hover { background: var(--berry); transform: scale(1.04); }

.stepper {
  display: inline-flex;
  align-items: center;
  background: var(--cream-3);
  border-radius: 999px;
  padding: 3px;
  min-height: 40px;
}
.stepper button {
  width: 34px; height: 34px;
  border: 0;
  border-radius: 50%;
  background: #fff;
  font-weight: 700;
  font-size: 16px;
  color: var(--cocoa-800);
  box-shadow: var(--shadow-sm);
  display: grid;
  place-items: center;
}
.stepper button:disabled { opacity: .35; cursor: not-allowed; }
.stepper span { min-width: 30px; text-align: center; font-weight: 700; }

.empty { text-align: center; color: var(--muted); padding: 3rem 0; font-size: 16px; }

/* CTA Band */
.cta-band { background: linear-gradient(120deg, var(--blush), #ffd4df); padding: 2.5rem 0; margin-top: 2rem; }
.cta-band__inner { display: flex; align-items: center; gap: 2rem; justify-content: space-between; flex-wrap: wrap; }
.cta-band img { width: 130px; height: 130px; object-fit: contain; }
.cta-band h2 { font-size: clamp(1.5rem, 3vw, 2rem); }
.cta-band p { color: var(--muted); margin: .4rem 0 0; }
.cta-band__inner > div { flex: 1; min-width: 240px; }

/* Footer */
.footer { background: var(--cocoa-800); color: #f7e6dd; padding: 2.2rem 0; }
.footer__inner { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; }
.footer strong { display: block; font-family: var(--font-display); font-size: 20px; color: #fff; }
.footer small { opacity: .8; }

/* ============================================================
   3D GAME STYLES (GSAP + THREE.JS)
   ============================================================ */
.game-section {
  padding: 2rem 0 3.5rem;
  background: radial-gradient(circle at 50% 20%, #fffbf6 0%, var(--cream) 100%);
  min-height: 700px;
}
.game-head {
  text-align: center;
  margin-bottom: 1.25rem;
}
.game-head h2 { font-size: clamp(1.6rem, 3.5vw, 2.2rem); color: var(--cocoa-900); }
.game-head p { color: var(--muted); margin: .3rem 0 0; font-size: 15px; }

.game-hud {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 1.25rem;
  margin-bottom: 1rem;
  align-items: stretch;
}
.game-order {
  display: flex;
  align-items: center;
  gap: 1.1rem;
  background: #fff;
  border-radius: var(--radius);
  padding: 1.1rem 1.4rem;
  box-shadow: var(--shadow-sm);
  border: 1px solid #eadfd6;
}
.game-order__product {
  width: 80px; height: 80px;
  object-fit: contain;
  background: var(--cream-2);
  border-radius: var(--radius-sm);
  padding: 6px;
  flex-shrink: 0;
  border: 1px solid #ebdcd0;
}
.game-order__content { display: flex; flex-direction: column; gap: .3rem; flex: 1; }
.game-order__badge { font-size: 11px; font-weight: 800; color: var(--berry); text-transform: uppercase; letter-spacing: .06em; }
.game-order__bubble { font-size: 14.5px; line-height: 1.35; color: var(--cocoa-900); margin: 0; }
.game-order__bubble strong { color: var(--cocoa-900); font-weight: 700; }
.game-order__recipe { display: flex; gap: .5rem; margin: .3rem 0 0; padding: 0; list-style: none; flex-wrap: wrap; }
.recipe-tag {
  background: var(--cream-3);
  color: var(--cocoa-800);
  font-size: 12px;
  font-weight: 700;
  padding: .25rem .7rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  transition: all .25s var(--ease);
}
.recipe-tag.is-done {
  background: #ecfdf5;
  color: #065f46;
  border: 1px solid #a7f3d0;
  text-decoration: line-through;
}

.game-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: .75rem;
  background: var(--cocoa-800);
  color: #fff;
  border-radius: var(--radius);
  padding: 1.1rem;
  box-shadow: var(--shadow);
  align-items: center;
}
.game-stat { display: flex; flex-direction: column; align-items: center; text-align: center; gap: .2rem; }
.game-stat__label { font-size: 11px; text-transform: uppercase; letter-spacing: .05em; opacity: .75; }
.game-stat__val { font-family: var(--font-display); font-size: 20px; font-weight: 800; color: #fff; }
#game-timer.is-low { color: #f87171; animation: timer-pulse .8s infinite; }
@keyframes timer-pulse { 0%, 100% { opacity: 1; } 50% { opacity: .5; } }

/* Step Tracker */
.game-steps {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: .5rem;
  list-style: none;
  padding: 0;
  margin: 0 0 1rem;
  counter-reset: step;
}
.game-steps li {
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  background: #fff;
  border: 1px solid #eadfd6;
  padding: .35rem .9rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  counter-increment: step;
  transition: all .25s var(--ease);
}
.game-steps li::before {
  content: counter(step);
  display: inline-grid;
  place-items: center;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--cream-3);
  font-size: 10px;
  font-weight: 800;
  color: var(--cocoa-800);
}
.game-steps li.is-active {
  background: var(--berry);
  color: #fff;
  border-color: var(--berry);
}
.game-steps li.is-active::before {
  background: #fff;
  color: var(--berry);
}
.game-steps li.is-done {
  background: #ecfdf5;
  color: #065f46;
  border-color: #a7f3d0;
}
.game-steps li.is-done::before {
  content: "✓";
  background: #059669;
  color: #fff;
}

/* 3D Canvas Stage */
.game-stage {
  position: relative;
  width: 100%;
  height: clamp(380px, 58vh, 560px);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  background: #fcf6ed;
  border: 2px solid #eadfd6;
}
.game-stage__canvas {
  width: 100%;
  height: 100%;
  cursor: grab;
}
.game-stage__canvas:active { cursor: grabbing; }

/* In-game Floating Prompt */
.game-prompt {
  position: absolute;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(255, 255, 255, .94);
  backdrop-filter: blur(8px);
  color: var(--cocoa-900);
  font-size: 13.5px;
  font-weight: 700;
  padding: .55rem 1.3rem;
  border-radius: 999px;
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(234, 223, 214, .8);
  pointer-events: none;
  z-index: 10;
  white-space: nowrap;
  animation: prompt-bob 2.5s ease-in-out infinite;
}
@keyframes prompt-bob {
  0%, 100% { transform: translate(-50%, 0); }
  50% { transform: translate(-50%, -4px); }
}

/* Loading Overlay */
.game-loading {
  position: absolute;
  inset: 0;
  background: rgba(252, 246, 237, .96);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  z-index: 25;
}
.game-loading[hidden] { display: none !important; }
.game-loading__spinner {
  width: 44px; height: 44px;
  border: 4px solid #ebdcd0;
  border-top-color: var(--berry);
  border-radius: 50%;
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Game Start Screen Overlay */
.game-start {
  position: absolute;
  inset: 0;
  background: rgba(36, 10, 4, .55);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  z-index: 20;
}
.game-start[hidden] { display: none !important; }
.game-start__card {
  background: #fff;
  border-radius: var(--radius);
  padding: 2rem 1.8rem;
  max-width: 420px;
  width: 100%;
  box-shadow: var(--shadow-lg);
  text-align: center;
  animation: card-pop .35s var(--ease);
}
.game-start__card h3 { font-size: 22px; color: var(--cocoa-900); margin: 0 0 1rem; }
.game-start__card ol {
  text-align: left;
  padding-left: 1.25rem;
  margin: 0 0 1.5rem;
  display: flex;
  flex-direction: column;
  gap: .65rem;
  font-size: 14px;
  color: var(--muted);
  line-height: 1.4;
}
.game-start__card ol strong { color: var(--cocoa-900); }
.game-start__card .btn { width: 100%; min-height: 46px; }

/* Choices Panel (Build Phase) */
.game-panel {
  position: absolute;
  bottom: 14px;
  left: 14px; right: 14px;
  background: rgba(255, 255, 255, .95);
  backdrop-filter: blur(12px);
  border-radius: var(--radius);
  padding: 1rem 1.2rem;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: .75rem;
  z-index: 10;
  border: 1px solid #eadfd6;
  animation: controls-up .35s var(--ease);
}
.game-panel[hidden] { display: none !important; }
@keyframes controls-up { from { opacity: 0; transform: translateY(14px); } }
.game-panel__title {
  margin: 0;
  font-size: 13.5px;
  font-weight: 800;
  color: var(--cocoa-800);
  text-align: center;
}
.game-choices {
  display: flex;
  gap: .5rem;
  justify-content: center;
  flex-wrap: wrap;
}
.choice-btn {
  border: 1px solid #eadfd6;
  background: #fff;
  border-radius: 999px;
  padding: .5rem 1rem;
  font-size: 13px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  min-height: 42px;
  transition: all .2s var(--ease);
  color: var(--cocoa-900);
}
.choice-btn:hover {
  border-color: var(--berry);
  transform: translateY(-2px);
  box-shadow: 0 3px 8px rgba(0,0,0,.08);
}
.choice-btn.is-wrong {
  border-color: #ef4444;
  background: #fee2e2;
  color: #b91c1c;
  animation: shake .4s ease;
}
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-6px); }
  75% { transform: translateX(6px); }
}

/* Stir Area */
.stir-area {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .75rem;
}
.stir-area[hidden] { display: none !important; }
.stir-meter {
  width: min(280px, 100%);
  height: 12px;
  background: var(--cream-3);
  border-radius: 999px;
  overflow: hidden;
  border: 1px solid #eadfd6;
}
.stir-meter__fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #b8653f, var(--gold));
  border-radius: 999px;
  transition: width .2s var(--ease);
}
.stir-btn {
  font-size: 15px;
  padding: .75rem 2.2rem;
  min-height: 46px;
  animation: stir-pulse 1.6s infinite ease-in-out;
}
@keyframes stir-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(194, 24, 91, .25); }
  50% { box-shadow: 0 0 0 7px rgba(194, 24, 91, 0); }
}

/* Result Modal */
.game-result {
  position: fixed;
  inset: 0;
  background: rgba(36, 10, 4, .65);
  backdrop-filter: blur(6px);
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  animation: fade .3s;
}
.game-result[hidden] { display: none !important; }
.game-result__card {
  background: #fff;
  border-radius: var(--radius-lg);
  padding: 2.2rem 1.8rem;
  max-width: 440px;
  width: 100%;
  text-align: center;
  box-shadow: var(--shadow-lg);
  animation: card-pop .4s var(--ease);
}
@keyframes card-pop { from { transform: scale(0.9); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.game-result__stars {
  font-size: 32px;
  color: #f59e0b;
  letter-spacing: 4px;
  margin-bottom: .4rem;
}
.game-result__card h2 { font-size: 24px; color: var(--cocoa-900); margin: 0; }
.game-result__card p { color: var(--muted); font-size: 14.5px; margin: .5rem 0 1rem; line-height: 1.45; }
.game-result__quote {
  background: var(--cream-2);
  border-left: 3px solid var(--berry);
  padding: .65rem 1rem;
  border-radius: 0 8px 8px 0;
  font-style: italic;
  font-size: 13.5px !important;
  color: var(--cocoa-800) !important;
  text-align: left;
  margin-bottom: 1rem !important;
}
.game-result__product {
  display: flex;
  align-items: center;
  gap: .9rem;
  background: #fdf8f3;
  border: 1px solid #ebdcd0;
  border-radius: var(--radius-sm);
  padding: .65rem .9rem;
  text-align: left;
  margin-bottom: 1.25rem;
}
.game-result__product img {
  width: 60px; height: 60px;
  object-fit: contain;
  background: #fff;
  border-radius: 8px;
  padding: 4px;
}
.game-result__product strong { display: block; font-size: 14px; color: var(--cocoa-900); line-height: 1.3; }
.game-result__product span { font-size: 13px; color: var(--berry); font-weight: 700; }
.game-result__actions {
  display: flex;
  flex-direction: column;
  gap: .55rem;
}

/* ============================================================
   MOBILE BOTTOM TAB BAR (THUMB ZONE)
   ============================================================ */
.mobile-tabbar {
  display: none;
  position: fixed;
  bottom: 0; left: 0; right: 0;
  height: calc(60px + var(--sab));
  background: rgba(255, 248, 241, .94);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid #eadfd6;
  z-index: 45;
  padding-bottom: var(--sab);
  grid-template-columns: repeat(3, 1fr);
  align-items: center;
  box-shadow: 0 -4px 20px rgba(61, 30, 22, .08);
}
.mobile-tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 0;
  background: transparent;
  color: var(--cocoa-600);
  height: 100%;
  padding: 4px 0;
  gap: 2px;
  position: relative;
  transition: color .2s var(--ease);
}
.mobile-tab.is-active { color: var(--berry); }
.mobile-tab__icon { font-size: 20px; line-height: 1; }
.mobile-tab__label { font-size: 11px; font-weight: 700; letter-spacing: -.01em; }
.mobile-tab__badge {
  position: absolute;
  top: 4px; right: 20%;
  background: var(--berry);
  color: #fff;
  font-size: 9px;
  font-weight: 800;
  padding: 1px 5px;
  border-radius: 999px;
  line-height: 1.2;
}
.mobile-tab__count {
  position: absolute;
  top: 4px; right: 28%;
  background: var(--berry);
  color: #fff;
  min-width: 17px;
  height: 17px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  font-size: 10px;
  font-weight: 800;
}

/* ============================================================
   CART DRAWER & COUPON EXTENSIONS
   ============================================================ */
.overlay { position: fixed; inset: 0; background: rgba(36, 10, 4, .45); backdrop-filter: blur(3px); z-index: 50; animation: fade .25s; }
@keyframes fade { from { opacity: 0; } }
.drawer {
  position: fixed;
  top: 0; right: 0;
  height: 100%;
  width: min(440px, 100%);
  background: var(--cream);
  z-index: 60;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-lg);
  transform: translateX(100%);
  transition: transform .4s var(--ease);
  padding-bottom: var(--sab);
}
.drawer.is-open { transform: none; }
.drawer__head { display: flex; justify-content: space-between; align-items: center; padding: 1.25rem 1.5rem; border-bottom: 1px solid #eadfd6; }
.drawer__head h2 { font-size: 22px; }
.icon-btn { border: 0; background: var(--cream-3); width: 44px; height: 44px; border-radius: 50%; font-size: 18px; display: grid; place-items: center; }
.icon-btn:hover { background: var(--berry-soft); }

.drawer__items { list-style: none; margin: 0; padding: 1rem 1.5rem; overflow-y: auto; flex: 1; display: flex; flex-direction: column; gap: .75rem; }
.drawer__empty { padding: 2rem 1.5rem; color: var(--muted); text-align: center; flex: 1; }
.line { display: grid; grid-template-columns: 64px 1fr auto; gap: .75rem; align-items: center; background: #fff; border-radius: var(--radius-sm); padding: .6rem; box-shadow: var(--shadow-sm); }
.line img { width: 64px; height: 64px; object-fit: contain; }
.line__name { font-size: 14px; font-weight: 600; line-height: 1.3; }
.line__price { font-size: 13px; color: var(--muted); margin-top: 2px; }
.line .stepper button { width: 30px; height: 30px; font-size: 14px; }
.line .stepper span { min-width: 24px; font-size: 14px; }

.drawer__form { padding: 1.25rem 1.5rem 1.5rem; border-top: 1px solid #eadfd6; background: #fff; display: flex; flex-direction: column; gap: .6rem; }
.drawer__form label { font-size: 13px; font-weight: 600; color: var(--cocoa-600); }
.drawer__form input[type="text"] { height: 44px; padding: 0 .9rem; border: 1px solid #eadfd6; border-radius: var(--radius-sm); outline: none; background: var(--cream); font-size: 14px; }
.drawer__form input[type="text"]:focus { border-color: var(--berry); }
.delivery { border: 0; padding: 0; margin: .25rem 0 0; display: flex; gap: 1rem; align-items: center; flex-wrap: wrap; }
.delivery legend { font-size: 13px; font-weight: 600; color: var(--cocoa-600); margin-bottom: .4rem; }
.delivery label { display: flex; gap: .35rem; align-items: center; font-weight: 500; color: var(--text); min-height: 38px; }
.delivery input { accent-color: var(--berry); }

.drawer__pricing { display: flex; flex-direction: column; gap: .25rem; margin: .4rem 0; }
.drawer__subtotal-row, .drawer__discount-row { display: flex; justify-content: space-between; font-size: 14px; color: var(--muted); }
.drawer__discount-row { color: var(--green); font-weight: 600; }
.drawer__total { display: flex; justify-content: space-between; align-items: baseline; padding-top: .4rem; border-top: 1px dashed #eadfd6; }
.drawer__total strong { font-family: var(--font-display); font-size: 26px; color: var(--cocoa-900); }

.toast {
  position: fixed;
  left: 50%; bottom: calc(24px + var(--sab));
  transform: translate(-50%, 140%);
  background: var(--cocoa-900);
  color: #fff;
  padding: .8rem 1.25rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 14px;
  box-shadow: var(--shadow-lg);
  z-index: 70;
  transition: transform .35s var(--ease);
  white-space: nowrap;
}
.toast.is-visible { transform: translate(-50%, 0); }
body.no-scroll { overflow: hidden; }

/* ============================================================
   MOBILE RESPONSIVENESS (POCKET 320PX UP TO IPHONE 17 430PX+)
   ============================================================ */
@media (max-width: 900px) {
  .hero__inner { grid-template-columns: 1fr; }
  .hero__art { height: 320px; order: -1; }
  .hero { padding-top: 1.5rem; }
  .game-hud { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  body { padding-bottom: calc(72px + var(--sab)); }
  .mobile-tabbar { display: grid; }
  .nav-tabs { display: none; }
  .header__inner { flex-wrap: wrap; height: auto; padding: .65rem 0; gap: .6rem; }
  .search { order: 3; max-width: none; flex-basis: 100%; height: 44px; }
  .cart-btn { display: none; } /* Bottom tabbar handles cart on mobile */
  .brand__logo { width: 44px; height: 44px; }
  .filters { justify-content: flex-start; flex-wrap: nowrap; padding-bottom: .6rem; }
  .grid { grid-template-columns: repeat(2, 1fr); gap: .75rem; }
  .card__media { padding: .75rem; aspect-ratio: 1 / 1; }
  .card__body { padding: .75rem .75rem .9rem; }
  .card__name { font-size: 13px; line-height: 1.35; min-height: 2.7em; }
  .card__price { font-size: 17px; }
  .card__row { flex-direction: column; align-items: stretch; gap: .4rem; }
  .add-btn { width: 100%; min-height: 42px; font-size: 13px; }
  .stepper { justify-content: space-between; }
  .cta-band__inner { text-align: center; justify-content: center; }
  .cta-band img { width: 100px; height: 100px; }
  .game-prompt { font-size: 12px; padding: .5rem 1rem; width: 90%; text-align: center; justify-content: center; white-space: normal; }
  .game-stage { height: 440px; }
}

/* Pocket Devices (<= 360px: iPhone SE, Galaxy Fold outer screen, Pocket phones) */
@media (max-width: 360px) {
  .container { width: calc(100% - 1rem); }
  .grid { grid-template-columns: repeat(2, 1fr); gap: .45rem; }
  .card { border-radius: 14px; }
  .card__media { padding: .45rem; }
  .card__body { padding: .55rem .45rem .7rem; }
  .card__badge { top: 6px; left: 6px; font-size: 9px; padding: .2rem .45rem; }
  .card__name { font-size: 11.5px; min-height: 2.6em; }
  .card__price { font-size: 15px; }
  .add-btn { font-size: 12px; padding: .45rem .5rem; min-height: 38px; }
  .stepper button { width: 28px; height: 28px; font-size: 13px; }
  .stepper span { min-width: 22px; font-size: 12px; }
  .brand__logo { width: 38px; height: 38px; }
  .brand__text strong { font-size: 16px; }
  .hero h1 { font-size: 1.95rem; }
  .hero p { font-size: 14.5px; }
  .game-stage { height: 380px; }
  .game-order { flex-direction: column; text-align: center; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* Delivery details and game progress */
.delivery-address { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; }
.delivery-address label { display: flex; flex-direction: column; gap: .4rem; min-width: 0; }
.delivery-address input { width: 100%; min-width: 0; }
.pickup-address { margin: 0; padding: .8rem; background: var(--cream); border-radius: var(--radius-sm); font-size: 14px; }
.drawer { overflow-y: auto; }
.drawer__head, .drawer__form { flex-shrink: 0; }
.drawer__items { flex: 1 0 auto; overflow-y: visible; }
.game-progress { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .65rem; margin-bottom: .8rem; font-size: 13px; color: var(--cocoa-800); }
.game-progress strong { font-variant-numeric: tabular-nums; }
.game-sound { min-height: 44px; padding: .5rem .8rem; border: 1px solid #eadfd6; border-radius: 999px; background: #fff; color: var(--cocoa-800); font: inherit; cursor: pointer; }
.order-meter { height: 6px; background: #eadfd6; border-radius: 999px; overflow: hidden; margin-bottom: .8rem; }
#game-time-fill { width: 100%; height: 100%; background: #558747; transition: width .4s linear; }
#game-time-fill.is-low { background: #c2185b; }
.game-stage__canvas { touch-action: manipulation; }
.choice-btn:active { transform: scale(.96); }
[hidden] { display: none !important; }
@media (prefers-reduced-motion: reduce) {
  .game-prompt, #game-timer.is-low { animation: none; }
  #game-time-fill { transition: none; }
}
