/* Clean Loading State */
#vehicle-results.loading {
    opacity: 0.5;
    pointer-events: none;
}

/* Mobile Results Header */
.results-header .bg-light {
    margin: 0 -15px;
    padding-left: 15px !important;
    padding-right: 15px !important;
    position: relative;
    z-index: 10;
}

/* Ensure mobile filter button is clickable */
#mobileFilterBtn {
    position: relative !important;
    z-index: 100 !important;
    pointer-events: auto !important;
}

/* Mobile Filter Modal */
.mobile-filter-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
    display: none;
}

.mobile-filter-modal.active {
    display: block;
}

.mobile-filter-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.6);
    z-index: 1040;
}

.mobile-filter-content {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: white;
    z-index: 10001;
    display: flex;
    flex-direction: column;
    transform: translateY(100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-filter-modal.active .mobile-filter-content {
    transform: translateY(0);
}

/* Pull Handle */
.mobile-filter-handle {
    display: flex;
    justify-content: center;
    padding: 12px 0 8px 0;
    background: white;
}

.handle-bar {
    width: 40px;
    height: 4px;
    background: #d1d5db;
    border-radius: 2px;
}

/* Header */
.mobile-filter-header {
    padding: 16px 20px;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: white;
}

.mobile-filter-header h5 {
    font-size: 18px;
    font-weight: 600;
    color: #111827;
}

.mobile-close-btn {
    background: none;
    border: none;
    color: #6b7280;
    padding: 4px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mobile-close-btn:hover {
    background: #f3f4f6;
    color: #374151;
}

/* Body */
.mobile-filter-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    background: #f9fafb;
}

/* Footer */
.mobile-filter-footer {
    padding: 16px 20px 20px;
    background: white;
    border-top: 1px solid #e5e7eb;
    display: flex;
    gap: 12px;
    box-shadow: 0 -2px 8px rgba(0,0,0,0.1);
}

.mobile-filter-footer button {
    flex: 1;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 500;
    border: 1px solid;
}

.mobile-filter-footer .btn-outline-dark {
    background: white;
    border-color: #d1d5db;
    color: #374151;
}

.mobile-filter-footer .btn-outline-dark:hover {
    background: #f9fafb;
    border-color: #9ca3af;
}

.mobile-filter-footer .btn-dark {
    background: #111827;
    border-color: #111827;
    color: white;
}

.mobile-filter-footer .btn-dark:hover {
    background: #1f2937;
    border-color: #1f2937;
}

/* Pull Handle */
.mobile-filter-handle {
    display: flex;
    justify-content: center;
    padding: 12px 0 8px 0;
    background: white;
}

.handle-bar {
    width: 40px;
    height: 4px;
    background: #d1d5db;
    border-radius: 2px;
}

/* Header */
.mobile-filter-header {
    padding: 16px 20px;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: white;
}

.mobile-filter-header h5 {
    font-size: 18px;
    font-weight: 600;
    color: #111827;
}

.mobile-close-btn {
    background: none;
    border: none;
    color: #6b7280;
    padding: 4px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mobile-close-btn:hover {
    background: #f3f4f6;
    color: #374151;
}

/* Body */
.mobile-filter-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    background: #f9fafb;
}

/* Footer */
.mobile-filter-footer {
    padding: 16px 20px 20px;
    background: white;
    border-top: 1px solid #e5e7eb;
    display: flex;
    gap: 12px;
    box-shadow: 0 -2px 8px rgba(0,0,0,0.1);
}

.mobile-filter-footer button {
    flex: 1;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 500;
    border: 1px solid;
}

.mobile-filter-footer .btn-outline-dark {
    background: white;
    border-color: #d1d5db;
    color: #374151;
}

.mobile-filter-footer .btn-outline-dark:hover {
    background: #f9fafb;
    border-color: #9ca3af;
}

.mobile-filter-footer .btn-dark {
    background: #111827;
    border-color: #111827;
    color: white;
}

.mobile-filter-footer .btn-dark:hover {
    background: #1f2937;
    border-color: #1f2937;
}
/* Vehicle Card Consistent Heights */
.vehicle-card {
    display: flex;
    flex-direction: column;
}

.vehicle-card .card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* Ensure title takes consistent space - 2 lines max */
.vehicle-card .vehicle-title {
    min-height: 3rem;
    max-height: 3rem;
    line-height: 1.5rem;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

/* Ensure specs section has consistent height */
.vehicle-card .vehicle-specs {
    min-height: 1.5rem;
    max-height: 3rem;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

/* Push location to bottom */
.vehicle-card .vehicle-location {
    margin-top: auto !important;
}

/* Ensure thumbnail gallery or placeholder has consistent height */
.thumbnail-gallery,
.thumbnail-gallery-placeholder {
    min-height: 72px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.vehicle-card .card-footer {
    margin-top: auto;
}

/* Responsive thumbnail sizes */
@media (max-width: 767px) {
    .thumbnail-image img {
        width: 50px !important;
        height: 50px !important;
    }
    
    .thumbnail-gallery,
    .thumbnail-gallery-placeholder {
        min-height: 62px; /* Smaller height for mobile */
    }
}

/* Ensure thumbnails don't overflow on medium screens */
@media (min-width: 768px) and (max-width: 991px) {
    .thumbnail-image img {
        width: 45px !important;
        height: 45px !important;
    }
    
    .thumbnail-gallery,
    .thumbnail-gallery-placeholder {
        min-height: 57px;
    }
}

/* Container and Layout */
.vehicles-container {
    background-color: #f8f9fa;
}

/* Mobile Filter Button */
#mobileFilterBtn {
    border-radius: 4px;
    padding: 4px 10px;
}

/* Active Filter Indicator */
.filter-indicator {
    width: 8px;
    height: 8px;
}

/* Hidden Update URL Element */
#update-url {
    display: none;
}

/* Badge Styles */
.badge-accent {
    background-color: var(--accent-color);
}

/* Placeholder Gallery Height */
.thumbnail-gallery-placeholder {
    height: 72px;
}

/* Price Icon and Text */
.price-icon {
    color: var(--accent-color);
}

.price-text {
    color: var(--accent-color);
}

/* No Results Icon */
.no-results-icon {
    width: 100px;
    height: 100px;
}
