/*
 * carta-app.css -- piel Pro "App" rehecha el 2026-09-29 contra la tienda REAL
 * de Rappi (rappi.com.pe/restaurantes/8692-sarcletti a 390px). Medidas
 * tomadas con getComputedStyle, no a ojo:
 *   - texto #2e2c36, descripcion #6a696e, lineas #e6ebf1, fondo blanco
 *   - nombre de tienda 24/700, direccion 12px, titulo de seccion 20/700
 *   - fila: nombre 16/400, descripcion 14/400 (2 lineas), precio 14/700,
 *     padding 16px 0, borde inferior 1px; foto 96px en marco de 100px,
 *     radio 24px, borde blanco 2px y sombra suave; margen lateral 32px
 *   - tarjeta de datos: radio 20px, borde 1px, 3 columnas
 *   - pestañas 14/700 con subrayado; barra de carrito blanca de 88px con
 *     total 24/700 y boton pildora (radio 40px, 16/700)
 *   - hoja de detalle: titulo 20/700 + X, foto a lo ancho, stepper y boton
 *     con radio 8px
 * Unica desviacion consciente: el verde de los botones es #0a8543 (blanco
 * encima 4.72:1, AA) en vez del #29d884 de Rappi (1.87:1, no pasa AA). El
 * color del restaurante (--carta-acento) marca la pestaña activa y ofertas.
 *
 * Self-contained: NO importa carta.css (la carta QR no debe depender de
 * otra hoja para verse bien).
 */

:root {
  --rp-ink: #2e2c36;
  --rp-muted: #6a696e;
  --rp-line: #e6ebf1;
  --rp-soft: #f5f6f8;
  --rp-white: #ffffff;
  --rp-green: #0a8543;
  --rp-green-soft: #e9fbf2;
  --rp-green-ink: #0a7a3d;
  --rp-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --rp-pad: 32px;
  --rp-top-h: 64px;
  --rp-tabs-h: 48px;
  /* Alias que usan comanda.js (clases compartidas) y el <style> por
     restaurante (functions.php inyecta --carta-acento/--accent/--blue). */
  --carta-acento: #b5432a;
  --ink: var(--rp-ink);
  --muted: var(--rp-muted);
  --paper: var(--rp-white);
  --paper-raised: var(--rp-soft);
  --rule-soft: var(--rp-line);
  --font-sans: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body.carta-app-body {
  margin: 0;
  background: var(--rp-white);
  color: var(--rp-ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body.carta-app-body.tiene-comanda {
  padding-bottom: calc(96px + env(safe-area-inset-bottom, 0px));
}

body.app-sheet-abierta,
body.comanda-panel-abierto,
body.lightbox-abierto {
  overflow: hidden;
}

a {
  color: inherit;
}

img {
  max-width: 100%;
}

button,
input,
textarea,
select {
  font-family: inherit;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- Barra superior: buscador + carrito ---------- */

.rp-top {
  position: sticky;
  top: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  gap: 12px;
  height: var(--rp-top-h);
  padding: 8px 16px;
  background: var(--rp-white);
  border-bottom: 1px solid var(--rp-line);
}

.rp-search {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  height: 46px;
  padding: 0 14px 0 6px;
  border-radius: 12px;
  background: var(--rp-soft);
  cursor: text;
}

.rp-search-logo {
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  object-fit: cover;
}

.rp-search .app-search-input {
  flex: 1 1 auto;
  min-width: 0;
  height: 100%;
  border: none;
  background: transparent;
  font-size: 15px;
  color: var(--rp-ink);
  outline: none;
}

.rp-search .app-search-input::placeholder {
  color: var(--rp-muted);
}

.rp-search:focus-within {
  box-shadow: 0 0 0 2px var(--rp-ink);
}

.rp-search-ico {
  flex: 0 0 auto;
  color: var(--rp-ink);
}

.rp-cart {
  position: relative;
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: none;
  background: none;
  color: var(--rp-ink);
  cursor: pointer;
  padding: 0;
}

.rp-cart-n {
  position: absolute;
  top: 0;
  right: -2px;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--rp-green);
  color: var(--rp-white);
  font-size: 12px;
  font-weight: 700;
  line-height: 20px;
  text-align: center;
}

.rp-cart-n[hidden] {
  display: none;
}

/* ---------- Portada ---------- */

.rp-hero {
  position: relative;
  height: 150px;
  background: var(--carta-acento);
  overflow: hidden;
}

/* Sin ninguna foto (ni portada subida ni platos con foto): banda compacta con
   trama suave del color de marca, en vez de 150 px de color liso (captura de
   Carlos 29-sep, prueba3). Clase doble: gana a la altura de escritorio. */
.rp-hero.is-sin-foto {
  height: 64px;
  background-color: var(--carta-acento);
  background-image: radial-gradient(rgba(255, 255, 255, 0.18) 1.2px, transparent 1.6px);
  background-size: 14px 14px;
}

.rp-hero-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.rp-idiomas {
  position: absolute;
  top: 12px;
  left: 12px;
  display: flex;
  gap: 4px;
  padding: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--rp-shadow);
}

.app-idioma-item {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  font-size: 15px;
  line-height: 1;
  text-decoration: none;
  opacity: 0.55;
}

.app-idioma-item.is-activo {
  opacity: 1;
  background: var(--rp-soft);
  box-shadow: 0 0 0 2px var(--rp-ink);
}

.rp-hero-info {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--rp-white);
  color: var(--rp-ink);
  box-shadow: var(--rp-shadow);
}

/* ---------- Tienda: logo, nombre, datos ---------- */

.rp-store {
  padding: 16px 24px 8px;
}

.rp-store-head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.rp-store-logo {
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  margin-top: 2px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: var(--rp-shadow);
}

.rp-store-text {
  min-width: 0;
}

.rp-store-name {
  margin: 0 0 2px;
  font-size: 24px;
  font-weight: 700;
  line-height: 1.35;
  color: var(--rp-ink);
  overflow-wrap: break-word;
}

.rp-store-meta {
  margin: 0;
  font-size: 12px;
  line-height: 1.8;
  color: var(--rp-ink);
}

.rp-info {
  display: flex;
  margin: 16px 0 0;
  border: 1px solid var(--rp-line);
  border-radius: 20px;
  overflow: hidden;
}

.rp-info-col {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  padding: 12px 6px;
  text-align: center;
  text-decoration: none;
  color: var(--rp-ink);
}

.rp-info-col + .rp-info-col {
  border-left: 1px solid var(--rp-line);
}

.rp-info-label {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 14px;
  color: var(--rp-muted);
}

.rp-info-valor {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.3;
}

.rp-info-tel {
  font-size: 14px;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.rp-info-sub {
  font-size: 12px;
  color: var(--rp-muted);
}

.rp-info-sub:empty {
  display: none;
}

.estado-abierto .rp-info-valor {
  color: var(--rp-green-ink);
}

.estado-cerrado .rp-info-valor {
  color: #b42318;
}

/* Tarjeta de promo (Rappi "Envio gratis en tu pedido") */
.rp-promo {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  margin: 12px 0 0;
  padding: 12px 14px 12px 12px;
  border: 1px solid var(--rp-line);
  border-radius: 12px;
  background: var(--rp-white);
  text-align: left;
  color: var(--rp-ink);
  cursor: pointer;
}

.rp-promo-foto {
  flex: 0 0 auto;
  width: 56px;
  height: 56px;
  border-radius: 12px;
  object-fit: cover;
}

.rp-promo-body {
  flex: 1 1 auto;
  min-width: 0;
  display: grid;
  gap: 1px;
}

.rp-promo-kicker {
  justify-self: start;
  padding: 1px 8px;
  border-radius: 999px;
  background: #fff0e8;
  color: #b93815;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.rp-promo-titulo {
  font-size: 16px;
  font-weight: 700;
  line-height: 1.35;
}

.rp-promo-texto {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 1;
  overflow: hidden;
  font-size: 14px;
  color: var(--rp-muted);
}

.rp-promo-flecha {
  flex: 0 0 auto;
  font-size: 26px;
  line-height: 1;
  color: var(--rp-muted);
}

/* ---------- Pestañas de categoria (sticky bajo la barra superior) ---------- */

.rp-tabs {
  position: sticky;
  top: var(--rp-top-h);
  z-index: 50;
  display: flex;
  gap: 4px;
  height: var(--rp-tabs-h);
  margin-top: 16px;
  padding: 0 16px;
  background: var(--rp-white);
  border-top: 1px solid var(--rp-line);
  border-bottom: 1px solid var(--rp-line);
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.rp-tabs::-webkit-scrollbar {
  display: none;
}

.rp-tab {
  position: relative;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  padding: 0 14px;
  font-size: 14px;
  font-weight: 700;
  color: var(--rp-ink);
  text-decoration: none;
  white-space: nowrap;
}

.rp-tab.is-active {
  color: var(--carta-acento);
}

.rp-tab.is-active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 4px;
  border-radius: 2px 2px 0 0;
  background: var(--carta-acento);
}

/* ---------- Cuerpo ---------- */

.rp-main {
  padding: 0 0 8px;
}

.rp-sec-title {
  margin: 0;
  padding: 0 var(--rp-pad);
  font-size: 20px;
  font-weight: 700;
  line-height: 1.5;
  color: var(--rp-ink);
}

.rp-cat {
  padding-top: 24px;
  scroll-margin-top: calc(var(--rp-top-h) + var(--rp-tabs-h));
}

.rp-list {
  padding: 0 var(--rp-pad);
}

/* ---------- Fila de producto ---------- */

.rp-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid var(--rp-line);
}

.rp-item:last-child {
  border-bottom: none;
}

.rp-item-body {
  flex: 1 1 auto;
  min-width: 0;
  display: block;
  padding: 0;
  border: none;
  background: none;
  text-align: left;
  color: inherit;
  cursor: pointer;
}

.rp-item .menu-item-name {
  display: block;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.63;
  color: var(--rp-ink);
}

.rp-item .menu-item-desc {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  margin-top: 2px;
  font-size: 14px;
  line-height: 1.71;
  color: var(--rp-muted);
}

.menu-item-price-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 2px 8px;
  margin-top: 6px;
}

.menu-item-price {
  font-size: 14px;
  font-weight: 700;
  color: var(--rp-ink);
  font-variant-numeric: tabular-nums;
}

.menu-item-price.is-oferta {
  color: var(--carta-acento);
}

.menu-item-price-old {
  font-size: 13px;
  color: var(--rp-muted);
  text-decoration: line-through;
  font-variant-numeric: tabular-nums;
}

.menu-item-oferta {
  align-self: center;
  padding: 1px 8px;
  border-radius: 999px;
  background: #fff0e8;
  color: #b93815;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.rp-item-media {
  position: relative;
  flex: 0 0 auto;
  width: 100px;
  height: 100px;
}

/* Marco de la foto: medido en Rappi (100px, radio 24, borde blanco 2px, sombra). */
.rp-foto {
  position: relative;
  display: block;
  width: 100px;
  height: 100px;
  padding: 0;
  border: 2px solid var(--rp-white);
  border-radius: 24px;
  background: var(--rp-soft);
  box-shadow: var(--rp-shadow);
  overflow: hidden;
  cursor: pointer;
}

.rp-foto img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.menu-item-noimg {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  background: var(--rp-soft);
  color: var(--rp-muted);
  font-size: 28px;
  font-weight: 700;
}

/* "+" sobre la esquina de la foto (patron de la app de Rappi). */
.rp-add {
  position: absolute;
  right: -6px;
  bottom: -6px;
  z-index: 2;
}

.rp-add:empty {
  display: none;
}

.qty-add {
  position: relative;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: var(--rp-white);
  color: var(--rp-green);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
  cursor: pointer;
}

.qty-add::before {
  content: "";
  position: absolute;
  inset: -6px;
}

.qty-add:active {
  transform: scale(0.94);
}

.qty-stepper {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px;
  border-radius: 999px;
  background: var(--rp-white);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
}

.qty-btn {
  position: relative;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: var(--rp-soft);
  color: var(--rp-ink);
  font-size: 18px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
}

.qty-btn::before {
  content: "";
  position: absolute;
  inset: -7px;
}

.qty-valor {
  min-width: 18px;
  text-align: center;
  font-size: 14px;
  font-weight: 700;
  color: var(--rp-ink);
}

.rp-add .qty-valor {
  color: var(--rp-green);
}

/* ---------- "Los mas pedidos" (carrusel) ---------- */

.rp-dest {
  padding-top: 24px;
}

.rp-dest-scroll {
  display: flex;
  gap: 16px;
  padding: 12px var(--rp-pad) 8px;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  scroll-padding-left: var(--rp-pad);
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.rp-dest-scroll::-webkit-scrollbar {
  display: none;
}

.rp-dest-card {
  position: relative;
  flex: 0 0 auto;
  width: 136px;
  scroll-snap-align: start;
}

.rp-dest-btn {
  display: block;
  width: 100%;
  padding: 0;
  border: none;
  background: none;
  text-align: left;
  color: inherit;
  cursor: pointer;
}

.rp-dest-card .rp-foto {
  width: 136px;
  height: 136px;
}

.rp-dest-sello {
  position: absolute;
  top: 8px;
  left: 8px;
  padding: 2px 8px;
  border-radius: 999px;
  background: #b93815;
  color: var(--rp-white);
  font-size: 11px;
  font-weight: 700;
}

.rp-dest-nombre {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  margin-top: 10px;
  font-size: 14px;
  line-height: 1.43;
  color: var(--rp-ink);
  min-height: 2.86em;
}

.rp-dest-precio {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0 6px;
  margin-top: 2px;
}

.rp-dest-precio .menu-item-oferta {
  display: none;
}

/* El "+" del carrusel va sobre la esquina de la foto (136px), no del texto. */
.rp-dest-card .rp-add {
  top: 104px;
  right: -4px;
  bottom: auto;
}

/* ---------- Nota, vacio de busqueda ---------- */

.rp-nota {
  margin: 24px var(--rp-pad) 8px;
  padding: 14px 16px;
  border-radius: 12px;
  background: var(--rp-soft);
  font-size: 14px;
  line-height: 1.6;
  color: var(--rp-muted);
}

.rp-nota strong {
  display: block;
  color: var(--rp-ink);
}

.rp-nota a {
  color: var(--rp-green-ink);
  font-weight: 700;
}

.app-empty-state {
  margin: 24px var(--rp-pad);
  text-align: center;
  color: var(--rp-muted);
  font-size: 14px;
}

.app-empty-state strong {
  color: var(--rp-ink);
}

/* ---------- Sobre el local (pie) ---------- */

.rp-sobre {
  margin-top: 16px;
  padding: 24px 0 16px;
  border-top: 8px solid var(--rp-soft);
}

.rp-sobre-fila {
  padding: 12px var(--rp-pad);
  border-bottom: 1px solid var(--rp-line);
}

.rp-sobre-fila:last-of-type {
  border-bottom: none;
}

.rp-sobre-fila h3 {
  margin: 0 0 2px;
  font-size: 14px;
  font-weight: 700;
  color: var(--rp-ink);
}

.rp-sobre-fila p {
  margin: 0;
  font-size: 14px;
  line-height: 1.7;
  color: var(--rp-muted);
}

.rp-link {
  color: var(--rp-green-ink);
  font-weight: 700;
  text-decoration: none;
}

.rp-redes {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px !important;
}

.rp-red {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--rp-line);
  color: var(--rp-ink);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}

.app-footer-link {
  margin: 16px 0 0;
  text-align: center;
  font-size: 13px;
}

.app-footer-link a {
  color: var(--rp-muted);
  font-weight: 700;
  text-decoration: none;
}

/* ---------- Nuestros locales (Negocio, 2+ sedes) ---------- */

.rp-locales {
  margin-top: 16px;
  padding-top: 24px;
  border-top: 8px solid var(--rp-soft);
}

.app-locales-item {
  padding: 12px var(--rp-pad);
  border-bottom: 1px solid var(--rp-line);
}

.app-locales-nombre {
  margin: 0;
  font-weight: 700;
  font-size: 15px;
}

.app-locales-direccion {
  margin: 2px 0 8px;
  font-size: 13px;
  color: var(--rp-muted);
}

.app-locales-acciones {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
}

.app-locales-acciones a {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--rp-line);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}

/* ---------- Cross-sell de Provoca (solo Gratis; paleta neutra) ---------- */

.provoca-crosssell {
  margin: 16px var(--rp-pad) 8px;
  padding: 18px 20px;
  border: 1px solid var(--rp-line);
  border-radius: 14px;
  background: var(--rp-soft);
  text-align: center;
}

.provoca-crosssell-marca {
  margin: 0 0 4px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--rp-muted);
}

.provoca-crosssell-texto {
  margin: 0 0 12px;
  font-size: 14px;
  line-height: 1.5;
  color: var(--rp-ink);
}

.provoca-crosssell-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 20px;
  border-radius: 999px;
  border: 1px solid var(--rp-ink);
  color: var(--rp-ink);
  font-weight: 700;
  font-size: 13px;
  text-decoration: none;
}

/* ---------- Hoja de detalle (Rappi: titulo + X, foto, precio, stepper) ---------- */

.app-sheet {
  position: fixed;
  inset: 0;
  z-index: 220;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.app-sheet[hidden] {
  display: none;
}

.app-sheet-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  opacity: 0;
  transition: opacity 0.22s ease;
}

.app-sheet.is-open .app-sheet-backdrop {
  opacity: 1;
}

.app-sheet-panel {
  position: relative;
  width: min(560px, 100%);
  max-height: 94vh;
  display: flex;
  flex-direction: column;
  background: var(--rp-white);
  border-radius: 16px 16px 0 0;
  transform: translateY(100%);
  transition: transform 0.26s cubic-bezier(0.22, 1, 0.36, 1);
}

.app-sheet.is-open .app-sheet-panel {
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .app-sheet-backdrop,
  .app-sheet-panel {
    transition: none;
  }
}

.rp-sheet-head {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 16px 14px 24px;
  border-bottom: 1px solid var(--rp-line);
}

.app-sheet-nombre {
  flex: 1 1 auto;
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.35;
  color: var(--rp-ink);
}

.app-sheet-cerrar {
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  padding: 0;
  border: none;
  background: none;
  color: var(--rp-ink);
  cursor: pointer;
}

.app-sheet-cerrar:focus,
.comanda-cerrar:focus {
  outline: none;
}

.comanda-cerrar:focus-visible,
.app-sheet-cerrar:focus-visible {
  outline: 2px solid var(--rp-ink);
  outline-offset: -4px;
  border-radius: 50%;
}

.rp-sheet-scroll {
  flex: 1 1 auto;
  overflow-y: auto;
}

.app-sheet-foto {
  display: block;
  width: calc(100% - 48px);
  margin: 16px 24px 0;
  aspect-ratio: 16 / 10;
  padding: 0;
  border: none;
  border-radius: 12px;
  background: var(--rp-soft);
  overflow: hidden;
  cursor: zoom-in;
}

.app-sheet-foto img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Plato sin foto: el JS pone [hidden] en <img>; sin este refuerzo el
   display:block de arriba ganaba y se veia el icono de imagen rota (L-334). */
.app-sheet-foto img[hidden] {
  display: none;
}

.app-sheet-noimg {
  font-size: 52px;
}

.app-sheet-body {
  padding: 16px 24px 8px;
}

.app-sheet-precio {
  margin: 0 0 6px;
  font-size: 18px;
  font-weight: 700;
  color: var(--rp-ink);
}

.app-sheet-desc {
  margin: 0 0 12px;
  font-size: 15px;
  line-height: 1.6;
  color: var(--rp-ink);
}

.rp-sheet-card {
  display: block;
  margin: 8px 0 12px;
  padding: 16px;
  border: 1px solid var(--rp-line);
  border-radius: 20px;
}

.rp-sheet-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}

.rp-sheet-card-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--rp-ink);
}

.rp-sheet-card-pill {
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--rp-soft);
  font-size: 12px;
  color: var(--rp-muted);
}

.rp-sheet-card textarea {
  display: block;
  width: 100%;
  min-height: 64px;
  padding: 10px 12px;
  border: 1px solid var(--rp-line);
  border-radius: 10px;
  font-size: 15px;
  color: var(--rp-ink);
  resize: vertical;
}

.rp-sheet-card textarea:focus-visible {
  outline: 2px solid var(--rp-ink);
  outline-offset: 0;
}

.app-sheet-footer {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 24px calc(16px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--rp-line);
}

.app-sheet-stepper {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 48px;
  padding: 0 4px;
  border: 1px solid #ededed;
  border-radius: 8px;
}

.app-sheet-stepper .qty-btn {
  width: 38px;
  height: 38px;
  border-radius: 6px;
  background: none;
  font-size: 22px;
}

.app-sheet-stepper .qty-valor {
  min-width: 26px;
  font-size: 17px;
  font-weight: 700;
}

.rp-sheet-accion {
  flex: 1 1 auto;
  min-width: 0;
}

.app-sheet-confirmar {
  width: 100%;
  height: 48px;
  padding: 0 14px;
  border: none;
  border-radius: 8px;
  background: var(--rp-green);
  color: var(--rp-white);
  font-size: 15px;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
}

/* ---------- Barra del carrito (Rappi: blanca, total + boton pildora) ---------- */

.app-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 88px;
  padding: 16px 16px calc(16px + env(safe-area-inset-bottom, 0px));
  background: var(--rp-white);
  box-shadow: 0 0 12px #b3b9c2;
}

.app-bar[hidden] {
  display: none;
}

.app-bar-resumen {
  display: grid;
  min-width: 0;
}

.app-bar-productos {
  font-size: 12px;
  color: #000;
}

.app-bar-total {
  font-size: 24px;
  font-weight: 700;
  line-height: 1.2;
  color: var(--rp-ink);
  font-variant-numeric: tabular-nums;
}

.app-bar-btn {
  flex: 0 0 auto;
  min-width: 160px;
  height: 50px;
  padding: 0 24px;
  border: none;
  border-radius: 40px;
  background: var(--rp-green);
  color: var(--rp-white);
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
}

.app-bar-count[hidden] {
  display: none;
}

@keyframes app-bar-pulse {
  0% { transform: scale(1); }
  35% { transform: scale(1.05); }
  100% { transform: scale(1); }
}

.app-bar-pulse {
  animation: app-bar-pulse 0.32s ease;
}

@media (prefers-reduced-motion: reduce) {
  .app-bar-pulse {
    animation: none;
  }
}

/* ---------- Mi pedido (checkout de comanda.js, como hoja) ---------- */

.comanda-bar[hidden] {
  display: none;
}

.comanda-overlay {
  position: fixed;
  inset: 0;
  z-index: 230;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: rgba(0, 0, 0, 0.5);
}

.comanda-overlay[hidden] {
  display: none;
}

.comanda-panel {
  width: min(520px, 100%);
  max-height: 92vh;
  overflow-y: auto;
  padding: 20px 24px calc(20px + env(safe-area-inset-bottom, 0px));
  border-radius: 16px 16px 0 0;
  background: var(--rp-white);
}

@media (min-width: 640px) {
  .comanda-overlay {
    align-items: center;
    padding: 20px;
  }

  .comanda-panel {
    border-radius: 16px;
  }
}

.comanda-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--rp-line);
}

.comanda-panel-head h2 {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
}

.comanda-cerrar {
  width: 40px;
  height: 40px;
  border: none;
  background: none;
  color: var(--rp-ink);
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
}

.comanda-items {
  display: grid;
  gap: 4px;
  margin-bottom: 12px;
}

.comanda-vacio {
  margin: 0;
  padding: 20px 0;
  text-align: center;
  color: var(--rp-muted);
  font-size: 14px;
}

.comanda-vacio-link {
  display: inline-block;
  margin-top: 8px;
  color: var(--rp-green-ink);
  font-weight: 700;
}

.comanda-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto auto;
  align-items: center;
  gap: 8px;
  padding: 10px 0;
  border-bottom: 1px solid var(--rp-line);
  font-size: 14px;
}

.comanda-item-info {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.comanda-item-info strong {
  font-weight: 700;
  overflow-wrap: break-word;
}

.comanda-item-info span {
  font-size: 12px;
  color: var(--rp-muted);
}

.comanda-item-subtotal {
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
}

.comanda-item-quitar {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: none;
  background: none;
  color: var(--rp-muted);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}

.comanda-item .qty-stepper {
  box-shadow: none;
  border: 1px solid #ededed;
  border-radius: 8px;
}

.comanda-item .qty-btn {
  background: none;
  border-radius: 6px;
}

.comanda-item-nota-input {
  display: block;
  width: 100%;
  margin-top: 4px;
  padding: 4px 0;
  border: none;
  border-bottom: 1px dashed var(--rp-line);
  background: transparent;
  font-size: 12.5px;
  color: var(--rp-ink);
  text-overflow: ellipsis;
}

.comanda-item-nota-input::placeholder {
  color: var(--rp-muted);
}

.comanda-total-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  padding: 12px 0;
  border-bottom: 1px solid var(--rp-line);
  font-weight: 700;
}

.comanda-total-row strong {
  font-size: 22px;
}

.comanda-form {
  display: grid;
  gap: 12px;
  margin-bottom: 16px;
}

.comanda-field {
  display: grid;
  gap: 5px;
  font-size: 13px;
  font-weight: 700;
  color: var(--rp-ink);
}

.comanda-field[hidden] {
  display: none;
}

.comanda-field input,
.comanda-field select,
.comanda-field textarea {
  min-height: 46px;
  padding: 0 12px;
  border: 1px solid var(--rp-line);
  border-radius: 10px;
  background: var(--rp-white);
  font-size: 15px;
  color: var(--rp-ink);
}

.comanda-field textarea {
  min-height: 64px;
  padding-top: 10px;
  resize: vertical;
}

.comanda-field.campo-error select,
.comanda-field.campo-error input,
.campo-error {
  border-color: #b42318;
}

.comanda-modo {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.comanda-modo-opt {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 40px;
  padding: 7px 14px;
  border: 1px solid var(--rp-line);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.comanda-modo-opt:has(input:checked) {
  border-color: var(--rp-ink);
  background: var(--rp-soft);
}

.comanda-modo-opt input {
  margin: 0;
  accent-color: var(--rp-green);
}

.comanda-enviar {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  border-radius: 40px;
  background: var(--rp-green);
  color: var(--rp-white);
  font-weight: 700;
  font-size: 16px;
  text-align: center;
  text-decoration: none;
}

.comanda-enviar--disabled {
  opacity: 0.45;
  pointer-events: none;
  cursor: not-allowed;
}

.comanda-confirmacion {
  display: grid;
  gap: 12px;
  padding: 24px 4px 4px;
  text-align: center;
}

.comanda-confirmacion[hidden],
.comanda-confirmacion-sede[hidden] {
  display: none;
}

.comanda-confirmacion-msg {
  margin: 0;
  font-size: 17px;
  font-weight: 700;
}

.comanda-confirmacion-sede {
  margin: 0;
  font-size: 13px;
  font-weight: 700;
  color: var(--rp-green-ink);
}

.comanda-confirmacion-sub {
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
  color: var(--rp-muted);
}

.comanda-confirmacion-pago {
  margin: 0;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--rp-soft);
  font-size: 13px;
  line-height: 1.5;
}

.comanda-nuevo-btn {
  min-height: 48px;
  border: none;
  border-radius: 40px;
  background: var(--rp-ink);
  color: var(--rp-white);
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
}

.comanda-volver-btn {
  min-height: 40px;
  border: none;
  background: none;
  color: var(--rp-green-ink);
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
}

.form-error {
  margin: -4px 0 0;
  font-size: 12px;
  color: #b42318;
}

/* ---------- Visor de fotos (lightbox.js) ---------- */

.lightbox-overlay {
  position: fixed;
  inset: 0;
  z-index: 260;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
  background: rgba(10, 10, 12, 0.94);
}

.lightbox-overlay[hidden] {
  display: none;
}

.lightbox-figure {
  margin: 0;
  max-width: min(1000px, 88vw);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.lightbox-img {
  max-width: 100%;
  max-height: 76vh;
  object-fit: contain;
  border-radius: 12px;
}

.lightbox-caption {
  max-width: 620px;
  color: rgba(255, 255, 255, 0.85);
  font-size: 14px;
  text-align: center;
}

.lightbox-cerrar,
.lightbox-prev,
.lightbox-next {
  position: fixed;
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

.lightbox-cerrar {
  top: 18px;
  right: 20px;
}

.lightbox-prev,
.lightbox-next {
  top: 50%;
  transform: translateY(-50%);
}

.lightbox-prev {
  left: 16px;
}

.lightbox-next {
  right: 16px;
}

.lightbox-prev[hidden],
.lightbox-next[hidden] {
  display: none;
}

/* ---------- Popup promocional (Pro/Negocio) ---------- */

.dl-popup-overlay {
  position: fixed;
  inset: 0;
  z-index: 210; /* debajo de la hoja (220) y del checkout (230) */
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(0, 0, 0, 0.55);
}

.dl-popup-overlay[hidden] {
  display: none;
}

.dl-popup {
  position: relative;
  width: min(360px, 100%);
  max-height: 88vh;
  overflow-y: auto;
  border-radius: 20px;
  background: var(--rp-white);
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.35);
}

.dl-popup--horizontal {
  width: min(560px, 100%);
}

.dl-popup-cerrar {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 1;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 50%;
  background: var(--rp-white);
  color: var(--rp-ink);
  font-size: 22px;
  line-height: 1;
  box-shadow: var(--rp-shadow);
  cursor: pointer;
}

.dl-popup-foto {
  width: 100%;
  aspect-ratio: 16 / 10;
  overflow: hidden;
}

.dl-popup-foto img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.dl-popup-body {
  padding: 20px 22px 24px;
  text-align: center;
}

.dl-popup-titulo {
  margin: 0 0 6px;
  font-size: 21px;
  font-weight: 800;
  color: var(--rp-ink);
}

.dl-popup-texto {
  margin: 0 0 18px;
  font-size: 15px;
  line-height: 1.5;
  color: var(--rp-muted);
}

.dl-popup-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  border-radius: 40px;
  background: var(--rp-green);
  color: var(--rp-white);
  font-size: 16px;
  font-weight: 700;
  text-decoration: none;
}

@media (min-width: 640px) {
  .dl-popup--horizontal {
    display: flex;
    align-items: stretch;
  }

  .dl-popup--horizontal .dl-popup-foto {
    width: 42%;
    aspect-ratio: auto;
    flex: 0 0 auto;
  }

  .dl-popup--horizontal .dl-popup-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: left;
    padding: 24px 28px;
  }
}

/* ---------- Escritorio: misma tienda centrada (Rappi web no ensancha la lista) ---------- */

@media (min-width: 768px) {
  :root {
    --rp-pad: 40px;
  }

  .rp-top,
  .rp-hero,
  .rp-store,
  .rp-tabs,
  .rp-main,
  .rp-sobre,
  .rp-locales,
  .provoca-crosssell {
    max-width: 760px;
    margin-left: auto;
    margin-right: auto;
  }

  .rp-hero {
    height: 220px;
    border-radius: 0 0 16px 16px;
  }

  .rp-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 32px;
  }

  .rp-item:nth-last-child(2):nth-child(odd) {
    border-bottom: none;
  }

  .app-bar {
    left: 50%;
    right: auto;
    width: min(760px, 100%);
    transform: translateX(-50%);
    border-radius: 16px 16px 0 0;
  }
}

/* ---------- Estados ocultos (L-334: display explicito vence a [hidden]) ---------- */

.menu-item[hidden],
.app-cat[hidden],
.app-destacados[hidden],
section[hidden] {
  display: none !important;
}

@media print {
  .app-bar,
  .app-sheet,
  .dl-popup-overlay,
  .lightbox-overlay,
  .rp-top,
  .rp-add {
    display: none !important;
  }
}

/* ---------- Carrusel de promos (popup + platos en oferta, 2026-09-29) ---------- */
.rp-promos { margin: 12px 0 0; color: var(--rp-muted); }
.rp-promo.is-oferta { cursor: default; }
.rp-promo-texto s { color: var(--rp-muted); }
.rp-promo-texto strong { color: var(--carta-acento); }
.rp-promo.is-oferta .rp-promo-texto { -webkit-line-clamp: 1; }
.rp-promo-add { flex: 0 0 auto; }

/* ============================================================
   Variaciones (TDR-009 fase 1): tabla de tamaños + presentaciones
   debajo + selector de tamaño/opción. Bloque IDÉNTICO al de carta.css
   (misma alias --ink/--muted/--paper/--paper-raised/--rule-soft/
   --carta-acento, ver :root arriba) -- hoja autocontenida, no carga carta.css.
   ============================================================ */
.var-tabla-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 10px 0 18px; border: 1px solid var(--rule-soft); border-radius: 10px; }
.var-tabla { width: 100%; border-collapse: collapse; font-size: 13px; }
/* La fila es `.menu-item` (dual class, ver functions.php) para que
   carta-app.js:initBuscador() la encuentre -- por si `.menu-item` llega a
   tener su propio `display` en esta hoja, esto gana sobre un <tr>. */
.var-tabla tr.menu-item { display: table-row; }
.var-tabla th, .var-tabla td { padding: 8px 6px; text-align: center; border-bottom: 1px solid var(--rule-soft); vertical-align: top; }
.var-tabla-th-nombre, .var-tabla-td-nombre { text-align: left; min-width: 118px; }
.var-tabla thead th { background: var(--paper-raised); font-weight: 700; color: var(--ink); }
.var-tabla-th-top { display: block; font-size: 12px; }
.var-tabla-th-sub { display: block; font-size: 10px; font-weight: 400; color: var(--muted); }
.var-tabla-nombre { display: block; font-weight: 700; color: var(--ink); overflow-wrap: anywhere; }
.var-tabla-desc, .var-tabla-opciones { overflow-wrap: anywhere; }
.var-tabla-desc, .var-tabla-opciones { display: block; font-size: 11px; color: var(--muted); font-weight: 400; margin-top: 2px; }
.var-tabla-sin { color: var(--muted); opacity: .5; }
.var-tabla-precio-txt { display: block; font-weight: 700; color: var(--ink); white-space: nowrap; }
.var-tabla-add { margin-top: 4px; min-height: 26px; display: flex; align-items: center; justify-content: center; }
/* Contador del carrito DENTRO de la tabla de tamaños en VERTICAL (+ / 1 / -):
   en horizontal medía ~90px, ensanchaba su columna y sacaba la tabla de la
   pantalla (medido 5-oct en Libro y Marca a 390px). */
.var-tabla-add .qty-stepper { flex-direction: column-reverse; gap: 3px; padding: 4px 3px; }
.var-presentaciones { list-style: none; margin: 6px 0 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.var-presentacion { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; font-size: 13px; border-bottom: 1px dashed var(--rule-soft); padding-bottom: 3px; }
.var-presentacion-precio { font-weight: 700; color: var(--ink); white-space: nowrap; }
.var-opciones-linea { font-size: 12px; color: var(--muted); margin: 4px 0 0; }
.var-cuerpo { padding: 4px 18px 10px; display: flex; flex-direction: column; gap: 14px; }
.var-tamano-fijo { font-size: 13px; font-weight: 700; color: var(--ink); margin: 0; }
.var-grupo-titulo { font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .03em; margin: 0 0 6px; }
.var-pildoras { display: flex; flex-wrap: wrap; gap: 8px; }
/* 13-oct (L-846): píldora de 44 px, radio nativo invisible cubriéndola, punto visible en ::before. */
.var-pildora { position: relative; display: flex; align-items: center; gap: 8px; min-height: 44px; border: 1px solid var(--rule-soft); border-radius: 999px; padding: 6px 14px; font-size: 13px; cursor: pointer; background: var(--paper); }
.var-pildora input { position: absolute; inset: -1px; width: auto; height: auto; margin: 0; opacity: 0; cursor: pointer; }
.var-pildora::before { content: ""; flex: none; width: 16px; height: 16px; border-radius: 50%; border: 2px solid currentColor; box-sizing: border-box; }
.var-pildora:has(input:checked) { border-color: var(--carta-acento, var(--ink)); background: var(--paper-raised); }
.var-pildora:has(input:checked)::before { background: var(--carta-acento, var(--ink)); border-color: var(--carta-acento, var(--ink)); box-shadow: inset 0 0 0 3px var(--paper); }
.var-pildora:has(input:focus-visible) { outline: 2px solid var(--carta-acento, var(--ink)); outline-offset: 2px; }
.var-confirmar:disabled { opacity: .45; cursor: not-allowed; }
@media (max-width: 420px) {
  .var-tabla { font-size: 11.5px; }
  .var-tabla th, .var-tabla td { padding: 6px 4px; }
  .var-tabla-th-nombre, .var-tabla-td-nombre { min-width: 88px; }
}
/* Android de 360px: 4 tamaños + nombre sin desplazamiento (medido 5-oct: a 360 la piel
   Marca se pasaba 4px con min-width 88). */
@media (max-width: 370px) {
  .var-tabla th, .var-tabla td { padding: 6px 2px; }
  .var-tabla-th-nombre, .var-tabla-td-nombre { min-width: 72px; }
}

/* Variaciones: columna del nombre a la izquierda. `.var-tabla th` (más
   específico) la centraba aunque `.var-tabla-td-nombre` pedía izquierda. */
.var-tabla .var-tabla-th-nombre, .var-tabla .var-tabla-td-nombre { text-align: left; }
/* El nombre del plato heredaba el 11.5px de la tabla en celular: casi igual
   que la descripción, no se distinguía el plato. */
.var-tabla .var-tabla-nombre { font-size: 14px; }

/* Selector de tamaño: cada tamaño a lo ancho, nombre a la izquierda y precio
   a la derecha sin cortarse; botón "Agregar · S/ X" a todo el ancho. */
.var-pildora--tamano { width: 100%; }
.var-pildora-nombre { flex: 1 1 auto; min-width: 0; }
.var-pildora-precio { flex: 0 0 auto; margin-left: auto; white-space: nowrap; font-weight: 700; }
.var-panel .var-confirmar { width: 100%; justify-content: center; text-align: center; }

/* Alérgenos por plato (2026-10-10, spec alergenos.md) -- mismo bloque que carta.css. */
.alg-iconos { display: flex; flex-wrap: wrap; gap: 4px; margin: 4px 0; }
.alg-ico { display: inline-flex; align-items: center; color: var(--muted); cursor: default; font-size: 11px; line-height: 1.25; font-weight: 500; padding: 2px 8px; border: 1px solid currentColor; border-radius: 999px; }
.alg-ico svg { display: block; }
.alg-ico--trazas { opacity: .55; }
.alg-filtro { position: relative; }
.alg-filtro-btn { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--rule-soft); background: var(--paper); color: var(--ink); border-radius: 999px; padding: 7px 14px; font-size: 13px; font-weight: 600; cursor: pointer; white-space: nowrap; font-family: inherit; }
.alg-filtro-btn.is-activo { background: var(--carta-acento, var(--ink)); color: var(--paper); border-color: transparent; }
.alg-filtro-panel { position: absolute; top: calc(100% + 6px); left: 0; z-index: 20; min-width: 220px; max-width: min(320px, 90vw); background: var(--paper); border: 1px solid var(--rule-soft); border-radius: 10px; padding: 12px; box-shadow: 0 8px 24px rgba(0,0,0,.14); display: grid; gap: 6px; }
.alg-filtro-panel[hidden] { display: none; }
.alg-filtro-titulo { font-size: 12px; color: var(--muted); margin: 0 0 4px; }
.alg-filtro-chk { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink); }
.is-alg-oculto { display: none !important; }
.alg-pie { margin: 18px 0; padding: 14px 0 0; border-top: 1px solid var(--rule-soft); }
.alg-pie-titulo { font-size: 13px; font-weight: 700; color: var(--ink); margin: 0 0 8px; }
.alg-pie-lista { list-style: none; margin: 0 0 10px; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.alg-pie-lista li { display: flex; align-items: center; gap: 5px; font-size: 12px; color: var(--muted); }
.alg-pie-lista li.is-trazas { opacity: .75; }
.alg-pie-lista svg { color: var(--muted); flex-shrink: 0; }
.alg-aviso { font-size: 11.5px; color: var(--muted); margin: 0; line-height: 1.4; }

/* Visor vertical (fotos-videos-verticales v2): boton "Ver en vertical" junto al
   icono de informacion de la portada. Estilo base en visor-vertical.css. */
.pv-abrir--app { position: absolute; top: 10px; right: 56px; z-index: 3; }

/* ==========================================================================
   A3 (carta-mejoras-competencia-v1): zonas tactiles de 44 px REALES.
   Cada control mide >= 44x44 como caja propia (un ::before invisible amplia el
   toque pero el medidor no lo cuenta). El aspecto visible queda IGUAL: el
   disco/pildora se dibuja en ::before con su medida de siempre y el margen
   negativo le devuelve a la fila el tamano de antes (el layout no se mueve).
   ========================================================================== */

/* "+" sobre la foto (disco blanco de 36 px con sombra). */
.qty-add {
  isolation: isolate;
  width: 44px;
  height: 44px;
  margin: -4px;
  background: none;
  box-shadow: none;
}

.qty-add::before {
  inset: 4px;
  z-index: -1;
  border-radius: 50%;
  background: var(--rp-white);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
}

/* +/- del stepper (disco de 30 px, sin sombra): fondo recortado al contenido. */
.qty-btn {
  width: 44px;
  height: 44px;
  margin: -7px;
  padding: 7px;
  background-clip: content-box;
}

.qty-btn::before {
  content: none;
}

.app-sheet-stepper .qty-btn {
  width: 44px;
  height: 44px;
  margin: -3px;
  padding: 0;
}

/* Banderas ES/EN/PT (30 px dentro de la pastilla blanca): caja de 44, disco activo intacto. */
.app-idioma-item {
  position: relative;
  isolation: isolate;
  width: 44px;
  height: 44px;
  margin: -7px;
  background: none !important;
  box-shadow: none !important;
}

.app-idioma-item::before {
  content: '';
  position: absolute;
  inset: 7px;
  z-index: -1;
  border-radius: 50%;
}

.app-idioma-item.is-activo::before {
  background: var(--rp-soft);
  box-shadow: 0 0 0 2px var(--rp-ink);
}

/* Boton "i" de la portada (disco blanco de 36 px). */
.rp-hero-info {
  isolation: isolate;
  width: 44px;
  height: 44px;
  margin: -4px;
  background: none;
  box-shadow: none;
}

.rp-hero-info::before {
  content: '';
  position: absolute;
  inset: 4px;
  z-index: -1;
  border-radius: 50%;
  background: var(--rp-white);
  box-shadow: var(--rp-shadow);
}

/* Redes (pildoras de 34 px de alto). */
.rp-red {
  position: relative;
  isolation: isolate;
  min-height: 44px;
  margin-block: -5px;
  padding: 0 15px;
  border: 0;
}

.rp-red::before {
  content: '';
  position: absolute;
  inset: 5px 0;
  z-index: -1;
  border-radius: 999px;
  border: 1px solid var(--rp-line);
}

/* Cerrar, quitar y popup. */
.comanda-cerrar {
  width: 44px;
  height: 44px;
  margin: -2px;
}

.comanda-item-quitar {
  width: 44px;
  height: 44px;
  margin: -5px;
}

.dl-popup-cerrar {
  isolation: isolate;
  width: 44px;
  height: 44px;
  margin: -4px;
  background: none;
  box-shadow: none;
}

.dl-popup-cerrar::before {
  content: '';
  position: absolute;
  inset: 4px;
  z-index: -1;
  border-radius: 50%;
  background: var(--rp-white);
  box-shadow: var(--rp-shadow);
}

/* El popup enfoca este boton al abrirse: el anillo de foco rodea el disco visible, no la caja de 44. */
.dl-popup-cerrar:focus-visible {
  outline: none;
}

.dl-popup-cerrar:focus-visible::before {
  outline: -webkit-focus-ring-color auto 1px;
}

.comanda-field input,
.comanda-field select {
  min-height: 44px;
}

/* Boton "Alergenos" del filtro (32 px de alto, aparece cuando algun plato declara alergenos): caja de 44. */
.alg-filtro-btn {
  --h: 32px;
  position: relative;
  isolation: isolate;
  min-height: 44px;
  margin-block: calc((var(--h) - 44px) / 2);
  padding: 0 15px;
  border: 0;
  background: none;
}

.alg-filtro-btn::before {
  content: '';
  position: absolute;
  inset: 50% 0 auto;
  height: var(--h);
  transform: translateY(-50%);
  z-index: -1;
  border: 1px solid var(--rule-soft);
  border-radius: 999px;
  background: var(--paper);
}

.alg-filtro-btn.is-activo {
  background: none;
}

.alg-filtro-btn.is-activo::before {
  background: var(--carta-acento, var(--ink));
  border-color: transparent;
}

/* Nota por plato del carrito (campo de linea de 25 px): la caja crece hacia arriba y el texto queda donde estaba. */
.comanda-item-nota-input {
  min-height: 44px;
  padding-top: 23px;
  margin-top: -15px;
}

/* Pildoras de "Nuestros locales" (36 px; solo con 2+ sedes) y CTA del cross-sell (40 px; solo plan Gratis):
   caja de 44 y pildora visible intacta en ::before (alto --h, centrada). */
.app-locales-acciones a,
.provoca-crosssell-cta {
  position: relative;
  isolation: isolate;
  min-height: 44px;
  margin-block: calc((var(--h) - 44px) / 2);
  border: 0;
}

.app-locales-acciones a {
  --h: 36px;
  padding: 0 15px;
}

.provoca-crosssell-cta {
  --h: 40px;
  padding: 0 21px;
}

.app-locales-acciones a::before,
.provoca-crosssell-cta::before {
  content: '';
  position: absolute;
  inset: 50% 0 auto;
  height: var(--h);
  transform: translateY(-50%);
  z-index: -1;
  border: 1px solid var(--rp-line);
  border-radius: 999px;
}

.provoca-crosssell-cta::before {
  border-color: var(--rp-ink);
}
