/* ══════════════════════════════════════════════════════
   orders.css — Hoja de estilos principal para La Central
   ══════════════════════════════════════════════════════ */

:root {
  --brand:    #FF4D1A;
  --brand-d:  #E03A0A;
  --brand-lt: #FFF2EE;
  --brand-mid:#FFD0BA;
  --ok:       #10B981;
  --warn:     #F59E0B;
  --dark:     #180F06;
  --text:     #1C130A;
  --sub:      #5C4635;
  --muted:    #A08878;
  --line:     #EAE0D5;
  --bg:       #F5F0E8;
  --card:     #FFFFFF;
  --toolbar-bg: #F5F0E8;
  --cart-btn:   #180F06;
  --order-btn:  #25D366;
  --order-btn-text:   #FFFFFF;
  --order-btn-border: #25D366;
  --order-btn-hover:      #1FB357;
  --order-btn-hover-text: #FFFFFF;
  --order-btn-hover-border: #1FB357;
  --r:        20px;
  --r-sm:     14px;
  --sh:       0 2px 16px rgba(24,15,6,.07);
  --sh-lg:    0 10px 40px rgba(24,15,6,.14);
  --max:      1300px;
  --tbh:      62px;
}

*,*::before,*::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { font-family: 'Wix Madefor Display', ui-sans-serif, system-ui, sans-serif; background: var(--bg); color: var(--text); min-height: 100dvh; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
a { text-decoration: none; color: inherit; }
.wrap { width: min(100%, var(--max)); margin: 0 auto; padding: 0 16px; }

/* ══ HERO ══ */
.hero {
  background: var(--bg);
  border-bottom: 1px solid var(--line);
  padding: 28px 0 24px;
}
.hero-inner {
  display: grid;
  grid-template-columns: 3fr 9fr;
  gap: 32px;
  align-items: center;
}

/* col izquierda */
.hero-info { display: flex; flex-direction: column; gap: 14px; }
.hero-info-text { display: flex; flex-direction: column; gap: 10px; }
.logo-wrap {
  width: 72px; height: 72px; min-width: 72px;
  border-radius: 18px;
  background: var(--brand); border: 3px solid var(--card);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden; flex-shrink: 0;
  font-family: 'Wix Madefor Display', sans-serif; font-weight: 800; font-size: 1.4rem; color: #fff;
  box-shadow: 0 4px 20px rgba(0,0,0,.12);
}
.logo-wrap img { width: 72px; height: 72px; object-fit: cover; display: block; }
.hero-texts h1 { font-family: 'Wix Madefor Display', sans-serif; font-weight: 800; font-size: clamp(1.35rem,3vw,1.9rem); line-height: 1.1; color: var(--text); }
.hero-texts .sub { margin-top: 5px; font-size: .88rem; color: var(--muted); line-height: 1.45; }
.hero-chips { display: flex; flex-wrap: wrap; gap: 7px; }
.info-chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 10px; background: var(--card); border: 1px solid var(--line); font-size: .8rem; color: var(--sub); font-weight: 600; box-shadow: var(--sh); }
.hero-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

/* col derecha: imagen proporcional */
.hero-cover-col {
  position: relative;
  border-radius: var(--r);
  overflow: hidden;
  box-shadow: 0 4px 24px rgba(0,0,0,.10);
  background: var(--line);
  display: flex; align-items: center; justify-content: center;
}
.hero-cover-img {
  width: 100%; height: auto; display: block;
  object-fit: contain;
  max-height: 320px;
}
.hero-cover-placeholder { min-height: 180px; opacity: .65; }

/* botones hero — viven junto al nombre del local, nunca sobre el banner/portada */
.contact-btn {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 9px 16px; border-radius: 999px;
  background: var(--card); border: 1.5px solid var(--line);
  color: var(--text); font-weight: 700; font-size: .82rem; cursor: pointer; transition: .2s;
  box-shadow: var(--sh);
}
.contact-btn:hover { border-color: var(--brand); color: var(--brand); }
.status-pill { display: inline-flex; align-items: center; gap: 7px; padding: 9px 15px; border-radius: 999px; font-size: .82rem; font-weight: 800; white-space: nowrap; }
.status-pill.open { background: #059669; color: #fff; border: none; box-shadow: 0 2px 8px rgba(5,150,105,.35); }
.status-pill.closed { background: #6b7280; color: #fff; border: none; box-shadow: 0 2px 8px rgba(107,114,128,.35); }
.status-pill.closed i { font-size: .78em; }
.blink { width: 7px; height: 7px; border-radius: 50%; background: currentColor; animation: blink 2s infinite; flex-shrink: 0; }
@keyframes blink { 0%,100% { opacity: 1; } 50% { opacity: .3; } }

@media (max-width: 640px) {
  .hero { padding: 16px 0 14px; }
  .hero-inner { grid-template-columns: 1fr; gap: 14px; }
  .hero-cover-col { order: -1; border-radius: var(--r-sm); }
  .hero-cover-img { max-height: 200px; }
  .hero-cover-placeholder { min-height: 120px; }
  /* logo a la izquierda, textos + botones a la derecha (misma columna que la dirección) */
  .hero-info { flex-direction: row; align-items: flex-start; gap: 12px; }
  .hero-info-text { flex: 1; min-width: 0; }
  .hero-actions { gap: 6px; }
  .hero-actions .contact-btn { padding: 7px 13px; font-size: .78rem; }
  .hero-actions .status-pill { padding: 7px 12px; font-size: .78rem; }
}

/* ══ TOOLBAR ══ */
.toolbar-wrap { position: sticky; top: 0; z-index: 50; background: var(--toolbar-bg); backdrop-filter: blur(18px) saturate(1.6); border-bottom: 1px solid var(--line); height: var(--tbh); }
.toolbar { height: 100%; display: flex; align-items: center; gap: 10px; }
.search-field { flex: 1; position: relative; }
.search-field svg { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.search-field input { width: 100%; padding: 13px 14px 13px 44px; border: 1.5px solid var(--line); border-radius: var(--r-sm); background: var(--card); font-family: 'Wix Madefor Display', sans-serif; font-size: 1rem; color: var(--text); outline: none; transition: .2s; }
.search-field input::placeholder { color: var(--muted); }
.search-field input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(255,77,26,.1); }
.top-cart-btn { display: flex; align-items: center; gap: 7px; padding: 12px 16px; border-radius: var(--r-sm); background: var(--cart-btn); color: #fff; font-weight: 800; font-size: .88rem; transition: .18s; flex-shrink: 0; }
.top-cart-btn:hover { background: var(--brand); transform: translateY(-1px); }
.badge { display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 5px; background: var(--brand); border-radius: 999px; font-size: .75rem; font-weight: 900; color: #fff; }
.top-cart-btn .badge { background: rgba(255,255,255,.22); }

/* ══ CATEGORY CHIPS ══ */
.cats-bar { position: sticky; top: var(--tbh); z-index: 40; background: var(--card); border-bottom: 1px solid var(--line); }
.cats-scroll { display: flex; gap: 8px; padding: 10px 16px; overflow-x: auto; -webkit-overflow-scrolling: touch; touch-action: pan-x; scrollbar-width: none; cursor: grab; }
.cats-scroll:active { cursor: grabbing; }
.cats-scroll::-webkit-scrollbar { display: none; }
.cat-chip { display: inline-flex; align-items: center; gap: 6px; padding: 9px 16px; border-radius: 999px; white-space: nowrap; flex-shrink: 0; background: var(--bg); border: 1.5px solid var(--line); font-weight: 700; font-size: .85rem; color: var(--sub); cursor: pointer; transition: all .18s; -webkit-tap-highlight-color: transparent; user-select: none; }
.cat-chip.active { background: var(--brand); border-color: var(--brand); color: #fff; }
.cat-chip:hover:not(.active) { background: var(--brand-lt); border-color: var(--brand-mid); color: var(--brand); }

/* ══ PAGE LAYOUT ══ */
.page-body { padding: 18px 0 100px; }
@media (min-width: 960px) {
  .page-body { padding-bottom: 48px; }
  .page-grid { display: grid; grid-template-columns: 210px 1fr 320px; gap: 20px; align-items: start; padding: 22px 0 48px; }
  .cats-bar { display: none !important; }
  .sidebar { display: block !important; }
  .cart-panel { display: flex !important; }
  .cart-bar { display: none !important; }
}
@media (max-width: 959px) {
  .page-grid { display: block; padding: 0; }
  .sidebar { display: none !important; }
  .cart-panel { display: none !important; }
}
.sidebar { position: sticky; top: calc(var(--tbh) + 14px); background: var(--card); border-radius: var(--r); border: 1px solid var(--line); box-shadow: var(--sh); overflow: hidden; }
.sidebar-head { padding: 16px 16px 10px; font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.side-link { display: flex; align-items: center; gap: 10px; padding: 12px 16px; font-weight: 700; font-size: .92rem; color: var(--sub); cursor: pointer; transition: .15s; border-left: 3px solid transparent; }
.side-link .ico { font-size: 1.05rem; width: 22px; text-align: center; }
.side-link:hover { background: var(--brand-lt); color: var(--brand); }
.side-link.active { background: var(--brand-lt); color: var(--brand); border-left-color: var(--brand); }

/* ══ PRODUCTS ══ */
.products-area { display: flex; flex-direction: column; gap: 30px; }
@media (max-width: 959px) { .products-area { padding: 18px 14px 0; } }

.sec-title { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; padding-left: 12px; border-left: 3px solid var(--brand); }
.sec-title h2 { font-family: 'Wix Madefor Display', sans-serif; font-weight: 700; font-size: 1.15rem; color: var(--text); line-height: 1; }
.sec-count { font-size: .8rem; color: var(--muted); font-weight: 600; background: var(--bg); border: 1px solid var(--line); padding: 2px 8px; border-radius: 999px; }

.prod-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 11px; }
@media (min-width: 540px) and (max-width: 959px) { .prod-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 960px)  { .prod-grid { grid-template-columns: repeat(2, 1fr); gap: 14px; } }
@media (min-width: 1160px) { .prod-grid { grid-template-columns: repeat(3, 1fr); } }

.prod-card { background: var(--card); border-radius: var(--r); border: 1px solid var(--line); overflow: hidden; box-shadow: var(--sh); transition: transform .2s, box-shadow .2s, border-color .2s; cursor: pointer; animation: fadeUp .35s ease both; -webkit-tap-highlight-color: transparent; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.prod-card:hover { transform: translateY(-2px); box-shadow: var(--sh-lg); border-color: var(--brand-mid); }
.prod-card:active { transform: scale(.98); }
/* Producto fuera de su horario de disponibilidad (order_item_schedules) */
.prod-card.blocked { cursor: not-allowed; opacity: .55; filter: grayscale(50%); }
.prod-card.blocked:hover, .prod-card.blocked:active { transform: none; box-shadow: var(--sh); border-color: var(--line); }
.p-schedule-msg { display: flex; align-items: center; gap: 5px; font-size: .74rem; font-weight: 700; color: var(--sub); }
.p-schedule-msg i { font-size: .85em; }

.p-thumb { aspect-ratio: 1; position: relative; overflow: hidden; display: flex; align-items: center; justify-content: center; }
.p-thumb::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 40%, rgba(0,0,0,.16) 100%); }
.p-emoji { font-size: clamp(2rem,7vw,3rem); line-height: 1; position: relative; z-index: 1; }
.p-label { position: absolute; top: 9px; left: 9px; z-index: 2; padding: 4px 9px; border-radius: 999px; font-size: .7rem; font-weight: 900; letter-spacing: .02em; }
.p-label.brand { background: var(--brand); color: #fff; }
.p-label.ok    { background: var(--ok); color: #fff; }
.p-label.warn  { background: var(--warn); color: #1C130A; }
.p-label.dark  { background: rgba(0,0,0,.55); backdrop-filter: blur(6px); color: #fff; }
.p-body { padding: 12px 13px 14px; }
.p-name { font-weight: 800; font-size: .92rem; line-height: 1.25; }
.p-desc { margin-top: 4px; font-size: .79rem; color: var(--muted); line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.p-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 11px; gap: 6px; }
.p-price { font-family: 'Wix Madefor Display', sans-serif; font-weight: 800; font-size: .93rem; }
.p-price.from { font-size: .83rem; color: var(--sub); }
.p-price.svc  { font-size: .76rem; color: var(--brand); font-weight: 800; text-transform: uppercase; letter-spacing: .04em; }
.add-btn { width: 34px; height: 34px; border-radius: 11px; flex-shrink: 0; background: var(--brand); color: #fff; display: grid; place-items: center; font-size: 1.2rem; transition: all .18s; }
.add-btn:hover { background: var(--brand-d); transform: scale(1.07); }
.qty-row { display: flex; align-items: center; gap: 4px; }
.q-btn { width: 30px; height: 30px; border-radius: 9px; background: var(--bg); color: var(--text); font-weight: 800; font-size: .95rem; display: grid; place-items: center; transition: .15s; }
.q-btn:hover { background: var(--brand); color: #fff; }
.q-num { font-weight: 900; font-size: .88rem; min-width: 16px; text-align: center; }
.no-res { text-align: center; padding: 60px 20px; color: var(--muted); animation: fadeUp .3s ease; }
.no-res .ico { font-size: 3rem; margin-bottom: 12px; }

/* ══ MOBILE: lista horizontal ══ */
@media (max-width: 539px) {
  .prod-grid { grid-template-columns: 1fr; gap: 9px; }
  .prod-card { display: flex; flex-direction: row; align-items: stretch; min-height: 100px; }
  .p-thumb { width: 96px; min-width: 96px; aspect-ratio: unset; order: 2; border-radius: 0 var(--r) var(--r) 0; align-self: stretch; }
  .p-thumb::after { background: linear-gradient(270deg, transparent 25%, rgba(0,0,0,.1) 100%); }
  .p-emoji { font-size: 1.9rem; }
  .p-label { top: 7px; left: 7px; font-size: .65rem; padding: 3px 7px; }
  .p-body { flex: 1; order: 1; padding: 12px 10px 11px 13px; display: flex; flex-direction: column; justify-content: space-between; border-right: none; }
  .p-desc { -webkit-line-clamp: 2; }
  .p-foot { margin-top: 8px; }
}

/* ══ DESKTOP CART ══ */
/* El panel tiene alto máximo relativo al viewport; la lista de ítems (cp-body)
   hace scroll propio, y el resumen + botón (cp-foot) quedan siempre fijos y
   visibles abajo, sin importar cuántos productos haya en el pedido. */
.cart-panel { position: sticky; top: calc(var(--tbh) + 14px); max-height: calc(100dvh - var(--tbh) - 28px); background: var(--card); border-radius: var(--r); border: 1px solid var(--line); box-shadow: var(--sh); overflow: hidden; display: flex; flex-direction: column; }
.cp-head { padding: 18px 18px 14px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; flex-shrink: 0; }
.cp-head h3 { font-family: 'Wix Madefor Display', sans-serif; font-weight: 800; font-size: 1.05rem; }
.cp-body { padding: 14px 18px 18px; overflow-y: auto; flex: 1 1 auto; min-height: 0; }
.cp-foot { padding: 0 18px 18px; flex-shrink: 0; }
.cp-foot.has-items { padding-top: 13px; border-top: 1px solid var(--line); }
.cart-empty-state { text-align: center; padding: 28px 12px; color: var(--muted); font-size: .88rem; line-height: 1.55; }
.cart-empty-state .ico { font-size: 2.4rem; margin-bottom: 10px; }
.c-items { display: flex; flex-direction: column; gap: 9px; }
.c-item { display: flex; gap: 10px; align-items: flex-start; padding: 11px; background: var(--bg); border-radius: var(--r-sm); cursor: pointer; transition: background .15s; }
.c-item:hover { background: var(--brand-lt); }
.c-item:hover .c-edit-ico { color: var(--brand); }
.c-thumb { width: 40px; height: 40px; border-radius: 10px; flex-shrink: 0; display: grid; place-items: center; font-size: 1.25rem; }
.c-info { flex: 1; min-width: 0; }
.c-name { font-weight: 800; font-size: .87rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.c-edit-ico { font-size: .65rem; color: var(--muted); margin-right: 5px; transition: color .15s; }
.c-variant { font-size: .77rem; color: var(--muted); margin-top: 2px; }
.c-note { font-style: italic; }
.c-qty-row { display: flex; align-items: center; gap: 5px; margin-top: 6px; }
.c-q-btn { width: 24px; height: 24px; border-radius: 7px; border: 1px solid var(--line); background: var(--card); display: grid; place-items: center; font-size: .85rem; font-weight: 800; cursor: pointer; transition: .15s; }
.c-q-btn:hover { border-color: var(--brand); color: var(--brand); }
.c-q-num { font-weight: 900; font-size: .82rem; min-width: 16px; text-align: center; }
.c-price { font-weight: 900; font-size: .9rem; white-space: nowrap; align-self: flex-start; padding-top: 2px; }
.c-summary { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.sum-row { display: flex; justify-content: space-between; align-items: center; padding: 3px 0; font-size: .87rem; color: var(--sub); }
.sum-row.total { font-family: 'Wix Madefor Display', sans-serif; font-weight: 800; font-size: 1.06rem; color: var(--text); margin-top: 8px; padding-top: 10px; border-top: 1px solid var(--line); }
.checkout-btn { width: 100%; margin-top: 13px; padding: 14px; background: var(--order-btn); color: var(--order-btn-text); border: 2px solid var(--order-btn-border); border-radius: var(--r-sm); font-family: 'Wix Madefor Display', sans-serif; font-weight: 800; font-size: .96rem; display: flex; align-items: center; justify-content: center; gap: 9px; transition: all .2s; }
.checkout-btn:hover { background: var(--order-btn-hover); color: var(--order-btn-hover-text); border-color: var(--order-btn-hover-border); box-shadow: 0 6px 22px rgba(0,0,0,.18); transform: translateY(-1px); }

/* ══ MOBILE CART BAR ══ */
.cart-bar { position: fixed; bottom: 0; left: 0; right: 0; z-index: 60; padding: 12px 16px; padding-bottom: calc(12px + env(safe-area-inset-bottom)); background: var(--dark); color: #fff; display: flex; align-items: center; justify-content: space-between; gap: 12px; box-shadow: 0 -8px 36px rgba(24,15,6,.25); transform: translateY(0); transition: transform .3s ease; }
.cart-bar.hidden { transform: translateY(110%); }
.cb-left { display: flex; flex-direction: column; gap: 2px; }
.cb-count { font-weight: 800; font-size: .9rem; }
.cb-total { font-size: .82rem; color: rgba(255,255,255,.6); }
.cb-btn { padding: 13px 20px; border-radius: var(--r-sm); background: var(--order-btn); color: var(--order-btn-text); border: 2px solid var(--order-btn-border); flex-shrink: 0; font-family: 'Wix Madefor Display', sans-serif; font-weight: 800; font-size: .9rem; display: flex; align-items: center; gap: 7px; transition: background .15s, color .15s; }
.cb-btn:hover { background: var(--order-btn-hover); color: var(--order-btn-hover-text); border-color: var(--order-btn-hover-border); }

/* ══ OVERLAYS ══ */
.overlay { position: fixed; inset: 0; z-index: 70; background: rgba(24,15,6,.5); opacity: 0; pointer-events: none; transition: opacity .3s; }
.overlay.open { opacity: 1; pointer-events: auto; }

/* ══ CART DRAWER ══ */
.cart-drawer { position: fixed; bottom: 0; left: 0; right: 0; z-index: 80; background: var(--card); border-radius: 26px 26px 0 0; max-height: 91dvh; display: flex; flex-direction: column; transform: translateY(100%); transition: transform .35s cubic-bezier(.4,0,.2,1); box-shadow: 0 -20px 60px rgba(24,15,6,.18); }
.cart-drawer.open { transform: none; }
@media (min-width: 600px) {
  .cart-drawer { max-width: 600px; width: 600px; left: 50%; right: auto; transform: translateX(-50%) translateY(100%); }
  .cart-drawer.open { transform: translateX(-50%) translateY(0); }
}
/* La barrita visible mide 38×4px igual que antes — el padding solo agranda
   el área táctil real (con background-clip para que no se pinte), así es
   más fácil agarrarla con el dedo sin cambiar cómo se ve. */
.drag-handle {
  width: 38px; height: 4px; border-radius: 2px; background: var(--line);
  background-clip: content-box; box-sizing: content-box;
  margin: 4px auto 0; padding: 8px 16px; touch-action: none; flex-shrink: 0;
}
.dr-head { padding: 14px 20px 13px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; flex-shrink: 0; }
.dr-head h3 { font-family: 'Wix Madefor Display', sans-serif; font-weight: 800; font-size: 1.12rem; }
.close-x { width: 34px; height: 34px; border-radius: 50%; background: var(--bg); display: grid; place-items: center; font-size: 1.1rem; color: var(--muted); }
.dr-body { padding: 16px 20px; overflow-y: auto; flex: 1; }
.dr-foot { padding: 14px 20px; padding-bottom: calc(14px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); flex-shrink: 0; }

/* ══ PRODUCT MODAL ══ */
.modal-ov {
  /* Por encima de .chk-ov (95) — se puede abrir el modal de producto desde
     la pantalla de antojo, que reutiliza esa misma clase de overlay. */
  position: fixed; inset: 0; z-index: 96;
  background: rgba(0,0,0,.5);
  opacity: 0; pointer-events: none; transition: opacity .3s;
  display: flex; align-items: flex-end;
}
.modal-ov.open { opacity: 1; pointer-events: auto; }
.modal {
  background: var(--card);
  border-radius: 26px 26px 0 0;
  width: 100%; max-height: 95dvh;
  display: flex; flex-direction: column;
  transform: translateY(100%); transition: transform .38s cubic-bezier(.4,0,.2,1);
  overflow: hidden;
}
.modal-ov.open .modal { transform: none; }
.m-topbar { display: flex; align-items: center; justify-content: space-between; padding: 10px 12px; flex-shrink: 0; }
.m-top-left, .m-top-right { display: flex; align-items: center; gap: 6px; }
.m-icon-btn {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--bg); border: 1px solid var(--line);
  display: grid; place-items: center; font-size: .9rem; color: var(--sub);
  transition: .15s;
}
.m-icon-btn:hover { background: var(--line); color: var(--text); }
/* Scroll único en móvil */
.m-scroll { overflow-y: auto; flex: 1; overscroll-behavior: contain; }
.m-scroll::-webkit-scrollbar { width: 4px; }
.m-scroll::-webkit-scrollbar-thumb { background: var(--line); border-radius: 4px; }
/* En móvil las columnas fluyen una tras otra */
.m-col-left, .m-col-right { display: contents; }
/* Desktop: dos columnas */
@media (min-width: 760px) {
  .modal-ov { align-items: center; justify-content: center; }
  .modal { border-radius: var(--r) !important; max-width: 900px; width: 90vw; max-height: 88dvh; }
  .modal .drag-handle { display: none; }
  .m-scroll { display: flex; flex-direction: row; overflow: hidden; flex: 1; min-height: 0; }
  .m-col-left {
    display: flex; flex-direction: column;
    width: 41.66%; flex-shrink: 0;
    border-right: 1px solid var(--line);
    overflow-y: auto;
  }
  .m-col-left::-webkit-scrollbar { display: none; }
  .m-col-right {
    display: block;
    flex: 1; overflow-y: auto;
    overscroll-behavior: contain;
  }
  .m-col-right::-webkit-scrollbar { width: 4px; }
  .m-col-right::-webkit-scrollbar-thumb { background: var(--line); border-radius: 4px; }
  /* En desktop la descripción no se colapsa */
  .m-desc.collapsed { display: block; overflow: visible; }
  .m-read-more { display: none !important; }
}
.m-img { width: 100%; flex-shrink: 0; display: flex; align-items: center; justify-content: center; position: relative; overflow: hidden; background: var(--bg); }
.m-img img { width: 100%; height: auto; display: block; }
.m-img-emoji { font-size: 5rem; line-height: 1; padding: 40px 0; position: relative; z-index: 1; filter: drop-shadow(0 6px 18px rgba(0,0,0,.22)); }
.m-info { padding: 16px 18px 12px; }
.m-name-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin-bottom: 8px; }
.m-name { font-family: 'Wix Madefor Display', sans-serif; font-weight: 800; font-size: 1.2rem; line-height: 1.25; color: var(--text); flex: 1; }
.m-price-col { flex-shrink: 0; text-align: right; padding-top: 2px; }
.m-price-main { font-family: 'Wix Madefor Display', sans-serif; font-weight: 800; font-size: 1.25rem; color: var(--text); display: block; }
.m-discount-badge { display: inline-flex; align-items: center; gap: 4px; padding: 3px 7px; border-radius: 6px; background: #FEF08A; color: #713F12; font-weight: 900; font-size: .75rem; margin-left: 4px; }
.m-price-orig { font-size: .82rem; color: var(--muted); text-decoration: line-through; font-weight: 600; display: block; margin-top: 2px; }
.m-desc { font-size: .91rem; color: var(--sub); line-height: 1.6; margin-bottom: 2px; }
.m-desc.collapsed { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.m-read-more { color: var(--brand); font-weight: 800; font-size: .88rem; cursor: pointer; margin-top: 4px; display: inline-block; }

/* Modifier group */
.mod-group { border-top: 1px solid var(--line); }
.mod-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 13px 18px 11px 14px; cursor: pointer; gap: 12px;
  background: var(--bg); border-left: 3px solid var(--brand);
}
.mod-head-left { flex: 1; min-width: 0; }
.mod-group-name { font-weight: 800; font-size: .95rem; color: var(--text); }
.mod-sub { font-size: .79rem; color: var(--muted); margin-top: 2px; }
.mod-head-right { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.mod-req-badge { display: inline-flex; align-items: center; gap: 5px; font-size: .73rem; font-weight: 700; color: var(--muted); }
.mod-req-badge.req  { color: #B45309; }
.mod-req-badge.done { color: var(--ok); }
/* Grupo fuera de su horario (order_item_option_group_schedules) */
.mod-group-blocked .mod-head { cursor: default; border-left-color: var(--line); opacity: .6; filter: grayscale(40%); }
.mod-group-blocked .mod-sub { display: flex; align-items: center; gap: 5px; font-weight: 600; }
.mod-chevron { font-size: .72rem; color: var(--muted); transition: transform .25s; display: inline-block; line-height: 1; }
.mod-chevron.up { transform: rotate(180deg); }
.mod-options { padding-bottom: 8px; }
.mod-options.hidden { display: none; }

/* Option row */
.opt-row {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 18px;
  border-top: 1px solid rgba(234,224,213,.5);
  cursor: pointer; transition: background .15s;
  -webkit-tap-highlight-color: transparent;
}
.opt-row:hover { background: var(--bg); }
.opt-row:active { background: var(--brand-lt); }
.opt-row:has(.opt-radio.sel), .opt-row:has(.opt-check.sel) { background: var(--brand-lt); }
.opt-thumb { width: 44px; height: 44px; border-radius: 8px; flex-shrink: 0; overflow: hidden; }
.opt-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.opt-info { flex: 1; min-width: 0; }
.opt-name  { font-weight: 700; font-size: .92rem; color: var(--text); }
.opt-desc  { font-size: .79rem; color: var(--muted); margin-top: 2px; line-height: 1.3; }
.opt-extra { font-size: .82rem; font-weight: 800; color: var(--sub); margin-top: 3px; }

/* Radio */
.opt-radio { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--line); flex-shrink: 0; display: grid; place-items: center; transition: .15s; }
.opt-radio.sel { border-color: var(--brand); background: var(--brand); }
.opt-radio.sel::after { content: ''; width: 8px; height: 8px; border-radius: 50%; background: #fff; }

/* Checkbox */
.opt-check { width: 22px; height: 22px; border-radius: 6px; border: 2px solid var(--line); flex-shrink: 0; display: grid; place-items: center; transition: .15s; }
.opt-check.sel { border-color: var(--brand); background: var(--brand); }
.opt-check.sel::after { content: '✓'; color: #fff; font-size: .75rem; font-weight: 900; }

/* Counter */
.opt-counter { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.oc-btn { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; font-size: 1rem; font-weight: 800; transition: .15s; }
.oc-btn.minus { border: 1.5px solid var(--line); color: var(--text); }
.oc-btn.minus:hover { border-color: var(--brand); color: var(--brand); }
.oc-btn.plus  { background: var(--brand); color: #fff; }
.oc-btn.plus:hover { background: var(--brand-d); }
.oc-num { font-weight: 900; font-size: .9rem; min-width: 16px; text-align: center; color: var(--text); }

/* Nota al establecimiento */
.m-instructions { border-top: 1px solid var(--line); }
.m-note-trigger {
  display: flex; align-items: center; gap: 9px; width: 100%;
  padding: 13px 18px; color: var(--sub); font-weight: 700; font-size: .87rem;
  text-align: left; transition: .15s;
}
.m-note-trigger:hover { color: var(--brand); background: var(--brand-lt); }
.m-note-trigger .note-chev { margin-left: auto; font-size: .7rem; color: var(--muted); transition: transform .22s; }
.m-note-trigger.open .note-chev { transform: rotate(180deg); }
.m-instr-area {
  display: none; width: 100%; padding: 14px 18px;
  border: none; border-top: 1px solid var(--line);
  background: var(--bg); font-family: 'Wix Madefor Display', sans-serif;
  font-size: 1rem; color: var(--text); outline: none; resize: none; min-height: 84px;
}
.m-instr-area.open { display: block; }
.m-instr-area::placeholder { color: var(--muted); }

/* Bottom CTA */
.m-foot {
  padding: 12px 16px; padding-bottom: calc(12px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line); flex-shrink: 0;
  display: flex; align-items: center; gap: 10px; background: var(--card);
}
.m-trash-btn { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-size: .95rem; flex-shrink: 0; color: var(--muted); transition: .15s; background: transparent; }
.m-trash-btn:hover { color: var(--brand); background: var(--brand-lt); }
.m-qty-ctrl { display: flex; align-items: center; gap: 2px; flex-shrink: 0; border: 1.5px solid var(--line); border-radius: 12px; padding: 3px; }
.m-q-btn { width: 32px; height: 32px; border-radius: 9px; border: none; background: transparent; display: grid; place-items: center; font-size: 1.1rem; font-weight: 800; cursor: pointer; transition: .15s; color: var(--text); }
.m-q-btn:hover { background: var(--bg); color: var(--brand); }
.m-q-num { font-weight: 900; font-size: .95rem; min-width: 22px; text-align: center; }
.m-add-btn { flex: 1; padding: 13px 10px; background: var(--brand); color: #fff; border-radius: 12px; font-family: 'Wix Madefor Display', sans-serif; font-weight: 800; font-size: .93rem; display: flex; align-items: center; justify-content: center; gap: 8px; transition: .18s; white-space: nowrap; }
.m-add-btn:hover:not(:disabled) { background: var(--brand-d); }
.m-add-btn:disabled { background: #D1C5BC; color: #9A8880; cursor: not-allowed; }

/* ══ CHECKOUT MODAL ══ */
.chk-ov { position: fixed; inset: 0; z-index: 95; background: rgba(24,15,6,.55); display: grid; place-items: end center; opacity: 0; pointer-events: none; transition: opacity .3s; }
.chk-ov.open { opacity: 1; pointer-events: auto; }
@media (min-width: 600px) {
  .chk-ov { place-items: center; }
  .chk-box { border-radius: var(--r) !important; max-width: 600px; }
}
.chk-box { background: var(--card); border-radius: 26px 26px 0 0; width: 100%; max-height: 93dvh; display: flex; flex-direction: column; transform: translateY(100%); transition: transform .35s cubic-bezier(.4,0,.2,1); box-shadow: 0 -24px 80px rgba(24,15,6,.2); }
.chk-ov.open .chk-box { transform: none; }
.chk-head { padding: 16px 20px 14px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; flex-shrink: 0; }
.chk-head h3 { font-family: 'Wix Madefor Display', sans-serif; font-weight: 800; font-size: 1.1rem; }
.chk-body { padding: 20px; overflow-y: auto; flex: 1; }
.chk-foot { padding: 14px 20px; padding-bottom: calc(14px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); flex-shrink: 0; }
.step-label { font-size: .72rem; font-weight: 900; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-bottom: 12px; }
.svc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin-bottom: 24px; }
.svc-card { padding: 14px 10px; border-radius: 16px; border: 2px solid var(--line); background: var(--bg); text-align: center; cursor: pointer; transition: .18s; }
.svc-card .svc-ico { font-size: 1.7rem; }
.svc-card .svc-nm  { font-weight: 800; font-size: .88rem; margin-top: 6px; }
.svc-card .svc-dsc { font-size: .76rem; color: var(--muted); margin-top: 3px; line-height: 1.35; }
.svc-card.sel { border-color: var(--brand); background: var(--brand-lt); }
.svc-card.sel .svc-nm { color: var(--brand); }
.form-group { margin-bottom: 14px; }
.form-group label { display: block; font-size: .78rem; font-weight: 800; color: var(--sub); margin-bottom: 6px; text-transform: uppercase; letter-spacing: .05em; }
.form-group input,
.form-group textarea { width: 100%; padding: 13px 14px; border: 1.5px solid var(--line); border-radius: var(--r-sm); background: var(--card); font-family: 'Wix Madefor Display', sans-serif; font-size: 1rem; color: var(--text); outline: none; transition: .2s; resize: none; }
.form-group input:focus,
.form-group textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(255,77,26,.1); }
.cond-fields { display: none; }
.cond-fields.show { display: block; }
.wa-btn { width: 100%; padding: 15px; background: var(--order-btn); color: var(--order-btn-text); border: 2px solid var(--order-btn-border); border-radius: var(--r-sm); font-family: 'Wix Madefor Display', sans-serif; font-weight: 800; font-size: .97rem; display: flex; align-items: center; justify-content: center; gap: 9px; transition: all .2s; }
.wa-btn:hover { background: var(--order-btn-hover); color: var(--order-btn-hover-text); border-color: var(--order-btn-hover-border); box-shadow: 0 6px 22px rgba(0,0,0,.18); transform: translateY(-1px); }
.wa-btn:disabled { opacity: .6; cursor: default; }

/* ══ MÉTODO DE PAGO ══ */
.pay-manual-panel { display: none; border: 1.5px solid var(--line); border-radius: var(--r-sm); padding: 16px; margin-bottom: 16px; background: var(--bg); text-align: center; }
.pay-manual-panel.show { display: block; }
.pay-manual-panel img { width: 260px; max-width: 90%; height: auto; border-radius: 10px; border: 1px solid var(--line); background: #fff; padding: 10px; margin-bottom: 10px; }
.pay-manual-key { display: flex; align-items: center; justify-content: center; gap: 8px; font-family: monospace; font-size: .9rem; background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; word-break: break-all; }
.pay-manual-key button { flex-shrink: 0; color: var(--brand); }
.wa-receipt-btn {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; margin-top: 12px; padding: 11px 16px; border: none; border-radius: 999px;
  background: #25D366; color: #fff; font-weight: 800; font-size: .85rem; cursor: pointer;
  transition: filter .15s;
}
.wa-receipt-btn:hover { filter: brightness(.95); }
.wa-receipt-btn i { font-size: 1rem; }
.pay-error-msg { font-size: .82rem; color: #dc2626; margin: -8px 0 16px; display: none; }
.pay-error-msg.show { display: block; }
.pay-change-panel { border: 1.5px solid var(--line); border-radius: var(--r-sm); padding: 14px 16px; margin-bottom: 16px; background: var(--bg); }
.pcp-toggle { display: flex; align-items: center; gap: 9px; cursor: pointer; font-weight: 700; font-size: .88rem; }
.pcp-toggle input { width: 18px; height: 18px; accent-color: var(--brand); cursor: pointer; }
.pay-change-panel .form-group { margin: 12px 0 0; }

/* ══ PROPINA ══ */
.tip-grid { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.tip-btn { padding: 9px 16px; border-radius: 999px; border: 1.5px solid var(--line); background: var(--card); font-family: 'Wix Madefor Display', sans-serif; font-weight: 700; font-size: .85rem; color: var(--sub); cursor: pointer; transition: .15s; }
.tip-btn:hover:not(.active) { border-color: var(--brand-mid); color: var(--brand); }
.tip-btn.active { background: var(--brand); border-color: var(--brand); color: #fff; }

/* ══ MAPA DE DIRECCIÓN (checkout domicilio) ══ */
.map-search-row { display: flex; gap: 8px; margin-bottom: 8px; }
.map-search-row input { flex: 1; border: 1.5px solid var(--line); border-radius: 9px; padding: 9px 12px; font-size: 1rem; outline: none; transition: border-color .15s; font-family: 'Wix Madefor Display', sans-serif; }
.map-search-row input:focus { border-color: var(--brand-mid); }
.map-search-row button { background: var(--brand); color: #fff; border: none; border-radius: 9px; padding: 0 14px; cursor: pointer; transition: background .15s; }
.map-search-row button:hover { background: var(--brand-mid); }
#deliveryMap { height: 220px; border-radius: 12px; overflow: hidden; border: 1.5px solid var(--line); }
.map-locate-btn { width: 34px; height: 34px; background: #fff; border: none; border-radius: 6px; box-shadow: 0 1px 4px rgba(0,0,0,.35); cursor: pointer; display: flex; align-items: center; justify-content: center; font-size: 15px; color: var(--brand); }
.map-locate-btn:hover { background: #f3f4f6; }
.map-locate-btn.loading { opacity: .5; pointer-events: none; }
.map-hint { display: flex; align-items: center; gap: 6px; font-size: .75rem; color: var(--sub); margin-top: 6px; }
.zone-status { margin-top: 8px; padding: 9px 12px; border-radius: 9px; font-size: .8rem; font-weight: 700; display: none; align-items: center; gap: 6px; }
.zone-status.show { display: flex; }
.zone-status.ok { background: #ecfdf5; color: #059669; }
.zone-status.bad { background: #fef2f2; color: #dc2626; }

/* ══ FOOTER ══ */
.pg-footer { padding: 20px 0 32px; text-align: center; border-top: 1px solid var(--line); }
.mpe-tag { display: inline-flex; align-items: center; gap: 8px; padding: 10px 18px; border-radius: 999px; background: var(--card); border: 1px solid var(--line); font-size: .85rem; font-weight: 700; color: var(--sub); box-shadow: var(--sh); }
.mpe-tag strong { color: var(--brand); }
