/* Green & Beans customer site.
   Every value here comes from the approved design. Do not redesign.
   Breakpoints: 860px and up = nav in the top bar. Under 600px = compact two-column menu cards. */

:root {
  --forest-dark: #163A28;   /* top bar, contact */
  --forest: #1E4D35;        /* headings, buttons, hero */
  --forest-deep: #0F2A1D;   /* footer */
  --green-text: #1E6B3F;    /* eyebrow labels on light backgrounds */
  --mint: #8FD9B0;          /* eyebrow labels on dark backgrounds */
  --cream: #FBF9F3;         /* page background */
  --cream-2: #F4F1E8;       /* about, text on dark */
  --cream-3: #E6EBDD;       /* soft text on dark */
  --mango: #F2A93B;         /* Order buttons */
  --coffee: #3A2418;        /* body text */
  --coffee-dark: #2A1608;   /* item names, text on mango */
  --muted: #5A4A3E;         /* secondary text */
  --line: #E3DCC8;          /* card borders */
  --wa-green: #1E7A3E;      /* Send on WhatsApp */
  --danger: #B3261E;
  --head: 'Barlow Condensed', 'Arial Narrow', sans-serif;
  --body: 'Figtree', system-ui, sans-serif;
  --gutter: clamp(16px, 4vw, 48px);
  --topbar-h: 65px;         /* app.js measures the real height and updates this */
  --bar-overlap: 4px;       /* the drink-type bar tucks this far UNDER the header so no sliver of page shows between them (keep equal to BAR_OVERLAP in app.js) */
}

* { box-sizing: border-box; }
html { scroll-behavior: auto; }
body {
  margin: 0; background: var(--cream); color: var(--coffee);
  font-family: var(--body); font-size: 16px; line-height: 1.5;
}
/* 100vw elements (the category bar) can be a few pixels wider than the page when a scrollbar shows.
   "clip" hides that overflow without breaking position: sticky (overflow: hidden would). */
body { overflow-x: hidden; overflow-x: clip; } /* "clip" where supported (older iPhones only know "hidden", which is fine here) */
/* While a popup is open the page behind it should not scroll. */
body.dialog-open { overflow: hidden; } /* set by app.js (the old :has() rule does not work before iOS 15.4) */
a { color: inherit; text-decoration: none; }
button, input { font-family: var(--body); }
img { display: block; }
[hidden] { display: none !important; }
/* Text for screen readers only (e.g. "to F-6" after "Directions"). */
.sr { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.loc-error { color: #7A1B14; font-weight: 600; }

/* Visible keyboard focus everywhere (mouse clicks do not show it). */
:focus-visible { outline: 3px solid var(--mango); outline-offset: 2px; }

.skip {
  position: absolute; left: 8px; top: -60px; z-index: 100;
  background: var(--mango); color: var(--coffee-dark); padding: 10px 16px; border-radius: 999px; font-weight: 700;
}
.skip:focus { top: 8px; }

.wrap { max-width: 1200px; margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter); }

/* ---------- Top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 30;
  background: var(--forest-dark); color: var(--cream-2);
  border-bottom: 1px solid rgba(244, 241, 232, 0.14);
}
.topbar-in { padding-top: 10px; padding-bottom: 10px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.brand { display: flex; align-items: center; gap: 10px; }
.brand img { width: 44px; height: 44px; object-fit: contain; }
.brand span { font-family: var(--head); font-size: 26px; font-weight: 800; letter-spacing: 0.06em; line-height: 1; white-space: nowrap; }
.nav-wide { display: none; align-items: center; gap: 4px; margin: 0 auto; }
.nav-wide a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; font-size: 17px; font-weight: 600; border-radius: 999px; }
.nav-wide a:hover { background: rgba(244, 241, 232, 0.1); }
.btn-order {
  display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 24px;
  border-radius: 999px; background: var(--mango); color: var(--coffee-dark);
  font-family: var(--head); font-size: 24px; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase;
}
.btn-order { white-space: nowrap; flex: 0 0 auto; }
.brand { min-width: 0; }
/* Phones: the button can read "Order · 12", so give it room by tightening the logo text and button padding a little. */
@media (max-width: 599px) {
  .topbar-in { gap: 8px; }
  .brand { gap: 8px; }
  .brand span { font-size: 22px; letter-spacing: 0.04em; }
  .btn-order { padding: 0 16px; font-size: 22px; }
}
.nav-narrow { background: var(--forest); color: var(--cream-2); overflow-x: auto; }
.nav-narrow div { display: flex; justify-content: center; gap: 8px; padding: 0 16px; min-width: max-content; margin: 0 auto; }
.nav-narrow a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px; font-weight: 600; }
@media (min-width: 860px) {
  .nav-wide { display: flex; }
  .nav-narrow { display: none; }
}

.closed-banner {
  background: #FDE8B8; color: #5C3A00; text-align: center; font-weight: 700;
  padding: 12px var(--gutter);
}

/* ---------- Shared section bits ---------- */
.split {
  padding-top: clamp(40px, 7vw, 88px); padding-bottom: clamp(40px, 7vw, 88px);
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(420px, 100%), 1fr)); gap: 40px; align-items: center;
}
.eyebrow { font-size: 14px; font-weight: 700; letter-spacing: 0.16em; color: var(--green-text); }
.eyebrow-light { color: var(--mint); }
.h2 {
  margin: 0; font-family: var(--head); font-weight: 800; text-transform: uppercase;
  font-size: clamp(40px, 6vw, 64px); line-height: 0.95; color: var(--forest);
}
.h2-light { color: inherit; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tags span { padding: 6px 14px; border-radius: 999px; border: 1.5px solid rgba(244, 241, 232, 0.5); font-weight: 600; font-size: 14px; }
.tags-solid span { padding: 8px 16px; border: 0; background: var(--forest); color: var(--cream-2); }
/* Photo placeholders from the design (real photos still to come from Asad). */
.ph {
  min-height: 140px; border-radius: 16px; border: 2px dashed rgba(244, 241, 232, 0.4); background: rgba(244, 241, 232, 0.07);
  display: flex; align-items: center; justify-content: center; text-align: center; padding: 16px;
  color: var(--cream-3); font-size: 14px; font-weight: 600;
}

/* ---------- Hero ---------- */
.hero { background: var(--forest); color: var(--cream-2); }
.hero-text { display: flex; flex-direction: column; gap: 24px; align-items: flex-start; }
.hero h1 {
  margin: 0; font-family: var(--head); font-weight: 800; text-transform: uppercase;
  font-size: clamp(46px, 9vw, 104px); line-height: 0.92; letter-spacing: 0.01em;
}
.hero p { margin: 0; font-size: clamp(17px, 2vw, 20px); max-width: 520px; color: var(--cream-3); }
.btn-hero {
  display: inline-flex; align-items: center; justify-content: center; gap: 12px; min-height: 60px; padding: 0 40px;
  border-radius: 999px; background: var(--mango); color: var(--coffee-dark);
  font-family: var(--head); font-size: 32px; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase;
}
.hero-photos { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.ph-tall { grid-row: span 2; min-height: 300px; }

.tagline {
  background: var(--mango); color: var(--coffee-dark); padding: 18px 16px; text-align: center;
  font-family: var(--head); font-weight: 800; font-size: clamp(26px, 4vw, 42px); letter-spacing: 0.08em; text-transform: uppercase;
}

/* ---------- About ---------- */
.about { background: var(--cream-2); }
.ph-about { min-height: 340px; border-color: #8A7A66; background: #E8E2D2; color: #4A3C30; }
.about-text { display: flex; flex-direction: column; gap: 18px; align-items: flex-start; }
.about-text p { margin: 0; font-size: 17px; max-width: 600px; }

/* ---------- Menu ---------- */
.menu { background: var(--cream); }
.menu-in {
  padding-top: clamp(40px, 7vw, 88px); padding-bottom: clamp(40px, 7vw, 88px);
  display: flex; flex-direction: column; gap: 24px;
}
.menu-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; }
.menu-head .eyebrow { margin-bottom: 8px; }
.btn-branch {
  display: inline-flex; align-items: center; gap: 10px; min-height: 48px; padding: 0 20px; border-radius: 999px;
  border: 2px solid var(--forest); background: #FFFFFF; color: var(--forest); font-size: 16px; font-weight: 700; cursor: pointer;
}

/* Sticky category bar: sits right under the top bar (height measured by app.js). */
.catbar-sticky { position: sticky; top: calc(var(--topbar-h) - var(--bar-overlap)); z-index: 20; padding: 10px 0; } /* z-index 20 is below the header's 30, so the overlap is hidden behind it */
/* The coloured bar (with a soft shadow) is drawn by ::before and runs edge to edge across the whole screen,
   while the chips inside stay in the page's content column. 100vw wide, centred on the column. */
.catbar-sticky::before {
  content: ''; position: absolute; z-index: -1; top: 0; bottom: 0; left: 50%; width: 100vw; transform: translateX(-50%);
  background: var(--cream); border-bottom: 1px solid var(--line);
  box-shadow: 0 8px 14px -10px rgba(42, 22, 8, 0.3);
}
/* Wide screens: chips scroll inside the content column and never go past its edges.
   Phones: the chips scroll all the way to the screen edge (the usual phone pattern). */
.catbar { position: relative; overflow-x: auto; scrollbar-width: none; }
@media (max-width: 599px) {
  .catbar { margin: 0 calc(-1 * var(--gutter)); padding: 0 var(--gutter); scroll-padding: 0 var(--gutter); }
}
.catbar::-webkit-scrollbar { display: none; }
.catbar-row { display: flex; gap: 8px; min-width: max-content; }
.chip {
  flex: 0 0 auto; display: inline-flex; align-items: center; min-height: 44px; padding: 0 18px; border-radius: 999px;
  font-size: 15px; font-weight: 700; cursor: pointer; border: 2px solid var(--forest); background: #FFFFFF; color: var(--forest);
}
.chip[aria-current="true"] { background: var(--forest); color: var(--cream-2); }

.cats { display: flex; flex-direction: column; gap: 44px; }
.loading { color: var(--muted); }
.cat { scroll-margin-top: 190px; display: flex; flex-direction: column; gap: 14px; }
.cat h3 {
  margin: 0; font-family: var(--head); font-weight: 800; text-transform: uppercase;
  font-size: clamp(30px, 4vw, 44px); line-height: 1; color: var(--forest);
}
.cat-note { margin: 2px 0 0; color: var(--muted); font-size: 15px; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr)); gap: 14px; }

/* Item card (wide and medium screens). The compact phone version is further down. */
.card {
  background: #FFFFFF; border: 1px solid var(--line); border-radius: 16px; padding: 14px;
  display: flex; flex-direction: column; gap: 12px; min-width: 0;
}
.card-text { display: flex; flex-direction: column; gap: 4px; }
.card-name { font-size: 19px; font-weight: 700; color: var(--coffee-dark); line-height: 1.2; }
.card-desc { font-size: 14px; color: var(--muted); }
.photo {
  position: relative; border-radius: 12px; overflow: hidden; aspect-ratio: 4 / 3; width: 100%;
  display: flex; align-items: center; justify-content: center;
}
.photo img.contain { width: 100%; height: 100%; object-fit: contain; padding: 8px; }
.photo img.cover { width: 100%; height: 100%; object-fit: cover; }
.photo img.logo { width: 38%; height: auto; opacity: 0.9; }

/* The add control: a "+" button, then a qty badge, or the full [trash/-] qty [+] pill while you are tapping. */
.ctl {
  position: absolute; right: 10px; bottom: 10px; display: flex; align-items: center;
  background: #FFFFFF; border-radius: 999px; box-shadow: 0 2px 8px rgba(42, 22, 8, 0.25);
}
.ctl-btn {
  width: 48px; height: 48px; border-radius: 999px; border: 0; background: #FFFFFF; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; padding: 0;
}
.ctl-badge {
  min-width: 48px; height: 48px; border-radius: 999px; border: 0; background: var(--forest); color: var(--cream-2);
  font-size: 18px; font-weight: 800; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; padding: 0 6px;
}
.ctl-qty { min-width: 24px; text-align: center; font-size: 17px; font-weight: 800; color: var(--coffee-dark); }

.card-bottom { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }
.price { font-size: 20px; font-weight: 800; color: var(--forest); }
.opts { display: flex; flex-wrap: wrap; gap: 8px; }
.opt {
  display: inline-flex; align-items: center; gap: 5px; min-height: 44px; padding: 0 16px; font-size: 15px;
  border-radius: 999px; font-weight: 700; cursor: pointer; border: 2px solid var(--forest); background: #FFFFFF; color: var(--forest);
}
.opt[aria-pressed="true"] { background: var(--forest); color: var(--cream-2); }
.opt-qty {
  min-width: 22px; height: 22px; border-radius: 999px; background: var(--mango); color: var(--coffee-dark);
  font-size: 12px; font-weight: 800; display: inline-flex; align-items: center; justify-content: center; padding: 0 5px;
}

/* Compact phone layout: two cards per row. */
@media (max-width: 599px) {
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .card { border-radius: 14px; padding: 10px; gap: 8px; }
  .card-name { font-size: 15px; min-height: 36px; }
  .card-desc {
    font-size: 12px; line-height: 1.3;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  }
  .ctl { right: 6px; bottom: 6px; }
  /* Design had 40px here; raised to 44px to meet the touch-target rule. */
  .ctl-btn { width: 44px; height: 44px; }
  .ctl-badge { min-width: 44px; height: 44px; font-size: 16px; }
  .card-bottom { flex-direction: column; align-items: flex-start; gap: 6px; }
  .price { font-size: 16px; }
  .opts { gap: 6px; }
  /* Design had 36px size chips; raised to 44px (the 44 px touch-target rule). */
  .opt { min-height: 44px; padding: 0 11px; font-size: 13px; }
}

/* ---------- Contact ---------- */
.contact { background: var(--forest-dark); color: var(--cream-2); }
.contact-in {
  padding-top: clamp(40px, 7vw, 88px); padding-bottom: clamp(40px, 7vw, 88px);
  display: flex; flex-direction: column; gap: 28px;
}
.contact-in .eyebrow { margin-bottom: 8px; }
.branch-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); gap: 16px; }
.bcard {
  background: rgba(244, 241, 232, 0.07); border: 1px solid rgba(244, 241, 232, 0.2); border-radius: 16px; padding: 22px;
  display: flex; flex-direction: column; gap: 14px;
}
.bcard h3 { margin: 0; font-family: var(--head); font-weight: 800; font-size: 44px; line-height: 1; text-transform: uppercase; }
.bcard dl { margin: 0; display: flex; flex-direction: column; gap: 14px; }
.bcard dt { font-size: 13px; font-weight: 700; letter-spacing: 0.12em; color: var(--mint); }
.bcard dd { margin: 2px 0 0; color: var(--cream-3); }
.bcard-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.bcard-actions a {
  display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 20px; border-radius: 999px; font-weight: 600;
  border: 1.5px solid rgba(244, 241, 232, 0.6);
}
.bcard-actions a.primary { background: var(--mango); color: var(--coffee-dark); font-weight: 700; border: 0; }

/* ---------- Footer ---------- */
.footer { background: var(--forest-deep); color: var(--cream-3); }
.footer-in { padding-top: 32px; padding-bottom: 32px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; }
.footer-brand { display: flex; align-items: center; gap: 14px; }
.footer-brand img { width: 64px; height: 64px; object-fit: contain; }
.footer-brand div { display: flex; flex-direction: column; gap: 4px; }
.footer-name { font-family: var(--head); font-size: 28px; font-weight: 800; letter-spacing: 0.06em; color: var(--cream-2); }
.footer-tag { font-size: 13px; letter-spacing: 0.14em; color: var(--mint); }
.footer-in > a { display: inline-flex; align-items: center; min-height: 44px; font-weight: 600; color: var(--cream-2); }

/* ---------- Popups (native <dialog>) ---------- */
dialog { padding: 0; border: 0; color: var(--coffee); background: var(--cream); }

/* Branch popup: centred card */
.modal { width: min(520px, calc(100% - 32px)); max-height: calc(100% - 32px); border-radius: 20px; }
.modal::backdrop { background: rgba(15, 42, 29, 0.72); }
.modal-box { padding: 24px; display: flex; flex-direction: column; gap: 16px; }
.modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.modal-head h2 { margin: 0 0 4px; font-family: var(--head); font-weight: 800; text-transform: uppercase; font-size: 34px; line-height: 1; color: var(--forest); }
.modal-head p { margin: 0; color: var(--muted); font-size: 15px; }
.btn-close {
  flex: 0 0 auto; width: 44px; height: 44px; border-radius: 999px; border: 1.5px solid #BFB59C; background: #FFFFFF; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
}
.btn-close-light { border-color: rgba(244, 241, 232, 0.6); background: transparent; }
.btn-nearest {
  display: flex; align-items: center; gap: 14px; width: 100%; min-height: 64px; padding: 12px 16px; border-radius: 14px; cursor: pointer;
  border: 2px solid var(--coffee-dark); background: var(--mango); color: var(--coffee-dark); text-align: left;
}
.btn-nearest svg { flex: 0 0 auto; }
.btn-nearest span { display: flex; flex-direction: column; gap: 2px; }
.btn-nearest strong { font-size: 18px; font-weight: 800; }
.btn-nearest small { font-size: 13px; font-weight: 500; }
.notice { padding: 10px 14px; border-radius: 10px; background: #FDE8B8; color: #5C3A00; font-size: 14px; font-weight: 600; }
.or-line { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 14px; font-weight: 600; }
.or-line span { flex: 1; height: 1px; background: #CFC6AD; }
.branch-list { display: flex; flex-direction: column; gap: 16px; }
.branch-choice {
  display: flex; flex-direction: column; align-items: flex-start; gap: 4px; width: 100%; min-height: 64px; padding: 12px 16px;
  border-radius: 14px; cursor: pointer; text-align: left; border: 2px solid var(--forest); background: #FFFFFF; color: var(--forest);
}
.branch-choice[aria-pressed="true"] { background: var(--forest); color: var(--cream-2); }
.branch-choice strong { font-family: var(--head); font-weight: 800; font-size: 32px; line-height: 1; text-transform: uppercase; }
.branch-choice span { font-size: 14px; }

/* Cart panel: slides in from the right, full height */
.drawer {
  margin: 0 0 0 auto; width: min(480px, 100%); max-width: 100%; height: 100%; max-height: 100%;
  overflow-y: auto; overscroll-behavior: contain;
}
.drawer::backdrop { background: rgba(15, 42, 29, 0.6); }
.drawer-head {
  position: sticky; top: 0; z-index: 2; background: var(--forest); color: var(--cream-2); padding: 14px 16px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.drawer-head h2 { margin: 0; font-family: var(--head); font-weight: 800; text-transform: uppercase; font-size: 32px; line-height: 1; }
.drawer-body { padding: 16px; display: flex; flex-direction: column; gap: 20px; }
.btn-branch-row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 52px; padding: 0 16px; border-radius: 12px;
  border: 2px solid var(--forest); background: #FFFFFF; color: var(--forest); font-size: 16px; font-weight: 700; cursor: pointer; text-align: left;
}
.u { font-size: 14px; text-decoration: underline; }

.lines { display: flex; flex-direction: column; gap: 10px; }
.line {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: #FFFFFF; border: 1px solid var(--line); border-radius: 12px; padding: 12px;
}
.line-text { display: flex; flex-direction: column; min-width: 0; }
.line-name { font-weight: 700; color: var(--coffee-dark); }
.line-sum { font-size: 14px; color: var(--muted); }
.line-ctl { display: flex; align-items: center; gap: 6px; flex: 0 0 auto; }
.line-btn {
  width: 44px; height: 44px; border-radius: 999px; border: 1.5px solid var(--forest); background: #FFFFFF; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
}
.line-btn.plus { background: var(--forest); }
.line-qty { min-width: 24px; text-align: center; font-weight: 800; }
.empty { padding: 20px; border: 2px dashed #BFB59C; border-radius: 12px; text-align: center; color: var(--muted); }

.totals { background: var(--cream-2); border-radius: 14px; padding: 16px; display: flex; flex-direction: column; gap: 8px; }
.totals > div { display: flex; justify-content: space-between; }
.totals .b { font-weight: 600; }
.totals .rule { height: 1px; background: #CFC6AD; }
.totals .total { font-size: 20px; font-weight: 800; color: var(--forest); }

.details { display: flex; flex-direction: column; gap: 14px; }
.details h3 { margin: 0; font-family: var(--head); font-weight: 800; text-transform: uppercase; font-size: 26px; color: var(--forest); }
.details label { display: flex; flex-direction: column; gap: 6px; font-weight: 600; font-size: 15px; }
.details input {
  min-height: 48px; padding: 0 14px; border-radius: 10px; border: 1.5px solid #8A7A66; background: #FFFFFF;
  color: var(--coffee-dark); font-size: 16px; /* 16px stops iPhone zooming in on focus */
}
.field { display: flex; flex-direction: column; gap: 6px; border: 0; margin: 0; padding: 0; min-width: 0; }
.field-label { font-weight: 600; font-size: 15px; padding: 0; }
.field-label.strong { font-weight: 700; }
.help { font-size: 13px; color: var(--muted); }
.btn-loc {
  display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 0 14px; border-radius: 10px;
  font-size: 15px; font-weight: 700; cursor: pointer; text-align: left;
  border: 2px dashed var(--forest); background: #FFFFFF; color: var(--forest);
}
.btn-loc[aria-pressed="true"] { border: 2px solid var(--wa-green); background: #E3F3E6; color: #14532B; }
/* Honeypot field: off screen, not display:none, because some bots skip hidden fields. */
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.pay { display: flex; gap: 8px; }
.pill {
  flex: 1 1 0; min-height: 48px; border-radius: 10px; font-size: 15px; font-weight: 700; cursor: pointer;
  border: 2px solid var(--forest); background: #FFFFFF; color: var(--forest);
}
.pill[aria-pressed="true"] { background: var(--forest); color: var(--cream-2); }

.wa-preview {
  white-space: pre-wrap; word-break: break-word; background: #DCF8C6; color: #1B2A1B; border-radius: 12px; padding: 14px;
  font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 13px; line-height: 1.5;
}

.send { display: flex; flex-direction: column; gap: 8px; padding-bottom: 16px; }
.btn-send {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 56px; border-radius: 999px; border: 0;
  background: var(--wa-green); color: #FFFFFF; font-size: 18px; font-weight: 800; cursor: pointer; padding: 0 16px; text-align: center;
}
/* Disabled look from the design (grey pill with a hint like "Add your name to continue"). */
.btn-send[aria-disabled="true"] { background: #D8D0BC; color: #4A3C30; font-size: 16px; font-weight: 700; cursor: not-allowed; }
.btn-send[aria-disabled="true"] svg { display: none; }
.send-error { padding: 10px 14px; border-radius: 10px; background: #FBE3E1; color: #7A1B14; font-size: 14px; font-weight: 600; }
.send-error.info { background: #FDE8B8; color: #5C3A00; }
.last-order { margin: 0; padding: 10px 14px; border-radius: 10px; background: #E3F3E6; color: #14532B; font-weight: 700; }
.privacy { margin: 0; font-size: 13px; color: var(--muted); text-align: center; }

/* Respect people who turn off animations in their phone settings. */
@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; }
}

/* ---------- 404 page and "JavaScript is off" message ---------- */
.nf {
  min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px;
  text-align: center; padding: var(--gutter); background: var(--forest); color: var(--cream-2);
}
.nf h1 { margin: 0; font-family: var(--head); font-weight: 800; text-transform: uppercase; font-size: clamp(46px, 10vw, 96px); line-height: 0.95; }
.nf p { margin: 0; max-width: 420px; color: var(--cream-3); }
.nf img { object-fit: contain; }
.nojs { margin: 0; padding: 16px var(--gutter); background: #FDE8B8; color: #5C3A00; font-weight: 700; text-align: center; }

/* ---------- Floating checkout button (bottom right) ---------- */
.float-cart {
  position: fixed; z-index: 40;
  right: max(16px, env(safe-area-inset-right)); bottom: max(16px, env(safe-area-inset-bottom)); /* clear of the iPhone home bar */
  width: 60px; height: 60px; border-radius: 999px; border: 0; padding: 0;
  background: var(--mango); color: var(--coffee-dark); cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 16px rgba(42, 22, 8, 0.35);
}
.float-cart:focus-visible { outline: 3px solid var(--forest); outline-offset: 3px; }
.float-count {
  position: absolute; top: -4px; right: -4px; min-width: 26px; height: 26px; padding: 0 6px; border-radius: 999px;
  background: var(--forest); color: var(--cream-2); border: 2px solid var(--cream);
  font-size: 14px; font-weight: 800; line-height: 1; display: inline-flex; align-items: center; justify-content: center;
}
/* A small bounce when something is added (switched off for people who ask for less motion). */
@keyframes float-pop { 0% { transform: scale(1); } 40% { transform: scale(1.18); } 100% { transform: scale(1); } }
.float-cart.pop { animation: float-pop 0.3s ease-out; }
@media (prefers-reduced-motion: reduce) { .float-cart.pop { animation: none; } }

/* ---------- "Please reload the page" screen ---------- */
.reload { text-align: center; align-items: stretch; }
.reload h2 { margin: 0; font-family: var(--head); font-weight: 800; text-transform: uppercase; font-size: 34px; line-height: 1; color: var(--forest); }
.reload p { margin: 0; color: var(--muted); font-size: 16px; }

/* ---------- Older iPhones (iOS 14.5 to 15.3) ---------- */
/* Browsers that do not know <dialog> would show every popup all the time, so hide it unless it has the open attribute. */
dialog:not([open]) { display: none; }

/* No showModal(): app.js adds class "no-dialog" to <html> and does the pop-up work by hand (see "popups" in app.js). */
html.no-dialog dialog[open] { display: block; position: fixed; margin: 0; overflow-y: auto; }
html.no-dialog .modal[open] { top: 50%; left: 50%; transform: translate(-50%, -50%); width: min(520px, calc(100% - 32px)); max-height: calc(100% - 32px); }
html.no-dialog .drawer[open] { top: 0; right: 0; bottom: 0; left: auto; width: min(480px, 100%); height: 100%; max-height: 100%; }
#dlg-backdrop { position: fixed; top: 0; right: 0; bottom: 0; left: 0; z-index: 59; background: rgba(15, 42, 29, 0.7); }

/* iOS before 15 does not know aspect-ratio, which would squash every photo box flat. The padding trick gives the same 4:3 box. */
@supports not (aspect-ratio: 1 / 1) {
  .photo { height: 0; padding-bottom: 75%; }
  .photo > img { position: absolute; top: 0; left: 0; }
  .photo > img.logo { top: 50%; left: 50%; transform: translate(-50%, -50%); }
}

/* The "continue without a location" option, shown only after sharing a location failed. */
.btn-link { align-self: flex-start; min-height: 44px; padding: 8px 4px; border: 0; background: none; color: var(--forest); font-size: 15px; font-weight: 700; text-decoration: underline; cursor: pointer; text-align: left; }
.btn-link[aria-pressed="true"] { color: #14532B; }
