/* =====================================================
   ALLFONE CORE - CENTRAL DE IDENTIDADE VISUAL (GLOBAL)
   ===================================================== */

/* 1. PALETE DE CORES OFICIAL (Apenas uma fonte de verdade) */
:root {
    --allfone-purple: #8a2be2;
    --allfone-purple-hover: #731ec2;
    --bg-light: #f4f5f7;        /* O cinza suave que unifica o fundo */
    --border-card: #e2e8f0;     /* Linhas e bordas finas modernas */
    --text-main: #1e293b;       /* Grafite escuro para leitura ideal */
    --text-muted: #64748b;      /* Cinza médio para subtítulos e ID # */
    
    /* Tokens de Suporte (Herança do Ranking antigo para transição) */
    --main-solid: #8a2be2;      /* Força o roxo onde antes era dinâmico */

    --allfone-yellow: #f1c40f;        /* O amarelo vibrante oficial */
    --allfone-yellow-hover: #d4ac0d;  /* Amarelo para quando passa o rato */
    
}

/* 2. MOTOR TIPOGRÁFICO UNIFICADO (CENTRAL) */
/*
body,
/*.site-content .col-full,
.rec-wrapper,
.af-ranking-page,
.af-hub-master-container,
#comparador-wrapper {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}
*/

/* 3. PADRONIZAÇÃO DE TÍTULOS DE TOPO (UNIFICADO) */
.af-ranking-title,
.af-comparador-title,
h1.comp-title {             /* 🌟 Adicionado aqui para matar o roxo/azul */
    font-size: 2.2rem;
    font-weight: 700;
    color: #111111;         /* Força o preto elegante em todas as páginas */
    margin: 0 0 8px 0;
    letter-spacing: -0.5px;
    text-align: center;     /* Garante que fica centrado como no teu ecrã */
}

.rec-top-header h1 {             /* 🌟 Adicionado aqui para matar o roxo/azul */
    font-size: 2.2rem;
    font-weight: 700;
    color: #111111;         /* Força o preto elegante em todas as páginas */
    margin: 0 0 8px 0;
    letter-spacing: -0.5px;
     /*text-align: center;     Garante que fica centrado como no teu ecrã */
}






/* 4. PADRONIZAÇÃO DE SUBTÍTULOS */
.rec-top-header p,
.af-ranking-desc {
    color: var(--text-muted);
    font-size: 1rem ;
    line-height: 1.6;
    margin: 0 auto 40px auto;
}


/* 5. UNIFORMIZAÇÃO DE TABELAS (Estilo Rankings Clean) */
.af-ranking-page table {
    width: 100%;
    border-collapse: collapse;
    background: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    border: 1px solid var(--border-card);
    margin-top: 20px;
}

.af-ranking-page th {
    background-color: var(--bg-light);
    color: var(--text-main);
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
    padding: 16px;
    text-align: left;
    border-bottom: 2px solid var(--border-card);
}

.af-ranking-page td {
    padding: 16px;
    border-bottom: 1px solid var(--border-card);
    color: var(--text-main);
    font-size: 0.95rem;
    vertical-align: middle;
}

/* Efeito suave ao passar o rato nas linhas da tabela */
.af-ranking-page tr:hover td {
    background-color: rgba(138, 43, 226, 0.02); /* Toque subtil de roxo */
}

/* 6. BOTÕES E LINKS DE AÇÃO (Padrão AllFone) */
/* Procura a Secção 6 do teu global.css e atualiza para isto: */
.rec-wrapper .btn,
.af-ranking-page .btn,
.af-ranking-page a.button,
.rec-wrapper a.button {
    background-color: var(--allfone-yellow) !important;
    color: var(--text-main) !important; /* Texto escuro para dar contraste no amarelo */
    padding: 10px 20px !important;
    border-radius: 8px !important;
    font-weight: 600 !important;
    text-decoration: none !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: all 0.2s ease-in-out !important;
    border: none !important;
}

.rec-wrapper .btn:hover,
.af-ranking-page .btn:hover,
.af-ranking-page a.button:hover,
.rec-wrapper a.button:hover {
    background-color: var(--allfone-yellow-hover) !important;
}



/* BOTÕES DE AFILIADOS (AMARELO) */
.rec-btn-purple .rec-action-block,
.rec-btn-yellow,
.af-btn-preco,
.af-btn-oferta {
    background-color: var(--allfone-yellow) !important;
    color: var(--text-main) !important; /* Texto escuro para ler bem no amarelo */
}

/* BOTÕES DE NAVEGAÇÃO INTERNA (ROXO) */
.rec-btn-purple, 
.rec-wrapper .btn,
.rec-wrapper a.button,
.af-ranking-page .btn {
    background-color: var(--allfone-purple) !important;
    color: #ffffff !important;
}


/* Efeito hoover nos mini cards inferiores */
.af-comparison-card-row:hover,
.af-rank-row-item:hover,
.af-accessory-box{
    transform: translateY(-4px); /* Sobe o card ligeiramente */
    border-color: #FF007F; /* Muda a borda para rosa */
    box-shadow: 0 8px 20px rgba(255, 0, 127, 0.15); /* Sombra rosa suave no fundo */
    transition: all 0.3s ease;
    cursor: pointer;
}



/* 🚀 PROTEÇÃO DE LAYOUT: Garante que as imagens nas tabelas de rankings não deformam o site 
.af-col-performance table img,
td img,
.af-hub-column table img {
    max-width: 60px !important; /* Força a imagem a ficar pequenina na tabela
    height: auto !important;
    display: inline-block !important;
    object-fit: contain !important;
}
*/


/*página inicial*/
/* =====================================================
   HOMEPAGE - ESTRUTURA E SEÇÕES DE CONTEÚDO
   ===================================================== */

.af-homepage-wrapper {
    background-color: var(--bg-light);
    color: var(--text-main);
    width: 100%;
    overflow-x: hidden;
}

/* Container de Layout Global */
.af-main-container {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
}

/* Secção Hero */
.af-hero-section {
    padding: 60px 20px;
    background: #ffffff;
}

.af-hero-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
}

.af-hero-text {
    flex: 1;
    min-width: 300px;
    text-align: left;
}

.af-hero-text h1 {
    font-size: 3rem;
    font-weight: 700;
    color: #111111;
    margin-bottom: 16px;
    text-align: left;
}

.af-hero-text p {
    color: var(--text-muted);
    font-size: 1.2rem;
    margin-bottom: 30px;
}

.af-hero-image {
    flex: 1;
    min-width: 300px;
    text-align: right;
}

.af-hero-image img {
    max-width: 100%;
    height: auto;
}



#af-search-results{
    position:absolute;
    top:100%;
    left:0;
    width:100%;
    margin-top:6px;

    background:#fff;
    border-radius:12px;
    box-shadow:0 10px 35px rgba(0,0,0,.18);
    overflow:hidden;
    z-index:9999;
}

.af-search-item{
    display:flex;
    align-items:center;
    gap:12px;
    padding:12px 15px;
    cursor:pointer;
    transition:.2s;
}

.af-search-item:hover{
    background:#f5f5f5;
}

.af-search-box input {
    width: 100%;
    padding: 16px 20px;
    border: 1px solid var(--border-card);
    border-radius: 50px;
    font-size: 1rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.03);
}

.af-search-box button {
    position: absolute;
    right: 0px;
    top: 50%;
    transform: translateY(-50%);
    background: var(--allfone-purple);
    border: none;
    padding: 10px 20px;
    color: #fff;
    border-radius: 25px;
    cursor: pointer;
}

/* Badges de Confiança */
.af-trust-badges {
    margin-top:20px!important;
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.af-badge-item {
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* Cabeçalhos de Secção Únicos (Flexbox para alinhar com o link lateral) */
.af-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.af-section-header h2 {
    font-size: 1.8rem;
    font-weight: 700;
    margin: 0;
}

.af-section-header a {
    color: var(--allfone-purple);
    text-decoration: none;
    font-weight: 600;
}

/* Grids Responsivas */
.af-grid-smartphones {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 60px;
}

.af-grid-categories {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 16px;
    margin-bottom: 60px;
}

.af-grid-versus {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px;
    margin-bottom: 60px;
}

.af-grid-rankings {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px;
    margin-bottom: 60px;
}

/* Estilização interna dos Cards */
.af-comparison-card-row {
    background: #ffffff;
    border: 1px solid var(--border-card);
    padding: 24px;
    border-radius: 12px;
    text-align: center;
}

.af-comparison-card-row img.af-thumb-phone {
    max-height: 150px;
    margin-bottom: 16px;
}

.af-comparison-card-row h3 {
    font-size: 1.1rem;
    margin: 0 0 8px 0;
}

.af-comparison-card-row p {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-bottom: 16px;
}

.af-comparison-card-row .btn {
    width: 100%;
    box-sizing: border-box;
    margin-bottom: 10px;
}

.af-card-link-purple {
    color: var(--allfone-purple);
    text-decoration: none;
    font-size: 0.85rem;
    display: block;
}

/* =====================================================
   HUB INDIVIDUAL - ADAPTAÇÃO DO FUNDO GALÁCTICO
   ===================================================== */
/*
.af-hub-dark-section {
    /* Garante uma cor sólida escura por baixo para se fundir caso a imagem falhe 
    background-color: #0d092a !important; 
    /* Aumenta o padding vertical para o planeta aparecer atrás dos elementos 
    padding: 60px 0 60px 0 !important;
    width: 100% !important;
    box-sizing: border-box;
}
*/

/* ATUALIZAÇÃO DO PAINEL SUPERIOR DO PRODUTO */
.af-hub-dark-section {
    /* REMOVIDO o linear-gradient !important antigo que bloqueava tudo */
    background-color: #0d092a !important; 
    color: #ffffff !important;
    padding: 60px 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    
    /* COMPORTAMENTO DO FUNDO */
    background-size: cover !important;
    background-position: center center !important;
    background-repeat: no-repeat !important;
}


/* Garante que os textos da identidade do smartphone continuam com leitura pura a branco */
.af-product-heading .af-hub-main-title {
    color: #ffffff !important;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.af-hub-brand-label {
    color: var(--allfone-purple) !important;
    font-weight: 700;
}



/* Elementos Internos do Bloco Versus */
.af-vs-block {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin-bottom: 12px;
}

.af-vs-block img {
    max-height: 80px;
}

.af-vs-badge {
    background: var(--bg-light);
    padding: 5px 10px;
    border-radius: 50%;
    font-weight: 700;
    font-size: 0.8rem;
}

.af-comparison-card-row h4 {
    margin: 0 0 12px 0;
    font-size: 0.95rem;
}

.af-comparison-card-row .af-vs-link {
    color: var(--allfone-purple);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
}

/* Elementos do Card de Categoria de Acessório */
.af-accessory-box {
    background: #ffffff;
    border: 1px solid var(--border-card);
    padding: 20px;
    border-radius: 12px;
    text-align: center;
}

.af-accessory-box img {
    max-height: 100px; /*tamanho imagens página acessórios-capas*/
    margin-bottom: 12px;
}

.af-accessory-box h4 {
    margin: 0 0 4px 0;
    font-size: 1rem;
}

.af-accessory-box p {
    color: var(--text-muted);
    font-size: 0.8rem;
    margin: 0;
}

/* Card de Listagem de Ranking */
.af-ranking-list-card {
    background: #ffffff;
    border: 1px solid var(--border-card);
    padding: 24px;
    border-radius: 12px;
}

.af-ranking-list-card h3 {
    font-size: 1.1rem;
    margin: 0 0 20px 0;
}

.af-ranking-list-card ol {
    padding-left: 20px;
    margin: 0 0 20px 0;
    line-height: 2;
}

.af-ranking-list-card a {
    color: var(--allfone-purple);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
}

/* Secção de Filtros / Selecionador de Modelos */
.af-filter-section {
    background: #ffffff;
    border: 1px solid var(--border-card);
    padding: 30px;
    border-radius: 12px;
    margin-bottom: 60px;
    text-align: center;
}

.af-filter-section h3 {
    font-size: 1.5rem;
    margin: 0 0 8px 0;
}

.af-filter-section p {
    color: var(--text-muted);
    margin-bottom: 24px;
}

.af-filter-controls {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.af-filter-controls select {
    padding: 12px 20px;
    border-radius: 8px;
    border: 1px solid var(--border-card);
    min-width: 200px;
}

/* Secção de Newsletter */
.af-newsletter-section {
    background: var(--text-main);
    color: #ffffff;
    padding: 40px 20px;
    text-align: center;
}

.af-newsletter-container {
    max-width: 600px;
    margin: 0 auto;
}

.af-newsletter-container h3 {
    font-size: 1.6rem;
    margin: 0 0 8px 0;
}

.af-newsletter-container p {
    color: var(--text-muted);
    margin-bottom: 24px;
}

.af-newsletter-form {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
}

.af-newsletter-form input {
    padding: 12px 20px;
    border-radius: 8px;
    border: none;
    min-width: 300px;
}

/* ========================================
   GUIAS E ARTIGOS - home css adicional
======================================== */

.af-section-artigos{
    margin:60px 0;
}

.af-grid-artigos{
    display:grid;
    grid-template-columns:repeat(4,1fr);
    gap:24px;
}

.af-article-card{
    display:flex;
    flex-direction:column;
    background:#fff;
    border:1px solid #e7eaf3;
    border-radius:14px;
    overflow:hidden;
    text-decoration:none;
    color:inherit;
    transition:.25s;
}

.af-article-card:hover{
    transform:translateY(-4px);
    box-shadow:0 10px 25px rgba(0,0,0,.08);
}

.af-article-image{
    aspect-ratio:16/9;
    background-size:cover;
    background-position:center;
}

.af-article-content{
    padding:18px;
}

.af-article-content h4{
    margin:0 0 10px;
    font-size:18px;
    line-height:1.3;
}

.af-article-excerpt{
    color:#6b7280;
    font-size:14px;
    line-height:1.5;
    margin-bottom:15px;
}

.af-article-date{
    font-size:13px;
    color:#9ca3af;
}

/*rankings na Homepage */
.af-ranking-top3{
    list-style:none;
    margin:15px 0;
    padding:0;
}

.af-ranking-top3 li{
    display:flex;
    align-items:center;
    gap:10px;
    margin-bottom:12px;
}

.af-ranking-top3 img{
    width:40px;
    height:40px;
    object-fit:contain;
    border-radius:8px;
    background:#fff;
    border:1px solid #eee;
    flex-shrink:0;
}

.af-ranking-top3 span{
    font-size:.95rem;
    line-height:1.3;
}


/* =====================================================
   HOMEPAGE - SECÇÃO DE SERVIÇOS E COBERTURA
   ===================================================== */
/* =====================================================
   HOMEPAGE - SECÇÃO DE SERVIÇOS E COBERTURA (CORRIGIDO)
   ===================================================== */

.af-services-section {
    margin-bottom: 60px;
    width: 100%;
}

/* Banner de Destaque com fluxo vertical empilhado */
.af-coverage-banner {

    background:
        linear-gradient(
            to bottom,
            rgba(11,21,60,.80) 0%,
            rgba(11,21,60,.55) 40%,
            rgba(11,21,60,.15) 65%,
            rgba(11,21,60,.55) 100%
        ),
        url("images/homepage/banner-casa.webp");

    background-repeat: no-repeat;
    background-position: center 75%;
    background-size: cover;

    border-radius: 16px;
    padding: 60px 40px 80px;
    color: #fff;
}

/* Bloco de Textos (Fica no Topo) */
.af-coverage-info {
    width: 100%;
}

.af-coverage-badge {
    background: rgba(138, 43, 226, 0.3);
    color: #a855f7;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.5px;
    display: inline-block;
    margin-bottom: 16px;
}

.af-coverage-info h2 {
    font-size: 2.2rem;
    font-weight: 700;
    color: #ffffff;
    margin: 0 0 12px 0;
    line-height: 1.2;
}

.af-coverage-info p {
    color: #94a3b8;
    font-size: 1.05rem;
    margin: 0 0 24px 0;
}

.af-coverage-features {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.af-feat-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: #cbd5e1;
}

.af-feat-icon {
    background: rgba(255, 255, 255, 0.1);
    padding: 6px;
    border-radius: 8px;
    font-size: 1.1rem;
}

/* Bloco da Imagem e Ação (Fica estritamente por baixo dos textos) */
.af-coverage-action {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    margin-top: 25px;
}

.af-btn-coverage {
    margin-left: 370px;   /* ajusta ao gosto */
}

.af-coverage-help-text {
    margin-left: 390px;
}

.af-coverage-media-box img {
    display: block;
    width: 100%;
    height: auto;
}


.af-btn-coverage {
    background-color: var(--allfone-purple) !important;
    color: #ffffff !important;
    padding: 14px 45px !important;
    border-radius: 8px !important;
    font-weight: 600 !important;
    text-decoration: none !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 10px;
    font-size: 1.05rem;
    transition: all 0.2s ease-in-out !important;
    border: none !important;
    box-shadow: 0 4px 14px rgba(138, 43, 226, 0.4);
}

.af-btn-coverage:hover {
    background-color: var(--allfone-purple-hover) !important;
    transform: translateY(-2px);
}

.af-coverage-help-text {
    font-size: 0.8rem;
    color: #64748b;
    margin-top: 10px;
    display: block;
}


/* =====================================================
   HOMEPAGE - GRELHA DE 3 CARTÕES DE SERVIÇOS INFERIORES
   ===================================================== */

/* Container da Grelha em 3 Colunas Horizontais */
.af-services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 24px;
    width: 100%;
    box-sizing: border-box;
}

/* O Cartão Individual Branco */
.af-service-subcard {
    background: #ffffff;
    border: 1px solid var(--border-card);
    border-radius: 12px;
    padding: 24px;
    display: flex;
    align-items: flex-start;
    gap: 16px;
    transition: all 0.3s ease;
    text-align: left;
    box-sizing: border-box;
}

/* Efeito de Elevação Suave ao passar o rato (Roxo AllFone) */
.af-service-subcard:hover {
    transform: translateY(-4px);
    border-color: var(--allfone-purple);
    box-shadow: 0 8px 24px rgba(138, 43, 226, 0.08);
}

/* Caixa Quadrada Cinza do Ícone/Emoji */
.af-service-icon-box {
    background: var(--bg-light);
    padding: 12px;
    border-radius: 10px;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 48px;
    height: 48px;
    box-sizing: border-box;
}

/* Título Interno do Serviço */
.af-service-text h3 {
    margin: 0 0 6px 0;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-main);
    line-height: 1.3;
}

/* Texto de Descrição do Serviço */
.af-service-text p {
    margin: 0 0 14px 0;
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.5;
}

/* Link de Ação (Seta Roxa) */
.af-service-link {
    color: var(--allfone-purple);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: inline-block;
    transition: color 0.2s ease;
}

.af-service-link:hover {
    color: var(--allfone-purple-hover);
}



/*simbolos svg*/
/* Garante que os novos ícones herdam o roxo da AllFone e centram direitinho */
.af-service-icon-box svg {
    color: var(--allfone-purple);
    width: 24px;
    height: 24px;
    display: block;
}

/* ========================================
   MOBILE
======================================== */

@media (max-width:768px){

    .af-grid-artigos{
        grid-template-columns:repeat(2,1fr);
        gap:16px;
    }

    .af-article-card{
        min-width:0;
    }

    .af-article-card img{
        width:100%;
        height:110px;
        object-fit:cover;
    }

    .af-article-card h3{
        font-size:15px;
        line-height:1.3;

        display:-webkit-box;
        -webkit-line-clamp:2;
        -webkit-box-orient:vertical;
        overflow:hidden;
    }

}


/* página capas-home ou acessorios-home */
/* =====================================================
   MONTRA DE ACESSÓRIOS - CABEÇALHOS DO MODO ESCURO
   ===================================================== */

.af-category-header {
    margin-top: 60px;
    margin-bottom: 24px;
    text-align: left;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.af-header-title-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Ícones vetoriais com o roxo oficial da AllFone */
.af-header-title-row svg {
    color: var(--allfone-purple);
    display: block;
    flex-shrink: 0;
}

/* Letras brancas para rebentar com o fundo escuro */
.af-header-title-row h2 {
    font-size: 1.8rem;
    font-weight: 400;
    color: #ffffff !important;
    margin: 0;
    letter-spacing: -0.5px;
}

/* Subtítulo em cinza claro para manter a hierarquia e o contraste */
.af-category-header p {
    color: #cbd5e1 !important;
    font-size: 0.95rem;
    margin: 0;
    padding-left: 40px;
    font-weight: 400;
}

/* ======================================================
   RESULTADOS DA PESQUISA
====================================================== */

#af-search-results {

    position: absolute;

    top: calc(100% + 10px);

    left: 0;

    width: 100%;

    background: #fff;

    border-radius: 16px;

    box-shadow: 0 15px 35px rgba(0,0,0,.15);

    overflow: hidden;

    z-index: 9999;

    display: flex;

    flex-direction: column;

}

/* Cada resultado */

.af-search-item {

    display: flex;

    align-items: center;

    gap: 15px;

    padding: 14px 18px;

    cursor: pointer;

    transition: .2s;

    border-bottom: 1px solid #f1f1f1;

}

.af-search-item:last-child{

    border-bottom:none;

}

.af-search-item:hover{

    background:#f7f8fc;

}

/* Imagem */

.af-search-item img{

    width:52px;

    height:52px;

    object-fit:contain;

    flex-shrink:0;

}

/* Texto */

.af-search-info{

    display:flex;

    flex-direction:column;

}

.af-search-info strong{

    color:#222;

    font-size:15px;

    font-weight:700;

}

.af-search-info small{

    color:#777;

    font-size:13px;

}

/* Barra de Pesquisa Hero */
/*caixa pesquisa quando abre*/
/* ==========================================================
   PESQUISA (Hero + Pesquisa inferior)
========================================================== */
/* ==========================================================
   PESQUISA (Hero + Pesquisa inferior)
========================================================== */

.af-search-box,
.af-filter-controls{
    position:relative;
    width:100%;
    max-width:520px;
    margin:0 auto;
}

/* Inputs */

#af-home-search,
#af-filter-modelo{
    width:100%;
    border-radius:16px;
    transition:.2s;
}

/* Quando a lista está aberta */

.af-search-open{
    border-bottom-left-radius:0 !important;
    border-bottom-right-radius:0 !important;
}

/* Caixa de resultados */

#af-search-results,
#af-filter-results{

    position:absolute;
    top:calc(100% + 2px);
    left:0;

    width:100%;

    background:#fff;

    border-radius:0 0 16px 16px;

    overflow:hidden;
    overflow-y:auto;

    max-height:320px;

    box-shadow:0 15px 35px rgba(0,0,0,.18);

    z-index:9999;
}

/* Cada resultado */

.af-search-item{

    display:flex;
    align-items:center;
    gap:12px;

    padding:12px 16px;

    cursor:pointer;

    transition:.15s;

    border-bottom:1px solid #eee;
}

.af-search-item:last-child{
    border-bottom:none;
}

.af-search-item:hover{
    background:#f5f7fb;
}

/* Imagem */

.af-search-item img{

    width:46px;
    height:46px;

    object-fit:contain;

    flex-shrink:0;
}

/* Texto */

.af-search-info strong{
    display:block;
    font-size:15px;
    color:#222;
}

.af-search-info small{
    color:#666;
    font-size:13px;
}


/* =====================================================
   HOMEPAGE - BARRA DE LOGÓTIPOS DE MARCAS
   ===================================================== */

/* =====================================================
   HOMEPAGE - BARRA DE LOGÓTIPOS DE MARCAS DOMESTICADA
   ===================================================== */

.af-home-brands-section {
    text-align: center;
    margin: 40px auto;
    max-width: 800px;
    padding: 0 20px;
}

.af-home-brands-title {
    font-size: 0.95rem;
    color: #64748b;
    font-weight: 600;
    margin-bottom: 20px;
}

.af-home-brands-grid {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 30px;
    flex-wrap: wrap;
}

/* A caixa branca que guarda o logótipo */
.af-home-brand-item {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    width: 140px;
    height: 65px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
    transition: all 0.2s ease-in-out;
    text-decoration: none;
}

/* DOMA O GIGANTE: Limita o tamanho máximo de qualquer imagem de logótipo */
.af-home-brand-item img {
    max-width: 110px !important;
    max-height: 45px !important;
    object-fit: contain !important;
    display: block;
    filter: grayscale(100%); /* Fica cinzento elegante em repouso */
    opacity: 0.6;
    transition: all 0.2s ease-in-out;
}

/* EFEITO HOVER: Ativa a cor original e levanta o botão */
.af-home-brand-item:hover {
    border-color: var(--allfone-purple);
    transform: translateY(-3px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.05);
}

.af-home-brand-item:hover img {
    filter: grayscale(0%) !important; /* Devolve o azul da Samsung, etc. */
    opacity: 1;
}


/* cor dos svg*/
/* Altera a cor de todos os ícones SVG dentro dos cartões para roxo */

/* Entra na div do cartão, depois na div filha e aplica ao SVG */


/*homepage - parte do carrosel */
/* ====================================================
   ESTILOS DO CARROSSEL DO TOPO (ALLFONE STYLE)
   ==================================================== */

/* Contentor Geral da Secção */
/* Contentor Geral da Secção - Atualizado para Fullwidth */
.af-top-carousel {
  position: relative;
  width: 100vw;               /* Força a largura a ocupar 100% da janela do ecrã */
  left: 50%;                  /* Move o carrossel para o meio */
  right: 50%;
  margin-left: -50vw;         /* Puxa as laterais para fora do contentor do site */
  margin-right: -50vw;
  margin-bottom: 40px;        /* Mantém o espaço para a secção de baixo */
  background-color: #0b0d17;  /* Fundo escuro */
  border-radius: 0;           /* Remove os cantos arredondados nas pontas do ecrã */
  overflow: hidden;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05); /* Linha subtil em vez de borda total */
}




/* Contentor Interno dos Slides */
.af-carousel-container {
  position: relative;
  height: 480px; /* Altura ideal para destacar o artigo e o telemóvel */
  width: 100%;
}

/* Regras para cada Painel (Slide) */
/*
.af-carousel-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.6s ease-in-out, visibility 0.6s ease-in-out;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 60px;
  box-sizing: border-box;
}
*/
/* correção Cada slide passa a ser um contentor relativo para o fundo */
.af-carousel-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.6s ease-in-out, visibility 0.6s ease-in-out;
  display: flex;
  align-items: center;
  padding: 0 80px; /* Mais espaço nas laterais */
  box-sizing: border-box;
}




/* Estado Ativo (O slide que está a aparecer) */
.af-carousel-slide.active {
  opacity: 1;
  visibility: visible;
  position: relative;
}

/* Bloco de Textos (Lado Esquerdo) */
/*
.af-slide-info {
  max-width: 55%;
  z-index: 2;
}
*/
/* correção O texto ganha mais destaque e largura */
.af-slide-info {
  max-width: 65%; /* O texto pode esticar um pouco mais */
  z-index: 3;     /* Fica obrigatoriamente por cima da imagem */
  position: relative;
  /* Um truque: adicionamos uma sombra preta muito leve atrás das letras 
     para garantir que o texto se lê SEMPRE bem, mesmo que a imagem por baixo seja clara */
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.8); 
}


/* Badge / Etiqueta Roxa */
.af-slide-badge {
  display: inline-block;
  background-color: #4d0099; /* Roxo AllFone */
  color: #ffffff;
  padding: 6px 14px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-radius: 6px;
  margin-bottom: 20px;
}

/* Título do Artigo */
.af-slide-info h2 {
  font-size: 2.3rem;
  font-weight: 800;
  line-height: 1.2;
  color: #ffffff;
  margin: 0 0 15px 0;
}

/* Resumo do Texto */
.af-slide-info p {
  font-size: 1.05rem;
  line-height: 1.5;
  color: #a0a5b5; /* Texto esbatido */
  margin: 0 0 35px 0;
}

/* Bloco de Botões de Ação */
.af-slide-actions {
  display: flex;
  gap: 15px;
  align-items: center;
}

/* Botão Principal Amarelo (Ler análise) */
.af-btn-primary {
  background-color: #ffcc00; /* Amarelo AllFone */
  color: #000000;
  padding: 14px 28px;
  font-size: 0.95rem;
  font-weight: 700;
  text-decoration: none;
  border-radius: 30px;
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.af-btn-primary:hover {
  background-color: #e6b800;
  transform: translateY(-2px);
}

/* Botão Secundário Transparente/Borda (Ver Ficha) */
.af-btn-secondary {
  background-color: transparent;
  color: #ffffff;
  padding: 14px 24px;
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 30px;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

.af-btn-secondary:hover {
  background-color: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.4);
}

/* Espaço da Imagem (Lado Direito) */
/*
.af-slide-image {
  max-width: 40%;
  height: 90%;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
}
*/
/* correção A imagem passa a ser o fundo total do painel */
.af-slide-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  max-width: 100%; /* Anula o limite anterior */
  z-index: 1;      /* Fica no fundo */
}



/* Imagem do Artigo */
/*
.af-slide-image img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain; /* Garante que o telemóvel não fica deformado 
  filter: drop-shadow(0px 20px 30px rgba(0, 0, 0, 0.7)); /* Sombra realista por trás do smartphone 
}
*/
/* correção Ajuste da imagem para cobrir o bloco todo */
.af-slide-image img {
  width: 100%;
  height: 100%;
  object-fit: cover; /* Força a imagem a preencher o bloco sem deformar */
  filter: none;      /* Remove a sombra antiga */
}

/* correção O TRUQUE CRUCIAL: Uma película escura sobre a imagem */
.af-slide-image::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  /* Cria um degradê que começa escuro na esquerda (onde estão as letras) 
     e fica mais transparente na direita (onde costuma estar o foco da foto) */
  /*background: linear-gradient(90deg, rgba(11, 13, 23, 0.95) 30%, rgba(11, 13, 23, 0.4) 100%);*/
  background: linear-gradient(90deg, rgba(11, 13, 23, 0.90) 40%, rgba(11, 13, 23, 0.15) 100%);
  z-index: 2;
}


/* Setas de Navegação Laterais */
.af-carousel-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #ffffff;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  z-index: 10;
  transition: background 0.2s, border-color 0.2s;
}

.af-carousel-nav:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
}

.af-carousel-nav.prev { left: 20px; }
.af-carousel-nav.next { right: 20px; }

/* Pontos Indicadores (Fundo Central) */
.af-carousel-dots {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 10;
}

.af-dot {
  width: 24px; /* Formato de linha minimalista moderno */
  height: 4px;
  background-color: rgba(255, 255, 255, 0.2);
  border-radius: 2px;
  cursor: pointer;
  transition: background-color 0.3s ease, width 0.3s ease;
}

.af-dot.active {
  background-color: #ffcc00; /* Fica amarelo quando ativo */
  width: 35px; /* Estica ligeiramente para dar efeito de foco */
}

/* ====================================================
   RESPONSIVIDADE (MOBILE & TABLET)
   ==================================================== */
   /*
@media (max-width: 992px) {
  .af-carousel-container { height: auto; min-height: 550px; }
  .af-carousel-slide { flex-direction: column-reverse; padding: 40px 30px; text-align: center; justify-content: center; }
  .af-slide-info { max-width: 100%; margin-top: 30px; }
  .af-slide-actions { justify-content: center; flex-direction: column; gap: 10px; }
  .af-btn-primary, .af-btn-secondary { width: 100%; box-sizing: border-box; }
  .af-slide-image { max-width: 60%; height: 200px; }
  .af-carousel-nav { display: none; } /* Esconde as setas no mobile, usa-se o swipe ou os pontos 
}
*/
/* ====================================================
   RESPONSIVIDADE (MOBILE & TABLET) - ATUALIZADO
   ==================================================== */
@media (max-width: 992px) {
  /* Força o carrossel a ocupar a largura total também no mobile */
  .af-top-carousel {
    width: 100vw;
    margin-left: -50vw;
    left: 50%;
    position: relative;
  }

  .af-carousel-container { 
    height: 500px; /* Altura fixa confortável para o telemóvel */
  }

  .af-carousel-slide { 
    padding: 30px 20px; 
    align-items: flex-end; /* Empurra o texto para o fundo do ecrã */
  }

  /* O texto ocupa a largura toda e ganha uma sombra para ler melhor */
  .af-slide-info { 
    max-width: 100%; 
    margin-top: 0;
    text-align: center;
    z-index: 3;
  }

  /* Diminui o título para não ocupar o ecrã mobile todo */
  .af-slide-info h2 {
    font-size: 1.6rem;
    margin-bottom: 10px;
  }

  /* Encurta o espaço do resumo */
  .af-slide-info p {
    font-size: 0.95rem;
    margin-bottom: 25px;
  }

  /* Organiza os botões um por cima do outro com espaço */
  .af-slide-actions { 
    flex-direction: column; 
    gap: 12px; 
    width: 100%;
  }

  .af-btn-primary, .af-btn-secondary { 
    width: 100%; 
    box-sizing: border-box; 
    text-align: center;
    padding: 12px 20px;
  }

  /* TRUQUE PARA MOBILE: Mudar o degradê para vertical */
  .af-slide-image::after {
    background: linear-gradient(0deg, rgba(11, 13, 23, 0.95) 0%, rgba(11, 13, 23, 0.6) 50%, rgba(11, 13, 23, 0.2) 100%);
  }
}



