/* ============================================= */
/* == PÁGINA CATÁLOGO                         == */
/* ============================================= */

/* --- BOTÕES DE FILTRO --- */
.filter-controls {
    padding: 1rem 0;
    background-color: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
}

.filter-btn {
    background-color: #e9ecef;
    color: var(--bagauto-gray-dark);
    border: none;
    padding: 0.6rem 1.2rem;
    margin: 0.25rem;
    border-radius: 50px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.filter-btn:hover {
    background-color: #d1d5db;
}

.filter-btn.active {
    background-color: var(--bagauto-green-dark);
    color: var(--bagauto-white);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* --- GRID DE PRODUTOS --- */
.product-grid {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
}

.product-card {
    padding: 0.75rem;
    /* Espaçamento entre os cards */
}

/* Efeito de esconder/mostrar para o filtro */
.product-card.hide {
    display: none;
}

.card.product {
    border: 1px solid #e9ecef;
    border-radius: 0.75rem;
    overflow: hidden;
    height: 100%;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card.product:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.1);
}

.product-img {
    height: 350px;
    width: 100%;
    object-fit: cover;
}

.product-category {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--bagauto-green-light);
}

.product-title {
    font-weight: 700;
    color: var(--bagauto-gray-dark);
}

.product-specs {
    list-style: none;
    padding-left: 0;
    font-size: 0.9rem;
    color: var(--bagauto-gray-medium);
}

.product-specs li {
    margin-bottom: 0.25rem;
}

.product-specs i {
    width: 20px;
    color: var(--bagauto-green-light);
}

/* ============================================= */
/* == GALERIA DE IMAGENS (MODAL E CARROSSEL)  == */
/* ============================================= */

.modal-title {
    color: #fff;
}

.product-img-container {
    position: relative;
    cursor: pointer;
    overflow: hidden;
}

/* Ícone de lupa que aparece no hover */
.product-img-container::after {
    content: '\f00e';
    /* Código do ícone de lupa do Font Awesome */
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.8);
    font-size: 2.5rem;
    color: white;
    background-color: rgba(0, 0, 0, 0.5);
    width: 70px;
    height: 70px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.3s ease;
}

.product-img-container:hover::after {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.product-img-container:hover .product-img {
    transform: scale(1.05);
    /* Efeito de zoom suave na imagem */
}

.product-img {
    transition: transform 0.3s ease;
}

/* Estilos para o Modal */
.modal-header {
    background-color: var(--bagauto-green-dark);
    color: var(--bagauto-white);
}

.modal-header .btn-close {
    filter: invert(1) grayscale(100%) brightness(200%);
}

.carousel-control-prev-icon,
.carousel-control-next-icon {
    filter: invert(1) grayscale(100%);
}

/* ======================================================= */
/* == MELHORIA DE USABILIDADE DO CATÁLOGO PARA MOBILE   == */
/* ======================================================= */

/*
  1. Indicador visual para MOBILE:
  Cria um ícone de '+' sempre visível no canto da imagem.
*/
.product-img-container::before {
    content: '\2b';
    /* Código do ícone de '+' */
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    top: 12px;
    right: 12px;
    width: 32px;
    height: 32px;
    background-color: rgba(0, 0, 0, 0.6);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    z-index: 5;
    border: 2px solid rgba(255, 255, 255, 0.7);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}


/*
  2. Animação de lupa para DESKTOP:
  Aplica a animação da lupa apenas em dispositivos com mouse.
*/
@media (hover: hover) and (pointer: fine) {

    /* Esconde o ícone de '+' do mobile no desktop */
    .product-img-container::before {
        display: none;
    }

    /* Recria a animação da lupa que já existia */
    .product-img-container::after {
        content: '\f00e';
        /* Ícone de lupa */
        font-family: 'Font Awesome 6 Free';
        font-weight: 900;
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%) scale(0.8);
        font-size: 2.5rem;
        color: white;
        background-color: rgba(0, 0, 0, 0.5);
        width: 70px;
        height: 70px;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        opacity: 0;
        transition: all 0.3s ease;
    }

    .product-img-container:hover::after {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

/* ======================================================= */
/* == CORREÇÃO DEFINITIVA DO CARROSSEL (MODAL)          == */
/* ======================================================= */

/* Estiliza o botão circular */
.modal .carousel-control-prev,
.modal .carousel-control-next {
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 50%;
    background-color: rgba(0, 0, 0, 0.5);
    top: 50%;
    transform: translateY(-50%);
    transition: all 0.3s ease;
    opacity: 0.85;
    /* Um pouco de transparência para integrar melhor */
    background-image: none;
    /* Removemos a imagem padrão */

    /* Usamos flexbox para centralizar nosso novo ícone */
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Efeito de hover */
.modal .carousel-control-prev:hover,
.modal .carousel-control-next:hover {
    background-color: rgba(0, 0, 0, 0.7);
    opacity: 1;
    transform: translateY(-50%) scale(1.05);
}

/* Esconde o ícone SVG padrão do Bootstrap que estava sumindo */
.modal .carousel-control-prev-icon,
.modal .carousel-control-next-icon {
    display: none;
}

/* Adiciona nosso próprio ícone de seta usando Font Awesome */
.modal .carousel-control-prev::before,
.modal .carousel-control-next::before {
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    font-size: 1.5rem;
    /* Tamanho do ícone */
    color: white;
    text-shadow: 0 0 10px rgba(0, 0, 0, 0.8);
    /* Sombra para destacar */
}

.modal .carousel-control-prev::before {
    content: '\f053';
    /* Código do ícone "chevron-left" */
}

.modal .carousel-control-next::before {
    content: '\f054';
    /* Código do ícone "chevron-right" */
}