/* listings.css - Listings Page Styles */

/* ===== LISTINGS HEADER ===== */
.listings-header {
    background: linear-gradient(135deg, #000000 0%, #3e48dd 100%);
    color: white;
    padding: 40px 0;
    margin-bottom: 30px;
}

/* Add Fabriga font-face at the top of the file */
@font-face {
    font-family: 'Fabriga';
    src: url('/fonts/Fabriga.woff2') format('woff2'),
         url('/fonts/Fabriga.woff') format('woff'),
         url('/fonts/Fabriga.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

/* Rest of the listings-4.css file remains the same... */

.listings-header .breadcrumb {
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
    margin-bottom: 15px;
}

.listings-header .breadcrumb a {
    color: white;
    text-decoration: none;
}

.listings-header .breadcrumb span {
    color: #FFD700;
    font-weight: 600;
}

.listings-header h1 {
    font-size: 36px;
    margin-bottom: 10px;
    color: white;
}

.listings-count {
    font-size: 16px;
    opacity: 0.9;
    margin-bottom: 25px;
}

.quick-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.stat {
    background: rgba(255, 255, 255, 0.1);
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: transform 0.3s ease;
}

.stat:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.15);
}

.stat i {
    font-size: 24px;
    color: #FFD700;
    margin-bottom: 10px;
}

.stat .number {
    display: block;
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 5px;
}

.stat .label {
    font-size: 14px;
    opacity: 0.9;
}

/* ===== LISTINGS LAYOUT ===== */
.listings-wrapper {
    display: flex;
    gap: 30px;
    position: relative;
}

.listings-sidebar {
    width: 320px;
    flex-shrink: 0;
    background: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid #eaeaea;
    max-height: calc(100vh - 200px);
    overflow-y: auto;
    position: sticky;
    top: 100px;
}

.listings-main {
    flex: 1;
    min-width: 0; /* Prevent overflow */
}

/* ===== MOBILE FILTER TOGGLE ===== */
.mobile-filter-toggle {
    display: none;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 15px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.btn-filter {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #3e48dd;
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
}

.filter-count {
    background: #FFD700;
    color: #000000;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
}

.sort-dropdown select {
    padding: 10px 15px;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    background: white;
    font-size: 14px;
    font-weight: 500;
    color: #495057;
    cursor: pointer;
    min-width: 180px;
}

/* ===== SIDEBAR FILTERS ===== */
.sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f4f8;
}

.sidebar-header h3 {
    color: #000000;
    font-size: 20px;
    margin: 0;
}

.sidebar-header h3 i {
    margin-right: 10px;
    color: #3e48dd;
}

.btn-clear {
    background: none;
    border: none;
    color: #6c757d;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
}

.btn-clear:hover {
    color: #dc3545;
}

.filter-section {
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid #f0f4f8;
}

.filter-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.filter-section h4 {
    color: #000000;
    font-size: 16px;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.filter-section h4 i {
    color: #3e48dd;
    font-size: 14px;
}

/* Keyword Search */
.filter-group {
    display: flex;
    gap: 5px;
}

.filter-input {
    flex: 1;
    padding: 12px 15px;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    font-size: 14px;
}

.btn-search {
    background: #3e48dd;
    color: white;
    border: none;
    padding: 0 20px;
    border-radius: 6px;
    cursor: pointer;
}

/* Price Range */
.price-slider {
    padding: 10px 0;
}

.price-inputs {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}

.price-inputs input {
    flex: 1;
    padding: 10px 12px;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    font-size: 14px;
    text-align: center;
}

.price-inputs span {
    color: #6c757d;
    font-weight: 500;
}

.slider-container {
    position: relative;
    height: 20px;
    margin: 20px 0;
}

.slider-container input[type="range"] {
    position: absolute;
    width: 100%;
    height: 4px;
    background: none;
    pointer-events: none;
    -webkit-appearance: none;
}

.slider-container input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    height: 20px;
    width: 20px;
    background: #3e48dd;
    border-radius: 50%;
    border: 3px solid white;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
    pointer-events: auto;
    cursor: pointer;
}

.slider-track {
    position: absolute;
    width: 100%;
    height: 4px;
    background: #e9ecef;
    border-radius: 2px;
    top: 50%;
    transform: translateY(-50%);
}

.slider-track::before {
    content: '';
    position: absolute;
    left: 25%;
    right: 25%;
    height: 100%;
    background: #3e48dd;
    border-radius: 2px;
}

.price-display {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    color: #6c757d;
    margin-top: 5px;
}

/* Brand Grid */
.brand-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.brand-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 15px 10px;
    background: #f8f9fa;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    text-align: center;
}

.brand-item:hover {
    background: #e9ecef;
    transform: translateY(-2px);
}

.brand-item.active {
    background: #3e48dd;
    color: white;
    border-color: #3e48dd;
}

.brand-item i {
    font-size: 20px;
    margin-bottom: 8px;
    color: #3e48dd;
}

.brand-item.active i {
    color: white;
}

.brand-name {
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 5px;
}

.brand-count {
    font-size: 11px;
    background: rgba(0,0,0,0.1);
    padding: 2px 8px;
    border-radius: 10px;
}

.brand-item.active .brand-count {
    background: rgba(255,255,255,0.3);
}

/* Year Range */
.year-range .year-inputs {
    display: flex;
    gap: 10px;
}

.year-range select {
    flex: 1;
    padding: 10px 12px;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    font-size: 14px;
    background: white;
    cursor: pointer;
}

/* Checkbox Group */
.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    position: relative;
    padding-left: 30px;
    font-size: 14px;
}

.checkbox-label input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.checkmark {
    position: absolute;
    left: 0;
    height: 20px;
    width: 20px;
    background-color: #f8f9fa;
    border: 2px solid #dee2e6;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.checkbox-label:hover input ~ .checkmark {
    border-color: #3e48dd;
}

.checkbox-label input:checked ~ .checkmark {
    background-color: #3e48dd;
    border-color: #3e48dd;
}

.checkmark:after {
    content: "";
    position: absolute;
    display: none;
    left: 6px;
    top: 2px;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.checkbox-label input:checked ~ .checkmark:after {
    display: block;
}

.checkbox-label .label-text {
    flex: 1;
}

.checkbox-label .count {
    color: #6c757d;
    font-size: 12px;
}

/* Location Select */
.location-select {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    font-size: 14px;
    background: white;
    cursor: pointer;
}

/* Apply Filters Button */
.btn-apply-filters {
    width: 100%;
    background: linear-gradient(135deg, #3e48dd 0%, #000000 100%);
    color: white;
    border: none;
    padding: 15px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
    transition: transform 0.3s ease;
}

.btn-apply-filters:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(62, 72, 221, 0.3);
}

.btn-apply-filters .result-count {
    font-size: 14px;
    opacity: 0.9;
    font-weight: 500;
}

/* ===== ACTIVE FILTERS BAR ===== */
.active-filters-bar {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 15px 20px;
    margin-bottom: 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1px solid #eaeaea;
}

.filters-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.filter-tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: white;
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 14px;
    border: 1px solid #dee2e6;
    color: #495057;
}

.filter-tag i {
    cursor: pointer;
    color: #6c757d;
    font-size: 12px;
}

.filter-tag i:hover {
    color: #dc3545;
}

.btn-clear-all {
    background: none;
    border: none;
    color: #3e48dd;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
}

.btn-clear-all:hover {
    text-decoration: underline;
}

/* ===== LISTINGS GRID ===== */
.listings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

.listing-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    border: 1px solid #eaeaea;
    position: relative;
}

.listing-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.listing-card.featured {
    border: 2px solid #FFD700;
}

.listing-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    background: #FFD700;
    color: #000000;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 5px;
}

.listing-image {
    position: relative;
    height: 220px;
    overflow: hidden;
}

.listing-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.listing-card:hover .listing-image img {
    transform: scale(1.05);
}

.image-count {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 12px;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 5px;
}

.btn-save {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 2;
    color: #6c757d;
    font-size: 18px;
    transition: all 0.3s ease;
}

.btn-save:hover {
    background: white;
    color: #dc3545;
    transform: scale(1.1);
}

.listing-content {
    padding: 20px;
}

.listing-price {
    color: #000000;
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 10px;
}

.listing-title {
    font-size: 18px;
    margin-bottom: 15px;
    line-height: 1.4;
}

.listing-title a {
    color: #000000;
    text-decoration: none;
    transition: color 0.3s ease;
}

.listing-title a:hover {
    color: #3e48dd;
}

.listing-details {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #f0f4f8;
}

.detail {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #6c757d;
}

.detail i {
    color: #3e48dd;
    width: 16px;
    text-align: center;
}

.listing-location,
.listing-dealer {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #6c757d;
    margin-bottom: 8px;
}

.listing-location i,
.listing-dealer i {
    color: #3e48dd;
    width: 16px;
    text-align: center;
}

.listing-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.btn-compare,
.btn-view,
.btn-inquire {
    flex: 1;
    padding: 10px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    transition: all 0.3s ease;
}

.btn-compare {
    background: #f8f9fa;
    color: #495057;
    border: 1px solid #dee2e6;
}

.btn-compare:hover {
    background: #e9ecef;
    color: #3e48dd;
}

.btn-view {
    background: #3e48dd;
    color: white;
    text-decoration: none;
    border: none;
}

.btn-view:hover {
    background: #2a32b8;
    transform: translateY(-2px);
}

.btn-inquire {
    background: #198754;
    color: white;
    border: none;
}

.btn-inquire:hover {
    background: #157347;
    transform: translateY(-2px);
}

/* ===== PAGINATION ===== */
.pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    border-top: 1px solid #eaeaea;
    margin-top: 30px;
}

.page-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: #f8f9fa;
    color: #495057;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 500;
    transition: all 0.3s ease;
    border: 1px solid #dee2e6;
}

.page-link:hover:not(.disabled) {
    background: #3e48dd;
    color: white;
    border-color: #3e48dd;
}

.page-link.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.page-numbers {
    display: flex;
    gap: 8px;
    align-items: center;
}

.page-link.active {
    background: #3e48dd;
    color: white;
    border-color: #3e48dd;
}

.page-dots {
    color: #6c757d;
    padding: 0 5px;
}

/* ===== NO RESULTS ===== */
.no-results {
    text-align: center;
    padding: 60px 20px;
    background: #f8f9fa;
    border-radius: 12px;
    border: 2px dashed #dee2e6;
}

.no-results i {
    color: #3e48dd;
    margin-bottom: 20px;
}

.no-results h3 {
    color: #000000;
    margin-bottom: 10px;
}

.no-results p {
    color: #6c757d;
    margin-bottom: 20px;
}

.btn-clear-filters {
    background: #3e48dd;
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

/* ===== FEATURED DEALERS ===== */
.featured-dealers {
    background: #f8fafc;
    padding: 50px 0;
    margin-top: 50px;
    border-top: 1px solid #eaeaea;
}

.featured-dealers h2 {
    text-align: center;
    color: #000000;
    margin-bottom: 30px;
    font-size: 28px;
}

.featured-dealers h2 i {
    color: #3e48dd;
    margin-right: 10px;
}

.dealers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
}

.dealer-card {
    background: white;
    border-radius: 12px;
    padding: 25px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease;
    border: 1px solid #eaeaea;
}

.dealer-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.dealer-logo {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #3e48dd 0%, #000000 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    color: white;
    font-size: 24px;
}

.dealer-info h4 {
    color: #000000;
    margin-bottom: 10px;
}

.dealer-location,
.dealer-cars {
    color: #6c757d;
    font-size: 14px;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.btn-view-dealer {
    display: inline-block;
    color: #3e48dd;
    text-decoration: none;
    font-weight: 600;
    margin-top: 15px;
    transition: color 0.3s ease;
}

.btn-view-dealer:hover {
    color: #000000;
    text-decoration: underline;
}

/* ===== NOTIFICATIONS ===== */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: white;
    padding: 15px 20px;
    border-radius: 8px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 10000;
    animation: slideIn 0.3s ease;
    border-left: 4px solid #198754;
}

.notification.success {
    border-left-color: #198754;
}

.notification.success i {
    color: #198754;
}

.notification.info {
    border-left-color: #3e48dd;
}

.notification.info i {
    color: #3e48dd;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.notification.fade-out {
    animation: fadeOut 0.3s ease forwards;
}

@keyframes fadeOut {
    to {
        opacity: 0;
        transform: translateX(100%);
    }
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 1200px) {
    .listings-grid {
        grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    }
}

@media (max-width: 992px) {
    .listings-wrapper {
        flex-direction: column;
    }
    
    .listings-sidebar {
        width: 100%;
        position: static;
        max-height: none;
        display: none;
    }
    
    .listings-sidebar.mobile-show {
        display: block;
    }
    
    .mobile-filter-toggle {
        display: flex;
    }
    
    .quick-stats {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .listings-grid {
        grid-template-columns: 1fr;
    }
    
    .listings-header h1 {
        font-size: 28px;
    }
    
    .quick-stats {
        grid-template-columns: 1fr;
    }
    
    .brand-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .listing-details {
        grid-template-columns: 1fr;
    }
    
    .listing-actions {
        flex-direction: column;
    }
    
    .pagination {
        flex-direction: column;
        gap: 15px;
    }
    
    .page-numbers {
        flex-wrap: wrap;
        justify-content: center;
    }
}

@media (max-width: 576px) {
    .brand-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .filter-group {
        flex-direction: column;
    }
    
    .price-inputs {
        flex-direction: column;
    }
    
    .year-range .year-inputs {
        flex-direction: column;
    }
}