/* Palette sampled from the HallOasis banner */
:root {
  --brown: #3a2413;
  --brown-2: #2c1a0d;
  --brown-3: #4d321c;
  --sky: #b5c2c9;      /* banner headline color */
  --sky-2: #d6dfe4;
  --cream: #f6f0e6;
  --cream-2: #efe6d8;
  --paper: #fffdf9;
  --pumpkin: #d97b2b;
  --pumpkin-2: #b9621b;
  --ink: #2a1a0f;
  --muted: #7a6656;
  --line: #e4d9c9;
  --photo-bg: #b5c1cb;  /* background color baked into the product photos */
  --ok: #2f7d4f;
  --err: #b3261e;
  --radius: 16px;
  --shadow: 0 8px 30px rgba(42, 26, 15, 0.12);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; overflow-x: clip; }
body {
  margin: 0;
  font-family: "Nunito", system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--cream);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}
main { flex: 1 0 auto; }
.footer { margin-top: auto; }
h1, h2, h3, .display { font-family: "Fredoka", "Nunito", sans-serif; letter-spacing: 0.01em; }
h1 { font-size: clamp(1.7rem, 3.2vw, 2.4rem); line-height: 1.15; margin: 0 0 0.75rem; color: var(--brown); }
h2 { font-size: 1.35rem; margin: 0 0 0.5rem; color: var(--brown); }
p { margin: 0 0 0.9rem; }
a { color: var(--pumpkin-2); }
img { max-width: 100%; display: block; }
button { font: inherit; cursor: pointer; }
[hidden] { display: none !important; }

.container { width: min(1100px, 100% - 32px); margin-inline: auto; }

/* Top bar */
.topbar {
  position: sticky; top: 0; z-index: 30;
  background: var(--brown); color: var(--sky-2);
  box-shadow: 0 2px 12px rgba(0,0,0,0.25);
}
.topbar__inner { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 60px; }
.topbar__brand { display: flex; flex-direction: column; text-decoration: none; color: inherit; line-height: 1.2; }
.topbar__school { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.12em; opacity: 0.8; }
.topbar__event { font-family: "Fredoka", sans-serif; font-weight: 600; font-size: 1.05rem; color: var(--sky); }
.cart-btn {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--brown-3); color: var(--sky-2); border: 1px solid rgba(255,255,255,0.12);
  padding: 8px 12px; border-radius: 999px; transition: background .15s;
}
.cart-btn:hover { background: #5b3c22; }
.cart-btn__count {
  background: var(--pumpkin); color: #fff; font-weight: 700; font-size: 0.8rem;
  min-width: 22px; height: 22px; border-radius: 999px; display: grid; place-items: center; padding: 0 6px;
}
.cart-btn__total { font-weight: 700; }

/* Hero */
.hero { background: var(--brown); padding: 0; line-height: 0; }
.hero__img { width: 100%; height: auto; }

/* Intro */
.intro { padding: 32px 0 8px; }
.intro__grid { display: grid; gap: 20px; }
@media (min-width: 860px) { .intro__grid { grid-template-columns: 1.6fr 1fr; align-items: start; } }
.intro__text p { font-size: 1.02rem; color: #4a3728; }
.pickup {
  background: var(--paper); border: 2px dashed var(--pumpkin); border-radius: var(--radius);
  padding: 20px 22px; position: relative;
}
.pickup__icon { font-size: 1.8rem; position: absolute; top: 12px; right: 16px; }
.pickup h2 { color: var(--pumpkin-2); }
.pickup p { margin-bottom: 0.6rem; }
.pickup__addr { font-size: 0.95rem; }
.pickup__addr a { color: var(--brown); }
.pickup__note { font-size: 0.9rem; color: var(--muted); margin-bottom: 0; }

/* Shop */
.shop { padding: 12px 0 96px; }
.category { margin-top: 28px; }
.category__head { display: flex; align-items: baseline; gap: 12px; margin-bottom: 14px; }
.category__head h2 { font-size: 1.5rem; }
.category__head::after { content: ""; flex: 1; height: 2px; background: var(--line); border-radius: 2px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 18px; }

.card {
  background: var(--paper); border-radius: var(--radius); overflow: hidden;
  box-shadow: 0 1px 0 rgba(0,0,0,0.04), 0 4px 14px rgba(42,26,15,0.06);
  display: flex; flex-direction: column; border: 1px solid var(--line);
  transition: transform .15s, box-shadow .15s;
}
.card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.card__img { width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: contain; padding: 14px; background: var(--photo-bg); }
.card__body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.card__name { font-family: "Fredoka", sans-serif; font-weight: 600; font-size: 1.05rem; line-height: 1.25; color: var(--brown); margin: 0; }
.card__variant {
  display: inline-block; align-self: flex-start; font-size: 0.75rem; font-weight: 700; letter-spacing: 0.05em;
  text-transform: uppercase; background: var(--sky-2); color: var(--brown); padding: 3px 9px; border-radius: 999px;
}
.card__desc { font-size: 0.9rem; color: var(--muted); margin: 0; flex: 1; }
.card__foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 8px; }
.card__price { font-family: "Fredoka", sans-serif; font-weight: 700; font-size: 1.25rem; color: var(--brown); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: 0; border-radius: 999px; padding: 10px 18px; font-weight: 700; transition: background .15s, transform .05s;
}
.btn:active { transform: scale(0.98); }
.btn--primary { background: var(--pumpkin); color: #fff; }
.btn--primary:hover { background: var(--pumpkin-2); }
.btn--primary:disabled { background: #cfae8f; cursor: wait; }
.btn--ghost { background: transparent; color: var(--brown); border: 1.5px solid var(--line); }
.btn--ghost:hover { background: var(--cream-2); }
.btn--block { width: 100%; }
.btn--sm { padding: 8px 14px; font-size: 0.9rem; }

.stepper { display: inline-flex; align-items: center; border: 1.5px solid var(--line); border-radius: 999px; background: #fff; }
.stepper button { width: 34px; height: 34px; border: 0; background: transparent; color: var(--brown); font-size: 1.1rem; font-weight: 700; border-radius: 999px; }
.stepper button:hover { background: var(--cream-2); }
.stepper output { min-width: 28px; text-align: center; font-weight: 700; }
.in-cart { color: var(--ok); font-size: 0.8rem; font-weight: 700; }

/* Donation card */
.donate { grid-column: 1 / -1; display: grid; gap: 0; }
.donate .card__img { object-fit: cover; padding: 0; background: var(--cream-2); }
@media (min-width: 700px) { .donate { grid-template-columns: 260px 1fr; } .donate .card__img { height: 100%; } }
.donate__presets { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0; }
.chip {
  border: 1.5px solid var(--line); background: #fff; color: var(--brown); padding: 8px 14px; border-radius: 999px; font-weight: 700;
}
.chip[aria-pressed="true"], .chip:hover { border-color: var(--pumpkin); background: #fdf1e5; }
.amount { display: flex; align-items: center; gap: 8px; }
.amount__field { position: relative; flex: 1; max-width: 220px; }
.amount__field span { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); font-weight: 700; }
.amount__field input {
  width: 100%; padding: 10px 12px 10px 26px; border: 1.5px solid var(--line); border-radius: 12px; font: inherit; font-weight: 700; font-size: 1.05rem;
}
.amount__field input:focus { outline: 2px solid var(--pumpkin); border-color: transparent; }

/* Footer */
.footer { background: var(--brown); color: var(--sky-2); padding: 28px 0 40px; text-align: center; }
.footer a { color: var(--sky); }
.footer__addr { margin: 0 0 0.6rem; }
.footer__fine { font-size: 0.85rem; opacity: 0.85; margin: 0; }

/* Mobile bar */
.mobile-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 25;
  background: var(--paper); border-top: 1px solid var(--line); box-shadow: 0 -6px 20px rgba(0,0,0,0.08);
  display: flex; align-items: center; justify-content: space-between; padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
}
.mobile-bar__label { font-size: 0.8rem; color: var(--muted); }
.mobile-bar__total { font-family: "Fredoka", sans-serif; font-weight: 700; font-size: 1.15rem; }
@media (min-width: 860px) { .mobile-bar { display: none; } }

/* Drawer */
.drawer-backdrop { position: fixed; inset: 0; background: rgba(42,26,15,0.45); z-index: 40; }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: min(420px, 100%); z-index: 41;
  background: var(--paper); display: flex; flex-direction: column;
  transform: translateX(100%); visibility: hidden; transition: transform .22s ease, visibility 0s linear .22s; box-shadow: -10px 0 40px rgba(0,0,0,0.2);
}
.drawer.is-open { transform: translateX(0); visibility: visible; transition: transform .22s ease; }
.drawer__head { display: flex; align-items: center; justify-content: space-between; padding: 18px 20px; border-bottom: 1px solid var(--line); }
.drawer__head h2 { margin: 0; }
.icon-btn { background: transparent; border: 0; font-size: 1.1rem; color: var(--muted); width: 36px; height: 36px; border-radius: 999px; }
.icon-btn:hover { background: var(--cream-2); color: var(--brown); }
.drawer__body { flex: 1; overflow: auto; padding: 8px 20px; }
.drawer__empty { text-align: center; color: var(--muted); padding: 48px 0; }
.line { display: grid; grid-template-columns: 56px 1fr auto; gap: 12px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); }
.line img { width: 56px; height: 56px; border-radius: 10px; object-fit: cover; }
.line__name { font-weight: 700; font-size: 0.95rem; line-height: 1.25; }
.line__meta { font-size: 0.8rem; color: var(--muted); }
.line__right { text-align: right; display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.line__price { font-weight: 700; }
.link-btn { background: none; border: 0; color: var(--err); font-size: 0.8rem; font-weight: 700; padding: 0; }
.drawer__foot { padding: 16px 20px calc(16px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); display: grid; gap: 10px; }
.drawer__row { display: flex; justify-content: space-between; font-size: 1.1rem; }
.drawer__hint { font-size: 0.82rem; color: var(--muted); margin: 0; }
.error { color: var(--err); font-weight: 700; font-size: 0.9rem; margin: 0; }

/* Toast */
.toast {
  position: fixed; left: 50%; bottom: 84px; transform: translateX(-50%); z-index: 50;
  background: var(--brown); color: var(--sky-2); padding: 10px 16px; border-radius: 999px; font-weight: 700;
  box-shadow: var(--shadow); animation: toast-in .2s ease;
}
@media (min-width: 860px) { .toast { bottom: 28px; } }
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, 8px); } to { opacity: 1; transform: translate(-50%, 0); } }

/* Success page */
.receipt { max-width: 640px; margin: 32px auto 80px; background: var(--paper); border-radius: var(--radius); border: 1px solid var(--line); padding: 28px; box-shadow: var(--shadow); }
.receipt__check { width: 64px; height: 64px; border-radius: 999px; background: #e6f4ea; color: var(--ok); display: grid; place-items: center; font-size: 2rem; margin-bottom: 12px; }
.receipt table { width: 100%; border-collapse: collapse; margin: 16px 0; }
.receipt td { padding: 8px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.receipt td:last-child { text-align: right; white-space: nowrap; font-weight: 700; }
.receipt tfoot td { border: 0; font-size: 1.1rem; }
.receipt__meta { display: grid; grid-template-columns: auto 1fr; gap: 4px 14px; font-size: 0.95rem; margin: 12px 0; }
.receipt__meta dt { color: var(--muted); }
.receipt__meta dd { margin: 0; font-weight: 700; }

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