
/* === Circular Layered Carousel === */
.layered-carousel {
    position: relative;
    width: 100%;
    max-width: 1200px;
    height: 500px;
    margin: 0 auto;
    perspective: 2000px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: visible;
}

.carousel-track {
    position: relative;
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
    display: flex;
    align-items: center;
    justify-content: center;
}

.carousel-item {
    position: absolute;
    top: 50%;
    left: 50%;
    transform-origin: center center;
    opacity: 0;
    pointer-events: none;
    transition:
            transform 0.9s cubic-bezier(0.25, 1.15, 0.5, 1),
            opacity 0.6s ease,
            z-index 0.3s ease;
    will-change: transform, opacity, z-index;
}

.carousel-item.visible {
    opacity: 1;
    pointer-events: auto;
}

.carousel-item img {
    width: 420px;
    height: 420px;
    object-fit: cover;
    border-radius: 1rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    transition: transform 0.4s ease, filter 0.4s ease;
}

.carousel-item.active img {
    transform: scale(1.05);
    filter: brightness(1.1);
}

.carousel-item:not(.active) img {
    filter: brightness(0.9);
}

/* === Управление === */
#catalog .controls {
    margin-top: 80px;
    display: flex;
    justify-content: center;
    gap: 20px;
    position: relative;
    z-index: 200;
}

#catalog .controls button {
    background-color: #000;
    color: #fff;
    padding: 1rem 1.25rem;
    border-radius: 50%;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.25);
    transition: all 0.3s ease;
}

#catalog .controls button:hover {
    background-color: #facc15;
    color: #000;
    transform: scale(1.1);
}

/* === Адаптивность === */
@media (max-width: 1024px) {
    .layered-carousel {
        height: 420px;
        max-width: 900px;
    }
    .carousel-item img {
        width: 300px;
        height: 300px;
    }
}

@media (max-width: 640px) {
    .layered-carousel {
        height: 340px;
        max-width: 95%;
    }
    .carousel-item img {
        width: 200px;
        height: 200px;
    }
}
