/* Header */
.app-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: var(--grad-navy);
  color: #fff;
  padding-top: env(safe-area-inset-top);
  box-shadow: 0 6px 18px rgba(14,30,51,.25);
}
.header-inner {
  max-width: 720px;
  margin: 0 auto;
  padding: 12px 16px 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand {
  display: flex;
  align-items: center;
  min-width: 0;
  flex: 1 1 auto;
  margin-right: 12px;
}
.brand-logo {
  max-width: 100%;
  max-height: 48px;
  width: auto;
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 3px 6px rgba(0,0,0,.35));
}
@media (min-width: 420px) {
  .brand-logo { max-height: 56px; }
}
@media (min-width: 720px) {
  .brand-logo { max-height: 64px; }
}

.shop-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.15);
}
.shop-pill .dot {
  width: 8px; height: 8px; border-radius: 50%; background: #888;
  box-shadow: 0 0 0 0 currentColor;
}
.shop-pill.open .dot { background: #2cd273; animation: pulse 1.8s ease-in-out infinite; color: #2cd273; }
.shop-pill.closed .dot { background: #ff7a7a; }
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(44,210,115,.6); }
  50% { box-shadow: 0 0 0 6px rgba(44,210,115,0); }
}

/* Steps */
.steps {
  max-width: 720px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  padding: 4px 16px 12px;
}
.step {
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.12);
  color: #fff;
  border-radius: 10px;
  padding: 7px 6px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .01em;
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  opacity: .65;
  transition: opacity var(--dur-1) var(--ease), background var(--dur-1) var(--ease);
}
.step span { display: grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; background: rgba(255,255,255,.18); font-size: 11px; }
.step[aria-current="step"] {
  opacity: 1;
  background: var(--grad-orange);
  border-color: transparent;
}
.step[aria-current="step"] span { background: rgba(255,255,255,.25); }
.step.done { opacity: .9; }
.step.done span { background: #2cd273; color: var(--navy); }

/* Category tabs */
.category-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 4px 2px 14px;
  margin: 0 -4px;
  scrollbar-width: none;
}
.category-tabs::-webkit-scrollbar { display: none; }
.cat-tab {
  flex: 0 0 auto;
  background: #fff;
  color: var(--navy);
  border: 1.5px solid var(--line);
  padding: 8px 14px;
  border-radius: 999px;
  font-weight: 700;
  white-space: nowrap;
  transition: all var(--dur-1) var(--ease);
}
.cat-tab.active {
  background: var(--navy);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 4px 12px rgba(14,30,51,.25);
}

/* Menu items */
.menu-list { display: flex; flex-direction: column; gap: 10px; }
.menu-category {
  scroll-margin-top: 130px;
}
.menu-category h2 {
  font-size: 16px;
  color: var(--navy);
  margin: 16px 0 8px;
  font-weight: 900;
  letter-spacing: -.01em;
}
.item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: var(--card);
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  padding: 12px 14px;
  box-shadow: var(--shadow-sm);
  animation: fadeUp var(--dur-2) var(--ease);
}
.item-body { min-width: 0; }
.item-name { font-weight: 800; color: var(--navy); }
.item-desc { font-size: 13px; color: var(--muted); margin-top: 2px; }
.item-price { font-weight: 700; color: var(--ink); margin-top: 6px; }
.item-cta {
  background: var(--grad-orange);
  color: #fff;
  border: none;
  border-radius: 999px;
  padding: 10px 16px;
  font-weight: 800;
  white-space: nowrap;
  box-shadow: 0 4px 12px rgba(242,106,0,.35);
  transition: transform var(--dur-1) var(--ease);
}
.item-cta:active { transform: scale(.96); }
.item.in-cart { border-color: var(--orange); }
.item-qty-badge {
  background: var(--orange);
  color: #fff;
  width: 22px; height: 22px;
  border-radius: 50%;
  display: inline-grid; place-items: center;
  font-size: 12px; font-weight: 800;
  margin-right: 8px;
  animation: bounce var(--dur-3) var(--ease);
}

/* Item customiser sheet */
.sheet-inner h3 { margin: 4px 0 6px; color: var(--navy); font-weight: 900; }
.sheet-inner p.lead { color: var(--muted); margin: 0 0 12px; }
.qty-row {
  display: flex; align-items: center; justify-content: space-between;
  background: var(--paper);
  border: 1.5px solid var(--line);
  border-radius: 14px;
  padding: 8px 12px;
  margin: 10px 0;
}
.qty-controls { display: flex; align-items: center; gap: 12px; }
.qty-btn {
  width: 36px; height: 36px;
  border-radius: 50%;
  border: 1.5px solid var(--line);
  background: #fff;
  font-size: 18px;
  font-weight: 900;
  color: var(--navy);
}
.qty-btn:active { transform: scale(.94); }
.qty-val { min-width: 28px; text-align: center; font-weight: 900; font-size: 18px; color: var(--navy); }
.sheet-actions { display: flex; gap: 10px; padding: 12px 18px max(env(safe-area-inset-bottom), 16px); border-top: 1.5px solid var(--line); background: var(--paper); }
.sheet-actions .btn { flex: 1; }

.mods-group { margin: 12px 0; padding: 8px 10px; border-radius: 12px; transition: background var(--dur-2) var(--ease), box-shadow var(--dur-2) var(--ease); }
.mods-group .mods-title { font-size: 13px; font-weight: 700; color: var(--muted); margin-bottom: 6px; display: flex; align-items: center; gap: 8px; }
.mods-group.required { background: rgba(242,106,0,.05); }
.mods-group.required.satisfied { background: rgba(15,138,75,.06); }
.mods-required {
  background: var(--orange);
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 999px;
}
.mods-group.satisfied .mods-required {
  background: var(--ok);
}
.mods-group.satisfied .mods-required::before {
  content: '✓ ';
}
.mods-group.missing {
  background: rgba(185,28,28,.08);
  box-shadow: 0 0 0 2px rgba(185,28,28,.3);
  animation: shake var(--dur-3) var(--ease);
}
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-4px); }
  40% { transform: translateX(4px); }
  60% { transform: translateX(-2px); }
  80% { transform: translateX(2px); }
}

/* Cart bar */
.cart-bar {
  position: fixed;
  left: 0; right: 0;
  bottom: 0;
  padding: 10px max(env(safe-area-inset-left), 12px) max(env(safe-area-inset-bottom), 10px) max(env(safe-area-inset-right), 12px);
  background: rgba(255,252,247,.92);
  backdrop-filter: blur(10px);
  border-top: 1.5px solid var(--line);
  z-index: 35;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  animation: fadeUp var(--dur-3) var(--ease);
}
.cart-min-note {
  grid-column: 1 / -1;
  background: #fff4e6;
  border: 1.5px solid #f0c79a;
  color: #7a3b00;
  border-radius: 10px;
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 700;
  text-align: center;
  animation: fadeUp var(--dur-2) var(--ease);
}
.cart-bar.below-min .cart-bar-next {
  background: #ddd;
  color: #777;
  box-shadow: none;
}
.cart-bar-main {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 10px;
  background: var(--navy);
  color: #fff;
  border: none;
  border-radius: 14px;
  padding: 12px 14px;
  font-weight: 700;
  box-shadow: var(--shadow);
}
.cart-count {
  background: var(--orange);
  color: #fff;
  width: 26px; height: 26px;
  border-radius: 50%;
  display: grid; place-items: center;
  font-size: 13px;
  font-weight: 900;
}
.cart-total { font-weight: 900; }
.cart-bar-next { padding: 12px 18px; }

/* Drawer items */
.drawer-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px dashed var(--line);
}
.drawer-item:last-child { border-bottom: none; }
.drawer-item .name { font-weight: 700; color: var(--navy); }
.drawer-item .mods { font-size: 12px; color: var(--muted); }
.drawer-item .price { font-weight: 800; min-width: 60px; text-align: right; color: var(--ink); }
.drawer-item .rm {
  background: transparent;
  border: 1.5px solid var(--line);
  border-radius: 8px;
  padding: 4px 8px;
  font-size: 12px;
  color: var(--muted);
}

/* Payment */
.pay-options { display: flex; flex-direction: column; gap: 10px; }
.pay-opt {
  text-align: left;
  background: #fff;
  border: 1.5px solid var(--line);
  border-radius: 16px;
  padding: 14px 16px;
  transition: all var(--dur-1) var(--ease);
}
.pay-opt:hover { box-shadow: var(--shadow-sm); }
.pay-opt.active {
  border-color: var(--orange);
  background: linear-gradient(135deg, #fff 0%, #fff7ee 100%);
  box-shadow: 0 4px 14px rgba(242,106,0,.22);
}
.pay-opt-title { font-weight: 800; color: var(--navy); margin-bottom: 4px; }
.pay-opt-sub { font-size: 13px; color: var(--muted); }

/* Summary */
.summary-line {
  display: flex; justify-content: space-between;
  padding: 6px 0;
  border-bottom: 1px dashed var(--line);
}
.summary-line:last-child { border-bottom: none; }
.summary-line .name { font-weight: 700; color: var(--navy); }
.summary-line .mods { font-size: 12px; color: var(--muted); margin-top: 2px; }
.summary-totals { margin-top: 10px; padding-top: 10px; border-top: 1.5px solid var(--line); }
.summary-totals .row { display: flex; justify-content: space-between; padding: 4px 0; }
.summary-totals .row.total { font-weight: 900; font-size: 18px; color: var(--navy); margin-top: 4px; }

/* Slot status */
.slot-status {
  margin-top: 8px;
  font-size: 13px;
  color: var(--muted);
  min-height: 18px;
}
.slot-status.ok { color: var(--ok); font-weight: 700; }
.slot-status.bad { color: var(--bad); font-weight: 700; }

/* Contact note on summary screen */
.contact-note {
  background: #fff7ec;
  border: 1.5px solid #f5cf94;
  border-radius: 14px;
  padding: 12px 14px;
  margin: 12px 0;
  color: #7a3b00;
  font-size: 14px;
  line-height: 1.4;
}
.contact-note strong { display: block; margin-bottom: 2px; color: #5a2a00; }

.track-msg {
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 14px;
}

/* Tracking */
.track { text-align: center; padding: 12px 0 20px; position: relative; }
.track-ref {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-weight: 900;
  font-size: 20px;
  color: var(--navy);
  background: var(--paper);
  border: 1.5px dashed var(--line);
  border-radius: 12px;
  padding: 12px;
  margin: 8px 0 18px;
}
.track-steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.track-steps li {
  display: flex; align-items: center; gap: 12px;
  background: var(--card);
  border: 1.5px solid var(--line);
  border-radius: 14px;
  padding: 12px 14px;
  font-weight: 700;
  color: var(--muted);
}
.track-steps li::before {
  content: '';
  width: 20px; height: 20px;
  border-radius: 50%;
  background: #ddd;
  flex: 0 0 auto;
}
.track-steps li.done { color: var(--navy); border-color: var(--ok); }
.track-steps li.done::before { background: var(--ok); }
.track-steps li.current { color: var(--navy); border-color: var(--orange); box-shadow: 0 6px 14px rgba(242,106,0,.2); }
.track-steps li.current::before { background: var(--orange); animation: pulse 1.6s ease-in-out infinite; }

.track-confetti { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.track-confetti span {
  position: absolute;
  width: 8px; height: 14px;
  top: -20px;
  animation: confettiFall 2.6s ease-in forwards;
}

.track-details {
  margin-top: 16px;
  font-size: 14px;
  color: var(--muted);
}

/* Wider screens */
@media (min-width: 720px) {
  .header-inner { padding: 16px 24px 10px; }
  .steps { padding: 6px 24px 14px; }
  .app-main { padding-left: 24px; padding-right: 24px; }
  .item { padding: 14px 18px; }
}
