.carousel-gallery {
    width: 100%;
}

.carousel-gallery-container {
    position: relative;
    width: 100%; /* Гибкость контейнера */
    margin: 0 auto; /* Центрирование контейнера */
    height: auto; /* Высота контейнера */
    overflow: hidden; /* Обрезаем элементы, выходящие за пределы контейнера */
}

.carousel-container {
    width: 100%; /* Контейнер Swiper будет занимать 100% ширины родителя */
    height: 100%;
    margin-top: -20px;
}

.carousel-wrapper {
    display: flex; /* Чтобы элементы в обертке выстраивались по одному ряду */
}

.swiper-slide {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-shrink: 0; /* Слайды не будут сжиматься, занимая минимальное пространство */
    width: 33.33%; /* Ограничиваем ширину каждого слайда, показывая 3 на экране */
    padding: 0 10px; /* Добавим немного отступа между слайдами */
}

.swiper-slide img {
    width: 100%; /* Изображение будет адаптироваться по ширине слайда */
    height: auto; /* Высота изображения будет пропорциональна ширине */
    object-fit: cover; /* Изображения не искажаются, но обрезаются, если не помещаются в слайд */
    max-height: 100%; /* Ограничиваем максимальную высоту изображения */
    border-radius: 4px;
}

/* Стили для кнопок Swiper */
.carousel-button-wrapper {
    position: absolute;
    bottom: calc(100% - 20px);
    width: calc(100% - 40px);
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    justify-content: space-between;
    z-index: 1;
}

.carousel-button-next,
.carousel-button-prev {
    color: #222;
    padding: 0;
    cursor: pointer;
    z-index: 1;
    transform: scaleX(3) scaleY(1.2);
    font-weight: 400;
    -webkit-transform: scaleX(3) scaleY(1.2);
    -moz-transform: scaleX(3) scaleY(1.2);
    -ms-transform: scaleX(3) scaleY(1.2);
    -o-transform: scaleX(3) scaleY(1.2);
}

.carousel-button-next:focus,
.carousel-button-prev:focus {
    outline: none;
}

.carousel-button-next:hover, .carousel-button-prev:hover {
    color: #333;
}

.carousel-button-next.swiper-button-disabled,
.carousel-button-prev.swiper-button-disabled {
   opacity: .4;
    cursor: not-allowed;
}

.carousel-gallery__warning {
    display: block;
    transform: translateY(10px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s, transform 1s;
    -webkit-transition: opacity 0.3s, transform 1s;
    -moz-transition: opacity 0.3s, transform 1s;
    -ms-transition: opacity 0.3s, transform 1s;
    -o-transition: opacity 0.3s, transform 1s;
    -webkit-transform: translateY(10px);
    -moz-transform: translateY(10px);
    -ms-transform: translateY(10px);
    -o-transform: translateY(10px);
}

.carousel-gallery__warning.is-active {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
    -webkit-transform: translateY(0);
    -moz-transform: translateY(0);
    -ms-transform: translateY(0);
    -o-transform: translateY(0);
}

@media screen and (max-width: 1280px) {
    .carousel-gallery-container {
        max-width: calc(100vw - 80px);
    }
}

@media screen and (max-width: 1024px) {
    .carousel-gallery-container {
        max-width: calc(100vw - 40px);
    }

    .swiper-container {
        margin-top: 0;
    }
}

