/* ============================================================
   WOK WANG v2 — app.css
   Tema oscuro suavizado — gris azulado, naranja corporativo
   Fuente: Outfit (todo el sitio)
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&display=swap');

/* ── Variables ──────────────────────────────────────────────── */
:root {
  --c-orange:      #E8640A;
  --c-orange-dark: #C45208;
  --c-orange-glow: rgba(232,100,10,.10);

  /* Alias mantenidos para compatibilidad */
  --c-red:         #E8640A;
  --c-red-dark:    #C45208;
  --c-red-light:   rgba(232,100,10,.10);
  --c-red-glow:    rgba(232,100,10,.10);

  /* Fondos casi blancos */
  --c-bg:          #F9F7F5;
  --c-bg-soft:     #F3F1EE;
  --c-bg-warm:     #FDF5F0;
  --c-surface:     #FFFFFF;
  --c-border:      #E2DDD8;
  --c-border-soft: #EDE9E5;

  /* Superficies (antes oscuras, ahora claras) */
  --c-dark:        #FFFFFF;
  --c-dark2:       #F3F1EE;
  --c-dark3:       #EDE9E5;

  /* Texto oscuro sobre fondo claro */
  --c-text:        #1C1A18;
  --c-text-mid:    #3D3A36;
  --c-text-muted:  #7A746E;

  --c-success: #1A6632;
  --c-error:   #C8181C;
  --c-warn:    #8A5000;
  --c-info:    #1D4ED8;

  --r-sm:  4px;
  --r-md:  8px;
  --r-lg:  12px;
  --r-xl:  20px;

  --shadow-sm: 0 1px 4px rgba(0,0,0,.07);
  --shadow-md: 0 4px 16px rgba(0,0,0,.08);
  --shadow-glow: 0 0 20px rgba(232,100,10,.15);

  --nav-h:    58px;
  --bottom-h: 64px;
  --transition: 150ms ease;
}

/* ── Reset ──────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
  font-family: 'Outfit', sans-serif;
  font-weight: 400;
  background: var(--c-bg);
  color: var(--c-text);
  line-height: 1.6;
  min-height: 100vh;
  padding-bottom: var(--bottom-h);
  -webkit-font-smoothing: antialiased;
}
body.noscroll { overflow: hidden; }
a { color: var(--c-orange); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }
button { cursor: pointer; font-family: inherit; }
input, select, textarea { font-family: inherit; }
h1, h2, h3, h4 { font-weight: 700; line-height: 1.2; }

.section-title {
  font-size: clamp(1.1rem, 3.5vw, 1.45rem);
  font-weight: 700;
  margin-bottom: 1.1rem;
  display: flex;
  align-items: center;
  gap: .5rem;
}
.section-title::after {
  content: '';
  flex: 1;
  height: 2px;
  background: linear-gradient(90deg, var(--c-orange) 0%, transparent 100%);
  margin-left: .4rem;
  opacity: .2;
}

/* ── Botones ────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .4rem;
  padding: .52rem 1.15rem;
  border-radius: var(--r-md);
  font-weight: 600;
  font-size: .87rem;
  border: 2px solid transparent;
  transition: all var(--transition);
  white-space: nowrap;
  text-decoration: none;
  cursor: pointer;
  font-family: inherit;
}
.btn:hover { transform: translateY(-1px); text-decoration: none; }
.btn:active { transform: none; }
.btn--primary { background: var(--c-orange); color: #fff; border-color: var(--c-orange); }
.btn--primary:hover { background: var(--c-orange-dark); box-shadow: 0 4px 12px var(--c-orange-glow); }
.btn--ghost   { background: transparent; color: var(--c-text); border-color: var(--c-border); }
.btn--ghost:hover { border-color: var(--c-orange); color: var(--c-orange); }
.btn--outline { background: transparent; color: var(--c-orange); border-color: var(--c-orange); }
.btn--outline:hover { background: var(--c-orange-glow); }
.btn--sm  { padding: .32rem .8rem; font-size: .78rem; }
.btn--lg  { padding: .75rem 1.65rem; font-size: .97rem; }
.btn--full { width: 100%; }
.btn:disabled { opacity: .4; cursor: not-allowed; transform: none !important; box-shadow: none !important; }

/* ── Top nav ────────────────────────────────────────────────── */
.topnav {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--nav-h);
  background: rgba(255,255,255,.96);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 2px solid var(--c-orange);
  display: flex;
  align-items: center;
  gap: .9rem;
  padding: 0 1rem;
  box-shadow: 0 2px 8px rgba(0,0,0,.08);
}
.topnav__logo { text-decoration: none; flex-shrink: 0; display: flex; align-items: center; gap: .45rem; }
.topnav__logo img { height: 34px; width: auto; }
.logo-text {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--c-orange);
  letter-spacing: .05em;
}
.topnav__rest { display: flex; gap: .3rem; flex: 1; overflow: hidden; }

/* Pantallas pequeñas: pills en segunda fila */
@media (max-width: 480px) {
  .topnav {
    height: auto;
    min-height: var(--nav-h);
    flex-wrap: wrap;
    padding: .45rem 1rem;
    gap: .35rem .5rem;
    row-gap: .35rem;
  }
  .topnav__logo  { order: 1; flex-shrink: 0; }
  .topnav__right { order: 2; margin-left: auto; }
  .topnav__rest  {
    order: 3;
    flex: 0 0 100%;          /* ocupa toda la fila */
    overflow: visible;
    flex-wrap: wrap;
    padding-bottom: .3rem;
  }
  /* El sticky-wrap de la carta debe pegarse al nav real, no a --nav-h fijo */
  .carta-sticky-wrap { top: 0; }
  .cat-section { scroll-margin-top: calc(120px + 30px); }  /* extra para la fila de pills */
}
.rest-pill {
  padding: .2rem .6rem;
  border-radius: 99px;
  font-size: .77rem;
  font-weight: 600;
  background: #FFFFFF;
  color: var(--c-text-muted);
  border: 1.5px solid var(--c-border);
  white-space: nowrap;
  transition: all var(--transition);
  text-decoration: none;
}
.rest-pill--active, .rest-pill:hover {
  background: var(--c-orange);
  color: var(--c-text);
  border-color: var(--c-orange);
  text-decoration: none;
}
.topnav__right { display: flex; align-items: center; gap: .55rem; margin-left: auto; flex-shrink: 0; }
.topnav__user  { font-size: .8rem; color: var(--c-text-muted); }
.topnav__link  { font-size: .83rem; color: var(--c-text-muted); transition: color var(--transition); text-decoration: none; }
.topnav__link:hover { color: var(--c-orange); }
.topnav__link--btn { background: none; border: none; padding: 0; font-size: .83rem; color: var(--c-text-muted); cursor: pointer; font-family: inherit; }

/* ── Bottom nav ─────────────────────────────────────────────── */
.bottomnav {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 100;
  height: var(--bottom-h);
  background: #fff;
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--c-border);
  display: flex;
  align-items: stretch;
}
.bottomnav__item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  color: var(--c-text-muted);
  font-size: .64rem;
  font-weight: 500;
  transition: color var(--transition);
  text-decoration: none;
  padding: .5rem 0;
}
.bottomnav__item:hover, .bottomnav__item.active { color: var(--c-orange); text-decoration: none; }
.bottomnav__item svg { width: 21px; height: 21px; }

/* ── Footer ─────────────────────────────────────────────────── */
.footer {
  background: #FFFFFF;
  border-top: 1px solid var(--c-border);
  padding: 1.75rem 1rem 1.25rem;
  margin-bottom: var(--bottom-h);
}
.footer__inner   { max-width: 900px; margin: 0 auto; }
.footer__brand   { margin-bottom: .85rem; }
.footer__logo    { font-size: 1.05rem; font-weight: 700; color: var(--c-orange); letter-spacing: .05em; }
.footer__tagline { font-size: .79rem; color: var(--c-text-muted); margin-top: .2rem; }
.footer__links   { display: flex; gap: .9rem; flex-wrap: wrap; margin-bottom: .85rem; }
.footer__links a { font-size: .79rem; color: var(--c-text-muted); }
.footer__links a:hover { color: var(--c-orange); }
.footer__legal   { font-size: .71rem; color: var(--c-text-muted); line-height: 1.7; }
.footer__legal a { color: var(--c-text-muted); text-decoration: underline; }

/* ── Hero ───────────────────────────────────────────────────── */
.hero {
  position: relative;
  background: var(--c-bg-warm);
  border-bottom: 2px solid var(--c-border);
  overflow: hidden;
}
.hero__content {
  max-width: 680px;
  margin: 0 auto;
  padding: 2.75rem 1.5rem 2.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  animation: fadeUp .5s ease both;
}
.hero__logo-img {
  width: min(260px, 68vw);
  height: auto;
  margin-bottom: .6rem;
}
.hero__title-seo {
  font-size: .75rem;
  font-weight: 400;
  color: var(--c-text-muted);
  letter-spacing: .03em;
  margin-bottom: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: .1rem;
  line-height: 1.4;
}
.hero__title-seo span { font-size: .7rem; }
.hero__ctas { display: flex; gap: .55rem; justify-content: center; flex-wrap: wrap; }
.hero__title { display: none; }
.hero__sub   { display: none; }

/* ── Selector restaurante ───────────────────────────────────── */
.rest-selector { padding: 1.75rem 1rem 0; max-width: 720px; margin: 0 auto; }
.rest-cards    { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px,1fr)); gap: .9rem; }
.rest-card {
  background: #FFFFFF;
  border: 1.5px solid var(--c-border);
  border-radius: var(--r-lg);
  padding: 1.1rem;
  transition: all var(--transition);
  text-decoration: none;
  color: var(--c-text);
  position: relative;
}
.rest-card:hover, .rest-card--active {
  border-color: var(--c-orange);
  box-shadow: var(--shadow-glow);
  transform: translateY(-2px);
  text-decoration: none;
  color: var(--c-text);
}
.rest-card__icon    { font-size: 1.6rem; margin-bottom: .5rem; }
.rest-card__name    { font-size: .97rem; font-weight: 700; margin-bottom: .3rem; color: var(--c-text); }
.rest-card__addr, .rest-card__tel { font-size: .78rem; color: var(--c-text-muted); margin-bottom: .12rem; }
.rest-card__horario { font-size: .74rem; color: var(--c-text-muted); margin-top: .35rem; line-height: 1.6; }
.rest-card__badge {
  position: absolute; top: .6rem; right: .6rem;
  background: var(--c-orange); color: var(--c-text);
  font-size: .66rem; font-weight: 700;
  padding: .12rem .42rem; border-radius: 99px;
}

/* ── Quick actions ──────────────────────────────────────────── */
.quick-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(125px,1fr));
  gap: .55rem;
  padding: 1.5rem 1rem;
  max-width: 720px;
  margin: 0 auto;
}
.quick-card {
  background: #FFFFFF;
  border: 1.5px solid var(--c-border);
  border-radius: var(--r-lg);
  padding: 1.1rem .7rem;
  text-align: center;
  color: var(--c-text);
  text-decoration: none;
  transition: all var(--transition);
}
.quick-card:hover {
  border-color: var(--c-orange);
  box-shadow: var(--shadow-glow);
  transform: translateY(-2px);
  text-decoration: none;
  color: var(--c-text);
}
.quick-card__icon { font-size: 1.6rem; margin-bottom: .45rem; }
.quick-card h3    { font-size: .87rem; font-weight: 700; margin-bottom: .18rem; }
.quick-card p     { font-size: .73rem; color: var(--c-text-muted); }

/* ── Promociones ────────────────────────────────────────────── */
.promos { padding: 0 1rem 1.75rem; max-width: 860px; margin: 0 auto; }
.promo-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px,1fr)); gap: .7rem; }
.promo-card {
  background: #FFFFFF;
  border: 1.5px solid var(--c-orange);
  border-radius: var(--r-lg);
  padding: .95rem;
}
.promo-card__icon   { font-size: 1.4rem; margin-bottom: .35rem; }
.promo-card__title  { font-size: .87rem; font-weight: 700; margin-bottom: .25rem; color: var(--c-text); }
.promo-card__desc   { font-size: .76rem; color: var(--c-text-muted); }
.promo-card__expiry { font-size: .69rem; color: var(--c-orange); margin-top: .35rem; font-weight: 600; }

/* ── Info local ─────────────────────────────────────────────── */
.local-info { padding: 0 1rem 1.75rem; max-width: 860px; margin: 0 auto; }
.local-info__grid { display: grid; grid-template-columns: 1fr; gap: 1.25rem; }
@media (min-width: 640px) { .local-info__grid { grid-template-columns: 1fr 1fr; align-items: start; } }
.local-info__addr { font-size: .93rem; margin-bottom: .35rem; }
.local-info__tel a { color: var(--c-orange); font-weight: 700; font-size: 1.05rem; }
.local-info__horario { margin: .65rem 0; }
.local-info__horario h3 { font-size: .83rem; color: var(--c-text-muted); margin-bottom: .22rem; font-weight: 600; }
.local-info__horario p  { font-size: .86rem; line-height: 1.9; }
.local-info__ctas { display: flex; gap: .45rem; flex-wrap: wrap; margin-top: .7rem; }
.local-info__map iframe { border-radius: var(--r-lg); }

/* ═══════════════════════════════════════════════════════════
   CARTA
   ═══════════════════════════════════════════════════════════ */

/* Wrapper sticky: solo nav de categorías */
.carta-sticky-wrap {
  position: sticky;
  top: var(--nav-h);
  z-index: 80;
  background: rgba(255,255,255,.97);
  backdrop-filter: blur(10px);
  border-bottom: 1.5px solid var(--c-border);
}

/* El carta-header ya no existe como sticky — estilos solo por compatibilidad */
.carta-header { display: none; }
.carta-solo-vista .cat-nav { top: var(--nav-h); }

/* Tipo/CP dentro del panel de la cesta */
.cesta-tipo-cp {
  display: flex;
  flex-direction: column;
  gap: .4rem;
  padding-bottom: .65rem;
  border-bottom: 1px solid var(--c-border);
  margin-bottom: .5rem;
}
.cesta-tipo-btns { display: flex; gap: .4rem; }
.cesta-tipo-btns .tipo-btn { flex: 1; }
.carta-header__tipo { display: flex; gap: .38rem; }
.tipo-btn {
  flex: 1;
  padding: .42rem;
  border-radius: var(--r-md);
  border: 1.5px solid var(--c-border);
  background: #FFFFFF;
  color: var(--c-text-muted);
  font-size: .82rem;
  font-weight: 600;
  transition: all var(--transition);
  font-family: inherit;
}
.tipo-btn--active {
  border-color: var(--c-orange);
  color: var(--c-orange);
  background: var(--c-orange-glow);
}
.cp-row   { display: flex; align-items: center; gap: .45rem; }
.cp-input {
  flex: 1; max-width: 125px;
  padding: .38rem .65rem;
  border-radius: var(--r-md);
  border: 1.5px solid var(--c-border);
  background: #FFFFFF;
  color: var(--c-text);
  font-size: .86rem;
  font-family: inherit;
  transition: border-color var(--transition);
}
.cp-input:focus { outline: none; border-color: var(--c-orange); }
.cp-msg     { font-size: .74rem; font-weight: 500; }
.cp-msg--ok { color: #166534; }
.cp-msg--err{ color: var(--c-orange); }

/* Nav de categorías: forma una unidad con carta-header en un wrapper sticky */
.carta-sticky-wrap {
  position: sticky;
  top: var(--nav-h);
  z-index: 80;
  background: rgba(255,255,255,.97);
  backdrop-filter: blur(10px);
  border-bottom: 1.5px solid var(--c-border);
}

/* El cat-nav ya NO es sticky por sí solo: vive dentro del wrapper */
.cat-nav {
  background: transparent;
  border-bottom: none;
  border-top: 1px solid var(--c-border);
}
/* Cuando la carta es solo-vista no hay carta-header, el wrapper sigue sticky */
.carta-solo-vista .cat-nav { border-top: none; }

.cat-nav__scroll {
  display: flex;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding: 0 .5rem;
}
.cat-nav__scroll::-webkit-scrollbar { display: none; }
.cat-nav__item {
  flex-shrink: 0;
  padding: .55rem .85rem;
  font-size: .79rem;
  font-weight: 600;
  color: var(--c-text-muted);
  border-bottom: 3px solid transparent;
  transition: all var(--transition);
  white-space: nowrap;
  text-decoration: none;
}
.cat-nav__item--active, .cat-nav__item:hover {
  color: var(--c-orange);
  border-bottom-color: var(--c-orange);
  text-decoration: none;
}

/* Contenido principal de la carta */
.carta-main { max-width: 820px; margin: 0 auto; padding: .65rem 1rem; }
.cat-section {
  margin-bottom: 1.6rem;
  scroll-margin-top: calc(var(--nav-h) + 44px);  /* nav + solo cat-nav */
}
.carta-solo-vista .cat-section { scroll-margin-top: calc(var(--nav-h) + 44px); }

.cat-title {
  font-size: .97rem;
  font-weight: 700;
  color: var(--c-orange);
  margin-bottom: .45rem;
  padding-bottom: .3rem;
  border-bottom: 2px solid rgba(232,100,10,.2);
}

/* ── LISTA DE PLATOS (una fila por plato) ───────────────────── */
.platos-list { display: flex; flex-direction: column; }

.plato-row {
  display: flex;
  align-items: center;
  gap: .7rem;
  padding: .48rem .2rem;
  border-bottom: 1px solid var(--c-border-soft);
  transition: background var(--transition);
  min-height: 62px;
}
.plato-row:last-child { border-bottom: none; }
.plato-row:hover      { background: var(--c-dark3); border-radius: var(--r-md); }

/* Miniatura */
.plato-row__img-wrap {
  width: 58px; height: 58px;
  flex-shrink: 0;
  border-radius: var(--r-md);
  overflow: hidden;
  background: #FFFFFF;
}
.plato-row__img { width: 100%; height: 100%; object-fit: cover; }

.plato-row__no-img {
  width: 58px; height: 58px;
  flex-shrink: 0;
  border-radius: var(--r-md);
  background: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  color: var(--c-border);
}

/* Info del plato */
.plato-row__info { flex: 1; min-width: 0; }
.plato-row__nombre {
  font-size: .88rem;
  font-weight: 600;
  line-height: 1.3;
  color: var(--c-text);
}
.plato-row__badge {
  display: inline-block;
  margin-top: .18rem;
  padding: .08rem .38rem;
  background: var(--c-orange-glow);
  color: var(--c-orange);
  border-radius: 99px;
  font-size: .63rem;
  font-weight: 600;
}

/* Precio + botón añadir */
.plato-row__right {
  display: flex;
  align-items: center;
  gap: .55rem;
  flex-shrink: 0;
}
.plato-row__precio {
  font-size: .97rem;
  font-weight: 700;
  color: var(--c-orange);
  white-space: nowrap;
  min-width: 52px;
  text-align: right;
}

.btn-anadir {
  padding: .28rem .7rem;
  border-radius: var(--r-md);
  border: 1.5px solid var(--c-orange);
  background: transparent;
  color: var(--c-orange);
  font-size: .78rem;
  font-weight: 700;
  transition: all var(--transition);
  white-space: nowrap;
  font-family: inherit;
}
.btn-anadir:hover { background: var(--c-orange); color: #fff; }

/* ── Modo solo-vista (sin pedidos) ──────────────────────────── */
.carta-solo-vista .btn-anadir,
.carta-solo-vista .carta-header__tipo,
.carta-solo-vista .cp-row { display: none; }

.carta-solo-vista .cesta-fab  { display: none !important; }

.aviso-solo-vista {
  background: var(--c-bg-warm);
  border: 1.5px solid var(--c-orange);
  border-radius: var(--r-lg);
  padding: .65rem 1rem;
  margin: .5rem 0 .75rem;
  font-size: .82rem;
  color: var(--c-text-muted);
  text-align: center;
}
.aviso-solo-vista strong { color: var(--c-orange); }

/* Aviso de cierre por día de la semana */
.aviso-cerrado {
  display: flex;
  align-items: center;
  gap: .85rem;
  background: #FFF8E6;
  border: 1.5px solid #E8A800;
  border-radius: var(--r-lg);
  padding: .85rem 1.1rem;
  margin: .5rem 0 .75rem;
  color: #7A5200;
}
.aviso-cerrado__icon { font-size: 1.5rem; flex-shrink: 0; }
.aviso-cerrado strong { display: block; font-size: .9rem; font-weight: 700; color: #7A5200; }
.aviso-cerrado p { font-size: .8rem; margin-top: .15rem; opacity: .85; }

/* ── FAB cesta ──────────────────────────────────────────────── */
.cesta-fab {
  position: fixed;
  bottom: calc(var(--bottom-h) + .8rem);
  right: 1rem;
  z-index: 90;
  background: var(--c-orange);
  color: var(--c-text);
  border: none;
  border-radius: var(--r-xl);
  padding: .6rem 1.05rem;
  display: flex;
  align-items: center;
  gap: .5rem;
  box-shadow: 0 6px 18px rgba(200,24,28,.38);
  cursor: pointer;
  font-weight: 700;
  font-size: .87rem;
  transition: all var(--transition);
  animation: fabPop .3s ease;
  font-family: inherit;
}
.cesta-fab:hover { background: var(--c-orange-dark); transform: translateY(-2px); }
.cesta-fab svg   { width: 18px; height: 18px; flex-shrink: 0; }
.cesta-fab__count {
  background: #FFFFFF;
  color: var(--c-orange);
  font-size: .68rem;
  font-weight: 800;
  padding: .06rem .35rem;
  border-radius: 99px;
  min-width: 17px;
  text-align: center;
}
.cesta-fab__total { font-size: .84rem; }

/* ── Panel de cesta ─────────────────────────────────────────── */
.cesta-panel { position: fixed; inset: 0; z-index: 200; pointer-events: none; }
.cesta-panel--open { pointer-events: all; }
.cesta-panel__backdrop {
  position: absolute; inset: 0;
  background: rgba(0,0,0,.38);
  opacity: 0;
  transition: opacity .22s ease;
}
.cesta-panel--open .cesta-panel__backdrop { opacity: 1; }
.cesta-panel__inner {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  background: #FFFFFF;
  border-top: 3px solid var(--c-orange);
  border-radius: var(--r-xl) var(--r-xl) 0 0;
  /* Extra 60px para que el widget de soporte no tape el botón confirmar */
  padding: 1rem 1rem calc(1rem + var(--bottom-h) + 60px);
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  transform: translateY(100%);
  transition: transform .28s cubic-bezier(.32,.72,0,1);
  box-shadow: 0 -6px 24px rgba(0,0,0,.1);
}
.cesta-panel--open .cesta-panel__inner { transform: translateY(0); }
.cesta-panel__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: .85rem;
  padding-bottom: .6rem;
  border-bottom: 1px solid var(--c-border);
}
.cesta-panel__header h2 { font-size: 1.05rem; }
.cesta-panel__close {
  background: #FFFFFF;
  border: none;
  color: var(--c-text-muted);
  width: 28px; height: 28px;
  border-radius: 50%;
  font-size: .9rem;
  display: flex; align-items: center; justify-content: center;
}
.cesta-panel__items { flex: 1; overflow-y: auto; }
.cesta-empty { text-align: center; color: var(--c-text-muted); padding: 1.75rem; font-size: .88rem; }

.cesta-item {
  display: flex;
  align-items: center;
  gap: .6rem;
  padding: .6rem 0;
  border-bottom: 1px solid var(--c-border-soft);
}
.cesta-item__name { flex: 1; font-size: .84rem; }
.cesta-item__name small { display: block; color: var(--c-text-muted); font-size: .73rem; }
.cesta-item__controls {
  display: flex; align-items: center; gap: .3rem;
  background: #FFFFFF;
  border-radius: var(--r-md);
  padding: .12rem .32rem;
}
.cesta-qty-btn {
  background: none; border: none; color: var(--c-orange);
  font-size: 1.05rem; font-weight: 700;
  width: 20px; height: 20px;
  display: flex; align-items: center; justify-content: center;
}
.cesta-qty { font-size: .84rem; font-weight: 600; min-width: 16px; text-align: center; }
.cesta-item__precio { font-weight: 700; font-size: .86rem; color: var(--c-orange); white-space: nowrap; }

.cesta-panel__footer {
  padding-top: .8rem;
  border-top: 1px solid var(--c-border);
  margin-top: .4rem;
  display: flex; flex-direction: column; gap: .45rem;
}
.cesta-total { display: flex; justify-content: space-between; align-items: center; font-size: .92rem; }
.cesta-total strong { font-size: 1.15rem; color: var(--c-orange); font-weight: 700; }
.cesta-envio-info  { font-size: .78rem; color: #166534; }
.cesta-minimo-msg  { font-size: .74rem; color: var(--c-text-muted); text-align: center; }

/* ── Modal opciones ─────────────────────────────────────────── */
.modal-opciones {
  position: fixed; inset: 0; z-index: 250;
  display: flex; align-items: flex-end; justify-content: center;
}
.modal-opciones__backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.4); }
.modal-opciones__inner {
  position: relative; background: #FFFFFF;
  border-top: 3px solid var(--c-orange);
  border-radius: var(--r-xl) var(--r-xl) 0 0;
  padding: 1.3rem 1rem 1.75rem;
  width: 100%; max-width: 460px;
}
.modal-opciones__inner h3 { margin-bottom: .8rem; font-size: .97rem; }
.opciones-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(115px,1fr));
  gap: .45rem; margin-bottom: .8rem;
}
.opcion-btn {
  padding: .55rem; border-radius: var(--r-md);
  border: 1.5px solid var(--c-border);
  background: #FFFFFF; color: var(--c-text);
  font-size: .81rem; font-weight: 600;
  transition: all var(--transition); font-family: inherit;
}
.opcion-btn:hover { border-color: var(--c-orange); color: var(--c-orange); background: var(--c-orange-glow); }

/* ── Auth pages ─────────────────────────────────────────────── */
.auth-page {
  min-height: calc(100vh - var(--nav-h) - var(--bottom-h));
  display: flex; align-items: center; justify-content: center;
  padding: 2rem 1rem; background: #FFFFFF;
}
.auth-card {
  background: var(--c-dark2); border: 1px solid var(--c-border);
  border-radius: var(--r-xl); padding: 1.85rem 1.4rem;
  width: 100%; max-width: 410px; box-shadow: var(--shadow-sm);
}
.auth-card--wide { max-width: 640px; }
.auth-title { font-size: 1.55rem; margin-bottom: .28rem; }
.auth-sub   { color: var(--c-text-muted); font-size: .86rem; margin-bottom: 1.3rem; }
.auth-form  { display: flex; flex-direction: column; gap: .85rem; }
.auth-links { display: flex; gap: .6rem; justify-content: center; margin-top: 1rem; font-size: .81rem; color: var(--c-text-muted); }
.auth-ok { text-align: center; padding: 1rem; }
.auth-ok__icon { font-size: 3rem; margin-bottom: .75rem; }
.auth-ok h1 { margin-bottom: .35rem; }
.auth-ok p  { color: var(--c-text-muted); margin-bottom: 1.2rem; }

/* ── Formularios ────────────────────────────────────────────── */
.form-group { display: flex; flex-direction: column; gap: .25rem; }
.form-group label { font-size: .81rem; font-weight: 600; color: var(--c-text-mid); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: .85rem; }
@media (max-width: 480px) { .form-row { grid-template-columns: 1fr; } }
.form-input {
  width: 100%; padding: .57rem .82rem;
  border-radius: var(--r-md);
  border: 1.5px solid var(--c-border);
  background: #FFFFFF;
  color: var(--c-text);
  font-size: .86rem; font-family: inherit;
  transition: border-color var(--transition), box-shadow var(--transition);
  box-shadow: inset 0 1px 3px rgba(0,0,0,.05);
}
.form-input:focus  { outline: none; border-color: var(--c-orange); box-shadow: 0 0 0 3px var(--c-orange-glow); }
.form-input::placeholder { color: #AAA; }
.form-textarea { resize: vertical; min-height: 75px; }
.input-eye { position: relative; }
.input-eye .form-input { padding-right: 2.3rem; }
.eye-btn { position: absolute; right: .55rem; top: 50%; transform: translateY(-50%); background: none; border: none; font-size: .9rem; opacity: .42; cursor: pointer; }
.eye-btn:hover { opacity: .8; }
.req   { color: var(--c-orange); }
small  { font-size: .72rem; color: var(--c-text-muted); }

.rgpd-block {
  background: var(--c-bg-soft); border: 1px solid var(--c-border);
  border-radius: var(--r-md); padding: .85rem;
  display: flex; flex-direction: column; gap: .55rem;
}
.rgpd-info { font-size: .71rem; color: var(--c-text-muted); line-height: 1.6; }
.checkbox-label { display: flex; gap: .52rem; align-items: flex-start; cursor: pointer; font-size: .81rem; }
.checkbox-label input { margin-top: .18rem; flex-shrink: 0; accent-color: var(--c-orange); }

/* ── Alertas ────────────────────────────────────────────────── */
.alert {
  padding: .7rem .88rem; border-radius: var(--r-md);
  font-size: .84rem; margin-bottom: .45rem; border-left: 3px solid;
}
.alert--error   { background: #FEF2F2; border-color: #C8181C; color: #991B1B; }
.alert--warn    { background: #FFFBEB; border-color: #92400E; color: #78350F; }
.alert--info    { background: #EFF6FF; border-color: #1E40AF; color: #1E3A8A; }
.alert--success { background: #F0FDF4; border-color: #166534; color: #14532D; }
.alert p { margin: .16rem 0; }

.toast {
  position: fixed; top: calc(var(--nav-h) + .8rem); right: 1rem;
  z-index: 300; padding: .7rem 1.05rem; border-radius: var(--r-md);
  font-size: .84rem; box-shadow: var(--shadow-md);
  animation: slideIn .28s ease; max-width: 290px;
}
.toast--error   { background: #C8181C; color: #fff; }
.toast--success { background: #166534; color: #fff; }
.toast--info    { background: #1E40AF; color: #fff; }

/* ── Pedido ─────────────────────────────────────────────────── */
.pedido-page   { max-width: 820px; margin: 0 auto; padding: 1.1rem 1rem; }
.pedido-title  { font-size: 1.4rem; margin-bottom: 1.1rem; }
.pedido-layout { display: grid; grid-template-columns: 1fr; gap: 1.1rem; }
@media (min-width: 640px) { .pedido-layout { grid-template-columns: 1fr 340px; } }
.pedido-form   { display: flex; flex-direction: column; gap: 1.1rem; }
.pedido-section {
  background: var(--c-dark3); border: 1.5px solid var(--c-border);
  border-radius: var(--r-lg); padding: 1rem;
}
.pedido-section h2 { font-size: .92rem; font-weight: 700; margin-bottom: .8rem; }
.hora-opts { display: flex; flex-wrap: wrap; gap: .38rem; }
.hora-opt { cursor: pointer; }
.hora-opt input { display: none; }
.hora-opt span {
  display: block; padding: .35rem .75rem;
  border-radius: var(--r-md); border: 1.5px solid var(--c-border);
  background: var(--c-dark3); font-size: .79rem; font-weight: 600;
  cursor: pointer; transition: all var(--transition);
}
.hora-opt input:checked + span { border-color: var(--c-orange); color: var(--c-orange); background: var(--c-orange-glow); }
.hora-opt:hover span { border-color: var(--c-orange); }
.pago-opts { display: flex; gap: .55rem; flex-wrap: wrap; }
.pago-opt { cursor: pointer; }
.pago-opt input { display: none; }
.pago-opt span {
  display: flex; align-items: center; gap: .38rem;
  padding: .55rem .95rem; border-radius: var(--r-md);
  border: 2px solid var(--c-border); background: #FFFFFF;
  font-size: .84rem; font-weight: 600; cursor: pointer;
  transition: all var(--transition);
}
.pago-opt input:checked + span,
.pago-opt--activo span {
  background: var(--c-orange);
  border-color: var(--c-orange);
  color: #fff;
}

.pedido-resumen {
  background: var(--c-dark3); border: 1.5px solid var(--c-border);
  border-radius: var(--r-lg); padding: 1rem;
  height: fit-content; position: sticky; top: calc(var(--nav-h) + .65rem);
}
.pedido-resumen h2   { font-size: .92rem; font-weight: 700; margin-bottom: .8rem; }
.resumen-items       { display: flex; flex-direction: column; gap: .45rem; margin-bottom: .8rem; }
.resumen-item        { display: flex; gap: .45rem; font-size: .82rem; }
.resumen-item__qty   { color: var(--c-orange); font-weight: 700; min-width: 20px; }
.resumen-item__name  { flex: 1; }
.resumen-item__name small { display: block; color: var(--c-text-muted); font-size: .7rem; }
.resumen-item__precio{ font-weight: 600; white-space: nowrap; }
.resumen-totales  { border-top: 1px solid var(--c-border); padding-top: .6rem; display: flex; flex-direction: column; gap: .32rem; }
.resumen-row      { display: flex; justify-content: space-between; font-size: .83rem; color: var(--c-text-muted); }
.resumen-row--total  { font-size: 1.02rem; color: var(--c-text); margin-top: .18rem; }
.resumen-row--total strong:last-child { color: var(--c-orange); }

.pedido-ok { text-align: center; padding: 2.25rem 1rem; }
.pedido-ok__icon { font-size: 3.25rem; margin-bottom: .75rem; }
.pedido-ok h1    { font-size: 1.7rem; margin-bottom: .38rem; }
.pedido-ok__num  { color: var(--c-orange); font-weight: 700; font-size: 1rem; margin-bottom: .6rem; }
.pedido-ok__hora { font-size: .92rem; margin: .38rem 0; }
.pedido-ok__mail { font-size: .8rem; color: var(--c-text-muted); margin: .38rem 0 1.6rem; }

/* ── Animaciones ────────────────────────────────────────────── */
@keyframes fadeUp  { from { opacity:0; transform:translateY(14px) } to { opacity:1; transform:none } }
@keyframes fabPop  { from { transform:scale(.72); opacity:0 } to { transform:scale(1); opacity:1 } }
@keyframes slideIn { from { transform:translateX(100%); opacity:0 } to { transform:translateX(0); opacity:1 } }

/* ── Desktop ────────────────────────────────────────────────── */
@media (min-width: 768px) {
  body { padding-bottom: 0; }
  .bottomnav { display: none; }
  .footer    { margin-bottom: 0; }
  .cesta-panel__inner {
    left: auto; right: 0; top: 0; bottom: 0;
    max-height: 100vh; border-radius: 0;
    border-top: none; border-left: 3px solid var(--c-orange);
    width: 340px; transform: translateX(100%);
    padding-bottom: 1.5rem;
  }
  .cesta-panel--open .cesta-panel__inner { transform: translateX(0); }
  .cesta-fab { bottom: 2rem; }
}
