/* ═══════════════════════════════════════════════════════════════
   Savior Ordering Engine — Premium Ordering App v1.1
   Mobile-first, app-like, DoorDash-quality experience
   ═══════════════════════════════════════════════════════════════ */

/* Design tokens: assets/css/ordering-tokens.css (the app) or website-ordering.css (a
   restaurant website, which maps them onto its own Experience Theme) -- 1.10.0. */

*, *::before, *::after { box-sizing: border-box; }

body.soa-body {
  font-family: var(--f);
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ── Sticky category nav ───────────────────────────────────── */
.soa-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 1px 0 var(--line);
}
.soa-nav-inner {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 14px;
  height: 52px;
  overflow-x: auto;
  scrollbar-width: none;
  scroll-behavior: smooth;
}
.soa-nav-inner::-webkit-scrollbar { display: none; }
.soa-nav-link {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  height: 34px;
  padding: 0 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink2);
  text-decoration: none;
  background: transparent;
  border: 1.5px solid transparent;
  white-space: nowrap;
  transition: all .15s;
}
.soa-nav-link:hover { color: var(--ink); background: var(--line2); }
.soa-nav-link.active {
  color: var(--soe-accent-text, var(--red));
  background: var(--red-bg);
  border-color: rgba(225,29,72,.2);
  font-weight: 700;
}

/* ── Layout ────────────────────────────────────────────────── */
.soa-wrap {
  display: grid;
  grid-template-columns: 224px 1fr;
  max-width: 1280px;
  margin: 0 auto;
  min-height: 100vh;
}
.soa-sidebar {
  position: sticky;
  top: 52px;
  height: calc(100vh - 52px);
  overflow-y: auto;
  background: var(--card);
  border-right: 1px solid var(--line);
  scrollbar-width: thin;
}
.soa-sidebar-head { padding: 18px 16px 14px; border-bottom: 1px solid var(--line2); }
.soa-sidebar-store { font-size: 14px; font-weight: 800; color: var(--ink); margin-bottom: 4px; }
.soa-sidebar-hours { font-size: 11px; color: var(--ink3); line-height: 1.5; }
.soa-sidebar-links { padding: 8px 0; }
.soa-sidebar-link {
  display: flex;
  align-items: center;
  padding: 9px 16px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink2);
  text-decoration: none;
  border-left: 2.5px solid transparent;
  transition: all .12s;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.soa-sidebar-link:hover { color: var(--ink); background: var(--line2); }
.soa-sidebar-link.active { color: var(--soe-accent-text, var(--red)); background: var(--red-bg); border-left-color: var(--soe-accent-text, var(--red)); font-weight: 700; }
.soa-main { min-width: 0; padding-bottom: 120px; }

/* ── Restaurant header ─────────────────────────────────────── */
.soa-restaurant-header { background: var(--card); border-bottom: 1px solid var(--line2); }
.soa-rh-inner { max-width: 100%; display: flex; gap: 0; min-height: 148px; overflow: hidden; }
.soa-rh-hero-img { width: 200px; object-fit: cover; flex-shrink: 0; display: block; }
.soa-rh-info {
  padding: 20px 24px;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: linear-gradient(135deg, #0f172a 0%, #7f1d1d 100%);
  color: #fff;
}
.soa-rh-name { font-size: 20px; font-weight: 900; letter-spacing: -.04em; color: #fff; margin: 0; }
.soa-rh-meta { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: rgba(255,255,255,.75); flex-wrap: wrap; }
.soa-rh-rating { color: #fbbf24; font-weight: 700; }
.soa-rh-dot { opacity: .4; }
.soa-rh-hours { font-size: 11.5px; color: rgba(255,255,255,.6); }
.soa-rh-story { font-size: 12.5px; color: rgba(255,255,255,.55); line-height: 1.5; margin: 0; }

/* ── Featured categories strip ─────────────────────────────── */
.soa-featured-strip { background: var(--card); padding: 14px 0 10px; border-bottom: 1px solid var(--line2); }
.soa-featured-title { font-size: 10px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--ink3); padding: 0 16px; margin-bottom: 10px; }
.soa-featured-scroll { display: flex; gap: 10px; overflow-x: auto; padding: 0 16px 4px; scrollbar-width: none; }
.soa-featured-scroll::-webkit-scrollbar { display: none; }
.soa-featured-card { flex-shrink: 0; text-align: center; text-decoration: none; width: 84px; transition: transform .15s; }
.soa-featured-card:hover { transform: translateY(-2px); }
.soa-featured-img-wrap { width: 72px; height: 72px; border-radius: 50%; overflow: hidden; margin: 0 auto 6px; border: 2px solid var(--line); box-shadow: var(--shadow-sm); }
.soa-featured-img-wrap img { width: 100%; height: 100%; object-fit: cover; display: block; }
.soa-featured-label { font-size: 11px; font-weight: 700; color: var(--ink2); line-height: 1.3; }

/* ── Popular section ───────────────────────────────────────── */
.soa-popular-section .soa-section-hd { display: flex; align-items: center; gap: 10px; }
.soa-popular-note { font-size: 11px; color: var(--ink3); font-weight: 600; margin-left: auto; }
.soa-popular-badge { display: inline-flex; align-items: center; padding: 2px 8px; border-radius: 999px; background: var(--red-bg); color: var(--soe-accent-text, var(--red)); font-size: 10px; font-weight: 800; margin-left: 6px; }

/* ── Section headers ───────────────────────────────────────── */
.soa-section { border-bottom: 8px solid var(--line2); scroll-margin-top: 52px; }
.soa-section-hd {
  padding: 16px 20px 12px;
  border-bottom: 1px solid var(--line2);
  display: flex;
  align-items: center;
  gap: 8px;
}
.soa-section-hd h2 { font-size: 16px; font-weight: 800; letter-spacing: -.025em; color: var(--ink); margin: 0; }
.soa-section-count { font-size: 11px; color: var(--ink3); background: var(--line2); padding: 2px 8px; border-radius: 999px; font-weight: 600; }

/* ── Item cards ────────────────────────────────────────────── */
.soa-cards { }
.soa-card { border-bottom: 1px solid var(--line2); transition: background .1s; }
.soa-card:last-child { border-bottom: none; }
.soa-card:hover { background: var(--line2); }
.soa-card-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 18px;
}
.soa-card-info { flex: 1; min-width: 0; }
.soa-card-name {
  font-size: 14.5px;
  font-weight: 700;
  letter-spacing: -.02em;
  color: var(--ink);
  margin-bottom: 3px;
  line-height: 1.3;
}
.soa-card-desc {
  font-size: 12px;
  color: var(--ink3);
  line-height: 1.5;
  margin-bottom: 5px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.soa-card-price {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--ink2);
  letter-spacing: -.01em;
}
.soa-card-cta { flex-shrink: 0; padding-top: 2px; }

/* Card photo thumbnails */
.soa-card-has-img .soa-card-row { padding: 0; }
.soa-card-thumb { width: 88px; height: 88px; object-fit: cover; flex-shrink: 0; display: block; }
/* Stand-in for a dish we hold no photograph of. Same 88px footprint as a real
   thumbnail so the row height never depends on whether a photo exists, and the same
   typographic treatment the kiosk uses rather than an empty grey square. */
.soa-card-thumb--none {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -.04em;
  color: color-mix(in srgb, var(--ink) 22%, transparent);
  background:
    radial-gradient(90% 90% at 30% 15%, color-mix(in srgb, var(--accent, #E4572E) 12%, transparent), transparent 70%),
    linear-gradient(150deg, var(--line2, #eee), var(--line, #f5f5f5));
}
.soa-card-has-img .soa-card-info { padding: 13px 14px 13px 16px; }
.soa-card-has-img .soa-card-cta { padding: 13px 16px 13px 0; }

/* ── Action buttons ────────────────────────────────────────── */
.soa-btn-add, .soa-btn-open {
  border: none;
  cursor: pointer;
  font-family: var(--f);
  font-weight: 700;
  font-size: 13px;
  border-radius: 10px;
  padding: 9px 16px;
  transition: all .15s;
  white-space: nowrap;
  position: relative;
  z-index: 10;
  pointer-events: auto;
  -webkit-tap-highlight-color: transparent;
  min-height: 38px;
}
.soa-btn-add {
  background: var(--red-bg);
  color: var(--soe-accent-text, var(--red));
  border: 1.5px solid rgba(225,29,72,.15);
}
.soa-btn-add:hover, .soa-btn-add.adding { background: var(--red); color: #fff; border-color: var(--red); }
.soa-btn-add.done { background: var(--green); color: #fff; border-color: var(--green); }
.soa-btn-open {
  background: var(--ink);
  color: #fff;
  border: 1.5px solid transparent;
}
.soa-btn-open:hover { background: #1e293b; }

/* ── Customizer modal (bottom sheet) ──────────────────────── */
.soa-modal-bg {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: rgba(15,23,42,.55);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s;
}
.soa-modal-bg.open { opacity: 1; pointer-events: all; }
.soa-modal {
  background: var(--card);
  border-radius: 24px 24px 0 0;
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  transform: translateY(100%);
  transition: transform .3s cubic-bezier(.32,1.05,.45,1);
  box-shadow: 0 -12px 48px rgba(15,23,42,.20);
}
.soa-modal-bg.open .soa-modal { transform: translateY(0); }
.soa-modal-drag {
  width: 36px;
  height: 4px;
  background: var(--line);
  border-radius: 2px;
  margin: 12px auto 0;
  flex-shrink: 0;
}
.soa-modal-hd {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 14px 20px 12px;
  border-bottom: 1px solid var(--line2);
  flex-shrink: 0;
}
.soa-modal-title {
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -.04em;
  color: var(--ink);
  line-height: 1.2;
}
.soa-modal-close {
  background: var(--line2);
  border: none;
  cursor: pointer;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink2);
  transition: all .12s;
  flex-shrink: 0;
  margin-left: 12px;
  margin-top: 2px;
}
.soa-modal-close:hover { background: var(--line); color: var(--ink); }
.soa-modal-body { overflow-y: auto; flex: 1; padding: 0; }

/* ── Configurator sections inside modal ────────────────────── */
.soa-cfg-sec { padding: 16px 20px; border-bottom: 1px solid var(--line2); }
.soa-cfg-sec:last-child { border-bottom: none; }
.soa-cfg-label {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--ink2);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.soa-req {
  font-size: 10px;
  font-weight: 700;
  color: var(--soe-accent-text, var(--red));
  background: var(--red-bg);
  padding: 2px 6px;
  border-radius: 4px;
  text-transform: none;
  letter-spacing: 0;
}
.soa-opt {
  font-size: 10px;
  font-weight: 600;
  color: var(--ink3);
  text-transform: none;
  letter-spacing: 0;
}

/* ── Size pills ────────────────────────────────────────────── */
.soa-size-row { display: flex; gap: 8px; flex-wrap: wrap; }
.soa-sz {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 10px 16px;
  min-width: 64px;
  border: 2px solid var(--line);
  border-radius: 12px;
  background: var(--card);
  cursor: pointer;
  font-family: var(--f);
  transition: all .15s;
}
.soa-sz:hover { border-color: var(--ink2); background: var(--line2); }
.soa-sz.active {
  border-color: var(--ink);
  background: var(--ink);
  box-shadow: 0 2px 8px rgba(15,23,42,.2);
}
.soa-sz-name { font-size: 14px; font-weight: 800; color: var(--ink); }
.soa-sz-price { font-size: 11px; color: var(--ink3); margin-top: 2px; }
.soa-sz.active .soa-sz-name, .soa-sz.active .soa-sz-price { color: #fff; }

/* ── Pizza half/whole toggle ───────────────────────────────── */
.soa-pizza-halves {
  display: flex;
  gap: 4px;
  background: var(--line2);
  border-radius: 10px;
  padding: 4px;
  margin-bottom: 14px;
}
.soa-half-btn {
  flex: 1;
  padding: 9px 10px;
  border: none;
  border-radius: 8px;
  font-family: var(--f);
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  background: transparent;
  color: var(--ink2);
  transition: all .15s;
  text-align: center;
  -webkit-tap-highlight-color: transparent;
}
.soa-half-btn.active {
  background: var(--card);
  color: var(--ink);
  box-shadow: 0 1px 4px rgba(15,23,42,.10);
}

/* ── Topping chips ─────────────────────────────────────────── */
.soa-tops, .soa-tops-pool { display: flex; flex-wrap: wrap; gap: 7px; }
.soa-top {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 8px 12px;
  border: 1.5px solid var(--line);
  border-radius: 999px;
  background: var(--card);
  font-family: var(--f);
  cursor: pointer;
  transition: all .12s;
  -webkit-tap-highlight-color: transparent;
  min-height: 36px;
}
.soa-top:hover { border-color: var(--ink2); background: var(--line2); }
.soa-top.sel {
  border-color: var(--red);
  background: var(--red);
  box-shadow: 0 1px 4px rgba(225,29,72,.25);
}
.soa-radio.sel { border-color: var(--ink); background: var(--ink); }
.soa-top-name { font-size: 12.5px; font-weight: 600; color: var(--ink); }
.soa-top-cost { font-size: 10.5px; color: var(--ink3); }
.soa-top.sel .soa-top-name, .soa-top.sel .soa-top-cost { color: #fff; }
.soa-top.sel .soa-top-cost { opacity: .75; }

/* ── Modal footer (total + confirm) ───────────────────────── */
.soa-modal-ft {
  padding: 14px 20px max(20px, env(safe-area-inset-bottom));
  border-top: 1px solid var(--line2);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  background: var(--card);
}
.soa-ft-total { display: flex; flex-direction: column; }
.soa-ft-total-label { font-size: 10.5px; font-weight: 600; color: var(--ink3); text-transform: uppercase; letter-spacing: .05em; }
.soa-ft-total-val { font-size: 22px; font-weight: 900; color: var(--ink); letter-spacing: -.05em; line-height: 1.1; }
.soa-btn-confirm {
  flex: 1;
  padding: 14px 18px;
  background: var(--red);
  color: #fff;
  border: none;
  border-radius: 14px;
  font-family: var(--f);
  font-size: 15px;
  font-weight: 800;
  letter-spacing: -.02em;
  cursor: pointer;
  box-shadow: 0 4px 0 var(--red-d), 0 4px 16px rgba(225,29,72,.2);
  transition: all .15s;
  -webkit-tap-highlight-color: transparent;
}
.soa-btn-confirm:hover { background: var(--red-d); transform: translateY(-1px); box-shadow: 0 6px 0 var(--red-d), 0 6px 20px rgba(225,29,72,.25); }
.soa-btn-confirm:disabled { opacity: .55; cursor: not-allowed; box-shadow: none; transform: none; }

/* ── Cart bar (floating) ───────────────────────────────────── */
.soa-cartbar {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: min(500px, calc(100% - 24px));
  z-index: 400;
  padding: 10px 0 max(14px, env(safe-area-inset-bottom));
  pointer-events: none;
}
.soa-cartbar[hidden], #soa-cartbar[hidden] { display: none !important; pointer-events: none !important; }
#soa-cartbar:not([hidden]) { display: block; pointer-events: all; }
.soa-cartbar-inner {
  width: 100%;
  background: var(--ink);
  border-radius: 16px;
  padding: 13px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  box-shadow: 0 4px 0 rgba(0,0,0,.3), 0 8px 32px rgba(15,23,42,.35);
  pointer-events: all;
}
.soa-cb-continue { color: rgba(255,255,255,.65); text-decoration: none; font-size: 13px; font-weight: 600; white-space: nowrap; }
.soa-cb-continue:hover { color: rgba(255,255,255,.9); }
.soa-cb-info { display: flex; flex-direction: column; align-items: center; flex: 1; }
.soa-cb-items { font-size: 11.5px; font-weight: 700; color: rgba(255,255,255,.7); }
.soa-cb-total { font-size: 18px; font-weight: 900; color: #fff; letter-spacing: -.04em; line-height: 1.1; }
.soa-cb-cta {
  color: #fff;
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 800;
  white-space: nowrap;
  background: var(--red);
  padding: 9px 16px;
  border-radius: 10px;
  transition: background .15s;
  cursor: pointer;
  border: none;
  font-family: var(--f);
}
.soa-cb-cta:hover { background: var(--red-d); }

/* ── Cart drawer ───────────────────────────────────────────── */
.soa-cart-drawer-bg {
  position: fixed;
  inset: 0;
  z-index: 8000;
  background: rgba(15,23,42,.5);
  opacity: 0;
  pointer-events: none;
  transition: opacity .22s;
}
.soa-cart-drawer-bg.open { opacity: 1; pointer-events: all; }
.soa-cart-drawer {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 8001;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  background: var(--card);
  border-radius: 24px 24px 0 0;
  transform: translateY(100%);
  transition: transform .3s cubic-bezier(.34,1.1,.64,1);
  box-shadow: 0 -8px 40px rgba(15,23,42,.18);
}
.soa-cart-drawer-bg.open .soa-cart-drawer { transform: translateY(0); }
.soa-drawer-handle { width: 36px; height: 4px; background: var(--line); border-radius: 2px; margin: 12px auto 0; flex-shrink: 0; }
.soa-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px 12px;
  border-bottom: 1px solid var(--line2);
  flex-shrink: 0;
}
.soa-drawer-title { font-size: 17px; font-weight: 800; letter-spacing: -.04em; color: var(--ink); }
.soa-drawer-close {
  width: 30px;
  height: 30px;
  border-radius: 999px;
  border: none;
  background: var(--line2);
  color: var(--ink2);
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all .12s;
}
.soa-drawer-close:hover { background: var(--line); color: var(--ink); }
.soa-drawer-body { overflow-y: auto; flex: 1; }
.soa-drawer-empty { padding: 32px 18px; text-align: center; color: var(--ink3); font-size: 14px; }

/* Drawer items */
.soa-drawer-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 18px;
  border-bottom: 1px solid var(--line2);
}
.soa-drawer-item:last-child { border-bottom: none; }
.soa-drawer-item-img { width: 52px; height: 52px; border-radius: 10px; object-fit: cover; flex-shrink: 0; background: var(--line2); }
.soa-drawer-item-info { flex: 1; min-width: 0; }
.soa-drawer-item-name { font-size: 14px; font-weight: 700; color: var(--ink); margin-bottom: 2px; }
.soa-drawer-item-opts { font-size: 11.5px; color: var(--ink3); line-height: 1.4; margin-bottom: 7px; }
.soa-drawer-item-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.soa-drawer-qty {
  display: inline-flex;
  align-items: center;
  gap: 0;
  background: var(--line2);
  border-radius: 999px;
  overflow: hidden;
  border: 1px solid var(--line);
}
.soa-drawer-qty-btn {
  width: 32px;
  height: 32px;
  border: none;
  background: transparent;
  font-size: 18px;
  font-weight: 700;
  color: var(--ink);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .12s;
  -webkit-tap-highlight-color: transparent;
}
.soa-drawer-qty-btn:hover { background: var(--line); }
.soa-drawer-qty-btn:disabled { opacity: .4; cursor: not-allowed; }
.soa-drawer-qty-val { font-size: 14px; font-weight: 800; color: var(--ink); min-width: 28px; text-align: center; }
.soa-drawer-item-total { font-size: 14px; font-weight: 800; color: var(--ink); }
.soa-drawer-remove {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  border: none;
  background: var(--line2);
  color: var(--ink3);
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: all .12s;
  margin-left: 4px;
}
.soa-drawer-remove:hover { background: #fee2e2; color: var(--soe-accent-text, var(--red)); }

/* Drawer footer */
.soa-drawer-footer {
  padding: 14px 18px max(16px, env(safe-area-inset-bottom));
  border-top: 1px solid var(--line2);
  flex-shrink: 0;
  background: var(--card);
}
.soa-drawer-subtotal {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.soa-drawer-subtotal-label { font-size: 13px; font-weight: 600; color: var(--ink2); }
.soa-drawer-subtotal-val { font-size: 20px; font-weight: 900; color: var(--ink); letter-spacing: -.04em; }
.soa-drawer-checkout-btn {
  display: block;
  width: 100%;
  padding: 15px;
  background: var(--red);
  color: #fff;
  border: none;
  border-radius: 14px;
  font-family: var(--f);
  font-size: 15.5px;
  font-weight: 800;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 4px 0 var(--red-d), 0 4px 16px rgba(225,29,72,.2);
  transition: all .15s;
  letter-spacing: -.02em;
}
.soa-drawer-checkout-btn:hover { background: var(--red-d); transform: translateY(-1px); }

/* ── Responsive ────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .soa-wrap { grid-template-columns: 1fr; }
  .soa-sidebar { display: none; }
}
@media (max-width: 640px) {
  .soa-storefront { padding-bottom: 100px; }
  .soa-card-row { padding: 12px 14px; }
  .soa-section-hd { padding: 14px 14px 10px; }
  .soa-modal { border-radius: 20px 20px 0 0; }
  .soa-cfg-sec { padding: 14px 16px; }
  .soa-modal-ft { padding: 12px 16px max(16px, env(safe-area-inset-bottom)); }
  .soa-tops, .soa-tops-pool { gap: 6px; }
  .soa-top { padding: 8px 11px; min-height: 38px; }
  .soa-sz { min-width: 58px; padding: 9px 12px; }
  .soa-rh-hero-img { width: 120px; }
  .soa-rh-info { padding: 14px 16px; }
  .soa-rh-name { font-size: 17px; }
  .soa-rh-story { display: none; }
  .soa-cartbar { width: calc(100% - 20px); }
}

/* ── v1.3: New drawer item classes ────────────────────────────── */
.soa-qty-btn {
  width: 32px; height: 32px; border: none; background: transparent;
  font-size: 18px; font-weight: 700; color: var(--ink);
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: background .12s; -webkit-tap-highlight-color: transparent;
  border-radius: 999px;
}
.soa-qty-btn:hover { background: var(--line); }
.soa-qty-btn:disabled { opacity: .4; cursor: not-allowed; }
.soa-qty-val {
  font-size: 14px; font-weight: 800; color: var(--ink);
  min-width: 28px; text-align: center;
}
.soa-item-total {
  font-size: 14px; font-weight: 800; color: var(--ink);
}
.soa-remove-btn {
  width: 28px; height: 28px; border-radius: 999px; border: none;
  background: var(--line2); color: var(--ink3); font-size: 14px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; flex-shrink: 0; transition: all .12s;
  margin-left: 4px; -webkit-tap-highlight-color: transparent;
}
.soa-remove-btn:hover { background: #fee2e2; color: var(--soe-accent-text, var(--red)); }

/* ── v1.5.2: Per-card quantity badges ─────────────────────────────── */
.soa-card-badge {
  display: inline-block;
  background: var(--red, #e11d48);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 999px;
  margin-top: 4px;
  letter-spacing: .01em;
}
.soa-card-in-cart .soa-btn-add,
.soa-card-in-cart .soa-btn-open {
  border-color: var(--red, #e11d48);
}

/* ── Phase 14C-P4B: Empty-state / template UI ─────────────────────────────── */
.soa-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 24px 64px;
  text-align: center;
  width: 100%;
}
.soa-empty-badge {
  display: inline-block;
  padding: 4px 12px;
  background: #f1f5f9;
  color: #64748b;
  border: 1px solid #e2e8f0;
  border-radius: 99px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  margin-bottom: 20px;
}
.soa-empty-title {
  font-size: 22px;
  font-weight: 800;
  color: #111827;
  margin: 0 0 8px;
}
.soa-empty-sub {
  font-size: 14px;
  color: #6b7280;
  margin: 0 0 36px;
  max-width: 320px;
  line-height: 1.5;
}
.soa-empty-cats {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 36px;
}
.soa-empty-cat-card {
  width: 96px;
  padding: 16px 8px 12px;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.soa-empty-cat-icon {
  font-size: 28px;
  line-height: 1;
}
.soa-empty-cat-label {
  font-size: 11px;
  font-weight: 600;
  color: #374151;
  text-align: center;
}
.soa-empty-items {
  width: 100%;
  max-width: 480px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.soa-empty-item-skeleton {
  display: flex;
  align-items: center;
  gap: 14px;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 14px;
}
.soa-skel-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.soa-skel {
  background: linear-gradient(90deg,#e5e7eb 25%,#f3f4f6 50%,#e5e7eb 75%);
  background-size: 200% auto;
  border-radius: 6px;
  animation: soa-shimmer 1.4s infinite linear;
}
@keyframes soa-shimmer {
  from { background-position: 200% center; }
  to   { background-position: -200% center; }
}
.soa-skel-thumb {
  width: 56px;
  height: 56px;
  border-radius: 8px;
  flex-shrink: 0;
}
.soa-skel-title {
  height: 14px;
  width: 70%;
}
.soa-skel-price {
  height: 12px;
  width: 30%;
}


/* A dish the visitor was sent to from the website. Outline only: the card's own
   colours are the merchant's, and a highlight fill would repaint their menu. */
.soa-card--pointed {
  outline: 2px solid var(--red, #c8102e);
  outline-offset: 3px;
  transition: outline-color .4s ease;
}
@media (prefers-reduced-motion: reduce) {
  .soa-card--pointed { transition: none; }
}


/* ── Arriving at one dish ───────────────────────────────────────────────
   A short, branded "Opening Boom Boom Pza" over the menu while the page settles, so
   the first thing seen is the dish that was chosen, not the top of a menu. It removes
   itself in CSS too: if a script ever failed, the page must never stay covered. */
.soa-handoff{position:fixed;inset:0;z-index:9998;display:flex;align-items:center;justify-content:center;
  background:color-mix(in srgb,var(--bg,#fff) 88%,transparent);
  animation:soa-handoff-out .25s ease 3.5s forwards}
.soa-handoff--done{opacity:0;transition:opacity .22s ease;pointer-events:none}
.soa-handoff-card{display:flex;align-items:center;gap:10px;padding:14px 18px;border-radius:14px;
  background:var(--card,#fff);color:var(--ink,#111);border:1px solid var(--line,#e5e7eb);
  box-shadow:0 10px 30px rgba(0,0,0,.12);font-weight:600;font-size:15px}
.soa-handoff-dot{width:10px;height:10px;border-radius:50%;background:var(--red,#c8102e);
  animation:soa-handoff-pulse 1s ease-in-out infinite}
@keyframes soa-handoff-pulse{0%,100%{opacity:.35}50%{opacity:1}}
@keyframes soa-handoff-out{to{opacity:0;visibility:hidden;pointer-events:none}}

/* The link could not be honoured. Plain words and one way forward. */
.soa-link-notice{position:sticky;top:0;z-index:60;display:flex;flex-wrap:wrap;align-items:center;gap:10px 14px;
  justify-content:space-between;padding:12px 16px;background:var(--card,#fff);color:var(--ink,#111);
  border-bottom:2px solid var(--red,#c8102e);font-size:14px;font-weight:600}
.soa-link-notice p{margin:0}
.soa-link-notice--info{border-bottom-color:var(--line,#e5e7eb)}
.soa-link-notice-btn{display:inline-flex;align-items:center;min-height:44px;padding:0 16px;border-radius:999px;
  background:var(--red,#c8102e);color:#fff;text-decoration:none;font-weight:700}

/* A dish with nothing to choose: say how to add it, add nothing on the visitor's behalf. */
.soa-card-hint{margin:8px 12px 10px;padding:8px 10px;border-radius:10px;font-size:13px;font-weight:600;
  background:color-mix(in srgb,var(--red,#c8102e) 10%,var(--card,#fff));color:var(--ink,#111)}

/* Required groups: named plainly, and pointed at when missed. */
.soa-cfg-missing-msg{display:none;margin:4px 0 6px;font-size:12px;font-weight:700;color:var(--soe-accent-text, var(--red,#c8102e))}
.soa-cfg-sec.soa-cfg-missing{outline:2px solid var(--red,#c8102e);outline-offset:4px;border-radius:10px}
.soa-cfg-sec.soa-cfg-missing .soa-cfg-missing-msg{display:block}
.soa-top-refused{animation:soa-refuse .5s ease}
@keyframes soa-refuse{20%,60%{transform:translateX(-3px)}40%,80%{transform:translateX(3px)}}
.soa-top:focus-visible,.soa-sz:focus-visible,.soa-modal-close:focus-visible,.soa-btn-confirm:focus-visible{
  outline:2px solid var(--red,#c8102e);outline-offset:2px}

/* Suggested for you — inside the cart, above the checkout button. */
.soa-suggest{padding:12px 16px 4px;border-top:1px solid var(--line,#e5e7eb);background:var(--card,#fff)}
.soa-suggest-title{margin:0 0 8px;font-size:13px;font-weight:800;letter-spacing:.02em;color:var(--ink,#111)}
.soa-suggest-row{display:flex;gap:10px;overflow-x:auto;padding-bottom:8px;scroll-snap-type:x mandatory;-webkit-overflow-scrolling:touch}
.soa-suggest-item{flex:0 0 132px;scroll-snap-align:start;display:flex;flex-direction:column;align-items:flex-start;gap:3px;
  min-height:44px;padding:8px;border:1px solid var(--line,#e5e7eb);border-radius:12px;background:var(--bg,#fff);
  color:var(--ink,#111);text-align:left;cursor:pointer;font:inherit}
.soa-suggest-item:focus-visible{outline:2px solid var(--red,#c8102e);outline-offset:2px}
.soa-suggest-item--adding{opacity:.55}
.soa-suggest-img{width:100%;height:64px;border-radius:8px;object-fit:cover;background:var(--line,#eee)}
.soa-suggest-img--none{display:flex;align-items:center;justify-content:center;font-weight:800;font-size:22px;color:var(--ink3,#888)}
.soa-suggest-name{font-size:13px;font-weight:700;line-height:1.2}
.soa-suggest-price{font-size:12px;color:var(--ink3,#666)}
.soa-suggest-cta{margin-top:2px;font-size:12px;font-weight:800;color:var(--soe-accent-text, var(--red,#c8102e))}
@media (prefers-reduced-motion: reduce){
  .soa-handoff-dot,.soa-top-refused{animation:none}
}
/* The strip keeps its size; the cart list above it is what scrolls. On a short phone
   screen the pictures go so the checkout button never leaves the screen. */
.soa-suggest{flex-shrink:0}
@media (max-height:640px){.soa-suggest-img{display:none}.soa-suggest{padding-top:8px}}
/* Focus moves to the dialog title for screen readers; it is not a control, so no ring. */
.soa-modal-title:focus{outline:none}

/* ── Text on the accent colour (1.10.0) ────────────────────────────────────
   Accent-filled controls used white text whatever the accent. A merchant whose approved
   accent is light (a mustard, a citrus) got white-on-yellow buttons. --on-accent comes from
   the Experience Theme (website tokens, or Brand_Renderer on the app); without a theme it is
   white, exactly as before. Inline-styled checkout buttons are matched by their background. */
.soa-btn-add:hover, .soa-btn-add.adding,
.soa-top.sel .soa-top-name, .soa-top.sel .soa-top-cost,
.soa-btn-confirm, .soa-cb-cta, .soa-drawer-checkout-btn, .soa-card-badge,
.soa-link-notice-btn { color: var(--on-accent, #fff); }
.soa-radio.sel .soa-top-name, .soa-radio.sel .soa-top-cost { color: var(--card, #fff); }   /* radios fill with ink, not accent */
/* Controls filled with the ink colour take the surface colour as text: white on a light theme
   (as before), the dark surface on a dark theme -- where ink is cream and white text vanished. */
.soa-sz.active .soa-sz-name, .soa-sz.active .soa-sz-price, .soa-btn-open { color: var(--card, #fff); }
.soa-drawer-footer button[style*="background:var(--red"],
#soa-drawer-body button[style*="background:var(--red"],
#soa-drawer-body button[style*="background: var(--red"] { color: var(--on-accent, #fff) !important; }

/* ── Pizza portion tabs (1.10.4) ───────────────────────────────────────────
   On a dark theme --card and --line2 are almost the same colour, so the selected tab could not be told from the others.
   Selected now uses the same treatment as the selected size: ink fill, surface-coloured text, on every theme. */
.soa-half-btn { min-height: 44px; color: var(--ink); border: 1px solid transparent; display: inline-flex; align-items: center; justify-content: center; gap: 5px; }
.soa-half-btn:hover { border-color: var(--ink3); }
.soa-half-btn.active { background: var(--ink); color: var(--card, #fff); border-color: var(--ink); box-shadow: none; }
.soa-half-btn:focus-visible { outline: 2px solid var(--red, #c8102e); outline-offset: 2px; }
.soa-half-n { min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; font-size: 11px; line-height: 18px; background: var(--ink); color: var(--card, #fff); box-sizing: border-box; }
.soa-half-btn.active .soa-half-n { background: var(--card, #fff); color: var(--ink); }
.soa-half-n[hidden] { display: none; }

/* ── Selection summary (1.10.5): one bar; the breakdown takes the choices' place when opened ─────────── */
.soa-modal { max-height: 90dvh; }
.soa-modal-body { min-height: 0; }
.soa-cfg-summary { flex-shrink: 0; border-top: 1px solid var(--line2); background: var(--card); display: flex; flex-direction: column; min-height: 0; }
.soa-cfg-summary.open { flex: 1 1 auto; }
.soa-modal.soa-sum-open .soa-modal-body { display: none; }
.soa-sum-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; min-height: 48px; padding: 7px 20px; border: 0; background: transparent; color: var(--ink); text-align: left; cursor: pointer; font-family: var(--f, inherit); flex-shrink: 0; }
.soa-sum-bar:focus-visible { outline: 2px solid var(--red, #c8102e); outline-offset: -2px; }
.soa-sum-text { min-width: 0; flex: 1; display: grid; gap: 1px; }
.soa-sum-l1 { font-size: 13px; font-weight: 800; color: var(--ink); font-variant-numeric: tabular-nums; }
.soa-sum-l2 { font-size: 12px; line-height: 1.3; color: var(--ink2); overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow-wrap: anywhere; }
.soa-sum-chev { flex-shrink: 0; font-size: 12px; font-weight: 700; color: var(--ink); text-decoration: underline; text-underline-offset: 2px; white-space: nowrap; }
.soa-sum-detail { flex: 1 1 auto; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 14px 20px; display: grid; gap: 8px; align-content: start; }
.soa-sum-detail[hidden] { display: none; }
.soa-sum-row { display: grid; grid-template-columns: minmax(84px, max-content) minmax(0, 1fr); gap: 2px 12px; font-size: 13.5px; line-height: 1.4; }
.soa-sum-k { font-weight: 700; color: var(--ink2); }
.soa-sum-v { color: var(--ink); min-width: 0; overflow-wrap: anywhere; }
.soa-sum-opt:not(:last-child)::after { content: ", "; }
.soa-sum-p { color: var(--ink2); white-space: nowrap; }
.soa-sum-tline { border-top: 1px solid var(--line2); padding-top: 8px; }
.soa-sum-qty { display: inline-flex; align-items: center; flex-shrink: 0; }
.soa-sum-q { width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 10px; background: transparent; color: var(--ink); font-size: 18px; font-weight: 700; cursor: pointer; padding: 0; }
.soa-sum-q:disabled { opacity: .35; cursor: default; }
.soa-sum-q:focus-visible { outline: 2px solid var(--red, #c8102e); outline-offset: 2px; }
.soa-sum-qv { min-width: 26px; text-align: center; font-weight: 800; color: var(--ink); font-variant-numeric: tabular-nums; }
.soa-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.soa-modal-ft .soa-btn-confirm { min-width: 0; white-space: nowrap; }
@media (max-width: 640px) {
  .soa-sum-bar { padding: 6px 16px; }
  .soa-sum-detail { padding: 12px 16px; }
  .soa-modal-ft { gap: 10px; padding-top: 8px; padding-bottom: max(10px, env(safe-area-inset-bottom)); }
  .soa-modal-ft .soa-ft-total-val { font-size: 18px; }
  .soa-modal-ft .soa-btn-confirm { padding: 13px 10px; font-size: 14px; }
}
.soa-cfg-msg { margin: 14px 20px 0; padding: 10px 12px; border-radius: 8px; font-size: 13px; line-height: 1.4; border: 1px solid var(--red, #c8102e); color: var(--ink); background: transparent; }

/* ── Customised cart lines (1.10.4) ──────────────────────────────────────── */
.soa-line-sum { display: grid; gap: 2px; margin: 2px 0 7px; font-size: 12px; line-height: 1.4; }
.soa-line-row { overflow-wrap: anywhere; }
.soa-line-k { font-weight: 700; color: var(--ink2); }
.soa-line-k::after { content: ":"; }
.soa-line-v { color: var(--ink2); }
.soa-line-p { color: var(--ink3); white-space: nowrap; }
.soa-line-actions { display: flex; gap: 4px; margin-top: 4px; }
.soa-edit-btn, .soa-line-actions .soa-remove-btn { min-height: 44px; min-width: 44px; padding: 0 10px; margin: 0 0 0 -10px; width: auto; height: auto; position: static; border: 0; border-radius: 8px; background: transparent; color: var(--ink2); font: 600 13px var(--f, inherit); text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }
.soa-line-actions .soa-remove-btn { margin-left: 0; }
.soa-edit-btn:hover, .soa-line-actions .soa-remove-btn:hover { background: var(--line2); color: var(--ink); }
.soa-edit-btn:focus-visible, .soa-line-actions .soa-remove-btn:focus-visible { outline: 2px solid var(--red, #c8102e); outline-offset: 2px; }
.soa-co-edit { display: inline-block; margin-top: 2px; }
/* Three portion tabs with count badges fit one line on a 360px phone. */
.soa-half-btn { white-space: nowrap; }
@media (max-width: 400px) { .soa-half-btn { padding: 9px 4px; font-size: 12px; gap: 3px; } .soa-pizza-halves { gap: 2px; padding: 3px; } }

/* ── Compact cart rows (1.10.6) ─────────────────────────────────────────────
   Thumbnail, name and line total on top, a short line naming each portion, then quantity and actions on one line.
   The full option list with prices opens in place. The cart body is the only thing that scrolls. */
.soa-cart-drawer { max-height: 92vh; max-height: 92dvh; }
.soa-drawer-header { padding: 6px 16px 8px; }
.soa-drawer-handle { margin-top: 8px; margin-bottom: 2px; }
.soa-drawer-close { width: 44px; height: 44px; margin: -6px -8px -6px 0; background: transparent; }
.soa-drawer-body { min-height: 0; overscroll-behavior: contain; }
.soa-drawer-item { display: grid; grid-template-columns: 44px minmax(0, 1fr); column-gap: 10px; row-gap: 0; align-items: start; padding: 8px 12px 2px; }
.soa-drawer-item > .soa-drawer-item-img { grid-row: 1 / span 2; }
.soa-ci-noimg { display: flex; align-items: center; justify-content: center; background: var(--line2); color: var(--ink2); font-weight: 800; font-size: 16px; }
.soa-drawer-item-img { width: 44px; height: 44px; border-radius: 8px; }
.soa-ci-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.soa-ci-top .soa-drawer-item-name { margin: 0; font-size: 14px; line-height: 1.25; min-width: 0; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.soa-ci-top .soa-item-total { flex-shrink: 0; margin: 0; min-width: 0; font-size: 14px; font-weight: 800; font-variant-numeric: tabular-nums; }
.soa-ci-brief { margin-top: 2px; font-size: 12px; line-height: 1.3; color: var(--ink2); overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.soa-ci-actions { grid-column: 2; margin-left: -12px; display: flex; align-items: center; justify-content: space-between; gap: 6px; min-width: 0; }
.soa-ci-actions .soa-drawer-qty { flex-shrink: 0; background: transparent; border: 0; }
.soa-ci-actions .soa-qty-btn { width: 44px; height: 44px; background: transparent; border: 0; color: var(--ink); font-size: 18px; }
.soa-ci-actions .soa-qty-val { min-width: 18px; text-align: center; font-weight: 800; font-size: 14px; color: var(--ink); }
.soa-ci-actions .soa-line-actions { margin: 0; gap: 0; flex-wrap: nowrap; }
.soa-details-btn, .soa-ci-actions .soa-edit-btn, .soa-ci-actions .soa-remove-btn { min-height: 44px; min-width: 44px; margin: 0; padding: 0 6px; border: 0; border-radius: 8px; background: transparent; color: var(--ink2); font: 600 12.5px var(--f, inherit); text-decoration: underline; text-underline-offset: 2px; cursor: pointer; white-space: nowrap; width: auto; height: auto; position: static; }
.soa-details-btn:hover { background: var(--line2); color: var(--ink); }
.soa-details-btn:focus-visible, .soa-ci-actions .soa-qty-btn:focus-visible { outline: 2px solid var(--red, #c8102e); outline-offset: -2px; }
.soa-details-btn[aria-expanded="true"] { color: var(--ink); }
.soa-ci-full { grid-column: 2; padding: 0 0 6px; }
.soa-ci-full[hidden] { display: none; }
.soa-ci-full .soa-line-sum { margin: 0; }

/* Suggestions: a single-height strip, picture beside the words, so they never crowd out the order. */
.soa-suggest { padding: 6px 12px 2px; }
.soa-suggest-title { margin: 0 0 4px; font-size: 12px; }
.soa-suggest-row { gap: 8px; padding-bottom: 6px; }
.soa-suggest-item { flex: 0 0 190px; display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; grid-template-rows: auto auto; column-gap: 8px; row-gap: 0; align-items: center; min-height: 52px; padding: 5px 8px 5px 5px; border-radius: 10px; }
.soa-suggest-img { grid-row: 1 / 3; width: 40px; height: 40px; border-radius: 7px; }
.soa-suggest-img--none { font-size: 16px; }
.soa-suggest-name { grid-column: 2; font-size: 12px; line-height: 1.2; min-width: 0; overflow: hidden; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.soa-suggest-price { grid-column: 2; font-size: 11.5px; line-height: 1.2; color: var(--ink2); }
.soa-suggest-cta { grid-column: 3; grid-row: 1 / 3; margin: 0; font-size: 12px; white-space: nowrap; }
@media (max-height: 640px) { .soa-suggest-img { display: block; } .soa-suggest-img--none { display: flex; } }

/* Checkout footer: always on screen, clear of the phone's bars. */
.soa-drawer-footer { flex-shrink: 0; padding-top: 8px; padding-bottom: max(10px, env(safe-area-inset-bottom)); }
