/* ==========================================================================
   Armazém Rural Bar — Cardápio digital
   ========================================================================== */

:root {
  --green-950: #0b1710;
  --green-900: #11231a;
  --green-850: #162c20;
  --green-800: #1c3727;
  --green-700: #264a33;
  --green-500: #5a8a52;
  --green-300: #9cc08f;

  --yellow: #e9e03b;
  --yellow-soft: #f3ec7a;
  --yellow-ink: #1b2a12;

  --wood-700: #6b4528;
  --wood-500: #a8794b;
  --wood-300: #d6b183;

  --cream: #f5eedf;
  --cream-80: rgba(245, 238, 223, 0.82);
  --cream-60: rgba(245, 238, 223, 0.64);
  --cream-12: rgba(245, 238, 223, 0.12);
  --cream-08: rgba(245, 238, 223, 0.08);

  --whatsapp: #25d366;
  --whatsapp-dark: #128c4a;
  --danger: #ff8a7a;

  --font-display: 'Fraunces', Georgia, 'Times New Roman', serif;
  --font-body: 'Manrope', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;

  --radius-sm: 12px;
  --radius-md: 18px;
  --radius-lg: 26px;
  --radius-pill: 999px;

  --shadow-card: 0 1px 0 rgba(255, 255, 255, 0.04) inset, 0 18px 40px -22px rgba(0, 0, 0, 0.75);
  --shadow-float: 0 20px 50px -12px rgba(0, 0, 0, 0.6), 0 6px 18px -6px rgba(0, 0, 0, 0.45);

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);

  --nav-h: 64px;
  --gutter: clamp(16px, 4.5vw, 40px);
  --maxw: 1360px;

  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .05 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- Base ---------- */

*,
*::before,
*::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 12px);
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.55;
  color: var(--cream);
  background-color: var(--green-900);
  background-image:
    var(--grain),
    radial-gradient(1200px 600px at 100% 0%, rgba(90, 138, 82, 0.12), transparent 60%),
    radial-gradient(900px 600px at 0% 40%, rgba(168, 121, 75, 0.08), transparent 60%);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

body.is-locked { overflow: hidden; }

img { display: block; max-width: 100%; height: auto; }
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; -webkit-tap-highlight-color: transparent; }
a { color: inherit; -webkit-tap-highlight-color: transparent; }
h1, h2, h3, p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }

:focus-visible {
  outline: 3px solid var(--yellow);
  outline-offset: 3px;
  border-radius: 10px;
}

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

.icon {
  width: 1.25em;
  height: 1.25em;
  flex-shrink: 0;
}

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

.skip-link {
  position: fixed;
  top: 12px; left: 12px;
  z-index: 100;
  padding: 12px 18px;
  border-radius: var(--radius-pill);
  background: var(--yellow);
  color: var(--yellow-ink);
  font-weight: 700;
  text-decoration: none;
  transform: translateY(-160%);
  transition: transform 0.25s var(--ease-out);
}
.skip-link:focus { transform: none; }

/* ---------- Buttons ---------- */

.btn {
  --btn-bg: var(--cream-08);
  --btn-fg: var(--cream);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 12px 22px;
  border: 0;
  border-radius: var(--radius-pill);
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-weight: 700;
  font-size: 0.98rem;
  letter-spacing: 0.01em;
  text-decoration: none;
  transition: transform 0.2s var(--ease-out), box-shadow 0.25s var(--ease-out), background-color 0.2s;
  user-select: none;
}
.btn:active { transform: scale(0.96); }

.btn--primary {
  --btn-bg: var(--yellow);
  --btn-fg: var(--yellow-ink);
  box-shadow: 0 10px 30px -10px rgba(233, 224, 59, 0.55);
}
.btn--primary:hover { --btn-bg: var(--yellow-soft); box-shadow: 0 14px 36px -10px rgba(233, 224, 59, 0.7); }

.btn--ghost {
  border: 1px solid var(--cream-12);
  --btn-bg: transparent;
}
.btn--ghost:hover { --btn-bg: var(--cream-08); }

.btn--whatsapp {
  --btn-bg: var(--whatsapp);
  --btn-fg: #06220f;
  box-shadow: 0 12px 30px -12px rgba(37, 211, 102, 0.6);
}
.btn--whatsapp:hover { --btn-bg: #3ee07a; }
.btn--whatsapp[disabled] { opacity: 0.45; pointer-events: none; box-shadow: none; }

.btn--lg { min-height: 56px; padding: 16px 28px; font-size: 1.02rem; }
.btn--block { width: 100%; }

.icon-btn {
  display: grid;
  place-items: center;
  width: 44px; height: 44px;
  border: 1px solid var(--cream-12);
  border-radius: 50%;
  background: var(--cream-08);
  color: var(--cream);
  transition: background-color 0.2s, transform 0.2s var(--ease-out);
}
.icon-btn:hover { background: var(--cream-12); }
.icon-btn:active { transform: scale(0.92); }

.link-btn {
  display: block;
  margin: 12px auto 0;
  padding: 8px 12px;
  border: 0;
  background: none;
  color: var(--cream-60);
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.link-btn:hover { color: var(--cream); }
.link-btn.is-confirming { color: var(--danger); }

.count-badge {
  display: inline-grid;
  place-items: center;
  min-width: 22px; height: 22px;
  padding: 0 6px;
  border-radius: var(--radius-pill);
  background: var(--yellow);
  color: var(--yellow-ink);
  font-size: 0.75rem;
  font-weight: 800;
  line-height: 1;
}
.count-badge[hidden] { display: none; }
.count-badge.is-bumping { animation: bump 0.45s var(--ease-spring); }

@keyframes bump {
  0% { transform: scale(1); }
  40% { transform: scale(1.35); }
  100% { transform: scale(1); }
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  display: grid;
  align-items: end;
  min-height: 100vh;
  min-height: 100svh;
  padding: 96px var(--gutter) calc(88px + env(safe-area-inset-bottom));
  overflow: hidden;
  isolation: isolate;
}

.hero__media,
.hero__media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -2;
}
.hero__media img {
  object-position: 50% 40%;
  transform: scale(1.08);
  animation: heroZoom 2.4s var(--ease-out) forwards;
}

.hero__shade {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(180deg, rgba(11, 23, 16, 0.55) 0%, rgba(11, 23, 16, 0.15) 30%, rgba(11, 23, 16, 0.6) 58%, var(--green-900) 100%),
    radial-gradient(120% 80% at 50% 100%, rgba(11, 23, 16, 0.6), transparent 70%);
}

.hero__leaf {
  position: absolute;
  width: 120px;
  height: 240px;
  color: rgba(245, 238, 223, 0.16);
  pointer-events: none;
  z-index: -1;
}
.hero__leaf--left { top: 24px; left: -34px; transform: rotate(-18deg); }
.hero__leaf--right { top: 40px; right: -30px; transform: scaleX(-1) rotate(-14deg); }

.hero__content {
  display: grid;
  justify-items: center;
  gap: 18px;
  max-width: 640px;
  margin: 0 auto;
  text-align: center;
}

.hero__logo {
  width: min(78vw, 340px);
  height: auto;
  aspect-ratio: 400 / 230;
  filter: drop-shadow(0 18px 30px rgba(0, 0, 0, 0.55));
  opacity: 0;
  animation: logoIn 1s var(--ease-spring) 0.2s forwards;
}

.hero__eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--wood-300);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  opacity: 0;
  animation: fadeUp 0.8s var(--ease-out) 0.55s forwards;
}
.hero__eyebrow span + span::before {
  content: '';
  display: inline-block;
  width: 5px; height: 5px;
  margin-right: 10px;
  border-radius: 50%;
  background: var(--yellow);
  vertical-align: middle;
}

.hero__title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(2rem, 8.4vw, 4.2rem);
  line-height: 1.06;
  letter-spacing: -0.015em;
  text-wrap: balance;
  text-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
  opacity: 0;
  animation: fadeUp 0.9s var(--ease-out) 0.7s forwards;
}
.hero__title em {
  display: block;
  font-style: italic;
  font-weight: 500;
  color: var(--yellow);
}

.hero__cta {
  margin-top: 8px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 800;
  opacity: 0;
  animation: fadeUp 0.9s var(--ease-out) 0.9s forwards;
}
.hero__cta .icon { animation: nudge 1.8s ease-in-out 2s infinite; }

.hero__scroll {
  position: absolute;
  left: 50%;
  bottom: calc(22px + env(safe-area-inset-bottom));
  width: 26px; height: 42px;
  margin-left: -13px;
  border: 2px solid var(--cream-60);
  border-radius: 14px;
  opacity: 0;
  animation: fadeIn 1s ease 1.4s forwards;
}
.hero__scroll span {
  position: absolute;
  top: 8px; left: 50%;
  width: 4px; height: 8px;
  margin-left: -2px;
  border-radius: 2px;
  background: var(--yellow);
  animation: scrollDot 1.8s ease-in-out infinite;
}

@keyframes heroZoom { to { transform: scale(1); } }
@keyframes logoIn {
  from { opacity: 0; transform: translateY(16px) scale(0.86) rotate(-4deg); }
  to { opacity: 1; transform: none; }
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: none; }
}
@keyframes fadeIn { to { opacity: 1; } }
@keyframes nudge { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(4px); } }
@keyframes scrollDot {
  0% { opacity: 0; transform: translateY(0); }
  30% { opacity: 1; }
  100% { opacity: 0; transform: translateY(14px); }
}

/* ---------- Category navigation ---------- */

.catnav {
  position: sticky;
  top: 0;
  z-index: 40;
  height: var(--nav-h);
  background: rgba(17, 35, 26, 0.82);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  backdrop-filter: saturate(140%) blur(14px);
  border-bottom: 1px solid var(--cream-08);
  transition: box-shadow 0.3s;
}
.catnav.is-stuck { box-shadow: 0 12px 30px -18px rgba(0, 0, 0, 0.8); }

.catnav__inner {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
}

.catnav__brand,
.catnav__cart { display: none; }

.catnav__list {
  display: flex;
  gap: 8px;
  flex: 1;
  height: 100%;
  align-items: center;
  padding: 0 var(--gutter);
  overflow-x: auto;
  scroll-snap-type: x proximity;
  scrollbar-width: none;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 var(--gutter), #000 calc(100% - var(--gutter)), transparent 100%);
  mask-image: linear-gradient(90deg, transparent 0, #000 var(--gutter), #000 calc(100% - var(--gutter)), transparent 100%);
}
.catnav__list::-webkit-scrollbar { display: none; }

.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  min-height: 44px;
  padding: 10px 16px 10px 12px;
  border: 1px solid var(--cream-12);
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--cream-80);
  font-size: 0.95rem;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  scroll-snap-align: center;
  transition: background-color 0.25s, color 0.25s, border-color 0.25s, transform 0.2s var(--ease-out);
}
.chip .icon { width: 20px; height: 20px; color: var(--wood-300); transition: color 0.25s; }
.chip:hover { border-color: var(--cream-60); color: var(--cream); }
.chip:active { transform: scale(0.95); }
.chip.is-active {
  background: var(--yellow);
  border-color: var(--yellow);
  color: var(--yellow-ink);
}
.chip.is-active .icon { color: var(--yellow-ink); }

/* ---------- How to order ---------- */

.howto {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 28px var(--gutter) 8px;
}
.howto__list {
  display: grid;
  gap: 10px;
  counter-reset: step;
}
.howto__list li {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border: 1px solid var(--cream-08);
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, rgba(245, 238, 223, 0.05), rgba(245, 238, 223, 0.015));
}
.howto__num {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 38px; height: 38px;
  border-radius: 50%;
  background: var(--wood-700);
  background: linear-gradient(145deg, var(--wood-500), var(--wood-700));
  color: var(--cream);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.1rem;
}
.howto__list strong { display: block; font-size: 1rem; }
.howto__list p { color: var(--cream-60); font-size: 0.92rem; }
.howto__list b { color: var(--yellow); }

/* ---------- Menu sections ---------- */

.menu {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 var(--gutter) 40px;
}

.menu-section {
  position: relative;
  padding-top: 48px;
}

.section-head {
  position: relative;
  margin-bottom: 22px;
}
.section-head__eyebrow {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
  color: var(--wood-300);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}
.section-head__eyebrow::after {
  content: '';
  flex: 1;
  max-width: 120px;
  height: 1px;
  background: linear-gradient(90deg, var(--wood-500), transparent);
}
.section-head__icon {
  display: grid;
  place-items: center;
  width: 34px; height: 34px;
  border-radius: 50%;
  background: rgba(168, 121, 75, 0.18);
  color: var(--wood-300);
}
.section-head__icon .icon { width: 18px; height: 18px; }
.section-head__title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(2rem, 7vw, 3rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
}
.section-head__tagline {
  margin-top: 6px;
  color: var(--cream-60);
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.08rem;
}
.section-head__count {
  display: inline-block;
  margin-top: 12px;
  padding: 4px 12px;
  border: 1px solid var(--cream-12);
  border-radius: var(--radius-pill);
  color: var(--cream-60);
  font-size: 0.8rem;
  font-weight: 600;
}

.grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
}

/* ---------- Product card ---------- */

.card {
  container-type: inline-size;
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--cream-08);
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, var(--green-850), #13271c);
  box-shadow: var(--shadow-card);
  transition: transform 0.35s var(--ease-out), border-color 0.3s, box-shadow 0.35s var(--ease-out);
}
.card.is-in-cart { border-color: rgba(233, 224, 59, 0.5); }

.card__media {
  position: relative;
  aspect-ratio: 16 / 11;
  overflow: hidden;
  background: var(--green-800);
}
.card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s var(--ease-out), opacity 0.5s ease;
  opacity: 0;
}
.card__media img.is-loaded { opacity: 1; }
.card__media::after {
  content: '';
  position: absolute;
  inset: auto 0 0 0;
  height: 40%;
  background: linear-gradient(180deg, transparent, rgba(19, 39, 28, 0.85));
  pointer-events: none;
}

.card__portion {
  position: absolute;
  top: 14px; left: 14px;
  z-index: 1;
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  background: rgba(11, 23, 16, 0.62);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(245, 238, 223, 0.18);
  color: var(--cream);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.card__qty {
  position: absolute;
  top: 14px; right: 14px;
  z-index: 1;
  display: grid;
  place-items: center;
  min-width: 34px; height: 34px;
  padding: 0 10px;
  border-radius: var(--radius-pill);
  background: var(--yellow);
  color: var(--yellow-ink);
  font-weight: 800;
  font-size: 0.92rem;
  box-shadow: 0 8px 20px -6px rgba(0, 0, 0, 0.6);
  transform: scale(0);
  transition: transform 0.35s var(--ease-spring);
}
.card.is-in-cart .card__qty { transform: scale(1); }

.card__body {
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 6px;
  padding: 16px 18px 18px;
  margin-top: -8px;
  position: relative;
}
.card__name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.36rem;
  line-height: 1.18;
  letter-spacing: -0.01em;
}
.card__desc {
  color: var(--cream-60);
  font-size: 0.95rem;
  line-height: 1.5;
}

.card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: auto;
  padding-top: 14px;
}

.price {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
  color: var(--yellow);
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
}
.price__cur { font-size: 0.9rem; font-weight: 700; opacity: 0.85; }
.price__val { font-size: 1.6rem; letter-spacing: -0.02em; }

/* Add / stepper control */
.qty-control {
  position: relative;
  display: flex;
  align-items: center;
  height: 52px;
}

.add-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 52px;
  min-width: 52px;
  padding: 0 20px 0 16px;
  border: 0;
  border-radius: var(--radius-pill);
  background: var(--yellow);
  color: var(--yellow-ink);
  font-weight: 800;
  font-size: 0.95rem;
  box-shadow: 0 10px 24px -10px rgba(233, 224, 59, 0.6);
  transition: transform 0.2s var(--ease-out), background-color 0.2s, box-shadow 0.25s;
}
.add-btn .icon { width: 22px; height: 22px; }
.add-btn:hover { background: var(--yellow-soft); }
.add-btn:active { transform: scale(0.92); }

.stepper {
  display: inline-flex;
  align-items: center;
  height: 52px;
  padding: 4px;
  border-radius: var(--radius-pill);
  background: rgba(245, 238, 223, 0.08);
  border: 1px solid var(--cream-12);
}
.stepper__btn {
  display: grid;
  place-items: center;
  width: 44px; height: 44px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--cream);
  transition: background-color 0.2s, transform 0.18s var(--ease-out);
}
.stepper__btn .icon { width: 20px; height: 20px; }
.stepper__btn:hover { background: var(--cream-08); }
.stepper__btn:active { transform: scale(0.88); }
.stepper__btn--plus { background: var(--yellow); color: var(--yellow-ink); }
.stepper__btn--plus:hover { background: var(--yellow-soft); }
.stepper__val {
  min-width: 34px;
  text-align: center;
  font-weight: 800;
  font-size: 1.05rem;
  font-variant-numeric: tabular-nums;
}
.stepper--sm { height: 44px; }
.stepper--sm .stepper__btn { width: 36px; height: 36px; }
.stepper--sm .stepper__val { min-width: 28px; font-size: 0.98rem; }

.qty-control .add-btn,
.qty-control .stepper { animation: popIn 0.35s var(--ease-spring); }

@container (max-width: 300px) {
  .card__body { padding: 14px 14px 16px; }
  .card__name { font-size: 1.22rem; }
  .price__val { font-size: 1.4rem; }
  .add-btn { width: 52px; padding: 0; }
  .add-btn span { display: none; }
  .stepper__btn { width: 40px; height: 40px; }
  .stepper__val { min-width: 28px; }
}

@keyframes popIn {
  from { transform: scale(0.7); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

/* Reveal */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
  transition-delay: var(--delay, 0s);
}
.reveal.is-visible { opacity: 1; transform: none; }

/* Fly-to-cart particle */
.fly-dot {
  position: fixed;
  z-index: 80;
  width: 46px; height: 46px;
  border-radius: 50%;
  background-size: cover;
  background-position: center;
  border: 2px solid var(--yellow);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.5);
  pointer-events: none;
}

/* ---------- Floating cart bar ---------- */

.cartbar {
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: calc(12px + env(safe-area-inset-bottom));
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 64px;
  padding: 8px 10px 8px 10px;
  border: 0;
  border-radius: 22px;
  background: var(--yellow);
  color: var(--yellow-ink);
  text-align: left;
  box-shadow: var(--shadow-float);
  transform: translateY(0);
  transition: transform 0.45s var(--ease-spring), opacity 0.3s, visibility 0s;
}
.cartbar[hidden] {
  display: flex;
  visibility: hidden;
  transform: translateY(140%);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.35s var(--ease-out), opacity 0.3s, visibility 0s 0.35s;
}
.cartbar:active { transform: scale(0.98); }
.cartbar.is-bumping { animation: barBump 0.5s var(--ease-spring); }

@keyframes barBump {
  0%, 100% { transform: scale(1); }
  40% { transform: scale(1.03); }
}

.cartbar__icon {
  position: relative;
  display: grid;
  place-items: center;
  width: 48px; height: 48px;
  border-radius: 16px;
  background: var(--yellow-ink);
  color: var(--yellow);
}
.cartbar__icon .icon { width: 22px; height: 22px; }
.cartbar__icon .count-badge {
  position: absolute;
  top: -6px; right: -6px;
  background: var(--cream);
  color: var(--yellow-ink);
  box-shadow: 0 0 0 2px var(--yellow);
}
.cartbar__text { display: grid; flex: 1; line-height: 1.2; }
.cartbar__label { font-weight: 800; font-size: 1.02rem; }
.cartbar__items { font-size: 0.85rem; font-weight: 600; opacity: 0.75; }
.cartbar__total {
  padding: 10px 14px;
  border-radius: 14px;
  background: rgba(27, 42, 18, 0.1);
  font-weight: 800;
  font-size: 1.08rem;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* ---------- Drawer (cart) ---------- */

.drawer {
  position: fixed;
  inset: 0;
  width: 100%;
  max-width: none;
  height: 100%;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--cream);
  overflow: hidden;
}
.drawer::backdrop {
  background: rgba(5, 12, 8, 0.6);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  opacity: 0;
  transition: opacity 0.35s ease;
}
.drawer.is-open::backdrop { opacity: 1; }

.drawer__panel {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  display: flex;
  flex-direction: column;
  max-height: 92vh;
  max-height: 92dvh;
  border-radius: 28px 28px 0 0;
  background: var(--green-900);
  background-image: var(--grain), linear-gradient(180deg, var(--green-850), var(--green-900));
  border-top: 1px solid var(--cream-12);
  box-shadow: 0 -20px 60px rgba(0, 0, 0, 0.5);
  transform: translateY(100%);
  transition: transform 0.45s var(--ease-out);
}
.drawer.is-open .drawer__panel { transform: none; }

.drawer__handle {
  width: 44px; height: 5px;
  margin: 10px auto 0;
  border-radius: 3px;
  background: var(--cream-12);
}

.drawer__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 20px 14px;
  border-bottom: 1px solid var(--cream-08);
}
.drawer__eyebrow {
  color: var(--wood-300);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}
.drawer__title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.75rem;
  line-height: 1.1;
}

.drawer__body {
  flex: 1;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 8px 20px 16px;
}

.drawer__footer {
  padding: 16px 20px calc(16px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--cream-08);
  background: rgba(11, 23, 16, 0.55);
}

.cart-list li {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 14px;
  align-items: center;
  padding: 14px 0;
  border-bottom: 1px dashed var(--cream-12);
  animation: fadeUp 0.35s var(--ease-out);
}
.cart-list li.is-removing {
  animation: none;
  transition: opacity 0.25s, transform 0.25s;
  opacity: 0;
  transform: translateX(30px);
}
.cart-item__thumb {
  width: 64px; height: 64px;
  border-radius: 16px;
  object-fit: cover;
  background: var(--green-800);
}
.cart-item__info { display: grid; gap: 8px; min-width: 0; }
.cart-item__top { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.cart-item__name { font-weight: 700; font-size: 1rem; line-height: 1.3; }
.cart-item__unit { display: block; color: var(--cream-60); font-size: 0.85rem; font-weight: 500; }
.cart-item__bottom { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.cart-item__total { color: var(--yellow); font-weight: 800; font-size: 1.05rem; white-space: nowrap; font-variant-numeric: tabular-nums; }
.cart-item__remove {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 36px; height: 36px;
  margin: -6px -6px 0 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--cream-60);
  transition: color 0.2s, background-color 0.2s;
}
.cart-item__remove .icon { width: 18px; height: 18px; }
.cart-item__remove:hover { color: var(--danger); background: rgba(255, 138, 122, 0.1); }

.cart-empty {
  display: none;
  justify-items: center;
  gap: 8px;
  padding: 40px 12px 32px;
  text-align: center;
}
.cart-empty__icon {
  display: grid;
  place-items: center;
  width: 76px; height: 76px;
  margin-bottom: 8px;
  border-radius: 50%;
  background: var(--cream-08);
  color: var(--wood-300);
}
.cart-empty__icon .icon { width: 34px; height: 34px; }
.cart-empty__title { font-family: var(--font-display); font-size: 1.4rem; font-weight: 600; }
.cart-empty__text { color: var(--cream-60); margin-bottom: 12px; }

.drawer.is-empty .cart-empty { display: grid; }
.drawer.is-empty .cart-list,
.drawer.is-empty .cart-form,
.drawer.is-empty .drawer__footer { display: none; }

.cart-form {
  display: grid;
  gap: 14px;
  padding-top: 18px;
}
.field { display: grid; gap: 6px; }
.field__label { font-weight: 700; font-size: 0.92rem; }
.field__label small { color: var(--cream-60); font-weight: 500; font-size: 0.82rem; }
.field__input {
  width: 100%;
  min-height: 50px;
  padding: 13px 16px;
  border: 1px solid var(--cream-12);
  border-radius: var(--radius-sm);
  background: rgba(11, 23, 16, 0.5);
  font-size: 1rem;
  resize: vertical;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.field__input::placeholder { color: rgba(245, 238, 223, 0.38); }
.field__input:focus {
  outline: none;
  border-color: var(--yellow);
  box-shadow: 0 0 0 3px rgba(233, 224, 59, 0.18);
}

.summary { margin: 0 0 14px; }
.summary__row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 4px 0;
  color: var(--cream-80);
}
.summary__row dt, .summary__row dd { margin: 0; }
.summary__row dd { font-weight: 700; font-variant-numeric: tabular-nums; }
.summary__row--total {
  margin-top: 4px;
  padding-top: 10px;
  border-top: 1px solid var(--cream-08);
  color: var(--cream);
}
.summary__row--total dt { font-family: var(--font-display); font-size: 1.25rem; font-weight: 600; }
.summary__row--total dd { color: var(--yellow); font-size: 1.6rem; font-weight: 800; }

/* ---------- Toast ---------- */

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(92px + env(safe-area-inset-bottom));
  z-index: 90;
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: calc(100vw - 32px);
  padding: 12px 18px 12px 12px;
  border-radius: var(--radius-pill);
  background: var(--cream);
  color: var(--green-950);
  font-weight: 700;
  font-size: 0.94rem;
  box-shadow: var(--shadow-float);
  transform: translate(-50%, 20px);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.4s var(--ease-spring), opacity 0.25s;
}
.toast.is-visible { transform: translate(-50%, 0); opacity: 1; }
.toast__icon {
  display: grid;
  place-items: center;
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--green-500);
  color: #fff;
}
.toast__icon .icon { width: 16px; height: 16px; }
.toast span:last-child { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- Footer ---------- */

.footer {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 14px;
  padding: 56px var(--gutter) calc(120px + env(safe-area-inset-bottom));
  margin-top: 32px;
  overflow: hidden;
  text-align: center;
  border-top: 1px solid var(--cream-08);
  background:
    linear-gradient(180deg, rgba(11, 23, 16, 0) 0%, var(--green-950) 100%);
}
.footer::before {
  content: '';
  position: absolute;
  top: 0; left: 50%;
  width: min(420px, 70%);
  height: 3px;
  transform: translateX(-50%);
  border-radius: 0 0 3px 3px;
  background: linear-gradient(90deg, transparent, var(--wood-500), var(--yellow), var(--wood-500), transparent);
}
.footer__leaf {
  position: absolute;
  right: -20px; bottom: -40px;
  width: 140px; height: 280px;
  color: rgba(245, 238, 223, 0.06);
  transform: rotate(16deg);
}
.footer__logo { width: 200px; height: auto; aspect-ratio: 400 / 230; }
.footer__tagline { font-family: var(--font-display); font-style: italic; font-size: 1.2rem; color: var(--cream-80); }
.footer__note { color: var(--cream-60); font-size: 0.85rem; max-width: 36ch; }
.footer__copy { color: rgba(245, 238, 223, 0.4); font-size: 0.82rem; }

.noscript {
  margin: 24px var(--gutter);
  padding: 16px;
  border-radius: var(--radius-md);
  background: var(--cream-08);
  text-align: center;
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (hover: hover) {
  .card:hover {
    transform: translateY(-6px);
    border-color: rgba(245, 238, 223, 0.16);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.05) inset, 0 30px 60px -26px rgba(0, 0, 0, 0.85);
  }
  .card:hover .card__media img { transform: scale(1.06); }
  .card.is-in-cart:hover { border-color: rgba(233, 224, 59, 0.7); }
}

@media (min-width: 600px) {
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
  .card__media { aspect-ratio: 4 / 3; }
  .howto__list { grid-template-columns: repeat(3, 1fr); }
  .howto__list li { flex-direction: column; align-items: flex-start; gap: 10px; padding: 18px; }

  .cartbar {
    left: auto;
    right: 24px;
    bottom: calc(24px + env(safe-area-inset-bottom));
    width: 380px;
  }
  .toast { bottom: calc(108px + env(safe-area-inset-bottom)); }
}

@media (min-width: 900px) {
  :root { --nav-h: 76px; }

  .hero {
    align-items: center;
    padding-top: 120px;
    padding-bottom: 120px;
  }
  .hero__content {
    justify-items: start;
    max-width: var(--maxw);
    width: 100%;
    text-align: left;
  }
  .hero__logo { width: 380px; }
  .hero__title { max-width: 13ch; font-size: clamp(3.4rem, 5.6vw, 5rem); }
  .hero__shade {
    background:
      linear-gradient(90deg, rgba(11, 23, 16, 0.92) 0%, rgba(11, 23, 16, 0.65) 38%, rgba(11, 23, 16, 0.05) 70%),
      linear-gradient(180deg, rgba(11, 23, 16, 0.4) 0%, transparent 30%, transparent 75%, var(--green-900) 100%);
  }
  .hero__media img { object-position: 70% 50%; }
  .hero__leaf { width: 180px; height: 360px; }
  .hero__leaf--left { top: auto; bottom: 40px; left: -40px; }

  .catnav__inner { padding: 0 var(--gutter); gap: 24px; }
  .catnav__brand {
    display: block;
    flex-shrink: 0;
    width: 108px;
    opacity: 0;
    transform: translateY(-6px);
    transition: opacity 0.3s, transform 0.3s var(--ease-out);
    pointer-events: none;
  }
  .catnav.is-stuck .catnav__brand { opacity: 1; transform: none; pointer-events: auto; }
  .catnav__brand svg { display: block; width: 100%; height: auto; aspect-ratio: 400 / 230; }
  .catnav__list {
    justify-content: center;
    padding: 0;
    -webkit-mask-image: none;
    mask-image: none;
  }
  .catnav__cart {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
    min-height: 48px;
    padding: 0 18px;
    border: 1px solid var(--cream-12);
    border-radius: var(--radius-pill);
    background: var(--cream-08);
    font-weight: 700;
    transition: background-color 0.2s, transform 0.2s var(--ease-out);
  }
  .catnav__cart:hover { background: var(--cream-12); }
  .catnav__cart:active { transform: scale(0.96); }

  .howto { padding-top: 48px; }
  .menu-section { padding-top: 72px; }

  .drawer__panel {
    top: 0; left: auto; right: 0; bottom: 0;
    width: 460px;
    max-height: none;
    border-radius: 28px 0 0 28px;
    border-top: 0;
    border-left: 1px solid var(--cream-12);
    transform: translateX(100%);
  }
  .drawer__handle { display: none; }
  .drawer__header { padding-top: 24px; }
}

@media (min-width: 960px) {
  .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }

  .grid--featured .card--featured {
    grid-column: span 2;
    grid-row: span 2;
  }
  .grid--featured .card--featured .card__media { aspect-ratio: auto; flex: 1; min-height: 360px; }
  .grid--featured .card--featured .card__name { font-size: 2rem; }
  .grid--featured .card--featured .card__desc { font-size: 1.05rem; }
  .grid--featured .card--featured .price__val { font-size: 2rem; }
  .grid--featured .card--featured .card__body { flex: 0 0 auto; padding: 22px 26px 26px; }
}

@media (min-width: 1320px) {
  .menu-section {
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    gap: 48px;
  }
  .section-head {
    align-self: start;
    position: sticky;
    top: calc(var(--nav-h) + 40px);
    margin-bottom: 0;
  }
  .section-head__title { font-size: 3.2rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .reveal { opacity: 1; transform: none; }
}
