/* * EBOOKS STOREFRONT STYLE — VIRALINK V16.2
 * Design focado em Alta Conversão, Autoridade e Percepção de Valor.
 * V16.2: Adição de estilos para Escassez, Timer Pix e Mobile 3D otimizado.
 */

/* =========================================
   1. ESTRUTURA GERAL
   ========================================= */
.ebook-store-container {
    max-width: 1200px;
    /* Ajuste de margem superior para compensar Header Fixo */
    margin: 120px auto 60px;
    padding: 0 20px;
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    min-height: 80vh;
}

/* =========================================
   2. MODO LANDING PAGE (SINGLE)
   ========================================= */

/* --- Hero Section (A Promessa) --- */
.lp-hero {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 60px;
    padding: 20px 0;
    margin-bottom: 60px;
}

.lp-grid {
    display: grid;
    grid-template-columns: 1fr 1.1fr; /* Visual um pouco menor que texto */
    gap: 50px;
    align-items: center;
    width: 100%;
}

/* --- Efeito 3D do Livro (O Segredo do Valor) --- */
.lp-visual {
    display: flex;
    justify-content: center;
    perspective: 1500px; /* Profundidade */
    padding: 20px;
}

.book-3d-wrapper {
    position: relative;
    /* Container para evitar cortes na animação */
    transform-style: preserve-3d;
}

.book-3d-mockup {
    position: relative;
    width: 320px; /* Largura base otimizada */
    max-width: 100%;
    transition: transform 0.5s ease;
    cursor: pointer;
}

.book-3d-mockup img {
    width: 100%;
    border-radius: 5px 15px 15px 5px;
    box-shadow: 
        -15px 10px 30px rgba(0,0,0,0.4), /* Sombra profunda */
        -2px 0 5px rgba(255,255,255,0.2) inset; /* Brilho na lombada */
    transform: rotateY(-20deg) rotateX(5deg); /* A mágica do 3D */
    transition: all 0.4s ease;
    display: block; /* Remove espaço extra embaixo da img */
}

.book-3d-mockup:hover img {
    transform: rotateY(-10deg) rotateX(0deg) scale(1.02);
    box-shadow: -20px 20px 40px rgba(0,0,0,0.3);
}

/* Efeito de "Páginas" na lateral (Pseudo-elemento) */
.book-3d-mockup::after {
    content: '';
    position: absolute;
    top: 2%;
    right: 2px;
    width: 25px;
    height: 96%;
    background: linear-gradient(to right, #fff 0%, #ddd 100%);
    transform: translateX(12px) translateZ(-20px) rotateY(-20deg);
    z-index: -1;
    box-shadow: 5px 5px 15px rgba(0,0,0,0.2);
    border-radius: 0 5px 5px 0;
}

/* --- Conteúdo de Venda --- */
.lp-content {
    color: #333;
}

.lp-badge {
    background: #FFD700; /* Ouro */
    color: #000;
    font-weight: 800;
    text-transform: uppercase;
    font-size: 0.8rem;
    padding: 6px 15px;
    border-radius: 50px;
    letter-spacing: 1px;
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.3);
    display: inline-block;
    margin-bottom: 20px;
}

.lp-title {
    font-size: 3rem;
    line-height: 1.1;
    margin-bottom: 20px;
    color: #1a1a1a;
    font-weight: 800;
    letter-spacing: -1px;
}

.lp-description {
    font-size: 1.1rem;
    line-height: 1.6;
    color: #555;
    margin-bottom: 30px;
}

.lp-benefits-box {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 12px;
    border-left: 5px solid #FF5722; /* Laranja Viralink */
    margin: 25px 0;
}

.lp-benefits {
    list-style: none;
    padding: 0;
    margin: 0;
}

.lp-benefits li {
    margin-bottom: 12px;
    font-weight: 600;
    color: #333;
    display: flex;
    align-items: center;
    font-size: 1rem;
}

.lp-benefits li i {
    color: #28a745; /* Verde Check */
    margin-right: 15px;
    font-size: 1.3rem;
    width: 20px; /* Alinhamento fixo */
    text-align: center;
}

/* --- Card de Preço & CTA (V16.2 - Com Escassez) --- */
.lp-pricing-card {
    background: #fff;
    border: 1px solid #e1e1e1;
    padding: 30px;
    border-radius: 16px;
    box-shadow: 0 15px 40px rgba(0,0,0,0.08);
    text-align: center;
    position: relative;
    overflow: hidden;
}

/* [NOVO] Barra de Escassez */
.scarcity-bar {
    background: #fff3cd;
    color: #856404;
    padding: 10px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 0.9rem;
    font-weight: bold;
    border: 1px solid #ffeeba;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    animation: pulse-alert 2s infinite;
}

.scarcity-bar i {
    color: #dc3545;
}

@keyframes pulse-alert {
    0% { transform: scale(1); }
    50% { transform: scale(1.02); }
    100% { transform: scale(1); }
}

.price-tag {
    margin-bottom: 25px;
}

.price-from {
    display: block;
    font-size: 1.1rem;
    color: #999;
    text-decoration: line-through;
    margin-bottom: 5px;
}

.price-to {
    display: block;
    font-size: 2.8rem;
    color: #28a745;
    font-weight: 800;
    letter-spacing: -1px;
}

/* BOTÃO PULSANTE (GATILHO MENTAL) */
.btn-buy-pulse {
    background: linear-gradient(45deg, #28a745, #218838);
    color: white;
    border: none;
    width: 100%;
    padding: 20px;
    font-size: 1.3rem;
    font-weight: 800;
    text-transform: uppercase;
    border-radius: 10px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.4);
    transition: all 0.3s ease;
    animation: pulse-green 2s infinite;
}

.btn-buy-pulse:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(40, 167, 69, 0.5);
    background: linear-gradient(45deg, #218838, #1e7e34);
}

.btn-buy-pulse i {
    margin-left: 10px;
}

@keyframes pulse-green {
    0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(40, 167, 69, 0.7); }
    70% { transform: scale(1.02); box-shadow: 0 0 0 15px rgba(40, 167, 69, 0); }
    100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(40, 167, 69, 0); }
}

.payment-icons {
    margin-top: 20px;
    font-size: 0.9rem;
    color: #777;
    display: flex;
    justify-content: center;
    gap: 20px;
    align-items: center;
}

/* --- Seção Preview --- */
.lp-preview {
    margin-top: 60px;
    text-align: center;
    background: #f8f9fa;
    padding: 60px 20px;
    border-radius: 20px;
}

.lp-preview h2 {
    font-size: 2rem;
    margin-bottom: 40px;
    color: #333;
    font-weight: 700;
}

.preview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 30px;
}

.preview-card {
    background: #fff;
    padding: 30px 20px;
    border-radius: 16px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    transition: transform 0.3s;
}

.preview-card:hover {
    transform: translateY(-5px);
}

.preview-card i {
    font-size: 2.5rem;
    color: #FF5722;
    background: #ffebe6;
    padding: 15px;
    border-radius: 50%;
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.preview-card span {
    font-weight: 700;
    color: #444;
    font-size: 1.1rem;
}

/* =========================================
   3. MODO CATÁLOGO
   ========================================= */
.catalog-header {
    text-align: center;
    margin-bottom: 60px;
}

.catalog-header h1 {
    font-size: 2.8rem;
    color: #222;
    margin-bottom: 15px;
}

.catalog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 40px;
}

.book-card {
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 25px rgba(0,0,0,0.06);
    transition: all 0.3s ease;
    border: 1px solid #eee;
    display: flex;
    flex-direction: column;
}

.book-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.12);
}

.book-cover-wrapper {
    position: relative;
    height: 380px;
    overflow: hidden;
    background: #f0f0f0;
}

.book-cover-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.book-card:hover .book-cover-img {
    transform: scale(1.08);
    filter: brightness(0.8);
}

.book-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    background: rgba(0,0,0,0.3);
}

.book-card:hover .book-overlay {
    opacity: 1;
}

.btn-view-details {
    background: #fff;
    color: #000;
    padding: 14px 30px;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 800;
    transform: translateY(20px);
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.book-card:hover .btn-view-details {
    transform: translateY(0);
}

.book-info {
    padding: 25px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.book-info h3 {
    font-size: 1.3rem;
    margin: 0 0 15px 0;
    color: #333;
    line-height: 1.4;
}

.book-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #777;
    font-size: 0.95rem;
    padding-top: 15px;
    border-top: 1px dashed #eee;
}

.price-display {
    color: #28a745;
    font-weight: 700;
    font-size: 1.2rem;
}

/* =========================================
   4. MODAL DE CHECKOUT (ESTILO BANCÁRIO)
   ========================================= */
.checkout-modal {
    display: none;
    position: fixed;
    z-index: 10000; /* Z-Index máximo */
    left: 0; top: 0;
    width: 100%; height: 100%;
    background-color: rgba(0,0,0,0.7);
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(8px); /* Efeito Blur */
}

.checkout-content {
    background-color: #fefefe;
    border-radius: 20px;
    width: 90%;
    max-width: 450px;
    position: relative;
    box-shadow: 0 25px 50px rgba(0,0,0,0.3);
    overflow: hidden;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from { transform: translateY(50px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.checkout-header {
    background: #f8f9fa;
    padding: 25px;
    border-bottom: 1px solid #eee;
    text-align: center;
}

.checkout-header h3 {
    margin: 0 0 5px 0;
    color: #333;
    font-size: 1.4rem;
}

.close-checkout {
    position: absolute;
    right: 20px;
    top: 20px;
    font-size: 28px;
    font-weight: bold;
    color: #aaa;
    cursor: pointer;
    transition: color 0.2s;
    line-height: 1;
}

.close-checkout:hover { color: #000; }

.checkout-body {
    padding: 30px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #555;
    font-size: 0.9rem;
}

.form-group input {
    width: 100%;
    padding: 14px;
    border: 2px solid #eee;
    border-radius: 10px;
    font-size: 1rem;
    transition: all 0.3s;
    background: #fdfdfd;
}

.form-group input:focus {
    border-color: #28a745;
    outline: none;
    background: #fff;
    box-shadow: 0 0 0 4px rgba(40, 167, 69, 0.1);
}

.order-summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    border-top: 2px dashed #eee;
    margin-bottom: 25px;
    font-weight: 600;
    font-size: 1.1rem;
}

.total-price {
    color: #28a745;
    font-size: 1.5rem;
    font-weight: 800;
}

.btn-pay-pix {
    background: #32BCAD; /* Cor Oficial Pix */
    color: white;
    border: none;
    width: 100%;
    padding: 16px;
    font-size: 1.2rem;
    font-weight: bold;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 5px 15px rgba(50, 188, 173, 0.3);
}

.btn-pay-pix:hover {
    background: #28a597;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(50, 188, 173, 0.4);
}

.btn-pay-pix:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* --- Área do Pix (Timer & QR) --- */
.pix-timer {
    font-size: 1.3rem;
    font-weight: 800;
    color: #d9534f;
    margin-bottom: 20px;
    background: #fdf2f2;
    padding: 12px;
    border-radius: 8px;
    border: 1px dashed #d9534f;
    display: inline-block;
    width: 100%;
}

.qr-container {
    background: #fff;
    border: 2px solid #eee;
    padding: 15px;
    display: inline-block;
    border-radius: 12px;
    margin-bottom: 15px;
}

.copy-input-group {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.copy-input-group input {
    flex: 1;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: #f9f9f9;
    font-family: monospace;
    font-size: 0.9rem;
}

.btn-copy-icon {
    background: #333;
    color: #fff;
    border: none;
    padding: 0 20px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    transition: background 0.2s;
}

.btn-copy-icon:hover {
    background: #000;
}

.loading-payment {
    color: #666;
    font-weight: 500;
    animation: pulse-text 1.5s infinite;
}

@keyframes pulse-text { 50% { opacity: 0.6; } }

/* =========================================
   5. RESPONSIVO (MOBILE)
   ========================================= */
@media (max-width: 900px) {
    .lp-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .lp-hero {
        flex-direction: column;
        padding-top: 0;
    }

    .lp-content {
        order: 2; /* Texto embaixo */
    }

    .lp-visual {
        order: 1; /* Livro em cima */
    }

    .book-3d-mockup {
        width: 240px; /* Menor no mobile */
        margin: 0 auto;
    }

    .lp-title {
        font-size: 2.2rem;
    }

    .checkout-content {
        width: 95%;
    }
}
