/* Plaza pages /cerca /cupones — 2D flat */
.plaza-page {
    --p-blue: #2873de;
    --p-navy: #001659;
    --p-yellow: #ffcc00;
    --p-teal: #0d9488;
    --p-bg: #f0f4fa;
    --p-ink: #0f1b2d;
    --p-muted: #64748b;
    background: var(--p-bg);
    padding: 1.25rem 0 3rem;
    min-height: 70vh;
}

.plaza-shell {
    width: min(1120px, calc(100% - 1.5rem));
    margin-inline: auto;
}

.plaza-hero {
    position: relative;
    overflow: hidden;
    border-radius: 28px;
    color: #fff;
    padding: clamp(1.5rem, 1.2rem + 2vw, 2.4rem);
    margin-bottom: 1.15rem;
    isolation: isolate;
    box-shadow: 0 20px 48px rgba(0, 22, 89, 0.18);
}

.plaza-hero--cerca { background: var(--p-blue); }
.plaza-hero--cupones { background: var(--p-teal); }

.plaza-hero-deco {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
}

.plaza-hero-deco--1 {
    width: 200px; height: 200px;
    right: -50px; top: -60px;
    background: var(--p-yellow);
    opacity: 0.3;
    animation: plaza-float-a 7s ease-in-out infinite;
}

.plaza-hero-deco--2 {
    width: 150px; height: 150px;
    left: -45px; bottom: -55px;
    background: var(--p-navy);
    opacity: 0.35;
    animation: plaza-float-b 8.5s ease-in-out infinite;
}

.plaza-hero-deco--3 {
    width: 70px; height: 70px;
    right: 20%; bottom: 16%;
    background: #fff;
    opacity: 0.14;
    animation: plaza-float-c 6s ease-in-out infinite;
}

@keyframes plaza-float-a {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(-8px, 10px) scale(1.05); }
}
@keyframes plaza-float-b {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(12px, -6px); }
}
@keyframes plaza-float-c {
    0%, 100% { opacity: 0.12; }
    50% { opacity: 0.22; transform: translate(-6px, -8px); }
}

.plaza-hero-inner { position: relative; z-index: 1; max-width: 36rem; }

.plaza-kicker {
    margin: 0 0 0.55rem;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--p-yellow);
}

.plaza-hero h1 {
    margin: 0 0 0.45rem;
    font-size: clamp(1.55rem, 1.2rem + 1.5vw, 2.1rem);
    font-weight: 900;
    line-height: 1.15;
}

.plaza-lead {
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.92);
}

.plaza-crumb {
    margin: 0.85rem 0 0;
    font-size: 0.78rem;
    font-weight: 700;
    opacity: 0.85;
}

.plaza-crumb a { color: #fff; text-decoration: underline; text-underline-offset: 2px; }

.plaza-hero--compact {
    padding: clamp(1.15rem, 1rem + 1.2vw, 1.65rem);
    margin-bottom: 0.9rem;
}

.plaza-hero--compact h1 {
    font-size: clamp(1.35rem, 1.1rem + 1vw, 1.75rem);
}

.plaza-hero--compact .plaza-lead {
    font-size: 0.88rem;
    max-width: 34rem;
}

/* Layout cerca */
.plaza-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(300px, 380px);
    gap: 0;
    height: min(72vh, 700px);
    min-height: 480px;
    background: #fff;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(0, 22, 89, 0.12);
    border: 1px solid rgba(15, 27, 45, 0.06);
}

.plaza-map-panel {
    position: relative;
    min-height: 0;
    height: 100%;
    background: #dbe4f0;
}

.plaza-map {
    width: 100%;
    height: 100%;
    min-height: 280px;
    background: #dbe4f0;
}

.plaza-map .leaflet-container {
    width: 100% !important;
    height: 100% !important;
    background: #dbe4f0;
    font-family: inherit;
}

.plaza-map-legend {
    position: absolute;
    left: 12px;
    bottom: 12px;
    z-index: 500;
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    background: rgba(255, 255, 255, 0.96);
    border-radius: 999px;
    padding: 0.45rem 0.85rem;
    font-size: 0.7rem;
    font-weight: 800;
    color: var(--p-ink);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
}

.plaza-map-legend span {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}

.plaza-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
}
.plaza-dot--open { background: #22c55e; }
.plaza-dot--closed { background: #ef4444; }
.plaza-dot--unknown { background: #eab308; }

/* Chip selección */
.plaza-selected-chip {
    position: absolute;
    top: 12px;
    left: 12px;
    right: 12px;
    z-index: 550;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.7rem 0.85rem;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 10px 28px rgba(0, 22, 89, 0.18);
    max-width: 420px;
    animation: plaza-chip-in 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes plaza-chip-in {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: none; }
}

.plaza-selected-chip[hidden] { display: none !important; }

.plaza-selected-chip-text {
    flex: 1;
    min-width: 0;
}

.plaza-selected-chip-text strong {
    display: block;
    font-size: 0.9rem;
    font-weight: 900;
    color: var(--p-ink);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.plaza-selected-chip-text span {
    display: block;
    font-size: 0.72rem;
    color: var(--p-muted);
    margin-top: 0.1rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.plaza-selected-chip-btn {
    flex-shrink: 0;
    padding: 0.45rem 0.85rem;
    border-radius: 999px;
    background: var(--p-yellow);
    color: var(--p-navy);
    font-size: 0.75rem;
    font-weight: 900;
    text-decoration: none;
}

.plaza-side {
    display: flex;
    flex-direction: column;
    min-height: 0;
    height: 100%;
    border-left: 1px solid #e8eef5;
    background: #f7f9fc;
}

.plaza-toolbar {
    padding: 0.9rem;
    border-bottom: 1px solid #e8eef5;
    display: grid;
    gap: 0.6rem;
    flex-shrink: 0;
    background: #fff;
}

.plaza-search {
    width: 100%;
    padding: 0.7rem 0.9rem 0.7rem 2.45rem;
    border-radius: 14px;
    border: 1.5px solid #dbe3ef;
    font-size: 0.9rem;
    font-weight: 600;
    background: #f7f9fc 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.75rem center no-repeat;
    transition: border-color 0.15s, background 0.15s;
}

.plaza-search:focus {
    outline: none;
    border-color: var(--p-blue);
    background-color: #fff;
}

.plaza-cats {
    display: flex;
    gap: 0.4rem;
    overflow-x: auto;
    scrollbar-width: thin;
    padding-bottom: 0.15rem;
    -webkit-overflow-scrolling: touch;
}

.plaza-cat {
    flex-shrink: 0;
    border: 1.5px solid #dbe3ef;
    background: #fff;
    border-radius: 999px;
    padding: 0.4rem 0.85rem;
    font-size: 0.72rem;
    font-weight: 800;
    cursor: pointer;
    color: #475569;
    white-space: nowrap;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.plaza-cat:hover { border-color: var(--p-blue); color: var(--p-blue); }

.plaza-cat.is-active {
    background: var(--p-blue);
    border-color: var(--p-blue);
    color: #fff;
}

.plaza-gps-note {
    margin: 0;
    font-size: 0.72rem;
    color: var(--p-muted);
    line-height: 1.35;
}

.plaza-list {
    flex: 1;
    overflow-y: auto;
    padding: 0.75rem;
    display: grid;
    gap: 0.55rem;
    align-content: start;
    -webkit-overflow-scrolling: touch;
}

.plaza-biz {
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
    padding: 0.8rem;
    border-radius: 16px;
    border: 1.5px solid #e8eef5;
    background: #fff;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
    text-align: left;
    width: 100%;
    transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
}

.plaza-biz:hover {
    border-color: rgba(40, 115, 222, 0.35);
    box-shadow: 0 8px 22px rgba(40, 115, 222, 0.1);
}

.plaza-biz.is-selected {
    border-color: var(--p-blue);
    background: #f0f7ff;
    box-shadow: 0 10px 26px rgba(40, 115, 222, 0.16);
    transform: translateY(-1px);
}

.plaza-biz-logo {
    flex-shrink: 0;
    width: 52px;
    height: 52px;
    border-radius: 14px;
    overflow: hidden;
    background: #eef2f7;
}

.plaza-biz-logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.plaza-biz-logo-ph {
    display: grid;
    place-items: center;
    width: 100%;
    height: 100%;
    color: #94a3b8;
    font-size: 1.1rem;
}

.plaza-biz-body { flex: 1; min-width: 0; }

.plaza-biz-top {
    display: flex;
    align-items: flex-start;
    gap: 0.45rem;
}

.plaza-biz-top strong {
    font-size: 0.92rem;
    font-weight: 900;
    flex: 1;
    line-height: 1.25;
    color: var(--p-ink);
}

.plaza-badge {
    flex-shrink: 0;
    font-size: 0.62rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    padding: 0.2rem 0.45rem;
    border-radius: 999px;
    line-height: 1;
}

.plaza-badge.is-open {
    background: rgba(34, 197, 94, 0.14);
    color: #15803d;
}
.plaza-badge.is-closed {
    background: rgba(239, 68, 68, 0.12);
    color: #b91c1c;
}
.plaza-badge.is-unknown {
    background: rgba(234, 179, 8, 0.18);
    color: #a16207;
}

.plaza-biz-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem 0.55rem;
    font-size: 0.72rem;
    color: var(--p-muted);
    margin-top: 0.3rem;
    line-height: 1.35;
    font-weight: 600;
}

.plaza-biz-meta span:not(:last-child)::after {
    content: '·';
    margin-left: 0.55rem;
    opacity: 0.5;
}

.plaza-biz-cta {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin-top: 0.45rem;
    font-size: 0.72rem;
    font-weight: 900;
    color: var(--p-blue);
}

.plaza-biz.is-selected .plaza-biz-cta {
    color: #1a5bb8;
}

.plaza-empty {
    text-align: center;
    padding: 2rem 1rem;
    color: var(--p-muted);
    font-size: 0.9rem;
}

/* Aguja animada */
.plaza-needle-wrap,
.plaza-marker-wrap {
    background: transparent !important;
    border: 0 !important;
}

.plaza-needle {
    position: relative;
    width: 40px;
    height: 52px;
}

.plaza-needle-pin {
    position: absolute;
    left: 50%;
    bottom: 6px;
    width: 30px;
    height: 30px;
    margin-left: -15px;
    background: #ef4444;
    border: 3px solid #fff;
    border-radius: 50% 50% 50% 0;
    transform: rotate(-45deg);
    box-shadow: 0 8px 18px rgba(239, 68, 68, 0.5);
    animation: plaza-needle-drop 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}

.plaza-needle-pin::after {
    content: '';
    position: absolute;
    width: 9px;
    height: 9px;
    top: 50%;
    left: 50%;
    background: #fff;
    border-radius: 50%;
    transform: translate(-50%, -50%) rotate(45deg);
}

.plaza-needle-shadow {
    position: absolute;
    left: 50%;
    bottom: 2px;
    width: 18px;
    height: 5px;
    margin-left: -9px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 50%;
}

.plaza-needle.is-bounce .plaza-needle-pin {
    animation: plaza-needle-drop 0.55s cubic-bezier(0.22, 1, 0.36, 1),
               plaza-needle-bounce 1s ease 0.55s infinite;
}

@keyframes plaza-needle-drop {
    0% { transform: rotate(-45deg) translate(36px, -90px) scale(0.35); opacity: 0; }
    70% { transform: rotate(-45deg) translate(0, 4px) scale(1.08); opacity: 1; }
    100% { transform: rotate(-45deg) translate(0, 0) scale(1); }
}

@keyframes plaza-needle-bounce {
    0%, 100% { transform: rotate(-45deg) translateY(0); }
    50% { transform: rotate(-45deg) translateY(-7px); }
}

.plaza-marker {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 2.5px solid #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.28);
    transition: transform 0.15s;
}
.plaza-marker.is-active {
    width: 20px;
    height: 20px;
    border-width: 3px;
    box-shadow: 0 0 0 4px rgba(40, 115, 222, 0.25), 0 4px 12px rgba(0, 0, 0, 0.3);
}
.plaza-marker--open { background: #22c55e; }
.plaza-marker--closed { background: #ef4444; }
.plaza-marker--unknown { background: #eab308; }

.plaza-leaflet-popup .leaflet-popup-content-wrapper {
    border-radius: 14px;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.16);
    padding: 0;
}
.plaza-leaflet-popup .leaflet-popup-content {
    margin: 0.75rem 0.9rem;
}
.plaza-popup strong {
    display: block;
    font-size: 0.9rem;
    font-weight: 900;
    color: #0f1b2d;
}
.plaza-popup em {
    display: block;
    font-style: normal;
    font-size: 0.75rem;
    color: #64748b;
    margin: 0.2rem 0 0.55rem;
}
.plaza-popup-btn {
    display: inline-flex;
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    background: #2873de;
    color: #fff !important;
    font-size: 0.75rem;
    font-weight: 800;
    text-decoration: none !important;
}

/* Cupones */
.plaza-cupones-list {
    display: grid;
    gap: 0.85rem;
}

.plaza-cupon {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 0.85rem;
    align-items: center;
    padding: 1.05rem 1.15rem;
    border-radius: 18px;
    border: 1px solid #e2e8f0;
    background: #fff;
    box-shadow: 0 8px 24px rgba(15, 27, 45, 0.06);
}

.plaza-cupon.is-urgent {
    border-color: rgba(239, 68, 68, 0.35);
    animation: plaza-cupon-pulse 2s ease-in-out infinite;
}

@keyframes plaza-cupon-pulse {
    0%, 100% { box-shadow: 0 8px 24px rgba(239, 68, 68, 0.06); }
    50% { box-shadow: 0 12px 32px rgba(239, 68, 68, 0.16); }
}

.plaza-cupon-logo {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    object-fit: cover;
    background: #f1f5f9;
}

.plaza-cupon-body h3 {
    margin: 0 0 0.2rem;
    font-size: 1rem;
    font-weight: 900;
    color: var(--p-ink);
}

.plaza-cupon-body p {
    margin: 0;
    font-size: 0.8rem;
    color: var(--p-muted);
    line-height: 1.4;
}

.plaza-cupon-desc {
    font-weight: 800 !important;
    color: #15803d !important;
    margin-top: 0.25rem !important;
}

.plaza-countdown {
    text-align: center;
    min-width: 92px;
}

.plaza-countdown-digits {
    font-variant-numeric: tabular-nums;
    font-size: 1.1rem;
    font-weight: 900;
    color: var(--p-blue);
}

.plaza-cupon.is-urgent .plaza-countdown-digits {
    color: #dc2626;
}

.plaza-countdown-lbl {
    font-size: 0.62rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #94a3b8;
    font-weight: 700;
}

.plaza-cupon-actions {
    grid-column: 1 / -1;
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.plaza-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.5rem 0.95rem;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 800;
    text-decoration: none;
    border: 0;
}

.plaza-btn--wa { background: #25d366; color: #fff; }
.plaza-btn--link { background: #f0f7ff; color: var(--p-blue); }
.plaza-btn--primary { background: var(--p-yellow); color: var(--p-navy); }
.plaza-btn--ghost { background: #fff; color: var(--p-ink); border: 1px solid #cbd5e1; }

.plaza-fallback {
    margin-top: 1.5rem;
    padding: 1.5rem;
    background: #fff;
    border-radius: 22px;
    box-shadow: 0 12px 32px rgba(15, 27, 45, 0.06);
}

.plaza-fallback-head h2 {
    margin: 0 0 0.35rem;
    font-size: 1.25rem;
    font-weight: 900;
}

.plaza-fallback-head p {
    margin: 0 0 1.25rem;
    color: var(--p-muted);
}

.plaza-reco h3,
.plaza-ads h3 {
    font-size: 0.95rem;
    font-weight: 900;
    margin: 0 0 0.75rem;
}

.plaza-reco-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 0.65rem;
    margin-bottom: 1.5rem;
}

.plaza-reco-card {
    display: flex;
    gap: 0.65rem;
    align-items: center;
    padding: 0.75rem;
    border-radius: 14px;
    border: 1px solid #e2e8f0;
    text-decoration: none;
    color: inherit;
    background: #fafbfd;
}

.plaza-reco-card img {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    object-fit: cover;
}

.plaza-reco-card strong {
    display: block;
    font-size: 0.88rem;
    font-weight: 800;
}

.plaza-reco-card em {
    font-style: normal;
    font-size: 0.72rem;
    color: var(--p-muted);
}

.plaza-ads-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 0.65rem;
    margin-bottom: 1.25rem;
}

.plaza-ad-card {
    display: block;
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid #e2e8f0;
    text-decoration: none;
    color: inherit;
    background: #fff;
}

.plaza-ad-card img {
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    display: block;
}

.plaza-ad-card strong {
    display: block;
    padding: 0.55rem 0.65rem;
    font-size: 0.8rem;
    font-weight: 800;
}

.plaza-fallback-cta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    margin: 0;
}

@media (max-width: 900px) {
    .plaza-layout {
        grid-template-columns: 1fr;
        height: auto;
        min-height: 0;
    }
    .plaza-map-panel {
        height: min(48vh, 380px);
        min-height: 260px;
    }
    .plaza-map {
        height: 100%;
        min-height: 260px;
    }
    .plaza-side {
        border-left: 0;
        border-top: 1px solid #e8eef5;
        max-height: none;
        height: auto;
    }
    .plaza-list {
        max-height: 55vh;
    }
    .plaza-selected-chip {
        max-width: none;
    }
    .plaza-cupon {
        grid-template-columns: auto 1fr;
    }
    .plaza-countdown {
        grid-column: 2;
        justify-self: end;
    }
}

@media (prefers-reduced-motion: reduce) {
    .plaza-hero-deco,
    .plaza-needle-pin,
    .plaza-cupon.is-urgent {
        animation: none !important;
    }
}
