/* CSS personalizado para melhorar responsividade e persuasão */

.btn-gold {
    background: linear-gradient(135deg, #FFD700, #FFA500 );
    color: #1a202c;
    border: none;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.3);
    position: relative;
    overflow: hidden;
}

.btn-gold:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 215, 0, 0.4);
    background: linear-gradient(135deg, #FFA500, #FFD700);
}

.btn-gold::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.btn-gold:hover::before {
    left: 100%;
}

/* Animação de pulsação para urgência */
.btn-pulse {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 215, 0, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(255, 215, 0, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(255, 215, 0, 0);
    }
}

/* Contador regressivo */
.countdown {
    background: linear-gradient(135deg, #dc2626, #ef4444);
    color: white;
    padding: 1rem;
    border-radius: 0.5rem;
    margin: 1rem 0;
    text-align: center;
    font-weight: bold;
    box-shadow: 0 4px 15px rgba(220, 38, 38, 0.3);
}

.countdown-timer {
    font-size: 1.5rem;
    font-weight: bold;
    color: #FFD700;
}

/* Selo de garantia */
.guarantee-badge {
    position: relative;
    display: inline-block;
}

.guarantee-badge::after {
    content: '✓';
    position: absolute;
    top: -5px;
    right: -5px;
    background: #10b981;
    color: white;
    border-radius: 50%;
    width: 25px;
    height: 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: bold;
}

/* Destaque de preço */
.price-highlight {
    background: linear-gradient(135deg, #FFD700, #FFA500);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 900;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

/* Melhorias para cards de livros */
.book-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.book-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.book-card img {
    transition: transform 0.3s ease;
}

.book-card:hover img {
    transform: scale(1.05);
}

/* Barra Flutuante para o Timer e CTA */
.floating-bar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(20, 20, 20, 0.9); /* Fundo escuro semi-transparente */
    backdrop-filter: blur(10px); /* Efeito de vidro fosco */
    -webkit-backdrop-filter: blur(10px);
    padding: 0.75rem 1rem;
    display: flex;
    justify-content: space-around;
    align-items: center;
    z-index: 1000;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    transform: translateY(-100%); /* Começa escondida */
    transition: transform 0.4s ease-in-out;
}

.floating-bar.visible {
    transform: translateY(0); /* Fica visível */
}

/* Ajustes no conteúdo da barra flutuante */
.floating-bar .countdown {
    padding: 0.5rem;
    margin: 0;
    background: none;
    box-shadow: none;
}

.floating-bar .countdown-timer {
    font-size: 1.2rem;
    color: #FFD700;
}

.floating-bar .btn-gold {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    margin-left: 1rem;
}

/* CSS para o Downsell - Mesmo estilo da página principal */

/* Overlay do downsell */
#downsell-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    padding: 1rem;
}

#downsell-overlay.show {
    opacity: 1;
}

/* Popup principal */
.downsell-popup {
    background: linear-gradient(135deg, #1f2937, #374151);
    border-radius: 1rem;
    max-width: 500px;
    width: 100%;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
    border: 2px solid rgba(255, 215, 0, 0.3);
    transform: scale(0.8);
    transition: transform 0.3s ease;
    color: white;
    position: relative;
    overflow: hidden;
}

#downsell-overlay.show .downsell-popup {
    transform: scale(1);
}

/* Efeito de brilho no popup */
.downsell-popup::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 215, 0, 0.1), transparent);
    transition: left 2s;
}

#downsell-overlay.show .downsell-popup::before {
    left: 100%;
}

/* Header do downsell */
.downsell-header {
    background: linear-gradient(135deg, #dc2626, #ef4444);
    padding: 1.5rem;
    text-align: center;
    position: relative;
    border-radius: 1rem 1rem 0 0;
}

.downsell-header h2 {
    color: #FFD700;
    font-size: 2rem;
    font-weight: 900;
    margin: 0;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    animation: pulse-text 2s infinite;
}

@keyframes pulse-text {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

/* Botão de fechar */
.close-btn {
    position: absolute;
    top: 0.5rem;
    right: 1rem;
    font-size: 2rem;
    color: white;
    cursor: pointer;
    transition: color 0.3s ease;
}

.close-btn:hover {
    color: #FFD700;
    transform: scale(1.1);
}

/* Conteúdo do downsell */
.downsell-content {
    padding: 2rem;
    text-align: center;
}

.downsell-content h3 {
    color: #FFD700;
    font-size: 1.5rem;
    font-weight: bold;
    margin-bottom: 1rem;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.downsell-content p {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    line-height: 1.6;
    color: #e5e7eb;
}

/* Área da oferta */
.downsell-offer {
    background: rgba(0, 0, 0, 0.3);
    padding: 1.5rem;
    border-radius: 0.75rem;
    border: 1px solid rgba(255, 215, 0, 0.2);
    margin-top: 1rem;
}

/* Botões do FornPay no downsell */
.fornpay_btn {
    background: linear-gradient(135deg, #FFD700, #FFA500) !important;
    color: #1a202c !important;
    border: none !important;
    text-decoration: none !important;
    display: inline-block !important;
    padding: 1rem 2rem !important;
    border-radius: 2rem !important;
    font-weight: bold !important;
    font-size: 1.1rem !important;
    text-align: center !important;
    width: 100% !important;
    margin-bottom: 1rem !important;
    transition: all 0.3s ease !important;
    box-shadow: 0 8px 25px rgba(255, 215, 0, 0.4) !important;
    position: relative !important;
    overflow: hidden !important;
    animation: pulse-btn 2s infinite !important;
}

@keyframes pulse-btn {
    0% {
        box-shadow: 0 8px 25px rgba(255, 215, 0, 0.4);
    }
    50% {
        box-shadow: 0 8px 35px rgba(255, 215, 0, 0.6);
        transform: translateY(-2px);
    }
    100% {
        box-shadow: 0 8px 25px rgba(255, 215, 0, 0.4);
    }
}

.fornpay_btn:hover {
    transform: translateY(-3px) !important;
    box-shadow: 0 12px 35px rgba(255, 215, 0, 0.6) !important;
    background: linear-gradient(135deg, #FFA500, #FFD700) !important;
}

/* Efeito de brilho no botão */
.fornpay_btn::before {
    content: '' !important;
    position: absolute !important;
    top: 0 !important;
    left: -100% !important;
    width: 100% !important;
    height: 100% !important;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent) !important;
    transition: left 0.5s !important;
}

.fornpay_btn:hover::before {
    left: 100% !important;
}

/* Link de downsell (recusar) */
.fornpay_downsell {
    color: #9ca3af !important;
    text-decoration: underline !important;
    font-size: 0.9rem !important;
    display: block !important;
    margin-top: 0.5rem !important;
    transition: color 0.3s ease !important;
}

.fornpay_downsell:hover {
    color: #ffffff !important;
}

/* Media queries para responsividade mobile */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 2rem !important;
        line-height: 1.2;
        margin-bottom: 1rem;
    }

    .hero .btn-gold {
        padding: 0.75rem 1.5rem !important;
        font-size: 0.9rem !important;
        margin-top: 1rem;
        width: 90%;
        max-width: 300px;
    }

    .hero p {
        font-size: 1rem !important;
        margin-bottom: 1rem;
    }

    .py-16 {
        padding-top: 2rem !important;
        padding-bottom: 2rem !important;
    }

    h2 {
        font-size: 1.5rem !important;
        margin-bottom: 1rem !important;
    }

    .book-card img {
        width: 80px !important;
        height: auto;
    }

    .book-card h3 {
        font-size: 1rem !important;
    }

    .book-card p {
        font-size: 0.8rem !important;
    }

    .testimonial img {
        width: 60px !important;
        height: 60px !important;
    }

    .countdown-timer {
        font-size: 1.2rem !important;
    }

    .price-highlight {
        font-size: 1.5rem !important;
    }

    /* Barra flutuante responsiva */
    .floating-bar {
        flex-direction: column;
        padding: 0.5rem;
    }
    .floating-bar .btn-gold {
        margin-top: 0.5rem;
        margin-left: 0;
        width: 90%;
        text-align: center;
    }

    /* Responsividade do downsell */
    .downsell-popup {
        max-width: 95%;
        margin: 1rem;
    }
    
    .downsell-header {
        padding: 1rem;
    }
    
    .downsell-header h2 {
        font-size: 1.5rem;
    }
    
    .downsell-content {
        padding: 1.5rem;
    }
    
    .downsell-content h3 {
        font-size: 1.25rem;
    }
    
    .downsell-content p {
        font-size: 1rem;
    }
    
    .downsell-offer {
        padding: 1rem;
    }
    
    .fornpay_btn {
        padding: 0.75rem 1.5rem !important;
        font-size: 1rem !important;
    }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: 1.75rem !important;
    }

    .hero .btn-gold {
        font-size: 0.8rem !important;
        padding: 0.6rem 1.2rem !important;
    }

    .hero p {
        font-size: 0.9rem !important;
    }

    h2 {
        font-size: 1.3rem !important;
    }

    /* Responsividade do downsell para mobile muito pequeno */
    .downsell-popup {
        max-width: 100%;
        margin: 0.5rem;
        border-radius: 0.5rem;
    }
    
    .downsell-header {
        border-radius: 0.5rem 0.5rem 0 0;
    }
    
    .downsell-header h2 {
        font-size: 1.25rem;
    }
    
    .downsell-content {
        padding: 1rem;
    }
    
    .close-btn {
        font-size: 1.5rem;
        top: 0.25rem;
        right: 0.5rem;
    }
}