
    /* Variáveis de Cores e Estilo do Portal */
    :root {
        --bg-principal: #f1f5f9;
        --azul-portal: #0f172a;
        --azul-destaque: #1e40af;
        --amarelo-ml: #fff159;
        --texto-escuro: #0f172a;
        --texto-suave: #475569;
        --borda: #cbd5e1;
    }
/* COLAR A NAVBAR NO TOPO ABSOLUTO (RESET DE MARGENS) */
html, body {
    margin: 0 !important;
    padding: 0 !important;
}

header {
    margin-top: 0 !important;
}

.header-wrap h1 {
    margin: 0 !important;
}

    /* Reset Geral de Margens e Fontes */
    * { 
        margin: 0; 
        padding: 0; 
        box-sizing: border-box; 
    }

    .paginacao { display: flex; justify-content: center; align-items: center; gap: 15px; margin: 30px 0; font-family: Arial, sans-serif; }
        .btn-pag { background-color: #007bff; color: white; padding: 10px 20px; text-decoration: none; font-weight: bold; border-radius: 6px; transition: 0.2s; }
        .btn-pag:hover { background-color: #0056b3; }
        .btn-pag.desativado { background-color: #cccccc; color: #666666; pointer-events: none; cursor: not-allowed; }
        .texto-pag { font-size: 16px; color: #333; font-weight: bold; }
    
    body { 
        font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; 
        background-color: var(--bg-principal); 
        color: var(--texto-escuro); 
        -webkit-font-smoothing: antialiased; 
        padding-bottom: 50px;
          padding-top: 100px;
    }
    
    /* Topo Fixo e Flutuante */
    /* ==========================================================================
   ESTILO ISOLADO: HEADER / TOPO
   ========================================================================== */

/* Configuração do fundo e espaçamento do topo */
header {
  background-color: #1a202c !important;
        color: #ffffff !important;
        padding: 12px 20px !important;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1) !important;
        width: 100% !important;
        position: sticky !important;
        top: 0 !important;
        z-index: 1000 !important;
}

/* Alinhamento do título com a área de botões */
.header-wrap {
    max-width: 1200px !important;
        margin: 0 auto !important;
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        flex-wrap: wrap !important;
        gap: 15px !important;
}
 .header-botoes-noticias {
        display: flex !important;
        gap: 8px !important;
        flex-wrap: wrap !important;
    }
.btn-nav-noticias {
        background-color: #2d3748 !important;
        color: #ffffff !important;
        text-decoration: none !important;
        padding: 8px 16px !important;
        border-radius: 6px !important;
        font-size: 0.8rem !important;
        font-weight: 700 !important;
        text-transform: uppercase !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        border: none !important;
        letter-spacing: 0.5px !important;
        transition: background-color 0.2s ease !important;
        /* Impede os botões de esticarem mais do que o necessário */
        flex: 0 1 auto !important; 
    }
.header-logo-box h1 {
        font-size: 1.5rem !important;
        font-weight: 700 !important;
        color: #ffffff !important;
        margin: 0 !important;
        text-transform: uppercase !important;
        letter-spacing: 0.5px !important;
    }
    .header-logo-box h1 span {
        color: #007bff !important; /* Destaque azul no & ETC */
    }

    .header-logo-box p {
        font-size: 0.8rem !important;
        color: #a0aec0 !important;
        margin: 2px 0 0 0 !important;
    }


/* Estilização do Logotipo (Texto principal) */
.header-wrap h1 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #ffffff;
    margin: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* Cor azul de destaque no "& ETC" */
.header-wrap h1 span {
    color: #007bff; 
}

/* Subtítulo abaixo do logo */
.header-wrap p {
    font-size: 0.85rem;
    color: #a0aec0;
    margin: 2px 0 0 0;
}

/* Container dos botões de navegação */
.header-wrap  div:last-child {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* Estilo padrão de todos os botões do cabeçalho */
.btn-header-login {
    background-color: #2d3748; /* Cor interna cinza escura */
    color: #ffffff;
    text-decoration: none;
    padding: 8px 14px;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: bold;
    text-transform: uppercase; /* Força os textos em caixa alta */
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s ease, transform 0.1s ease;
}

/* Efeito ao passar o mouse nos botões */
.btn-header-login:hover {
    background-color: #4a5568;
}

/* Ajuste dos ícones SVG dentro dos botões */
.btn-header-login svg {
    margin-right: 6px;
    vertical-align: middle;
    flex-shrink: 0; /* Impede o ícone de amassar em telas espremidas */
}

/* ==========================================================================
   📱 RESPONSIVIDADE DO HEADER (Telas de até 600px)
   ========================================================================== */

    @media (max-width: 820px) {
        .header-wrap {
            flex-direction: column !important;
            text-align: center !important;
        }

        .header-botoes-noticias {
            width: 100% !important;
            justify-content: center !important;
            gap: 8px !important;
        }

        .btn-nav-noticias {
            flex: 1 1 45% !important; /* Faz os botões ficarem em 2 por linha simétricos no celular */
            font-size: 0.75rem !important;
            padding: 10px 8px !important;
        }
    }
@media (max-width: 600px) {
    

    .header-wrap > div:last-child {
        width: 100%;
        justify-content: center; /* Centraliza as opções no celular */
    }

    .btn-header-login {
        flex: 1; /* Faz os botões dividirem o espaço igualmente na tela do celular */
        min-width: 120px;
        font-size: 0.8rem;
        padding: 8px 10px;
    }
}

    /* Estrutura de Grid em Duas Colunas */
    .portal-grid { 
        max-width: 1200px; 
        margin: 40px auto; 
        padding: 0 20px; 
        display: grid; 
        grid-template-columns: 2.3fr 1fr; 
        gap: 35px; 
    }

    /* --- COLUNA PRINCIPAL: NOTÍCIAS --- */
    .feed-noticias { 
        display: flex; 
        flex-direction: column; 
        gap: 30px; 
    }
    
    .noticia-card { 
        background: #ffffff; 
        border-radius: 16px; 
        border: 1px solid var(--borda); 
        overflow: hidden; 
        display: flex; 
        align-items: stretch;
        height: 260px; /* Mantém o padrão correto das imagens */
        transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1); 
    }
    
    .noticia-card:hover { 
        transform: translateY(-4px); 
        box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08); 
        border-color: #94a3b8; 
    }
    
    /* Caixa Estabilizadora da Imagem */
    .noticia-img-box { 
        width: 38%; 
        min-width: 280px; 
        max-width: 320px; 
        background-color: #f1f5f9; 
        overflow: hidden; 
        display: flex;
        height: 100%;
    }
    
    .noticia-img { 
        width: 100%; 
        height: 100%; 
        object-fit: cover; 
        object-position: center; 
        transition: transform 0.4s ease; 
    }
    
    .noticia-card:hover .noticia-img { 
        transform: scale(1.03); 
    }
    
    /* Bloco de Conteúdo Escrito (CORRIGIDO) */
    .noticia-conteudo { 
        width: 62%; 
        padding: 20px 25px; 
        display: flex; 
        flex-direction: column; 
        justify-content: flex-start; /* Permite empilhar os 3 andares perfeitamente */
        height: 100%;
        overflow: hidden;
        position: relative;
    }
    
    .noticia-meta { 
        font-size: 11px; 
        font-weight: 700; 
        text-transform: uppercase; 
        color: var(--texto-suave); 
        margin-bottom: 6px; 
    }
    
    .noticia-titulo { 
        font-size: 20px; 
        color: #0f172a; 
        line-height: 1.35; 
        font-weight: 800; 
        margin-bottom: 8px; 
        letter-spacing: -0.3px;
    }
    
    /* 🚀 ISOLADOR DE TEXTO: Cria a rolagem apenas aqui dentro, protegendo o botão na base */
    .noticia-scroll-texto {
        flex: 1; /* Ocupa dinamicamente a área do meio */
        overflow-y: auto; 
        margin-bottom: 10px;
        padding-right: 5px;
    }
    
    .noticia-texto { 
        font-size: 14.5px; 
        color: #334155; 
        line-height: 1.6; 
        margin-bottom: 0px; 
    }
    
    /* Customização dos Links de Afiliados Injetados */
    .noticia-texto a { 
        color: var(--azul-destaque); 
        text-decoration: none; 
        font-weight: 700; 
        border-bottom: 2px solid #93c5fd; 
        padding: 0 2px; 
        transition: all 0.2s; 
    }
    
    .noticia-texto a:hover { 
        background-color: #eff6ff; 
        color: #1d4ed8; 
        border-bottom-color: #1d4ed8; 
        border-radius: 4px; 
    }

    /* 🚀 BOTÃO FIXO: Força a exibição estruturada e ganha linha divisória sutil */
    .btn-ler-mais { 
        font-size: 13.5px; 
        color: var(--azul-destaque); 
        text-decoration: none; 
        font-weight: 700; 
        display: inline-block;
        padding-top: 8px;
        border-top: 1px dashed var(--borda);
        width: 100%;
    }
    
    .btn-ler-mais:hover { 
        color: #1d4ed8; 
        text-decoration: underline;
    }

    /* Estilização da barrinha de rolagem fina do texto */
    .noticia-scroll-texto::-webkit-scrollbar {
        width: 4px;
    }
    .noticia-scroll-texto::-webkit-scrollbar-thumb {
        background: #cbd5e1;
        border-radius: 4px;
    }

    /* --- COLUNA LATERAL: VITRINE MERCADO LIVRE --- */
    .sidebar-ofertas { 
        display: flex; 
        flex-direction: column; 
    }
    
    .widget-ml { 
        background: #ffffff; 
        border-radius: 16px; 
        border: 1px solid var(--borda); 
        padding: 24px; 
        box-shadow: 0 4px 15px rgba(0,0,0,0.02); 
        position: sticky; 
        top: 100px; 
    }
    
    .ml-header { 
        display: flex; 
        align-items: center; 
        gap: 10px; 
        margin-bottom: 20px; 
        padding-bottom: 12px; 
        border-bottom: 2px solid #f1f5f9; 
    }
    
    .ml-logo-box { 
        background-color: var(--amarelo-ml); 
        padding: 6px 10px; 
        border-radius: 6px; 
        font-weight: 900; 
        font-size: 12px; 
        color: #333; 
    }
    
    .ml-header h3 { 
        font-size: 13px; 
        font-weight: 800; 
        color: #0f172a; 
        text-transform: uppercase; 
    }
    
    .ml-item { 
        display: flex; 
        gap: 15px; 
        padding: 16px 0; 
        border-bottom: 1px solid #f1f5f9; 
        text-decoration: none; 
        color: inherit; 
    }
    
    .ml-item:hover { 
        opacity: 0.85; 
    }
    
    .ml-item:last-child { 
        border-bottom: none; 
        padding-bottom: 0; 
    }
    
    .ml-img-container { 
        width: 75px; 
        height: 75px; 
        background: #ffffff; 
        border-radius: 12px; 
        padding: 6px; 
        border: 1px solid var(--borda); 
        display: flex; 
        align-items: center; 
        justify-content: center; 
        flex-shrink: 0; 
    }
    
    .ml-img { 
        max-width: 100%; 
        max-height: 100%; 
        object-fit: contain; 
    }
    
    .ml-info { 
        display: flex; 
        flex-direction: column; 
        justify-content: center; 
    }
    
    .ml-nome { 
        font-size: 13px; 
        font-weight: 500; 
        color: #334155; 
        line-height: 1.4; 
        margin-bottom: 4px; 
        display: -webkit-box; 
        -webkit-line-clamp: 2; 
        -webkit-box-orient: vertical; 
        overflow: hidden; 
    }
    
    .ml-preco { 
        font-size: 15px; 
        font-weight: 700; 
        color: #1e293b; 
    }
    
    .ml-tag-frete { 
        font-size: 11px; 
        color: #00a650; 
        font-weight: 700; 
        margin-top: 2px; 
        display: block;
    }

    /* --- RESPONSIVIDADE COMPLETA --- */
    /* ==========================================================================
   ESTILOS PARA TABLETS E TELA MÉDIAS (Máximo 992px de largura)
   ========================================================================== */
@media (max-width: 992px) {
    /* Transforma as duas colunas em uma linha vertical (Empilhado) */
    .portal-grid {
        display: flex !important;
        flex-direction: column !important;
        padding: 10px !important;
        gap: 25px !important;
    }

    /* O feed de notícias e a barra lateral passam a ocupar 100% da largura */
    .feed-noticias, 
    .sidebar-veiculos {
        width: 100% !important;
        max-width: 100% !important;
        flex: none !important;
    }

    /* Remove o efeito "grudado" no topo da barra lateral quando ela vai para baixo */
    .sidebar-veiculos > div {
        position: static !important; 
    }

    /* Transforma o cartão de notícia em bloco (Foto em cima, texto embaixo) */
    .noticia-card {
        flex-direction: column !important;
        height: auto !important;
    }

    /* Ajusta a caixa da imagem da notícia */
    .noticia-img-box {
        width: 100% !important;
        max-width: 100% !important;
        height: 250px !important;
    }

    .noticia-img {
        width: 100% !important;
        height: 100% !important;
        object-fit: cover !important;
    }

    .noticia-conteudo {
        padding: 20px !important;
    }
}

/* ==========================================================================
   ESTILOS PARA CELULARES (Máximo 576px de largura)
   ========================================================================== */
@media (max-width: 768px) {
    body {
        padding-top: 160px; /* Aumenta o espaço no celular porque a navbar fica mais alta */
    }
}
@media (max-width: 576px) {
    /* 1. Ajuste do Cabeçalho (Navbar) */
    .header-wrap {
        flex-direction: column !important;
        gap: 15px !important;
        text-align: center !important;
        padding: 10px 5px !important;
    }

    /* Faz os botões do topo (Início, Anunciar, Área Restrita) empilharem */
    .header-botoes {
        flex-direction: column !important;
        width: 100% !important;
        gap: 8px !important;
    }

    .btn-header-login {
        width: 100% !important;
        justify-content: center !important;
        padding: 12px !important;
        font-size: 14px !important;
    }

    /* 2. Ajuste dos Cartões de Notícias e Anúncios */
    .noticia-img-box {
        height: 180px !important; /* Imagem um pouco menor para telas pequenas */
    }

    .noticia-titulo {
        font-size: 18px !important; /* Diminui o título para não ocupar a tela toda */
        line-height: 1.3 !important;
    }

    /* Remove o scroll interno do texto. No celular o texto flui para baixo normalmente */
    .noticia-scroll-texto {
        max-height: none !important;
        overflow: visible !important;
    }

    .noticia-texto {
        font-size: 14px !important;
        line-height: 1.5 !important;
    }

    /* Botão de ler matéria vira um bloco grande fácil de tocar */
    .btn-ler-mais {
        display: block !important;
        width: 100% !important;
        max-width: 100% !important;
        text-align: center !important;
        padding: 12px !important;
        font-size: 14px !important;
    }

    /* 3. Ajuste da Paginação (Anterior / Próximo) */
    .paginacao {
        flex-direction: column !important;
        gap: 10px !important;
        width: 100% !important;
    }

    .btn-pag {
        width: 100% !important;
        text-align: center !important;
        padding: 12px !important;
    }

    /* 4. Ajuste dos Carros Ouro (Barra lateral que foi para baixo) */
    .sidebar-veiculos h3 {
        font-size: 18px !important;
        text-align: center !important;
        justify-content: center !important;
    }

    /* Faz a imagem do carro destaque ocupar melhor o espaço vertical */
    .sidebar-veiculos img {
        height: 180px !important;
    }
}

    /* Estilização do Botão de Login no Topo */
.btn-header-login {
    display: inline-flex;
    align-items: center;
    background-color: transparent;
    color: #ffffff;
    text-decoration: none;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 10px 18px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 30px;
    transition: all 0.2s ease;
    cursor: pointer;
}

.btn-header-login:hover {
    background-color: #ffffff;
    color: var(--azul-portal);
    border-color: #ffffff;
    box-shadow: 0 4px 12px rgba(255, 255, 255, 0.15);
    transform: translateY(-1px);
}

.btn-header-login:active {
    transform: translateY(0);
}

/* Ajuste fino para celular não quebrar o layout */
@media (max-width: 650px) {
    .header-wrap {
        gap: 15px;
    }
    .btn-header-login {
        padding: 8px 14px;
        font-size: 11px;
    }
}
/* ==========================================
   ESTILOS PARA TABLETS (Telas até 992px)
   ========================================== */
@media (max-width: 992px) {
    .header-wrap {
        padding: 15px;
        flex-direction: column; /* Empilha o título e os botões */
        text-align: center;
        gap: 15px;
    }

    .portal-grid {
        display: block; /* Remove as colunas laterais se houver */
        padding: 10px;
    }

    .noticia-card {
        flex-direction: column; /* Foto fica em cima, texto embaixo */
        height: auto; /* Permite que o cartão cresça com o texto */
        max-width: 100%;
        margin-bottom: 20px;
    }

    .noticia-img-box {
        width: 100%; /* Ocupa toda a largura do cartão */
        height: 250px; /* Altura fixa para a imagem não distorcer */
    }

    .noticia-img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

        /* CORREÇÃO: Faz o bloco de conteúdo ocupar a largura inteira do cartão */
    .noticia-conteudo {
        width: 100% !important;
        max-width: 100% !important;
        padding: 15px !important;
        display: flex !important;
        flex-direction: column !important;
    }

    /* Garante que o parágrafo use todo o espaço disponível na esquerda e direita */
    .noticia-scroll-texto, 
    .noticia-texto {
        width: 100% !important;
        max-width: 100% !important;
        display: block !important;
    }

}

/* ==========================================
   ESTILOS PARA CELULARES (Telas até 576px)
   ========================================== */
@media (max-width: 576px) {
    header h1 {
        font-size: 24px; /* Diminui o tamanho do título */
    }

    header p {
        font-size: 12px;
    }

    .header-wrap div style {
        flex-direction: column; /* Empilha os botões de Login e Anúncios */
        width: 100%;
    }

    .btn-header-login {
        width: 100%; /* Botões ocupam a largura toda da tela */
        text-align: center;
        justify-content: center;
        padding: 12px;
    }

    .noticia-img-box {
        height: 180px; /* Imagem um pouco menor no celular */
    }

    .noticia-titulo {
        font-size: 18px; /* Título menor para caber na tela */
        line-height: 1.3;
    }

    .noticia-scroll-texto {
        max-height: none; /* Remove o scroll interno para o texto fluir na tela */
        overflow: visible;
    }

    .noticia-texto {
        font-size: 14px;
    }

    .btn-ler-mais {
        width: 100%; /* Botão de ler mais vira um bloco grande */
        text-align: center;
        padding: 12px;
    }

    /* Ajuste dos botões de paginação */
    .paginacao {
        flex-wrap: wrap; /* Permite quebrar linha se o espaço acabar */
        gap: 10px;
    }

    .btn-pag {
        width: 100%; /* Botões Anterior/Próximo ficam um embaixo do outro */
        text-align: center;
        order: 2;
    }

    .texto-pag {
        width: 100%;
        text-align: center;
        order: 1; /* Texto da página fica no topo */
        margin-bottom: 5px;
    }
}
