/* ═══════════════════════════════════════════════════════════
   Las Pinchis Alitas — App PWA Stylesheet
   iOS 15 Unified Design System · Light Mode
   ═══════════════════════════════════════════════════════════ */

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

:root {
  /* ── iOS 15 Light Mode ── */
  --orange:       #FF9500;
  --orange-dark:  #D97F00;
  --orange-light: #FF9500;
  --bg:           #F2F2F7;
  --surface:      #FFFFFF;
  --surface2:     #F2F2F7;
  --border:       #C6C6C8;
  --border-light: rgba(60,60,67,0.10);
  --text:         #000000;
  --text-muted:   rgba(60,60,67,0.60);
  --green:        #34C759;
  --red:          #FF3B30;
  --blue:         #007AFF;
  --radius:       16px;
  --radius-sm:    10px;
  --nav-h:        49px;
  --header-h:     56px;
  --shadow-sm:    0 1px 4px rgba(0,0,0,0.07), 0 2px 8px rgba(0,0,0,0.04);
  --shadow-md:    0 2px 8px rgba(0,0,0,0.08), 0 6px 20px rgba(0,0,0,0.05);
}

html, body {
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, 'SF Pro Display', 'SF Pro Text', BlinkMacSystemFont, 'Helvetica Neue', Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

/* ── LAYOUT ──────────────────────────────────────────────── */
#app {
  height: 100dvh;
  display: flex;
  flex-direction: column;
  max-width: 480px;
  margin: 0 auto;
  position: relative;
  overflow: hidden;
}

/* ── HEADER ──────────────────────────────────────────────── */
.app-header {
  height: var(--header-h);
  background: rgba(242,242,247,0.88);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 0.5px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  flex-shrink: 0;
  padding-top: env(safe-area-inset-top);
  position: sticky; top: 0; z-index: 50;
}
.app-header h1 {
  font-size: 18px;
  font-weight: 700;
}
.app-header h1 span { color: var(--orange); }
.header-right { display: flex; align-items: center; gap: 12px; }
.header-cashback {
  background: rgba(52,199,89,0.12);
  border: none;
  border-radius: 9999px;
  padding: 4px 12px;
  font-size: 12px;
  color: #1A8A3B;
  font-weight: 600;
}
.header-avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--orange);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
}

/* ── PAGES ───────────────────────────────────────────────── */
.page-content {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: calc(var(--nav-h) + env(safe-area-inset-bottom) + 16px);
}

.page { display: none; }
.page.active { display: block; }

/* ── BOTTOM NAV ──────────────────────────────────────────── */
.bottom-nav {
  height: calc(var(--nav-h) + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  background: rgba(242,242,247,0.88);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-top: 0.5px solid var(--border);
  display: flex;
  flex-shrink: 0;
}
.nav-btn {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 10px;
  transition: color 0.2s;
  position: relative;
  padding: 8px 0;
}
.nav-btn .icon { font-size: 22px; line-height: 1; }
.nav-btn.active { color: var(--orange); }
.nav-btn .badge {
  position: absolute;
  top: 6px; right: calc(50% - 18px);
  background: var(--orange);
  color: #fff;
  border-radius: 10px;
  min-width: 18px; height: 18px;
  font-size: 10px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  padding: 0 4px;
  display: none;
}
.nav-btn .badge.visible { display: flex; }

/* ── CARDS ───────────────────────────────────────────────── */
.card {
  background: var(--surface);
  border-radius: var(--radius);
  border: none;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

/* ── BUTTONS ─────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 6px;
  border: none; border-radius: 50px;
  font-size: 15px; font-weight: 700;
  cursor: pointer;
  padding: 12px 24px;
  transition: background 0.15s, transform 0.1s;
  text-decoration: none;
}
.btn:active { transform: scale(0.97); }
.btn-primary { background: var(--orange); color: #fff; }
.btn-primary:hover { background: var(--orange-dark); }
.btn-secondary { background: var(--surface2); color: var(--text); }
.btn-block { width: 100%; border-radius: var(--radius); }
.btn-danger { background: var(--red); color: #fff; }
.btn-sm { padding: 7px 16px; font-size: 13px; }

/* ── FORM ────────────────────────────────────────────────── */
.form-group { margin-bottom: 16px; }
.form-group label {
  display: block;
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 6px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.form-group input, .form-group select, .form-group textarea {
  width: 100%;
  background: rgba(120,120,128,0.12);
  border: none;
  border-radius: var(--radius-sm);
  color: var(--text);
  padding: 12px 14px;
  font-size: 15px;
  outline: none;
  transition: border-color 0.2s;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
  border-color: var(--orange);
}
.form-group textarea { resize: vertical; min-height: 80px; }

/* ── PHONE INPUT +52 ────────────────────────────────────── */
.phone-input-wrap {
  display: flex;
  align-items: stretch;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  transition: border-color 0.2s;
}
.phone-input-wrap:focus-within { border-color: var(--orange); }
.phone-prefix {
  padding: 12px 4px 12px 14px;
  font-size: 15px;
  color: var(--text-muted);
  user-select: none;
  white-space: nowrap;
  line-height: 1;
  display: flex;
  align-items: center;
}
.phone-input-wrap input {
  flex: 1;
  border: none !important;
  background: transparent !important;
  border-radius: 0 !important;
  padding: 12px 14px 12px 6px !important;
  outline: none;
}

/* ── TOAST ───────────────────────────────────────────────── */
#toast {
  position: fixed;
  bottom: calc(var(--nav-h) + env(safe-area-inset-bottom) + 12px);
  left: 50%; transform: translateX(-50%) translateY(20px);
  background: #333;
  color: #fff;
  padding: 10px 20px;
  border-radius: 50px;
  font-size: 14px;
  font-weight: 500;
  opacity: 0;
  transition: opacity 0.3s, transform 0.3s;
  z-index: 9999;
  white-space: nowrap;
  max-width: 90vw;
  text-align: center;
  pointer-events: none;
}
#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ── MODAL OVERLAY ───────────────────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.7);
  z-index: 200;
  display: flex; align-items: flex-end;
  padding: 0;
  opacity: 0; pointer-events: none;
  transition: opacity 0.25s;
}
.modal-overlay.open { opacity: 1; pointer-events: all; }
.modal-sheet {
  background: var(--surface);
  border-radius: 20px 20px 0 0;
  width: 100%; max-width: 480px; margin: 0 auto;
  padding: 20px 20px calc(20px + env(safe-area-inset-bottom));
  transform: translateY(100%);
  transition: transform 0.3s cubic-bezier(.32,.72,0,1);
  max-height: 90dvh;
  overflow-y: auto;
}
.modal-overlay.open .modal-sheet { transform: translateY(0); }
.modal-handle {
  width: 40px; height: 4px;
  background: var(--border);
  border-radius: 2px;
  margin: 0 auto 16px;
}
.modal-title {
  font-size: 18px; font-weight: 700;
  margin-bottom: 20px;
}

/* ── MENU ITEMS ──────────────────────────────────────────── */
.menu-section { padding: 12px 16px 0; }
.menu-section h2 {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}
.menu-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background 0.15s;
  margin-bottom: 4px;
}
.menu-item:hover { background: var(--surface2); }
.menu-item-info { flex: 1; min-width: 0; }
.menu-item-name { font-size: 15px; font-weight: 600; }
.menu-item-desc { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.menu-item-price { font-size: 16px; font-weight: 700; color: var(--orange); white-space: nowrap; }
.menu-item-add {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--orange);
  color: #fff; font-size: 22px;
  border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  transition: background 0.15s, transform 0.1s;
}
.menu-item-add:active { transform: scale(0.9); }

/* Qty controls */
.qty-control {
  display: flex; align-items: center; gap: 8px;
}
.qty-btn {
  width: 30px; height: 30px; border-radius: 50%;
  border: none; cursor: pointer;
  font-size: 18px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  transition: transform 0.1s;
}
.qty-btn:active { transform: scale(0.9); }
.qty-btn.minus { background: var(--surface2); color: var(--text); }
.qty-btn.plus  { background: var(--orange);   color: #fff; }
.qty-num { font-size: 16px; font-weight: 700; min-width: 20px; text-align: center; }

/* ── CART ────────────────────────────────────────────────── */
.cart-empty {
  text-align: center; padding: 60px 24px;
  color: var(--text-muted);
}
.cart-empty .icon { font-size: 52px; margin-bottom: 12px; }
.cart-item {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
}
.cart-item:last-child { border-bottom: none; }
.cart-item-info { flex: 1; }
.cart-item-name { font-size: 14px; font-weight: 600; }
.cart-item-price { font-size: 13px; color: var(--text-muted); margin-top: 2px; }

/* ── ORDER TYPE TOGGLE ───────────────────────────────────── */
.order-type-toggle {
  display: flex;
  background: var(--surface2);
  border-radius: 50px;
  padding: 4px;
  gap: 4px;
  margin-bottom: 20px;
}
.order-type-btn {
  flex: 1;
  padding: 9px;
  border-radius: 50px;
  border: none;
  background: none;
  color: var(--text-muted);
  font-size: 14px; font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  display: flex; align-items: center; justify-content: center; gap: 6px;
}
.order-type-btn.active {
  background: var(--orange);
  color: #fff;
}

/* ── ADDRESS CARDS ───────────────────────────────────────── */
.addr-card {
  background: var(--surface2);
  border: 2px solid transparent;
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  cursor: pointer;
  margin-bottom: 8px;
  transition: border-color 0.2s;
  position: relative;
}
.addr-card.selected { border-color: var(--orange); }
.addr-card-alias { font-size: 13px; font-weight: 700; color: var(--orange); }
.addr-card-street { font-size: 14px; margin-top: 2px; }
.addr-card-actions { display: flex; gap: 8px; margin-top: 8px; }
.addr-card-btn {
  font-size: 12px; padding: 4px 10px;
  border-radius: 20px; border: 1px solid var(--border);
  background: none; color: var(--text-muted); cursor: pointer;
}

/* ── ORDER HISTORY ───────────────────────────────────────── */
.order-card {
  padding: 14px 16px;
  margin: 8px 16px;
}
.order-card-header { display: flex; justify-content: space-between; align-items: flex-start; }
.order-card-num { font-size: 13px; font-weight: 700; }
.order-card-date { font-size: 12px; color: var(--text-muted); }
.order-card-items { font-size: 13px; color: var(--text-muted); margin: 6px 0; line-height: 1.4; }
.order-card-footer { display: flex; justify-content: space-between; align-items: center; margin-top: 8px; }
.order-card-total { font-size: 15px; font-weight: 700; }
.status-badge {
  font-size: 11px; font-weight: 700;
  padding: 3px 10px; border-radius: 20px;
  text-transform: uppercase; letter-spacing: 0.04em;
}
.status-pending    { background: rgba(250,204,21,0.15); color: #facc15; }
.status-confirmed  { background: rgba(59,130,246,0.15);  color: #60a5fa; }
.status-preparing  { background: rgba(168,85,247,0.15);  color: #c084fc; }
.status-on_way     { background: rgba(232,93,4,0.15);    color: var(--orange); }
.status-delivered  { background: rgba(34,197,94,0.15);   color: var(--green); }
.status-cancelled  { background: rgba(239,68,68,0.15);   color: var(--red); }

/* ── PROFILE ─────────────────────────────────────────────── */
.profile-header {
  text-align: center;
  padding: 28px 16px 20px;
}
.profile-avatar-wrap {
  position: relative;
  width: 72px;
  margin: 0 auto 12px;
  cursor: pointer;
}
.profile-avatar {
  width: 72px; height: 72px;
  border-radius: 50%;
  background: var(--orange);
  color: #fff;
  font-size: 28px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.profile-avatar-badge {
  position: absolute;
  bottom: 0; right: 0;
  background: var(--surface2);
  border: 2px solid var(--bg);
  border-radius: 50%;
  width: 24px; height: 24px;
  font-size: 13px;
  display: flex; align-items: center; justify-content: center;
}
.profile-name { font-size: 20px; font-weight: 700; }
.profile-phone { font-size: 14px; color: var(--text-muted); margin-top: 4px; }

.cashback-banner {
  margin: 0 16px 16px;
  background: linear-gradient(135deg, #064e2b, #166534);
  border-radius: var(--radius);
  padding: 16px;
  display: flex; align-items: center; gap: 14px;
}
.cashback-icon { font-size: 32px; }
.cashback-info { flex: 1; }
.cashback-label { font-size: 11px; color: rgba(255,255,255,0.6); text-transform: uppercase; letter-spacing: 0.06em; }
.cashback-amount { font-size: 28px; font-weight: 800; color: #4ade80; }
.cashback-sub { font-size: 11px; color: rgba(255,255,255,0.5); margin-top: 2px; }

.profile-menu-item {
  display: flex; align-items: center; gap: 14px;
  padding: 15px 16px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background 0.15s;
}
.profile-menu-item:hover { background: var(--surface2); }
.profile-menu-item .pm-icon { font-size: 22px; width: 28px; text-align: center; }
.profile-menu-item .pm-label { flex: 1; font-size: 15px; }
.profile-menu-item .pm-arrow { color: var(--text-muted); font-size: 18px; }

/* ── AUTH ────────────────────────────────────────────────── */
.auth-container {
  padding: 32px 24px;
  max-width: 400px;
  margin: 0 auto;
}
.auth-logo {
  text-align: center;
  font-size: 52px;
  margin-bottom: 8px;
}
.auth-title {
  text-align: center;
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 4px;
}
.auth-sub {
  text-align: center;
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 28px;
}
.auth-switch {
  text-align: center;
  margin-top: 16px;
  font-size: 14px;
  color: var(--text-muted);
}
.auth-switch a { color: var(--orange); cursor: pointer; font-weight: 600; }

/* ── LOADING ─────────────────────────────────────────────── */
.spinner {
  width: 24px; height: 24px;
  border: 3px solid rgba(255,255,255,0.2);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }

.loading-screen {
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  height: 200px; gap: 12px;
  color: var(--text-muted);
  font-size: 14px;
}

/* ── CHECKOUT SUMMARY ────────────────────────────────────── */
.summary-row {
  display: flex; justify-content: space-between;
  padding: 8px 0;
  font-size: 14px;
  border-bottom: 1px solid var(--border);
}
.summary-row:last-child { border-bottom: none; }
.summary-row.total {
  font-size: 17px; font-weight: 700;
  padding-top: 12px;
}
.summary-row .label { color: var(--text-muted); }
.cashback-redeem {
  background: rgba(34,197,94,0.1);
  border: 1px solid rgba(34,197,94,0.25);
  border-radius: var(--radius-sm);
  padding: 12px;
  margin: 12px 0;
}
.cashback-redeem label {
  display: flex; align-items: center; gap: 10px;
  cursor: pointer; font-size: 14px;
}
.cashback-redeem input[type=checkbox] { width: 18px; height: 18px; accent-color: var(--green); }

/* ── TRACKING ────────────────────────────────────────────── */
.tracking-steps {
  padding: 16px;
}
.track-step {
  display: flex; gap: 14px;
  padding-bottom: 20px;
  position: relative;
}
.track-step:not(:last-child)::after {
  content: '';
  position: absolute;
  left: 15px; top: 32px; bottom: 0;
  width: 2px;
  background: var(--border);
}
.track-step.done::after { background: var(--orange); }
.track-dot {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--surface2);
  border: 2px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
  z-index: 1;
}
.track-step.done .track-dot {
  background: var(--orange);
  border-color: var(--orange);
}
.track-step.active .track-dot {
  border-color: var(--orange);
  box-shadow: 0 0 0 4px rgba(232,93,4,0.2);
}
.track-info { padding-top: 4px; }
.track-label { font-size: 14px; font-weight: 600; }
.track-sub   { font-size: 12px; color: var(--text-muted); margin-top: 2px; }

/* ── MISC ────────────────────────────────────────────────── */
.section-title {
  font-size: 16px; font-weight: 700;
  padding: 16px 16px 8px;
}
.empty-state {
  text-align: center; padding: 48px 24px;
  color: var(--text-muted);
}
.empty-state .icon { font-size: 48px; margin-bottom: 12px; }
.divider { height: 1px; background: var(--border); margin: 8px 0; }
.text-muted { color: var(--text-muted); }
.text-orange { color: var(--orange); }
.text-green  { color: var(--green); }
.fw-bold { font-weight: 700; }
.mt-8  { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.p-16  { padding: 16px; }

/* ── VIP SYSTEM ──────────────────────────────────────────── */
.vip-badge {
  display: inline-block;
  margin-top: 8px;
  padding: 4px 14px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  letter-spacing: .3px;
}
.vip-card {
  background: var(--surface2);
}
.vip-progress-track {
  width: 100%;
  height: 8px;
  background: var(--border);
  border-radius: 4px;
  overflow: hidden;
}
.vip-progress-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.6s ease;
  min-width: 4px;
}
.btn-outline {
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  cursor: pointer;
  font-size: 14px;
  padding: 10px 20px;
}
.btn-outline:active { opacity: .7; }

/* ── PROFILE SECTION TOGGLE ──────────────────────────────── */
.profile-menu-item .pm-arrow {
  transition: transform 0.25s ease;
  display: inline-block;
}
.profile-menu-item.open .pm-arrow {
  transform: rotate(90deg);
}
.profile-section-body {
  display: none;
  padding: 0 4px 8px;
}

/* ═══════════════════════════════════════════════════════════
   MENÚ — NUEVO DISEÑO (Grid 2 columnas + Category Tabs)
   ═══════════════════════════════════════════════════════════ */

/* ── Category Tabs (sticky) ─────────────────────────────── */
.category-tabs {
  display: flex;
  overflow-x: auto;
  gap: 8px;
  padding: 10px 16px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  scrollbar-width: none;
  position: sticky;
  top: 0;
  z-index: 20;
}
.category-tabs::-webkit-scrollbar { display: none; }
.cat-tab {
  flex-shrink: 0;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  border: 1.5px solid var(--border);
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
}
.cat-tab.active {
  background: var(--orange);
  border-color: var(--orange);
  color: #fff;
}

/* ── Category section wrapper ───────────────────────────── */
.menu-section-wrapper { padding-top: 4px; }
.menu-cat-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  padding: 14px 16px 8px;
}

/* ── 2-column grid ──────────────────────────────────────── */
.menu-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 0 12px 8px;
}

/* ── Product card ───────────────────────────────────────── */
.menu-card {
  background: var(--surface);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  border: 1px solid var(--border);
  position: relative;
  transition: transform 0.12s;
  -webkit-tap-highlight-color: transparent;
}
.menu-card:active { transform: scale(0.97); }

.menu-card-img {
  width: 100%;
  aspect-ratio: 1 / 1;
  background: var(--surface2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 40px;
  overflow: hidden;
}
.menu-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.menu-card-body {
  padding: 8px 8px 32px;
}
.menu-card-name {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: 3px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.menu-card-price {
  font-size: 14px;
  font-weight: 800;
  color: var(--orange);
}

/* ── Card add/qty buttons ───────────────────────────────── */
.menu-card-add {
  position: absolute;
  bottom: 6px;
  right: 6px;
  width: 30px; height: 30px;
  border-radius: 50%;
  background: var(--orange);
  color: #fff;
  font-size: 22px;
  border: none;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 2px 8px rgba(232,93,4,0.4);
  transition: transform 0.1s;
}
.menu-card-add:active { transform: scale(0.88); }

.menu-card-qty {
  position: absolute;
  bottom: 6px;
  right: 6px;
  display: none;
  align-items: center;
  gap: 2px;
  background: var(--surface2);
  border: 1.5px solid var(--orange);
  border-radius: 20px;
  padding: 2px 5px;
}
.menu-card-qty.visible { display: flex; }
.menu-card-qty .qty-btn {
  width: 22px; height: 22px;
  font-size: 14px;
}
.menu-card-qty .qty-num { font-size: 13px; font-weight: 700; min-width: 16px; }

/* ── Modal imagen ───────────────────────────────────────── */
.modal-item-img {
  width: 100%;
  height: 180px;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface2);
  display: flex; align-items: center; justify-content: center;
  font-size: 56px;
  margin-bottom: 14px;
  flex-shrink: 0;
}
.modal-item-img img {
  width: 100%; height: 100%;
  object-fit: cover;
}

/* ═══════════════════════════════════════════════════════════
   MENÚ v2 — Category-first UX (UberEats style)
   ═══════════════════════════════════════════════════════════ */

/* ── Category grid ──────────────────────────────────────── */
.cat-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  padding: 14px 12px;
}

.cat-card {
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  background: var(--surface);
  border: 1px solid var(--border);
  position: relative;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.12s;
}
.cat-card:active { transform: scale(0.96); }

.cat-card-img {
  width: 100%;
  aspect-ratio: 1 / 1;
  position: relative;
  overflow: hidden;
  background: var(--surface2);
}

/* 4-image collage */
.cat-collage-4 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  width: 100%; height: 100%;
}
.cat-collage-4 img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}

/* 2-image collage */
.cat-collage-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  width: 100%; height: 100%;
}
.cat-collage-2 img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}

/* Single image */
.cat-collage-single {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}

/* Empty state */
.cat-collage-empty {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  font-size: 40px;
}

/* Gradient overlay on image */
.cat-card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, transparent 40%, rgba(0,0,0,0.7) 100%);
  pointer-events: none;
}

.cat-card-info {
  padding: 10px 10px 12px;
}
.cat-card-name {
  font-size: 14px;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 2px;
}
.cat-card-count {
  font-size: 12px;
  color: var(--text-muted);
}

/* ── Items view (slide animation) ───────────────────────── */
#menu-items-view {
  position: relative;
  min-height: 100%;
}

@keyframes slideInRight {
  from { transform: translateX(100%); opacity: 0; }
  to   { transform: translateX(0);    opacity: 1; }
}
@keyframes slideOutRight {
  from { transform: translateX(0);    opacity: 1; }
  to   { transform: translateX(100%); opacity: 0; }
}
.slide-in  { animation: slideInRight  0.28s cubic-bezier(0.25,0.46,0.45,0.94) forwards; }
.slide-out { animation: slideOutRight 0.22s cubic-bezier(0.55,0,1,0.45) forwards; }

/* ── Items header (back button) ──────────────────────────── */
.items-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px 8px;
  position: sticky;
  top: 0;
  background: var(--bg);
  z-index: 10;
  border-bottom: 1px solid var(--border);
}
.back-btn {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 18px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.12s;
}
.back-btn:active { background: var(--surface2); }
.items-cat-name {
  font-size: 17px;
  font-weight: 700;
}

/* ── Modifier chips ──────────────────────────────────────── */
.mod-section-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .05em;
  margin-bottom: 10px;
}
.mod-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.mod-chip {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--surface2);
  border: 1.5px solid var(--border);
  border-radius: 20px;
  padding: 6px 12px;
  cursor: pointer;
  font-size: 13px;
  transition: border-color 0.12s, background 0.12s;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}
.mod-chip input[type=checkbox] {
  display: none;
}
.mod-chip.selected {
  border-color: var(--orange);
  background: rgba(232,93,4,0.12);
  color: var(--orange);
  font-weight: 600;
}

/* ── Payment methods ────────────────────────────────────── */
.pay-methods {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.pay-method {
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  text-align: center;
  transition: border-color 0.15s, background 0.15s;
  -webkit-tap-highlight-color: transparent;
  position: relative;
}
.pay-method.active {
  border-color: var(--orange);
  background: rgba(232,93,4,0.07);
}
.pay-icon { font-size: 28px; }
.pay-name { font-size: 14px; font-weight: 700; }
.pay-sub  { font-size: 11px; color: var(--text-muted); }
.pay-check {
  position: absolute;
  top: 8px; right: 8px;
  width: 18px; height: 18px;
  background: var(--orange);
  color: #fff;
  border-radius: 50%;
  font-size: 10px;
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}


/* ── Contextual selectors: burger types & flavor chips ──── */
.ctx-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 6px;
}

/* Base chip */
.ctx-chip {
  background: var(--surface2);
  border: 1.5px solid var(--border);
  border-radius: 20px;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, transform 0.1s;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}
.ctx-chip:active { transform: scale(0.96); }
.ctx-chip.selected {
  border-color: var(--orange);
  background: rgba(232,93,4,0.13);
  color: var(--orange);
  font-weight: 700;
}

/* Burger type chip — two-column layout (name + price) */
.burger-chip {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  min-width: 120px;
  flex: 1 1 calc(50% - 8px);
}
.ctx-chip-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}
.burger-chip.selected .ctx-chip-label { color: var(--orange); }
.ctx-chip-price {
  font-size: 13px;
  font-weight: 700;
  color: var(--orange);
  margin-top: 2px;
}
.burger-chip.selected .ctx-chip-price { color: var(--orange-dark); }

/* Flavor chip — pill, compact */
.flavor-chip {
  padding: 7px 14px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
}
.flavor-chip.selected { color: var(--orange); }

/* Labels inside mod-section-title */
.mod-required {
  font-size: 11px;
  font-weight: 600;
  color: var(--orange);
  background: rgba(232,93,4,0.1);
  border-radius: 10px;
  padding: 1px 7px;
  margin-left: 4px;
}
.mod-hint {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-muted);
  margin-left: 4px;
}


/* ── v11 additions ──────────────────────────────────────── */

/* Cashback amount input focus */
#cashback-amount:focus {
  border-color: var(--orange) !important;
  box-shadow: 0 0 0 2px rgba(232,93,4,0.2);
}

/* Pickup address card link */
#checkout-pickup-section a {
  text-decoration: none;
}
