/* ==========================================================
   AFILIADOS.CSS — Vitrine VIP & Módulo 2
   * Estilos para Grid Inteligente, Banner A/B e Cards de Alta Conversão.
   ========================================================== */

/* ------------------------------
   BANNER VIP (FUNIL DE CONVERSÃO)
--------------------------------*/
.vip-banner-wrapper {
    background: #0f172a; /* Fundo escuro para destacar o neon do banner */
    /* Padding superior extra grande para compensar o header fixo (ajuste se necessário) */
    padding: 100px 0 50px 0; 
    border-bottom: 4px solid var(--primary, #e60023);
    position: relative;
    overflow: hidden;
}

/* Efeito de brilho de fundo no banner */
.vip-banner-wrapper::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(230, 0, 35, 0.05) 0%, transparent 60%);
    pointer-events: none;
    z-index: 0;
}

/* Container do Funil Lado a Lado */
.vip-funnel-box {
    display: flex;
    align-items: center;
    gap: 50px;
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

/* Área de Texto Persuasivo */
.vip-cta-content {
    flex: 1.2;
    color: #ffffff;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5); /* Melhora a leitura no fundo escuro */
}

.vip-badge-pulse {
    display: inline-block;
    background: rgba(16, 185, 129, 0.15);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.4);
    padding: 6px 16px;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 800;
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    animation: pulse-green 2s infinite;
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.2);
}

@keyframes pulse-green {
    0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4); }
    70% { box-shadow: 0 0 0 12px rgba(16, 185, 129, 0); }
    100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.vip-cta-content h2 {
    font-size: 2.6rem; /* Título maior */
    font-weight: 900;
    line-height: 1.15;
    margin-bottom: 20px;
    color: #ffffff;
    letter-spacing: -0.5px;
}

.vip-cta-content p {
    font-size: 1.15rem;
    color: #e2e8f0;
    line-height: 1.7;
    margin-bottom: 30px;
    font-weight: 400;
}

.vip-cta-content strong {
    color: #fbbf24; /* Amarelo destaque para o bug de preço */
    font-weight: 800;
}

/* Botão Flutuante do CTA */
.btn-vip-cta {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: #ffffff;
    font-size: 1.15rem;
    font-weight: 800;
    padding: 16px 36px;
    border-radius: 50px;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 10px 25px rgba(16, 185, 129, 0.4);
    border: 2px solid rgba(255,255,255,0.1);
}

.btn-vip-cta:hover {
    transform: translateY(-5px) scale(1.03);
    box-shadow: 0 15px 35px rgba(16, 185, 129, 0.6);
    color: #ffffff;
}

.btn-vip-cta i {
    font-size: 1.4rem;
}

/* Imagem 3D do Funil */
.vip-cta-image {
    flex: 1;
    display: flex;
    justify-content: flex-end; /* Alinha a imagem à direita no desktop */
}

.banner-link-3d {
    display: block;
    width: 100%;
    max-width: 550px;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 15px 40px rgba(0,0,0,0.6);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.4s ease;
    border: 1px solid rgba(255,255,255,0.05);
}

.banner-link-3d:hover {
    transform: translateY(-10px) rotate(1deg) scale(1.02);
    box-shadow: 0 20px 50px rgba(16, 185, 129, 0.4); /* Brilho neon no hover alinhado com o botão */
}

.banner-img-fluid {
    width: 100%;
    height: auto;
    display: block;
}

/* ------------------------------
   CABEÇALHO DA SEÇÃO (VITRINE)
--------------------------------*/
.offers-section {
    padding: 60px 0;
    background-color: #f8fafc;
}

.shop-header {
    text-align: center;
    margin-bottom: 50px;
}

.shop-header h2 {
    font-size: 2.4rem;
    font-weight: 900;
    color: #1e293b;
    margin-bottom: 12px;
    letter-spacing: -0.5px;
}

.shop-header p {
    font-size: 1.15rem;
    color: #64748b;
}

/* ------------------------------
   GRID DE OFERTAS
--------------------------------*/
.shop-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
}

/* ------------------------------
   CARD DE OFERTA
--------------------------------*/
.offer-card {
    background: #ffffff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.03);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    position: relative;
    border: 1px solid #f1f5f9;
}

.offer-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.08);
    border-color: #e2e8f0;
}

/* ------------------------------
   BADGES (DESCONTO & FRETE) - LAYOUT EM "X" (Cantos Opostos)
--------------------------------*/
/* O container agora serve apenas como âncora geral (embora as badges sejam absolute) */
.badge-container {
    pointer-events: none; /* Não bloqueia o clique na imagem */
}

/* Selo de Desconto: Fixo no TOPO DIREITO */
.discount-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: #ef4444; /* Vermelho Urgência */
    color: #ffffff;
    padding: 6px 12px;
    font-size: 0.85rem;
    font-weight: 900;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(239, 68, 68, 0.2);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    z-index: 10;
}

/* Selo de Frete Grátis: Fixo na BASE ESQUERDA da área da imagem */
.shipping-badge {
    position: absolute;
    top: 200px; /* Ancorado logo acima da linha do conteúdo */
    left: 15px;
    background: #10b981; /* Verde Sucesso */
    color: #ffffff;
    padding: 6px 12px;
    font-size: 0.8rem;
    font-weight: 800;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(16, 185, 129, 0.2);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    z-index: 10;
}

/* ------------------------------
   IMAGEM DO PRODUTO
--------------------------------*/
.offer-img-wrapper {
    width: 100%;
    height: 240px; /* Altura fixa que serve de referência para o top: 200px do Frete Grátis */
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-bottom: 1px solid #f1f5f9;
    padding: 10px;
    position: relative; /* Mantém a imagem contida */
}

.offer-img-wrapper img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transition: transform 0.4s ease;
}

.offer-card:hover .offer-img-wrapper img {
    transform: scale(1.08);
}

/* ------------------------------
   CONTEÚDO DO CARD
--------------------------------*/
.offer-content {
    padding: 24px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

/* IDENTIDADE VISUAL POR LOJA */
.store-badge {
    font-size: 0.8rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
    color: #64748b;
    display: flex;
    align-items: center;
    gap: 6px;
}

.offer-card[data-vendor*="shopee"] .store-badge { color: #ee4d2d; }
.offer-card[data-vendor*="amazon"] .store-badge { color: #0f1111; }
.offer-card[data-vendor*="mercado"] .store-badge { color: #000000; background: #ffe600; padding: 3px 10px; border-radius: 6px; display: inline-flex; width: fit-content;}

/* TÍTULO DO PRODUTO */
.offer-title {
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1.5;
    margin: 0 0 15px 0;
    flex-grow: 1;
}

.offer-title a {
    color: #334155;
    text-decoration: none;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.2s ease;
}

.offer-title a:hover {
    color: var(--primary, #e60023);
}

/* ------------------------------
   PREÇOS E PARCELAMENTO
--------------------------------*/
.price-container {
    margin-bottom: 24px;
    background: #f8fafc;
    padding: 12px 15px;
    border-radius: 10px;
    border: 1px dashed #cbd5e1;
}

.price-row {
    display: flex;
    align-items: baseline;
    gap: 10px;
    flex-wrap: wrap;
}

.price-old {
    font-size: 0.95rem;
    color: #94a3b8;
    text-decoration: line-through;
    font-weight: 600;
}

.price-current {
    font-size: 1.6rem;
    font-weight: 900;
    color: #10b981; /* Verde atrativo */
    letter-spacing: -0.5px;
}

.installments-info {
    font-size: 0.85rem;
    color: #64748b;
    margin-top: 6px;
}

.installments-info strong {
    color: #334155;
    font-weight: 700;
}

.price-check {
    font-size: 1.15rem;
    font-weight: 800;
    color: #3b82f6;
}

/* ------------------------------
   AÇÕES (CUPOM E BOTÃO)
--------------------------------*/
.offer-actions {
    margin-top: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.coupon-area {
    display: flex;
    align-items: center;
    background: #fffbeb;
    border: 1.5px dashed #f59e0b;
    border-radius: 8px;
    overflow: hidden;
}

.coupon-code {
    flex-grow: 1;
    text-align: center;
    font-family: monospace;
    font-size: 1.05rem;
    font-weight: 800;
    color: #d97706;
    padding: 10px;
    letter-spacing: 1px;
}

.btn-copy {
    background: #f59e0b;
    color: white;
    border: none;
    padding: 10px 16px;
    cursor: pointer;
    font-size: 1.1rem;
    transition: background 0.2s ease;
}

.btn-copy:hover {
    background: #d97706;
}

.btn-shop {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: var(--primary, #e60023);
    color: white;
    text-decoration: none;
    padding: 14px;
    border-radius: 10px;
    font-weight: 800;
    font-size: 1.05rem;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-shop:hover {
    background: #be001b; /* Tom mais escuro */
    box-shadow: 0 6px 15px rgba(230, 0, 35, 0.3);
    transform: translateY(-2px);
}

.offer-card[data-vendor*="shopee"] .btn-shop { background: #ee4d2d; }
.offer-card[data-vendor*="shopee"] .btn-shop:hover { background: #d73a1c; box-shadow: 0 6px 15px rgba(238, 77, 45, 0.3); }

.offer-card[data-vendor*="amazon"] .btn-shop { background: #ff9900; color: #0f1111; }
.offer-card[data-vendor*="amazon"] .btn-shop:hover { background: #e38800; box-shadow: 0 6px 15px rgba(255, 153, 0, 0.3); }

/* ------------------------------
   ESTADOS VAZIOS (ROBÔ)
--------------------------------*/
.empty-shop {
    grid-column: 1 / -1;
    text-align: center;
    padding: 80px 20px;
    background: #ffffff;
    border-radius: 16px;
    border: 2px dashed #cbd5e1;
}

.icon-robot {
    color: #94a3b8;
    margin-bottom: 25px;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-15px); }
    100% { transform: translateY(0px); }
}

.empty-shop h3 {
    font-size: 1.8rem;
    font-weight: 800;
    color: #334155;
    margin-bottom: 12px;
}

.empty-shop p {
    color: #64748b;
    font-size: 1.15rem;
    line-height: 1.6;
}

/* ------------------------------
   TOAST DE NOTIFICAÇÃO (CUPOM)
--------------------------------*/
#toast-message {
    position: fixed;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%) translateY(150px);
    background: #10b981;
    color: white;
    padding: 14px 28px;
    border-radius: 50px;
    font-weight: 800;
    font-size: 1.05rem;
    box-shadow: 0 15px 30px rgba(16, 185, 129, 0.4);
    z-index: 9999;
    opacity: 0;
    transition: all 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    display: flex;
    align-items: center;
    gap: 10px;
    pointer-events: none;
}

#toast-message.toast-visible {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

/* ------------------------------
   RESPONSIVO E FUNIL MOBILE
--------------------------------*/
@media (max-width: 1024px) {
    .vip-banner-wrapper { padding: 120px 20px 50px 20px; }
    .vip-funnel-box { gap: 30px; }
    .vip-cta-content h2 { font-size: 2.2rem; }
}

@media (max-width: 992px) {
    .vip-funnel-box {
        flex-direction: column;
        text-align: center;
        gap: 40px;
    }

    .vip-cta-image { justify-content: center; }
    .vip-cta-content h2 { font-size: 2rem; }

    .btn-vip-cta {
        width: 100%;
        max-width: 400px;
        justify-content: center;
        margin: 0 auto;
    }
}

@media (max-width: 768px) {
    .vip-banner-wrapper { padding: 100px 15px 40px; } /* Ajuste fino para mobile */
    .shop-header h2 { font-size: 2rem; }
    .shop-grid { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 20px; }
    .offer-img-wrapper { height: 200px; }
    
    /* Ajuste para telas menores: o selo de frete sobe junto com a imagem */
    .shipping-badge { top: 160px; }
}

@media (max-width: 480px) {
    .shop-grid { grid-template-columns: 1fr; }
    .offer-img-wrapper { height: 260px; } 
    .shipping-badge { top: 220px; } /* Reajusta a âncora do frete para mobile */
    .vip-cta-content h2 { font-size: 1.8rem; }
    .vip-cta-content p { font-size: 1.05rem; }
}
