/* Food-app redesign (default template) — styles driven by theme vars from menu.js */

:root {
  --primary: #f4623a;
  --secondary: #f4a13a;
  --surface: #ffffff;
  --ink: #20232b;
  --muted: #8b8f97;
  --green: #22c55e;
  --bg: color-mix(in srgb, var(--primary) 8%, var(--surface));
  --tint: color-mix(in srgb, var(--primary) 12%, var(--surface));
  --radius: 24px;
  --shadow-card: 0 14px 30px -18px color-mix(in srgb, var(--primary) 45%, transparent);
  --shadow-float: 0 16px 36px rgba(34, 30, 30, 0.14);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  min-height: 100dvh;
}
body.preset-serif { font-family: Georgia, "Times New Roman", serif; }
body.preset-rounded { font-family: ui-rounded, "SF Pro Rounded", "Segoe UI", sans-serif; }
body.theme-modern { --bg: #f1f2f5; }
body.theme-minimal { --bg: #fafafa; }

h1, h2, h3, p { margin: 0; }
img { display: block; }
button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}
input, textarea {
  font: inherit;
  color: inherit;
}
a { color: var(--primary); }

.app {
  max-width: 520px;
  margin: 0 auto;
  padding: 20px 20px 150px;
  min-height: 100dvh;
}
.app.no-tabbar { padding-bottom: calc(96px + env(safe-area-inset-bottom, 0px)); }

.sr {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ---------- generic states ---------- */

.loading, .empty {
  text-align: center;
  color: var(--muted);
  padding: 60px 10px;
  font-size: 14px;
}
.empty .cta { margin-top: 16px; }
.error {
  color: #b3401f;
  font-size: 13px;
  padding: 10px 14px;
  background: color-mix(in srgb, #b3401f 8%, var(--surface));
  border-radius: calc(var(--radius) * 0.6);
}
.hidden { display: none !important; }

.toast {
  position: fixed;
  left: 50%;
  bottom: 110px;
  transform: translateX(-50%) translateY(14px);
  background: #23262d;
  color: #fff;
  font-size: 13.5px;
  padding: 11px 18px;
  border-radius: 999px;
  opacity: 0;
  pointer-events: none;
  transition: all 0.25s ease;
  z-index: 90;
  max-width: min(90vw, 420px);
  text-align: center;
}
.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.closed-banner {
  position: sticky;
  top: 0;
  z-index: 80;
  background: color-mix(in srgb, var(--primary) 14%, var(--surface));
  color: var(--primary);
  font-size: 12.5px;
  font-weight: 700;
  text-align: center;
  padding: max(10px, env(safe-area-inset-top)) 16px 10px;
}

/* ---------- shared bits ---------- */

.cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--primary);
  color: #fff;
  font-weight: 800;
  font-size: 15px;
  padding: 14px 24px;
  border-radius: 999px;
  text-decoration: none;
  box-shadow: var(--shadow-card);
}
.cta:disabled { opacity: 0.55; }
.cta.green {
  background: var(--green);
  box-shadow: 0 14px 30px -14px color-mix(in srgb, var(--green) 60%, transparent);
}
.ghost-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 11px 18px;
  border-radius: 999px;
  border: 1.5px solid color-mix(in srgb, var(--primary) 35%, transparent);
  color: var(--primary);
  font-weight: 700;
  font-size: 13.5px;
  background: var(--surface);
}
.text-link {
  color: var(--primary);
  font-weight: 700;
  font-size: 13px;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  white-space: nowrap;
  flex: none;
}
.text-link svg { width: 16px; height: 16px; flex: none; }
.muted { color: var(--muted); }
.danger-link { color: #b3401f; font-size: 13px; font-weight: 700; }

.round-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--surface);
  box-shadow: var(--shadow-card);
  display: inline-grid;
  place-items: center;
  color: var(--ink);
  flex: none;
}
.round-btn svg { width: 20px; height: 20px; }
.round-btn.heart-active { color: var(--primary); }
.round-btn.bag { color: var(--primary); position: relative; }
.badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--primary);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  display: grid;
  place-items: center;
  border: 2px solid var(--surface);
}

.page-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}
.page-head::after {
  content: "";
  width: 44px;
  flex: none;
}
.page-head .page-title {
  flex: 1;
  text-align: center;
  font-size: 20px;
  font-weight: 800;
}
.page-title h1 { font-size: inherit; }

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 26px 0 14px;
}
.section-head h2 { font-size: 19px; font-weight: 800; }

.field { display: block; margin-top: 14px; }
.field span {
  display: block;
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 8px;
}
.field input, .field textarea {
  width: 100%;
  background: var(--surface);
  border: 1.5px solid color-mix(in srgb, var(--primary) 18%, transparent);
  border-radius: calc(var(--radius) * 0.7);
  padding: 14px 16px;
  font-size: 14.5px;
  resize: vertical;
}
.field input:focus, .field textarea:focus {
  outline: none;
  border-color: var(--primary);
}

.veg-mark {
  width: 14px;
  height: 14px;
  border-radius: 3px;
  border: 2px solid #c03a2b;
  display: inline-grid;
  place-items: center;
  vertical-align: -2px;
  flex: none;
}
.veg-mark::after {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #c03a2b;
}
.veg-mark.veg { border-color: #2e8b3d; }
.veg-mark.veg::after { background: #2e8b3d; }

/* ---------- home ---------- */

.home-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 22px;
}
.outlet-btn {
  flex: 1;
  display: flex;
  gap: 10px;
  align-items: center;
  text-align: left;
  min-width: 0;
}
.outlet-btn .pin { color: var(--primary); flex: none; }
.outlet-btn .pin svg { width: 24px; height: 24px; }
.outlet-info { min-width: 0; }
.outlet-btn strong {
  display: block;
  font-size: 16.5px;
  font-weight: 800;
  color: var(--primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.outlet-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
}
.outlet-badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 3px 9px;
  font-size: 11.5px;
  font-weight: 800;
}
.outlet-badge.open {
  background: color-mix(in srgb, var(--green) 16%, var(--surface));
  color: color-mix(in srgb, var(--green) 70%, #14532d);
}
.outlet-badge.closed {
  background: color-mix(in srgb, var(--primary) 16%, var(--surface));
  color: color-mix(in srgb, var(--primary) 75%, #5a1c0c);
}
.outlet-btn strong svg {
  width: 13px;
  height: 13px;
  vertical-align: -1px;
  color: var(--primary);
}
.home-head .round-btn { width: 48px; height: 48px; }
.brand-logo {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--surface);
  flex: none;
}
.home-head .bag svg { width: 21px; height: 21px; }

.closed-outlet {
  background: color-mix(in srgb, var(--primary) 12%, var(--surface));
  color: color-mix(in srgb, var(--primary) 78%, #4a1a0c);
  border: 1px solid color-mix(in srgb, var(--primary) 22%, transparent);
  border-radius: calc(var(--radius) * 0.7);
  padding: 12px 16px;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.4;
  margin-bottom: 18px;
}

.hero { margin-bottom: 18px; }
.hero h1 {
  font-size: 34px;
  line-height: 1.12;
  font-weight: 800;
  letter-spacing: -0.5px;
}
.hero .hero-sub {
  font-size: 27px;
  font-weight: 500;
  letter-spacing: -0.5px;
  color: color-mix(in srgb, var(--ink) 88%, transparent);
}

.searchbar {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--surface);
  border-radius: calc(var(--radius) * 0.75);
  padding: 15px 18px;
  box-shadow: var(--shadow-card);
  margin-bottom: 18px;
}
.searchbar svg {
  width: 19px;
  height: 19px;
  color: var(--muted);
  flex: none;
}
.searchbar input {
  flex: 1;
  border: 0;
  outline: none;
  background: none;
  font-size: 14.5px;
  min-width: 0;
}

.notice {
  background: color-mix(in srgb, var(--secondary) 16%, var(--surface));
  color: color-mix(in srgb, var(--secondary) 60%, #40300a);
  font-size: 12.5px;
  font-weight: 600;
  padding: 10px 16px;
  border-radius: calc(var(--radius) * 0.6);
  margin-bottom: 16px;
}
.notice.read-only {
  background: color-mix(in srgb, var(--primary) 10%, var(--surface));
  color: color-mix(in srgb, var(--primary) 55%, #4a1a0c);
}

.free-delivery {
  background: color-mix(in srgb, var(--green) 14%, var(--surface));
  color: color-mix(in srgb, var(--green) 65%, #14532d);
  border-radius: calc(var(--radius) * 0.6);
  padding: 11px 16px;
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 14px;
}

.chips {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 2px 2px 6px;
  scrollbar-width: none;
  margin: 0 -2px 4px;
}
.chips::-webkit-scrollbar { display: none; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: var(--surface);
  color: color-mix(in srgb, var(--ink) 78%, var(--surface));
  border-radius: 999px;
  padding: 11px 16px;
  font-size: 13.5px;
  font-weight: 700;
  white-space: nowrap;
  box-shadow: var(--shadow-card);
  flex: none;
}
.chip.active {
  background: var(--primary);
  color: #fff;
}
.chip-icon { font-size: 14px; line-height: 1; }

.rail {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  padding: 6px 2px 14px;
  scrollbar-width: none;
  margin: 0 -2px;
}
.rail::-webkit-scrollbar { display: none; }

.pop-card {
  position: relative;
  min-width: 176px;
  max-width: 176px;
  background: var(--surface);
  border-radius: calc(var(--radius) * 0.83);
  padding: 18px 14px 24px;
  box-shadow: var(--shadow-card);
  flex: none;
  cursor: pointer;
}
.pop-thumb {
  display: block;
  width: 118px;
  height: 118px;
  border-radius: 50%;
  margin: 0 auto 16px;
  background: radial-gradient(
    closest-side,
    var(--tint),
    color-mix(in srgb, var(--tint) 40%, transparent) 82%,
    transparent
  );
  overflow: hidden;
}
.pop-thumb img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}
.pop-card h3 {
  font-size: 14px;
  font-weight: 800;
  line-height: 1.3;
  padding-right: 6px;
}
.pop-price {
  display: block;
  color: var(--primary);
  font-weight: 800;
  font-size: 15px;
  margin-top: 5px;
}
.pop-add {
  position: absolute;
  right: 0;
  bottom: 0;
  background: var(--primary);
  color: #fff;
  font-weight: 800;
  font-size: 13.5px;
  padding: 11px 20px;
  border-radius: 14px 0 calc(var(--radius) * 0.83) 0;
  box-shadow: var(--shadow-card);
}
.pop-add:disabled, .row-add:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  box-shadow: none;
}

/* menu rows */

.menu-group-title {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 14px;
  font-weight: 800;
  color: color-mix(in srgb, var(--ink) 65%, transparent);
  margin: 0 2px 10px;
}
.menu-group + .menu-group .menu-group-title { margin-top: 20px; }

.food-row {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--surface);
  border-radius: calc(var(--radius) * 0.83);
  padding: 14px;
  box-shadow: var(--shadow-card);
  margin-bottom: 14px;
  cursor: pointer;
}
.row-thumb {
  display: block;
  width: 66px;
  height: 66px;
  border-radius: 50%;
  background: radial-gradient(closest-side, var(--tint), transparent 82%);
  overflow: hidden;
  flex: none;
}
.row-thumb img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}
.row-body {
  flex: 1;
  min-width: 0;
}
.row-body h3 {
  font-size: 15px;
  font-weight: 800;
  line-height: 1.3;
  display: flex;
  align-items: center;
  gap: 7px;
}
.row-body p {
  font-size: 12.5px;
  color: var(--muted);
  margin-top: 3px;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.row-price {
  display: block;
  color: var(--primary);
  font-weight: 800;
  font-size: 15px;
  margin-top: 4px;
}
.row-add {
  align-self: center;
  flex: none;
  background: var(--primary);
  color: #fff;
  font-weight: 800;
  font-size: 13.5px;
  padding: 12px 24px;
  border-radius: 999px;
  box-shadow: var(--shadow-card);
}

/* ---------- floating cart bar ---------- */

.cart-bar {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: calc(96px + env(safe-area-inset-bottom, 0px));
  width: min(480px, calc(100% - 32px));
  background: var(--surface);
  border-radius: calc(var(--radius) * 0.75);
  box-shadow: var(--shadow-float);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px 10px 14px;
  z-index: 45;
}
.cart-bar-emoji {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--tint);
  display: grid;
  place-items: center;
  font-size: 18px;
  flex: none;
}
.cart-bar-body { flex: 1; min-width: 0; }
.cart-bar-body strong { display: block; font-size: 13.5px; font-weight: 800; }
.cart-bar-body small { display: block; color: var(--muted); font-size: 12px; }
.cart-bar-view {
  color: var(--primary);
  font-weight: 800;
  font-size: 13.5px;
  letter-spacing: 0.4px;
  flex: none;
}
.cart-bar-close {
  color: #9899a1;
  flex: none;
  display: grid;
  place-items: center;
}
.cart-bar-close svg { width: 18px; height: 18px; }

/* ---------- tabbar ---------- */

.tabbar {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: 0;
  width: min(520px, 100%);
  background: var(--surface);
  border-radius: 26px 26px 0 0;
  box-shadow: 0 -10px 30px rgba(60, 40, 30, 0.08);
  display: flex;
  justify-content: space-around;
  padding: 16px 12px calc(16px + env(safe-area-inset-bottom));
  z-index: 50;
}
.tab {
  display: grid;
  justify-items: center;
  gap: 5px;
  color: #a3a6ad;
  width: 64px;
}
.tab svg { width: 24px; height: 24px; }
.tab .dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: transparent;
}
.tab.active { color: var(--primary); }
.tab.active .dot { background: var(--primary); }

/* ---------- item detail ---------- */

.detail-screen { padding-top: 4px; }
.detail-hero {
  position: relative;
  padding: 10px 0 8px;
}
.detail-hero .dish-img {
  width: min(320px, 78%);
  aspect-ratio: 1;
  border-radius: 50%;
  object-fit: cover;
  margin: 26px auto 0;
  background: radial-gradient(
    closest-side,
    var(--tint),
    color-mix(in srgb, var(--tint) 35%, transparent) 84%,
    transparent
  );
  padding: 22px;
}
.detail-top {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  justify-content: space-between;
}
.detail-title {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 20px 0 8px;
}
.detail-title h1 { font-size: 25px; font-weight: 800; line-height: 1.2; }

.qty-outline {
  display: inline-flex;
  align-items: center;
  gap: 20px;
  border: 1.5px solid color-mix(in srgb, var(--primary) 55%, transparent);
  border-radius: calc(var(--radius) * 0.5);
  padding: 8px 16px;
  margin: 12px 0 4px;
  font-weight: 800;
  color: var(--primary);
}
.qty-outline button {
  font-size: 19px;
  line-height: 1;
  color: var(--primary);
  padding: 2px 6px;
}
.qty-outline button:disabled { color: color-mix(in srgb, var(--primary) 35%, #bbb); cursor: default; }
.qty-outline .qty-value { font-size: 15.5px; min-width: 18px; text-align: center; }

.detail-desc {
  color: color-mix(in srgb, var(--ink) 62%, transparent);
  font-size: 15.5px;
  line-height: 1.55;
  margin: 14px 0 6px;
}
.divider {
  border: 0;
  border-top: 1px solid color-mix(in srgb, var(--ink) 8%, transparent);
  margin: 18px 0;
}

.option-block { margin-bottom: 6px; }
.option-block h3 { font-size: 17px; font-weight: 800; }
.option-block h3 small {
  display: block;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--muted);
  margin-top: 3px;
  margin-bottom: 6px;
}
.option-row {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 0;
  border-bottom: 1px solid color-mix(in srgb, var(--ink) 5%, transparent);
  cursor: pointer;
}
.option-row:last-child { border-bottom: 0; }
.option-row > span:not(.choice):not(.opt-price) { flex: 1; font-size: 15px; }
.option-row .opt-price {
  flex: none;
  color: color-mix(in srgb, var(--ink) 55%, transparent);
  font-size: 13px;
  font-weight: 700;
  margin-right: 4px;
}
.option-row .choice { order: 3; }
.choice {
  width: 21px;
  height: 21px;
  border-radius: calc(var(--radius) * 0.25);
  border: 1.5px solid #cfd1d6;
  background: var(--surface);
  display: inline-grid;
  place-items: center;
  flex: none;
}
.choice svg {
  width: 13px;
  height: 13px;
  color: #fff;
  opacity: 0;
}
.option-row input {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
}
.option-row input:checked ~ .choice {
  background: var(--primary);
  border-color: var(--primary);
}
.option-row input:checked ~ .choice svg { opacity: 1; }
.option-row input:focus-visible ~ .choice {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.sticky-cta {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: max(18px, env(safe-area-inset-bottom));
  width: min(480px, calc(100% - 32px));
  background: var(--primary);
  color: #fff;
  font-weight: 800;
  font-size: 16px;
  padding: 17px;
  border-radius: 999px;
  box-shadow: var(--shadow-float);
  z-index: 45;
  text-align: center;
}
.sticky-cta:disabled { opacity: 0.55; }

/* ---------- cart ---------- */

.cart-line {
  display: flex;
  gap: 14px;
  background: var(--surface);
  border-radius: calc(var(--radius) * 0.83);
  padding: 14px;
  box-shadow: var(--shadow-card);
  margin-bottom: 14px;
}
.line-thumb {
  display: block;
  width: 66px;
  height: 66px;
  border-radius: 50%;
  background: radial-gradient(closest-side, var(--tint), transparent 82%);
  overflow: hidden;
  flex: none;
}
.line-thumb img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.line-body { flex: 1; min-width: 0; }
.line-body h3 { font-size: 15px; font-weight: 800; line-height: 1.3; }
.line-opts { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.line-price { display: block; color: var(--primary); font-weight: 800; font-size: 15px; margin-top: 5px; }
.line-side {
  flex: none;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: space-between;
  gap: 8px;
}
.stepper-pill {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: color-mix(in srgb, var(--primary) 88%, var(--surface));
  color: #fff;
  border-radius: 999px;
  padding: 7px 14px;
  font-weight: 800;
}
.stepper-pill button { color: #fff; font-size: 16px; line-height: 1; padding: 2px 4px; }
.stepper-pill .qty-value { min-width: 16px; text-align: center; font-size: 14px; }
.line-remove { color: var(--muted); }
.line-remove svg { width: 17px; height: 17px; }

.summary {
  background: var(--surface);
  border-radius: calc(var(--radius) * 0.83);
  padding: 18px;
  box-shadow: var(--shadow-card);
  margin-top: 18px;
}
.summary-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 14.5px;
  color: color-mix(in srgb, var(--ink) 70%, transparent);
  padding: 6px 0;
}
.summary-row strong { font-weight: 700; color: var(--ink); }
.summary-row.total {
  color: var(--ink);
  font-weight: 800;
  font-size: 15.5px;
  padding-top: 10px;
}
.dashed {
  border: 0;
  border-top: 1.5px dashed color-mix(in srgb, var(--ink) 14%, transparent);
  margin: 10px 0 2px;
}
.summary-note {
  font-size: 12px;
  color: var(--muted);
  margin-top: 8px;
}
.checkout-cta {
  display: block;
  width: 100%;
  margin-top: 14px;
}

/* ---------- checkout ---------- */

.seg-group {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
}
.seg {
  flex: 1;
  background: var(--surface);
  border-radius: calc(var(--radius) * 0.7);
  padding: 15px 10px;
  font-weight: 700;
  font-size: 14.5px;
  text-align: center;
  box-shadow: var(--shadow-card);
  color: color-mix(in srgb, var(--ink) 75%, transparent);
}
.seg.active {
  background: var(--primary);
  color: #fff;
}
.seg.unavailable {
  color: #b9bcc2;
  box-shadow: none;
  border: 1.5px dashed #dcdde2;
  background: var(--surface);
}

.outlet-card {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  background: var(--surface);
  border-radius: calc(var(--radius) * 0.75);
  padding: 15px 16px;
  box-shadow: var(--shadow-card);
  margin-bottom: 6px;
}
.outlet-card .pin { color: var(--primary); margin-top: 1px; }
.outlet-card .pin svg { width: 20px; height: 20px; }
.outlet-card strong { display: block; font-size: 15px; font-weight: 800; }
.outlet-card small { display: block; color: var(--muted); font-size: 12.5px; margin-top: 3px; }
.outlet-card .outlet-meta { margin-top: 6px; }

.customer-card {
  background: var(--surface);
  border-radius: calc(var(--radius) * 0.75);
  padding: 14px 16px;
  box-shadow: var(--shadow-card);
  margin-top: 16px;
}
.customer-card strong { display: block; font-size: 15px; font-weight: 800; }
.customer-card small { display: block; color: var(--muted); font-size: 12.5px; margin-top: 3px; }

.address-option {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  text-align: left;
  background: var(--surface);
  border: 1.5px solid transparent;
  border-radius: calc(var(--radius) * 0.75);
  padding: 14px 16px;
  box-shadow: var(--shadow-card);
  margin-top: 12px;
}
.address-option.active { border-color: var(--primary); }
.address-option .choice { margin: 0; }
.address-option.active .choice { background: var(--primary); border-color: var(--primary); }
.address-option.active .choice svg { opacity: 1; }
.address-option span strong { display: block; font-size: 14.5px; font-weight: 800; }
.address-option span small { display: block; color: var(--muted); font-size: 12.5px; margin-top: 3px; }

.checkout-footer {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 14px 20px max(18px, env(safe-area-inset-bottom));
  background: linear-gradient(180deg, transparent, var(--bg) 26%);
  z-index: 45;
}
.checkout-footer .checkout-cta {
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
}
.checkout-footer .checkout-note { text-align: center; }
.app[data-screen="checkout"] { padding-bottom: 150px; }
.checkout-error { margin-top: 14px; }

/* ---------- success ---------- */

.success-screen {
  min-height: calc(100dvh - 60px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 10px;
  padding-bottom: 40px;
}
.check-circle {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: var(--green);
  color: #fff;
  display: grid;
  place-items: center;
  margin: 0 auto 14px;
  box-shadow: 0 20px 40px -14px color-mix(in srgb, var(--green) 60%, transparent);
}
.check-circle svg { width: 52px; height: 52px; }
.success-screen h1 { font-size: 30px; font-weight: 800; }
.success-screen p { color: color-mix(in srgb, var(--ink) 60%, transparent); font-size: 15px; line-height: 1.5; }
.success-screen .order-total { font-size: 17px; font-weight: 800; color: var(--ink); }
.success-cta { margin-top: 22px; width: min(480px, calc(100vw - 32px)); }
.success-back { font-size: 15px; margin-top: 4px; }

/* ---------- outlet picker ---------- */

.picker-sub {
  color: color-mix(in srgb, var(--ink) 60%, transparent);
  font-size: 15px;
  line-height: 1.5;
  margin-bottom: 16px;
}
.outlet-pick {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  text-align: left;
  background: var(--surface);
  border: 1.5px solid transparent;
  border-radius: calc(var(--radius) * 0.83);
  padding: 16px;
  box-shadow: var(--shadow-card);
  margin-bottom: 14px;
}
.outlet-pick.active { border-color: var(--primary); }
.outlet-pick .pick-body { flex: 1; min-width: 0; }
.outlet-pick .pick-top {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.outlet-pick strong { display: block; font-size: 16px; font-weight: 800; }
.outlet-pick .outlet-addr {
  display: block;
  color: var(--muted);
  font-size: 13px;
  margin-top: 4px;
  line-height: 1.4;
}
.outlet-pick .outlet-meta { margin-top: 6px; }
.outlet-pick .pick-check {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fff;
  background: var(--primary);
  flex: none;
}
.outlet-pick:not(.active) .pick-check {
  background: color-mix(in srgb, var(--ink) 22%, transparent);
  opacity: 0;
}
.picker-cta {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: max(18px, env(safe-area-inset-bottom));
  width: min(480px, calc(100% - 32px));
  z-index: 45;
}
.picker-cta .cta { width: 100%; }

/* ---------- orders ---------- */

.order-row {
  position: relative;
  display: block;
  width: 100%;
  text-align: left;
  background: var(--surface);
  border-radius: calc(var(--radius) * 0.83);
  padding: 16px 42px 16px 16px;
  box-shadow: var(--shadow-card);
  margin-bottom: 14px;
}
.order-chevron {
  position: absolute;
  top: 18px;
  right: 16px;
  color: var(--muted);
}
.order-chevron svg { width: 18px; height: 18px; }
.order-detail-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  background: var(--surface);
  border-radius: calc(var(--radius) * 0.83);
  padding: 16px;
  box-shadow: var(--shadow-card);
}
.order-detail-head strong { display: block; font-size: 15.5px; font-weight: 800; }
.order-detail-head small { display: block; color: var(--muted); font-size: 12.5px; margin-top: 4px; }
.order-detail-sub { color: var(--muted); font-size: 13px; margin: 10px 2px 0; }
.order-detail-item {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid color-mix(in srgb, var(--ink) 6%, transparent);
}
.order-detail-item:last-child { border-bottom: 0; }
.order-detail-item strong { font-size: 14.5px; font-weight: 700; }
.order-detail-item small { display: block; color: var(--muted); font-size: 12.5px; margin-top: 3px; }
.order-detail-item > span { flex: none; font-weight: 800; font-size: 14.5px; }
.order-row strong { display: block; font-size: 15px; font-weight: 800; }
.order-row small { display: block; color: var(--muted); font-size: 12.5px; margin-top: 3px; }
.order-row .order-meta {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 13px;
  font-weight: 700;
  margin-top: 10px;
}
.block .order-row {
  background: none;
  box-shadow: none;
  border-radius: 0;
  padding: 10px 28px 10px 0;
  margin-bottom: 0;
}
.block .order-row .order-chevron { top: 12px; right: 0; }
.block .order-row + .order-row {
  border-top: 1px solid color-mix(in srgb, var(--ink) 6%, transparent);
}
.block .order-row + .text-link { margin-top: 8px; }

/* ---------- profile ---------- */

.profile-card {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--surface);
  border-radius: calc(var(--radius) * 0.83);
  padding: 18px;
  box-shadow: var(--shadow-card);
}
.profile-card .avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--tint);
  color: var(--primary);
  font-size: 21px;
  font-weight: 800;
  display: grid;
  place-items: center;
  flex: none;
}
.profile-card strong { display: block; font-size: 17px; font-weight: 800; }
.profile-card small { display: block; color: var(--muted); font-size: 13px; margin-top: 2px; }

.block {
  background: var(--surface);
  border-radius: calc(var(--radius) * 0.83);
  padding: 16px;
  box-shadow: var(--shadow-card);
  margin-top: 18px;
}
.block > h2 { font-size: 15px; font-weight: 800; margin-bottom: 6px; }

.address {
  padding: 10px 0;
  border-bottom: 1px solid color-mix(in srgb, var(--ink) 6%, transparent);
  font-size: 13.5px;
}
.address:last-child { border-bottom: 0; }
.address strong { font-weight: 800; }
.address small { color: var(--muted); }
.address-actions { display: flex; gap: 14px; margin-top: 4px; }

.checkbox-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13.5px;
  margin: 12px 0 4px;
}
.checkout-block { margin-top: 20px; }
.checkout-block > h2 { font-size: 17px; font-weight: 800; margin-bottom: 6px; }
.checkout-block .fulfilment-notice {
  background: var(--surface);
  border-radius: calc(var(--radius) * 0.75);
  padding: 16px;
  box-shadow: var(--shadow-card);
  font-size: 14px;
  margin-top: 10px;
  line-height: 1.5;
}
.fulfilment-notice .address-actions { margin-top: 12px; flex-wrap: wrap; }

/* ---------- loading, slow and offline ---------- */

.skeleton {
  background: linear-gradient(
    90deg,
    color-mix(in srgb, var(--primary) 16%, var(--surface)) 25%,
    color-mix(in srgb, var(--primary) 30%, var(--surface)) 37%,
    color-mix(in srgb, var(--primary) 16%, var(--surface)) 63%
  );
  background-size: 400% 100%;
  animation: skeleton-shimmer 1.4s ease infinite;
  border-radius: 12px;
}
@keyframes skeleton-shimmer {
  0% { background-position: 100% 0; }
  100% { background-position: 0 0; }
}
.skeleton-outlet { width: 180px; height: 22px; }
.skeleton-btn { width: 48px; height: 48px; border-radius: 50%; }
.skeleton-hero { height: 40px; width: 80%; margin-bottom: 10px; }
.skeleton-hero.short { width: 60%; }
.skeleton-search { height: 56px; border-radius: 18px; margin: 18px 0; }
.skeleton-chips { display: flex; gap: 10px; overflow: hidden; margin-bottom: 22px; }
.skeleton-chip { width: 96px; height: 44px; border-radius: 999px; flex: none; }
.skeleton-title { width: 150px; height: 24px; }
.skeleton-card {
  min-width: 176px;
  max-width: 176px;
  background: var(--surface);
  border-radius: 24px;
  padding: 18px 14px 24px;
  box-shadow: var(--shadow-card);
  flex: none;
}
.skeleton-circle { width: 118px; height: 118px; border-radius: 50%; margin: 0 auto 16px; }
.skeleton-line { height: 14px; border-radius: 999px; margin-top: 10px; }
.skeleton-line.short { width: 60%; }
.skeleton-row {
  display: flex;
  gap: 14px;
  background: var(--surface);
  border-radius: 20px;
  padding: 14px;
  margin-bottom: 14px;
  box-shadow: var(--shadow-card);
}
.skeleton-thumb { width: 66px; height: 66px; border-radius: 50%; flex: none; }
.skeleton-row-body { flex: 1; padding-top: 8px; }
.skeleton-notice {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--surface);
  border-radius: 20px;
  padding: 16px 18px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-card);
}
.skeleton-notice > span { font-size: 34px; line-height: 1; }
.skeleton-notice strong { display: block; font-size: 16px; }
.skeleton-notice p { color: var(--muted); font-size: 13px; margin-top: 2px; }

.slow-banner,
.offline-banner {
  position: sticky;
  top: 0;
  z-index: 70;
  margin: -20px -20px 18px;
  padding: max(13px, env(safe-area-inset-top)) 16px 13px;
  border-radius: 0 0 14px 14px;
  text-align: center;
  font-size: 14px;
  font-weight: 800;
}
.slow-banner { background: #f5b800; color: #2b2200; }
.offline-banner { background: #c0392b; color: #fff; }

/* ---------- full-screen states ---------- */

.state-screen {
  min-height: calc(100dvh - 80px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 8px;
  padding: 20px 0 40px;
}
.state-emoji {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 84px;
  line-height: 1;
  background: radial-gradient(
    circle at 35% 30%,
    var(--surface),
    color-mix(in srgb, var(--primary) 14%, var(--surface)) 72%
  );
  box-shadow: 0 24px 44px -24px color-mix(in srgb, var(--primary) 45%, transparent);
  margin-bottom: 14px;
}
.state-title { font-size: 30px; font-weight: 800; line-height: 1.15; }
.state-copy {
  color: color-mix(in srgb, var(--ink) 58%, transparent);
  font-size: 15.5px;
  line-height: 1.55;
  max-width: 480px;
}
.state-cta { width: 100%; margin-top: 20px; }
.state-link {
  color: var(--primary);
  font-weight: 800;
  font-size: 14px;
  margin-top: 10px;
  padding: 4px 8px;
}

.state-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 36px 8px 20px;
}
.state-body .state-emoji {
  width: 150px;
  height: 150px;
  font-size: 70px;
  margin-bottom: 18px;
}
.state-body h2 { font-size: 26px; font-weight: 800; }
.state-body p {
  color: color-mix(in srgb, var(--ink) 58%, transparent);
  font-size: 15px;
  line-height: 1.5;
  margin-top: 8px;
  max-width: 420px;
}
.state-body .state-cta { width: 100%; margin-top: 22px; }
.search-empty { padding-top: 30px; }
.suggest-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 16px; }
.suggest-chip {
  background: var(--tint);
  color: var(--ink);
  border-radius: 12px;
  padding: 10px 18px;
  font-size: 14px;
  font-weight: 700;
}

/* ---------- toast, fields, outlet filters ---------- */

.toast {
  top: max(18px, env(safe-area-inset-top));
  bottom: auto;
  transform: translateX(-50%) translateY(-14px);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
}
.toast.show { transform: translateX(-50%) translateY(0); }
.toast-check {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--green);
  color: #fff;
  display: grid;
  place-items: center;
  flex: none;
}
.toast-check svg { width: 14px; height: 14px; }

.field.invalid input,
.field.invalid textarea { border-color: #d63c2f; }
.field-error {
  color: #d63c2f;
  font-size: 13px;
  font-weight: 600;
  margin-top: 6px;
}
.field-hint { color: var(--muted); font-size: 12px; margin-top: 6px; }
.field.readonly input { background: color-mix(in srgb, var(--primary) 5%, var(--surface)); color: var(--muted); }
.checkout-note { text-align: center; color: var(--muted); font-size: 12px; margin-top: 8px; }

.success-screen .check-circle { width: 160px; height: 160px; }
.success-screen .check-circle svg { width: 64px; height: 64px; }
.success-screen h1 { font-size: 30px; }
.success-screen p { font-size: 16px; }
.success-screen .cta.green { color: #0f2e1a; }
.success-screen .state-link { margin-top: 10px; }

@media (prefers-reduced-motion: reduce) {
  .skeleton { animation: none; }
}

@media (min-width: 560px) {
  .app {
    border-left: 1px solid color-mix(in srgb, var(--primary) 10%, transparent);
    border-right: 1px solid color-mix(in srgb, var(--primary) 10%, transparent);
  }
  .tabbar { border: 1px solid color-mix(in srgb, var(--primary) 10%, transparent); border-bottom: 0; }
}

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