/* ==========================================
   1. VARIÁVEIS GLOBAIS (Cores e Espaçamentos)
   ========================================== */
:root {
    --primary: #0A2540;      /* Azul Escuro (Marca) */
    --secondary: #E63946;    /* Vermelho (Destaque/Botões) */
    --text-main: #333333;
    --text-muted: #6c757d;
    --bg-light: #f8f9fa;
    --bg-alt: #f4f6f9;
    
    /* Cores das Categorias Prática */
    --blue: #0066CC;
    --teal: #2A9D8F;
    --orange: #F4A261;
    --yellow: #E9C46A;
}

/* ==========================================
   2. ESTILOS BASE E TIPOGRAFIA
   ========================================== */
body {
    font-family: 'Inter', sans-serif;
    color: var(--text-main);
    background-color: #ffffff;
    margin: 0;
    padding: 0;
}

a { text-decoration: none; transition: 0.3s; }
ul { list-style: none; padding: 0; margin: 0; }

.section { padding: 5rem 0; }
.section-alt { background-color: var(--bg-alt); padding: 5rem 0; }
.section-title { font-weight: 700; color: var(--primary); margin-bottom: 2rem; }

/* ==========================================
   3. NAVEGAÇÃO E CABEÇALHO (Header)
   ========================================== */
.top-bar {
    background-color: #f8f9fa;
    font-size: 0.85rem;
    padding: 8px 0;
    border-bottom: 1px solid #eaeaea;
    color: var(--text-muted);
}

.header-main {
    background: #ffffff;
    padding: 0; /* Zeramos o respiro para a logo crescer livremente */
}
.navbar-brand {
    display: flex;
    align-items: center;
    height: 70px; /* Trava a altura do cabeçalho */
    overflow: hidden; /* Esconde a parte transparente que sobrar */
}

.navbar-brand img {
    height: 250px; /* Força a imagem inteira a ficar gigante */
    width: auto;
    object-fit: contain;
    margin-left: -15px; /* Puxa um pouco para a esquerda se precisar */
}

.nav-link {
    font-weight: 600;
    color: var(--primary) !important;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 0.5px;
    padding: 10px 15px !important;
}

.nav-link:hover, .nav-link.active {
    color: var(--secondary) !important;
}

/* ==========================================
   EFEITO DROPDOWN NO HOVER (Desktop) E ESTILOS
   ========================================== */
@media (min-width: 992px) {
    /* O " > " mágico impede que o 3º nível abra junto com o 2º */
    .navbar .dropdown:hover > .dropdown-menu {
        display: block;
        margin-top: 0;
        animation: fadeIn 0.3s ease;
    }
}

.dropdown-item:hover {
    background-color: var(--bg-alt);
    color: var(--secondary) !important;
    transform: translateX(5px);
    transition: all 0.2s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ==========================================
   DROPDOWN DE 3º NÍVEL (Sub-submenu)
   ========================================== */
.dropdown-submenu {
    position: relative;
}

.dropdown-submenu > .dropdown-menu {
    top: 0;
    left: 100%;
    margin-top: -5px;
    margin-left: 0;
    border-radius: 8px;
    display: none;
}

/* Garante que o item que tem filhos mostre uma setinha pro lado */
.dropdown-submenu > a::after {
    content: "\f0da"; /* Ícone de seta do FontAwesome */
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    float: right;
    margin-top: 2px;
    color: var(--text-muted);
}

@media (min-width: 992px) {
    /* Abre APENAS o 3º nível quando passar o mouse por cima do Nível 2 correspondente */
    .dropdown-submenu:hover > .dropdown-menu {
        display: block;
        position: absolute;
        animation: fadeIn 0.2s ease;
    }
}

/* ==========================================
   4. BOTÕES E ORÇAMENTO (Cart)
   ========================================== */
.btn-solid, .btn-solid-header {
    background-color: var(--secondary);
    color: #ffffff;
    padding: 10px 25px;
    border-radius: 5px;
    font-weight: 600;
    border: none;
    display: inline-block;
    transition: 0.3s;
}

.btn-solid:hover, .btn-solid-header:hover {
    background-color: #c52835;
    color: #ffffff;
}

.btn-outline {
    border: 2px solid var(--secondary);
    color: var(--secondary);
    background: transparent;
    padding: 8px 20px;
    border-radius: 5px;
    font-weight: 600;
    width: 100%;
    transition: 0.3s;
}

.btn-outline:hover {
    background-color: var(--secondary);
    color: #ffffff;
}

.quote-cart {
    position: relative;
    cursor: pointer;
    background-color: var(--primary);
    padding: 10px;
    border-radius: 5px;
    display: inline-flex;
    margin-right: 15px;
}

.quote-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background-color: var(--secondary);
    color: #ffffff;
    font-size: 0.75rem;
    font-weight: bold;
    padding: 2px 6px;
    border-radius: 50%;
}

/* ==========================================
   5. BANNERS (Hero e Páginas Internas)
   ========================================== */
.hero-slide {
    height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #ffffff;
}

.carousel-caption-custom h1 { font-weight: 700; font-size: 3.5rem; margin-bottom: 20px; }
.carousel-caption-custom p { font-size: 1.2rem; margin-bottom: 30px; opacity: 0.9; }

/* Cabeçalho das páginas internas (Produtos, Contato, etc) */
.page-header {
    background-color: var(--primary);
    padding: 4rem 0;
    text-align: center;
    color: #ffffff;
}
.page-header h1 { font-weight: 700; font-size: 2.5rem; margin-bottom: 0.5rem; }
.page-header p { font-size: 1.1rem; opacity: 0.8; margin: 0; }

.cta-banner {
    background-color: var(--primary);
    color: #ffffff;
    padding: 4rem 0;
    text-align: center;
}
.cta-banner h2 { font-weight: 700; margin-bottom: 15px; }
.cta-banner p { font-size: 1.1rem; opacity: 0.8; margin-bottom: 30px; }

/* ==========================================
   6. GRIDS E CAROUSEL DE CATEGORIAS
   ========================================== */
.grid-4 { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 30px; }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 30px; }

.pratica-categories-section { padding: 3rem 0; background: #ffffff; }
.pratica-carousel-track { 
    display: flex; 
    gap: 40px; /* Dá um respiro bem elegante entre as bolinhas */
    overflow-x: auto; 
    scroll-behavior: smooth; 
    padding: 20px 50px; /* Afasta os ícones das setas laterais */
    justify-content: center; /* Centraliza tudo perfeitamente */
}
.pratica-carousel-track::-webkit-scrollbar { display: none; }

/* No celular, volta pro canto para o usuário poder "arrastar" com o dedo */
@media (max-width: 992px) {
    .pratica-carousel-track { 
        justify-content: flex-start; 
        padding: 20px 10px; 
    }
}
.pratica-card { text-align: center; min-width: 120px; display: block; }
.pratica-bg {
    width: 80px; height: 80px; margin: 0 auto 10px;
    border-radius: 50%; display: flex; align-items: center; justify-content: center;
    font-size: 2rem; color: #ffffff; transition: 0.3s;
}
.pratica-card:hover .pratica-bg { transform: translateY(-5px); box-shadow: 0 5px 15px rgba(0,0,0,0.15); }
.pratica-title { font-weight: 600; font-size: 0.9rem; }

/* Cores das Categorias */
.bg-red { background-color: var(--secondary); }
.bg-blue { background-color: var(--blue); }
.bg-teal { background-color: var(--teal); }
.bg-orange { background-color: var(--orange); }
.bg-yellow { background-color: var(--yellow); }
.txt-red { color: var(--secondary); }
.txt-blue { color: var(--blue); }
.txt-teal { color: var(--teal); }
.txt-orange { color: var(--orange); }
.txt-yellow { color: var(--yellow); }

.carousel-nav-btn {
    position: absolute; top: 50%; transform: translateY(-50%);
    background: #ffffff; border: 1px solid #ddd; width: 40px; height: 40px;
    border-radius: 50%; display: flex; align-items: center; justify-content: center;
    cursor: pointer; z-index: 10; box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}
.carousel-nav-btn.prev { left: -15px; }
.carousel-nav-btn.next { right: -15px; }

/* ==========================================
   7. CARDS DE PRODUTOS E BLOG
   ========================================== */
.product-card {
    border: 1px solid #eaeaea;
    border-radius: 8px;
    background: #ffffff;
    overflow: hidden;
    transition: 0.3s;
    display: flex;
    flex-direction: column;
    height: 100%;
}
.product-card:hover { box-shadow: 0 10px 20px rgba(0,0,0,0.08); transform: translateY(-5px); }

/* IMAGENS DOS PRODUTOS - CORREÇÃO DEFINITIVA DE CORTE */
.product-img-wrapper { 
    height: 200px; 
    overflow: hidden; 
    background: #ffffff; 
}
.product-img-wrapper a {
    display: block;
    width: 100%;
    height: 100%;
}
.product-img { 
    width: 100%; 
    height: 100%; 
    object-fit: contain; 
    padding: 15px; 
    box-sizing: border-box; 
}

.product-cat { font-size: 0.75rem; color: var(--secondary); font-weight: 700; text-transform: uppercase; }
.product-title { margin: 0.5rem 0 1rem; color: var(--primary); font-size: 1.1rem; flex-grow: 1; font-weight: 700; }

.blog-card { border-radius: 8px; overflow: hidden; box-shadow: 0 4px 15px rgba(0,0,0,0.05); background: #ffffff; }
.blog-img { height: 220px; overflow: hidden; }
.blog-img img { width: 100%; height: 100%; object-fit: cover; transition: 0.3s; }
.blog-card:hover .blog-img img { transform: scale(1.05); }
.blog-content { padding: 20px; }
.blog-meta { font-size: 0.85rem; color: var(--secondary); font-weight: 600; display: block; margin-bottom: 10px; }
.blog-title { font-size: 1.2rem; font-weight: 700; margin-bottom: 10px; }
.blog-title a { color: var(--primary); }
.blog-title a:hover { color: var(--secondary); }

/* Diferenciais (Icones) */
.feature-box { text-align: center; padding: 20px; }
.feature-icon { font-size: 3rem; margin-bottom: 15px; }
.feature-title { font-weight: 700; color: var(--primary); font-size: 1.2rem; margin-bottom: 10px; }

/* ==========================================
   8. RODAPÉ (Footer)
   ========================================== */
.footer-main { background-color: var(--primary); padding: 4rem 0 2rem; color: #E0E4E8; }
.footer-logo { height: 40px; margin-bottom: 1rem; }
.footer-desc { font-size: 0.9rem; line-height: 1.6; }
.footer-title { color: #ffffff; margin-bottom: 1.5rem; font-weight: 700; }
.footer-list { line-height: 2; font-size: 0.95rem; }
.footer-list a { color: inherit; }
.footer-list a:hover { color: var(--secondary); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.1); padding-top: 2rem; margin-top: 3rem; text-align: center; font-size: 0.85rem; }

/* ==========================================
   9. GAVETA DE ORÇAMENTOS (Sidebar Cart)
   ========================================== */
.quote-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.5); z-index: 1040; display: none; }
.quote-sidebar { position: fixed; top: 0; right: -400px; width: 400px; max-width: 100%; height: 100%; background: #ffffff; z-index: 1050; transition: right 0.3s ease; display: flex; flex-direction: column; box-shadow: -5px 0 15px rgba(0,0,0,0.1); }
.quote-sidebar.open { right: 0; }
.quote-header { padding: 20px; border-bottom: 1px solid #eaeaea; display: flex; justify-content: space-between; align-items: center; }
.close-quote { background: none; border: none; font-size: 1.5rem; color: var(--text-muted); cursor: pointer; }
.quote-items-container { flex-grow: 1; overflow-y: auto; padding: 20px; }
.quote-footer { padding: 20px; border-top: 1px solid #eaeaea; }

/* ==========================================
   BOTÃO VOLTAR AO TOPO
   ========================================== */
#backToTop {
    width: 50px;
    height: 50px;
    background-color: #ef4444; 
    color: #ffffff;
    border: none;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    
    position: fixed !important; 
    bottom: 100px !important; /* Subido para dar espaço ao WhatsApp */
    right: 30px !important;
    
    z-index: 9999; 
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
    transition: transform 0.3s ease, background-color 0.3s ease;
    padding: 0; 
    margin: 0;
    display: none; 
    justify-content: center; 
    align-items: center; 
    line-height: 0; 
}

#backToTop:hover {
    background-color: var(--primary);
    transform: translateY(-5px); 
}

/* ==========================================
   BOTÃO WHATSAPP FLUTUANTE
   ========================================== */
.whatsapp-float {
    position: fixed;
    width: 60px;
    height: 60px;
    bottom: 30px;
    right: 30px;
    background-color: #25d366;
    color: #FFF;
    border-radius: 50px;
    text-align: center;
    font-size: 35px;
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.3);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    text-decoration: none;
    transition: all 0.3s ease;
    animation: pulse-whatsapp 2s infinite;
}

.whatsapp-float:hover {
    background-color: #128c7e;
    color: #FFF;
    transform: scale(1.1);
}

@keyframes pulse-whatsapp {
    0% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7); }
    70% { box-shadow: 0 0 0 15px rgba(37, 211, 102, 0); }
    100% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0); }
}

/* ==========================================
   10. PÁGINA DE PRODUTO (Galeria e Detalhes)
   ========================================== */
.product-main-image {
    width: 100%;
    height: 400px;
    object-fit: contain;
    background-color: #f8f9fa;
    border: 1px solid #eaeaea;
    border-radius: 8px;
    cursor: zoom-in;
    transition: 0.3s;
}

.product-main-image:hover {
    border-color: var(--secondary);
}

.gallery-thumbnails {
    display: flex;
    gap: 10px;
    margin-top: 15px;
    overflow-x: auto;
    padding-bottom: 5px;
}

.gallery-thumbnails::-webkit-scrollbar { height: 6px; }
.gallery-thumbnails::-webkit-scrollbar-thumb { background-color: #ddd; border-radius: 10px; }

.thumb-img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border: 2px solid transparent;
    border-radius: 6px;
    cursor: pointer;
    background-color: #f8f9fa;
    transition: 0.2s;
}

.thumb-img:hover, .thumb-img.active {
    border-color: var(--secondary);
}

.product-measurements {
    background-color: var(--bg-alt);
    padding: 15px;
    border-radius: 8px;
    border-left: 4px solid var(--primary);
    margin: 20px 0;
}

/* Modal de Zoom */
.zoom-modal {
    display: none;
    position: fixed;
    z-index: 2000;
    padding-top: 50px;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(10, 37, 64, 0.95);
}

.zoom-modal-content {
    margin: auto;
    display: block;
    max-width: 90%;
    max-height: 85vh;
    object-fit: contain;
}

.zoom-close {
    position: absolute;
    top: 15px;
    right: 35px;
    color: #fff;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
}


/* ==========================================
   11. PÁGINA DO ARTIGO (Blog Interno)
   ========================================== */
.blog-post-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 1.5rem 0;
}
.blog-post-content h2, .blog-post-content h3, .blog-post-content h4 {
    color: var(--primary);
    margin-top: 2rem;
    margin-bottom: 1rem;
    font-weight: 700;
}
.blog-post-content a {
    color: var(--secondary);
    text-decoration: underline;
}

/* ==========================================
   12. CATÁLOGO E-COMMERCE (Filtros Premium)
   ========================================== */
.shop-sidebar {
    position: sticky;
    top: 100px; /* Mantém a barra visível ao rolar */
}
.shop-sidebar-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 20px;
    padding-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
}
.category-filter-list {
    display: flex;
    flex-direction: column;
    gap: 12px; /* Espaçamento moderno entre os botões */
    list-style: none;
    padding: 0;
    margin: 0;
}
.category-filter-list a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 20px;
    background: #f8f9fa;
    border: 1px solid #eaeaea;
    border-radius: 12px; /* Cantos arredondados e amigáveis ao toque */
    color: var(--text-main);
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.category-filter-list a:hover {
    background: #ffffff;
    border-color: var(--secondary);
    box-shadow: 0 4px 15px rgba(0,0,0,0.06);
    transform: translateY(-3px); /* Efeito de elevação 3D suave */
    color: var(--secondary);
}
.category-filter-list a.active {
    background: var(--primary);
    border-color: var(--primary);
    color: #ffffff;
    box-shadow: 0 6px 20px rgba(10,37,64,0.25);
}

/* Estilo do número de items */
.badge-count {
    background: #e2e8f0;
    color: #475569;
    font-size: 0.75rem;
    padding: 4px 10px;
    border-radius: 20px;
    font-weight: 700;
    transition: all 0.3s ease;
}
.category-filter-list a:hover .badge-count {
    background: var(--secondary);
    color: #ffffff;
}
.category-filter-list a.active .badge-count {
    background: rgba(255,255,255,0.25);
    color: #ffffff;
}

/* ==========================================
   13. CORREÇÃO DA GRADE (Prevenção de Estiramento)
   ========================================== */
.grid-3 {
    display: grid;
    /* Usamos auto-fill em vez de auto-fit para não esticar cards isolados */
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 30px;
}

/* Força exatamente 3 colunas no Desktop para a área principal do catálogo */
@media (min-width: 992px) {
    main .grid-3 {
        grid-template-columns: repeat(3, 1fr);
        align-items: start;
    }
}

/* ==========================================
   SESSÃO DE CLIENTES (CARROSSEL INFINITO)
   ========================================== */
.clients-section {
    background-color: #ffffff;
    padding: 60px 0;
    overflow: hidden; /* Esconde as logos que estão fora da tela */
    border-top: 1px solid #eaeaea;
    border-bottom: 1px solid #eaeaea;
}

.clients-title {
    text-align: center;
    font-size: 1.5rem;
    font-weight: 700;
    color: #0A2540;
    margin-bottom: 40px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* O container que vai deslizar */
.clients-carousel {
    display: flex;
    align-items: center;
    width: max-content;
    animation: scrollClients 35s linear infinite;
}

/* Pausa a animação se o usuário colocar o mouse em cima */
.clients-carousel:hover {
    animation-play-state: paused;
}

/* Estilo das Logomarcas */
.client-logo {
    width: 160px;
    height: 80px;
    margin: 0 40px;
    object-fit: contain; /* Garante que a logo não fique esticada */
    filter: grayscale(100%) opacity(0.6); /* Deixa cinza e levemente transparente */
    transition: all 0.3s ease;
}

/* Efeito ao passar o mouse na logo */
.client-logo:hover {
    filter: grayscale(0%) opacity(1); /* Traz a cor original de volta */
    transform: scale(1.05); /* Dá um leve zoom */
}

/* A animação mágica de deslizar infinito */
@keyframes scrollClients {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); } /* Anda 50% porque duplicaremos as imagens no HTML */
}

/* Responsividade para celular */
@media (max-width: 768px) {
    .client-logo { width: 120px; margin: 0 20px; }
}

/* ==========================================
   MENU MOBILE (CORREÇÃO DA COR DO ÍCONE)
   ========================================== */
.navbar-toggler-icon {
    /* Troca o ícone padrão para um SVG na cor --primary (#0A2540) */
    background-image: url("data:image/svg+xml;charset=utf8,%3Csvg viewBox='0 0 30 30' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath stroke='%230A2540' stroke-width='2' stroke-linecap='round' stroke-miterlimit='10' d='M4 7h22M4 15h22M4 23h22'/%3E%3C/svg%3E") !important;
}

/* Retira a borda padrão do botão (opcional, para um visual mais limpo) */
.navbar-toggler {
    border: none;
    padding: 0.25rem 0.5rem;
}

/* Tira aquele contorno feio quando o usuário clica no botão */
.navbar-toggler:focus {
    outline: none;
    box-shadow: none;
}

/* Força a cor primária em qualquer elemento dentro do botão de menu mobile */
.navbar-toggler,
.navbar-toggler-icon,
.navbar-toggler span,
.navbar-toggler i {
    color: var(--primary) !important;
    fill: var(--primary) !important;
}

/* Se você estiver usando FontAwesome para o menu (ex: fa-bars) */
button.navbar-toggler i {
    font-size: 28px !important;
    color: #0A2540 !important;
}