/* Стили для карусели фотографий автомобилей */

.car-image-carousel {
    position: relative;
    width: 100%;
    height: 200px;
    overflow: hidden;
    border-radius: 8px 8px 0 0;
    background: #1a1a1a;
}

.carousel-images {
    width: 100%;
    height: 100%;
    position: relative;
}

.carousel-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
    pointer-events: none;
}

    .carousel-image.active {
        opacity: 1;
        pointer-events: auto;
    }

/* Кнопки навигации */
.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    line-height: 1;
}

    .carousel-btn:hover {
        background: rgba(0, 0, 0, 0.8);
        transform: translateY(-50%) scale(1.1);
    }

.carousel-prev {
    left: 10px;
}

.carousel-next {
    right: 10px;
}

/* Точки навигации */
.carousel-dots {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 10;
}

.carousel-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid rgba(255, 255, 255, 0.8);
}

    .carousel-dot:hover {
        background: rgba(255, 255, 255, 0.8);
        transform: scale(1.2);
    }

    .carousel-dot.active {
        background: white;
        transform: scale(1.3);
    }

/* Адаптивность для мобильных */
@media (max-width: 768px) {
    .car-image-carousel {
        height: 200px;
    }

    .carousel-btn {
        width: 35px;
        height: 35px;
        font-size: 20px;
    }

    .carousel-prev {
        left: 5px;
    }

    .carousel-next {
        right: 5px;
    }

    .carousel-dots {
        bottom: 10px;
    }

    .carousel-dot {
        width: 8px;
        height: 8px;
    }
}

/* Скрываем кнопки и точки если только одно фото */
.car-image-carousel:has(.carousel-image:only-of-type) .carousel-btn,
.car-image-carousel:has(.carousel-image:only-of-type) .carousel-dots {
    display: none;
}

/* Контент карточки после карусели */
.car-card-content {
    padding: 20px;
    background: transparent;
    border-radius: 0 0 8px 8px;
}

    .car-card-content h3 {
        margin: 0 0 10px 0;
        color: white;
        font-size: 20px;
        font-weight: 600;
    }

    .car-card-content .price {
        margin: 10px 0;
        color: #ffc107;
        font-size: 24px;
        font-weight: 700;
    }

    .car-card-content button {
        margin-top: 10px;
        width: 100%;
    }
