@import url('https://fonts.googleapis.com/css2?family=Fredoka:wght@500;600;700&family=Nunito:wght@400;600;700;800&display=swap');

:root {
  /* Saveur Cuisine brand (from logo) */
  --navy: #283250;
  --navy-dark: #1d2540;
  --yellow: #fad45c;
  --yellow-soft: #fff4cf;
  --green: #68c77b;
  --green-dark: #2f8a47;   /* AA-contrast green for text on white */
  --green-soft: #e6f6e9;
  /* legacy aliases used across pages */
  --leaf: var(--navy);
  --leaf-dark: var(--navy-dark);
  --leaf-soft: var(--yellow-soft);
  --gold: var(--yellow);
  --cream: #f5f2ea;
  --paper: #ffffff;
  --ink: #1f2537;
  --muted: #646b7d;
  --line: #e4e0d4;
  --clay: #d4552f;
  --clay-soft: #fde6dc;
  --ok: #2f8a47;
  --warn: #b7791f;
  --bad: #b3261e;
  --radius: 16px;
  --shadow: 0 1px 2px rgba(40,50,80,.06), 0 6px 18px rgba(40,50,80,.08);
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: Nunito, system-ui, -apple-system, Segoe UI, sans-serif;
  background: var(--cream); color: var(--ink); font-size: 16px; line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, .serif { font-family: Fredoka, Nunito, system-ui, sans-serif; font-weight: 600; letter-spacing: 0; color: var(--navy); }
a { color: var(--leaf); }
button, input, select, textarea { font: inherit; color: inherit; }
.hidden { display: none !important; }

/* ---------- buttons & fields ---------- */
.btn {
  appearance: none; border: 1px solid var(--line); background: var(--paper); border-radius: 10px;
  padding: 10px 16px; font-weight: 600; cursor: pointer; display: inline-flex; align-items: center; gap: 8px;
  text-decoration: none; color: var(--ink); min-height: 44px; justify-content: center;
}
.btn:hover { border-color: #cfc6b0; }
.btn.primary { background: var(--yellow); border-color: var(--yellow); color: var(--navy); font-weight: 800; }
.btn.primary:hover { background: #f5c93a; border-color: #f5c93a; }
.btn.primary:disabled { background: #e9e3cf; border-color: #e9e3cf; color: #8a8f9c; cursor: not-allowed; }
.btn.clay { background: var(--clay); border-color: var(--clay); color: #fff; }
.btn.wa { background: #25d366; border-color: #25d366; color: #073b1c; }
.btn.small { min-height: 34px; padding: 6px 12px; font-size: 14px; }
.btn.block { width: 100%; }
label.field { display: block; margin-bottom: 14px; }
label.field > span { display: block; font-weight: 600; font-size: 14px; margin-bottom: 6px; }
input[type=text], input[type=tel], input[type=number], input[type=password], input[type=search], input[type=date], select, textarea {
  width: 100%; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; background: #fff;
  min-height: 46px;
}
input:focus, select:focus, textarea:focus, .btn:focus-visible { outline: 2px solid var(--leaf); outline-offset: 1px; }
textarea { min-height: 80px; resize: vertical; }
.hint { color: var(--muted); font-size: 13px; }
.error-box { background: #fdecea; color: var(--bad); border-radius: 10px; padding: 12px 14px; margin: 12px 0; font-weight: 500; }

/* ---------- customer page ---------- */
.hero {
  background: var(--navy); color: #fff; padding: 18px 20px 52px; text-align: center; position: relative; overflow: hidden;
}
.hero::after { /* leaf-fold texture */
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, var(--yellow) 0 33.3%, var(--green) 33.3% 66.6%, var(--yellow) 66.6%) bottom / 100% 0 no-repeat;
  pointer-events: none;
}
.hero .brand { margin: 0; line-height: 0; }
.hero .brand img { width: 160px; height: 160px; display: inline-block; }
.hero p { color: #fff; opacity: .85; font-family: Fredoka, sans-serif; font-weight: 500; margin-top: -18px; }
.hero p { margin: 6px 0 0; opacity: .85; }
.wrap { max-width: 640px; margin: 0 auto; padding: 0 16px; }
.card { background: var(--paper); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px; margin-bottom: 16px; }
.lift { margin-top: -32px; position: relative; z-index: 1; }
.section-title { font-size: 20px; margin: 0 0 12px; }

.product { display: flex; align-items: center; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.product:last-child { border-bottom: 0; }
.product .swatch {
  width: 52px; height: 52px; border-radius: 12px; flex: none; display: grid; place-items: center;
  background: var(--navy); color: var(--yellow); font-family: Fredoka, sans-serif; font-weight: 700; font-size: 22px;
  position: relative;
}
.product .swatch.spicy { background: var(--clay); color: #fff; }
.product .info { flex: 1; min-width: 0; }
.product .name { font-weight: 700; }
.product .meta { font-size: 13px; color: var(--muted); }
.product .price { font-weight: 800; color: var(--green-dark); }
.tag { display: inline-block; font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 99px; letter-spacing: .02em; }
.tag.spicy { background: var(--clay-soft); color: var(--clay); }
.tag.soldout { background: #eee; color: #777; }
.tag.low { background: #fff4dc; color: var(--warn); }
.stepper { display: flex; align-items: center; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; flex: none; }
.stepper button { width: 42px; height: 44px; border: 0; background: #fff; font-size: 22px; font-weight: 600; cursor: pointer; color: var(--navy); }
.stepper button:disabled { color: #c9c9c9; cursor: not-allowed; }
.stepper input { width: 46px; border: 0; text-align: center; font-weight: 700; padding: 0; min-height: 44px; border-radius: 0; -moz-appearance: textfield; }
.stepper input::-webkit-outer-spin-button, .stepper input::-webkit-inner-spin-button { -webkit-appearance: none; }
.product.soldout { opacity: .55; }

.choice { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 14px; }
.choice label {
  border: 1.5px solid var(--line); border-radius: 12px; padding: 12px; cursor: pointer; display: block; background: #fff;
}
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice label:has(input:checked) { border-color: var(--navy); background: var(--yellow-soft); box-shadow: inset 0 0 0 1px var(--navy); }
.choice label:has(input:focus-visible) { outline: 2px solid var(--leaf); }
.choice .t { font-weight: 700; display: block; }
.choice .s { font-size: 13px; color: var(--muted); }

.summary-row { display: flex; justify-content: space-between; padding: 4px 0; }
.summary-row.total { font-weight: 800; font-size: 20px; border-top: 1px dashed var(--line); margin-top: 6px; padding-top: 10px; }
.sticky-bar {
  position: sticky; bottom: 0; background: rgba(251,246,236,.96); backdrop-filter: blur(6px);
  border-top: 1px solid var(--line); padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  margin: 0 -16px;
}
.sticky-bar .row { display: flex; align-items: center; gap: 12px; max-width: 640px; margin: 0 auto; }
.sticky-bar .tot { flex: 1; }
.sticky-bar .tot b { font-size: 21px; display: block; font-family: Fredoka, sans-serif; color: var(--navy); }
.sticky-bar .tot small { color: var(--muted); }
.footer { text-align: center; color: var(--muted); font-size: 13px; padding: 24px 0 40px; }

/* confirmation */
.check { width: 64px; height: 64px; border-radius: 50%; background: var(--green); color: #fff; display: grid; place-items: center; font-size: 34px; margin: 0 auto 10px; }
.order-no { font-family: Fredoka, sans-serif; font-size: 30px; font-weight: 700; color: var(--navy); }
.instructions { white-space: pre-wrap; background: #fffbea; border: 1px solid #f1e3b5; border-radius: 12px; padding: 14px; }
.pill { display: inline-block; padding: 3px 10px; border-radius: 99px; font-size: 12px; font-weight: 700; background: #eee; color: #555; white-space: nowrap; }
.pill.pending { background: #fff4dc; color: var(--warn); }
.pill.paid { background: #e3f3e8; color: var(--ok); }
.pill.failed, .pill.cancelled { background: #fdecea; color: var(--bad); }
.pill.refunded { background: #eceaf9; color: #5b4cb3; }
.pill.new { background: #e5eefc; color: #2459b3; }
.pill.confirmed, .pill.preparing { background: #fff4dc; color: var(--warn); }
.pill.ready_pickup, .pill.ready_delivery, .pill.out_for_delivery { background: #e0f2f1; color: #0b6e66; }
.pill.delivered, .pill.completed { background: #e3f3e8; color: var(--ok); }
.pill.pickup { background: var(--green-soft); color: var(--green-dark); }
.pill.delivery { background: var(--clay-soft); color: var(--clay); }
