/* ESTRUCTURA MAESTRA */
.brands-carousel-master-wrapper {
    width: 100%;
}

.brands-carousel-outer-wrapper {
    position: relative;
    width: 100%;
}

/* Contenedor del Carrusel (el que corta el sobrante) */
.brands-carousel-wrapper {
    width: 100%;
    height: auto;
    overflow: hidden; /* Esto oculta las marcas que no están en pantalla */
}

/* Diapositivas */
.swiper-slide.brand-item {
    text-align: center;
    display: flex;
    justify-content: center;
    align-items: center;
    height: auto;
}

.swiper-slide.brand-item .brand-link-wrapper {
    display: block;
    width: 100%;
    padding: 10px;
    overflow: hidden; 
}

/* -------------------------------------- */
/* EFECTOS HOVER DE IMÁGENES              */
/* -------------------------------------- */

.swiper-slide.brand-item img {
    max-width: 100%;
    height: auto;
    object-fit: contain;
    display: block;
    margin: 0 auto;
    transition: transform 0.3s ease, filter 0.3s ease;
    transform-origin: center center;
}

.brand-effect-zoom .swiper-slide.brand-item a:hover img {
    transform: scale(1.15);
}

.brand-effect-grayscale .swiper-slide.brand-item a:hover img {
    filter: grayscale(100%);
}

.brand-effect-color .swiper-slide.brand-item img {
    filter: grayscale(100%);
    opacity: 0.7; 
}
.brand-effect-color .swiper-slide.brand-item a:hover img {
    filter: grayscale(0%);
    opacity: 1;
}

.brand-fallback {
    background-color: #f9f9f9;
    border: 1px solid #eaeaea;
    border-radius: 8px;
    padding: 30px 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100px; 
    transition: background-color 0.3s, transform 0.3s ease;
}

.brand-fallback span {
    font-weight: 600;
    color: #555;
    font-size: 16px;
}

.brand-effect-zoom .swiper-slide.brand-item a:hover .brand-fallback {
    transform: scale(1.05);
}
.swiper-slide.brand-item a:hover .brand-fallback {
    background-color: #f1f1f1;
}

/* -------------------------------------- */
/* PAGINACIÓN Aislada                     */
/* -------------------------------------- */
.brands-carousel-master-wrapper .swiper-pagination {
    position: relative; /* Lo sacamos del flujo absoluto del swiper */
    bottom: auto !important; 
    margin-top: 20px; /* Distancia segura de las imágenes */
}

.brands-carousel-master-wrapper .swiper-pagination-bullet {
    background-color: #333; 
    opacity: 0.5;
    transition: background-color 0.3s ease, opacity 0.3s ease;
}

.brands-carousel-master-wrapper .swiper-pagination-bullet-active {
    background-color: #0073aa; 
    opacity: 1;
}

/* -------------------------------------- */
/* FLECHAS DE NAVEGACIÓN LIBRES           */
/* -------------------------------------- */
.brands-carousel-master-wrapper .swiper-button-prev,
.brands-carousel-master-wrapper .swiper-button-next {
    background-color: rgba(0, 0, 0, 0.5);
    border-radius: 50%;
    transition: background-color 0.3s ease, color 0.3s ease, opacity 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    /* Ajuste de posición vertical relativo solo a la altura de las imágenes */
    margin-top: -20px; 
}

.brands-carousel-master-wrapper .swiper-button-prev:after,
.brands-carousel-master-wrapper .swiper-button-next:after {
    font-family: swiper-icons;
    text-transform: none !important;
    letter-spacing: 0;
    font-variant: initial;
    line-height: 1;
}