/* Brand Carousel Swiper */

.brand-carousel-wrapper {
    width: 100%;
    margin: 20px 0;
}

.brand-carousel-swiper {
    width: 100%;
    padding: 30px 0;
    position: relative;
}

/* Slide / Item */
.brand-carousel-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    min-height: 180px;
    padding: 15px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    background-color: #ffffff;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
}

.brand-carousel-item:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.brand-carousel-item img {
    width: 100%;
    height: auto;
    max-width: 150px;
    max-height: 150px;
    object-fit: contain;
    margin-bottom: 10px;
}

.brand-carousel-item .brand-name {
    font-size: 13px;
    font-weight: 600;
    color: #333;
    text-align: center;
    margin: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    width: 100%;
}

/* Quand pas de nom */
.brand-carousel-item:not(:has(.brand-name)) {
    min-height: 200px;
}

.brand-carousel-item:not(:has(.brand-name)) img {
    max-height: 180px;
}

/* Navigation (flèches) */
.swiper-button-prev,
.swiper-button-next {
    position: absolute;
    top: 50%;
    width: 44px;
    height: 44px;
    margin-top: -22px;
    z-index: 10;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
    border-radius: 50%;
    transition: background-color 0.3s ease;
}

.swiper-button-prev:hover,
.swiper-button-next:hover {
    background-color: rgba(0, 0, 0, 0.8);
}

.swiper-button-prev::after,
.swiper-button-next::after {
    font-size: 20px;
    color: white;
    font-weight: bold;
}

.swiper-button-prev {
    left: 0;
}

.swiper-button-next {
    right: 0;
}

/* Pagination (points) */
.swiper-pagination {
    position: relative;
    text-align: center;
    margin-top: 20px;
}

.swiper-pagination-bullet {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: #bbb;
    opacity: 0.5;
    margin: 0 6px;
    cursor: pointer;
    transition: background-color 0.3s ease, opacity 0.3s ease;
}

.swiper-pagination-bullet-active {
    background-color: #333;
    opacity: 1;
}

/* Responsive */
@media (max-width: 1024px) {
    .brand-carousel-item {
        padding: 12px;
    }

    .brand-carousel-item img {
        max-width: 120px;
    }

    .swiper-button-prev,
    .swiper-button-next {
        width: 36px;
        height: 36px;
        margin-top: -18px;
    }

    .swiper-button-prev::after,
    .swiper-button-next::after {
        font-size: 16px;
    }
}

@media (max-width: 768px) {
    .brand-carousel-item {
        padding: 10px;
    }

    .brand-carousel-item img {
        max-width: 100px;
    }

    .brand-carousel-item .brand-name {
        font-size: 12px;
    }

    .swiper-button-prev,
    .swiper-button-next {
        display: none;
    }

    .swiper-pagination {
        margin-top: 15px;
    }

    .swiper-pagination-bullet {
        width: 8px;
        height: 8px;
        margin: 0 4px;
    }
}

@media (max-width: 480px) {
    .brand-carousel-swiper {
        padding: 20px 0;
    }

    .brand-carousel-item {
        padding: 8px;
    }

    .brand-carousel-item img {
        max-width: 80px;
    }

    .brand-carousel-item .brand-name {
        font-size: 11px;
    }
}
