
/* Catalog specific styles */

/* Filter Card */
.filter-card {
    position: sticky;
    top: 20px;
    z-index: 100;
}

/* Range Slider Customization */
.form-range::-webkit-slider-thumb {
    background: #dc3545;
}

.form-range::-moz-range-thumb {
    background: #dc3545;
}

/* Car Card Hover Effect */
.car-card {
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

.car-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 .5rem 1rem rgba(0,0,0,.15)!important;
}

/* Image Aspect Ratio */
.ratio-4x3 {
    --bs-aspect-ratio: 75%;
}

/* Badge Styles */
.badge {
    font-weight: 500;
}

/* Sticky Sidebar (Desktop) - Legacy CSS method, now handled by Alpine.js but kept for fallback/structure */
.sidebar-sticky {
    position: static;
}

/* Custom Grid Layout for Car Details */
.car-details-grid {
    display: flex;
    flex-direction: column;
    gap: 1rem; /* Match bootstrap g-3 (roughly) */
}

/* Gallery Styles */
.gallery-main-img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    border-radius: 0.375rem; /* Bootstrap rounded */
    cursor: pointer;
}

.gallery-thumbs-container {
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
    padding-bottom: 0.5rem;
    cursor: grab;
    user-select: none;
    /* Hide scrollbar for cleaner look but allow scroll */
    scrollbar-width: thin;
}
.gallery-thumbs-container:active {
    cursor: grabbing;
}

.gallery-thumb {
    width: 80px;
    height: 60px;
    object-fit: cover;
    cursor: pointer;
    border: 2px solid transparent;
    border-radius: 0.25rem;
    opacity: 0.7;
    transition: opacity 0.2s, border-color 0.2s;
}

.gallery-thumb:hover, .gallery-thumb.active {
    opacity: 1;
    border-color: #dc3545;
}

.gallery-sold .gallery-main-img,
.gallery-sold .gallery-thumb {
    filter: grayscale(100%);
}

/* Sidebar Card Styles */
.price-tag {
    font-size: 1.75rem;
    font-weight: 700;
    color: #dc3545; /* Bootstrap danger color */
    line-height: 1.2;
}

.spec-item {
    display: flex;
    align-items: center;
    margin-bottom: 0.75rem;
    font-size: 0.95rem;
    gap: 0.75rem;
}

.spec-icon {
    width: 24px;
    text-align: center;
    color: #dc3545;
}

/* Mobile First: Order handled by DOM order (Gallery, Sidebar, Desc) */
.details-gallery {
    width: 100%;
}
.details-sidebar {
    width: 100%;
}
.details-desc {
    width: 100%;
}

@media (min-width: 768px) {
    .car-details-grid {
        display: grid;
        /* 2fr 1fr approximates col-8 / col-4 (66% / 33%) */
        grid-template-columns: 2fr 1fr;
        grid-template-rows: auto auto;
        grid-template-areas: 
            "gallery sidebar"
            "desc sidebar";
        gap: 1rem; /* g-3 */
        align-items: start;
    }

    .details-gallery {
        grid-area: gallery;
        min-width: 0; /* Prevent grid blowout */
    }

    .details-sidebar {
        grid-area: sidebar;
        /* Sidebar spans both rows to allow Desc to slide up under Gallery */
        grid-row: 1 / span 2; 
        min-width: 0;
    }

    .details-desc {
        grid-area: desc;
        min-width: 0;
    }
}

/* Carousel Styles for Catalog */
.carousel-nav-btn {
    width: 40px;
    height: 40px;
    z-index: 5;
}

.carousel-item-standard {
    width: 280px;
}

.no-scrollbar::-webkit-scrollbar { display: none; }
.no-scrollbar { -ms-overflow-style: none; scrollbar-width: none; }
.ms-n3 { margin-left: -1rem; }
.me-n3 { margin-right: -1rem; }
