﻿
/* Carousel Container */
.carousel-container {
    margin: 20px 0;
    padding: 0 15px;
}

.carousel-title {
    margin-bottom: 20px;
    color: #333;
    font-weight: 600;
}

/* Carousel Core Styles */
#autoPartsCarousel {
    position: relative;
}

.carousel-inner {
    overflow: hidden;
}

.item {
    display: none;
}

    .item.active {
        display: block;
    }

    /* Force horizontal layout on all screen sizes */
    .item .row {
        display: flex;
        flex-wrap: nowrap;
        overflow-x: visible;
        margin: 0 -5px;
    }

    .item .col-md-3,
    .item .col-sm-6,
    .item .col-xs-6 {
        flex: 0 0 auto;
        padding: 0 5px;
    }

/* Responsive widths while maintaining horizontal layout */
@media (min-width: 992px) {
    .item .col-md-3 {
        width: 25%; /* 4 items */
    }
}

@media (min-width: 768px) and (max-width: 991px) {
    .item .col-sm-6 {
        width: 25%; /* 4 items on tablet too */
    }
}

@media (max-width: 767px) {
    .item .col-xs-6 {
        width: 25%; /* 4 items on mobile */
    }
}

/* Extra small screens - still 4 items but smaller */
@media (max-width: 480px) {
    .item .col-xs-6 {
        width: 25%; /* Keep 4 items on very small screens */
    }
}

/* Auto Part Card Styles */
.auto-part-card {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 15px;
    text-align: center;
    transition: all 0.3s ease;
    height: 100%;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 15px;
}

    .auto-part-card:hover {
        box-shadow: 0 4px 8px rgba(0,0,0,0.15);
        transform: translateY(-2px);
    }

.auto-part-img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: 4px;
    margin-bottom: 10px;
}

.auto-part-caption h6 {
    margin: 0;
    font-size: 14px;
    color: #333;
    font-weight: 500;
    line-height: 1.4;
}

/* Custom carousel controls with Font Awesome */
.carousel-control {
    width: 40px;
    height: 40px;
    background: rgba(0,0,0,0.6);
    border-radius: 50%;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0.8;
    transition: all 0.3s ease;
}

    .carousel-control:hover,
    .carousel-control:focus {
        opacity: 1;
        background: rgba(0,0,0,0.8);
        text-decoration: none;
    }

    .carousel-control.left {
        left: -20px;
    }

    .carousel-control.right {
        right: -20px;
    }

    .carousel-control .fa {
        color: white;
        font-size: 16px;
        line-height: 40px;
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
    }

/* No items message */
.no-items-message {
    text-align: center;
    padding: 40px 20px;
    color: #666;
}

/* Mobile Responsive Adjustments */
@media (max-width: 768px) {
    .carousel-container {
        padding: 0 10px;
    }
}

@media (max-width: 480px) {
    .auto-part-img {
        height: 100px; /* Smaller images on mobile */
    }

    .auto-part-caption h6 {
        font-size: 11px; /* Smaller text */
    }

    .auto-part-card {
        padding: 8px; /* Less padding */
    }

    /* Position controls inside carousel on very small screens */
    .carousel-control.left {
        left: 5px;
    }

    .carousel-control.right {
        right: 5px;
    }
}