/* =========================================
   1. PAGINAÇÃO
   ========================================= */
.simple-pagination ul {
    margin: 0 0 20px;
    padding: 0;
    list-style: none;
    text-align: center;
}

.simple-pagination li {
    display: inline-block;
    margin-right: 5px;
}

.simple-pagination li a,
.simple-pagination li span {
    color: #666;
    padding: 5px 10px;
    text-decoration: none;
    border: 1px solid var(--cinza-empresas-maggi, #eee);
    background-color: var(--cinza-empresas-maggi, #eee);
    box-shadow: 0px 0px 10px 0px #EEE;
    border-radius: 4px; /* Adicionado um leve arredondamento */
}

.simple-pagination .current {
    color: #FFF;
    background-color: var(--azul-empresas-maggi, #0d6efd);
    border-color: var(--azul-empresas-maggi, #0d6efd);
}

.simple-pagination .prev.current,
.simple-pagination .next.current {
    background: var(--cor-site-secundary, #6c757d);
}

.page-link:focus {
    z-index: 3;
    color: white;
    background-color: #2882c4;
    outline: 0;
    box-shadow: 0 0 0 0.25rem rgb(13 110 253 / 25%);
}

.page-link:hover {
    z-index: 2;
    color: #0a58ca;
    background-color: #2882c4;
    border-color: #2882c4;
}

#pagination-container ul {
    margin-top: 15px;
}

/* =========================================
   2. ESTILOS GERAIS DO FILTRO (DESKTOP E MOBILE)
   ========================================= */

/* Card Principal */
#filtro__buscar_info_veiculos .card {
    border: 1px solid #dee2e6 !important; /* Corrigido para uma cor real em vez de apenas border: solid */
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

/* Cabeçalho "Filtros" */
#filtro__estoque {
    background-color: #f8f9fa;
    border-bottom: 1px solid #eee;
    padding: 15px 20px;
}

/* Accordion (Abas) */
.accordion-button {
    font-size: 0.95rem;
    font-weight: 600;
    color: #444;
    background-color: #fff;
    padding: 12px 20px;
    box-shadow: none !important;
}

.accordion-button:not(.collapsed) {
    color: var(--azul-empresas-maggi, #0d6efd);
    background-color: #f0f7ff;
    border-bottom: 1px solid #eef;
    box-shadow: inset 0 -1px 0 rgba(0,0,0,.125) !important;
}

.accordion-button:focus {
    border-color: rgba(0,0,0,0.05);
}

.accordion-body {
    padding: 15px 20px;
    background-color: #fff;
}

/* Checkboxes e Labels */
.form-check {
    margin-bottom: 6px;
    padding-left: 1.8em;
}

.form-check-input {
    cursor: pointer;
    border-color: #adb5bd;
}

.form-check-input:checked {
    background-color: var(--azul-empresas-maggi, #0d6efd);
    border-color: var(--azul-empresas-maggi, #0d6efd);
}

.form-check-label {
    cursor: pointer;
    font-size: 0.9rem;
    color: #555;
    transition: color 0.2s;
}

.form-check:hover .form-check-label {
    color: #000;
}

/* Inputs de Texto/Numero */
.form-control-sm, .form-select-sm {
    border-radius: 6px;
    border: 1px solid #dee2e6;
    padding: 8px 10px;
    font-size: 0.9rem;
}

.form-control:focus, .form-select:focus {
    border-color: var(--azul-empresas-maggi, #86b7fe);
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.15);
}

/* Labels Pequenos */
.label-mini, .label-filtro-input {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 700;
    color: #888;
    margin-bottom: 4px;
    display: block;
}

/* =========================================
   3. SCROLLBARS (Listas Longas)
   ========================================= */
.filtro-scroll {
    max-height: 220px;
    overflow-y: auto;
    padding-right: 5px;
    
    /* Firefox Support */
    scrollbar-width: thin;
    scrollbar-color: #ccc #f1f1f1;
}

/* Webkit (Chrome, Edge, Safari) */
.filtro-scroll::-webkit-scrollbar { width: 6px; }
.filtro-scroll::-webkit-scrollbar-track { background: #f1f1f1; }
.filtro-scroll::-webkit-scrollbar-thumb { background: #ccc; border-radius: 4px; }
.filtro-scroll::-webkit-scrollbar-thumb:hover { background: #aaa; }


/* =========================================
   4. MOBILE ONLY (GAVETA E BOTÃO FLUTUANTE)
   ========================================= */

/* Padrão: Botão flutuante oculto no Desktop */
.btn-filtro-flutuante {
    display: none;
}

@media (max-width: 991px) {
    
    /* --- BACKDROP (Fundo escuro) --- */
    .filter-backdrop {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: rgba(0, 0, 0, 0.6);
        z-index: 1040;
        display: none;
        opacity: 0;
        transition: opacity 0.3s ease;
        backdrop-filter: blur(2px);
    }
    .filter-backdrop.show {
        display: block;
        opacity: 1;
    }

    /* --- MENU GAVETA (OFF-CANVAS) --- */
    #filtro__buscar_info_veiculos .hidden-menu {
        position: fixed;
        top: 0;
        left: -100%;
        width: 85%;
        max-width: 320px;
        height: 100vh;
        background-color: #fff;
        z-index: 1050;
        transition: left 0.3s cubic-bezier(0.25, 1, 0.5, 1);
        overflow-y: auto;
        box-shadow: 4px 0 15px rgba(0,0,0,0.1);
        display: block !important;
        padding-bottom: 80px;
    }

    #filtro__buscar_info_veiculos .hidden-menu.active {
        left: 0;
    }

    /* Cabeçalho do Mobile */
    .mobile-filter-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 15px 20px;
        background-color: #f8f9fa;
        border-bottom: 1px solid #dee2e6;
        position: sticky;
        top: 0;
        z-index: 10;
    }
    
    .card-header-mobile-old {
        display: none !important;
    }

    /* --- BOTÃO FLUTUANTE (FIXO) --- */
    .btn-filtro-flutuante {
        display: flex;
        align-items: center;
        justify-content: center;
        position: fixed;
        bottom: 60px; /* Distância do fundo */
        left: 50%;
        transform: translateX(-50%); /* Centraliza exato */
        width: 70%; /* Largura automática baseada no conteúdo */
        min-width: 200px;
        max-width: 90%;
        background-color: var(--azul-empresas-maggi, #0d6efd);
        color: #fff;
        font-weight: bold;
        text-transform: uppercase;
        padding: 12px 25px;
        border-radius: 50px;
        z-index: 1030;
        cursor: pointer;
        border: none;
        font-size: 1rem;
        letter-spacing: 0.5px;
        
        /* A Sombra e Animação são definidas juntas aqui */
        box-shadow: 0 4px 15px rgba(0,0,0,0.3);
        animation: pulse-blue 2s infinite;
    }
    
    .btn-filtro-flutuante:active {
        transform: translateX(-50%) scale(0.95); /* Efeito de clique */
        animation: none; /* Para a animação ao clicar */
    }
    
    .btn-filtro-flutuante i {
        margin-right: 10px;
        font-size: 1.1rem;
    }

    .btn-filtro-flutuante i.fas {
	    color: white !important;
    }

    /* Esconde o botão se o filtro estiver aberto (controlado via JS adicionando classe no body) */
    body.filter-open .btn-filtro-flutuante {
        display: none !important;
    }
}

/* =========================================
   5. ANIMAÇÕES
   ========================================= */

/* Correção do Pulse:
   Mantemos a sombra original (box-shadow) dentro do keyframe
   para que o botão não perca o efeito de profundidade enquanto pulsa.
*/
@keyframes pulse-blue {
    0% {
        box-shadow: 0 4px 15px rgba(0,0,0,0.3), 0 0 0 0 rgba(13, 110, 253, 0.7);
    }
    70% {
        box-shadow: 0 4px 15px rgba(0,0,0,0.3), 0 0 0 15px rgba(13, 110, 253, 0);
    }
    100% {
        box-shadow: 0 4px 15px rgba(0,0,0,0.3), 0 0 0 0 rgba(13, 110, 253, 0);
    }
}