/* =========================================================
   PROMOS por sucursal (sección + pop up) — compartido
   ========================================================= */

/* ---------- PROMOS (sección + pop up) ---------- */
.promo-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 28px;
    max-width: 1100px;
    margin: 0 auto;
}
.promo-card {
    position: relative;
    overflow: hidden;
    border-radius: 26px;
    padding: 40px 38px 36px;
    color: rgba(255, 255, 255, .85);
    display: flex;
    flex-direction: column;
    isolation: isolate;
}
/* Capas: foto (0) → gradiente animado (1) → textura (1) → aro/destellos (1) → contenido (2) */
.promo-card > * { position: relative; z-index: 2; }
.promo-card > .promo-bg,
.promo-card > .promo-spark { position: absolute; pointer-events: none; }
.promo-bg {
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0 !important;
    filter: saturate(.85) contrast(1.05);
    opacity: 1;
    animation: promoKenBurns 18s ease-in-out infinite alternate;
}
.promo-card::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    background-size: 220% 220%;
    animation: promoGradient 9s ease infinite;
    pointer-events: none;
}
.promo-card::after {          /* textura: grano + retícula de puntos */
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    opacity: .55;
    background-image:
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .09 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"),
        radial-gradient(rgba(255, 255, 255, .16) 1px, transparent 1.4px);
    background-size: 160px 160px, 18px 18px;
    -webkit-mask-image: linear-gradient(120deg, transparent 15%, #000 75%);
    mask-image: linear-gradient(120deg, transparent 15%, #000 75%);
}
.promo-a { background: var(--base-color); }
.promo-a::before {
    background-image: linear-gradient(130deg, rgba(85, 105, 200, .86) 0%, rgba(51, 65, 123, .72) 35%, rgba(31, 40, 82, .82) 65%, rgba(60, 172, 219, .55) 100%);
}
.promo-b { background: #151827; }
.promo-b::before {
    background-image: linear-gradient(130deg, rgba(20, 22, 36, .9) 0%, rgba(46, 51, 92, .7) 40%, rgba(15, 17, 28, .85) 70%, rgba(60, 172, 219, .5) 100%);
}

/* Destellos flotando */
.promo-spark {
    z-index: 1 !important;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #3cacdb;
    box-shadow: 0 0 14px 4px rgba(60, 172, 219, .55);
    animation: promoFloat 6s ease-in-out infinite;
}
.promo-spark.s1 { right: 22%; top: 18%; }
.promo-spark.s2 { right: 10%; top: 48%; width: 6px; height: 6px; animation-delay: -2s; animation-duration: 7s; }
.promo-spark.s3 { right: 32%; bottom: 14%; width: 7px; height: 7px; animation-delay: -4s; background: #fff; box-shadow: 0 0 12px 3px rgba(255, 255, 255, .5); }

/* Hover de la tarjeta */
.promo-card { transition: transform .4s cubic-bezier(.2, .8, .3, 1), box-shadow .4s; box-shadow: 0 25px 50px -25px rgba(20, 25, 60, .6); }
.promo-card:hover { transform: translateY(-6px); box-shadow: 0 35px 60px -25px rgba(20, 25, 60, .75); }

@keyframes promoGradient { 0%, 100% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } }
@keyframes promoKenBurns { from { transform: scale(1); } to { transform: scale(1.15) translate(-2%, 2%); } }
@keyframes promoSpin { to { transform: rotate(360deg); } }
@keyframes promoFloat { 0%, 100% { transform: translateY(0); opacity: .9; } 50% { transform: translateY(-16px); opacity: .4; } }
@keyframes promoPulse { 0%, 100% { transform: scale(1); text-shadow: 0 0 0 rgba(60, 172, 219, 0); } 50% { transform: scale(1.05); text-shadow: 0 0 28px rgba(60, 172, 219, .55); } }
@keyframes promoShine { 0% { left: -60%; } 60%, 100% { left: 130%; } }
@keyframes promoWiggle { 0%, 80%, 100% { transform: rotate(0); } 85% { transform: rotate(-14deg); } 90% { transform: rotate(12deg); } 95% { transform: rotate(-6deg); } }

.promo-tag {
    align-self: flex-start;
    background: #3cacdb;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    border-radius: 30px;
    padding: 5px 14px;
    margin-bottom: 22px;
}
.promo-kicker { font-size: 18px; line-height: 24px; color: #c7d0ff; font-weight: 500; letter-spacing: 0; margin-bottom: 4px; }
.promo-big {
    font-size: 64px;
    line-height: 62px;
    font-weight: 700;
    letter-spacing: -2px;
    color: #fff;
    margin: 0 0 14px;
}
.promo-big span {
    color: #3cacdb;
    display: inline-block;
    transform-origin: left center;
    background: linear-gradient(100deg, #3cacdb 30%, #c9efff 50%, #3cacdb 70%);
    background-size: 250% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: promoPulse 2.8s ease-in-out infinite, promoGradient 4s linear infinite;
}
.promo-text { font-size: 17px; line-height: 26px; letter-spacing: .1px; margin: 0 0 10px; color: rgba(255,255,255,.88); }
.promo-text b { color: #fff; }
.promo-plus {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    align-self: flex-start;
    background: rgba(255, 255, 255, .14);
    border: 1px solid rgba(255, 255, 255, .25);
    color: #fff;
    border-radius: 12px;
    padding: 8px 14px;
    font-weight: 600;
    font-size: 15px;
    margin-bottom: 10px;
}
.promo-plus i { color: #3cacdb; }
.promo-note { font-size: 13px; line-height: 19px; color: rgba(255,255,255,.6); margin: 6px 0 0; }
.promo-btn {
    margin-top: auto;
    align-self: flex-start;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: #fff;
    color: var(--base-color) !important;
    font-weight: 600;
    font-size: 15px;
    border-radius: 40px;
    padding: 13px 26px;
    box-shadow: 0 10px 25px -8px rgba(0, 0, 0, .45);
    transition: transform .2s, box-shadow .2s;
}
.promo-btn:hover { transform: translateY(-2px); box-shadow: 0 14px 30px -8px rgba(0, 0, 0, .55); }
.promo-btn i { font-size: 18px; color: #25d366; animation: promoWiggle 3s ease-in-out infinite; }
.promo-btn, .promo-tag { position: relative; overflow: hidden; }
.promo-btn::after,
.promo-tag::after {          /* brillo que cruza */
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: -60%;
    width: 40%;
    background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .75), transparent);
    transform: skewX(-20deg);
    animation: promoShine 3.2s ease-in-out infinite;
    pointer-events: none;
}
.promo-tag::after { animation-delay: 1.2s; }
.promo-card .promo-body { margin-bottom: 24px; }

/* Pop up */
.promo-modal {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(12, 14, 24, .72);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    opacity: 0;
    visibility: hidden;
    transition: opacity .35s, visibility .35s;
}
.promo-modal.is-open { opacity: 1; visibility: visible; }
.promo-dialog {
    position: relative;
    width: 100%;
    max-width: 980px;
    max-height: calc(100vh - 40px);
    overflow-y: auto;
    background: #fff;
    border-radius: 30px;
    padding: 44px 36px 36px;
    transform: translateY(30px) scale(.96);
    transition: transform .45s cubic-bezier(.2, .9, .3, 1.2);
}
.promo-modal.is-open .promo-dialog { transform: none; }
.promo-dialog-head { text-align: center; margin-bottom: 26px; }
.promo-dialog-head h3 { font-size: 34px; line-height: 40px; letter-spacing: -.5px; margin: 0; color: var(--dark-gray); font-weight: 600; }
.promo-dialog-head p { margin: 6px 0 0; font-size: 16px; }
.promo-modal .promo-grid { gap: 20px; }
.promo-modal .promo-card { padding: 32px 28px 28px; }
.promo-modal .promo-big { font-size: 52px; line-height: 52px; }
.promo-close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 0;
    background: #f1f1f3;
    color: #151515;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background .2s, transform .2s;
}
.promo-close:hover { background: #e2e2e6; transform: rotate(90deg); }
body.promo-lock { overflow: hidden !important; }

@media (max-width: 991px) {
    .promo-big { font-size: 52px; line-height: 52px; }
}
@media (max-width: 767px) {
    .promo-grid { grid-template-columns: 1fr; gap: 20px; }
    .promo-card { padding: 30px 24px 26px; }
    .promo-big, .promo-modal .promo-big { font-size: 44px; line-height: 46px; }
    .promo-modal { padding: 12px; align-items: flex-end; }
    .promo-dialog { padding: 52px 16px 16px; border-radius: 24px; max-height: calc(100vh - 24px); }
    .promo-dialog-head h3 { font-size: 26px; line-height: 32px; }
    .promo-modal .promo-card { padding: 26px 22px 22px; }
    .promo-modal .promo-text { font-size: 15px; line-height: 23px; }
}

/* Texto corto: solo en el pop up en móvil */
.promo-short { display: none; }

/* Pop up compacto en móvil */
@media (max-width: 767px) {
    .promo-modal { padding: 10px; align-items: center; }
    .promo-dialog {
        padding: 12px;
        border-radius: 22px;
        max-height: calc(100svh - 20px);
        max-height: calc(100vh - 20px);
        max-height: calc(100dvh - 20px);
    }
    .promo-modal .promo-grid { gap: 10px; }
    .promo-modal .promo-card { padding: 18px 18px 16px; border-radius: 18px; }
    .promo-modal .promo-card .promo-body { margin-bottom: 12px; }
    .promo-modal .promo-tag { margin-bottom: 10px; font-size: 10px; padding: 3px 10px; }
    .promo-modal .promo-kicker { font-size: 14px; line-height: 18px; margin: 0; }
    .promo-modal .promo-big { font-size: 38px; line-height: 40px; letter-spacing: -1px; margin: 0 0 6px; }
    .promo-modal .promo-text,
    .promo-modal .promo-plus,
    .promo-modal .promo-note { display: none; }
    .promo-modal .promo-short {
        display: block;
        font-size: 14px;
        line-height: 20px;
        margin: 0;
        color: rgba(255, 255, 255, .88);
    }
    .promo-modal .promo-short b { color: #fff; }
    .promo-modal .promo-btn {
        align-self: stretch;
        justify-content: center;
        padding: 10px 18px;
        font-size: 14px;
    }
    /* Botón cerrar siempre visible, aunque el contenido se desplace */
    .promo-modal .promo-close {
        position: fixed;
        top: 18px;
        right: 18px;
        z-index: 5;
        width: 38px;
        height: 38px;
        background: #fff;
        box-shadow: 0 4px 14px rgba(0, 0, 0, .3);
    }
}

/* ---------- SELECTOR DE SUCURSAL ---------- */
.promo-picker { max-width: 760px; margin: 0 auto; }
.pp-step { display: none; }
.pp-step.is-active { display: block; animation: ppIn .45s cubic-bezier(.2, .8, .3, 1); }
@keyframes ppIn { from { opacity: 0; transform: translateY(14px) scale(.98); } to { opacity: 1; transform: none; } }
.pp-step .promo-card { min-height: 420px; }
.promo-tag i { margin-right: 4px; }

.pp-title {
    font-size: 34px;
    line-height: 40px;
    font-weight: 600;
    letter-spacing: -.5px;
    color: #fff;
    margin: 0 0 8px;
    max-width: 560px;
}
/* "promociones exclusivas" resaltado */
.pp-hl {
    position: relative;
    display: inline-block;
    white-space: nowrap;
    background: linear-gradient(100deg, #3cacdb 20%, #c9efff 45%, #3cacdb 70%);
    background-size: 250% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: promoGradient 4s linear infinite;
}
.pp-hl::after {                      /* subrayado que se dibuja */
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -4px;
    height: 5px;
    border-radius: 5px;
    background: linear-gradient(90deg, #3cacdb, #c9efff);
    transform-origin: left;
    animation: ppUnderline 3.5s ease-in-out infinite;
}
@keyframes ppUnderline { 0% { transform: scaleX(0); } 30%, 80% { transform: scaleX(1); } 100% { transform: scaleX(0); transform-origin: right; } }

.pp-tag-hot {
    font-size: 14px;
    letter-spacing: 1.5px;
    padding: 8px 18px;
    color: #fff;
    background: linear-gradient(100deg, #3cacdb, #5b8cff, #3cacdb);
    background-size: 200% 100%;
    box-shadow: 0 0 0 0 rgba(60, 172, 219, .7);
    animation: promoGradient 3s linear infinite, ppGlow 2s ease-out infinite;
}
.pp-tag-hot i { display: inline-block; animation: ppStar 2s ease-in-out infinite; }
@keyframes ppGlow { 0% { box-shadow: 0 0 0 0 rgba(60, 172, 219, .7); } 100% { box-shadow: 0 0 0 14px rgba(60, 172, 219, 0); } }
@keyframes ppStar { 0%, 100% { transform: rotate(0) scale(1); } 50% { transform: rotate(20deg) scale(1.25); } }

/* Promos finales (no la pantalla inicial): contenido centrado */
.pp-step:not([data-step="choose"]) .promo-card { text-align: center; align-items: center; justify-content: center; }
.pp-step:not([data-step="choose"]) .promo-tag,
.pp-step:not([data-step="choose"]) .promo-plus,
.pp-step:not([data-step="choose"]) .promo-btn,
.pp-step:not([data-step="choose"]) .pp-back { align-self: center; }
.pp-step:not([data-step="choose"]) .promo-card .promo-body { margin-top: auto; }
.pp-step:not([data-step="choose"]) .promo-big span { transform-origin: center; }
.pp-step:not([data-step="choose"]) .promo-text { max-width: 500px; margin-left: auto; margin-right: auto; }

/* Tipografía más grande en las promos finales */
.pp-step:not([data-step="choose"]) .promo-kicker { font-size: 24px; line-height: 30px; margin-bottom: 8px; }
.pp-step:not([data-step="choose"]) .promo-text { font-size: 20px; line-height: 30px; }
.pp-step:not([data-step="choose"]) .promo-short { font-size: 17px; line-height: 24px; }
@media (max-width: 767px) {
    .pp-step:not([data-step="choose"]) .promo-kicker { font-size: 20px; line-height: 26px; margin-bottom: 4px; }
    .pp-step:not([data-step="choose"]) .promo-text { font-size: 18px; line-height: 27px; }
}

/* Fotos de sucursal como fondo: encuadre arriba para ocultar el degradado blanco inferior */
.promo-card > .promo-bg-branch { height: 125%; bottom: auto; object-position: center top; }
.pp-sub {
    font-size: 17px;
    color: rgba(255, 255, 255, .85);
    margin: 0 0 24px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.pp-sub i { color: #3cacdb; animation: ppTap 1.6s ease-in-out infinite; display: inline-block; }
@keyframes ppTap { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(4px); } }

.pp-branches { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: auto; }
.pp-branch {
    display: flex;
    align-items: center;
    gap: 14px;
    text-align: left;
    width: 100%;
    border: 1px solid rgba(255, 255, 255, .3);
    background: rgba(255, 255, 255, .12);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    border-radius: 18px;
    padding: 10px 16px 10px 10px;
    color: #fff;
    cursor: pointer;
    transition: background .25s, transform .25s, border-color .25s, box-shadow .25s;
}
.pp-branch:hover,
.pp-branch:focus-visible {
    background: #fff;
    color: var(--base-color);
    border-color: #fff;
    transform: translateY(-3px);
    box-shadow: 0 14px 30px -12px rgba(0, 0, 0, .5);
    outline: none;
}
.pp-branch img {
    width: 64px;
    height: 64px;
    flex: 0 0 64px;
    object-fit: cover;
    border-radius: 12px;
}
.pp-branch-info { display: flex; flex-direction: column; min-width: 0; }
.pp-branch-name { font-size: 18px; line-height: 22px; font-weight: 700; letter-spacing: 0; }
.pp-branch-sub { font-size: 13px; line-height: 18px; opacity: .75; }
.pp-branch > i { margin-left: auto; font-size: 26px; color: #3cacdb; transition: transform .25s; }
.pp-branch:hover > i { transform: translateX(4px); }

.pp-back {
    align-self: flex-start;
    margin-top: 14px;
    background: none;
    border: 0;
    padding: 4px 0;
    color: rgba(255, 255, 255, .75);
    font-size: 14px;
    text-decoration: underline;
    text-underline-offset: 3px;
    cursor: pointer;
}
.pp-back:hover { color: #fff; }
.pp-back i { margin-right: 4px; }

/* Pop up: una sola tarjeta, sin marco blanco */
.promo-dialog { max-width: 640px; background: transparent; padding: 0; border-radius: 26px; }
.promo-close { z-index: 5; background: #fff; box-shadow: 0 4px 14px rgba(0, 0, 0, .3); }
.promo-modal .pp-title { padding-right: 44px; }

@media (max-width: 767px) {
    .pp-step .promo-card { min-height: 0; }
    .pp-title { font-size: 25px; line-height: 31px; padding-right: 30px; }
    .pp-tag-hot,
    .promo-modal .pp-tag-hot { font-size: 12px; padding: 6px 14px; letter-spacing: 1px; }
    .pp-hl { white-space: normal; }
    .pp-sub { font-size: 15px; margin-bottom: 16px; }
    .pp-branches { grid-template-columns: 1fr; gap: 10px; }
    .pp-branch img { width: 52px; height: 52px; flex-basis: 52px; }
    .pp-branch-name { font-size: 17px; }
    .promo-modal .promo-dialog { padding: 0; background: transparent; }
    .promo-modal .promo-close { position: absolute; top: 12px; right: 12px; }
    .promo-modal .pp-title { font-size: 23px; line-height: 29px; }
    .promo-modal .pp-back { margin-top: 10px; font-size: 13px; }
}

@media (prefers-reduced-motion: reduce) {
    .promo-card *, .promo-card::before, .promo-card *::after { animation: none !important; }
}
