/* ==========================================================================
   Antojo — estilos de la web pública
   Identidad original: ube (morado) + mango (amarillo), Bricolage Grotesque + Figtree
   ========================================================================== */

:root {
    --ube: #5B2C83;
    --ube-700: #46206A;
    --ube-900: #2E1447;
    --ube-100: #E7DCF1;
    --ube-50: #F3EDF8;
    --mango: #FFB627;
    --mango-100: #FFE8B8;
    --mango-50: #FFF6E2;
    --leche: #F7F5FA;
    --tinta: #231B2E;
    --tinta-2: #5E5670;
    --tinta-3: #8C849C;
    --linea: #E7E2EE;
    --albahaca: #1E9E6A;
    --albahaca-50: #E3F5EC;
    --rocoto: #D83A34;
    --rocoto-50: #FCE9E8;

    --font-display: "Bricolage Grotesque", "Segoe UI", system-ui, sans-serif;
    --font-body: "Figtree", "Segoe UI", system-ui, sans-serif;

    --r-card: 20px;
    --r-btn: 14px;
    --r-input: 14px;
    --r-pill: 999px;

    --shadow-soft: 0 1px 2px rgba(35, 27, 46, .05), 0 10px 28px -18px rgba(46, 20, 71, .45);
    --shadow-pop: 0 18px 40px -16px rgba(46, 20, 71, .45);

    --header-h: 72px;
    --bottom-nav-h: 64px;
    --ease: cubic-bezier(.2, .8, .2, 1);

    --bs-body-font-family: var(--font-body);
    --bs-body-color: var(--tinta);
    --bs-body-bg: var(--leche);
    --bs-link-color: var(--ube);
    --bs-link-color-rgb: 91, 44, 131;
    --bs-link-hover-color: var(--ube-700);
    --bs-border-color: var(--linea);
    --bs-focus-ring-color: rgba(91, 44, 131, .3);
}

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

body {
    font-family: var(--font-body);
    background: var(--leche);
    color: var(--tinta);
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: clip;
}

h1, h2, h3, .h1, .h2, .h3, .h4, .h5 { font-family: var(--font-display); letter-spacing: -.01em; }

:focus-visible { outline: 3px solid var(--mango); outline-offset: 2px; border-radius: 6px; }

.skip-link {
    position: absolute; left: 12px; top: -60px; z-index: 2000;
    background: var(--tinta); color: #fff; padding: 10px 16px; border-radius: 10px;
}
.skip-link:focus { top: 12px; }

.app-main { flex: 1 0 auto; outline: none; min-width: 0; }

/* ------------------------------------------------------------------ Botones */
.btn { border-radius: var(--r-btn); font-weight: 600; padding: .6rem 1.1rem; display: inline-flex; align-items: center; justify-content: center; gap: .45rem; }
.btn-brand { background: var(--ube); color: #fff; border: 0; }
.btn-brand:hover, .btn-brand:focus-visible { background: var(--ube-700); color: #fff; }
.btn-brand:active { transform: translateY(1px); }
.btn-brand:disabled { background: var(--ube); opacity: .6; color: #fff; }
.btn-outline-brand { border: 2px solid var(--ube); color: var(--ube); background: transparent; }
.btn-outline-brand:hover { background: var(--ube); color: #fff; }
.btn-quiet { background: transparent; color: var(--tinta); border: 0; }
.btn-quiet:hover { background: var(--ube-50); color: var(--ube); }
.btn-block { width: 100%; padding: .85rem 1rem; font-size: 1.02rem; }

.icon-btn {
    width: 44px; height: 44px; border-radius: 50%; border: 0;
    display: inline-grid; place-items: center; font-size: 1.25rem;
    background: var(--ube-50); color: var(--ube);
    transition: background .2s var(--ease);
}
.icon-btn:hover { background: var(--ube-100); color: var(--ube); }

/* ------------------------------------------------------------------ Header */
.site-header {
    position: sticky; top: 0; z-index: 1020;
    background: rgba(255, 255, 255, .94);
    backdrop-filter: saturate(160%) blur(10px);
    border-bottom: 1px solid var(--linea);
}
.site-header__inner {
    min-width: 0;
    display: grid;
    grid-template-columns: auto auto 1fr auto;
    align-items: center;
    gap: 1rem;
    min-height: var(--header-h);
}
.brand { display: inline-flex; align-items: center; gap: .55rem; text-decoration: none; color: var(--ube); }
.brand__name { font-family: var(--font-display); font-weight: 800; font-size: 1.55rem; letter-spacing: -.03em; }
.brand:hover { color: var(--ube-700); }

.location-pill {
    display: inline-flex; align-items: center; gap: .55rem;
    border: 0; background: transparent; padding: .35rem .6rem; border-radius: 12px;
    color: var(--tinta); text-align: left; max-width: 260px;
}
.location-pill:hover { background: var(--ube-50); }
.location-pill > .bi-geo-alt-fill { color: var(--ube); font-size: 1.15rem; }
.location-pill__text { display: flex; flex-direction: column; line-height: 1.15; min-width: 0; }
.location-pill__text small { color: var(--tinta-3); font-size: .75rem; }
.location-pill__text strong { font-weight: 600; font-size: .92rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.location-pill__chevron { color: var(--tinta-3); font-size: .8rem; }

.site-header__actions { display: flex; align-items: center; gap: .5rem; }

.user-chip {
    display: inline-flex; align-items: center; gap: .5rem;
    border: 1px solid var(--linea); background: #fff; border-radius: var(--r-pill);
    padding: .25rem .7rem .25rem .25rem; font-weight: 600; color: var(--tinta);
}
.user-chip img { border-radius: 50%; }
.app-dropdown { border: 0; border-radius: 16px; box-shadow: var(--shadow-pop); padding: .5rem; min-width: 240px; }
.app-dropdown .dropdown-item { border-radius: 10px; padding: .55rem .75rem; display: flex; gap: .6rem; align-items: center; }
.app-dropdown .dropdown-item:active { background: var(--ube); }
.app-dropdown__head { padding: .5rem .75rem .65rem; display: flex; flex-direction: column; }
.app-dropdown__head span { color: var(--tinta-3); font-size: .85rem; }

/* ------------------------------------------------------------------ Buscador + sugerencias */
.search-box { position: relative; }
.search-box__icon { position: absolute; left: 1rem; top: 50%; transform: translateY(-50%); color: var(--tinta-3); pointer-events: none; }
.search-box__input {
    width: 100%; height: 46px; border-radius: var(--r-pill);
    border: 1px solid var(--linea); background: var(--leche);
    padding: 0 1rem 0 2.6rem; color: var(--tinta);
    transition: border-color .2s, background .2s, box-shadow .2s;
}
.search-box__input:focus { outline: none; border-color: var(--ube); background: #fff; box-shadow: 0 0 0 4px rgba(91, 44, 131, .12); }

.search-suggest {
    position: absolute; left: 0; right: 0; top: calc(100% + 8px); z-index: 1050;
    background: #fff; border-radius: 18px; box-shadow: var(--shadow-pop);
    padding: .5rem; max-height: min(70vh, 480px); overflow-y: auto;
    animation: pop-in .18s var(--ease);
}
.search-suggest__group { padding: .4rem .6rem .2rem; font-size: .78rem; font-weight: 700; color: var(--tinta-3); }
.search-suggest__item {
    display: flex; align-items: center; gap: .75rem; padding: .5rem .6rem; border-radius: 12px;
    text-decoration: none; color: var(--tinta);
}
.search-suggest__item:hover, .search-suggest__item:focus-visible { background: var(--ube-50); color: var(--tinta); outline: none; }
.search-suggest__item img { width: 40px; height: 40px; border-radius: 10px; object-fit: cover; flex-shrink: 0; }
.search-suggest__emoji { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; background: var(--mango-50); font-size: 1.2rem; flex-shrink: 0; }
.search-suggest__text { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.search-suggest__text small { color: var(--tinta-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.search-suggest__all { display: block; text-align: center; padding: .6rem; font-weight: 600; border-top: 1px solid var(--linea); margin-top: .35rem; }
.search-suggest__empty { padding: 1rem; color: var(--tinta-2); text-align: center; margin: 0; }

@keyframes pop-in { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }

/* ------------------------------------------------------------------ Skeleton */
.skeleton {
    background: linear-gradient(90deg, var(--ube-50) 25%, #fff 50%, var(--ube-50) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.2s infinite linear;
    border-radius: 10px;
}
.skeleton-row { display: flex; gap: .75rem; align-items: center; padding: .5rem .6rem; }
.skeleton-row .skeleton:first-child { width: 40px; height: 40px; flex-shrink: 0; }
.skeleton-row .skeleton:last-child { height: 14px; flex: 1; }
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }

/* ------------------------------------------------------------------ Hero */
.hero {
    background: var(--ube);
    color: #fff;
    position: relative;
    overflow: hidden;
}
.hero::before {
    content: ""; position: absolute; right: -120px; top: -160px;
    width: 520px; height: 520px; border-radius: 50%;
    background: var(--ube-700);
}
.hero__inner {
    position: relative;
    display: grid; grid-template-columns: 1.15fr .85fr; align-items: center; gap: 2rem;
    padding-block: 3.5rem 4rem;
}
.hero__title {
    font-family: var(--font-display); font-weight: 800;
    font-size: clamp(2.4rem, 5.2vw, 4.4rem); line-height: .98; letter-spacing: -.035em;
    margin: 0 0 .8rem; max-width: 12ch;
}
.hero__lead { font-size: 1.2rem; color: var(--ube-100); margin-bottom: 1.6rem; }
.hero__art { position: relative; display: flex; justify-content: center; }
.hero__art img { width: 100%; max-width: 480px; height: auto; }

.hero-search {
    position: relative;
    display: grid; grid-template-columns: 1fr auto auto; align-items: stretch;
    background: #fff; border-radius: 22px; padding: .45rem; gap: .35rem;
    box-shadow: 0 24px 50px -24px rgba(0, 0, 0, .55);
    max-width: 680px;
}
.hero-search__field { display: flex; align-items: center; gap: .6rem; padding: 0 .9rem; margin: 0; color: var(--tinta-3); min-width: 0; }
.hero-search__field input { border: 0; outline: none; width: 100%; height: 52px; font-size: 1.05rem; color: var(--tinta); background: transparent; min-width: 0; }
.hero-search__location {
    border: 0; background: var(--leche); color: var(--tinta); border-radius: 16px;
    padding: 0 1rem; display: inline-flex; align-items: center; gap: .45rem; font-weight: 600;
    max-width: 220px;
}
.hero-search__location span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hero-search__location .bi { color: var(--ube); }
.hero-search__submit {
    border: 0; border-radius: 16px; background: var(--mango); color: var(--ube-900);
    font-weight: 800; padding: 0 1.6rem; font-size: 1.02rem;
    transition: transform .15s var(--ease), background .2s;
}
.hero-search__submit:hover { background: #FFC24D; }
.hero-search__submit:active { transform: scale(.97); }

.hero__quick { list-style: none; padding: 0; margin: 1.25rem 0 0; display: flex; flex-wrap: wrap; gap: .5rem; }
.hero__quick a {
    display: inline-block; padding: .4rem .85rem; border-radius: var(--r-pill);
    border: 1px solid rgba(255, 255, 255, .35); color: #fff; text-decoration: none; font-weight: 500; font-size: .92rem;
}
.hero__quick a:hover { background: rgba(255, 255, 255, .12); }

/* Carrusel de la portada (Admin → Banners). Las imágenes cambian detrás; el buscador queda fijo. */
.hero--slider { background: var(--ube-900); }
.hero--slider::before { display: none; }
.hero--slider::after {
    content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
    background: linear-gradient(90deg, rgba(46, 20, 71, .92) 0%, rgba(46, 20, 71, .72) 42%, rgba(46, 20, 71, .15) 78%, rgba(46, 20, 71, 0) 100%);
}
.hero__slides { position: absolute; inset: 0; z-index: 0; }
.hero__slide { position: absolute; inset: 0; opacity: 0; transition: opacity .9s var(--ease); }
.hero__slide.is-active { opacity: 1; }
.hero__slide img { width: 100%; height: 100%; object-fit: cover; object-position: center right; display: block; }
.hero--slider .hero__inner { z-index: 2; grid-template-columns: minmax(0, 640px); /* Alto = ancho ÷ 3: la imagen 3:1 (1920 × 640) se ve completa, sin recortes. */ min-height: clamp(440px, 33.333vw, 720px); padding-block: 3.5rem 2.5rem; }
/* Los textos se apilan en la misma celda: la altura no salta al cambiar de diapositiva. */
.hero__texts { display: grid; }
.hero__text { grid-area: 1 / 1; opacity: 0; visibility: hidden; transform: translateY(8px); transition: opacity .5s var(--ease), transform .5s var(--ease), visibility .5s; }
.hero__text.is-active { opacity: 1; visibility: visible; transform: none; }
.hero--slider .hero__title { text-shadow: 0 2px 18px rgba(0, 0, 0, .25); }
.hero--slider .hero__lead { color: #fff; opacity: .92; }
/* Enlace discreto: el protagonista del héroe sigue siendo el buscador (botón mango). */
.hero__cta {
    display: inline-flex; align-items: center; gap: .35rem; margin: -.9rem 0 1.3rem;
    padding: .15rem 0; color: #fff; font-weight: 600; font-size: .95rem;
    text-decoration: underline; text-decoration-color: rgba(255, 255, 255, .45);
    text-underline-offset: 4px; text-decoration-thickness: 1px; opacity: .9;
    transition: opacity .2s, text-decoration-color .2s;
}
.hero__cta .bi { font-size: .85em; transition: transform .2s var(--ease); }
.hero__cta:hover { color: #fff; opacity: 1; text-decoration-color: var(--mango); }
.hero__cta:hover .bi { transform: translateX(3px); }
/* Controles discretos en la esquina inferior derecha: se aclaran al pasar el mouse o con el teclado. */
.hero__controls {
    position: absolute; left: 0; right: 0; bottom: .9rem; z-index: 2;
    display: flex; align-items: center; justify-content: flex-end; gap: .15rem;
    pointer-events: none; opacity: .6; transition: opacity .25s;
}
.hero__controls > * { pointer-events: auto; }
.hero:hover .hero__controls, .hero__controls:focus-within { opacity: 1; }
.hero__dots { display: flex; gap: .3rem; align-items: center; height: 26px; padding-inline: .55rem; border-radius: 999px; background: rgba(20, 8, 32, .35); backdrop-filter: blur(4px); }
.hero__dot {
    width: 6px; height: 6px; padding: 0; border: 0; border-radius: 999px; background: rgba(255, 255, 255, .5);
    transition: width .3s var(--ease), background .3s;
}
.hero__dot.is-active { width: 16px; background: #fff; }
.hero__nav {
    width: 26px; height: 26px; border-radius: 50%; border: 0;
    background: rgba(20, 8, 32, .35); backdrop-filter: blur(4px); color: #fff; display: grid; place-items: center; padding: 0; font-size: .85rem;
}
.hero__nav:hover { background: rgba(20, 8, 32, .6); }
.hero__dot:focus-visible, .hero__nav:focus-visible, .hero__cta:focus-visible { outline: 3px solid var(--mango); outline-offset: 2px; }
@media (max-width: 767.98px) {
    .hero--slider::after { background: linear-gradient(180deg, rgba(46, 20, 71, .78) 0%, rgba(46, 20, 71, .88) 100%); }
    .hero--slider .hero__inner { min-height: 0; padding-block: 2rem 2.75rem; }
    .hero__slide img { object-position: center; }
}
@media (prefers-reduced-motion: reduce) {
    .hero__slide, .hero__text { transition: none; }
}

/* ------------------------------------------------------------------ Secciones */
.home-sections { display: grid; grid-template-columns: minmax(0, 1fr); gap: 2.75rem; padding-block: 2.5rem 3rem; }
.home-sections > * { min-width: 0; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }
.section-head__title { font-size: clamp(1.3rem, 2.4vw, 1.7rem); font-weight: 800; margin: 0; }
.section-head__link { font-weight: 600; text-decoration: none; white-space: nowrap; }

.scroller {
    display: flex; gap: .9rem; overflow-x: auto; scroll-snap-type: x proximity;
    padding: .25rem .1rem 1rem; margin-inline: -.1rem;
    scrollbar-width: thin; scrollbar-color: var(--ube-100) transparent;
}
.scroller > * { scroll-snap-align: start; flex-shrink: 0; }
.scroller--cards .scroller__card { width: min(320px, 82vw); }
.scroller--cards .scroller__card .r-card { height: 100%; }

/* Categorías */
.cat-tile {
    width: 116px; display: flex; flex-direction: column; align-items: center; gap: .5rem;
    text-decoration: none; color: var(--tinta); font-weight: 600; font-size: .9rem; text-align: center;
}
.cat-tile__icon {
    width: 76px; height: 76px; border-radius: 24px; background: #fff;
    display: grid; place-items: center; font-size: 2.2rem;
    box-shadow: var(--shadow-soft);
    transition: transform .2s var(--ease), background .2s;
}
.cat-tile:hover .cat-tile__icon { transform: translateY(-3px); background: var(--mango-50); }
/* Categoría con imagen subida desde Admin → Categorías (cuadrada, fondo transparente o claro). */
.cat-tile__icon--image { overflow: hidden; padding: 6px; }
.cat-tile__icon--image img { width: 100%; height: 100%; object-fit: contain; display: block; }

/* Promociones */
.promo-card {
    width: min(340px, 84vw); min-height: 168px; border-radius: 24px; padding: 1.25rem 1.35rem;
    display: flex; flex-direction: column; gap: .35rem; text-decoration: none; position: relative; overflow: hidden;
}
.promo-card::after {
    content: ""; position: absolute; right: -40px; bottom: -40px; width: 140px; height: 140px; border-radius: 50%;
    background: rgba(255, 255, 255, .16);
}
.promo-card--0 { background: var(--ube); color: #fff; }
.promo-card--soon { background: #fff; color: var(--tinta); border: 2px dashed var(--ube-100); }
.promo-card__soon { display: inline-flex; gap: .35rem; align-items: center; font-size: .85rem; font-weight: 600; color: var(--ube); }
.promo-card__remind { position: relative; z-index: 2; align-self: flex-start; display: inline-flex; gap: .4rem; align-items: center; border: 0; border-radius: 999px; padding: .4rem .9rem; font-weight: 700; font-size: .85rem; background: var(--mango); color: var(--tinta); text-decoration: none; }
.promo-card__remind.is-on { background: var(--albahaca-50); color: var(--albahaca); }
.promo-card--1 { background: var(--mango); color: var(--ube-900); }
.promo-card--2 { background: var(--tinta); color: #fff; }
.promo-card__badge {
    align-self: flex-start; font-family: var(--font-display); font-weight: 800; font-size: 1.05rem;
    background: rgba(255, 255, 255, .92); color: var(--ube-900); padding: .15rem .65rem; border-radius: 10px;
}
.promo-card--1 .promo-card__badge { background: var(--ube); color: #fff; }
.promo-card__title { font-family: var(--font-display); font-size: 1.3rem; line-height: 1.15; margin-top: .4rem; }
.promo-card__subtitle { opacity: .85; font-size: .95rem; }
.promo-card__by { margin-top: auto; font-size: .82rem; font-weight: 600; opacity: .8; }
.promo-card:hover { color: inherit; filter: brightness(1.04); }
.promo-card__countdown { margin-top: .5rem; align-self: flex-start; position: relative; z-index: 1; }

/* Cuenta regresiva "Termina en 00 : 13 : 29" (como el "Ends in" de Keeta) */
.countdown {
    display: inline-flex; align-items: center; gap: .2rem; flex-wrap: wrap;
    background: var(--mango); color: var(--tinta); border-radius: var(--r-pill); padding: .2rem .35rem .2rem .7rem;
    font-weight: 700; font-size: .82rem; line-height: 1.2;
}
.countdown__label { margin-right: .25rem; white-space: nowrap; }
.countdown__box {
    background: var(--tinta); color: #fff; border-radius: 6px; padding: .12rem .3rem; min-width: 1.75em;
    text-align: center; font-variant-numeric: tabular-nums; font-weight: 700;
}
.countdown__sep { font-weight: 800; }
.countdown.is-over { background: var(--linea); color: var(--tinta-2); padding-right: .7rem; }
.promo-card--1 .countdown { background: #fff; }
.r-promo .countdown { margin-top: .35rem; align-self: flex-start; font-size: .75rem; }
.r-promo .countdown span { color: inherit; font-size: inherit; }

/* ------------------------------------------------------------------ Tarjeta de restaurante */
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(270px, 100%), 1fr)); gap: 1.25rem; }
.card-grid > * { min-width: 0; }

.r-card {
    position: relative; background: #fff; border-radius: var(--r-card); overflow: hidden;
    box-shadow: var(--shadow-soft); display: flex; flex-direction: column;
    transition: transform .2s var(--ease), box-shadow .2s var(--ease);
}
.r-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-pop); }
.r-card:focus-within { box-shadow: 0 0 0 3px var(--mango), var(--shadow-pop); }

.r-card__media { position: relative; aspect-ratio: 16 / 9; background: var(--ube-50); }
.r-card__media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.r-card.is-closed .r-card__media img { filter: grayscale(.85) brightness(.9); }

.r-card__badges { position: absolute; left: .75rem; top: .75rem; display: flex; gap: .35rem; flex-wrap: wrap; z-index: 2; }
.badge-tag {
    display: inline-flex; align-items: center; font-size: .75rem; font-weight: 700;
    padding: .22rem .55rem; border-radius: 8px; line-height: 1.2; white-space: nowrap;
}
.badge-tag--promo { background: var(--mango); color: var(--ube-900); }
.badge-tag--free { background: var(--albahaca); color: #fff; }
.badge-tag--new { background: var(--ube); color: #fff; }
.badge-tag--popular { background: #fff; color: var(--ube); }

.fav-btn {
    position: absolute; right: .7rem; top: .7rem; z-index: 3;
    width: 40px; height: 40px; border-radius: 50%; border: 0;
    background: rgba(255, 255, 255, .95); color: var(--tinta);
    display: grid; place-items: center; font-size: 1.1rem; box-shadow: 0 4px 12px rgba(0, 0, 0, .15);
    transition: transform .15s var(--ease);
}
.fav-btn:hover { transform: scale(1.08); }
.fav-btn[aria-pressed="true"] { color: var(--rocoto); }
.fav-btn.is-bump { animation: bump .35s var(--ease); }
@keyframes bump { 40% { transform: scale(1.25); } }

.r-card__closed {
    position: absolute; right: .75rem; bottom: .75rem; z-index: 2;
    background: rgba(35, 27, 46, .88); color: #fff; font-size: .8rem; font-weight: 600;
    padding: .3rem .65rem; border-radius: 8px;
}

.r-card__body { position: relative; padding: 1.6rem 1rem 1rem; flex: 1; }
.r-card__logo {
    position: absolute; left: 1rem; top: -28px; width: 52px; height: 52px; border-radius: 14px;
    border: 3px solid #fff; background: #fff; object-fit: cover; box-shadow: 0 4px 12px rgba(0, 0, 0, .12);
}
.r-card__title { font-size: 1.12rem; font-weight: 700; margin: .25rem 0 .1rem; }
.r-card__title a { color: var(--tinta); text-decoration: none; }
.r-card__title a:focus-visible { outline: none; }
.r-card__cats { color: var(--tinta-3); font-size: .88rem; margin: 0 0 .6rem; }
.r-card__facts { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: .35rem .9rem; font-size: .88rem; color: var(--tinta-2); }
.r-card__facts li { display: inline-flex; align-items: center; gap: .3rem; }
.r-card__facts .bi { color: var(--tinta-3); }
.r-card__rating .bi { color: var(--mango); }
.r-card__rating strong { color: var(--tinta); }
.r-card__facts li.is-free { color: var(--albahaca); font-weight: 600; }
.r-card__facts li.is-free .bi { color: var(--albahaca); }

/* ------------------------------------------------------------------ Búsqueda */
.search-page { padding-block: 2rem 3rem; }
.search-page__head { display: flex; align-items: center; gap: 1rem; margin-bottom: 1.25rem; }
.search-page__emoji { width: 64px; height: 64px; display: grid; place-items: center; font-size: 2.2rem; background: #fff; border-radius: 20px; box-shadow: var(--shadow-soft); overflow: hidden; }
.search-page__emoji img { width: 100%; height: 100%; object-fit: contain; padding: 5px; }
.search-page__title { font-weight: 800; font-size: clamp(1.6rem, 3.4vw, 2.3rem); margin: 0; }
.search-page__count { color: var(--tinta-2); margin: .2rem 0 0; }

.chip {
    display: inline-flex; align-items: center; gap: .4rem; white-space: nowrap;
    padding: .45rem .9rem; border-radius: var(--r-pill); background: #fff;
    border: 1px solid var(--linea); color: var(--tinta); text-decoration: none; font-weight: 500; font-size: .92rem;
    cursor: pointer; user-select: none; transition: background .15s, border-color .15s, color .15s;
}
.chip:hover { border-color: var(--ube); color: var(--ube); }
.chip.is-active { background: var(--ube); border-color: var(--ube); color: #fff; }
.chip--lg { padding: .6rem 1.1rem; font-size: 1rem; }
/* Imagen de la categoría (Admin → Categorías) en lugar del emoji. */
.chip__img { width: 24px; height: 24px; margin: -.2rem 0 -.2rem -.45rem; border-radius: 50%; object-fit: contain; background: #fff; flex: none; }
.chip--lg .chip__img { width: 30px; height: 30px; margin-left: -.55rem; }
.chip--toggle { position: relative; }
.chip--toggle input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; pointer-events: none; }
.chip--toggle:has(input:checked) { background: var(--ube); border-color: var(--ube); color: #fff; }
.chip--toggle:has(input:focus-visible) { outline: 3px solid var(--mango); outline-offset: 2px; }

.filters {
    display: flex; flex-wrap: wrap; align-items: center; gap: .6rem;
    padding: .9rem; background: #fff; border-radius: 18px; box-shadow: var(--shadow-soft); margin: .25rem 0 2rem;
}
.filters__toggles, .filters__selects { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.filters__toggles { padding-right: .6rem; border-right: 1px solid var(--linea); }
.select-pill { position: relative; margin: 0; }
.select-pill select, .select-pill--button {
    appearance: none; border: 1px solid var(--linea); background: var(--leche); color: var(--tinta);
    border-radius: var(--r-pill); padding: .45rem 2rem .45rem .9rem; font-size: .92rem; font-weight: 500; cursor: pointer;
}
.select-pill--button { padding-right: .9rem; display: inline-flex; gap: .35rem; align-items: center; }
.select-pill::after {
    content: "\F282"; font-family: "bootstrap-icons"; position: absolute; right: .8rem; top: 50%;
    transform: translateY(-50%); font-size: .7rem; color: var(--tinta-3); pointer-events: none;
}
.select-pill--button::after, label.select-pill:has(.select-pill--button)::after { content: none; }
.select-pill select:focus { outline: none; border-color: var(--ube); }
.filters__clear { font-weight: 600; font-size: .9rem; margin-left: .25rem; }

.search-block { margin-bottom: 2.25rem; }
.search-block__title { font-size: 1.25rem; font-weight: 800; margin-bottom: .9rem; }

.p-mini {
    display: flex; gap: .8rem; align-items: center; width: min(330px, 84vw);
    background: #fff; border-radius: 18px; padding: .6rem; box-shadow: var(--shadow-soft);
    text-decoration: none; color: var(--tinta);
}
.p-mini:hover { color: var(--tinta); box-shadow: var(--shadow-pop); }
.p-mini img { width: 88px; height: 88px; border-radius: 14px; object-fit: cover; background: var(--ube-50); }
.p-mini__body { display: flex; flex-direction: column; gap: .15rem; min-width: 0; }
.p-mini__name { font-weight: 700; line-height: 1.2; }
.p-mini__rest { color: var(--tinta-3); font-size: .85rem; }
.p-mini__price { font-weight: 700; color: var(--ube); display: flex; gap: .4rem; align-items: center; flex-wrap: wrap; }
.p-mini__price s { color: var(--tinta-3); font-weight: 500; font-size: .85rem; }

.pager { display: flex; justify-content: center; margin-top: 2rem; }
.pager .pagination { --bs-pagination-color: var(--ube); --bs-pagination-active-bg: var(--ube); --bs-pagination-active-border-color: var(--ube); --bs-pagination-border-radius: 12px; gap: .25rem; }
.pager .page-link { border-radius: 12px !important; }

/* ------------------------------------------------------------------ Estados vacíos */
.empty-state { text-align: center; padding: 2.5rem 1rem; max-width: 460px; margin: 0 auto; }
.empty-state img { margin-bottom: 1rem; }
.empty-state h3 { font-size: 1.3rem; font-weight: 800; }
.empty-state p { color: var(--tinta-2); }

/* ------------------------------------------------------------------ Autenticación */
.page-auth .site-footer { display: none; }
.auth-shell { display: grid; place-items: center; padding: 2.5rem 1rem 3rem; }
.auth-card { width: 100%; max-width: 440px; background: #fff; border-radius: 26px; padding: 2rem; box-shadow: var(--shadow-soft); }
.auth-card__head { text-align: center; margin-bottom: 1.5rem; }
.auth-card__title { font-weight: 800; font-size: 1.75rem; margin: .75rem 0 .35rem; }
.auth-card__lead { color: var(--tinta-2); margin: 0; }

/* Registra tu negocio */
.business-register { max-width: 540px; }
.business-register__icon { width: 56px; height: 56px; border-radius: 18px; display: inline-grid; place-items: center; background: var(--mango); color: var(--ube-900); font-size: 1.7rem; margin-bottom: .5rem; }
.business-register__steps { margin: 0 0 1.25rem; padding-left: 1.2rem; color: var(--tinta-2); display: grid; gap: .5rem; }
.business-register__steps strong { color: var(--tinta); }
.business-register__status { display: flex; gap: .85rem; align-items: flex-start; background: var(--mango-50); border-radius: 16px; padding: 1rem; margin-bottom: 1rem; }
.business-register__status > i { font-size: 1.4rem; color: #7A4B00; }
.business-register__status p { margin: .25rem 0 0; color: var(--tinta-2); font-size: .92rem; }
.business-register__terms { display: flex; gap: .6rem; align-items: flex-start; font-size: .9rem; color: var(--tinta-2); cursor: pointer; }
.business-register__terms input { width: 1.15rem; height: 1.15rem; margin-top: .15rem; accent-color: var(--ube); flex: none; }
.business-register__terms a { color: var(--ube); font-weight: 600; }
.auth-card__switch { text-align: center; margin: 1.25rem 0 0; color: var(--tinta-2); }
.auth-card__switch a { font-weight: 700; }

/* Continuar con Google */
.google-auth__button { display: flex; justify-content: center; min-height: 44px; }
.google-auth__loading { text-align: center; color: var(--tinta-2); margin: .5rem 0 0; font-size: .92rem; }
.auth-divider { display: flex; align-items: center; gap: .75rem; margin: 1.25rem 0; color: var(--tinta-2); font-size: .88rem; }
.auth-divider::before, .auth-divider::after { content: ""; flex: 1; height: 1px; background: currentColor; opacity: .2; }

.field { margin-bottom: 1rem; }
.field__row { display: flex; justify-content: space-between; align-items: baseline; }
.field__label { font-weight: 600; font-size: .92rem; margin-bottom: .35rem; display: inline-block; }
.field__optional { color: var(--tinta-3); font-weight: 400; }
.field__link { font-size: .88rem; font-weight: 600; }
.field__input {
    width: 100%; height: 50px; border-radius: var(--r-input); border: 1.5px solid var(--linea);
    padding: 0 1rem; background: #fff; color: var(--tinta); transition: border-color .15s, box-shadow .15s;
}
.field__input:focus { outline: none; border-color: var(--ube); box-shadow: 0 0 0 4px rgba(91, 44, 131, .12); }
.field__input.is-invalid { border-color: var(--rocoto); }
.field__password { position: relative; }
.field__password .field__input { padding-right: 3rem; }
.field__reveal { position: absolute; right: .35rem; top: 50%; transform: translateY(-50%); border: 0; background: transparent; width: 40px; height: 40px; border-radius: 10px; color: var(--tinta-3); }
.field__reveal:hover { color: var(--ube); }
.field__help { font-size: .82rem; color: var(--tinta-3); margin: .35rem 0 0; }
.field__error { font-size: .85rem; color: var(--rocoto); margin: .35rem 0 0; min-height: 0; }
.field__error:empty { display: none; }

.form-alert { border-radius: 12px; padding: .75rem 1rem; margin-bottom: 1rem; font-size: .95rem; background: var(--rocoto-50); color: #8E211C; }
.form-alert--success { background: var(--albahaca-50); color: #12603F; }
.form-alert--danger { background: var(--rocoto-50); color: #8E211C; }

.btn .spinner-border { width: 1.1rem; height: 1.1rem; border-width: .16em; }

/* ------------------------------------------------------------------ Modal / Offcanvas */
.app-modal { border: 0; border-radius: 24px; }
.app-modal .modal-header, .app-modal .modal-footer { border: 0; }
.location-option {
    width: 100%; display: flex; align-items: center; gap: .9rem; text-align: left;
    border: 1px solid var(--linea); background: #fff; border-radius: 16px; padding: .85rem 1rem; margin-bottom: .6rem;
    color: var(--tinta); transition: border-color .15s, background .15s;
}
.location-option:hover { border-color: var(--ube); background: var(--ube-50); }
.location-option .bi { font-size: 1.3rem; color: var(--ube); }
.location-option span { display: flex; flex-direction: column; }
.location-option small { color: var(--tinta-3); }
.location-option--primary { background: var(--ube-50); border-color: var(--ube-100); }
.location-option.is-loading { opacity: .6; pointer-events: none; }
.location-modal__subtitle { font-size: .9rem; font-weight: 700; color: var(--tinta-3); margin: 1.1rem 0 .6rem; font-family: var(--font-body); }
.location-modal__hint { color: var(--tinta-2); font-size: .92rem; margin: 1rem 0 0; }
.location-error { color: var(--rocoto); font-size: .9rem; }
.app-offcanvas { border: 0; }

/* ------------------------------------------------------------------ Toasts */
.toast-stack {
    position: fixed; z-index: 1090; left: 50%; transform: translateX(-50%);
    bottom: calc(var(--bottom-nav-h) + 16px + env(safe-area-inset-bottom));
    display: flex; flex-direction: column; gap: .5rem; width: min(420px, calc(100vw - 24px)); pointer-events: none;
}
@media (min-width: 992px) { .toast-stack { bottom: 24px; } }
.app-toast {
    pointer-events: auto; display: flex; align-items: center; gap: .7rem;
    background: var(--tinta); color: #fff; padding: .8rem .9rem .8rem 1rem; border-radius: 16px;
    box-shadow: var(--shadow-pop); animation: toast-in .25s var(--ease);
}
.app-toast .bi:first-child { font-size: 1.15rem; }
.app-toast--success .bi:first-child { color: #6EE7B7; }
.app-toast--error .bi:first-child { color: #FCA5A5; }
.app-toast--info .bi:first-child { color: var(--mango); }
.app-toast span { flex: 1; }
.app-toast__close { border: 0; background: transparent; color: rgba(255, 255, 255, .7); padding: .2rem; }
.app-toast.is-leaving { animation: toast-out .2s var(--ease) forwards; }
@keyframes toast-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes toast-out { to { opacity: 0; transform: translateY(10px); } }

/* ------------------------------------------------------------------ Footer */
.site-footer { background: var(--ube-900); color: var(--ube-100); padding: 2.5rem 0 calc(2.5rem + var(--bottom-nav-h)); margin-top: 2rem; }
.site-footer__inner { display: grid; grid-template-columns: 1.4fr 1fr; gap: 1.5rem; align-items: start; }
.site-footer__brand { font-family: var(--font-display); font-weight: 800; font-size: 1.5rem; color: #fff; margin: 0 0 .25rem; }
.site-footer__text { margin: 0; max-width: 40ch; }
.site-footer__links { display: flex; flex-direction: column; gap: .4rem; }
.site-footer__links a { color: #fff; text-decoration: none; }
.site-footer__links a:hover { text-decoration: underline; }
.site-footer__copy { grid-column: 1 / -1; margin: 0; font-size: .85rem; opacity: .7; }

/* ------------------------------------------------------------------ Navegación inferior (móvil) */
.bottom-nav {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 1030;
    display: none; grid-template-columns: repeat(5, 1fr);
    height: calc(var(--bottom-nav-h) + env(safe-area-inset-bottom));
    padding-bottom: env(safe-area-inset-bottom);
    background: #fff; border-top: 1px solid var(--linea);
}
.bottom-nav__item {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .15rem;
    color: var(--tinta-3); text-decoration: none; font-size: .72rem; font-weight: 600;
}
.bottom-nav__item .bi { font-size: 1.3rem; }
.bottom-nav__item.is-active { color: var(--ube); }
.bottom-nav__item.is-disabled { opacity: .45; }

/* ------------------------------------------------------------------ Responsive */
@media (max-width: 991.98px) {
    :root { --header-h: auto; }
    .site-header__inner { grid-template-columns: auto 1fr auto; padding-block: .6rem; gap: .5rem .75rem; }
    .location-pill { order: 2; grid-column: 1 / 3; justify-self: start; max-width: 100%; padding-left: 0; }
    .site-header__actions { grid-row: 1; grid-column: 3; }
    .search-box--header { order: 3; grid-column: 1 / -1; }
    .brand { grid-row: 1; }
    .bottom-nav { display: grid; }
    body { padding-bottom: calc(var(--bottom-nav-h) + env(safe-area-inset-bottom)); }
    .site-footer { padding-bottom: 2.5rem; }

    .hero__inner { grid-template-columns: 1fr; padding-block: 2rem 2.5rem; }
    .hero__art { display: none; }
    .hero-search { grid-template-columns: 1fr auto; }
    .hero-search__location { display: none; }
    .filters__toggles { border-right: 0; padding-right: 0; }
}

@media (max-width: 575.98px) {
    .site-header__inner { grid-template-columns: 1fr auto; }
    .location-pill { grid-column: 1 / -1; }
    .site-header__actions { grid-column: 2; }
    .brand__name { font-size: 1.35rem; }
    .hero__title { font-size: 2.3rem; }
    .hero-search { border-radius: 18px; }
    .hero-search__field input { height: 46px; }
    .hero-search__submit { padding: 0 1.1rem; }
    .card-grid { grid-template-columns: 1fr; }
    .filters { flex-wrap: nowrap; overflow-x: auto; }
    .filters__toggles, .filters__selects { flex-wrap: nowrap; }
    .site-footer__inner { grid-template-columns: 1fr; }
    .auth-card { padding: 1.5rem 1.25rem; border-radius: 22px; }
}

/* ==========================================================================
   Fase 5 — Página del restaurante, menú y modal de producto
   ========================================================================== */

/* ------------------------------------------------------------------ Cabecera del restaurante */
.r-hero { padding-bottom: 1.25rem; }
.r-hero__cover { height: clamp(170px, 26vw, 300px); background: var(--ube-50); overflow: hidden; }
.r-hero__cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.r-hero__card {
    position: relative; margin-top: -64px;
    display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 1.25rem; align-items: start;
    background: #fff; border-radius: 26px; padding: 1.5rem; box-shadow: var(--shadow-pop);
}
.r-hero__logo {
    width: 96px; height: 96px; border-radius: 24px; object-fit: cover; background: #fff;
    border: 4px solid #fff; box-shadow: 0 6px 18px rgba(0, 0, 0, .14); margin-top: -3rem;
}
.r-hero__crumbs { display: flex; align-items: center; gap: .35rem; font-size: .85rem; color: var(--tinta-3); }
.r-hero__crumbs a { color: var(--tinta-2); text-decoration: none; font-weight: 600; }
.r-hero__crumbs a:hover { color: var(--ube); }
.r-hero__crumbs .bi { font-size: .65rem; }
.r-hero__title { font-weight: 800; font-size: clamp(1.7rem, 3.6vw, 2.6rem); line-height: 1.05; letter-spacing: -.03em; margin: .3rem 0 .25rem; }
.r-hero__meta { color: var(--tinta-2); margin: 0 0 .5rem; font-weight: 500; }
.r-hero__desc { color: var(--tinta-2); max-width: 62ch; margin: 0 0 .9rem; }
.r-hero__facts { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: .5rem; }
.r-hero__fact {
    display: inline-flex; align-items: center; gap: .35rem; padding: .35rem .75rem;
    border-radius: var(--r-pill); background: var(--leche); font-size: .9rem; font-weight: 500; color: var(--tinta-2);
}
.r-hero__fact .bi { color: var(--tinta-3); }
.r-hero__fact--rating .bi { color: var(--mango); }
.r-hero__fact--rating strong { color: var(--tinta); }
.r-hero__fact.is-free { background: var(--albahaca-50); color: #12603F; font-weight: 700; }
.r-hero__fact.is-free .bi { color: var(--albahaca); }
.r-hero__side { display: flex; flex-direction: column; align-items: flex-end; gap: .75rem; }
.r-hero__actions { display: flex; gap: .5rem; }

.fav-btn--inline { position: static; box-shadow: none; background: var(--ube-50); width: 44px; height: 44px; }
.fav-btn--inline:hover { background: var(--ube-100); }

.status-pill {
    display: inline-flex; align-items: center; gap: .45rem; font-weight: 700; font-size: .88rem;
    padding: .35rem .8rem; border-radius: var(--r-pill);
}
.status-pill__dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.status-pill.is-open { background: var(--albahaca-50); color: #12603F; }
.status-pill.is-open .status-pill__dot { box-shadow: 0 0 0 4px rgba(30, 158, 106, .18); animation: pulse 2s infinite; }
.status-pill.is-closed { background: var(--rocoto-50); color: #8E211C; }
@keyframes pulse { 50% { box-shadow: 0 0 0 7px rgba(30, 158, 106, 0); } }

.r-notice {
    display: flex; gap: .85rem; align-items: center; margin-top: 1rem;
    background: var(--tinta); color: #fff; border-radius: 18px; padding: .9rem 1.1rem;
}
.r-notice > .bi { font-size: 1.4rem; color: var(--mango); }
.r-notice div { display: flex; flex-direction: column; }
.r-notice span { opacity: .8; font-size: .92rem; }

.r-promos { margin-top: 1rem; padding-bottom: .25rem; }
.r-promo {
    display: flex; align-items: center; gap: .75rem; min-width: 240px; max-width: 320px;
    background: var(--mango-50); border: 1px dashed var(--mango); border-radius: 16px; padding: .7rem .9rem;
}
.r-promo__icon { width: 38px; height: 38px; border-radius: 12px; background: var(--mango); color: var(--ube-900); display: grid; place-items: center; flex-shrink: 0; }
.r-promo div { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.r-promo strong { font-family: var(--font-display); font-weight: 800; color: var(--ube-900); }
.r-promo span { font-size: .85rem; color: var(--tinta-2); }

/* ------------------------------------------------------------------ Navegación del menú (sticky) */
.menu-nav {
    position: sticky; top: var(--header-h); z-index: 1010;
    background: rgba(247, 245, 250, .96); backdrop-filter: blur(8px);
    border-bottom: 1px solid transparent; transition: border-color .2s, box-shadow .2s;
}
.menu-nav.is-stuck { border-color: var(--linea); box-shadow: 0 8px 18px -16px rgba(46, 20, 71, .5); background: rgba(255, 255, 255, .97); }
.menu-nav__inner { display: flex; align-items: center; gap: 1rem; padding-block: .6rem; }
.menu-nav__links { display: flex; gap: .4rem; overflow-x: auto; scrollbar-width: none; flex: 1; min-width: 0; padding: .15rem; }
.menu-nav__links::-webkit-scrollbar { display: none; }
.menu-nav__link {
    flex-shrink: 0; display: inline-flex; align-items: center; gap: .35rem;
    padding: .45rem .9rem; border-radius: var(--r-pill); text-decoration: none;
    color: var(--tinta-2); font-weight: 600; font-size: .92rem; transition: background .15s, color .15s;
}
.menu-nav__link:hover { background: var(--ube-50); color: var(--ube); }
.menu-nav__link.is-active { background: var(--tinta); color: #fff; }
.menu-nav__link[hidden] { display: none; }
.menu-nav__search { width: 260px; flex-shrink: 0; margin: 0; }
.menu-nav__search .search-box__input { height: 42px; background: #fff; }

/* ------------------------------------------------------------------ Menú */
.menu-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 2rem; align-items: start; padding-block: 1.5rem 1rem; }
.menu-section { scroll-margin-top: calc(var(--header-h) + 80px); margin-bottom: 2.25rem; }
.menu-section__title { font-weight: 800; font-size: clamp(1.25rem, 2.2vw, 1.55rem); margin: 0 0 .25rem; }
.menu-section__desc { color: var(--tinta-2); margin: 0 0 .5rem; }
.menu-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(340px, 100%), 1fr)); gap: 1rem; margin-top: .9rem; }

.p-card {
    position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 1rem;
    background: #fff; border-radius: var(--r-card); padding: 1rem; box-shadow: var(--shadow-soft);
    cursor: pointer; scroll-margin-top: calc(var(--header-h) + 90px);
    transition: transform .2s var(--ease), box-shadow .2s var(--ease);
}
.p-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-pop); }
.p-card:focus-within { box-shadow: 0 0 0 3px var(--mango), var(--shadow-pop); }
.p-card[hidden] { display: none; }
.p-card__body { display: flex; flex-direction: column; gap: .3rem; min-width: 0; }
.p-card__name { font-family: var(--font-body); font-size: 1.02rem; font-weight: 700; margin: 0; line-height: 1.25; }
.p-card__hit { all: unset; cursor: pointer; }
.p-card__hit:focus-visible { outline: none; }
.p-card__desc {
    color: var(--tinta-2); font-size: .88rem; margin: 0;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.p-card__price { display: flex; flex-wrap: wrap; align-items: center; gap: .45rem; margin-top: auto; padding-top: .35rem; }
.p-card__price strong { font-family: var(--font-display); font-size: 1.08rem; color: var(--tinta); }
.p-card__price small { font-family: var(--font-body); font-size: .75rem; color: var(--tinta-3); font-weight: 600; margin-right: .2rem; }
.p-card__price s { color: var(--tinta-3); font-size: .88rem; }
.p-card__flag { align-self: flex-start; font-size: .75rem; font-weight: 700; color: var(--ube); display: inline-flex; gap: .25rem; align-items: center; }
.p-card__flag--out { color: var(--rocoto); }
.p-card__media { position: relative; width: 132px; height: 132px; flex-shrink: 0; }
.p-card__media img { width: 100%; height: 100%; object-fit: cover; border-radius: 16px; background: var(--ube-50); }
.p-card__add {
    position: absolute; right: -6px; bottom: -6px; width: 40px; height: 40px; border-radius: 50%;
    background: var(--ube); color: #fff; display: grid; place-items: center; font-size: 1.15rem;
    border: 3px solid #fff; box-shadow: 0 6px 14px -4px rgba(46, 20, 71, .5);
    transition: transform .15s var(--ease), background .15s;
}
.p-card:hover .p-card__add { transform: scale(1.08); background: var(--ube-700); }
.p-card.is-soldout { cursor: default; }
.p-card.is-soldout:hover { transform: none; box-shadow: var(--shadow-soft); }
.p-card.is-soldout .p-card__media img { filter: grayscale(1); opacity: .6; }
.p-card.is-soldout .p-card__name, .p-card.is-soldout .p-card__price { opacity: .6; }

/* Columna lateral */
.menu-aside { position: sticky; top: calc(var(--header-h) + 76px); display: flex; flex-direction: column; gap: 1rem; }
.aside-card { background: #fff; border-radius: var(--r-card); padding: 1.25rem; box-shadow: var(--shadow-soft); }
.aside-card__title { font-size: 1.1rem; font-weight: 800; margin: 0 0 .9rem; }
.aside-card__empty { text-align: center; color: var(--tinta-2); font-size: .92rem; }
.aside-card__empty img { margin-bottom: .5rem; opacity: .9; }
.aside-card__empty p { margin: 0; }
.info-list { list-style: none; padding: 0; margin: 0 0 .5rem; display: flex; flex-direction: column; gap: .8rem; }
.info-list li { display: flex; gap: .75rem; align-items: flex-start; }
.info-list .bi { color: var(--ube); font-size: 1.1rem; margin-top: .1rem; }
.info-list span { display: flex; flex-direction: column; line-height: 1.3; }
.info-list small { color: var(--tinta-3); font-size: .78rem; font-weight: 600; }

/* Horario */
.schedule-table { width: 100%; border-collapse: collapse; }
.schedule-table th, .schedule-table td { padding: .55rem .25rem; border-bottom: 1px solid var(--linea); }
.schedule-table th { font-weight: 600; }
.schedule-table td { text-align: right; color: var(--tinta-2); }
.schedule-table tr.is-today th, .schedule-table tr.is-today td { color: var(--ube); font-weight: 700; }
.schedule-table .badge-tag { margin-left: .35rem; }

/* ------------------------------------------------------------------ Reseñas */
.reviews { padding-block: 1rem 2.5rem; }
.reviews__head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: .5rem 1rem; margin-bottom: 1rem; }
.reviews__score { margin: 0; display: inline-flex; align-items: center; gap: .4rem; color: var(--tinta-2); }
.reviews__score .bi { color: var(--mango); }
.reviews__score strong { font-family: var(--font-display); font-size: 1.3rem; color: var(--tinta); }
.reviews__empty { background: #fff; border-radius: var(--r-card); padding: 1.25rem; color: var(--tinta-2); box-shadow: var(--shadow-soft); margin: 0; }
.reviews__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(320px, 100%), 1fr)); gap: 1rem; }
.review { background: #fff; border-radius: var(--r-card); padding: 1.1rem; box-shadow: var(--shadow-soft); }
.review__head { display: flex; align-items: center; gap: .75rem; }
.review__head img { border-radius: 50%; }
.review__head div { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.review__head time { color: var(--tinta-3); font-size: .82rem; white-space: nowrap; }
.review__stars { color: var(--mango); font-size: .8rem; letter-spacing: .05em; }
.review__comment { margin: .75rem 0 0; color: var(--tinta-2); }
.review__reply { margin: .75rem 0 0; padding: .7rem .85rem; background: var(--ube-50); border-radius: 12px; font-size: .9rem; }

/* ------------------------------------------------------------------ Modal de producto */
.product-modal .modal-content { overflow: hidden; }
.product-modal__close {
    position: absolute; right: .9rem; top: .9rem; z-index: 5; width: 40px; height: 40px; border-radius: 50%;
    background-color: rgba(255, 255, 255, .95); background-size: .8rem; opacity: 1; box-shadow: 0 4px 12px rgba(0, 0, 0, .15);
}
.product-modal__media { aspect-ratio: 16 / 8; background: var(--ube-50); }
.product-modal__media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.product-modal__sk-img { display: block; aspect-ratio: 16 / 8; border-radius: 0; }
.product-modal__content { padding: 1.4rem 1.5rem .5rem; }
.product-modal__name { font-weight: 800; font-size: 1.6rem; margin: 0 0 .35rem; line-height: 1.1; }
.product-modal__desc { color: var(--tinta-2); margin: 0 0 .6rem; }
.product-modal__price { display: flex; align-items: center; gap: .5rem; margin: 0 0 1rem; }
.product-modal__price strong { font-family: var(--font-display); font-size: 1.3rem; color: var(--ube); }
.product-modal__price s { color: var(--tinta-3); }
.product-modal__closed { background: var(--rocoto-50); color: #8E211C; border-radius: 12px; padding: .65rem .85rem; font-weight: 600; }
.product-modal__notes { height: auto; padding: .7rem 1rem; resize: vertical; min-height: 70px; }

.opt-group { border: 0; padding: 0; margin: 0 0 1.25rem; min-width: 0; }
.opt-group__head {
    width: 100%; display: flex; justify-content: space-between; align-items: center; gap: .5rem;
    background: var(--leche); border-radius: 12px; padding: .6rem .85rem; margin-bottom: .35rem; float: none;
}
.opt-group__name { font-family: var(--font-display); font-weight: 700; font-size: 1.02rem; }
.opt-group__rule { font-size: .78rem; font-weight: 700; color: var(--tinta-3); white-space: nowrap; }
.opt-group__rule.is-required { background: var(--tinta); color: #fff; padding: .15rem .5rem; border-radius: 8px; }
.opt-group.has-error .opt-group__head { background: var(--rocoto-50); }
.opt-group.has-error .opt-group__rule.is-required { background: var(--rocoto); }
.opt-group__error { color: var(--rocoto); font-size: .88rem; font-weight: 600; margin: .25rem .25rem .4rem; }
.opt-group__error:empty { display: none; }

.opt {
    display: flex; align-items: center; gap: .75rem; padding: .7rem .85rem; border-radius: 12px; cursor: pointer;
    border-bottom: 1px solid var(--linea); transition: background .15s;
}
.opt:last-child { border-bottom: 0; }
.opt:hover { background: var(--ube-50); }
.opt input { width: 20px; height: 20px; accent-color: var(--ube); flex-shrink: 0; margin: 0; }
.opt__name { flex: 1; }
.opt__name small { color: var(--tinta-3); }
.opt__price { color: var(--tinta-2); font-weight: 600; font-size: .92rem; white-space: nowrap; }
.opt__price s { color: var(--tinta-3); font-weight: 400; }
.opt.is-disabled, .opt:has(input:disabled) { cursor: not-allowed; opacity: .55; }
.opt.is-disabled:hover, .opt:has(input:disabled):hover { background: transparent; }

.product-modal__footer { display: flex; flex-wrap: nowrap; gap: .75rem; padding: .9rem 1.25rem; border-top: 1px solid var(--linea) !important; background: #fff; }
.product-modal__footer[hidden] { display: none; }
.product-modal__add { flex: 1; justify-content: space-between; padding: .85rem 1.2rem; font-size: 1.02rem; margin: 0; }
.product-modal__add strong { font-family: var(--font-display); transition: opacity .15s; }
.product-modal__add.is-quoting strong { opacity: .55; }

.qty { display: inline-flex; align-items: center; gap: .25rem; background: var(--leche); border-radius: var(--r-pill); padding: .25rem; margin: 0; }
.qty__btn { width: 40px; height: 40px; border-radius: 50%; border: 0; background: #fff; color: var(--ube); display: grid; place-items: center; box-shadow: var(--shadow-soft); }
.qty__btn:disabled { color: var(--tinta-3); box-shadow: none; background: transparent; }
.qty__value { min-width: 2ch; text-align: center; font-weight: 800; font-family: var(--font-display); font-size: 1.1rem; }

/* ------------------------------------------------------------------ Responsive (fase 5) */
@media (max-width: 1199.98px) {
    .menu-layout { grid-template-columns: minmax(0, 1fr); }
    .menu-aside { display: none; }
}

@media (max-width: 991.98px) {
    /* En móvil la cabecera tiene alto variable: en la página del restaurante la barra del menú ocupa el tope. */
    .page-restaurant .site-header { position: relative; }
    .menu-nav { top: 0; }
    .menu-section, .p-card { scroll-margin-top: 120px; }
    .menu-aside { top: 0; }
    .menu-nav__search { width: 180px; }
}

@media (max-width: 767.98px) {
    .r-hero__card { grid-template-columns: auto minmax(0, 1fr); padding: 1.1rem; margin-top: -48px; gap: .75rem 1rem; }
    .r-hero__logo { width: 76px; height: 76px; border-radius: 20px; margin-top: -2.5rem; }
    .r-hero__main { grid-column: 1 / -1; grid-row: 2; }
    /* En celular los botones (favorito, compartir, carta, WhatsApp, info) no caben junto al logo:
       van en su propia fila debajo de los datos, con el estado a la izquierda. */
    .r-hero__side { grid-column: 1 / -1; grid-row: 3; flex-direction: row; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .6rem; padding-top: .85rem; border-top: 1px solid var(--linea); }
    .r-hero__actions { flex-wrap: wrap; gap: .4rem; }
    .menu-nav__inner { flex-direction: column-reverse; align-items: stretch; gap: .5rem; }
    .menu-nav__search { width: 100%; }
}

@media (max-width: 575.98px) {
    .p-card { padding: .85rem; gap: .75rem; }
    .p-card__media { width: 104px; height: 104px; }
    .product-modal__content { padding: 1.1rem 1.1rem .25rem; }
    .product-modal__name { font-size: 1.4rem; }
    .product-modal .modal-content { border-radius: 0; }
    .product-modal__footer { padding-bottom: calc(.9rem + env(safe-area-inset-bottom)); }
}

/* ==========================================================================
   Fase 6 — Carrito
   ========================================================================== */

/* Contador de la cabecera */
.cart-btn { position: relative; }
.cart-btn__count {
    position: absolute; top: -4px; right: -4px; min-width: 20px; height: 20px; padding: 0 5px;
    border-radius: var(--r-pill); background: var(--mango); color: var(--ube-900);
    font-size: .72rem; font-weight: 800; line-height: 20px; text-align: center;
    box-shadow: 0 0 0 2px #fff;
}
.cart-btn__count[hidden] { display: none; }
.is-bump { animation: bump .35s var(--ease); }

/* Contenedores */
.cart-offcanvas { width: min(420px, 100vw) !important; }
.cart-offcanvas .offcanvas-body { display: flex; flex-direction: column; gap: 1rem; padding-top: .25rem; }
.cart-offcanvas__restaurant { margin: .15rem 0 0; color: var(--tinta-3); font-size: .9rem; }
[data-cart-panel].is-busy { opacity: .65; pointer-events: none; transition: opacity .15s; }
.cart-skeleton { display: grid; gap: .35rem; }
.cart-error { color: var(--rocoto); }
.cart-empty { padding-top: 1.5rem; }

/* Líneas */
.cart-lines { list-style: none; margin: 0; padding: 0; display: grid; gap: .25rem; }
.cart-line { display: flex; gap: .85rem; padding: .85rem 0; border-bottom: 1px solid var(--linea); }
.cart-line:last-child { border-bottom: 0; }
.cart-line__img { width: 72px; height: 72px; border-radius: 14px; object-fit: cover; background: var(--ube-50); flex-shrink: 0; }
.cart-line__body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: .15rem; }
.cart-line__name { margin: 0; font-weight: 700; line-height: 1.25; }
.cart-line__name a { color: var(--tinta); text-decoration: none; }
.cart-line__name a:hover { color: var(--ube); }
.cart-line__summary, .cart-line__notes { margin: 0; color: var(--tinta-3); font-size: .86rem; }
.cart-line__error { margin: .2rem 0 0; color: var(--rocoto); font-size: .86rem; font-weight: 600; }
.cart-line__row { display: flex; align-items: center; justify-content: space-between; gap: .75rem; margin-top: .45rem; }
.cart-line__total { font-family: var(--font-display); font-weight: 800; }
.cart-line.is-unavailable .cart-line__img, .cart-line.is-unavailable .cart-line__name { opacity: .55; }
.cart-line--compact { padding: .65rem 0; }

.qty--sm { padding: .15rem; }
.qty--sm .qty__btn { width: 32px; height: 32px; font-size: .85rem; }
.qty--sm .qty__value { font-size: .98rem; min-width: 2.2ch; }

/* Cupón */
.cart-section { border-top: 1px solid var(--linea); padding-top: 1rem; }
.cart-coupon-form { display: grid; grid-template-columns: 1fr auto; gap: .5rem; }
.cart-coupon-form .field__input { height: 44px; text-transform: uppercase; }
.cart-coupon-form .field__input::placeholder { text-transform: none; }
.cart-coupon-form .field__error { grid-column: 1 / -1; margin: 0; }
.cart-coupon { display: flex; align-items: center; gap: .75rem; padding: .7rem .85rem; border-radius: 14px; border: 1.5px dashed var(--ube-100); background: var(--ube-50); }
.cart-coupon > .bi { font-size: 1.3rem; color: var(--ube); }
.cart-coupon.is-pending { border-color: var(--mango); background: var(--mango-50); }
.cart-coupon.is-pending > .bi { color: #B7791F; }
.cart-coupon__text { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.3; }
.cart-coupon__text strong { font-family: var(--font-display); letter-spacing: .04em; }
.cart-coupon__text span { font-size: .86rem; color: var(--tinta-2); }

/* Totales y avisos */
.cart-totals { display: grid; gap: .45rem; }
.cart-totals__row { display: flex; justify-content: space-between; gap: 1rem; color: var(--tinta-2); font-size: .95rem; }
.cart-totals__row s { color: var(--tinta-3); margin-right: .25rem; }
.cart-totals__row.is-discount, .cart-totals__row.is-free span:last-child { color: var(--albahaca); font-weight: 600; }
.cart-totals__row--total { color: var(--tinta); font-size: 1.15rem; font-weight: 800; font-family: var(--font-display); padding-top: .55rem; margin-top: .2rem; border-top: 1px solid var(--linea); }
.cart-hint { margin: .75rem 0 0; font-size: .88rem; color: var(--tinta-2); display: flex; gap: .45rem; align-items: flex-start; }
.cart-hint--progress { color: var(--ube); font-weight: 600; }
.cart-hint--warning { background: var(--mango-50); color: #7A4B00; border-radius: 12px; padding: .55rem .75rem; }

.cart-checkout { justify-content: space-between; margin-top: 1rem; }
.cart-checkout:disabled { background: var(--tinta-3); }
.cart-footer { margin-top: auto; position: sticky; bottom: 0; background: #fff; padding: .5rem 0 .25rem; }
.cart-footer__links { display: flex; justify-content: space-between; align-items: center; margin-top: .75rem; font-size: .9rem; }
.btn-link-quiet { border: 0; background: none; padding: 0; color: var(--tinta-3); font-size: .9rem; text-decoration: underline; }
.btn-link-quiet:hover { color: var(--rocoto); }
.cart-aside__link { display: block; text-align: center; margin-top: .75rem; font-weight: 600; font-size: .92rem; }

/* Página /carrito */
.cart-page { padding-block: 2rem 3rem; }
.cart-page__head { margin-bottom: 1.25rem; }
.cart-page__grid { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 1.5rem; align-items: start; }
.cart-card { background: #fff; border-radius: var(--r-card); padding: 1.25rem 1.35rem; box-shadow: var(--shadow-soft); }
.cart-card--summary { position: sticky; top: calc(var(--header-h) + 16px); }
.cart-card__restaurant { display: flex; align-items: center; gap: .75rem; padding-bottom: .75rem; border-bottom: 1px solid var(--linea); }
.cart-card__restaurant img { border-radius: 12px; }
.cart-card__restaurant div { flex: 1; display: flex; flex-direction: column; line-height: 1.3; }
.cart-card__restaurant span { color: var(--tinta-3); font-size: .88rem; }
.cart-card > .btn-link-quiet { margin-top: .75rem; }

/* Barra flotante (móvil) */
.cart-bar {
    position: fixed; z-index: 1025; left: 12px; right: 12px;
    bottom: calc(var(--bottom-nav-h) + env(safe-area-inset-bottom) + 10px);
    display: none; align-items: center; gap: .75rem;
    padding: .8rem 1rem; border-radius: 18px;
    background: var(--ube); color: #fff; text-decoration: none; font-weight: 700;
    box-shadow: 0 14px 30px -12px rgba(46, 20, 71, .6);
}
.cart-bar:hover { color: #fff; background: var(--ube-700); }
.cart-bar__count { min-width: 28px; height: 28px; border-radius: 9px; background: var(--mango); color: var(--ube-900); display: grid; place-items: center; font-size: .85rem; }
.cart-bar__label { flex: 1; }
.cart-bar__total { font-family: var(--font-display); }

/* Diálogo de confirmación */
.confirm-modal .modal-body { padding: 1.5rem; }
.confirm-modal__title { font-weight: 800; margin-bottom: .5rem; }
.confirm-modal__text { color: var(--tinta-2); margin-bottom: 1.25rem; }
.confirm-modal__actions { display: flex; justify-content: flex-end; gap: .5rem; flex-wrap: wrap; }
.btn-danger { background: var(--rocoto); border: 0; color: #fff; }
.btn-danger:hover { background: #B92F2A; color: #fff; }

@media (max-width: 991.98px) {
    .cart-bar:not([hidden]) { display: flex; }
    body.has-cart-bar { padding-bottom: calc(var(--bottom-nav-h) + env(safe-area-inset-bottom) + 76px); }
    body.has-cart-bar .toast-stack { bottom: calc(var(--bottom-nav-h) + env(safe-area-inset-bottom) + 84px); }
    .cart-page__grid { grid-template-columns: minmax(0, 1fr); }
    .cart-card--summary { position: static; }
}

@media (max-width: 575.98px) {
    .cart-line__img { width: 60px; height: 60px; }
    .cart-card { padding: 1rem; }
}
.cart-lines + .cart-totals { margin-top: .5rem; padding-top: .85rem; border-top: 1px solid var(--linea); }
.cart-card--summary .cart-section { border-top: 0; padding-top: 0; padding-bottom: 1rem; margin-bottom: 1rem; border-bottom: 1px solid var(--linea); }

/* ==========================================================================
   Checkout (fase 7)
   ========================================================================== */
.checkout-page { padding-block: 1.5rem 3rem; }
.checkout-head { margin-bottom: 1.25rem; }
.checkout-head__back { display: inline-flex; align-items: center; gap: .35rem; font-weight: 600; font-size: .92rem; text-decoration: none; margin-bottom: .5rem; }
.checkout-grid { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 1.5rem; align-items: start; }
.checkout-steps { display: grid; gap: 1rem; min-width: 0; }

.checkout-step { background: #fff; border-radius: var(--r-card); padding: 1.25rem 1.35rem; box-shadow: var(--shadow-soft); }
.checkout-step__head { display: flex; align-items: center; gap: .7rem; margin-bottom: 1rem; }
.checkout-step__num {
    width: 30px; height: 30px; border-radius: 10px; flex-shrink: 0;
    display: grid; place-items: center; background: var(--ube); color: #fff;
    font-family: var(--font-display); font-weight: 800;
}
.checkout-step__title { font-size: 1.15rem; font-weight: 800; margin: 0; }

/* Tarjetas de opción (dirección, método de pago) */
.option-list { display: grid; gap: .6rem; }
.option-list--grid { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.option-card {
    position: relative; display: flex; align-items: flex-start; gap: .75rem;
    padding: .85rem 2.6rem .85rem .9rem; border: 2px solid var(--linea); border-radius: 16px;
    background: #fff; cursor: pointer; transition: border-color .15s, background .15s, box-shadow .15s;
}
.option-card:hover { border-color: var(--ube-100); }
.option-card input { position: absolute; opacity: 0; pointer-events: none; }
.option-card:has(input:checked) { border-color: var(--ube); background: var(--ube-50); }
.option-card:has(input:focus-visible) { outline: 3px solid var(--mango); outline-offset: 2px; }
.option-card__icon {
    width: 38px; height: 38px; border-radius: 12px; flex-shrink: 0;
    display: grid; place-items: center; background: var(--leche); color: var(--ube); font-size: 1.1rem;
}
.option-card:has(input:checked) .option-card__icon { background: #fff; }
.option-card__body { display: flex; flex-direction: column; line-height: 1.35; min-width: 0; }
.option-card__body span { color: var(--tinta-2); font-size: .92rem; overflow-wrap: anywhere; }
.option-card__body small { color: var(--tinta-3); font-size: .82rem; }
.option-card__check { position: absolute; right: .85rem; top: .85rem; color: var(--ube); font-size: 1.1rem; opacity: 0; transform: scale(.6); transition: opacity .15s, transform .2s var(--ease); }
.option-card:has(input:checked) .option-card__check { opacity: 1; transform: scale(1); }
.option-card.is-new { animation: option-in .35s var(--ease); }
@keyframes option-in { from { opacity: 0; transform: translateY(-6px); } }

.checkout-add { margin-top: .6rem; padding-inline: .5rem; color: var(--ube); }
.checkout-add.btn-brand { color: #fff; padding-inline: 1rem; } /* sin direcciones: botón principal */
.address-form { margin-top: 1rem; padding: 1rem; border-radius: 16px; background: var(--leche); }
.address-form__intro { margin: 0 0 1rem; color: var(--tinta-2); }
.address-form fieldset { border: 0; padding: 0; min-width: 0; }
.address-form .field__input { background: #fff; }
.address-form__geo { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem .75rem; margin-bottom: 1rem; }
.address-form__geo .field__help { margin: 0; }
.address-form__actions { display: flex; justify-content: flex-end; gap: .5rem; }
.chip-row { display: flex; flex-wrap: wrap; gap: .5rem; }
.field-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 1rem; }
textarea.field__input { resize: vertical; min-height: 48px; }

.checkout-delivery { display: flex; flex-wrap: wrap; gap: .4rem 1.1rem; margin: .9rem 0 0; font-size: .92rem; font-weight: 600; color: var(--ube); }
.checkout-delivery span { display: inline-flex; align-items: center; gap: .35rem; }
.checkout-delivery__muted { color: var(--tinta-3); font-weight: 400; }

/* Delivery o recojo en tienda */
.fulfillment-options { margin-bottom: 1rem; }
.checkout-step__subtitle { font-size: 1rem; font-weight: 700; margin: 0 0 .6rem; }
.checkout-pickup { display: flex; gap: .85rem; align-items: flex-start; padding: 1rem; border-radius: 16px; background: var(--ube-50); border: 1.5px solid var(--ube-100); }
.checkout-pickup__icon { flex: none; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: #fff; color: var(--ube); font-size: 1.15rem; }
.checkout-pickup > div { display: flex; flex-direction: column; gap: .2rem; min-width: 0; }
.checkout-pickup span, .checkout-pickup small { color: var(--tinta-2); overflow-wrap: anywhere; }
.checkout-pickup__map { font-weight: 700; font-size: .9rem; margin-top: .25rem; }
.fulfillment-badge { display: inline-flex; align-items: center; gap: .3rem; padding: .15rem .55rem; border-radius: 999px; font-size: .78rem; font-weight: 700; background: var(--ube-50); color: var(--ube); }
.fulfillment-badge--pickup { background: var(--mango-100, #fff1cc); color: var(--ube-900, #3a1a55); }

.cash-change { margin-top: 1rem; padding: 1rem; border-radius: 16px; background: var(--mango-50); }
.cash-change__row { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; }
.money-input { position: relative; flex: 0 1 200px; }
.money-input span { position: absolute; left: .9rem; top: 50%; transform: translateY(-50%); color: var(--tinta-3); font-weight: 600; }
.money-input .field__input { padding-left: 2.4rem; background: #fff; font-weight: 600; }
.checkout-note { display: flex; gap: .45rem; align-items: flex-start; margin: 1rem 0 0; font-size: .88rem; color: var(--tinta-3); }

.checkout-items { list-style: none; margin: .5rem 0 1rem; padding: 0; }
.checkout-item { display: flex; gap: .75rem; padding: .7rem 0; border-bottom: 1px dashed var(--linea); }
.checkout-item:last-child { border-bottom: 0; }
.checkout-item.is-unavailable { opacity: .6; }
.checkout-item__qty { font-family: var(--font-display); font-weight: 800; color: var(--ube); min-width: 2ch; }
.checkout-item__body { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.35; }
.checkout-item__body small { color: var(--tinta-3); font-size: .84rem; }
.checkout-item__total { font-weight: 700; white-space: nowrap; }

.checkout-summary [data-checkout-blockers].has-items { margin-bottom: 1rem; }
.checkout-summary [data-checkout-totals] { margin-bottom: 1rem; }
.checkout-legal { margin: .75rem 0 0; font-size: .8rem; color: var(--tinta-3); text-align: center; }
[data-checkout-submit].is-loading { opacity: .85; }

.checkout-bar { display: none; }

/* Confirmación */
.order-done { padding-block: 2rem 3rem; }
.order-done__grid { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 1.5rem; align-items: start; }
.order-ticket {
    position: relative; background: #fff; border-radius: var(--r-card); box-shadow: var(--shadow-soft);
    padding: 2rem 1.75rem 1.75rem; overflow: hidden;
}
.order-ticket::before { content: ""; position: absolute; inset: 0 0 auto; height: 6px; background: repeating-linear-gradient(90deg, var(--ube) 0 18px, var(--mango) 18px 36px); }
.order-ticket__head { text-align: center; margin-bottom: 1.5rem; }
.order-ticket__check {
    width: 64px; height: 64px; margin: 0 auto 1rem; border-radius: 50%;
    display: grid; place-items: center; background: var(--albahaca); color: #fff; font-size: 2rem;
    animation: check-pop .5s var(--ease) both;
}
@keyframes check-pop { from { transform: scale(.4); opacity: 0; } 70% { transform: scale(1.1); } }
.order-ticket__title { font-size: clamp(1.6rem, 3vw, 2.1rem); font-weight: 800; margin: 0 0 .35rem; }
.order-ticket__lead { color: var(--tinta-2); margin: 0 0 .75rem; }
.order-ticket__code { display: inline-block; margin: 0; padding: .35rem .85rem; border-radius: var(--r-pill); background: var(--leche); font-size: .92rem; }
.order-ticket__code strong { font-family: var(--font-display); letter-spacing: .04em; }

.order-steps { list-style: none; display: grid; grid-template-columns: repeat(5, 1fr); gap: .25rem; margin: 0 0 1.5rem; padding: 0; }
.order-steps__item { position: relative; display: flex; flex-direction: column; align-items: center; gap: .45rem; text-align: center; font-size: .8rem; color: var(--tinta-3); }
.order-steps__item::before { content: ""; position: absolute; top: 8px; right: 50%; width: 100%; height: 3px; background: var(--linea); z-index: 0; }
.order-steps__item:first-child::before { display: none; }
.order-steps__item.is-done::before, .order-steps__item.is-current::before { background: var(--ube); }
.order-steps__dot { position: relative; z-index: 1; width: 19px; height: 19px; border-radius: 50%; background: #fff; border: 3px solid var(--linea); }
.order-steps__item.is-done .order-steps__dot { background: var(--ube); border-color: var(--ube); }
.order-steps__item.is-current { color: var(--ube); font-weight: 700; }
.order-steps__item.is-current .order-steps__dot { border-color: var(--ube); box-shadow: 0 0 0 5px var(--ube-100); animation: dot-pulse 1.8s ease-in-out infinite; }
@keyframes dot-pulse { 50% { box-shadow: 0 0 0 8px rgba(91, 44, 131, .08); } }

.order-facts { display: grid; gap: .9rem; margin: 0 0 1.5rem; padding: 1rem 1.1rem; border-radius: 16px; background: var(--leche); }
.order-facts dt { font-size: .82rem; color: var(--tinta-3); font-weight: 600; display: flex; gap: .4rem; align-items: center; }
.order-facts dd { margin: .15rem 0 0; font-weight: 600; }
.order-facts dd small { display: block; font-weight: 400; color: var(--tinta-2); }
.order-done__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: .5rem; }
.order-done__summary .checkout-items { margin-top: .75rem; }

@media (max-width: 991.98px) {
    .checkout-grid, .order-done__grid { grid-template-columns: minmax(0, 1fr); }
    .checkout-summary { position: static; }
    .checkout-summary [data-checkout-submit] { display: none; }
    .checkout-bar {
        position: fixed; z-index: 1025; left: 0; right: 0;
        bottom: calc(var(--bottom-nav-h) + env(safe-area-inset-bottom));
        display: flex; align-items: center; gap: 1rem; padding: .75rem 16px;
        background: #fff; border-top: 1px solid var(--linea); box-shadow: 0 -10px 30px -18px rgba(46, 20, 71, .45);
    }
    .checkout-bar__total { flex: 1; display: flex; flex-direction: column; line-height: 1.2; }
    .checkout-bar__total span { font-size: .8rem; color: var(--tinta-3); }
    .checkout-bar__total strong { font-family: var(--font-display); font-size: 1.2rem; }
    .checkout-bar .btn { padding: .75rem 1.25rem; }
    body.page-checkout { padding-bottom: calc(var(--bottom-nav-h) + env(safe-area-inset-bottom) + 80px); }
    body.page-checkout .toast-stack { bottom: calc(var(--bottom-nav-h) + env(safe-area-inset-bottom) + 88px); }
}

@media (max-width: 575.98px) {
    .checkout-step, .order-ticket { padding: 1rem; }
    .field-grid { grid-template-columns: minmax(0, 1fr); }
    .order-steps__item span:last-child { font-size: .7rem; }
}

/* ==========================================================================
   Pedidos y Mi cuenta (fase 8)
   ========================================================================== */
/* Estado del pedido */
.order-badge {
    display: inline-flex; align-items: center; gap: .4rem; white-space: nowrap;
    padding: .2rem .65rem; border-radius: var(--r-pill); font-size: .8rem; font-weight: 700;
    background: var(--ube-50); color: var(--ube);
}
.order-badge--warning { background: var(--mango-50); color: #7A4B00; }
.order-badge--info { background: #E6F0FB; color: #1D5A9E; }
.order-badge--success { background: var(--albahaca-50); color: #12603F; }
.order-badge--danger { background: var(--rocoto-50); color: #8E211C; }
.order-badge__dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; animation: live-dot 1.6s ease-in-out infinite; }
@keyframes live-dot { 50% { opacity: .35; } }

/* Seguimiento */
.order-page { padding-block: 1.5rem 3rem; }
.order-main { display: grid; gap: 1rem; min-width: 0; }
.order-status-hero { display: flex; gap: 1rem; align-items: flex-start; margin-bottom: 1rem; }
.order-status-hero img { border-radius: 14px; flex-shrink: 0; }
.order-status-hero__restaurant { margin: 0; font-size: .88rem; color: var(--tinta-3); }
.order-status-hero__title { font-size: clamp(1.5rem, 3vw, 2rem); font-weight: 800; margin: .1rem 0 .2rem; }
.order-status-hero__text { margin: 0; color: var(--tinta-2); }
.order-eta { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; margin: 0 0 1.25rem; padding: .65rem .9rem; border-radius: 14px; background: var(--ube-50); color: var(--ube); }
.order-eta strong { font-family: var(--font-display); font-size: 1.15rem; }
.order-eta span { color: var(--tinta-2); font-size: .9rem; }

.order-timeline { list-style: none; margin: 0 0 1.25rem; padding: 0; }
.order-timeline__item { position: relative; display: flex; align-items: center; gap: .85rem; padding: .45rem 0; color: var(--tinta-3); }
.order-timeline__item:not(:last-child)::after { content: ""; position: absolute; left: 12px; top: calc(.45rem + 26px); bottom: -.45rem; width: 2px; background: var(--linea); }
.order-timeline__item.is-done:not(:last-child)::after { background: var(--ube); }
.order-timeline__dot {
    position: relative; z-index: 1; width: 26px; height: 26px; border-radius: 50%; flex-shrink: 0;
    display: grid; place-items: center; background: #fff; border: 2px solid var(--linea); color: #fff; font-size: .9rem;
}
.order-timeline__item.is-done { color: var(--tinta); }
.order-timeline__item.is-done .order-timeline__dot { background: var(--ube); border-color: var(--ube); }
.order-timeline__item.is-current { color: var(--ube); font-weight: 700; }
.order-timeline__item.is-current .order-timeline__dot { border-color: var(--ube); box-shadow: 0 0 0 5px var(--ube-100); animation: dot-pulse 1.8s ease-in-out infinite; }
.order-timeline__item.is-current .order-timeline__dot::after { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--ube); }
.order-timeline__label { flex: 1; }
.order-timeline__time { font-size: .85rem; color: var(--tinta-3); font-weight: 500; font-variant-numeric: tabular-nums; }

.order-cancelled { display: flex; gap: .75rem; margin-bottom: 1.25rem; padding: .9rem 1rem; border-radius: 14px; background: var(--rocoto-50); color: #8E211C; }
.order-cancelled .bi { font-size: 1.3rem; }
.order-cancelled div { display: flex; flex-direction: column; gap: .15rem; }
.order-cancelled span { color: var(--tinta-2); font-size: .92rem; }

.driver-card { display: flex; align-items: center; gap: .85rem; margin-bottom: 1.25rem; padding: .85rem 1rem; border: 1px solid var(--linea); border-radius: 16px; }
.driver-card img { border-radius: 50%; }
.driver-card__body { flex: 1; display: flex; flex-direction: column; line-height: 1.35; }
.driver-card__body span { color: var(--tinta-2); font-size: .88rem; }
.driver-card__body .bi-star-fill { color: var(--mango); }

.order-actions { display: flex; flex-wrap: wrap; gap: .5rem; }
.order-actions__danger { color: var(--rocoto); }
.order-actions__danger:hover { background: var(--rocoto-50); color: var(--rocoto); }
.order-live { display: flex; align-items: center; gap: .45rem; margin: 1rem 0 0; font-size: .82rem; color: var(--tinta-3); }
.order-live .order-badge__dot { color: var(--albahaca); }
.order-detail__date { margin: -.5rem 0 .25rem; font-size: .88rem; color: var(--tinta-3); }
.order-facts--compact { margin: 1rem 0 0; }

/* Calificar */
.rate-card .checkout-step__title { margin-bottom: .75rem; }
.rate-form { display: grid; gap: .5rem; justify-items: start; }
.rate-form textarea { width: 100%; }
.star-input { display: inline-flex; flex-direction: row-reverse; gap: .2rem; border: 0; padding: 0; margin: 0; }
.star-input input { position: absolute; opacity: 0; pointer-events: none; }
.star-input label { font-size: 2rem; line-height: 1; color: var(--linea); cursor: pointer; transition: color .12s, transform .12s; }
.star-input label:hover, .star-input label:hover ~ label,
.star-input input:checked ~ label { color: var(--mango); }
.star-input label:hover { transform: scale(1.12); }
.star-input input:focus-visible + label { outline: 3px solid var(--ube); outline-offset: 2px; border-radius: 6px; }
.rate-card__done { margin: 0; color: var(--tinta-2); }
.rate-card__reply { margin: .6rem 0 0; padding: .6rem .8rem; border-radius: 12px; background: var(--leche); font-size: .92rem; }
.stars { color: var(--mango); letter-spacing: .1em; margin-right: .35rem; }
.stars__off { color: var(--linea); }

/* Mi cuenta */
.account-page { padding-block: 1.5rem 3rem; }
.account-grid { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 1.5rem; align-items: start; }
.account-nav { position: sticky; top: calc(var(--header-h) + 16px); background: #fff; border-radius: var(--r-card); box-shadow: var(--shadow-soft); padding: 1rem; }
.account-nav__user { display: flex; gap: .75rem; align-items: center; padding: .25rem .25rem 1rem; margin-bottom: .5rem; border-bottom: 1px solid var(--linea); }
.account-nav__user img { border-radius: 50%; }
.account-nav__user div { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.account-nav__user span { font-size: .82rem; color: var(--tinta-3); overflow: hidden; text-overflow: ellipsis; }
.account-nav__list { display: grid; gap: .15rem; }
.account-nav__link {
    display: flex; align-items: center; gap: .65rem; width: 100%; padding: .6rem .75rem; border: 0; border-radius: 12px;
    background: transparent; color: var(--tinta); text-decoration: none; font-weight: 600; text-align: left;
}
.account-nav__link:hover { background: var(--ube-50); color: var(--ube); }
.account-nav__link.is-active { background: var(--ube); color: #fff; }
.account-nav__logout { color: var(--tinta-3); margin-top: .35rem; }
.account-main { min-width: 0; }
.account-head { margin-bottom: 1.25rem; }
.account-head--row { display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.account-head__title { font-weight: 800; font-size: clamp(1.5rem, 3vw, 2rem); margin: 0; }
.account-head__lead { margin: .25rem 0 0; color: var(--tinta-2); }

.active-order { display: flex; align-items: center; gap: .85rem; margin-bottom: 1rem; padding: .9rem 1rem; border-radius: 18px; background: var(--ube); color: #fff; text-decoration: none; box-shadow: var(--shadow-pop); }
.active-order:hover { background: var(--ube-700); color: #fff; }
.active-order img { border-radius: 12px; background: #fff; }
.active-order__body { flex: 1; display: flex; flex-direction: column; line-height: 1.3; }
.active-order__body small { color: var(--ube-100); }
.active-order__cta { font-weight: 700; color: var(--mango); }

.account-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .75rem; margin-bottom: 1rem; }
.account-stat { min-width: 0; text-align: center; display: flex; flex-direction: column; align-items: center; padding: .9rem .4rem; border-radius: 16px; background: #fff; box-shadow: var(--shadow-soft); text-decoration: none; color: var(--tinta-2); }
.account-stat strong { font-family: var(--font-display); font-size: 1.6rem; color: var(--ube); line-height: 1.1; }
.account-stat:hover { color: var(--ube); }
@media (max-width: 359.98px) { .account-stat { font-size: .8rem; } }

.segmented { display: inline-flex; gap: .25rem; padding: .25rem; margin-bottom: 1rem; border-radius: var(--r-pill); background: #fff; box-shadow: var(--shadow-soft); max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.segmented::-webkit-scrollbar { display: none; }
/* En celular no se parten en dos líneas: si no caben, se deslizan de lado. */
.segmented__item { flex-shrink: 0; white-space: nowrap; padding: .45rem 1.1rem; border-radius: var(--r-pill); font-weight: 600; color: var(--tinta-2); text-decoration: none; }
.segmented__item:hover { color: var(--ube); }
.segmented__item.is-active { background: var(--ube); color: #fff; }

.order-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .75rem; }
.order-row { position: relative; display: flex; gap: .9rem; align-items: center; padding: 1rem; border-radius: var(--r-card); background: #fff; box-shadow: var(--shadow-soft); transition: transform .15s var(--ease), box-shadow .15s; }
.order-row:hover { transform: translateY(-1px); box-shadow: var(--shadow-pop); }
.order-row__logo { border-radius: 14px; flex-shrink: 0; }
.order-row__body { flex: 1; min-width: 0; }
.order-row__top { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem .6rem; }
.order-row__name { font-weight: 800; font-family: var(--font-display); color: var(--tinta); text-decoration: none; font-size: 1.05rem; }
.order-row__items { margin: .2rem 0; color: var(--tinta-2); font-size: .92rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.order-row__meta { margin: 0; font-size: .82rem; color: var(--tinta-3); }
.order-row__meta strong { color: var(--tinta); }
.order-row__actions { position: relative; z-index: 2; }

.address-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .75rem; }
.address-item { display: flex; gap: .85rem; align-items: flex-start; padding: 1rem; border-radius: var(--r-card); background: #fff; box-shadow: var(--shadow-soft); border: 2px solid transparent; }
.address-item.is-default { border-color: var(--ube-100); }
.address-item__icon { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--ube-50); color: var(--ube); font-size: 1.1rem; flex-shrink: 0; }
.address-item__body { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.4; }
.address-item__body span { color: var(--tinta-2); overflow-wrap: anywhere; }
.address-item__body small { color: var(--tinta-3); }
.address-item__body .address-item__badge { display: inline-block; margin-left: .35rem; padding: .05rem .5rem; border-radius: var(--r-pill); background: var(--ube); color: #fff; font-size: .72rem; vertical-align: middle; }
.address-item__actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: .15rem; }

/* Notificaciones, foto de perfil y zona de peligro (fase 12) */
.notification-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; }
.notification { position: relative; display: flex; gap: .85rem; align-items: flex-start; padding: .9rem 1rem; border-radius: var(--r-card); background: #fff; box-shadow: var(--shadow-soft); }
.notification.is-unread { background: var(--ube-50); }
.notification__icon { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: #fff; color: var(--ube); font-size: 1.15rem; flex-shrink: 0; box-shadow: inset 0 0 0 1px var(--linea); }
.notification__body { flex: 1; min-width: 0; line-height: 1.35; }
.notification__title { font-weight: 700; color: var(--tinta); text-decoration: none; }
.notification__body p { margin: .15rem 0; color: var(--tinta-2); font-size: .92rem; }
.notification__body time { font-size: .8rem; color: var(--tinta-3); }
.notification__dot { width: 10px; height: 10px; border-radius: 50%; background: var(--ube); margin-top: .4rem; flex-shrink: 0; }
.avatar-edit { display: flex; align-items: center; gap: 1rem; margin-bottom: 1.25rem; }
.avatar-edit img { border-radius: 50%; object-fit: cover; }
.danger-zone { box-shadow: inset 0 0 0 2px var(--rocoto-50), var(--shadow-soft); }
.legal-page { max-width: 760px; padding-block: 2rem 3rem; }
.legal-page h1 { font-weight: 800; }
.legal-page h2 { font-size: 1.15rem; font-weight: 800; margin-top: 1.75rem; }
.legal-page p, .legal-page li { color: var(--tinta-2); }
.option-card--static { cursor: default; padding-right: .9rem; }
.option-card--static:hover { border-color: var(--linea); }
.payment-info { list-style: none; padding: 0; margin: 0; }

@media (max-width: 991.98px) {
    .account-grid { grid-template-columns: minmax(0, 1fr); }
    .account-nav { position: static; padding: .5rem; overflow-x: auto; }
    .account-nav__user { display: none; }
    .account-nav__list { display: flex; gap: .25rem; }
    .account-nav__link { width: auto; white-space: nowrap; padding: .5rem .8rem; }
    .account-nav__logout { margin-top: 0; }
}

@media (max-width: 575.98px) {
    .order-row { flex-wrap: wrap; }
    .order-row__actions { width: 100%; }
    .order-row__actions .btn { width: 100%; }
    .address-item { flex-wrap: wrap; }
    .address-item__actions { width: 100%; justify-content: flex-start; }
    .account-stat strong { font-size: 1.35rem; }
}

/* ==========================================================================
   Elegir la dirección en el mapa (<x-address-picker>, como Keeta)
   ========================================================================== */
.addr-picker .modal-dialog { max-width: 480px; }
.addr-picker__content { height: min(88vh, 820px); overflow: hidden; border: 0; border-radius: var(--r-card); }
.addr-step { display: flex; flex-direction: column; height: 100%; min-height: 0; }
.addr-step[hidden] { display: none; }
.addr-picker__head { display: flex; align-items: center; gap: .25rem; padding: .6rem .75rem .4rem; }
.addr-picker__back { border: 0; background: none; width: 36px; height: 36px; border-radius: 50%; font-size: 1.15rem; color: var(--tinta); }
.addr-picker__back:hover { background: var(--leche); }
.addr-picker__title { margin: 0; font: 700 1.1rem var(--font-display); }
.addr-search { display: flex; align-items: center; gap: .5rem; margin: 0 .9rem .6rem; padding: 0 .85rem; height: 42px; border-radius: 12px; background: var(--leche); color: var(--tinta-3); }
.addr-search__input { flex: 1; min-width: 0; border: 0; background: none; outline: none; color: var(--tinta); }
.addr-search__cancel { border: 0; background: none; color: var(--ube); font-weight: 600; }
.addr-map-wrap { position: relative; flex: 1; min-height: 0; }
.addr-map { position: absolute; inset: 0; background: #e9eef0; }
.addr-pin { position: absolute; left: 50%; top: 50%; z-index: 500; color: var(--tinta); transform: translate(-50%, -100%); pointer-events: none; transition: transform .18s ease, color .18s ease; }
.addr-pin svg { display: block; filter: drop-shadow(0 3px 4px rgba(0,0,0,.25)); }
.addr-pin__shadow { position: absolute; left: 50%; bottom: -4px; width: 12px; height: 5px; margin-left: -6px; border-radius: 50%; background: rgba(0,0,0,.25); transition: transform .18s ease, opacity .18s ease; }
.addr-pin.is-lifted { color: var(--tinta-3); transform: translate(-50%, calc(-100% - 14px)); }
.addr-pin.is-lifted .addr-pin__shadow { transform: translateY(14px) scale(.7); opacity: .5; }
.addr-pin__tip { position: absolute; bottom: calc(100% + 8px); left: 50%; transform: translateX(-50%); width: max-content; max-width: 210px; padding: .45rem .7rem; border-radius: 10px; background: rgba(35, 27, 46, .9); color: #fff; font-size: .78rem; text-align: center; }
.addr-pin__tip[hidden] { display: none; }
.addr-locate { position: absolute; right: .8rem; bottom: .8rem; z-index: 500; width: 42px; height: 42px; border: 0; border-radius: 50%; background: #fff; box-shadow: var(--shadow-soft); font-size: 1.15rem; color: var(--tinta); }
.addr-results { position: absolute; inset: 0; z-index: 600; overflow-y: auto; background: #fff; }
.addr-results__empty { padding: 2.5rem 1.5rem; text-align: center; color: var(--tinta-2); font-weight: 600; }
.addr-results__empty[hidden] { display: none; }
.addr-results__list { list-style: none; margin: 0; padding: 0 .9rem; }
.addr-result { display: flex; align-items: flex-start; gap: .6rem; width: 100%; padding: .75rem 0; border: 0; border-bottom: 1px solid var(--linea); background: none; text-align: left; color: var(--tinta); }
.addr-result__body { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.addr-result__body small { color: var(--tinta-3); }
.addr-result__km { color: var(--tinta-3); font-size: .8rem; white-space: nowrap; }
.addr-results__none { padding: 1.5rem .5rem; color: var(--tinta-2); text-align: center; }
.addr-sheet { padding: 0 .9rem .9rem; background: #fff; }
.addr-sheet__note { margin: 0 -.9rem .7rem; padding: .55rem .9rem; background: var(--mango-50); color: var(--ube-900); font-size: .85rem; }
.addr-sheet__place { display: flex; flex-direction: column; margin-bottom: .75rem; min-height: 2.6rem; }
.addr-sheet__place small { color: var(--tinta-3); }
.addr-sheet__btn { width: 100%; padding: .8rem; border-radius: var(--r-pill); font-weight: 700; }
.addr-details { flex: 1; min-height: 0; overflow-y: auto; padding: 0 .9rem .5rem; }
.addr-minimap { position: relative; display: block; width: 100%; height: 120px; padding: 0; border: 0; border-radius: 14px; overflow: hidden; }
.addr-minimap__map { position: absolute; inset: 0; }
.addr-minimap__pin { position: absolute; left: 50%; top: 50%; z-index: 500; transform: translate(-50%, -100%); display: flex; flex-direction: column; align-items: center; color: var(--tinta); font-size: 1.6rem; line-height: 1; }
.addr-minimap__tag { margin-bottom: .2rem; padding: .2rem .55rem; border-radius: 8px; background: var(--tinta); color: #fff; font-size: .72rem; font-weight: 600; }
.addr-details__place { margin: .55rem 0 .8rem; padding: .6rem .75rem; border-radius: 12px; background: var(--leche); font-weight: 600; }
.addr-details__place:empty { display: none; }
.addr-req { color: var(--rocoto); }
.addr-na { margin-top: .35rem; font-size: .85rem; color: var(--tinta-2); }
.addr-photos { margin: .5rem 0; }
.addr-photos__title { margin: 0; font: 700 1rem var(--font-display); }
.addr-photos__help { margin: 0 0 .6rem; color: var(--tinta-3); font-size: .85rem; }
.addr-photos__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: .6rem; }
.addr-photo { position: relative; }
.addr-photo__pick { display: grid; place-items: center; aspect-ratio: 1; border-radius: 14px; background: var(--leche); cursor: pointer; overflow: hidden; }
.addr-photo__pick img { width: 100%; height: 100%; object-fit: cover; }
.addr-photo__empty { display: flex; flex-direction: column; align-items: center; gap: .25rem; color: var(--tinta-2); font-size: .82rem; }
.addr-photo__empty[hidden] { display: none; }
.addr-photo__empty .bi { font-size: 1.5rem; }
.addr-photo__remove { position: absolute; top: 6px; right: 6px; width: 26px; height: 26px; border: 0; border-radius: 50%; background: rgba(35, 27, 46, .75); color: #fff; font-size: .75rem; }
@media (max-width: 575.98px) {
    .addr-picker__content { height: 100%; border-radius: 0; }
}

/* Fotos de guía de la dirección en la entrega del repartidor */
.stop__photos { display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem; margin: .5rem 0; max-width: 320px; }
.stop__photo { display: flex; flex-direction: column; gap: .2rem; color: var(--tinta-2); font-size: .78rem; text-decoration: none; text-align: center; }
.stop__photo img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 12px; background: var(--leche); }

/* ==========================================================================
   Wallet del cliente (Mi cuenta → Wallet)
   ========================================================================== */
.wallet-hero { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; padding: 1.4rem 1.5rem; border-radius: var(--r-card); color: #fff; background: radial-gradient(120% 140% at 0% 0%, var(--ube) 0%, var(--ube-900) 70%); box-shadow: var(--shadow-pop); }
.wallet-hero > div { display: flex; flex-direction: column; gap: .15rem; }
.wallet-hero__label { font-weight: 600; opacity: .85; }
.wallet-hero__balance { font: 800 2.4rem/1.1 var(--font-display); }
.wallet-hero__note { opacity: .75; }
.wallet-hero__btn { background: var(--mango); color: var(--tinta); font-weight: 700; border-radius: var(--r-pill); padding: .6rem 1.2rem; }
.wallet-hero__btn:hover { background: #ffc24d; color: var(--tinta); }
.wallet-block { margin-top: 1.6rem; }
.wallet-block__title { font: 700 1.15rem var(--font-display); margin-bottom: .6rem; }
.wallet-filters { overflow-x: auto; flex-wrap: nowrap; padding-bottom: .4rem; margin-bottom: .4rem; }
.wallet-filters .chip { white-space: nowrap; }

/* Descarga la app (/app): portada con dos celulares, ventajas y cómo instalarla */
.app-dl { padding-top: 1.5rem; padding-bottom: 3rem; }
.app-dl__hero { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: 2rem; align-items: center; padding: 2.2rem 2.4rem; border-radius: 30px; background: radial-gradient(130% 120% at 0% 0%, var(--mango-100) 0%, var(--mango-50) 55%, #fff 100%); overflow: hidden; }
.app-dl__kicker { display: inline-flex; gap: .4rem; align-items: center; padding: .3rem .8rem; border-radius: 999px; background: #fff; color: var(--albahaca); font-weight: 700; font-size: .85rem; box-shadow: var(--shadow-soft); }
.app-dl__title { font: 800 clamp(2rem, 4.6vw, 3.3rem)/1.02 var(--font-display); letter-spacing: -.03em; margin: .8rem 0 .6rem; color: var(--ube-900); }
.app-dl__lead { font-size: 1.1rem; color: var(--tinta-2); max-width: 46ch; margin: 0 0 1.4rem; }
.app-dl__actions { display: flex; flex-wrap: wrap; gap: .7rem; }
.app-dl__btn { display: inline-flex; gap: .5rem; align-items: center; border-radius: 999px; padding: .85rem 1.6rem; font-weight: 800; }
.app-dl__meta { margin: .9rem 0 0; color: var(--tinta-2); font-size: .92rem; }
.app-dl__soon { display: inline-flex; gap: .35rem; align-items: center; margin-top: .25rem; color: var(--ube); font-weight: 600; }
.app-dl__qr { gap: 1rem; align-items: center; margin-top: 1.6rem; padding: .8rem 1rem; border-radius: 18px; background: #fff; box-shadow: var(--shadow-soft); max-width: 420px; }
.app-dl__qr img { border-radius: 10px; flex-shrink: 0; }
.app-dl__qr p { margin: 0; font-size: .9rem; color: var(--tinta-2); }
.app-dl__phones { position: relative; height: 520px; }
.app-dl__phone { position: absolute; right: 8%; top: 0; width: 240px; padding: 9px; border-radius: 38px; background: #1c1622; box-shadow: 0 30px 60px -20px rgba(46, 20, 71, .55); }
.app-dl__phone img { display: block; width: 100%; height: auto; border-radius: 30px; }
.app-dl__phone--back { right: 42%; top: 54px; transform: rotate(-8deg); opacity: .95; width: 220px; }
.app-dl__perks { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; margin-top: 2rem; }
.app-dl__perk { padding: 1.2rem; border-radius: var(--r-card); background: #fff; box-shadow: var(--shadow-soft); }
.app-dl__perk-icon { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 14px; background: var(--ube-50); color: var(--ube); font-size: 1.3rem; margin-bottom: .7rem; }
.app-dl__perk h2 { font: 700 1.05rem var(--font-display); margin: 0 0 .3rem; }
.app-dl__perk p { margin: 0; color: var(--tinta-2); font-size: .92rem; }
.app-dl__how { margin-top: 2rem; padding: 1.6rem 1.8rem; border-radius: var(--r-card); background: #fff; box-shadow: var(--shadow-soft); }
.app-dl__how h2 { font: 800 1.5rem var(--font-display); margin: 0 0 .3rem; }
.app-dl__steps { counter-reset: paso; list-style: none; padding: 0; margin: 1rem 0; display: grid; gap: .7rem; }
.app-dl__steps li { counter-increment: paso; position: relative; padding-left: 2.6rem; color: var(--tinta); }
.app-dl__steps li::before { content: counter(paso); position: absolute; left: 0; top: -.1rem; display: grid; place-items: center; width: 1.9rem; height: 1.9rem; border-radius: 50%; background: var(--mango); font-weight: 800; color: var(--tinta); }
.app-dl__safe { min-width: 0; display: flex; flex-wrap: wrap; gap: .3rem .5rem; align-items: baseline; padding: .8rem 1rem; border-radius: 14px; background: var(--albahaca-50); color: #12603F; font-size: .9rem; }
.app-dl__hash { flex-basis: 100%; min-width: 0; font-size: .75rem; color: var(--tinta-2); overflow-wrap: anywhere; word-break: break-all; }
.app-dl__hash code { color: var(--tinta-2); }
@media (max-width: 991.98px) {
    .app-dl__hero { grid-template-columns: 1fr; padding: 1.6rem 1.3rem; }
    .app-dl__phones { height: 420px; }
    .app-dl__phone { right: 6%; width: 200px; }
    .app-dl__phone--back { right: auto; left: 6%; width: 180px; }
    .app-dl__perks { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 575.98px) {
    .app-dl__btn { width: 100%; justify-content: center; }
    .app-dl__phones { height: 360px; }
    .app-dl__phone { width: 170px; right: 4%; }
    .app-dl__phone--back { width: 150px; left: 2%; }
    .app-dl__perks { grid-template-columns: 1fr; }
    .app-dl__how { padding: 1.2rem; }
}

/* Popup «Descarga la app» */
.app-popup .modal-dialog { max-width: 420px; }
.app-popup__card { border: 0; border-radius: 28px; overflow: hidden; box-shadow: 0 30px 80px -20px rgba(46, 20, 71, .55); }
.app-popup__close { position: absolute; top: .9rem; right: .9rem; z-index: 3; background-color: rgba(255, 255, 255, .85); border-radius: 50%; padding: .55rem; opacity: 1; }
.app-popup__top { position: relative; height: 190px; background: radial-gradient(120% 120% at 0% 0%, var(--mango) 0%, #ffcf66 55%, var(--mango-100) 100%); overflow: hidden; }
.app-popup__logo { position: absolute; left: 1.3rem; top: 1.2rem; width: 76px; height: 76px; object-fit: contain; filter: drop-shadow(0 6px 10px rgba(46, 20, 71, .25)); }
.app-popup__phone { position: absolute; right: 1.4rem; top: 1.6rem; width: 150px; padding: 6px; border-radius: 26px; background: #1c1622; transform: rotate(8deg); box-shadow: 0 18px 40px -12px rgba(46, 20, 71, .6); }
.app-popup__phone img { display: block; width: 100%; height: auto; border-radius: 20px; }
.app-popup__body { position: relative; padding: 1.3rem 1.5rem 1.2rem; text-align: center; background: #fff; }
.app-popup__kicker { display: inline-flex; gap: .35rem; align-items: center; padding: .25rem .7rem; border-radius: 999px; background: var(--albahaca-50); color: var(--albahaca); font-weight: 700; font-size: .8rem; }
.app-popup__title { font: 800 1.6rem/1.1 var(--font-display); color: var(--ube-900); margin: .6rem 0 .4rem; letter-spacing: -.02em; }
.app-popup__text { color: var(--tinta-2); margin: 0 0 1rem; }
.app-popup__btn { width: 100%; display: inline-flex; gap: .5rem; align-items: center; justify-content: center; border-radius: 999px; font-weight: 800; padding: .8rem 1rem; }
.app-popup__meta { margin: .5rem 0 0; font-size: .8rem; color: var(--tinta-3); }
.app-popup__how { display: inline-block; margin-top: .4rem; font-size: .88rem; font-weight: 600; color: var(--ube); }
.app-popup__desktop { display: none; gap: 1rem; align-items: center; text-align: left; padding: .8rem; border-radius: 18px; background: var(--leche); }
.app-popup__desktop img { border-radius: 10px; background: #fff; flex-shrink: 0; }
.app-popup__desktop p { margin: .2rem 0 .5rem; font-size: .85rem; color: var(--tinta-2); }
.app-popup.is-desktop .app-popup__mobile { display: none; }
.app-popup.is-desktop .app-popup__desktop { display: flex; }
.app-popup__later { margin-top: .8rem; border: 0; background: none; color: var(--tinta-3); font-weight: 600; font-size: .9rem; }
.app-popup__later:hover { color: var(--tinta); }

/* Banner "Descarga la app" de la portada */
.app-promo { display: flex; align-items: center; gap: 1.2rem; padding: 1.2rem 1.4rem; border-radius: var(--r-card); background: linear-gradient(110deg, var(--ube) 0%, var(--ube-900) 100%); color: #fff; text-decoration: none; box-shadow: var(--shadow-pop); }
.app-promo:hover { color: #fff; }
.app-promo__icon { display: grid; place-items: center; width: 58px; height: 58px; border-radius: 18px; background: var(--mango); color: var(--ube-900); font-size: 1.7rem; flex-shrink: 0; }
.app-promo__text { flex: 1; min-width: 0; }
.app-promo__text strong { display: block; font: 800 1.25rem var(--font-display); }
.app-promo__text span { opacity: .85; font-size: .92rem; }
.app-promo__cta { flex-shrink: 0; padding: .6rem 1.2rem; border-radius: 999px; background: var(--mango); color: var(--tinta); font-weight: 800; }
@media (max-width: 575.98px) {
    .app-promo { flex-wrap: wrap; }
    .app-promo__cta { width: 100%; text-align: center; }
}

/* Invita y gana: tarjeta morada con el premio y el código */
.referral-hero { display: flex; flex-wrap: wrap; gap: 1.2rem; align-items: center; justify-content: space-between; padding: 1.4rem 1.5rem; border-radius: var(--r-card); color: #fff; background: radial-gradient(120% 140% at 0% 0%, var(--ube) 0%, var(--ube-900) 70%); box-shadow: var(--shadow-pop); }
.referral-hero__kicker { font-size: .8rem; text-transform: uppercase; letter-spacing: .05em; opacity: .8; }
.referral-hero__amount { display: block; font: 800 2.4rem/1 var(--font-display); color: var(--mango); margin: .2rem 0 .3rem; }
.referral-hero__text p { margin: 0; max-width: 32ch; opacity: .9; }
.referral-hero__code { background: rgba(255, 255, 255, .1); border: 1px dashed rgba(255, 255, 255, .45); border-radius: 16px; padding: .9rem 1.1rem; text-align: center; min-width: 220px; }
.referral-hero__code span { font-size: .78rem; opacity: .8; }
.referral-hero__code strong { display: block; font: 800 1.6rem var(--font-display); letter-spacing: .08em; margin: .1rem 0 .6rem; }
.referral-hero__actions { display: flex; gap: .5rem; justify-content: center; }
.referral-steps { margin: 0; padding-left: 1.2rem; color: var(--tinta-2); display: grid; gap: .35rem; }

/* Mis cupones: tickets con el valor a la izquierda y un corte punteado (como los vouchers de Keeta) */
.coupon-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .8rem; }
.coupon-ticket { position: relative; display: grid; grid-template-columns: 92px 1fr auto; align-items: center; gap: 1rem; padding: 1rem 1.1rem 1rem 0; background: #fff; border-radius: var(--r-card); box-shadow: var(--shadow-soft); overflow: hidden; }
.coupon-ticket__value { align-self: stretch; display: flex; flex-direction: column; align-items: center; justify-content: center; margin: -1rem 0; background: var(--mango); color: var(--tinta); border-right: 2px dashed rgba(35, 27, 46, .25); }
.coupon-ticket__value strong { font: 800 1.35rem/1 var(--font-display); }
.coupon-ticket__value span { font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.coupon-ticket__title { font: 700 1.05rem var(--font-display); margin: 0; }
.coupon-ticket__desc { margin: .1rem 0 0; color: var(--tinta-2); font-size: .9rem; }
.coupon-ticket__meta { margin: .3rem 0 0; color: var(--tinta-2); font-size: .82rem; }
.coupon-ticket__meta a { color: var(--ube); font-weight: 600; }
.coupon-ticket__ends { margin: .25rem 0 0; color: var(--tinta-3); font-size: .8rem; }
.coupon-ticket.is-past { opacity: .65; }
.coupon-ticket.is-past .coupon-ticket__value { background: var(--linea); }
@media (max-width: 575.98px) {
    .coupon-ticket { grid-template-columns: 76px 1fr; }
    .coupon-ticket__action { grid-column: 2; }
}
.wallet-list { list-style: none; margin: 0; padding: 0; background: #fff; border-radius: var(--r-card); box-shadow: var(--shadow-soft); }
.wallet-row { display: flex; align-items: center; gap: .8rem; padding: .85rem 1rem; border-bottom: 1px solid var(--linea); }
.wallet-row:last-child { border-bottom: 0; }
.wallet-row__icon { width: 40px; height: 40px; flex-shrink: 0; display: grid; place-items: center; border-radius: 12px; background: var(--leche); color: var(--tinta-2); font-size: 1.1rem; }
.wallet-row__icon.is-in { background: var(--albahaca-50); color: var(--albahaca); }
.wallet-row__body { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.wallet-row__body small { color: var(--tinta-3); }
.wallet-row__amount { font-weight: 800; white-space: nowrap; color: var(--tinta); }
.wallet-row__amount.is-in { color: var(--albahaca); }
.wallet-steps { padding-left: 1.2rem; margin: .4rem 0 .6rem; color: var(--tinta-2); font-weight: 600; }
.yape-box { display: flex; align-items: center; gap: 1rem; padding: 1rem; margin-bottom: .8rem; border-radius: 16px; background: #f3ecfb; border: 1px solid #e2d3f5; }
.yape-box > div { display: flex; flex-direction: column; align-items: flex-start; }
.yape-box__brand { font: 800 1rem var(--font-display); color: #742284; }
.yape-box__phone { font: 800 1.6rem var(--font-display); letter-spacing: .02em; color: var(--tinta); }
.yape-box__qr { width: 110px; height: 110px; object-fit: contain; border-radius: 12px; background: #fff; padding: 4px; }

/* Checkout: usar el saldo de la wallet */
.wallet-use { display: flex; align-items: center; gap: .75rem; padding: .85rem 1rem; margin-bottom: .8rem; border-radius: 16px; border: 1.5px solid var(--ube-100); background: var(--ube-50); cursor: pointer; }
.wallet-use__icon { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 12px; background: var(--ube); color: #fff; }
.wallet-use__body { display: flex; flex-direction: column; flex: 1; }
.wallet-use__body small { color: var(--tinta-2); }
.option-card.is-muted { opacity: .45; }
