/* Стили для карусели похожих товаров */
.products-carousel {
    position: relative;
    width: 100%;
    margin: 0 auto;
}

.carousel-wrapper {
    position: relative;
    overflow: hidden;
    margin: 0 -15px;
    padding: 0 15px;
}

.carousel-track {
    display: flex;
    gap: 30px;
    transition: transform 0.3s ease-out;
    /* user-select: none; */
}

/* Стили для мобильных устройств */
/*.products-carousel.is-mobile .carousel-track {
    cursor: grab;
    touch-action: pan-y pinch-zoom;
}

.products-carousel.is-mobile .carousel-track:active {
    cursor: grabbing;
}*/

.carousel-track .product-card {
    flex: 0 0 100%;
    max-width: 100%;
    transition: opacity 0.3s ease;
}

.carousel-button {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    border: 1px solid #e0e0e0;
    border-radius: 50%;
    background: #fff;
    color: #333;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2;
    transition: all 0.3s ease;
}

.carousel-button:hover {
    background: #f5f5f5;
    border-color: #ccc;
}

.carousel-button.prev {
    left: -20px;
}

.carousel-button.next {
    right: -20px;
}

.carousel-button svg {
    width: 20px;
    height: 20px;
}

/* Адаптивные стили */
@media (min-width: 576px) {
    .carousel-track .product-card {
        flex: 0 0 calc(50% - 15px);
        max-width: calc(50% - 15px);
    }
}

@media (min-width: 768px) {
    .carousel-track .product-card {
        flex: 0 0 calc(33.333% - 20px);
        max-width: calc(33.333% - 20px);
    }
}

@media (min-width: 1200px) {
    .carousel-track .product-card {
        flex: 0 0 calc(25% - 22.5px);
        max-width: calc(25% - 22.5px);
    }
}

/* Показываем кнопки только когда есть возможность прокрутки */
.products-carousel.has-overflow .carousel-button {
    display: flex;
}

/* Стили для неактивных кнопок */
.carousel-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}
