/* =====================================================================
   Habit Food Bar — Ordering app styles.
   Brand tokens mirrored from habitfoodbar.co.uk.
   ===================================================================== */

:root {
  --cream: #F4F0B6;
  --cream-deep: #ECE69A;
  --cream-soft: #F8F4C4;
  --ink: #1A1614;
  --ink-soft: #2B2520;
  --grey: #6E665E;
  --grey-light: #948B82;
  --line: rgba(26, 22, 20, 0.12);
  --line-soft: rgba(26, 22, 20, 0.06);
  --font-serif: 'Fraunces', 'Cormorant Garamond', Georgia, serif;
  --font-display: 'Archivo Black', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --picker-radius: 16px;
  --cart-width: 340px;
}

[x-cloak] { display: none !important; }

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font-serif);
  font-weight: 400;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  background-image:
    radial-gradient(rgba(26,22,20,0.035) 1px, transparent 1px),
    radial-gradient(rgba(26,22,20,0.025) 1px, transparent 1px);
  background-size: 3px 3px, 7px 7px;
  background-position: 0 0, 1px 2px;
}

a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }

.wrap {
  max-width: 860px;
  margin: 0 auto;
  padding: 0 32px;
}
@media (max-width: 640px) { .wrap { padding: 0 22px; } }

/* ---------- Nav ---------- */
.wm-nav { height: 52px; width: auto; color: var(--cream); }

nav {
  padding: 18px 0;
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--ink);
  border-bottom: 1px solid rgba(244, 240, 182, 0.08);
  color: var(--cream);
}
.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.nav-mark { display: flex; align-items: center; line-height: 0; }
.nav-back {
  font-family: var(--font-display);
  font-size: 12px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--cream);
  border: 1.5px solid var(--cream);
  padding: 11px 18px;
  transition: background .25s ease, color .25s ease;
}
.nav-back:hover { background: var(--cream); color: var(--ink); }

/* ---------- Page layout: menu + sidebar ---------- */
.page-layout {
  display: flex;
  align-items: flex-start;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 32px;
  gap: 40px;
}

.menu-col {
  flex: 1;
  min-width: 0;
  padding-left: 0;
  padding-right: 0;
  max-width: none;
}

@media (max-width: 640px) {
  .page-layout { padding: 0; gap: 0; }
}

/* ---------- Page header ---------- */
.page-head {
  padding: 60px 0 32px;
  text-align: center;
}
.page-head h1 {
  font-family: var(--font-display);
  font-size: clamp(32px, 5vw, 56px);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 12px;
}
.page-head p {
  font-size: clamp(15px, 1.4vw, 18px);
  color: var(--ink-soft);
  max-width: 540px;
  margin: 0 auto;
}

/* ---------- Closed banner ---------- */
.closed-banner {
  display: flex;
  flex-direction: column;
  gap: 4px;
  background: var(--ink);
  color: var(--cream);
  padding: 18px 22px;
  margin: 0 0 40px;
  border-left: 4px solid var(--cream);
}
.closed-banner strong {
  font-family: var(--font-display);
  font-size: 13px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.closed-banner span { font-size: 16px; }

/* ---------- Menu loading / error ---------- */
.menu-status {
  text-align: center;
  padding: 60px 0;
  font-size: 17px;
  color: var(--grey);
}
.menu-status.error { color: #c0392b; }

/* ---------- Categories ---------- */
.cat { margin-bottom: 64px; }
.cat-heading {
  font-family: var(--font-display);
  font-size: clamp(22px, 2.5vw, 32px);
  letter-spacing: 0.02em;
  text-transform: uppercase;
  padding-bottom: 12px;
  border-bottom: 1.5px solid var(--ink);
  margin-bottom: 4px;
}
.cat-blurb {
  font-style: italic;
  color: var(--grey);
  font-size: 15px;
  margin: 8px 0 0;
}

/* ---------- Item grid ---------- */
.items {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 12px;
  margin-top: 20px;
}

.item {
  background: var(--cream-soft);
  border: 1px solid var(--line);
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  color: inherit;
  width: 100%;
  transition: background 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}
.item:hover {
  background: var(--cream-deep);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(26, 22, 20, 0.07);
}
.item:active { transform: translateY(0); }
.item--added {
  background: var(--ink);
  color: var(--cream);
  border-color: var(--ink);
}
.item--added .item-price,
.item--added .item-price-hint { color: var(--cream-deep); }

.item--unavailable {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
}
.item-oos {
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink);
  opacity: 0.6;
}

.item-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}
.item-name {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 17px;
  line-height: 1.25;
}
.item-price {
  font-family: var(--font-display);
  font-size: 14px;
  white-space: nowrap;
  color: var(--ink-soft);
}
.item-desc {
  color: var(--grey);
  font-size: 14px;
  line-height: 1.4;
}
.item-foot { margin-top: auto; padding-top: 6px; }
.item-price-hint {
  font-family: var(--font-display);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--grey);
}

/* ---------- Footer ---------- */
footer {
  background: var(--ink);
  color: var(--cream);
  padding: 60px 0 40px;
  margin-top: 80px;
}
footer .foot-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
footer small {
  font-family: var(--font-display);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--grey-light);
}
footer small a { color: var(--cream); }

/* =================================================================
   CART SIDEBAR (desktop only)
   ================================================================= */

.cart-sidebar {
  width: var(--cart-width);
  flex-shrink: 0;
  position: sticky;
  top: 88px; /* nav height + gap */
  max-height: calc(100vh - 108px);
  display: flex;
  flex-direction: column;
  padding-top: 60px; /* aligns with .page-head padding */
}

/* Hide sidebar on mobile — mobile uses the sticky bar instead */
@media (max-width: 900px) {
  .cart-sidebar { display: none !important; }
}

.cart-sidebar-inner {
  background: var(--cream-soft);
  border: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  max-height: 100%;
}

/* ---------- Shared cart styles (used in both sidebar and mobile sheet) ---------- */

.cart-title {
  font-family: var(--font-display);
  font-size: 18px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.cart-lines {
  list-style: none;
  overflow-y: auto;
  flex: 1;
  padding: 0 20px;
}

.cart-line {
  padding: 16px 0;
  border-bottom: 1px solid var(--line-soft);
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.cart-line:last-child { border-bottom: none; }

.cart-line-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}
.cart-line-name {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 16px;
}
.cart-line-total {
  font-family: var(--font-display);
  font-size: 14px;
  white-space: nowrap;
}
.cart-line-mods {
  font-size: 13px;
  color: var(--grey);
  font-style: italic;
}
.cart-line-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 6px;
}
.cart-line-qty {
  display: flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 4px;
  overflow: hidden;
}
.qty-btn {
  background: none;
  border: none;
  padding: 4px 10px;
  font-size: 18px;
  cursor: pointer;
  color: var(--ink);
  transition: background 0.1s;
  display: flex;
  align-items: center;
  justify-content: center;
}
.qty-btn:hover { background: var(--ink); color: var(--cream); }
.qty-btn--sm { padding: 2px 8px; font-size: 16px; }
.qty-num {
  font-family: var(--font-display);
  font-size: 14px;
  min-width: 28px;
  text-align: center;
}
.cart-line-remove {
  background: none;
  border: none;
  font-family: var(--font-display);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--grey);
  cursor: pointer;
  padding: 4px 0;
  transition: color 0.15s;
}
.cart-line-remove:hover { color: #c0392b; }

.cart-subtotal {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px 4px;
  font-family: var(--font-display);
  font-size: 15px;
  letter-spacing: 0.04em;
  border-top: 1.5px solid var(--ink);
}
.cart-subtotal-note {
  padding: 0 20px 16px;
  font-size: 12px;
  color: var(--grey);
}
.cart-checkout-btn {
  display: block;
  width: calc(100% - 40px);
  margin: 0 20px 8px;
  background: var(--ink);
  color: var(--cream);
  border: none;
  padding: 15px 20px;
  font-family: var(--font-display);
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  transition: opacity 0.15s;
  border-radius: 4px;
}
.cart-checkout-btn:hover:not(:disabled) { opacity: 0.85; }
.cart-checkout-btn:disabled { opacity: 0.45; cursor: not-allowed; }
.cart-checkout-note {
  text-align: center;
  padding: 0 20px 16px;
  font-size: 12px;
  color: var(--grey);
}

/* Sidebar-specific padding */
.cart-sidebar-inner .cart-title { padding: 20px 20px 12px; }

/* =================================================================
   MOBILE CART BAR + SHEET
   ================================================================= */

/* Only shown on mobile */
.mobile-cart-bar { display: none; }

@media (max-width: 900px) {
  .mobile-cart-bar {
    display: block;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 60;
    padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
    background: var(--cream);
    border-top: 1px solid var(--line);
  }
}

.mobile-cart-trigger {
  display: flex;
  align-items: center;
  width: 100%;
  background: var(--ink);
  color: var(--cream);
  border: none;
  border-radius: 8px;
  padding: 14px 18px;
  cursor: pointer;
  gap: 0;
}
.mobile-cart-count {
  font-family: var(--font-display);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  background: rgba(255,255,255,0.15);
  padding: 3px 10px;
  border-radius: 100px;
  margin-right: 12px;
  white-space: nowrap;
}
.mobile-cart-label {
  font-family: var(--font-display);
  font-size: 14px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  flex: 1;
  text-align: center;
}
.mobile-cart-total {
  font-family: var(--font-display);
  font-size: 14px;
}

/* Mobile cart sheet */
.mobile-cart-sheet {
  position: fixed;
  inset: 0;
  background: rgba(26, 22, 20, 0.5);
  z-index: 70;
  display: flex;
  align-items: flex-end;
}

.mobile-cart-sheet-inner {
  background: var(--cream);
  width: 100%;
  max-height: 85dvh;
  border-radius: 16px 16px 0 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding-bottom: env(safe-area-inset-bottom);
}

.mobile-cart-sheet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 20px 12px;
  border-bottom: 1px solid var(--line);
  flex-shrink: 0;
}

/* Sheet-specific overrides */
.mobile-cart-sheet-inner .cart-lines { padding: 0 20px; }
.mobile-cart-sheet-inner .cart-checkout-btn { margin-bottom: 8px; }

/* Mobile: add bottom padding to page so content isn't hidden by bar */
@media (max-width: 900px) {
  footer { margin-bottom: 80px; }
}

/* =================================================================
   PICKER DIALOG
   ================================================================= */

.picker-dialog::backdrop {
  background: rgba(26, 22, 20, 0.6);
  backdrop-filter: blur(2px);
}

.picker-dialog {
  border: none;
  padding: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font-serif);
  max-height: 90dvh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  width: 100%;
  max-width: 100%;
  margin: 0;
  border-radius: var(--picker-radius) var(--picker-radius) 0 0;
}

@media (min-width: 640px) {
  .picker-dialog {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: min(540px, 90vw);
    max-width: 540px;
    margin: 0;
    border-radius: var(--picker-radius);
    bottom: auto;
    right: auto;
  }
}

.picker-dialog[open] { animation: picker-slide-up 0.25s ease; }
@keyframes picker-slide-up {
  from { transform: translateY(24px); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}
@media (min-width: 640px) {
  .picker-dialog[open] { animation: picker-fade-in 0.2s ease; }
  @keyframes picker-fade-in {
    from { opacity: 0; transform: translate(-50%, calc(-50% + 12px)); }
    to   { opacity: 1; transform: translate(-50%, -50%); }
  }
}

.picker-inner { display: flex; flex-direction: column; max-height: 90dvh; overflow: hidden; }

.picker-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 24px 24px 16px;
  border-bottom: 1px solid var(--line);
  flex-shrink: 0;
}
.picker-name {
  font-family: var(--font-display);
  font-size: 20px;
  letter-spacing: 0.01em;
  text-transform: uppercase;
}
.picker-base-price { font-size: 15px; color: var(--grey); margin-top: 2px; }
.picker-close {
  background: none;
  border: 1px solid var(--line);
  width: 34px;
  height: 34px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 14px;
  color: var(--grey);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, color 0.15s;
}
.picker-close:hover { background: var(--ink); color: var(--cream); border-color: var(--ink); }

.picker-groups { overflow-y: auto; flex: 1; padding: 0 24px; }

.picker-group { padding: 18px 0; border-bottom: 1px solid var(--line-soft); }
.picker-group:last-child { border-bottom: none; }

.picker-group-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.picker-group-name {
  font-family: var(--font-display);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.picker-group-rule {
  font-size: 11px;
  color: var(--grey);
  font-family: var(--font-display);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.picker-options { display: flex; flex-direction: column; gap: 2px; }

.picker-option {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  cursor: pointer;
  border-radius: 6px;
  transition: background 0.1s;
}
.picker-option:hover { background: var(--cream-deep); }
.picker-option--disabled { opacity: 0.4; cursor: not-allowed; }
.picker-option--disabled:hover { background: none; }

.picker-radio,
.picker-checkbox { width: 18px; height: 18px; accent-color: var(--ink); cursor: pointer; flex-shrink: 0; }

.picker-opt-name { flex: 1; font-size: 16px; }
.picker-opt-price { font-family: var(--font-display); font-size: 13px; color: var(--grey); white-space: nowrap; }

.picker-footer {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 24px;
  border-top: 1px solid var(--line);
  background: var(--cream);
  flex-shrink: 0;
}

.picker-qty {
  display: flex;
  align-items: center;
  border: 1.5px solid var(--ink);
  border-radius: 4px;
  overflow: hidden;
  flex-shrink: 0;
}
/* Override qty-btn sizing for picker context */
.picker-qty .qty-btn { width: 40px; height: 44px; font-size: 20px; }
.picker-qty .qty-num { font-family: var(--font-display); font-size: 16px; min-width: 32px; text-align: center; }

.picker-add {
  flex: 1;
  background: var(--ink);
  color: var(--cream);
  border: none;
  padding: 14px 20px;
  font-family: var(--font-display);
  font-size: 13px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  transition: opacity 0.15s;
  border-radius: 4px;
}
.picker-add:hover { opacity: 0.85; }
.picker-add:disabled { opacity: 0.4; cursor: not-allowed; }

/* =================================================================
   CHECKOUT OVERLAY
   Three-step checkout flow (order type + slot → details → summary).
   Mobile: slides up, near-full-screen.
   Desktop: centered modal, max-width 560px.
   ================================================================= */

.co-overlay {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(26, 22, 20, 0.55);
  backdrop-filter: blur(2px);
  display: flex;
  align-items: flex-end;   /* panel anchors to bottom on mobile */
  animation: co-fade-in 0.2s ease;
}

@keyframes co-fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@media (min-width: 640px) {
  .co-overlay {
    align-items: center;
    justify-content: center;
  }
}

/* ---------- Panel ---------- */

.co-panel {
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font-serif);
  width: 100%;
  max-height: 92dvh;
  border-radius: 16px 16px 0 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: co-slide-up 0.28s ease;
}

@keyframes co-slide-up {
  from { transform: translateY(24px); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}

@media (min-width: 640px) {
  .co-panel {
    width: min(560px, 92vw);
    max-height: 88dvh;
    border-radius: 16px;
    animation: co-fade-scale 0.22s ease;
  }
  @keyframes co-fade-scale {
    from { opacity: 0; transform: scale(0.97) translateY(8px); }
    to   { opacity: 1; transform: scale(1)    translateY(0);   }
  }
}

/* ---------- Header ---------- */

.co-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
  flex-shrink: 0;
}

.co-head-btn {
  background: none;
  border: 1px solid var(--line);
  width: 34px;
  height: 34px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 15px;
  color: var(--grey);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  flex-shrink: 0;
}
.co-head-btn:hover { background: var(--ink); color: var(--cream); border-color: var(--ink); }

.co-head-spacer { width: 34px; flex-shrink: 0; } /* mirrors button width to centre the stepper */

/* ---------- Step indicator ---------- */

.co-stepper {
  display: flex;
  align-items: center;
  gap: 8px;
}

.co-step-dot {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 1.5px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 11px;
  color: var(--grey-light);
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}
.co-step-dot.is-active {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--cream);
}

.co-step-line {
  width: 24px;
  height: 1.5px;
  background: var(--line);
  transition: background 0.2s;
}
.co-step-line.is-active { background: var(--ink); }

/* ---------- Body (scrollable step content) ---------- */

.co-body {
  flex: 1;
  overflow-y: auto;
  padding: 24px 24px 8px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.co-title {
  font-family: var(--font-display);
  font-size: 18px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  margin-bottom: 4px;
}

/* ---------- Order type toggle ---------- */

.co-type-toggle {
  display: flex;
  border: 1.5px solid var(--ink);
  border-radius: 6px;
  overflow: hidden;
}

.co-type-btn {
  flex: 1;
  background: none;
  border: none;
  padding: 10px 16px;
  font-family: var(--font-display);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  color: var(--grey);
  transition: background 0.15s, color 0.15s;
}
.co-type-btn + .co-type-btn { border-left: 1.5px solid var(--ink); }
.co-type-btn--on { background: var(--ink); color: var(--cream); }

/* ---------- Form fields ---------- */

.co-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.co-label {
  font-family: var(--font-display);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.co-input,
.co-select,
.co-textarea {
  background: var(--cream-soft);
  border: 1px solid var(--line);
  color: var(--ink);
  font-family: var(--font-serif);
  font-size: 16px; /* 16px prevents iOS zoom on focus */
  padding: 11px 14px;
  border-radius: 4px;
  width: 100%;
  transition: border-color 0.15s;
  appearance: none;
}
.co-input:focus,
.co-select:focus,
.co-textarea:focus {
  outline: none;
  border-color: var(--ink);
}
.co-select {
  /* Custom chevron */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%231A1614' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
}
.co-textarea { resize: vertical; min-height: 80px; }

.co-hint {
  font-size: 12px;
  color: var(--grey);
}
.co-hint--warn {
  color: var(--ink-soft);
  font-style: italic;
}

/* ---------- Order summary (step 3) ---------- */

.co-summary-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--grey);
  padding-bottom: 4px;
}
.co-summary-sep { color: var(--grey-light); }

.co-summary-lines {
  list-style: none;
  border-top: 1px solid var(--line-soft);
}

.co-summary-line {
  padding: 12px 0;
  border-bottom: 1px solid var(--line-soft);
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.co-summary-line-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
}
.co-summary-qty {
  font-family: var(--font-display);
  font-size: 12px;
  color: var(--grey);
  flex-shrink: 0;
}
.co-summary-name {
  flex: 1;
  font-weight: 600;
  font-size: 16px;
}
.co-summary-price {
  font-family: var(--font-display);
  font-size: 14px;
  white-space: nowrap;
}
.co-summary-mods {
  font-size: 13px;
  color: var(--grey);
  font-style: italic;
  padding-left: 24px; /* indent under qty */
}

.co-summary-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 0 4px;
  font-family: var(--font-display);
  font-size: 16px;
  letter-spacing: 0.04em;
  border-top: 1.5px solid var(--ink);
  margin-top: 4px;
}

/* ---------- Error ---------- */

.co-error {
  margin: 0 24px;
  padding: 10px 14px;
  background: #fdf0ee;
  border-left: 3px solid #c0392b;
  color: #c0392b;
  font-size: 14px;
  border-radius: 0 4px 4px 0;
  flex-shrink: 0;
}

/* ---------- Footer / CTA ---------- */

.co-foot {
  padding: 16px 24px calc(16px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  flex-shrink: 0;
}

.co-cta {
  display: block;
  width: 100%;
  background: var(--ink);
  color: var(--cream);
  border: none;
  padding: 15px 20px;
  font-family: var(--font-display);
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  border-radius: 4px;
  transition: opacity 0.15s;
}
.co-cta:hover:not(:disabled) { opacity: 0.85; }
.co-cta:disabled { opacity: 0.4; cursor: not-allowed; }

/* ---------- Slot mode buttons (ASAP / Collect later) ---------- */

.co-slot-btn {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  width: 100%;
  background: var(--cream-soft);
  border: 1.5px solid var(--line);
  padding: 14px 16px;
  border-radius: 6px;
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  color: var(--ink);
  transition: border-color 0.15s, background 0.15s, color 0.15s;
}
.co-slot-btn:hover { border-color: var(--ink-soft); }
.co-slot-btn--on {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--cream);
}

.co-slot-btn-label {
  font-family: var(--font-display);
  font-size: 13px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.co-slot-btn-sub {
  font-size: 13px;
  color: var(--grey);
}
.co-slot-btn--on .co-slot-btn-sub { color: rgba(244, 240, 182, 0.65); }

/* ---------- Collect later time pickers ---------- */

.co-later-wrap { display: flex; flex-direction: column; gap: 0; }

.co-time-pickers {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: var(--cream-soft);
  border: 1.5px solid var(--ink);
  border-top: none;
  border-radius: 0 0 6px 6px;
}

.co-time-select {
  flex: 1;
  min-width: 0;
  /* Override the full-width default from .co-select */
  width: auto;
}

.co-ampm {
  font-family: var(--font-display);
  font-size: 13px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--grey);
  flex-shrink: 0;
  min-width: 28px;
}
