/* =====================================================
   ALLFONE SINGLE HUB - ESTRUTURA GERAL DE SUPORTE
   ===================================================== */
.af-hub-master-container,
.af-hub-master-container * {
    box-sizing: border-box;
}

.af-hub-master-container {
    width: 100%;
    max-width: 1440px;
    margin: 20px auto;
    padding: 0 10px;
    
}

/* =====================================================
   PAINEL SUPERIOR ESCURO (DARK PREMIUM - SEM EFEITO CARTÃO)
   ===================================================== */
.af-hub-dark-section {
    /*background: linear-gradient(135deg, #111424 0%, #1a1d36 100%) !important; /* 🌟 Devolve o fundo azul-escuro premium */
    color: #ffffff !important;
    padding: 40px !important;
    border-radius: 0 !important;        /* 🌟 Mantém sem o efeito de cantos de cartão */
    box-shadow: none !important;        /* 🌟 Sem sombras de caixa */
    width: 100vw !important;            /* 🌟 Força o fundo a esticar até às bordas do ecrã */
    position: relative !important;
    left: 50% !important;
    right: 50% !important;
    margin-left: -50vw !important;
    margin-right: -50vw !important;
     margin-top: -20px !important;
}

.af-hub-grid-layout {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    /*align-items: start;*/
    align-items: start; /* 🌟 Mudado de 'start' para 'flex-end' para puxar tudo para a base */
    gap: 30px;
}

.af-hub-column {
    display: flex;
    flex-direction: column;
    color: #04114d !important;
}

/* COLUNA 1: IMAGEM DO EQUIPAMENTO */
/*
.af-hub-image-wrapper {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 15px;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 550px;
}
    */

/* COLUNA 1: IMAGEM DO EQUIPAMENTO (MAIOR E ALINHADA POR BAIXO) */
.af-single-product-media {
    background: rgba(255,255,255,.05);
    border: 1px solid rgba(255,255,255,.1);
    border-radius: 12px;
    padding: 20px;
    
    display:flex;
    flex-direction: column;
    justify-content:center;
    align-items:flex-end;

    min-height:520px;

    position: relative;
    cursor: zoom-in;

    max-width: 320px; /* Ajusta à largura atual da tua coluna */
    height: 430px;    /* Tranca a altura limite aqui */
  
}

/* 📱 REGRA EXCLUSIVA PARA TELEMÓVEIS (Ecrãs até 768px) */
@media (max-width: 768px) {
    .af-single-product-media {
        overflow: hidden !important; /* Tranca o zoom inline dentro do quadrado no telemóvel */
    }

/* 🚀 CORREÇÃO DA DEFORMAÇÃO: Força o zoom mobile a respeitar as proporções */
    #foto-telemovel {
        width: auto !important;
        
        height: 450px !important;
        object-fit: contain !important;
        transform: none !important; /* Impede que a biblioteca tente rodar ou esticar a foto */
    }

}/*fim media query */


/* Garante que a imagem se adapta ao limite sem esticar nem deformar */
#foto-telemovel {
    width: auto;
    height: 100%;
    max-height: 280px !important; /* Obriga a respeitar o teto máximo */
    object-fit: contain !important; /* Mantém a proporção e centra as fotos mais altas */
    display: block;
    margin: 0 auto;
}


.af-single-product-media img.af-single-img {
    width:auto;
    height:auto;

    max-height:420px!important;
    max-width:100%;

    object-fit:contain;
    display:block;
}


.af-product-heading{
    width:100%;
    text-align:center;
    margin-bottom:20px;
}

.af-product-heading .af-brand{
    display:block;
    font-size:14px;
    color:#a0aec0;
}

.af-product-heading h1{
    background:linear-gradient(90deg,#ffffff,#d8d8ff);
    -webkit-background-clip:text;
    -webkit-text-fill-color:transparent;
}





.af-hub-main-title {
    font-size: 28px;
    font-weight: 700;
    color: #ffffff;
    margin: 15px 0 5px 0;
}

.af-hub-brand-label {
    font-size: 20px;
    color: #a0aec0;
}

/* COLUNA 2: SCORES EM CÍRCULO E BARRAS GLOW - correção por media query inversa: só faz em smartphones e tablets*/
@media (min-width: 768px) {
    .af-hub-score-badge {
        display: flex; 
        align-items: center;
        gap: 15px;
    }
}

.af-hub-score-badge {
    background: rgb(255 255 255 / .03);
    padding: 15px;
    border-radius: 12px;
    border-left: 5px solid #d53f8c;
    margin-bottom: 20px;
}

.af-hub-circle {
    background: linear-gradient(135deg, #b83280 0%, #805ad5 100%);
    width: 70px;
    height: 70px;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.af-hub-score-number {
    font-size: 22px;
    font-weight: 800;
    color: #ffffff;
    line-height: 1;
}

.af-hub-score-max {
    font-size: 18px;
    opacity: 0.8;
    color: #ffffff;
    margin-top: 2px;
}

.af-hub-badge-text h2 {
    font-size: 16px;
    margin: 0;
    color: #ffffff;
}

.af-hub-bars-container {
    background: rgba(0, 0, 0, 0.18);
    border-radius: 12px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.af-hub-bar-row {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.af-hub-bar-info {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    color: #e2e8f0;
    
}

.af-hub-bar-info strong {
    color: #63b3ed;
}

.af-hub-bar-bg {
    background: rgba(255, 255, 255, 0.15);
    height: 8px;
    border-radius: 4px;
    overflow: hidden;
}

.af-hub-bar-fill {
    background: linear-gradient(135deg, #b83280 0%, #805ad5 100%);
    height: 100%;
    border-radius: 4px;
    transition: width 1s ease-in-out;
}

/* COLUNA 3: CARD DE AFILIADOS */
.af-hub-price-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    padding: 20px;
}

.af-hub-price-card h3 {
    font-size: 14px;
    margin: 0;
    color: #ffffff;
    text-transform: uppercase;
}

.af-hub-large-price {
    margin: 15px 0;
}

.af-hub-large-price span {
    font-size: 22px;
    font-weight: 700;
    color: #ffffff;
}

.af-hub-price-footer {
    color: #718096;
    font-size: 12px;
}

.af-btn-hub-buy {
    transition: background 0.2s ease, transform 0.2s ease;
}

/* EFEITO HOVER PREMIUM SEM BORDA ROSA CONTRASTANTE */
.af-btn-hub-buy:hover {
    background: #FFE066;
    color: #111424;
    transform: scale(1.03) translateY(-1px); /* Micro-escala que funciona como íman visual */
    box-shadow: 0 6px 15px rgba(255, 204, 0, 0.25);
    transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275), background 0.2s ease, box-shadow 0.2s ease;
}


/* =====================================================
   PAINEL INFERIOR CLARO (FICHA TÉCNICA E ABAS)
   ===================================================== */
.af-hub-light-section {
    background: #ffffff;
    width: 100%;
    margin-top: 25px;
    border-top: 1px solid #e2e8f0;
    color: #212529;
}

.af-hub-light-content {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
    box-sizing: border-box;
}

/* MENUS DE ABAS CLICÁVEIS */
.af-tabs-menu {
    display: flex;
    gap: 10px;
    border-bottom: 2px solid #e2e8f0;
    padding-bottom: 0;
    margin-bottom: 35px;
}

.af-tab-btn {
    background: none;
    border: none;
    padding: 12px 20px;
    font-size: 14px;
    font-weight: 600;
    color: #4a5568;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    transition: all 0.2s ease;
}

.af-tab-btn.active {
    color: #805ad5;
    border-bottom-color: #805ad5;
}

/* LAYOUT DOS CARTÕES TÉCNICOS */
.af-overview-three-cols {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    gap: 20px;
    align-items: stretch;
    width: 100%;
}

.af-overview-col.af-card-box {
    flex: 1;
    background: #fdfdfd;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.02);
    display: flex;
    flex-direction: column;
}

.af-overview-col h3 {
    font-size: 15px;
    font-weight: 700;
    color: #1a202c;
    border-bottom: 2px solid #edf2f7;
    padding-bottom: 8px;
    margin-bottom: 20px;
    letter-spacing: 0.5px;
}

/* BARRAS AZUIS DA VISÃO GERAL (COLUNA 1) */
.af-score-row-light {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
    font-size: 14px;
}

.af-score-label-light {
    width: 90px;
    color: #4a5568;
    text-align: left;
}

.af-score-bar-bg-light {
    flex-grow: 1;
    background: #edf2f7;
    height: 6px;
    border-radius: 3px;
    margin: 0 15px;
    overflow: hidden;
}

.af-score-bar-fill-light {
    background: #805ad5;
    height: 100%;
    border-radius: 3px;
}

.af-score-val-light {
    width: 35px;
    font-weight: 700;
    color: #1a202c;
    text-align: right;
}

/* ESPECIFICAÇÕES TEXTUAIS (COLUNA 2) */
.af-specs-list-light {
    display: flex;
    flex-direction: column;
    gap: 10px;
    text-align: left;
    font-size: 14px;
}

.af-spec-item-light span {
    color: #1a202c;
    margin-left: 5px;
}

.af-link-more-specs {
    display: block;
    margin-top: 20px;
    font-size: 12px;
    font-weight: 700;
    color: #805ad5;
    text-decoration: none;
    text-align: left;
}

/* RESUMO E BADGES DE TEXTO (COLUNA 3) */
.af-summary-list-light {
    display: flex;
    flex-direction: column;
    gap: 12px;
    text-align: left;
    font-size: 14px;
    color: #2d3748;
}

.af-summary-checkmark {
    color: #2f855a;
    font-weight: 500;
    display: flex;
    align-items: flex-start;
    gap: 8px; /* Dá o espaçamento perfeito entre o visto e o início do texto */
    line-height: 1.5;
    text-align: left;
}

.af-box-ideal-for {
    margin-top: 25px;
    background: #ebf8ff;
    border: 1px solid #bee3f8;
    border-radius: 8px;
    padding: 15px;
    font-size: 13px;
    color: #2b6cb0;
    text-align: left;
    line-height: 1.5;
}


/* =====================================================
   BLOCO DE CONTEÚDO RELACIONADO (ARTIGOS E COMPARAÇÕES)
   ===================================================== */
.af-related-section-row {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    gap: 40px;
    margin-top: 40px;
    width: 100%;
}

.af-related-col {
    flex: 1;
}

.af-related-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid #edf2f7;
    padding-bottom: 8px;
    margin-bottom: 20px;
}

.af-related-header h3 {
    font-size: 15px;
    font-weight: 700;
    color: #1a202c;
    margin: 0;
    letter-spacing: 0.5px;
}

.af-related-view-all {
    font-size: 12px;
    font-weight: 700;
    color: #805ad5;
    text-decoration: none;
}

/* LEITURA RELACIONADA (GRELHA HORIZONTAL) */
.af-articles-horizontal-grid {
    display: flex;
    flex-direction: row;
    gap: 15px;
}

.af-article-card-placeholder {
    flex: 1;
    text-align: left;
}

.af-article-img-stub {
    background: #edf2f7;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    height: 110px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    color: #a0aec0;
    margin-bottom: 10px;
}

.af-article-card-placeholder h4 {
    font-size: 13px;
    font-weight: 700;
    color: #2d3748;
    margin: 0 0 5px 0;
    line-height: 1.4;
}

.af-article-date {
    font-size: 11px;
    color: #a0aec0;
}

/* COMPARAÇÕES RELACIONADAS (LISTA VERTICAL) */
.af-comparisons-vertical-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.af-comparison-row-item {
    display: flex;
    align-items: center;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 12px 15px;
    text-decoration: none;
    color: #2d3748;
    transition: background 0.2s ease;
}

.af-comparison-row-item:hover {
    background: #f7fafc;
}

.af-comp-thumbs {
    margin-right: 15px;
}

.af-mini-thumb {
    width: 32px;
    height: 32px;
    background: #edf2f7;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
}

.af-comp-text {
    flex-grow: 1;
    font-size: 13px;
    font-weight: 600;
    text-align: left;
}

.af-comp-arrow {
    color: #cbd5e0;
    font-size: 12px;
}

/* OUTROS COMPONENTES DO MOTOR MESTRE */
.af-tech-intro {
    font-size: 14px;
    color: #718096;
    margin: 5px 20px 20px 0;
}

.af-tech-table tbody tr:nth-child(even) {
    background-color: #f7fafc;
}

.af-tech-table td {
    line-height: 1.5;
}

.af-rank-puff {
    transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
    cursor: default;
}

.af-rank-puff:hover {
    transform: translateY(-1px);
    background: rgba(255, 204, 0, 0.1);
    border-color: #FFE066;
}

/* =====================================================
   SISTEMA RESPONSIVO INTEGRADO (MOBILE CONTROL)
   ===================================================== */
@media (max-width: 992px) {
    .af-hub-grid-layout {
        flex-direction: column;
    }
    .af-overview-three-cols {
        flex-direction: column;
        gap: 25px;
    }
    .af-overview-col.af-card-box {
        width: 100%;
        margin-bottom: 5px; /* Margem de segurança de segurança */
    }
    .af-related-section-row {
        flex-direction: column;
        gap: 35px;
    }
    .af-articles-horizontal-grid {
        flex-direction: column;
        gap: 20px;
    }
}


/* LISTA VERTICAL DE RANKINGS (ESQUERDA) */
.af-rankings-vertical-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.af-rank-row-item {
    display: flex;
    align-items: center;
    background: #fdfdfd;
    border: 1px solid #edf2f7;
    border-radius: 8px;
    padding: 10px 15px;
    text-align: left;
    font-size: 13px;
    color: #2d3748;
}

.af-rank-trophy {
    font-size: 16px;
    margin-right: 12px;
}

.af-rank-position-badge {
    font-size: 12px;
    font-weight: 800;
    padding: 3px 8px;
    border-radius: 12px;
    margin-right: 15px;
}
.af-rank-position-badge.pos-1 { background: #fffaf0; color: #dd6b20; border: 1px solid #fbd38d; }
.af-rank-position-badge.pos-2 { background: #f7fafc; color: #4a5568; border: 1px solid #e2e8f0; }
.af-rank-position-badge.pos-3 { background: #fff5f5; color: #c53030; border: 1px solid #feb2b2; }

.af-rank-list-name {
    font-weight: 600;
}

/* MONTRA HORIZONTAL DE ACESSÓRIOS (DIREITA) */
.af-accessories-horizontal-grid {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    gap: 10px;
}

.af-accessory-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.af-accessory-thumb {
    width: 100%;
    height: 90px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.af-accessory-item:hover .af-accessory-thumb {
    transform: translateY(-2px);
    border-color: #cbd5e0;
}

.af-accessory-item span {
    font-size: 11px;
    font-weight: 700;
    color: #4a5568;
}

/* BANNER INFERIOR - CAPAS PERSONALIZADAS */
.af-banner-printful-custom {
    margin-top: 50px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 35px;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
    width: 100%;
}

.af-banner-info-left {
    text-align: left;
    max-width: 25%;
}

.af-banner-info-left h2 {
    font-size: 20px;
    font-weight: 800;
    color: #1a202c;
    margin: 0 0 8px 0;
    line-height: 1.3;
}

.af-banner-info-left p {
    font-size: 13px;
    color: #718096;
    margin: 0 0 20px 0;
}

.af-banner-btn-blue {
    display: inline-block;
    background: #805ad5;
    color: #ffffff;
    padding: 10px 24px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
    transition: background 0.2s;
}

.af-banner-btn-blue:hover {
    background: #2b6cb0;
}

/* GALERIA CENTRAL DE CAPAS */
.af-banner-gallery-center {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-grow: 1;
}

.af-banner-capa-mock {
    width: 65px;
    height: 120px;
    background: #ffffff;
    border: 1px solid #edf2f7;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.02);
}

/* LISTA DE VANTAGENS DIREITA */
.af-banner-features-right {
    text-align: left;
    max-width: 25%;
}

.af-banner-features-right ul {
    list-style: none;
    padding: 0;
    margin: 0 0 20px 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
    font-size: 13px;
    font-weight: 600;
    color: #4a5568;
}

.af-banner-link-collection {
    font-size: 12px;
    font-weight: 700;
    color: #805ad5;
    text-decoration: none;
}

/* SUPORTE RESPONSIVO ADICIONAL NO FIM DO FICHEIRO */
@media (max-width: 992px) {
    .af-accessories-horizontal-grid {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 15px;
    }
    .af-banner-printful-custom {
        flex-direction: column;
        text-align: center;
        padding: 25px;
    }
    .af-banner-info-left, .af-banner-features-right {
        max-width: 100%;
        text-align: center;
    }
    .af-banner-features-right ul {
        align-items: center;
    }
}


/* CONTAINER DE NOTAS LEGAIS E TRANSPARÊNCIA */
.af-hub-legal-footer-box {
    margin-top: 50px;
    width: 100%;
    text-align: left;
}

.af-legal-divider {
    height: 1px;
    background: #e2e8f0;
    margin-bottom: 25px;
    width: 100%;
}

.af-legal-grid-row {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    gap: 30px;
}

.af-legal-col-item {
    flex: 1;
}

.af-legal-col-item h4 {
    font-size: 12px;
    font-weight: 700;
    color: #718096; /* Cinza escuro discreto para o título */
    margin: 0 0 10px 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.af-legal-col-item p {
    font-size: 11px;
    color: #a0aec0; /* Letra pequena e cinza suave para leitura secundária */
    line-height: 1.6;
    margin: 0;
}

.af-legal-copyright-row {
    margin-top: 30px;
    border-top: 1px dashed #edf2f7;
    padding-top: 15px;
    text-align: center;
}

.af-legal-copyright-row span {
    font-size: 11px;
    color: #cbd5e0;
    font-style: italic;
}

/* CONTROLO RESPONSIVO MOBILE */
@media (max-width: 768px) {
    .af-legal-grid-row {
        flex-direction: column;
        gap: 20px;
    }
    
    .af-tabs-menu {
        flex-wrap: wrap !important;
        gap: 10px !important;
    } 
    
    
}




/*parte dos rankings*/
/* ===================================================== */
/* SECÇÃO: RANKINGS ONDE APARECE - DESIGN MINIMALISTA    */
/* ===================================================== */

/* Contentor e Linhas da Lista */
.af-rankings-vertical-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.af-rank-row-item {
    display: flex;
    align-items: center;
    background: #ffffff;
    border: 1px solid #eaeaea;
    padding: 14px 18px;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease;
}

.af-rank-row-item:hover {
    background: #fbfbfb;
    border-color: #cbd5e0;
}

/* O Emoji da Taça - Controlado aqui o tamanho */
.af-rank-trophy {
    margin-right: 12px;
    font-size: 20px;
    vertical-align: middle;
    line-height: 1;
}

/* Texto do Nome do Ranking */
.af-rank-list-name {
    font-size: 14px;
    font-weight: 600;
    color: #2d3748;
}

/* Base dos Badges Retangulares dos Números */
.af-rank-position-badge {
    font-size: 13px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 3px 10px;
    border-radius: 4px;
    margin-right: 15px;
    min-width: 32px;
    letter-spacing: -0.2px;
}

/* Variação Minimalista #1: Borda Fina Rosa Choc */
.af-badge-rank-first {
    border: 1px solid #ff007f;
    background: rgba(255, 0, 127, 0.03);
    color: #ff007f;
}

/* Variação Minimalista #2 e #3: Borda Fina Roxa do Tema */
.af-badge-rank-top {
    border: 1px solid #7b2cbf;
    background: rgba(123, 44, 191, 0.03);
    color: #7b2cbf;
}

/* Variação para posições inferiores: Cinza Discreto */
.af-badge-rank-other {
    border: 1px solid #cbd5e0;
    background: #fafafa;
    color: #4a5568;
}

/* Estado Vazio */
.af-rank-row-item-empty {
    padding: 14px 18px;
    background: #fafafa;
    border: 1px dashed #cbd5e0;
    border-radius: 8px;
    font-size: 14px;
    color: #777;
    text-align: center;
}


/*Parte do zoom da imagem */




/* Customização Avançada da Janela de Zoom (Estilo Amazon Premium) */
/* Força a caixa da imagem a ser a referência de posição */
.af-single-product-media {
    position: relative !important; /* Mantém esta para o absolute funcionar */
}

/* Desenha a janela do zoom à direita da foto */
.af-single-product-media .drift-zoom-pane {
    background: #111424; 
    box-shadow: 0 10px 30px rgba(0,0,0,0.6);
    border: 2px solid #FFCC00; 
    border-radius: 12px;
    
    /* Define o tamanho certinho */
    width: 500px;
    height: 500px;
    
    /* Posiciona fora da foto (à direita) */
    position: absolute;
    top: 0;
    left: 105%; 
    z-index: 9999;
}

/* Desenha o quadrado que segue o rato */
.af-single-product-media .drift-bounding-box {
    background-color: rgba(255, 204, 0, 0.2);
    border: 1px dashed #FFCC00;
}

/* Garante que a imagem ampliada dentro do zoom nunca fique deformada ou esticada */
.af-single-product-media .drift-zoom-pane img {
    width: 100% !important;
    height: 100% !important;
    object-fit: contain !important;
}

/*caixa do meio onde tem a descrição do telemóvel */
.af-hub-text-summary-box {
max-width: 800px;
}