:root {
  --green: #2e7d32;
  --green-dark: #1b5e20;
  --cream: #fbf7ef;
  --card: #ffffff;
  --ink: #20231f;
  --muted: #6b7066;
  --line: #ece6da;
  --gold: #c8941f;
  --shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
  --radius: 14px;
}

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

body {
  font-family: "Figtree", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--cream);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  padding-bottom: 110px;
}

.wrap { max-width: 520px; margin: 0 auto; }

/* Header */
header {
  position: sticky; top: 0; z-index: 30;
  background: var(--green); color: #fff;
  padding: 14px 18px; box-shadow: var(--shadow);
}
header .brand { font-size: 22px; font-weight: 800; letter-spacing: -0.3px; }
header .tag { font-size: 12.5px; opacity: 0.9; margin-top: 2px; }
.loc {
  margin-top: 10px; display: flex; align-items: center; gap: 8px;
  background: rgba(255,255,255,0.15); border-radius: 10px; padding: 8px 12px;
  font-size: 13.5px; cursor: pointer;
}
.loc select {
  background: transparent; border: none; color: #fff; font: inherit;
  font-weight: 700; cursor: pointer; outline: none; flex: 1;
}
.loc select option { color: var(--ink); }

/* Sections */
main { padding: 16px 14px 0; }
.section-title {
  font-size: 18px; font-weight: 800; margin: 22px 4px 12px;
  display: flex; align-items: center; gap: 8px;
}
.section-sub { font-size: 13px; color: var(--muted); margin: -6px 4px 12px; }

/* Cards */
.card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 14px; margin-bottom: 12px;
  box-shadow: var(--shadow); position: relative;
}
.card.default { border: 2px solid var(--green); }
.card .row { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.card .name { font-size: 16px; font-weight: 700; }
.card .serves { font-size: 12.5px; color: var(--green-dark); font-weight: 600; margin-top: 2px; }
.card .desc { font-size: 13px; color: var(--muted); margin-top: 6px; line-height: 1.45; }
.card .pitch { font-size: 12.5px; color: var(--ink); font-style: italic; margin-top: 6px; opacity: 0.8; }
.card .price { font-size: 18px; font-weight: 800; white-space: nowrap; }
.card .strike { font-size: 12.5px; color: var(--muted); text-decoration: line-through; display: block; text-align: right; }
.card .save { font-size: 11.5px; color: var(--green); font-weight: 700; text-align: right; }

.badge {
  display: inline-block; font-size: 10.5px; font-weight: 800; text-transform: uppercase;
  letter-spacing: 0.4px; padding: 3px 8px; border-radius: 6px; margin-bottom: 6px;
  background: #eef5ee; color: var(--green-dark);
}
.badge.most-loved { background: #fff4d6; color: var(--gold); }
.badge.premium { background: #ede4f5; color: #6a3aa0; }

.meta { font-size: 12.5px; color: var(--muted); }
.size-pill { font-size: 11.5px; color: var(--muted); font-weight: 600; }

/* Add / stepper */
.add-btn {
  margin-top: 10px; background: var(--green); color: #fff; border: none;
  font: inherit; font-weight: 700; font-size: 14px; padding: 9px 22px;
  border-radius: 10px; cursor: pointer; transition: transform 0.05s;
}
.add-btn:active { transform: scale(0.97); }
.stepper { margin-top: 10px; display: inline-flex; align-items: center; gap: 14px;
  border: 1.5px solid var(--green); border-radius: 10px; padding: 5px 10px; }
.stepper button { background: none; border: none; color: var(--green); font-size: 20px; font-weight: 800; cursor: pointer; line-height: 1; width: 22px; }
.stepper span { font-weight: 800; min-width: 14px; text-align: center; }

.sub-toggle {
  margin-top: 10px; display: flex; align-items: center; gap: 8px;
  font-size: 12.5px; color: var(--muted); cursor: pointer;
}
.sub-toggle input { width: 16px; height: 16px; accent-color: var(--green); }

.alc-item { display: flex; justify-content: space-between; align-items: center; padding: 12px 4px; border-bottom: 1px solid var(--line); }
.alc-item:last-child { border-bottom: none; }
.alc-left .name { font-size: 14.5px; font-weight: 700; }
.alc-left .note { font-size: 12px; color: var(--muted); margin-top: 2px; }
.alc-right { text-align: right; }
.alc-right .price { font-size: 15px; font-weight: 800; }

/* Attach banner */
.attach {
  background: #fff8e6; border: 1px solid #f0e2b8; border-radius: var(--radius);
  padding: 12px 14px; margin: 4px 4px 14px; display: flex; align-items: center;
  justify-content: space-between; gap: 12px;
}
.attach .txt { font-size: 13px; }
.attach .txt b { color: var(--gold); }
.attach button { background: var(--gold); color: #fff; border: none; font: inherit; font-weight: 700; font-size: 13px; padding: 8px 14px; border-radius: 9px; cursor: pointer; white-space: nowrap; }
.attach .close { background: none; color: var(--muted); font-size: 18px; padding: 0 4px; }

/* Cart bar */
.cartbar {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 40;
  background: var(--green-dark); color: #fff;
  max-width: 520px; margin: 0 auto;
  padding: 12px 16px; box-shadow: 0 -4px 14px rgba(0,0,0,0.12);
  transform: translateY(110%); transition: transform 0.25s ease;
}
.cartbar.show { transform: translateY(0); }
.cartbar .nudge { font-size: 12.5px; text-align: center; padding-bottom: 8px; opacity: 0.95; }
.cartbar .nudge b { color: #ffe08a; }
.cartbar .free { color: #aef0b0; font-weight: 700; }
.cartbar .main { display: flex; justify-content: space-between; align-items: center; }
.cartbar .summary { font-size: 13px; }
.cartbar .summary .total { font-size: 19px; font-weight: 800; }
.cartbar .checkout {
  background: #fff; color: var(--green-dark); border: none; font: inherit;
  font-weight: 800; font-size: 15px; padding: 12px 22px; border-radius: 11px; cursor: pointer;
}
.cartbar .checkout:disabled { opacity: 0.55; cursor: not-allowed; }

footer { text-align: center; font-size: 11.5px; color: var(--muted); padding: 26px 16px 10px; }

/* Location gate */
.gate {
  position: fixed; inset: 0; z-index: 60; background: rgba(20,30,18,0.55);
  display: flex; align-items: center; justify-content: center; padding: 24px;
}
.gate .box { background: #fff; border-radius: 18px; padding: 26px 22px; max-width: 380px; width: 100%; text-align: center; }
.gate h2 { font-size: 20px; margin-bottom: 6px; }
.gate p { font-size: 13.5px; color: var(--muted); margin-bottom: 18px; }
.gate select { width: 100%; padding: 13px; font: inherit; font-size: 15px; border: 1.5px solid var(--line); border-radius: 11px; margin-bottom: 14px; }
.gate button { width: 100%; background: var(--green); color: #fff; border: none; font: inherit; font-weight: 800; font-size: 15px; padding: 13px; border-radius: 11px; cursor: pointer; }
.hidden { display: none !important; }

/* ── Web checkout sheet ──────────────────────────────────────── */
.sheet { position: fixed; inset: 0; z-index: 70; background: rgba(20,30,18,0.55); display: flex; align-items: flex-end; justify-content: center; }
.sheet.hidden { display: none !important; }
.sheet .panel { background: #fff; width: 100%; max-width: 520px; border-radius: 20px 20px 0 0; padding: 20px 18px calc(22px + env(safe-area-inset-bottom)); max-height: 92vh; overflow-y: auto; }
.sheet h2 { font-size: 19px; margin-bottom: 4px; }
.sheet .sub { font-size: 13px; color: var(--muted); margin-bottom: 16px; }
.field { margin-bottom: 13px; }
.field label { display: block; font-size: 12.5px; font-weight: 700; margin-bottom: 5px; }
.field input, .field textarea, .field select { width: 100%; padding: 12px; font: inherit; font-size: 15px; border: 1.5px solid var(--line); border-radius: 11px; background: #fff; }
.field textarea { resize: vertical; min-height: 62px; }
.field input:focus, .field textarea:focus, .field select:focus { outline: none; border-color: var(--green); }
.field.bad input, .field.bad textarea { border-color: #d33; }
.pay-opts { display: flex; gap: 10px; }
.pay-opt { flex: 1; border: 1.5px solid var(--line); border-radius: 11px; padding: 11px; cursor: pointer; text-align: center; font-size: 14px; font-weight: 800; }
.pay-opt.sel { border-color: var(--green); background: #eef5ee; color: var(--green-dark); }
.pay-opt small { display: block; font-weight: 600; font-size: 11px; color: var(--muted); margin-top: 3px; }
.order-recap { background: var(--cream); border: 1px solid var(--line); border-radius: 11px; padding: 12px; font-size: 13px; margin: 4px 0 14px; }
.order-recap .ln { display: flex; justify-content: space-between; padding: 2px 0; }
.order-recap .tot { font-weight: 800; font-size: 15px; border-top: 1px solid var(--line); margin-top: 6px; padding-top: 6px; }
.place-btn { width: 100%; background: var(--green); color: #fff; border: none; font: inherit; font-weight: 800; font-size: 16px; padding: 14px; border-radius: 12px; cursor: pointer; margin-top: 4px; }
.place-btn:disabled { opacity: 0.6; cursor: progress; }
.sheet-cancel { width: 100%; background: none; border: none; color: var(--muted); font: inherit; font-size: 13.5px; padding: 12px; margin-top: 2px; cursor: pointer; }

/* ── Confirmation screen ─────────────────────────────────────── */
.confirm { position: fixed; inset: 0; z-index: 80; background: var(--cream); display: flex; align-items: center; justify-content: center; padding: 24px; }
.confirm.hidden { display: none !important; }
.confirm .box { max-width: 400px; width: 100%; text-align: center; }
.confirm .tick { width: 72px; height: 72px; border-radius: 50%; background: #e7f4e8; color: var(--green); font-size: 38px; display: flex; align-items: center; justify-content: center; margin: 0 auto 14px; }
.confirm h2 { font-size: 22px; color: var(--green-dark); margin-bottom: 6px; }
.confirm p { font-size: 14px; color: var(--muted); margin-bottom: 6px; line-height: 1.5; }
.confirm .oid { font-weight: 800; color: var(--ink); }
.confirm .wa-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; width: 100%; background: #25D366; color: #fff; text-decoration: none; font-weight: 800; font-size: 16px; padding: 14px; border-radius: 12px; margin: 18px 0 8px; }
.confirm .track-link { display: block; color: var(--green); font-size: 14px; font-weight: 700; text-decoration: none; padding: 8px; }
.confirm .again { color: var(--muted); font-size: 13px; margin-top: 12px; background: none; border: none; cursor: pointer; width: 100%; }
