/* ============================================
   1. ANUNCIO EMERGENTE (POPUP PROMO)
   ============================================ */
.popup-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(4px);
    z-index: 9998;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s ease;
}

.popup-overlay.mostrar {
    opacity: 1;
    visibility: visible;
}

.popup-anuncio {
    position: fixed;
    top: 35%; /* ★ CAMBIO: Antes era 50%, ahora sube más arriba ★ */
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    z-index: 9999;
    width: 90%;
    max-width: 400px;
    max-height: 85vh;
    max-height: 85dvh;
    background: #ffffff;
    border-radius: 20px;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.35);
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transition: all 0.35s ease;
    display: flex;
    flex-direction: column;
}

.popup-anuncio.mostrar {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -50%) scale(1);
}

.popup-header-bar {
    height: 6px;
    background: linear-gradient(90deg, var(--primary), var(--secondary), #FFD23F);
    flex-shrink: 0;
}

.popup-cerrar {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 40px;
    height: 40px;
    border: none;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    color: #333;
    transition: all 0.2s ease;
    z-index: 10;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.popup-cerrar:hover {
    background: var(--primary);
    color: white;
    transform: rotate(90deg);
}

.popup-imagen-wrap {
    width: 100%;
    height: 35%;
    min-height: 140px;
    max-height: 200px;
    overflow: hidden;
    background: linear-gradient(135deg, var(--light) 0%, #ffeaa7 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    flex-shrink: 0;
}

.popup-emoji-grande {
    font-size: 5rem;
}

.popup-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: linear-gradient(135deg, var(--primary), #c0392b);
    color: #fff;
    padding: 4px 12px;
    border-radius: 30px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 15px rgba(230, 57, 70, 0.4);
}

.popup-contenido {
    padding: 16px 20px 22px;
    text-align: center;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow-y: auto;
}

.popup-contenido h2 {
    font-size: 20px;
    font-weight: 700;
    color: var(--dark);
    margin: 0 0 8px 0;
    line-height: 1.2;
}

.popup-subtitulo {
    font-size: 11px;
    color: var(--secondary);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
}

.popup-contenido p {
    font-size: 13px;
    color: #555;
    line-height: 1.4;
    margin: 0;
}

.popup-precio {
    font-size: 24px;
    font-weight: 700;
    color: var(--accent);
    margin: 12px 0 10px 0;
}

.popup-precio span {
    font-size: 13px;
    color: #999;
    text-decoration: line-through;
    margin-left: 8px;
    font-weight: 400;
}

.popup-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: linear-gradient(135deg, #25D366, #128C7E);
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    padding: 12px 20px;
    border-radius: 50px;
    text-decoration: none;
    border: none;
    cursor: pointer;
    width: 100%;
    box-shadow: 0 8px 25px rgba(37, 211, 102, 0.35);
    transition: all 0.3s ease;
}

.popup-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 35px rgba(37, 211, 102, 0.45);
}

.popup-btn i {
    font-size: 18px;
}

.popup-nota {
    margin-top: 8px;
    font-size: 10px;
    color: #aaa;
}

@media (max-width: 380px) {
    .popup-contenido h2 {
        font-size: 18px;
    }

    .popup-precio {
        font-size: 20px;
    }

    .popup-btn {
        font-size: 13px;
        padding: 10px 15px;
    }
}