/* ========== ОСНОВНАЯ КАРУСЕЛЬ ========== */
.carousel-container {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
}

.my-carousel {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    border-radius: 24px;
    padding-bottom: 12px;
}

.my-carousel::-webkit-scrollbar {
    height: 10px;
}

.my-carousel::-webkit-scrollbar-track {
    background: #e0e0e0;
    border-radius: 10px;
}

.my-carousel::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 10px;
}

.carousel-slide {
    flex: 0 0 100%;
    scroll-snap-align: start;
    cursor: pointer;
}

.carousel-slide img {
    width: 100%;
    height: 500px;
    object-fit: cover;
    display: block;
    border-radius: 24px;
    pointer-events: none;
}

.carousel-nav {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    pointer-events: none;
    z-index: 10;
}

.carousel-prev,
.carousel-next {
    pointer-events: auto;
    background: rgba(0, 0, 0, 0.5);
    border: none;
    color: white;
    font-size: 30px;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    cursor: pointer;
    transition: 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    outline: none;
    box-shadow: none;
}

.carousel-prev:hover,
.carousel-next:hover {
    background: rgba(0, 0, 0, 0.8);
}

.carousel-prev:focus,
.carousel-next:focus {
    outline: none;
    box-shadow: none;
}

@media (max-width: 768px) {
    .carousel-slide img {
        height: 300px;
    }
    .carousel-prev,
    .carousel-next {
        width: 44px;
        height: 44px;
        font-size: 32px;
    }
}

/* ========== СПА-ТЕРРИТОРИЯ ========== */
.spa-section {
    padding: 60px 0;
    background: #fff;
}

.spa-title {
    text-align: center;
    font-family: 'Bebas Neue', 'sans-serif';
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 700;
    color: #353430;
    margin-bottom: 40px;
    text-transform: uppercase;
}

/* ДЕСКТОПНАЯ ПЛИТКА */
.spa-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.spa-grid-item {
    position: relative;
    cursor: pointer;
    overflow: hidden;
    border-radius: 24px;
}

.spa-grid-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
    display: block;
}

.spa-grid-item:hover img {
    transform: scale(1.05);
}

.spa-grid-item:nth-child(1),
.spa-grid-item:nth-child(2),
.spa-grid-item:nth-child(3),
.spa-grid-item:nth-child(4),
.spa-grid-item:nth-child(5),
.spa-grid-item:nth-child(7),
.spa-grid-item:nth-child(8) {
    aspect-ratio: 1 / 1;
}

.spa-grid-item:nth-child(6) {
    grid-column: 3 / 4;
    grid-row: 2 / 4;
    aspect-ratio: 1 / 2.08;
}

/* МОБИЛЬНАЯ КАРУСЕЛЬ (только на экранах до 768px) */
@media (max-width: 768px) {
    .spa-grid {
        display: none;
    }
    .carousel-slide {
        padding-top:40px;
    }
    .spa-carousel-container {
        display: block;
        max-width: 100%;
        margin: 0 auto;
        position: relative;
        padding: 0;
    }
    
    .spa-my-carousel {
        display: flex;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        scroll-behavior: smooth;
        border-radius: 24px;
        padding-bottom: 12px;
        gap: 0;
    }
    
    .spa-my-carousel::-webkit-scrollbar {
        height: 8px;
    }
    
    .spa-my-carousel::-webkit-scrollbar-track {
        background: #e0e0e0;
        border-radius: 10px;
    }
    
    .spa-my-carousel::-webkit-scrollbar-thumb {
        background: #888;
        border-radius: 10px;
    }
    
    .spa-carousel-slide {
        flex: 0 0 100%;
        scroll-snap-align: start;
        cursor: pointer;
    }
    
    .spa-carousel-slide img {
        width: 100%;
        height: 300px;
        object-fit: cover;
        display: block;
        border-radius: 24px;
        pointer-events: none;
    }
    
    .spa-carousel-nav {
        position: absolute;
        top: 50%;
        transform: translateY(-50%);
        width: 100%;
        display: flex;
        justify-content: space-between;
        padding: 0 15px;
        pointer-events: none;
        z-index: 10;
        left: 0;
        right: 0;
        box-sizing: border-box;
    }
    
    .spa-carousel-prev,
    .spa-carousel-next {
        pointer-events: auto;
        background: rgba(0, 0, 0, 0.5);
        border: none;
        color: white;
        font-size: 30px;
        width: 40px;
        height: 40px;
        border-radius: 50%;
        cursor: pointer;
        transition: 0.3s;
        display: flex;
        align-items: center;
        justify-content: center;
    }
}

/* ДЕСКТОПНАЯ ВЕРСИЯ — СКРЫВАЕМ МОБИЛЬНУЮ КАРУСЕЛЬ */
@media (min-width: 769px) {
    .spa-carousel-container {
        display: none;
    }
}
