/* Estilos da Galeria - Versão Final Ajustada */
.gallery-item {
    height: 180px; /* Altura reduzida */
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px; /* Espaço para a borda */
    margin: 8px; /* Espaço entre os itens */
    box-sizing: border-box;
    background-color: #f8f9fa; /* Cor de fundo do quadrado */
    border: 1px solid #e0e0e0; /* Borda sutil */
    border-radius: 15px; /* Borda arredondada no container */
    box-shadow: 0 2px 5px rgba(0,0,0,0.05); /* Sombra leve */
}

.gallery-item img {
    max-width: 45%; /* Reduzido ~15% a mais (de 60% para 45%) */
    max-height: 45%;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 10px;
    transition: all 0.3s ease;
}

.gallery-item img:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

/* Layout responsivo */
.row.g-0 {
    display: flex;
    flex-wrap: wrap;
    justify-content: center; /* Centraliza os itens */
}

.row.g-0 > [class^="col-"] {
    display: flex;
    padding: 5px; /* Espaçamento entre colunas */
}

.product-card img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-radius: 8px;
}

.product-card {
    border: 2px solid #007bff;
    border-radius: 10px;
    padding: 15px;
    text-align: center;
    transition: transform 0.2s, box-shadow 0.2s;
    background-color: #f8f9fa;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 123, 255, 0.2);
}

.product-name {
    margin-top: 10px;
    font-weight: 500;
    color: #333;
}

.product-application {
    margin-top: 8px;
    font-size: 0.9rem;
    color: #555;
}

.whatsapp-btn {
    background-color: #25D366;
    border-color: #25D366;
    font-weight: bold;
}

.whatsapp-btn:hover {
    background-color: #1ebe5d;
    border-color: #1ebe5d;
}

.section-title {
    text-align: center;
    margin: 30px 0;
    font-size: 2rem;
    font-weight: bold;
    color: #007bff;
}

#searchInput {
    max-width: 400px;
    margin: 0 auto 30px auto;
}

.gallery-caption {
    margin-top: 8px;
    font-size: 1rem;
    color: #333;
    font-weight: 500;
}

.gallery-item-box {
    border: 2px solid #007bff;
    border-radius: 12px;
    padding: 10px;
    background-color: #f8f9fa;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
    transition: transform 0.2s, box-shadow 0.2s;
}

.gallery-item-box:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 123, 255, 0.2);
}

.gallery-item-box img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-radius: 8px;
}

.gallery-caption {
    margin-top: 12px;
    font-size: 1rem;
    color: #333;
    font-weight: 600;
    padding: 8px 10px;
    background-color: #e9f2ff;
    border-radius: 6px;
    border-top: 2px solid #007bff;
    text-align: center;
}

/* Estilos para a seção de Principais Produtos */
.service-item {
    border: 2px solid #007bff;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    height: 100%;
    transition: all 0.3s ease;
    background-color: #f8f9fa;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.service-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 123, 255, 0.2);
}

.service-item .icon {
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #007bff;
    border-radius: 50%;
    margin-bottom: 20px;
}

.service-item .icon i {
    color: white;
    font-size: 2rem;
}

.service-item h3 {
    margin-bottom: 15px;
    color: #333;
}

.service-item p {
    color: #555;
    flex-grow: 1;
}

/* Alinhamento central para a seção */
#products .container {
    display: flex;
    flex-direction: column;
    align-items: center;
}

#products .row {
    justify-content: center;
}

/* Estilo para containers com imagens */
.image-container {
    width: 100%;
    height: 180px;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: 8px;
}

.image-container img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.service-item:hover .image-container img {
    transform: scale(1.05);
}

/* ===== AJUSTES PARA OS ÍCONES DOS PRINCIPAIS PRODUTOS ===== */
/* ===== GALERIA AJUSTADA PARA SUA ESTRUTURA ===== */
#gallery .container-fluid {
    padding: 0 15px;
}

#gallery .row.g-0 {
    display: flex;
    flex-wrap: wrap;
    justify-content: center; /* Centraliza os itens */
    margin: 0 -10px; /* Compensa o padding dos itens */
}

#gallery .col-lg-3.col-md-4.mb-4 {
    padding: 10px; /* Espaçamento entre itens */
    flex: 0 0 auto;
    width: 25%; /* 4 itens por linha em desktop */
}

#gallery .gallery-item-box {
    border: 2px solid #007bff;
    border-radius: 12px;
    padding: 15px;
    height: 100%;
    transition: all 0.3s ease;
    background: #f8f9fa;
    display: flex;
    flex-direction: column;
}

#gallery .gallery-item-box a {
    display: block;
    margin-bottom: 10px;
    flex-grow: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

#gallery .gallery-item-box img {
    max-width: 100%;
    max-height: 180px;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 8px;
}

#gallery .gallery-caption {
    text-align: center;
    font-weight: 600;
    color: #333;
    padding: 8px;
    background: #e9f2ff;
    border-radius: 4px;
    margin-top: auto; /* Fixa no fundo do box */
}

/* Responsividade */
@media (max-width: 991.98px) {
    #gallery .col-lg-3.col-md-4.mb-4 {
        width: 33.333%; /* 3 itens por linha em tablet */
    }
}

@media (max-width: 767.98px) {
    #gallery .col-lg-3.col-md-4.mb-4 {
        width: 50%; /* 2 itens por linha em mobile */
    }
}

@media (max-width: 575.98px) {
    #gallery .col-lg-3.col-md-4.mb-4 {
        width: 100%; /* 1 item por linha em mobile pequeno */
    }
}

/* Estilos para o menu dropdown */
.navmenu .dropdown {
    position: relative;
}

.navmenu .dropdown-menu {
    display: none !important; /* Garante que o submenu esteja oculto por padrão */
    position: absolute;
    top: 100%;
    left: 0;
    background-color: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 10px;
    min-width: 200px;
    z-index: 1000;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.navmenu .dropdown:hover > .dropdown-menu {
    display: none !important; /* Desativa explicitamente o hover */
}

.navmenu .dropdown-menu.show, .navmenu .dropdown-menu.dropdown-active {
    display: block !important; /* Exibe o submenu apenas com a classe show ou dropdown-active */
}

.navmenu .dropdown-menu .dropdown-item {
    color: #333;
    padding: 8px 15px;
    font-size: 0.9rem;
    transition: background-color 0.2s ease;
}

.navmenu .dropdown-menu .dropdown-item:hover {
    background-color: #f8f9fa;
    color: #007bff;
}

/* Suporte para submenus aninhados */
.navmenu .dropdown-menu .dropdown {
    position: relative;
}

.navmenu .dropdown-menu .dropdown-menu {
    top: 0;
    left: 100%;
    margin-left: 1px;
}

/* Estilos para dispositivos móveis */
@media (max-width: 1199.98px) {
    .navmenu .dropdown-menu {
        position: static;
        display: none !important;
        background-color: #f8f9fa;
        border: none;
        box-shadow: none;
        padding: 10px 20px;
    }

    .navmenu .dropdown-menu.show, .navmenu .dropdown-menu.dropdown-active {
        display: block !important; /* Exibe o submenu quando ativo em mobile */
    }

    .navmenu .dropdown-menu .dropdown-menu {
        margin-left: 10px;
    }
}

/* Estilo para o ícone toggle */
.navmenu .toggle-dropdown {
    margin-left: 5px;
    cursor: pointer;
}

/* Estilo para item ativo */
.navmenu .dropdown-menu .dropdown-item.active {
    background-color: #007bff;
    color: #fff;
}