.slider-container {
    position: relative;
    max-width: 100%;
    margin: 0 auto;
    overflow: hidden;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.slider {
    display: flex;
    transition: transform 0.5s ease-in-out;
    width: 100%;
}

.slide {
    height: 650px; /* фиксированная высота слайда */
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    overflow: hidden;
    position: relative;
    margin: 0 auto;
    min-width: 100%;
}
/* Центральный контейнер: определяет ширину по изображению */
.slide-content-wrapper {
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
}

.slide-content-wrapper img {
    height: 100%;
    width: auto;
    min-width: 100%; /* гарантирует, что изображение ≥ ширины слайда */
    object-fit: cover;
    flex-shrink: 0;
}

/* Прямоугольник с отступами сверху/снизу и той же шириной, что и изображение */
.slide-caption {
    position: absolute;
    top: 20%;
    bottom: 20%;
    left: 20%;
    right: 20%;
    /*width: 100%; !* ширина = ширина изображения (потому что родитель = image-wrapper по ширине) *!*/
    background: rgba(255, 255, 255, 0.6);
    color: #333;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    font-size: clamp(1.2rem, 7vw, 2.2rem);
    font-weight: 600;
    padding: 0 10px; /* горизонтальные отступы внутри */
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    backdrop-filter: blur(4px);
    pointer-events: auto;

    font-family: "Sunday Regular", Sunday, "Sunday", sans-serif;
}

/* Градиенты по краям слайда (как раньше) */
.slide::before,
.slide::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: 30px;
    pointer-events: none;
    z-index: 10; /* поверх изображения, но под caption */
}
.slide::before { left: 0;  background: linear-gradient(to right, white 0%, transparent 70%); }
.slide::after  { right: 0; background: linear-gradient(to left, white 0%, transparent 70%); }


.slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.3);
    border: none;
    color: #ffffff;
    font-size: 1.8rem;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    backdrop-filter: blur(4px);
}

.prev { left: 10px; }
.next { right: 10px; }

.dots {
    position: absolute;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: background 0.3s;
}

.dot.active {
    background: white;
}

/* Индивидуальные настройки слайдов */
/*--- слайд Главный ---*/
#slide-main .slide-caption {
    font-size: clamp(1.7rem, 4vw, 3.5rem);
    background: rgba(243, 226, 13, 0.3);
    color: #ffffff;
}
#slide-main .slide-caption span {
    transform: scaleX(1.3);
}

/*--- слайд Черная пятница ---*/
#slide-black_friday .slide-caption {
    font-size: clamp(1.8rem, 4vw, 3.5rem);
    background: rgba(0, 0, 0, 0.5);
    color: #ffffff;
}
#slide-black_friday .slide-caption a {
    text-decoration: none;
    color: #ffffff;
    transform: scaleX(1.3);
}
#slide-black_friday .slide-caption a {
    text-decoration: none;
    color: #ffffff;
    transform: scaleX(1.3);
}

#slide-black_friday .slide-caption a .small{
    font-size: clamp(1.2rem, 3vw, 1.5rem);

    transform: scaleX(1);
}
#slide-black_friday .slide-caption a .small:hover{
    text-decoration: underline;
}

/*--- слайд 2 ---*/
#slide-2 .slide-caption {
    font-size: clamp(1.5rem, 3vw, 2.5rem);
    background: rgba(243, 226, 13, 0.4);
    color: #996533;
    top: 20%;
    bottom: 45%;
    left: 32%;
    right: 10%;
}
#slide-2 .slide-caption span {
    transform: scaleX(1);
}

/*--- слайд 3 ---*/
#slide-3 .slide-caption {
    font-size: clamp(1.5rem, 3vw, 2.5rem);
    background: rgba(243, 226, 13, 0.4);
    color: #996533;
    top: 20%;
    bottom: 45%;
    left: 32%;
    right: 10%;
}
#slide-3 .slide-caption span {
    transform: scaleX(1);
}

/* Адаптация под мобильные */
@media (max-width: 1200px) {
    .slide {
        height: 450px;
        font-size: clamp(1.2rem, 6vw, 2rem);
    }
}


@media (max-width: 991px) {
    .slide {
        height: 300px;
        font-size: clamp(1.2rem, 6vw, 2rem);
    }

    .slider-btn {
        width: 40px;
        height: 40px;
        font-size: 1.4rem;
    }
}


