/* Home plaza — 2D flat + circulos animados */
.home-plaza {
    --plaza-blue: #2873de;
    --plaza-navy: #001659;
    --plaza-yellow: #ffcc00;
    --plaza-teal: #0d9488;
    background: #f0f4fa;
    padding: clamp(2.75rem, 2rem + 4vw, 4.5rem) 0 clamp(3rem, 2.5rem + 3vw, 4rem);
    overflow: hidden;
}

.home-plaza-head {
    max-width: 640px;
    margin: 0 auto 2rem;
    padding: 0 1rem;
}

.home-plaza-kicker {
    text-transform: uppercase;
    letter-spacing: 0.14em;
    font-size: 0.72rem;
    font-weight: 800;
    color: #e8870a;
    margin: 0 0 0.45rem;
}

.home-plaza-title {
    font-size: clamp(1.65rem, 1.2rem + 2vw, 2.35rem);
    font-weight: 900;
    color: #0f1b2d;
    margin: 0;
    line-height: 1.15;
}

.home-plaza-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: clamp(1rem, 2vw, 1.5rem);
    max-width: 920px;
    margin: 0 auto;
    padding: 0 1rem;
}

.home-plaza-card {
    position: relative;
    border: 0;
    border-radius: 28px;
    overflow: hidden;
    min-height: 240px;
    text-align: left;
    cursor: pointer;
    padding: 0;
    isolation: isolate;
    text-decoration: none;
    color: inherit;
    display: block;
    box-shadow: 0 20px 48px rgba(0, 22, 89, 0.18);
    transform: translateY(28px);
    opacity: 0;
    transition: transform 0.55s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.55s, box-shadow 0.25s;
}

.home-plaza-card.is-in {
    transform: translateY(0);
    opacity: 1;
}

.home-plaza-card:hover,
.home-plaza-card:focus-visible {
    transform: translateY(-6px);
    box-shadow: 0 28px 56px rgba(0, 22, 89, 0.26);
    outline: none;
}

.home-plaza-card--cerca {
    background: var(--plaza-blue);
}

.home-plaza-card--cupones {
    background: var(--plaza-teal);
}

.home-plaza-deco {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
}

.home-plaza-deco--1 {
    width: 180px;
    height: 180px;
    right: -48px;
    top: -56px;
    background: var(--plaza-yellow);
    opacity: 0.32;
    animation: plaza-float-a 7s ease-in-out infinite;
}

.home-plaza-deco--2 {
    width: 140px;
    height: 140px;
    left: -44px;
    bottom: -58px;
    background: var(--plaza-navy);
    opacity: 0.38;
    animation: plaza-float-b 8.5s ease-in-out infinite;
}

.home-plaza-deco--3 {
    width: 72px;
    height: 72px;
    right: 18%;
    bottom: 14%;
    background: #fff;
    opacity: 0.16;
    animation: plaza-float-c 6s ease-in-out infinite;
}

.home-plaza-card--cupones .home-plaza-deco--1 {
    background: var(--plaza-yellow);
    opacity: 0.36;
}

.home-plaza-card--cupones .home-plaza-deco--2 {
    background: #064e3b;
    opacity: 0.4;
}

@keyframes plaza-float-a {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(-10px, 12px) scale(1.06); }
}

@keyframes plaza-float-b {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(14px, -8px) scale(1.05); }
}

@keyframes plaza-float-c {
    0%, 100% { transform: translate(0, 0); opacity: 0.14; }
    50% { transform: translate(-8px, -10px); opacity: 0.22; }
}

@media (prefers-reduced-motion: reduce) {
    .home-plaza-deco { animation: none !important; }
}

.home-plaza-card-body {
    position: relative;
    z-index: 1;
    padding: clamp(1.4rem, 1.1rem + 1.5vw, 1.85rem);
    color: #fff;
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 240px;
}

.home-plaza-eyebrow {
    display: block;
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--plaza-yellow);
    margin: 0 0 0.85rem;
}

.home-plaza-card h3 {
    font-size: clamp(1.45rem, 1.15rem + 1.2vw, 1.85rem);
    font-weight: 900;
    margin: 0 0 0.5rem;
    letter-spacing: -0.02em;
    line-height: 1.1;
}

.home-plaza-card p {
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.92);
    flex: 1;
    max-width: 22rem;
}

.home-plaza-card-cta {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    margin-top: 1.15rem;
    font-size: 0.78rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.55rem 1rem;
    border-radius: 999px;
    background: var(--plaza-yellow);
    color: var(--plaza-navy);
    width: fit-content;
}

.home-plaza-card-cta i {
    font-size: 0.72rem;
    transition: transform 0.2s ease;
}

.home-plaza-card:hover .home-plaza-card-cta i {
    transform: translateX(3px);
}

@media (max-width: 640px) {
    .home-plaza-grid {
        grid-template-columns: 1fr;
        max-width: 420px;
    }
    .home-plaza-card-body {
        min-height: 210px;
    }
}


/* â”€â”€ Avispa FAB â”€â”€ */
.avispa-fab {
    position: fixed;
    right: 1.15rem;
    bottom: 1.15rem;
    z-index: 9990;
    width: 58px;
    height: 58px;
    border: 0;
    border-radius: 50%;
    background: #ffcc00;
    box-shadow: 0 10px 28px rgba(251, 191, 36, 0.45);
    font-size: 1.75rem;
    cursor: pointer;
    display: grid;
    place-items: center;
    animation: avispa-bob 2.8s ease-in-out infinite;
}

@keyframes avispa-bob {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
}

/* â”€â”€ Overlay plaza (centrado en PC) â”€â”€ */
.chilpo-x-overlay {
    position: fixed;
    inset: 0;
    z-index: 9991;
    background: rgba(15, 23, 42, 0.52);
    backdrop-filter: blur(6px);
    display: none;
    align-items: center;
    justify-content: center;
    padding: clamp(0.75rem, 2vw, 1.5rem);
}

.chilpo-x-overlay.is-open {
    display: flex;
}

.chilpo-x-shell {
    width: min(1120px, 96vw);
    height: min(88vh, 820px);
    background: #fff;
    border-radius: 22px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 32px 80px rgba(0, 0, 0, 0.28);
    animation: chilpo-x-in 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes chilpo-x-in {
    from { opacity: 0; transform: scale(0.96) translateY(12px); }
    to { opacity: 1; transform: none; }
}

.chilpo-x-head {
    flex-shrink: 0;
    padding: 0.95rem 1.15rem;
    background: #2873de;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.chilpo-x-head h2 {
    margin: 0;
    font-size: clamp(1rem, 0.9rem + 0.5vw, 1.15rem);
    font-weight: 900;
}

.chilpo-x-back,
.chilpo-x-close {
    background: rgba(255, 255, 255, 0.18);
    border: 0;
    color: #fff;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.15rem;
    display: grid;
    place-items: center;
    flex-shrink: 0;
}

.chilpo-x-back { margin-right: auto; }

.chilpo-x-head-actions {
    display: flex;
    gap: 0.45rem;
    align-items: center;
}

.chilpo-x-body {
    flex: 1;
    min-height: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.chilpo-x-hidden { display: none !important; }

/* MenÃº avispa */
.chilpo-x-menu {
    padding: 1.25rem;
    display: grid;
    gap: 0.75rem;
    overflow-y: auto;
}

.chilpo-x-menu-btn {
    display: flex;
    gap: 0.85rem;
    align-items: center;
    text-align: left;
    padding: 1rem 1.1rem;
    border: 2px solid rgba(40, 115, 222, 0.14);
    border-radius: 16px;
    background: #f8fafc;
    cursor: pointer;
    font-weight: 800;
    color: #0f1b2d;
    text-decoration: none;
    transition: border-color 0.2s, background 0.2s;
}

.chilpo-x-menu-btn:hover {
    border-color: #2873de;
    background: #f0f7ff;
}

.chilpo-x-menu-btn span:first-child { font-size: 1.6rem; }
.chilpo-x-menu-btn small {
    display: block;
    font-weight: 500;
    opacity: 0.65;
    font-size: 0.78rem;
    margin-top: 0.15rem;
}

/* Vista Cerca de ti */
.chilpo-x-cerca {
    flex: 1;
    min-height: 0;
    display: grid;
    grid-template-columns: 1fr 360px;
}

.chilpo-x-map-wrap {
    position: relative;
    min-height: 0;
    background: #e2e8f0;
}

.chilpo-x-map {
    width: 100%;
    height: 100%;
    min-height: 280px;
}

.chilpo-x-side {
    display: flex;
    flex-direction: column;
    min-height: 0;
    border-left: 1px solid #e2e8f0;
    background: #fafbfd;
}

.chilpo-x-toolbar {
    padding: 0.75rem;
    border-bottom: 1px solid #e2e8f0;
    display: grid;
    gap: 0.55rem;
    flex-shrink: 0;
}

.chilpo-x-search {
    width: 100%;
    padding: 0.55rem 0.75rem 0.55rem 2.2rem;
    border-radius: 12px;
    border: 1px solid #cbd5e1;
    font-size: 0.88rem;
    background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%2394a3b8' viewBox='0 0 16 16'%3E%3Cpath d='M11.742 10.344a6.5 6.5 0 1 0-1.397 1.398h-.001l3.85 3.85a1 1 0 0 0 1.415-1.414l-3.85-3.85zm-5.857 1.1a5.5 5.5 0 1 1 0-11 5.5 5.5 0 0 1 0 11z'/%3E%3C/svg%3E") 0.65rem center no-repeat;
}

.chilpo-x-cats {
    display: flex;
    gap: 0.4rem;
    overflow-x: auto;
    padding-bottom: 0.15rem;
    scrollbar-width: thin;
}

.chilpo-x-cat {
    flex-shrink: 0;
    border: 1px solid #cbd5e1;
    background: #fff;
    border-radius: 999px;
    padding: 0.35rem 0.75rem;
    font-size: 0.72rem;
    font-weight: 700;
    cursor: pointer;
    color: #475569;
    white-space: nowrap;
    transition: all 0.15s;
}

.chilpo-x-cat.is-active {
    background: #2873de;
    border-color: #2873de;
    color: #fff;
}

.chilpo-x-gps-note {
    font-size: 0.72rem;
    color: #64748b;
    margin: 0;
    line-height: 1.35;
}

.chilpo-x-list {
    flex: 1;
    overflow-y: auto;
    padding: 0.65rem;
    display: grid;
    gap: 0.5rem;
    align-content: start;
}

.chilpo-x-biz {
    display: flex;
    gap: 0.65rem;
    align-items: flex-start;
    padding: 0.65rem;
    border-radius: 14px;
    border: 1px solid #e2e8f0;
    background: #fff;
    text-decoration: none;
    color: inherit;
    transition: background 0.15s, border-color 0.15s;
}

.chilpo-x-biz:hover {
    background: #f0f7ff;
    border-color: rgba(40, 115, 222, 0.25);
}

.chilpo-x-biz img {
    width: 46px;
    height: 46px;
    border-radius: 11px;
    object-fit: cover;
    background: #f1f5f9;
    flex-shrink: 0;
}

.chilpo-x-biz-body { flex: 1; min-width: 0; }

.chilpo-x-biz-top {
    display: flex;
    align-items: flex-start;
    gap: 0.4rem;
}

.chilpo-x-biz-top strong {
    font-size: 0.88rem;
    font-weight: 800;
    flex: 1;
    line-height: 1.25;
}

.chilpo-x-status {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
    margin-top: 0.25rem;
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.9);
}

.chilpo-x-status--open { background: #22c55e; }
.chilpo-x-status--closed { background: #ef4444; }
.chilpo-x-status--unknown {
    background: #eab308;
    width: auto;
    height: auto;
    border-radius: 6px;
    padding: 0.1rem 0.25rem;
    font-size: 0.65rem;
    color: #854d0e;
    box-shadow: none;
}

.chilpo-x-biz-meta {
    font-size: 0.72rem;
    color: #64748b;
    margin-top: 0.2rem;
    line-height: 1.35;
}

.chilpo-x-empty {
    text-align: center;
    padding: 2rem 1rem;
    color: #64748b;
    font-size: 0.88rem;
}

/* Vista Cupones */
.chilpo-x-cupones {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
    display: grid;
    gap: 0.75rem;
    align-content: start;
    background: #fafbfd;
}

.chilpo-x-cupon {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 0.85rem;
    align-items: center;
    padding: 1rem 1.05rem;
    border-radius: 18px;
    border: 1px solid #e2e8f0;
    background: #fff;
    box-shadow: 0 8px 24px rgba(15, 27, 45, 0.06);
}

.chilpo-x-cupon.is-urgent {
    border-color: rgba(239, 68, 68, 0.35);
    animation: cupon-pulse 2s ease-in-out infinite;
}

@keyframes cupon-pulse {
    0%, 100% { box-shadow: 0 8px 24px rgba(239, 68, 68, 0.08); }
    50% { box-shadow: 0 12px 32px rgba(239, 68, 68, 0.18); }
}

.chilpo-x-cupon-logo {
    width: 52px;
    height: 52px;
    border-radius: 12px;
    object-fit: cover;
    background: #f1f5f9;
}

.chilpo-x-cupon-body h4 {
    margin: 0 0 0.2rem;
    font-size: 0.95rem;
    font-weight: 900;
    color: #0f1b2d;
}

.chilpo-x-cupon-body p {
    margin: 0;
    font-size: 0.78rem;
    color: #64748b;
    line-height: 1.4;
}

.chilpo-x-cupon-desc {
    font-size: 0.82rem !important;
    font-weight: 700;
    color: #15803d !important;
    margin-top: 0.25rem !important;
}

.chilpo-x-countdown {
    text-align: center;
    min-width: 88px;
}

.chilpo-x-countdown-digits {
    font-variant-numeric: tabular-nums;
    font-size: 1.05rem;
    font-weight: 900;
    color: #2873de;
    letter-spacing: 0.02em;
}

.chilpo-x-cupon.is-urgent .chilpo-x-countdown-digits {
    color: #dc2626;
    animation: countdown-tick 1s ease infinite;
}

@keyframes countdown-tick {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.04); }
}

.chilpo-x-countdown-lbl {
    font-size: 0.62rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #94a3b8;
    font-weight: 700;
}

.chilpo-x-cupon-actions {
    grid-column: 1 / -1;
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin-top: 0.15rem;
}

.chilpo-x-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.45rem 0.85rem;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 800;
    text-decoration: none;
    border: 0;
    cursor: pointer;
}

.chilpo-x-btn--wa {
    background: #25d366;
    color: #fff;
}

.chilpo-x-btn--link {
    background: #f0f7ff;
    color: #2873de;
}

/* Marcadores mapa */
.chilpo-marker {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 2px solid #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}

.chilpo-marker--open { background: #22c55e; }
.chilpo-marker--closed { background: #ef4444; }
.chilpo-marker--unknown { background: #eab308; }

@media (max-width: 860px) {
    .chilpo-x-shell {
        height: min(94vh, 900px);
        border-radius: 18px;
    }

    .chilpo-x-cerca {
        grid-template-columns: 1fr;
        grid-template-rows: minmax(200px, 38vh) 1fr;
    }

    .chilpo-x-side {
        border-left: 0;
        border-top: 1px solid #e2e8f0;
    }

    .chilpo-x-cupon {
        grid-template-columns: auto 1fr;
    }

    .chilpo-x-countdown {
        grid-column: 2;
        justify-self: end;
    }
}

@media (max-width: 480px) {
    .chilpo-x-overlay {
        padding: 0;
        align-items: flex-end;
    }

    .chilpo-x-shell {
        width: 100%;
        height: 96vh;
        border-radius: 18px 18px 0 0;
    }
}
