/* Improved Search Inventory Styles */
.fancybox__container {z-index: 2000!important;}

/* Main container */
            
            /* Vehicle specs display */
            .vehicle-specs {
                display: flex;
                justify-content: space-between;
                margin-bottom: 12px;
                font-size: 14px;
                color: #666;
            }
            
            .vehicle-fuel-type, .vehicle-location {
                padding: 3px 8px;
                background-color: #f8f9fa;
                border-radius: 15px;
                border: 1px solid #dee2e6;
            }
            
            /* Vehicle card styles */
            .vehicle-card {
                border: 1px solid #e0e0e0;
                border-radius: 8px;
                overflow: hidden;
                transition: transform 0.2s, box-shadow 0.2s;
            }
            
            .vehicle-card:hover {
                transform: translateY(-5px);
                box-shadow: 0 10px 20px rgba(0,0,0,0.1);
            }
            
            .vehicle-image img {
                width: 100%;
                height: 275px;
                object-fit: cover;
                display: block;
            }
            
            .vehicle-details {
                padding: 15px;
            }
            
            .vehicle-header {
                display: flex;
                justify-content: space-between;
                margin-bottom: 0px;
            }
            
            .vehicle-year-make {
                font-weight: bold;
                font-size: 18px;
            }
            
            .vehicle-price {
                font-weight: bold; letter-spacing: -0.03em;
                color: #cd2343;
            }
            
            .vehicle-model-trim {
                font-size: 14px; color: #444;
                margin-bottom: 8px;
            }
            
            .view-details-btn {
                display: block;
                background-color: #cd2343;
                color: white;
                text-align: center;
                padding: 8px 0;
                border-radius: 4px;
                text-decoration: none;
                font-weight: bold;
                margin: 10px 0;
            }
            
            .view-details-btn:hover {
                background-color: #a81c37;
            }
            
            .dealer-info {
                font-size: 13px; color: #444;
                margin-top: 10px;
                display: flex; justify-content: space-between;
            }
            .dealer-phone {color: #cd2343;}


.inventory-search-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 8px;
    font-family: 'Roboto';
}

.search-heading {
    text-align: center;
    margin-bottom: 12px;
    color: #333;
    padding-bottom: 12px;
    border-bottom: 2px solid #eee;
}

/* Search form styling - improved */
.search-form-wrapper {
    background-color: #f8f9fa;
    border-radius: 10px;
    padding: 12px 8px;
    margin-bottom: 16px;
    box-shadow: 0 3px 15px rgba(0,0,0,0.05);
    border: 1px solid #e9ecef;
}

.search-form-header {
    text-align: center;
    margin-bottom: 25px;
}

.search-form-header h2 {
    margin: 0 0 10px 0;
    font-size: 24px;
    color: #333;
}

.search-instructions {
    color: #666;
    margin: 0;
}

/* Filter sections - improved layout */
.filter-sections {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    margin-bottom: 25px;
}

.filter-section {
    background-color: #fff;
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    border: 1px solid #f0f0f0;
}

.filter-section h3 {
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 18px;
    color: #444;
    padding-bottom: 8px;
    border-bottom: 1px solid #f0f0f0;
}

/* Filter and Sort Controls */
.inventory-controls {
    margin-bottom: 30px;
}

.filter-section, .sort-section {
    margin-bottom: 20px;
}

.filter-section h3, .sort-section h3 {
    font-size: 18px;
    margin-bottom: 10px;
    color: #333;
}

.filter-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
    justify-content: center;

}

.filter-button {
    border: 1px solid #d52343;
    border-radius: 4px;
    padding: 8px 24px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    background-color: #fefefe;
    font-family: Roboto;}

.filter-button:hover {
    background-color: #d52343;
    color: white;
}

.filter-button.active {
    background-color: #d52343;
    color: white;
    border-color: #cd2343;
}

.reset-button {
    border: none;
    border-radius: 4px;
    padding: 8px 24px;
    font-size: 16px;
    margin: auto; justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid #d52343;
    background-color: #d52343;
    color:#ffffff;
    font-family: Roboto;}

.reset-button:hover {
    background-color: #ab1530;
}

/* Active filters display */
.active-filters-container {
    display: flex;
    align-items: center;
    padding: 15px;
    background-color: #f8f9fa;
    border-radius: 8px;
    margin: 15px 0;
    border: 1px solid #dee2e6;
}

.active-filters-heading {
    font-weight: 600;
    margin-right: 10px;
    color: #444;
}

#active-filters-display {
    flex-grow: 1;
    color: #666;
}


/* Results and controls section */
.results-controls {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 15px;
    background-color: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.dynamic-title {
    margin: 0;
}

.dynamic-title h1 {
    font-size: 24px;
    margin: 0;
    color: #333;
}

/* Sorting controls - improved */
.sorting-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 12px;
}

.sort-select {
    padding: 8px 12px;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    background-color: #fff;
    font-size: 12px;
    font-family: 'Montserrat';
}

/* Vehicle specs display */
.vehicle-specs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
    font-size: 14px;
    color: #666;
}

.vehicle-fuel-type, .vehicle-location {
    padding: 3px 8px;
    background-color: #f8f9fa;
    border-radius: 15px;
    border: 1px solid #dee2e6;
    font-size: 14px;
    color: #666;
}

/* Pagination - improved */
.pagination-container {
    margin: 8px 0;
}

.pagination {
    padding: 15px;
    background-color: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
    display: flex;
    justify-content: space-between
}

.pagination-link {
    background-color: #fff;
    border: 1px solid #ced4da;
    color: #444;
    padding: 8px 15px;
    border-radius: 20px;
    text-decoration: none;
    transition: all 0.2s ease;
}

.pagination-link:hover:not(.disabled) {
    background-color: #cd2343;
    color: white;
    border-color: #cd2343;
}

/* Filter pill tags for active filters */
.filter-pill {
    display: inline-block;
    background-color: #e9ecef;
    border-radius: 12px;
    padding: 4px 12px;
    margin: 0 5px 5px 0;
    font-size: 14px;
    color: #444;
    border: 1px solid #dee2e6;
}

.filter-pill .remove-filter {
    margin-left: 5px;
    cursor: pointer;
    font-weight: bold;
    color: #666;
}

.filter-pill .remove-filter:hover {
    color: #cd2343;
}

/* Search section improvements */
.search-section {
    background-color: #f8f9fa;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 12px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    border: 1px solid #dee2e6;
}

.search-section h2 {
    margin-top: 0;
    text-align: center;
    margin-bottom: 15px;
    font-size: 24px;
    color: #333;
}
/* Fix for vehicle grid layout */
.vehicle-list {display:inline}
.vehicle-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)) !important;
    gap: 20px !important;
    margin: 20px 0;
}

/* Ensure cards take appropriate space */
.vehicle-card {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
}

/* Search bar styling */
.search-bar-container {
    width: 100%;
    flex: 1;
}

.search-input-wrapper {
    position: relative;
    width: 100%;
}

.vehicle-search-input {
    width: 96%;
    padding: 12px 40px 12px 15px;
    font-size: 18px;
    border: 2px solid #dee2e6;
    border-radius: 30px;
    background-color: #fff;
    transition: all 0.3s ease;
    color: #333;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.vehicle-search-input:focus {
    outline: none;
    border-color: #cd2343;
    box-shadow: 0 0 0 3px rgba(205, 35, 67, 0.2);
}

.vehicle-search-input::placeholder {
    color: #adb5bd;
}

.clear-search-btn {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: #6c757d;
    padding: 0;
    display: none;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.clear-search-btn:hover {
    color: #cd2343;
    background-color: #f8f9fa;
}

/* Update the results header layout */
.results-header,
.results-controls {
    display: flex;
    flex-direction: row;
    gap: 15px;
    padding: 18px;
}


/* Add these styles to your search-inventory.css file */

/* Collapsible filter section styles */
.search-section {
    background-color: #f8f9fa;
    border-radius: 10px;
    padding: 0; /* Remove padding - will be added to inner elements */
    margin-bottom: 20px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    border: 1px solid #dee2e6;
    transition: all 0.3s ease;
}

.filters-header {
    width: 100%;
}

.filters-title-bar {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    cursor: pointer;
    margin: auto; justify-content: center;
}

.filters-title-bar h2 {
    margin: 0 auto;
    font-size: 22px;
    color: #333;
    font-weight: 600;
}

.filters-toggle-btn {
    background: none;
    border: none;
    width: 28px;
    height: 12px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #d52343;
    font-size: 18px;
    font-weight: bold;
    transition: all 0.2s ease;
    min-width: 200px;
}
.filters-toggle-btn:after {content: " Filter Your Search"}

.filters-toggle-btn:hover {
    color: #495057;
}

.toggle-icon {
    line-height: 1;
    display: block;
    margin-right:8px;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

.filter-content {
    padding: 0 20px 20px 20px;
    max-height: 1000px; /* Arbitrary large value */
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease, opacity 0.3s ease;
    opacity: 1;
}

.filter-content.collapsed {
    max-height: 0;
    padding-top: 0;
    padding-bottom: 0;
    opacity: 0;
}

/* Ensure the filter sections don't have top margin when collapsed */
.filter-content.collapsed .filter-sections {
    margin-top: 0;
}
div.action-buttons {text-align: center;}

/* Responsive adjustments */
@media (max-width: 768px) {
    .filter-sections { grid-template-columns: 1fr; }
    .results-controls { flex-direction: column; align-items: flex-start; }
    .results-header {flex-direction:column}
    .dynamic-title { margin-bottom: 15px; }

    .sorting-wrapper {
        width: 100%;
    }

    .active-filters-container {
        flex-direction: column;
        align-items: flex-start;
    }

    .active-filters-heading {
        margin-bottom: 10px;
    }

    #active-filters-display {
        margin-bottom: 10px;
    }
    
    .results-controls {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }
    
    .search-bar-container {
        flex: 1;
        margin-bottom: 0;
        margin-right: 15px;
    }
    
    .sorting-wrapper {
        flex-shrink: 0;
    }
    #sorting-controls {margin: auto;}
}

/* Add animation for search results */
.vehicle-card {
    animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    } 
}
