/* Vitrina del cliente (inicio, búsqueda, página del negocio y producto con opciones). Estilo de app de delivery:
   tarjetas grandes con foto, barra de búsqueda flotante y barra de categorías pegada arriba. Solo usa las variables de
   theme.css, así respeta el tema claro y el oscuro. Ver public/app/app.js (viewHome, viewMenu, openItem). */
:root {
  --search-h: 52px;
  /* Alto del teclado del celular (lo calcula app.js con visualViewport) para subir la barra de búsqueda. */
  --kb: 0px;
}
html { overflow-x: clip; }
/* La app del cliente no tiene barra de pestañas abajo (sí la del restaurante y la del Tati, que comparten app.css):
   con alto 0, la búsqueda flotante, "Ver carrito" y los márgenes de las listas bajan a ese espacio y solo respetan
   la zona del gesto del teléfono (safe-area). */
:root.no-tabbar { --tabbar-h: 0px; }

/* ---------- Cabecera del inicio ---------- */
.st-top {
  position: sticky; top: 0; z-index: 9;
  display: flex; align-items: center; gap: 8px;
  padding: calc(10px + env(safe-area-inset-top)) 16px 10px;
  background: var(--bg); border-bottom: 1px solid var(--line);
}
.st-address {
  flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: flex-start;
  padding: 4px 6px; margin: 0 0 0 -6px; border: 0; border-radius: 12px; background: transparent;
  color: var(--text); font: inherit; text-align: left; cursor: pointer;
}
.st-address small { font-size: 12px; color: var(--muted); font-weight: 600; }
.st-address b { display: block; max-width: 100%; font-size: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.st-address:active { background: var(--surface-2); }
.st-icon {
  position: relative; flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--surface-2);
  color: var(--text); font-size: 20px; text-decoration: none; cursor: pointer;
}
.st-icon .dot {
  position: absolute; top: -2px; right: -2px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px;
  background: var(--brand); color: var(--on-brand); font-size: 11px; font-weight: 800; line-height: 18px; text-align: center;
}
.st-avatar { font-size: 17px; font-weight: 800; background: var(--brand); color: var(--on-brand); }

/* ---------- Accesos rápidos y chips ---------- */
.st-scroll { display: flex; gap: 10px; overflow-x: auto; scrollbar-width: none; margin: 0 -16px; padding: 4px 16px 6px; scroll-snap-type: x proximity; }
.st-scroll::-webkit-scrollbar { display: none; }
.st-scroll > * { flex: 0 0 auto; scroll-snap-align: start; }
.st-quick {
  display: flex; flex-direction: column; align-items: center; gap: 6px; width: 76px;
  padding: 0; border: 0; background: transparent; color: var(--text); font: inherit; cursor: pointer;
}
.st-quick .ico {
  display: flex; align-items: center; justify-content: center; width: 60px; height: 60px; border-radius: 20px;
  background: var(--surface-2); font-size: 30px; border: 2px solid transparent;
}
.st-quick span:last-child { font-size: 13px; font-weight: 600; text-align: center; line-height: 1.15; }
.st-quick.active .ico { border-color: var(--brand); background: var(--brand-soft); }
.st-quick.active span:last-child { color: var(--brand-text); }
.st-chip {
  display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 14px;
  border: 1px solid var(--line); border-radius: 999px; background: var(--surface);
  color: var(--text); font: inherit; font-size: 15px; font-weight: 600; white-space: nowrap; cursor: pointer; text-decoration: none;
}
.st-chip.active { background: var(--text); border-color: var(--text); color: var(--bg); }

/* ---------- Banner de promoción ---------- */
.st-banner {
  position: relative; display: flex; align-items: stretch; width: 100%; min-height: 130px; margin: 14px 0 4px;
  padding: 0; border: 0; border-radius: 20px; overflow: hidden; cursor: pointer; text-align: left; font: inherit;
  background: linear-gradient(120deg, var(--brand), var(--brand-strong)); color: var(--on-brand);
}
.st-banner-text { flex: 1; display: flex; flex-direction: column; justify-content: center; gap: 4px; padding: 16px; min-width: 0; }
.st-banner-text small { font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; opacity: .9; }
.st-banner-text strong { font-size: 21px; line-height: 1.15; }
.st-banner-text span { font-size: 14px; opacity: .95; }
.st-banner img { width: 42%; object-fit: cover; }

/* ---------- Tarjetas de negocio ---------- */
.st-list-title { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 20px 0 10px; }
.st-list-title h2 { margin: 0; font-size: 21px; }
.st-card { margin-bottom: 20px; }
.st-cover-wrap { position: relative; }
.st-cover {
  position: relative; display: block; border-radius: 18px; overflow: hidden; aspect-ratio: 16 / 8;
  background: linear-gradient(135deg, var(--surface-2), var(--line)); text-decoration: none;
}
.st-cover-track { display: flex; height: 100%; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.st-cover-track::-webkit-scrollbar { display: none; }
.st-cover-track img { flex: 0 0 100%; width: 100%; height: 100%; object-fit: cover; scroll-snap-align: start; }
.st-cover-empty { display: flex; height: 100%; align-items: center; justify-content: center; }
.st-cover-empty .st-logo { width: 72px; height: 72px; font-size: 30px; }
.st-dots { position: absolute; bottom: 8px; left: 0; right: 0; display: flex; justify-content: center; gap: 5px; pointer-events: none; }
.st-dots i { width: 6px; height: 6px; border-radius: 50%; background: rgba(255, 255, 255, .6); }
.st-dots i:first-child { background: #fff; }
.st-fav {
  position: absolute; top: 10px; right: 10px; z-index: 2; width: 42px; height: 42px; border-radius: 50%; border: 0;
  display: flex; align-items: center; justify-content: center; font-size: 20px; cursor: pointer;
  background: rgba(255, 255, 255, .92); color: #3E4146; box-shadow: 0 2px 8px rgba(0, 0, 0, .18);
}
.st-fav.on { color: var(--brand); }
.st-closed {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  background: rgba(0, 0, 0, .5); color: #fff; font-weight: 800; font-size: 17px;
}
.st-card-body { display: block; padding: 10px 2px 0; text-decoration: none; }
.st-card-row { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.st-card-row strong { font-size: 18px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.st-rating { flex: 0 0 auto; font-size: 14px; font-weight: 700; white-space: nowrap; }
.st-rating .star { color: #F5A623; }
.st-meta { margin-top: 2px; font-size: 14px; color: var(--muted); }
.st-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 7px; }
.st-promo { display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px; border-radius: 8px; background: var(--brand); color: var(--on-brand); font-size: 13px; font-weight: 800; }
.st-near { display: inline-flex; padding: 3px 9px; border-radius: 8px; background: var(--ok-soft); color: var(--ok); font-size: 13px; font-weight: 700; }
.st-logo {
  display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; overflow: hidden;
  color: #fff; font-weight: 800; border: 3px solid var(--surface);
  box-shadow: 0 2px 10px var(--shadow); object-fit: cover;
}

/* ---------- Barra de búsqueda flotante ---------- */
/* Ángulo del borde con degradado (se anima girando; ver st-search-spin). */
@property --st-angle { syntax: '<angle>'; inherits: false; initial-value: 0deg; }
.st-search {
  position: fixed; left: 12px; right: 12px; z-index: 12; max-width: 656px; margin: 0 auto;
  bottom: calc(max(var(--tabbar-h) + env(safe-area-inset-bottom), var(--kb)) + 10px);
  display: flex; align-items: center; gap: 6px; height: var(--search-h); padding: 0 6px 0 16px;
  border-radius: 999px;
  /* Borde de 1.5 px con degradado rojo → rojo claro muy suave que gira (6 s por vuelta); el relleno es el fondo de la barra. */
  border: 1.5px solid transparent;
  --st-ring: 0.35;
  background:
    linear-gradient(var(--surface), var(--surface)) padding-box,
    conic-gradient(from var(--st-angle),
      rgb(214 0 28 / var(--st-ring)), rgb(255 138 152 / var(--st-ring)), rgb(214 0 28 / var(--st-ring))) border-box;
  /* Sombra suave. */
  box-shadow: 0 4px 18px rgb(0 0 0 / .10), 0 1px 3px rgb(0 0 0 / .08);
  animation: st-search-spin 6s linear infinite;
  transition: box-shadow .2s;
}
/* Con el foco (escribiendo), el borde se ve más. */
.st-search:focus-within { --st-ring: 0.95; box-shadow: 0 6px 24px rgb(0 0 0 / .14), 0 0 0 3px var(--focus-ring); }
@keyframes st-search-spin { to { --st-angle: 360deg; } }
/* Sin animación si el celular pide menos movimiento (y en navegadores sin @property el degradado queda quieto). */
@media (prefers-reduced-motion: reduce) { .st-search { animation: none; } }
/* Desvanecido detrás de la barra (y de "Ver carrito" en la página del negocio): del color de fondo 100 % opaco abajo,
   detrás de las barras, a transparente arriba, unos 90 px más alto (cubre también la píldora de primer pedido).
   Curva suave (varios puntos, "ease"), ancho completo, por encima del contenido y debajo de las barras; no recibe
   toques. Es una capa fija con su propio plano (translateZ) para que no cause lag al hacer scroll.
   --fade-solid: alto opaco (desde abajo hasta el borde de arriba de la barra más alta). */
.st-search-fade {
  --fade-solid: calc(max(var(--tabbar-h) + env(safe-area-inset-bottom), var(--kb)) + var(--search-h) + 10px);
  --fade-soft: 90px;
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 10; pointer-events: none;
  height: calc(var(--fade-solid) + var(--fade-soft));
  transform: translateZ(0); contain: strict;
  /* Navegadores sin color-mix: degradado simple. */
  background: linear-gradient(to top, var(--bg) var(--fade-solid), transparent);
  background: linear-gradient(to top,
    var(--bg) 0, var(--bg) var(--fade-solid),
    color-mix(in srgb, var(--bg) 97%, transparent) calc(var(--fade-solid) + var(--fade-soft) * .125),
    color-mix(in srgb, var(--bg) 88%, transparent) calc(var(--fade-solid) + var(--fade-soft) * .25),
    color-mix(in srgb, var(--bg) 74%, transparent) calc(var(--fade-solid) + var(--fade-soft) * .375),
    color-mix(in srgb, var(--bg) 56%, transparent) calc(var(--fade-solid) + var(--fade-soft) * .5),
    color-mix(in srgb, var(--bg) 38%, transparent) calc(var(--fade-solid) + var(--fade-soft) * .625),
    color-mix(in srgb, var(--bg) 22%, transparent) calc(var(--fade-solid) + var(--fade-soft) * .75),
    color-mix(in srgb, var(--bg) 9%, transparent) calc(var(--fade-solid) + var(--fade-soft) * .875),
    transparent 100%);
}
/* Con "Ver carrito" encima de la búsqueda (página del negocio), el tramo opaco llega hasta esa barra. */
body.cartbar-on .st-search-fade { --fade-solid: calc(var(--tabbar-h) + env(safe-area-inset-bottom) + var(--search-h) + 22px + 58px); }
body.kb-open.cartbar-on .st-search-fade { --fade-solid: calc(var(--kb) + var(--search-h) + 10px); }
/* La píldora de primer pedido queda dentro del tramo que se desvanece: un poco más alto para que se lea. */
body.has-first-pill .st-search-fade { --fade-soft: 110px; }

/* Inicio: la barra es un botón que abre la pantalla de búsqueda. Texto que rota de abajo hacia arriba. */
.st-search-btn { cursor: pointer; font: inherit; color: var(--muted); text-align: left; gap: 10px; }
.st-ph { position: relative; flex: 1; min-width: 0; height: 1.4em; overflow: hidden; font-size: 16px; }
.st-ph-text {
  position: absolute; inset: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  transition: transform .4s ease, opacity .4s ease;
}
.st-ph-text.enter { transform: translateY(100%); opacity: 0; }
.st-ph-text.leave { transform: translateY(-100%); opacity: 0; }
@media (prefers-reduced-motion: reduce) { .st-ph-text { transition: none; } }

/* Botón redondo rojo del carrito, a la derecha de la barra (solo si hay algo en algún carrito). */
.st-cart-fab {
  position: fixed; z-index: 12; right: max(12px, calc(50% - 328px));
  bottom: calc(max(var(--tabbar-h) + env(safe-area-inset-bottom), var(--kb)) + 10px);
  width: var(--search-h); height: var(--search-h); border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: #D6001C; color: #FFFFFF; font-size: 22px; text-decoration: none;
  box-shadow: 0 6px 18px rgb(214 0 28 / .35);
}
.st-cart-fab[hidden] { display: none; }
.st-cart-fab:active { transform: scale(.94); }
.st-cart-fab .n {
  position: absolute; top: -4px; right: -4px; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px;
  background: #FFFFFF; color: #D6001C; font-size: 12px; font-weight: 800; line-height: 22px; text-align: center;
  box-shadow: 0 1px 4px rgb(0 0 0 / .25);
}
body.has-cart-fab .st-search-btn {
  left: max(12px, calc(50% - 328px)); right: calc(max(12px, calc(50% - 328px)) + var(--search-h) + 8px);
  max-width: none; margin: 0;
}

/* Píldora "20% en tu primer pedido", encima de la barra. */
.st-first-pill {
  position: fixed; z-index: 12; left: 50%; transform: translateX(-50%);
  bottom: calc(max(var(--tabbar-h) + env(safe-area-inset-bottom), var(--kb)) + var(--search-h) + 18px);
  max-width: calc(100% - 32px); min-height: 34px; padding: 0 14px; border-radius: 999px;
  border: 1px solid var(--brand-soft-line); background: var(--brand-soft); color: var(--brand-text);
  font: inherit; font-size: 14px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  cursor: pointer; box-shadow: 0 2px 10px var(--shadow);
}
.has-search.has-first-pill .content { padding-bottom: calc(var(--tabbar-h) + var(--search-h) + 84px + env(safe-area-inset-bottom)); }
.st-search input {
  flex: 1; min-width: 0; height: 100%; border: 0; background: transparent; color: var(--text);
  font: inherit; font-size: 16px; outline: none;
}
.st-search .st-search-ico { font-size: 18px; }
.st-search button { width: 40px; height: 40px; border: 0; border-radius: 50%; background: var(--surface-2); color: var(--text); font-size: 18px; cursor: pointer; }
.has-search .content { padding-bottom: calc(var(--tabbar-h) + var(--search-h) + 40px + env(safe-area-inset-bottom)); }
.has-search .content.has-cartbar { padding-bottom: calc(var(--tabbar-h) + var(--search-h) + 110px + env(safe-area-inset-bottom)); }
/* Con búsqueda, la barra del carrito va encima de la de búsqueda. */
.has-search .cartbar { bottom: calc(var(--tabbar-h) + var(--search-h) + 22px + env(safe-area-inset-bottom)); }
/* Con el teclado abierto, la barra de pestañas y la del carrito no estorban. */
body.kb-open .cartbar { display: none; }

/* ---------- Resultados de búsqueda ---------- */
.st-dish { display: flex; gap: 12px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); text-decoration: none; }
.st-dish img, .st-dish .st-dish-ph { flex: 0 0 64px; width: 64px; height: 64px; border-radius: 12px; object-fit: cover; background: var(--surface-2); }
.st-dish .st-dish-ph { display: flex; align-items: center; justify-content: center; font-size: 26px; }
.st-dish-info { flex: 1; min-width: 0; }
.st-dish-info strong { display: block; }

/* ---------- Página del negocio ---------- */
.st-hero { position: relative; height: 200px; background: linear-gradient(135deg, var(--brand), var(--brand-strong)); overflow: hidden; }
.st-hero .st-cover-track { height: 100%; }
.st-hero-btns {
  position: absolute; left: 0; right: 0; top: 0; z-index: 2; display: flex; gap: 8px;
  padding: calc(10px + env(safe-area-inset-top)) 12px 0;
}
.st-hero-btns .grow { flex: 1; }
.st-round {
  width: 42px; height: 42px; border-radius: 50%; border: 0; display: inline-flex; align-items: center; justify-content: center;
  background: rgba(255, 255, 255, .94); color: #3E4146; font-size: 19px; text-decoration: none; cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .2);
}
.st-round.on { color: var(--brand); }
.st-biz-head { position: relative; max-width: 680px; margin: 0 auto; padding: 0 16px; }
.st-biz-head .st-logo { position: absolute; top: -40px; left: 16px; width: 80px; height: 80px; font-size: 32px; }
.st-biz-head h1 { margin: 0; padding-top: 48px; font-size: 26px; line-height: 1.15; }
.st-biz-meta { margin-top: 4px; font-size: 15px; color: var(--muted); }
.st-open { font-weight: 700; }
.st-open.yes { color: var(--ok); }
.st-open.no { color: var(--danger); }
.st-mode { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; margin: 14px 0 8px; background: var(--surface-2); border-radius: 999px; }
.st-mode button {
  min-height: 44px; border: 0; border-radius: 999px; background: transparent; color: var(--text); font: inherit; font-weight: 700; cursor: pointer;
}
.st-mode button.active { background: var(--surface); box-shadow: 0 1px 4px var(--shadow); }
.st-mode button:disabled { color: var(--muted); cursor: default; }
.st-mode small { display: block; font-size: 11px; font-weight: 600; color: var(--muted); }
.st-facts { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 15px; }
.st-section { margin-top: 24px; }
.st-section > h2 { display: flex; align-items: center; justify-content: space-between; margin: 0 0 10px; font-size: 20px; }
/* Tarjetas de producto en carrusel (destacados y más pedidos) */
.st-tile {
  position: relative; width: 150px; padding: 0; border: 0; background: transparent; color: var(--text);
  font: inherit; text-align: left; cursor: pointer;
}
.st-tile .ph { position: relative; display: block; width: 150px; height: 150px; border-radius: 16px; overflow: hidden; background: var(--surface-2); }
.st-tile .ph img { width: 100%; height: 100%; object-fit: cover; }
.st-tile .ph .st-noimg { display: flex; width: 100%; height: 100%; align-items: center; justify-content: center; font-size: 40px; }
.st-tile b { display: block; margin-top: 6px; font-size: 15px; }
.st-tile .name { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: 14px; }
.st-tile .tag { position: absolute; top: 8px; left: 8px; padding: 2px 8px; border-radius: 8px; background: var(--surface); color: var(--text); font-size: 12px; font-weight: 800; box-shadow: 0 1px 4px var(--shadow); }
.st-plus {
  position: absolute; right: 8px; bottom: 8px; width: 38px; height: 38px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; background: var(--surface); color: var(--text);
  font-size: 24px; font-weight: 600; box-shadow: 0 2px 8px var(--shadow); line-height: 1;
}
/* Barra de categorías del menú, pegada arriba */
.st-catbar {
  position: sticky; top: 0; z-index: 8; display: flex; align-items: center; gap: 6px;
  margin: 18px -16px 0; padding: 8px 16px calc(8px); background: var(--bg); border-bottom: 1px solid var(--line);
}
.st-catbar .st-scroll { margin: 0; padding: 0; flex: 1; }
.st-catbar .st-chip { min-height: 36px; font-size: 14px; }
.st-catbar .st-icon { width: 38px; height: 38px; font-size: 17px; }
.st-cat { scroll-margin-top: 66px; }
.st-cat > h3 { margin: 22px 0 4px; font-size: 19px; }
/* Fila de producto */
.st-row {
  display: flex; gap: 12px; width: 100%; padding: 14px 0; border: 0; border-bottom: 1px solid var(--line);
  background: transparent; color: var(--text); font: inherit; text-align: left; cursor: pointer;
}
.st-row-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.st-row-info strong { font-size: 16px; }
.st-row-info .desc { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; color: var(--muted); font-size: 14px; }
.st-row-info .price { font-size: 16px; }
.st-row-info .badge-pop { align-self: flex-start; padding: 1px 7px; border-radius: 6px; background: var(--ok-soft); color: var(--ok); font-size: 12px; font-weight: 800; }
.st-row-info .in-cart { font-size: 13px; }
.st-row .ph { position: relative; flex: 0 0 104px; width: 104px; height: 104px; border-radius: 14px; overflow: hidden; background: var(--surface-2); }
.st-row .ph img { width: 100%; height: 100%; object-fit: cover; }
.st-row .ph.empty { background: transparent; }
.st-row .ph.empty .st-plus { right: 0; bottom: 0; border: 1px solid var(--line); }
/* Reseñas */
.st-review {
  width: 260px; min-height: 120px; padding: 14px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface);
  color: var(--text); font: inherit; text-align: left; cursor: pointer; display: flex; flex-direction: column; gap: 6px;
}
.st-review p { margin: 0; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; font-size: 15px; }
.st-stars { color: #F5A623; letter-spacing: 1px; }
.st-review small { color: var(--muted); }
/* Información */
.st-map { position: relative; z-index: 0; isolation: isolate; height: 150px; border-radius: 16px; overflow: hidden; background: var(--surface-2); }
.st-info-row { display: flex; gap: 12px; align-items: flex-start; padding: 12px 0; border-bottom: 1px solid var(--line); text-decoration: none; }
.st-info-row > span:first-child { font-size: 20px; }
.st-hours summary { cursor: pointer; list-style: none; }
.st-hours summary::-webkit-details-marker { display: none; }
.st-hours table { width: 100%; margin-top: 8px; border-collapse: collapse; font-size: 15px; }
.st-hours td { padding: 4px 0; }
.st-hours td:last-child { text-align: right; }
.st-hours tr.today { font-weight: 800; color: var(--brand-text); }

/* ---------- Producto (pantalla completa) con opciones ---------- */
.st-item-backdrop { position: fixed; inset: 0; z-index: 30; background: var(--bg); overflow-y: auto; animation: up .22s ease-out; }
.st-item { max-width: 680px; margin: 0 auto; padding-bottom: calc(110px + env(safe-area-inset-bottom)); }
.st-item-photo { position: relative; aspect-ratio: 4 / 3; max-height: 46vh; width: 100%; background: var(--surface-2); }
.st-item-photo img { width: 100%; height: 100%; object-fit: cover; }
.st-item-close { position: absolute; top: calc(10px + env(safe-area-inset-top)); left: 12px; }
.st-item-noimg { padding-top: calc(62px + env(safe-area-inset-top)); }
.st-item-noimg .st-item-close { position: fixed; }
.st-item-body { padding: 16px; }
.st-item-body h2 { margin: 0; font-size: 24px; }
.st-item-body > p { margin: 6px 0 0; color: var(--muted); }
.st-item-price { margin-top: 8px; font-size: 18px; font-weight: 700; }
.st-group { margin-top: 22px; }
.st-group-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; padding: 12px 14px; margin: 0 -16px; background: var(--surface-2); }
.st-group-head b { display: block; font-size: 17px; }
.st-group-head small { color: var(--muted); font-size: 13px; font-weight: 600; }
.st-req { flex: 0 0 auto; padding: 3px 9px; border-radius: 999px; font-size: 12px; font-weight: 800; background: var(--surface); color: var(--muted); border: 1px solid var(--line); }
.st-req.need { background: var(--brand-soft); color: var(--brand-text); border-color: var(--brand-soft-line); }
.st-req.done { background: var(--ok-soft); color: var(--ok); border-color: var(--ok-line); }
.st-opt {
  display: flex; align-items: center; gap: 12px; width: 100%; min-height: 58px; padding: 8px 0; border-bottom: 1px solid var(--line);
  cursor: pointer; font-weight: 400;
}
.st-opt.off { opacity: .45; cursor: default; }
.st-opt img { flex: 0 0 44px; width: 44px; height: 44px; border-radius: 10px; object-fit: cover; }
.st-opt .txt { flex: 1; min-width: 0; }
.st-opt .txt small { display: block; color: var(--muted); font-size: 14px; }
.st-opt input[type="radio"], .st-opt input[type="checkbox"] { flex: 0 0 auto; width: 24px; height: 24px; margin: 0; accent-color: var(--brand); }
.st-opt .stepper button { width: 38px; height: 38px; font-size: 20px; }
.st-reset { margin-top: 14px; padding: 0; border: 0; background: transparent; color: var(--brand-text); font: inherit; font-weight: 700; cursor: pointer; }
.st-item-qty { display: flex; justify-content: center; margin: 24px 0 0; }
.st-item-foot {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 31; padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  background: var(--bg); border-top: 1px solid var(--line);
}
.st-item-foot .btn { max-width: 648px; margin: 0 auto; }
.st-item-foot .btn:disabled { opacity: 1; background: var(--surface-2); border-color: var(--surface-2); color: var(--muted); }

/* ---------- Calificar un pedido ---------- */
.st-rate { display: flex; justify-content: center; gap: 6px; margin: 10px 0; }
.st-rate button { width: 50px; height: 50px; border: 0; background: transparent; font-size: 36px; color: var(--line-strong); cursor: pointer; }
.st-rate button.on { color: #F5A623; }
img.st-logo { background: var(--surface); }

/* ---------- Para recoger ---------- */
.st-mode small { display: block; }
.st-pickup { display: flex; flex-direction: column; gap: 8px; }
.st-pickup .st-info-row { border-bottom: 0; padding: 4px 0; }
.st-bignum { display: flex; flex-direction: column; align-items: center; gap: 2px; margin: 12px 0; padding: 16px;
  border-radius: 18px; background: var(--accent); color: var(--on-accent); text-align: center; }
.st-bignum small { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; }
.st-bignum b { font-size: 40px; letter-spacing: .04em; line-height: 1.1; }
.st-bignum span { font-size: 14px; font-weight: 600; }
.st-pickup-tag { display: inline-block; padding: 2px 8px; border-radius: 8px; background: var(--accent); color: var(--on-accent); font-weight: 800; }

/* ---------- Navegación sin barra de pestañas ---------- */
/* El logo de la cabecera lleva al inicio. */
.topbar .logo-link { display: flex; border-radius: 12px; }
/* Círculo con la inicial del cliente: el mismo color arriba (inicio) y en "Mi cuenta". */
.avatar.avatar-me { background: var(--brand); color: var(--on-brand); }
/* Pedido en curso, arriba del inicio: lleva a su seguimiento. */
.card.st-active-order { display: flex; align-items: center; gap: 12px; border-color: var(--accent); }
.st-active-order .ico { font-size: 26px; }
.st-active-order .txt { flex: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.st-active-order .chev { color: var(--line-strong); font-size: 22px; }

/* ---------- Inicio: saludo y chips en dos filas ---------- */
.st-hello { margin: 6px 0 10px; font-size: 24px; line-height: 1.2; }
/* Chips de cocinas en DOS filas que se deslizan juntas. */
.st-scroll.st-chips2 {
  display: grid; grid-auto-flow: column; grid-template-rows: repeat(2, auto); justify-content: start;
  gap: 8px; margin-top: 10px;
}

/* ---------- Pantalla de búsqueda ---------- */
.st-search-top {
  position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 8px;
  padding: calc(10px + env(safe-area-inset-top)) 12px 10px; background: var(--bg); border-bottom: 1px solid var(--line);
}
.st-search-field {
  flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; height: 48px; padding: 0 6px 0 14px;
  border: 1.5px solid transparent; border-radius: 999px; background: var(--surface-2);
}
.st-search-field:focus-within { border-color: var(--brand); background: var(--surface); }
.st-search-field input {
  flex: 1; min-width: 0; height: 100%; border: 0; background: transparent; color: var(--text);
  font: inherit; font-size: 16px; outline: none; -webkit-appearance: none; appearance: none;
}
.st-search-field input::-webkit-search-cancel-button { display: none; }
.st-search-field .clear { width: 36px; height: 36px; border: 0; border-radius: 50%; background: var(--surface-2); color: var(--text); cursor: pointer; }
.st-search-screen { padding-top: 4px; }
.st-search-screen .st-section { margin-top: 18px; }
.st-sec-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 4px; }
.st-sec-head h2 { margin: 0; font-size: 20px; }
.st-recent { list-style: none; margin: 0; padding: 0; }
.st-recent li { display: flex; align-items: center; border-bottom: 1px solid var(--line); }
.st-recent-q {
  flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; min-height: 50px; padding: 0;
  border: 0; background: transparent; color: var(--text); font: inherit; text-align: left; cursor: pointer;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.st-recent-x { flex: 0 0 44px; height: 44px; border: 0; border-radius: 50%; background: transparent; color: var(--muted); font-size: 16px; cursor: pointer; }
.st-wrap { display: flex; flex-wrap: wrap; gap: 8px; }
.st-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 10px; }
.st-grid-item {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; min-height: 92px;
  padding: 10px 4px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); color: var(--text);
  font: inherit; font-size: 13px; font-weight: 600; line-height: 1.15; text-align: center; cursor: pointer;
}
.st-grid-item .ico { font-size: 30px; }
.st-grid-item:active { background: var(--surface-2); }
.st-brand-row { display: flex; gap: 12px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); text-decoration: none; }
.st-brand-row .st-logo { flex: 0 0 52px; width: 52px; height: 52px; font-size: 22px; border-width: 2px; }
.st-brand-row .st-promo { align-self: flex-start; margin-top: 4px; font-size: 12px; }
.st-brand-row .st-dish-info { display: flex; flex-direction: column; }

/* ---------- Tus carritos ---------- */
.st-cart-head { display: flex; align-items: center; gap: 12px; }
.st-cart-head .st-logo, .st-logo.st-logo-sm { flex: 0 0 48px; width: 48px; height: 48px; font-size: 20px; border-width: 2px; }
.st-cart-head .txt { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.st-cart-head .txt strong { font-size: 18px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.st-cart-card p { margin: 10px 0 6px; }
.st-cart-btns { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 8px; margin-top: 10px; }
.st-cart-btns .btn { padding: 0 10px; }

/* ---------- Direcciones ---------- */
.st-addr-list { display: flex; flex-direction: column; gap: 8px; margin: 12px 0 14px; max-height: 45vh; overflow-y: auto; }
.st-addr {
  display: flex; align-items: center; gap: 12px; width: 100%; min-height: 62px; padding: 10px 12px;
  border: 1px solid var(--line); border-radius: 14px; background: var(--surface); color: var(--text);
  font: inherit; text-align: left; cursor: pointer;
}
.st-addr.on { border-color: var(--brand); background: var(--brand-soft); }
.st-addr .ico { font-size: 22px; }
.st-addr .txt { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.st-addr .txt .muted { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.st-addr .check { color: var(--brand-text); font-size: 20px; font-weight: 800; }
.form .st-label-pick { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 6px; }
.form .st-label-pick .st-chip { position: relative; margin: 0; font-weight: 600; }
.form .st-label-pick input { position: absolute; opacity: 0; width: 1px; height: 1px; min-height: 0; margin: 0; }
.form .st-label-pick input:focus-visible + * , .form .st-label-pick .st-chip:focus-within { outline: 3px solid var(--focus-ring); }

/* ---------- Mi cuenta ---------- */
.st-profile { padding-bottom: 10px; }
.st-profile-top { display: flex; align-items: center; gap: 14px; margin-bottom: 12px; }
.st-profile-top .txt { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.st-profile-top strong { font-size: 20px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.st-profile .st-scroll { padding-bottom: 4px; }
.st-menu { padding: 0; overflow: hidden; }
.st-menu-row {
  display: flex; align-items: center; gap: 14px; min-height: 62px; padding: 10px 16px;
  border-bottom: 1px solid var(--line); color: var(--text); text-decoration: none;
}
.st-menu-row:last-child { border-bottom: 0; }
.st-menu-row:active { background: var(--surface-2); }
.st-menu-row .ico { flex: 0 0 28px; font-size: 22px; text-align: center; }
.st-menu-row .txt { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.st-menu-row .chev { color: var(--line-strong); font-size: 22px; }
.st-viewed { display: flex; flex-direction: column; gap: 6px; width: 124px; color: var(--text); text-decoration: none; }
.st-viewed .ph {
  display: flex; align-items: center; justify-content: center; width: 124px; height: 82px;
  border-radius: 14px; overflow: hidden; background: var(--surface-2);
}
.st-viewed .ph img { width: 100%; height: 100%; object-fit: cover; }
.st-viewed .ph .st-logo { width: 48px; height: 48px; font-size: 20px; border-width: 2px; }
.st-viewed .name { font-size: 14px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- Hojas de permisos ---------- */
.st-perm { text-align: center; }
.st-perm-ico { font-size: 52px; line-height: 1; margin: 6px 0 8px; }
.st-perm p.muted { margin: 8px 0 20px; }
.st-howto { margin-top: 6px; }
.st-howto summary { cursor: pointer; font-weight: 700; color: var(--brand-text); }
.st-howto p { font-size: 14px; }
/* Avisos que son botones (ej. "¿Dónde vas a recibir tu pedido?"): título arriba y texto abajo. */
button.card.notice.btn-block { display: block; width: 100%; }
.st-search-screen .st-dish-info { display: flex; flex-direction: column; }
.st-addr-card .st-cart-btns { grid-template-columns: 1fr 1fr; }
.st-addr-card .st-make-main { grid-column: 1 / -1; order: 3; }

/* ---------- Colecciones (carruseles por tema) ---------- */
.st-coll-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.st-coll-head > a:first-child { min-width: 0; text-decoration: none; color: var(--text); }
.st-coll-head h2 { margin: 0; font-size: 20px; }
.st-coll-head .muted { display: block; }
.st-arrow {
  flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px;
  border-radius: 50%; background: var(--surface-2); color: var(--text); font-size: 20px; font-weight: 700; text-decoration: none;
}
.st-sponsored {
  display: inline-block; padding: 1px 7px; border-radius: 6px; background: var(--surface-2); color: var(--muted);
  font-size: 11px; font-weight: 700; letter-spacing: .02em;
}
.st-sponsored.on-photo { position: absolute; top: 8px; left: 8px; background: rgb(0 0 0 / .55); color: #fff; }
.st-red { color: var(--brand-text); font-size: 13px; font-weight: 800; }
/* Tarjeta de negocio en carrusel */
.st-btile { position: relative; display: flex; flex-direction: column; gap: 2px; width: 236px; color: var(--text); text-decoration: none; }
.st-btile .ph, .st-dtile .ph, .st-ocard .ph {
  position: relative; display: flex; align-items: center; justify-content: center; overflow: hidden;
  background: linear-gradient(135deg, var(--surface-2), var(--line));
}
.st-btile .ph { width: 236px; height: 132px; border-radius: 16px; margin-bottom: 6px; }
.st-btile .ph img, .st-btile .ph video, .st-dtile .ph img, .st-ocard .ph img, .st-ocard .ph video { width: 100%; height: 100%; object-fit: cover; }
.st-btile strong { font-size: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.st-btile .meta, .st-dtile .meta { font-size: 13px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.st-tile-logo .st-logo { width: 56px; height: 56px; font-size: 24px; }
/* Números grandes 1, 2, 3… sobre la foto (las mejores ofertas de hoy) */
.st-rank {
  position: absolute; left: 8px; bottom: 2px; font-size: 64px; font-weight: 900; line-height: 1; color: #fff;
  -webkit-text-stroke: 2px rgb(0 0 0 / .55); text-shadow: 0 2px 8px rgb(0 0 0 / .35);
}
.st-toptile .ph { margin-bottom: 6px; }
/* Tarjeta de plato */
.st-dtile { display: flex; flex-direction: column; gap: 2px; width: 150px; color: var(--text); text-decoration: none; }
.st-dtile .ph { width: 150px; height: 150px; border-radius: 16px; margin-bottom: 6px; }
.st-dtile .st-noimg { font-size: 40px; }
.st-dtile strong { font-size: 15px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.st-dtile .price { font-size: 15px; }
.st-dgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 16px 12px; }
.st-dgrid .st-dtile, .st-dgrid .st-dtile .ph { width: 100%; }
.st-dgrid .st-dtile .ph { height: auto; aspect-ratio: 1; }

/* ---------- Página de Ofertas ---------- */
.st-filters { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin: 0 -16px 12px; padding: 2px 16px 6px; }
.st-filters::-webkit-scrollbar { display: none; }
.st-fbtn {
  flex: 0 0 auto; min-height: 40px; padding: 0 14px; border: 1px solid var(--line); border-radius: 999px;
  background: var(--surface); color: var(--text); font: inherit; font-size: 15px; font-weight: 600; white-space: nowrap; cursor: pointer;
}
.st-fbtn.active { background: var(--text); border-color: var(--text); color: var(--bg); }
.st-fbtn.clear { border-color: transparent; background: transparent; color: var(--brand-text); }
.st-feature {
  display: block; overflow: hidden; border-radius: 20px; background: linear-gradient(120deg, var(--brand), var(--brand-strong));
  color: var(--on-brand); text-decoration: none;
}
.st-feature .ph { display: block; aspect-ratio: 16 / 8; background: rgb(0 0 0 / .15); }
.st-feature .ph img, .st-feature .ph video { width: 100%; height: 100%; object-fit: cover; display: block; }
.st-feature .txt { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px 16px; }
.st-feature small { font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; opacity: .92; }
.st-feature strong { font-size: 22px; line-height: 1.15; }
.st-feature .cond { font-size: 13px; opacity: .92; }
.st-feature .btn { align-self: flex-start; margin-top: 8px; background: #fff; color: #D6001C; border-color: #fff; min-height: 44px; }
.st-ocard { display: block; margin-bottom: 18px; color: var(--text); text-decoration: none; }
.st-ocard .ph { width: 100%; aspect-ratio: 16 / 8; border-radius: 18px; }
.st-ocard-tag {
  position: absolute; left: 10px; bottom: 10px; padding: 4px 10px; border-radius: 8px; background: #D6001C; color: #fff;
  font-size: 14px; font-weight: 800;
}
.st-ocard .body { display: flex; flex-direction: column; gap: 2px; padding: 8px 2px 0; }
.st-ocard strong { font-size: 18px; }
.st-ocard .meta { font-size: 14px; color: var(--muted); }

/* Banner del inicio con foto, video o GIF */
.st-banner-media { width: 42%; flex: 0 0 42%; }
.st-banner-media img, .st-banner-media video { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ---------- Bandeja de notificaciones ---------- */
.st-icon .dot.dot-red { top: 6px; right: 6px; min-width: 10px; width: 10px; height: 10px; padding: 0; border: 2px solid var(--bg); background: #D6001C; }
.st-notifs { list-style: none; margin: 0 -16px; padding: 0; }
.st-nrow { position: relative; overflow: hidden; background: #D6001C; transition: max-height .22s, opacity .22s; max-height: 200px; }
.st-nrow.gone { max-height: 0; opacity: 0; }
.st-nrow-del { position: absolute; right: 24px; top: 50%; transform: translateY(-50%); font-size: 24px; color: #fff; }
.st-nrow-in {
  position: relative; display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; background: var(--bg);
  border-bottom: 1px solid var(--line); cursor: pointer; touch-action: pan-y; transition: transform .2s ease;
}
.st-nrow-in.dragging { transition: none; }
.st-nrow-in.unread { background: var(--brand-soft); }
.st-nrow-in .ico {
  flex: 0 0 44px; width: 44px; height: 44px; border-radius: 12px; overflow: hidden; display: flex; align-items: center;
  justify-content: center; font-size: 22px; background: var(--surface-2);
}
.st-nrow-in .ico img { width: 100%; height: 100%; object-fit: cover; }
.st-nrow-in .txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.st-nrow-x { flex: 0 0 36px; height: 36px; border: 0; border-radius: 50%; background: transparent; color: var(--muted); cursor: pointer; }

/* ---------- Envío gratis desde un monto ---------- */
.st-free { font-size: 15px; }
.st-free.ok { border-color: var(--ok-line); background: var(--ok-soft); color: var(--ok); }
.st-free-bar { display: block; height: 6px; margin-top: 8px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.st-free-bar i { display: block; height: 100%; background: var(--brand); border-radius: 999px; }
.st-free-fact { color: var(--brand-text); font-weight: 700; }
.st-sec-head .btn { white-space: nowrap; }

/* =====================================================================================================================
   LIMPIEZA VISUAL (referencia: el inicio de DoorDash en tema claro). Manda sobre lo de arriba.
   - Interfaz en blanco, negro y grises; el color lo ponen las fotos y los iconos 3D (emoji). Rojo sólido solo en las
     acciones principales (carrito, Ver carrito, Continuar al pago) y los precios en oferta.
   - Iconos de línea Phosphor (icons.js) en los accesos rápidos y la cabecera; los 3D en chips de cocinas, búsqueda,
     portadas de respaldo y estados vacíos.
   - Menos cajas: tarjetas sin fondo ni borde, foto con esquinas de 12 px y el texto sobre el fondo de la página.
   ===================================================================================================================== */

/* ---------- Colores propios de la app del cliente ---------- */
:root.no-tabbar {
  /* Cabecera blanca (también la barra del celular, que toma --header-bg en theme.js). */
  --header-bg: #FFFFFF;
  --header-text: #191B1E;
  --header-btn: #F1F2F4;
  --text: #191B1E;          /* casi negro para títulos y nombres */
  --muted: #6B6F75;
  --surface-2: #F1F2F4;
  --band: #F1F2F4;          /* franja entre secciones */
  --promo-bg: #FDECEE;      /* etiquetas de promo: texto rojo sobre rojo muy claro */
  --promo-text: #C2001A;
  --on-photo: rgb(255 255 255 / .94);  /* botones sobre fotos (el "+") */
  --on-photo-text: #191B1E;
}
/* Tema oscuro con su propio ajuste: fondo casi negro, superficies apenas más claras, franjas sutiles. */
:root.no-tabbar[data-theme="dark"] {
  --bg: #0D0F12;
  --surface: #15181C;
  --surface-2: #1C2025;
  --line: #24292F;
  --text: #ECEEF0;
  --muted: #9AA0A7;
  --header-bg: #0D0F12;
  --header-text: #ECEEF0;
  --header-btn: #1C2025;
  --band: #15181C;
  --promo-bg: #3A1418;
  --promo-text: #FF8A97;
  --on-photo: rgb(13 15 18 / .62);
  --on-photo-text: #FFFFFF;
}
.no-tabbar body { background: var(--bg); }
.no-tabbar .topbar { border-bottom: 1px solid var(--line); }
.no-tabbar .topbar .icon-btn { border-radius: 50%; min-width: 44px; padding: 0; }

/* Iconos de línea */
.ph-i { width: 1em; height: 1em; display: block; }

/* ---------- Jerarquía de texto ---------- */
.st-hello, .st-list-title h2, .st-section > h2, .st-coll-head h2, .st-sec-head h2 {
  font-size: 21px; font-weight: 800; letter-spacing: -0.02em; line-height: 1.2;
}
.st-hello { margin: 4px 0 14px; }
.st-card-name, .st-btile strong, .st-dtile strong, .st-ocard strong, .st-row-info strong, .st-viewed .name {
  font-size: 16.5px; font-weight: 700; letter-spacing: -0.01em;
}
.st-meta, .st-btile .meta, .st-dtile .meta, .st-ocard .meta, .st-rating {
  font-size: 13.5px; font-weight: 500; color: var(--muted);
}
.st-rating .star, .st-meta .star, .meta .star { color: var(--text); }

/* ---------- Cabecera del inicio ---------- */
.st-top { border-bottom: 0; }
.st-icon { background: var(--header-btn); font-size: 22px; }
.st-icon .ph-i { width: 22px; height: 22px; }
/* Círculo del perfil: gris suave con la inicial oscura (igual arriba y en Mi cuenta). */
.st-avatar, .avatar.avatar-me { background: var(--surface-2); color: var(--text); }

/* ---------- Accesos rápidos: icono de línea sin recuadro, etiqueta en una línea ---------- */
.st-quicks { gap: 4px; padding-bottom: 2px; }
.st-quick { width: auto; min-width: 72px; padding: 4px 6px; gap: 6px; }
.st-quick .ico { width: auto; height: auto; border: 0; border-radius: 0; background: transparent; font-size: 28px; color: var(--text); }
.st-quick .ico .ph-i { width: 28px; height: 28px; }
.st-quick span:last-child { font-size: 13px; font-weight: 500; white-space: nowrap; line-height: 1.2; }
.st-quick.active .ico { background: transparent; border: 0; color: var(--text); }
.st-quick.active span:last-child { color: var(--text); font-weight: 800; }

/* ---------- Chips: fondo gris suave, sin borde ---------- */
.st-chip { border: 0; background: var(--surface-2); color: var(--text); font-weight: 600; }
.st-chip.active { background: var(--text); color: var(--bg); }
.st-fbtn { border: 0; background: var(--surface-2); }

/* ---------- Ritmo: secciones con aire y franja gris entre ellas ---------- */
.st-band { height: 8px; margin: 28px -16px; background: var(--band); }
.st-section { margin-top: 28px; }
.st-band + .st-section, .st-band + .st-banner { margin-top: 0; }
.st-coll + .st-coll { margin-top: 32px; }
.st-list-title { margin: 0 0 14px; }
/* Filas deslizables: empiezan en el margen de 16 px y solo se cortan por la derecha. */
.st-scroll { scroll-padding-left: 16px; }
/* "Ver todo": botón redondo gris */
.st-arrow { background: var(--surface-2); width: 38px; height: 38px; font-size: 18px; }

/* ---------- Tarjetas sin cajas ---------- */
.st-card { margin-bottom: 26px; }
.st-cover { border-radius: 12px; }
.st-card-head { display: flex; align-items: center; gap: 8px; padding: 10px 0 0; }
.st-card-name { flex: 1; min-width: 0; color: var(--text); text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.st-card-body { padding: 2px 0 0; }
/* Corazón a la derecha del nombre (ya no encima de la foto) */
.st-card-head .st-fav, .st-fav {
  position: static; flex: 0 0 auto; width: 36px; height: 36px; box-shadow: none; background: transparent;
  color: var(--text); font-size: 22px;
}
.st-fav .ph-i { width: 22px; height: 22px; }
.st-fav.on { color: #D6001C; }
/* Carruseles de colecciones: la tarjeta ocupa ~82 % del ancho y asoma la siguiente */
.st-coll .st-btile { width: min(82vw, 540px); }
.st-coll .st-btile .ph { width: 100%; height: auto; aspect-ratio: 16 / 9; }
.st-btile .ph, .st-dtile .ph, .st-ocard .ph, .st-viewed .ph, .st-feature .ph { border-radius: 12px; }
.st-btile .ph, .st-dtile .ph { background: var(--surface-2); }
/* Sobre la foto solo va el "+" de los platos: en oscuro, fondo oscuro translúcido */
.st-plus, .st-dtile .st-plus {
  background: var(--on-photo); color: var(--on-photo-text); box-shadow: 0 1px 6px rgb(0 0 0 / .18);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
.st-row .ph.empty .st-plus { background: var(--surface-2); color: var(--text); border: 0; }
.st-tile .ph, .st-row .ph { border-radius: 12px; }

/* Portada de respaldo: icono 3D grande sobre un fondo suave de su color; logo pequeño en una esquina */
.st-fallback {
  position: relative; display: flex; width: 100%; height: 100%; align-items: center; justify-content: center;
  background: radial-gradient(circle at 50% 45%, hsl(var(--fb-h) 85% 96%), hsl(var(--fb-h) 60% 88%));
}
:root[data-theme="dark"] .st-fallback { background: radial-gradient(circle at 50% 45%, hsl(var(--fb-h) 30% 22%), hsl(var(--fb-h) 25% 14%)); }
.st-fallback-ico { font-size: clamp(48px, 18vw, 96px); line-height: 1; filter: drop-shadow(0 6px 10px rgb(0 0 0 / .12)); }
.st-btile .st-fallback-ico, .st-viewed .st-fallback-ico, .st-dtile .st-fallback-ico { font-size: 56px; }
.st-fallback-logo {
  position: absolute; left: 10px; bottom: 10px; width: 40px; height: 40px; border-radius: 50%; object-fit: cover;
  border: 2px solid var(--bg); background: var(--bg);
}
.st-hero .st-fallback { height: 100%; }
.st-hero { background: var(--surface-2); }

/* ---------- Color con moderación: etiquetas suaves, sin bloques rojos ---------- */
.st-promo, .st-ocard-tag, .st-red-tag {
  background: var(--promo-bg); color: var(--promo-text); font-weight: 700;
}
.st-red { color: var(--promo-text); font-weight: 700; }
.st-near { background: var(--surface-2); color: var(--muted); font-weight: 600; }
.st-sponsored { background: var(--surface-2); color: var(--muted); }
/* Banner de promoción: fondo gris suave, texto oscuro y el precio en oferta en rojo */
.st-banner { background: var(--surface-2); color: var(--text); border-radius: 12px; }
.st-banner-text small { color: var(--promo-text); opacity: 1; }
.st-banner-text strong { font-weight: 800; letter-spacing: -0.02em; }
.st-banner-text span { opacity: 1; }
.st-feature { background: var(--surface-2); color: var(--text); border-radius: 12px; }
.st-feature small { color: var(--promo-text); opacity: 1; }
.st-feature .cond { color: var(--muted); opacity: 1; }
.st-feature .btn { background: #D6001C; border-color: #D6001C; color: #fff; }
.st-first-pill { background: var(--promo-bg); color: var(--promo-text); border-color: transparent; }

/* ---------- Barra de búsqueda: fondo sólido, sombra suave, lupa de línea y texto en negrita ---------- */
.st-search {
  border: 1px solid transparent;
  --st-ring: 0.16;
  background:
    linear-gradient(var(--surface), var(--surface)) padding-box,
    conic-gradient(from var(--st-angle),
      rgb(214 0 28 / var(--st-ring)), rgb(255 138 152 / var(--st-ring)), rgb(214 0 28 / var(--st-ring))) border-box;
  box-shadow: 0 6px 20px rgb(0 0 0 / .10), 0 1px 3px rgb(0 0 0 / .06);
  /* Una sola vuelta al abrir la pantalla */
  animation: st-search-spin 2.4s ease-out 1;
}
:root[data-theme="dark"] .st-search { box-shadow: 0 6px 20px rgb(0 0 0 / .45); }
.st-search .st-search-ico { display: flex; color: var(--text); font-size: 20px; }
.st-search .st-search-ico .ph-i { width: 20px; height: 20px; }
.st-search-btn, .st-ph { color: var(--text); font-weight: 700; }
.st-search input::placeholder { color: var(--text); font-weight: 700; opacity: .85; }
.st-cart-fab .ph-i { width: 24px; height: 24px; }
/* Botones sobre la portada del negocio: blancos en claro; en oscuro, fondo oscuro translúcido */
.st-round { background: var(--on-photo); color: var(--on-photo-text); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.st-round .ph-i, .st-catbar .st-icon .ph-i { width: 20px; height: 20px; }
.st-round.on { color: #D6001C; }

/* Producto con opciones dentro de la hoja de pantalla completa (sheet.js): el pie queda pegado abajo. */
.st-item-sheet { background: var(--bg); }
.st-item-sheet .st-item { position: relative; padding-bottom: 0; }
.st-item-sheet .st-item-foot { position: sticky; bottom: 0; }
.st-item-sheet .st-item-noimg .st-item-close { position: absolute; }
