/* POPUP.CSS - Versão Simplificada - BOTÃO CLOSE CORRIGIDO */

/* Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* OVERLAY DO POPUP */
.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    z-index: 99999;
    display: none;
    justify-content: center;
    align-items: center;
    padding: 20px;
    transition: all 0.4s ease;
}

/* Estado ativo */
.popup-overlay.active {
    display: flex !important;
    opacity: 1;
}

/* CONTAINER - DESKTOP CENTRALIZADO */
.popup-container {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    border-radius: 20px;
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow: hidden;
    position: relative;
    box-shadow: 0 30px 100px rgba(0, 0, 0, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transform: scale(0.8) translateY(50px);
    transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.popup-overlay.active .popup-container {
    transform: scale(1) translateY(0);
}

/* BOTÃO FECHAR - CORRIGIDO */
.close-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #ffffff;
    font-size: 24px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 100001;
    /* Z-index mais alto */
    display: flex !important;
    /* Forçar exibição */
    align-items: center;
    justify-content: center;
    font-weight: bold;
    line-height: 1;
    font-family: Arial, sans-serif;
}

.close-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.3);
    transform: scale(1.1) rotate(90deg);
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.3);
}

.close-btn:active {
    transform: scale(0.95);
}

/* CONTEÚDO */
.popup-content {
    overflow: hidden;
}

/* SEÇÃO DA IMAGEM */
.image-section {
    position: relative;
    overflow: hidden;
    border-radius: 20px 20px 0 0;
    height: 200px;
    background: linear-gradient(45deg, #ff6b35, #f7931e);
}

.popup-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 0.5s ease;
}

.popup-image:hover {
    transform: scale(1.08);
}

/* SEÇÃO DE CONTEÚDO */
.content-section {
    padding: 30px 25px 25px;
    color: white;
    text-align: center;
}

/* TÍTULOS */
.popup-title {
    font-size: 1.8rem;
    font-weight: 800;
    margin-bottom: 10px;
    line-height: 1.1;
    letter-spacing: -0.5px;
}

.highlight {
    background: linear-gradient(45deg, #ff6b35, #f7931e);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 0 20px rgba(255, 107, 53, 0.4));
}

.popup-subtitle {
    color: #cbd5e1;
    font-size: 1rem;
    margin-bottom: 25px;
    font-weight: 400;
    opacity: 0.9;
}

/* SEÇÃO DE DESCONTO */
.discount-section {
    margin-bottom: 30px;
}

.discount-title {
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: white;
}

.discount-percent {
    color: #ff6b35;
    font-size: 1.8rem;
    text-shadow: 0 0 25px rgba(255, 107, 53, 0.5);
    animation: glow 2s infinite alternate;
}

@keyframes glow {
    from {
        text-shadow: 0 0 20px rgba(255, 107, 53, 0.5);
    }

    to {
        text-shadow: 0 0 30px rgba(255, 107, 53, 0.8);
    }
}

.discount-subtitle {
    color: #94a3b8;
    font-size: 0.95rem;
    margin-top: 5px;
}

/* SEÇÃO DE OFERTA */
.offer-section {
    margin-bottom: 20px;
}

/* BOTÃO CTA */
.cta-button {
    width: 100%;
    padding: 18px 25px;
    background: linear-gradient(135deg, #ff6b35 0%, #f7931e 100%);
    border: none;
    border-radius: 15px;
    color: white;
    font-size: 1.1rem;
    font-weight: 800;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
    letter-spacing: 0.8px;
    box-shadow: 0 10px 40px rgba(255, 107, 53, 0.4);
}

.cta-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transition: left 0.8s ease;
}

.cta-button:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 50px rgba(255, 107, 53, 0.6);
    background: linear-gradient(135deg, #f7931e 0%, #ff6b35 100%);
}

.cta-button:hover::before {
    left: 100%;
}

.cta-button:active {
    transform: translateY(-2px);
    transition: transform 0.1s ease;
}

.cta-button:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

/* ELEMENTOS DE CONFIANÇA */
.trust-elements {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.trust-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    opacity: 0.9;
    transition: all 0.3s ease;
}

.trust-item:hover {
    opacity: 1;
    transform: translateY(-2px);
}

.trust-icon {
    font-size: 1.2rem;
    margin-bottom: 2px;
}

.trust-text {
    font-size: 0.75rem;
    color: #94a3b8;
    text-align: center;
    font-weight: 500;
}

/* RESPONSIVIDADE MOBILE */
@media (max-width: 768px) {
    .popup-overlay {
        padding: 10px;
        align-items: flex-end;
    }

    .popup-container {
        max-width: none;
        width: 80%;
        max-height: 80vh;
        margin: 0 auto 20px;
        border-radius: 18px;
        transform: translateY(100px);
    }

    .popup-overlay.active .popup-container {
        transform: translateY(0);
        animation: slideUpMobile 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
    }

    @keyframes slideUpMobile {
        from {
            transform: translateY(100px);
            opacity: 0;
        }

        to {
            transform: translateY(0);
            opacity: 1;
        }
    }

    .content-section {
        padding: 25px 20px 20px;
    }

    .popup-title {
        font-size: 1.5rem;
    }

    .image-section {
        height: 160px;
    }

    .discount-title {
        font-size: 1.4rem;
    }

    .discount-percent {
        font-size: 1.6rem;
    }

    .cta-button {
        padding: 16px 22px;
        font-size: 1rem;
        letter-spacing: 0.6px;
    }

    .trust-elements {
        gap: 15px;
    }

    .trust-text {
        font-size: 0.7rem;
    }
}

/* MOBILE PEQUENO */
@media (max-width: 480px) {
    .popup-container {
        width: 85%;
        border-radius: 16px;
    }

    .content-section {
        padding: 20px 16px 16px;
    }

    .popup-title {
        font-size: 1.3rem;
    }

    .popup-subtitle {
        font-size: 0.9rem;
    }

    .discount-title {
        font-size: 1.3rem;
    }

    .discount-percent {
        font-size: 1.5rem;
    }

    .cta-button {
        padding: 14px 20px;
        font-size: 0.95rem;
    }

    .trust-elements {
        gap: 12px;
    }

    .trust-text {
        font-size: 0.65rem;
    }
}

/* MODO MOVIMENTO REDUZIDO */
@media (prefers-reduced-motion: reduce) {
    * {
        animation: none !important;
        transition: none !important;
    }
}