/* ============================================
   Tesslim360 - Vehicles & Brands Super Enhanced CSS
   ============================================ */

/* ============================================
   VEHICLES HERO SEARCH
   ============================================ */
.vehicles-hero-search {
    margin-top: -20px;
    padding: 0 0 30px;
    position: relative;
    z-index: 10;
}

.vehicles-search-box {
    background: var(--white);
    border-radius: var(--radius-xl);
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.1);
    padding: 32px 36px;
    border: 1px solid var(--gray-200);
    position: relative;
    overflow: hidden;
}

.vehicles-search-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--primary-gradient);
}

.vehicles-search-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
}

.vehicles-search-icon {
    width: 52px;
    height: 52px;
    background: var(--primary-bg);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    color: var(--primary);
    flex-shrink: 0;
}

.vehicles-search-text h2 {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--secondary);
    margin-bottom: 2px;
}

.vehicles-search-text h2::after {
    display: none;
}

.vehicles-search-text p {
    color: var(--gray-600);
    font-size: 0.88rem;
    margin: 0;
}

.vehicles-search-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.vehicles-search-input-group {
    display: flex;
    gap: 12px;
    align-items: stretch;
}

.vehicles-search-input-wrapper {
    flex: 1;
    position: relative;
    display: flex;
    align-items: center;
}

.vehicles-search-input-wrapper i {
    position: absolute;
    left: 18px;
    color: var(--gray-400);
    font-size: 1rem;
    z-index: 2;
    pointer-events: none;
}

.vehicles-search-input-wrapper input {
    width: 100%;
    padding: 14px 50px 14px 48px;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius);
    font-size: 1rem;
    transition: var(--transition);
    background: var(--gray-50);
    color: var(--dark);
}

.vehicles-search-input-wrapper input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(227, 30, 36, 0.08);
    background: var(--white);
}

.vehicles-search-input-wrapper input::placeholder {
    color: var(--gray-400);
}

.vehicles-search-clear {
    position: absolute;
    right: 14px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--gray-200);
    color: var(--gray-600);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    cursor: pointer;
    transition: var(--transition);
    z-index: 2;
}

.vehicles-search-clear:hover {
    background: var(--primary);
    color: var(--white);
}

.vehicles-search-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 14px 32px;
    background: var(--primary);
    color: var(--white);
    border: none;
    border-radius: var(--radius);
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
}

.vehicles-search-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: var(--shadow-primary);
}

.vehicles-search-tags {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.vehicles-search-tags-label {
    font-size: 0.8rem;
    color: var(--gray-500);
    font-weight: 600;
    white-space: nowrap;
}

.vehicles-search-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 5px 14px;
    background: var(--gray-100);
    color: var(--gray-700);
    border-radius: var(--radius-xl);
    font-size: 0.78rem;
    font-weight: 600;
    border: 1px solid var(--gray-200);
    transition: var(--transition);
}

.vehicles-search-tag:hover {
    background: var(--primary-bg);
    color: var(--primary);
    border-color: var(--primary);
}

.vehicles-search-tag.is-active {
    background: var(--primary);
    color: var(--white);
    border-color: var(--primary);
}

.vehicles-search-tag--electric {
    background: #f0fdf4;
    color: #16a34a;
    border-color: #bbf7d0;
}

.vehicles-search-tag--electric:hover {
    background: #16a34a;
    color: var(--white);
    border-color: #16a34a;
}

.vehicles-search-tag--electric.is-active {
    background: #16a34a;
    color: var(--white);
    border-color: #16a34a;
}

/* ============================================
   ACTIVE FILTERS BAR
   ============================================ */
.vehicles-active-filters-section {
    padding: 0 0 20px;
}

.vehicles-active-filters {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    background: var(--white);
    border-radius: var(--radius);
    border: 1px solid var(--gray-200);
    box-shadow: var(--shadow-xs);
    flex-wrap: wrap;
}

.vehicles-active-filters-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--gray-700);
    white-space: nowrap;
}

.vehicles-active-filters-label i {
    color: var(--primary);
}

.vehicles-active-filters-chips {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    flex: 1;
}

.vehicles-filter-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    background: var(--primary-bg);
    color: var(--primary);
    border-radius: var(--radius-xl);
    font-size: 0.78rem;
    font-weight: 600;
    transition: var(--transition);
    border: 1px solid rgba(227, 30, 36, 0.15);
}

.vehicles-filter-chip:hover {
    background: var(--primary);
    color: var(--white);
}

.vehicles-filter-chip .fa-times {
    font-size: 0.65rem;
    opacity: 0.7;
}

.vehicles-clear-all-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 14px;
    background: var(--gray-100);
    color: var(--gray-600);
    border-radius: var(--radius-xl);
    font-size: 0.78rem;
    font-weight: 600;
    transition: var(--transition);
    white-space: nowrap;
}

.vehicles-clear-all-btn:hover {
    background: var(--danger);
    color: var(--white);
}

/* ============================================
   VEHICLE CARD CATEGORY TAG
   ============================================ */
.vehicle-card-category-tag {
    position: absolute;
    bottom: 12px;
    right: 12px;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    color: var(--white);
    padding: 3px 10px;
    border-radius: var(--radius-xl);
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.3px;
}

/* ============================================
   LISTING TOOLBAR ENHANCEMENTS
   ============================================ */
.listing-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}

.listing-count {
    display: flex;
    align-items: center;
    gap: 12px;
}

.listing-count-number strong {
    color: var(--primary);
    font-size: 1.1rem;
}

.listing-page-info {
    font-size: 0.8rem;
    color: var(--gray-500);
    padding: 3px 10px;
    background: var(--gray-100);
    border-radius: var(--radius-xl);
}

.listing-toolbar-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.listing-view-toggle {
    display: flex;
    gap: 4px;
    padding: 4px;
    background: var(--gray-100);
    border-radius: var(--radius-sm);
}

.view-toggle-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    border-radius: var(--radius-xs);
    color: var(--gray-500);
    cursor: pointer;
    transition: var(--transition);
    font-size: 0.9rem;
}

.view-toggle-btn.active {
    background: var(--white);
    color: var(--primary);
    box-shadow: var(--shadow-xs);
}

.view-toggle-btn:hover:not(.active) {
    color: var(--gray-700);
}

/* ============================================
   VEHICLE GRID LIST VIEW
   ============================================ */
.vehicles-grid--list {
    grid-template-columns: 1fr !important;
}

.vehicles-grid--list .vehicle-card--premium {
    display: grid;
    grid-template-columns: 280px 1fr;
}

.vehicles-grid--list .vehicle-card-img {
    height: 100%;
    min-height: 200px;
}

.vehicles-grid--list .vehicle-card-body {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.vehicles-grid--list .vehicle-card-specs {
    grid-template-columns: repeat(3, auto);
    justify-content: flex-start;
    gap: 16px;
}

.vehicles-grid--list .vehicle-card-footer {
    justify-content: flex-start;
}

.vehicles-grid--list .vehicle-card-footer .btn-get-info {
    width: auto;
}

/* ============================================
   FILTER SIDEBAR ENHANCEMENTS
   ============================================ */
.filter-group--search {
    margin-bottom: 8px;
}

.filter-search-mini {
    position: relative;
    display: flex;
    align-items: center;
}

.filter-search-mini i {
    position: absolute;
    left: 12px;
    color: var(--gray-400);
    font-size: 0.82rem;
    pointer-events: none;
}

.filter-search-mini input {
    width: 100%;
    padding: 10px 14px 10px 36px;
    border: 1.5px solid var(--gray-200);
    border-radius: var(--radius-sm);
    font-size: 0.82rem;
    background: var(--gray-50);
    transition: var(--transition);
}

.filter-search-mini input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(227, 30, 36, 0.06);
    background: var(--white);
}

/* ============================================
   VEHICLE CARD ANIMATION
   ============================================ */
@keyframes vehicleCardFadeIn {
    from {
        opacity: 0;
        transform: translateY(16px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.vehicles-grid--premium .vehicle-card--premium {
    animation: vehicleCardFadeIn 0.4s ease forwards;
    opacity: 0;
}

/* ============================================
   NO RESULTS ENHANCED
   ============================================ */
.no-results-icon {
    width: 80px;
    height: 80px;
    background: var(--gray-100);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}

.no-results-icon i {
    font-size: 2rem;
    color: var(--gray-400);
    margin-bottom: 0;
}

.no-results h3 {
    font-size: 1.2rem;
    color: var(--secondary);
    margin-bottom: 8px;
}

/* ============================================
   BRANDS HERO SECTION
   ============================================ */
.brands-hero-section {
    padding: 30px 0 0;
    background: var(--white);
    border-bottom: 1px solid var(--gray-200);
}

.brands-hero-content {
    text-align: center;
    margin-bottom: 28px;
}

.brands-hero-stats {
    display: inline-flex;
    align-items: center;
    gap: 28px;
    background: var(--gray-50);
    padding: 16px 36px;
    border-radius: var(--radius-xl);
    border: 1px solid var(--gray-200);
}

.brands-hero-stat {
    text-align: center;
}

.brands-hero-stat-number {
    display: block;
    font-size: 2rem;
    font-weight: 900;
    color: var(--primary);
    line-height: 1.1;
    font-family: var(--font-heading);
}

.brands-hero-stat-label {
    display: block;
    font-size: 0.78rem;
    color: var(--gray-600);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 4px;
}

.brands-hero-stat-divider {
    width: 1px;
    height: 36px;
    background: var(--gray-300);
}

/* ============================================
   BRANDS SEARCH (Enhanced)
   ============================================ */
.brands-search-wrapper {
    max-width: 600px;
    margin: 0 auto 24px;
}

.brands-search-box {
    position: relative;
    display: flex;
    align-items: center;
}

.brands-search-icon {
    position: absolute;
    left: 18px;
    color: var(--gray-400);
    font-size: 1rem;
    z-index: 2;
    pointer-events: none;
}

.brands-search-box input {
    width: 100%;
    padding: 14px 180px 14px 48px;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-xl);
    font-size: 0.95rem;
    transition: var(--transition);
    background: var(--white);
    color: var(--dark);
}

.brands-search-box input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(227, 30, 36, 0.08);
}

.brands-search-box input::placeholder {
    color: var(--gray-400);
}

.brands-search-clear {
    position: absolute;
    right: 160px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--gray-200);
    border: none;
    color: var(--gray-600);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.72rem;
    cursor: pointer;
    transition: var(--transition);
    z-index: 2;
}

.brands-search-clear:hover {
    background: var(--primary);
    color: var(--white);
}

.brands-search-count {
    position: absolute;
    right: 18px;
    font-size: 0.78rem;
    color: var(--gray-500);
    font-weight: 600;
    white-space: nowrap;
}

/* ============================================
   ALPHABET NAVIGATION
   ============================================ */
.brands-alphabet-nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 4px;
    padding: 16px 0 20px;
}

.alphabet-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 1.5px solid var(--gray-200);
    border-radius: var(--radius-sm);
    color: var(--gray-600);
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
}

.alphabet-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: var(--primary-bg);
}

.alphabet-btn.active {
    background: var(--primary);
    color: var(--white);
    border-color: var(--primary);
    box-shadow: var(--shadow-primary);
}

/* ============================================
   BRANDS LISTING SECTION
   ============================================ */
.brands-listing-section {
    padding: 40px 0 80px;
    background: var(--gray-50);
}

.brands-letter-group {
    margin-bottom: 32px;
}

.brands-letter-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
}

.brands-letter-badge {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary);
    color: var(--white);
    border-radius: var(--radius-sm);
    font-size: 1.1rem;
    font-weight: 900;
    font-family: var(--font-heading);
    flex-shrink: 0;
}

.brands-letter-line {
    flex: 1;
    height: 2px;
    background: var(--gray-200);
    border-radius: 1px;
}

.brands-letter-count {
    font-size: 0.78rem;
    color: var(--gray-500);
    font-weight: 600;
    white-space: nowrap;
}

.brands-letter-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

/* ============================================
   BRAND SUPER CARD
   ============================================ */
.brand-super-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 18px;
    background: var(--white);
    border-radius: var(--radius);
    border: 1.5px solid var(--gray-200);
    transition: var(--transition);
    text-decoration: none;
    color: inherit;
}

.brand-super-card:hover {
    border-color: var(--primary);
    box-shadow: 0 6px 24px rgba(227, 30, 36, 0.1);
    transform: translateY(-3px);
    color: inherit;
}

.brand-super-card-logo {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: var(--gray-50);
    border-radius: var(--radius-sm);
    padding: 6px;
    overflow: hidden;
}

.brand-super-card-logo img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transition: var(--transition);
}

.brand-super-card:hover .brand-super-card-logo img {
    transform: scale(1.1);
}

.brand-super-card-fallback {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-bg);
    color: var(--primary);
    font-size: 0.82rem;
    font-weight: 800;
    border-radius: var(--radius-xs);
}

.brand-super-card-info {
    flex: 1;
    min-width: 0;
}

.brand-super-card-name {
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--secondary);
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.brand-super-card-count {
    font-size: 0.75rem;
    color: var(--gray-500);
    display: flex;
    align-items: center;
    gap: 4px;
}

.brand-super-card-count i {
    color: var(--primary);
    font-size: 0.7rem;
}

.brand-super-card-arrow {
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gray-100);
    border-radius: 50%;
    color: var(--gray-400);
    font-size: 0.72rem;
    transition: var(--transition);
    flex-shrink: 0;
}

.brand-super-card:hover .brand-super-card-arrow {
    background: var(--primary);
    color: var(--white);
    transform: translateX(3px);
}

/* ============================================
   BRANDS NO RESULTS
   ============================================ */
.brands-no-results .no-results {
    text-align: center;
    padding: 60px 20px;
    background: var(--white);
    border-radius: var(--radius-lg);
    border: 2px dashed var(--gray-300);
}

/* ============================================
   RESPONSIVE - VEHICLES
   ============================================ */
@media (max-width: 1200px) {
    .brands-letter-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 992px) {
    .vehicles-search-box {
        padding: 24px;
    }

    .vehicles-search-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .vehicles-search-input-group {
        flex-direction: column;
    }

    .vehicles-search-btn {
        width: 100%;
        justify-content: center;
    }

    .brands-letter-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .vehicles-grid--list .vehicle-card--premium {
        grid-template-columns: 200px 1fr;
    }

    .listing-view-toggle {
        display: none;
    }

    .brands-search-box input {
        padding-right: 130px;
    }

    .brands-search-clear {
        right: 115px;
    }
}

@media (max-width: 768px) {
    .vehicles-hero-search {
        margin-top: -10px;
        padding: 0 0 20px;
    }

    .vehicles-search-box {
        padding: 20px;
        border-radius: var(--radius-lg);
    }

    .vehicles-search-icon {
        width: 42px;
        height: 42px;
        font-size: 1.1rem;
    }

    .vehicles-search-text h2 {
        font-size: 1.15rem;
    }

    .vehicles-search-tags {
        gap: 6px;
    }

    .vehicles-active-filters {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .vehicles-clear-all-btn {
        align-self: flex-end;
    }

    .brands-hero-stats {
        padding: 12px 24px;
        gap: 20px;
    }

    .brands-hero-stat-number {
        font-size: 1.5rem;
    }

    .brands-letter-grid {
        grid-template-columns: 1fr;
    }

    .brands-search-box input {
        padding-right: 50px;
    }

    .brands-search-count {
        display: none;
    }

    .brands-search-clear {
        right: 14px;
    }

    .alphabet-btn {
        width: 32px;
        height: 32px;
        font-size: 0.75rem;
    }

    .vehicles-grid--list .vehicle-card--premium {
        grid-template-columns: 1fr;
    }

    .listing-toolbar {
        flex-direction: column;
        align-items: flex-start;
    }

    .listing-toolbar-right {
        width: 100%;
        justify-content: space-between;
    }
}

@media (max-width: 480px) {
    .vehicles-search-box {
        padding: 16px;
    }

    .vehicles-search-tags-label {
        display: none;
    }

    .brands-hero-stats {
        flex-direction: column;
        gap: 12px;
        padding: 16px 24px;
    }

    .brands-hero-stat-divider {
        width: 60px;
        height: 1px;
    }

    .brands-alphabet-nav {
        gap: 3px;
    }

    .alphabet-btn {
        width: 28px;
        height: 28px;
        font-size: 0.7rem;
    }
}

/* ============================================
   FILTER SIDEBAR - SUPER PROFESSIONAL
   ============================================ */

/* Desktop Layout - Sidebar on Left */
.listing-layout {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 32px;
    align-items: start;
}

.filter-sidebar {
    background: linear-gradient(180deg, #ffffff 0%, #f8f9fa 100%);
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08), 0 2px 8px rgba(0, 0, 0, 0.04);
    border: 2px solid var(--gray-200);
    padding: 0;
    position: sticky;
    top: calc(var(--header-height) + 24px);
    height: calc(100vh - var(--header-height) - 48px); /* Full height, no scroll */
    max-height: none; /* Remove max-height restriction */
    overflow-y: visible; /* No internal scroll */
    overflow-x: hidden;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.filter-sidebar:hover {
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12), 0 4px 12px rgba(0, 0, 0, 0.06);
    border-color: var(--gray-300);
}

/* Custom scrollbar for filter sidebar */
.filter-sidebar::-webkit-scrollbar {
    width: 6px;
}

.filter-sidebar::-webkit-scrollbar-track {
    background: transparent;
}

.filter-sidebar::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--primary) 0%, #d0171d 100%);
    border-radius: 10px;
}

.filter-sidebar::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
}

/* Filter Mobile Header - Enhanced */
.filter-mobile-header {
    margin-bottom: 0;
    padding: 24px 24px 20px;
    background: linear-gradient(135deg, var(--primary-bg) 0%, #fff5f5 100%);
    border-bottom: 2px solid var(--gray-200);
    border-radius: 20px 20px 0 0;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.filter-header-content {
    flex: 1;
}

.filter-mobile-header h4 {
    font-size: 1.35rem;
    font-weight: 800;
    margin-bottom: 6px;
    color: var(--secondary);
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.filter-mobile-header h4 i {
    color: var(--primary);
    font-size: 1.4rem;
    background: var(--white);
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(227, 30, 36, 0.15);
}

.filter-count-badge {
    min-width: 28px;
    height: 28px;
    background: linear-gradient(135deg, var(--primary) 0%, #d0171d 100%);
    color: white;
    border-radius: 14px;
    font-size: 0.85rem;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 8px;
    box-shadow: 0 2px 8px rgba(227, 30, 36, 0.3);
    animation: badgePulse 2s ease-in-out infinite;
}

@keyframes badgePulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.filter-mobile-header p {
    font-size: 0.88rem;
    color: var(--gray-600);
    margin: 0;
    font-weight: 500;
}

/* Filter Close Button */
.filter-close-btn {
    width: 40px;
    height: 40px;
    background: var(--white);
    border: 2px solid var(--gray-200);
    border-radius: 12px;
    color: var(--gray-600);
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.filter-close-btn:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
    transform: rotate(90deg);
}

.filter-close-btn:active {
    transform: scale(0.95) rotate(90deg);
}

/* Filter Groups Container */
.filter-groups-container {
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: 20px 24px;
    flex: 1; /* Takes remaining space */
    overflow-y: auto; /* Only this section scrolls */
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
}

/* Custom scrollbar for filter groups */
.filter-groups-container::-webkit-scrollbar {
    width: 5px;
}

.filter-groups-container::-webkit-scrollbar-track {
    background: transparent;
}

.filter-groups-container::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--primary) 0%, #d0171d 100%);
    border-radius: 10px;
}

.filter-groups-container::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
}

/* Active Filters Display Inside Sidebar */
.active-filters-display {
    margin-bottom: 20px;
    padding: 18px;
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    border-radius: 14px;
    border: 2px solid #86efac;
}

.active-filters-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    font-weight: 700;
    color: #166534;
    font-size: 0.95rem;
}

.active-filters-header i {
    color: #10b981;
    font-size: 1.1rem;
}

.active-filters-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.active-filter-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    background: var(--white);
    border-radius: 8px;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--gray-700);
    border: 1.5px solid #86efac;
    transition: all 0.3s ease;
}

.active-filter-tag i:first-child {
    color: #10b981;
    font-size: 0.75rem;
}

.active-filter-tag .remove-filter {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    background: #fee2e2;
    border-radius: 50%;
    color: #dc2626;
    font-size: 0.65rem;
    margin-left: 4px;
    transition: all 0.3s ease;
    text-decoration: none;
}

.active-filter-tag .remove-filter:hover {
    background: #dc2626;
    color: white;
    transform: rotate(90deg);
}

.active-filter-tag:hover {
    border-color: #10b981;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.15);
}

/* ============================================
   VEHICLES LISTING - BRAND & CATEGORY GRIDS
   ============================================ */

/* Brand Grid - 2 Columns */
.vl-brand-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* 2 columns */
    gap: 10px;
    margin-top: 12px;
}

.vl-brand-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    background: var(--white);
    border: 2px solid var(--gray-200);
    border-radius: 12px;
    text-decoration: none;
    color: var(--gray-700);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.vl-brand-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--primary-bg) 0%, transparent 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.vl-brand-item:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(227, 30, 36, 0.12);
}

.vl-brand-item:hover::before {
    opacity: 1;
}

.vl-brand-item.active {
    border-color: var(--primary);
    background: linear-gradient(135deg, var(--primary-bg) 0%, #fff5f5 100%);
    box-shadow: 0 4px 12px rgba(227, 30, 36, 0.15);
}

.vl-brand-item-logo,
.vl-brand-item-icon {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: var(--gray-100);
    flex-shrink: 0;
    position: relative;
    z-index: 1;
}

.vl-brand-item-logo img {
    max-width: 28px;
    max-height: 28px;
    object-fit: contain;
}

.vl-brand-item-icon i {
    color: var(--gray-500);
    font-size: 1rem;
}

.vl-brand-item-name {
    font-size: 0.88rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    position: relative;
    z-index: 1;
}

.vl-brand-item.active .vl-brand-item-name {
    color: var(--primary);
    font-weight: 700;
}

/* Category Grid - Single Column */
.vl-category-grid {
    display: flex;
    flex-direction: column; /* Single column */
    gap: 10px;
    margin-top: 12px;
}

.vl-category-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: var(--white);
    border: 2px solid var(--gray-200);
    border-radius: 12px;
    text-decoration: none;
    color: var(--gray-700);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.vl-category-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--primary-bg) 0%, transparent 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.vl-category-item:hover {
    border-color: var(--primary);
    transform: translateX(4px);
    box-shadow: 0 4px 12px rgba(227, 30, 36, 0.12);
}

.vl-category-item:hover::before {
    opacity: 1;
}

.vl-category-item.active {
    border-color: var(--primary);
    background: linear-gradient(135deg, var(--primary-bg) 0%, #fff5f5 100%);
    box-shadow: 0 4px 12px rgba(227, 30, 36, 0.15);
}

.vl-category-item-img {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    overflow: hidden;
    flex-shrink: 0;
    position: relative;
    z-index: 1;
    background: var(--gray-100);
}

.vl-category-item-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.vl-category-item-fallback {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    color: var(--gray-600);
}

.vl-category-item-name {
    font-size: 0.92rem;
    font-weight: 600;
    flex: 1;
    position: relative;
    z-index: 1;
}

.vl-category-item.active .vl-category-item-name {
    color: var(--primary);
    font-weight: 700;
}

/* Filter Group - Professional Cards */
.filter-group {
    margin-bottom: 16px;
    padding: 20px;
    background: var(--white);
    border-radius: 14px;
    border: 1.5px solid var(--gray-200);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    transition: all 0.3s ease;
}

.filter-group:hover {
    border-color: var(--primary);
    box-shadow: 0 4px 12px rgba(227, 30, 36, 0.08);
    transform: translateY(-2px);
}

.filter-group:last-child {
    margin-bottom: 0;
}

/* Filter Search Mini */
.filter-search-mini {
    position: relative;
    margin-bottom: 0;
}

.filter-search-mini i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray-400);
    font-size: 0.95rem;
    transition: color 0.3s ease;
}

.filter-search-mini input {
    width: 100%;
    padding: 12px 14px 12px 42px;
    border: 2px solid var(--gray-200);
    border-radius: 12px;
    font-size: 0.92rem;
    font-weight: 500;
    color: var(--gray-800);
    background: var(--gray-50);
    transition: all 0.3s ease;
}

.filter-search-mini input:focus {
    outline: none;
    border-color: var(--primary);
    background: var(--white);
    box-shadow: 0 0 0 4px rgba(227, 30, 36, 0.08);
}

.filter-search-mini input:focus + i,
.filter-search-mini input:not(:placeholder-shown) + i {
    color: var(--primary);
}

/* Filter Actions */
.filter-actions {
    margin-top: 0;
    padding: 20px 24px;
    background: linear-gradient(180deg, #f8f9fa 0%, #ffffff 100%);
    border-top: 2px solid var(--gray-200);
    border-radius: 0 0 20px 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex-shrink: 0; /* Don't shrink */
}

.reset-btn {
    border-style: dashed;
    border-width: 2px;
    color: var(--gray-600);
    font-weight: 600;
    transition: all 0.3s ease;
}

.reset-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: var(--primary-bg);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(227, 30, 36, 0.15);
}

/* Tablet Responsive */
@media (max-width: 1200px) {
    .listing-layout {
        grid-template-columns: 280px 1fr;
        gap: 24px;
    }

    .filter-sidebar {
        top: calc(var(--header-height) + 16px);
        max-height: calc(100vh - var(--header-height) - 32px);
    }
}

/* Mobile Responsive - Bottom Sheet Style */
@media (max-width: 992px) {
    .listing-layout {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .filter-sidebar {
        position: fixed;
        top: auto;
        bottom: 0;
        left: 0;
        right: 0;
        width: 100%;
        max-width: 100%;
        max-height: 85vh;
        max-height: 85dvh;
        border-radius: 24px 24px 0 0;
        z-index: 10001;
        transform: translateY(100%);
        transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        box-shadow: 0 -8px 40px rgba(0, 0, 0, 0.2);
        border: none;
        border-top: 3px solid var(--primary);
    }

    .filter-sidebar.active {
        transform: translateY(0);
    }

    .filter-sidebar-overlay {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.6);
        backdrop-filter: blur(4px);
        z-index: 10000;
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
    }

    .filter-sidebar-overlay.active {
        opacity: 1;
        visibility: visible;
    }

    .filter-groups-container {
        padding: 16px 20px 100px;
        max-height: calc(85vh - 180px);
        overflow-y: auto;
    }

    .filter-actions {
        position: sticky;
        bottom: 0;
        background: var(--white);
        border-top: 2px solid var(--gray-200);
        padding: 16px 20px;
        box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.08);
    }

    /* Mobile Filter Toggle Button */
    .mobile-filter-toggle-btn {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 10px;
        width: 100%;
        padding: 14px 20px;
        margin-bottom: 16px;
        background: linear-gradient(135deg, var(--primary) 0%, #d0171d 100%);
        color: white;
        border: none;
        border-radius: 14px;
        font-size: 1rem;
        font-weight: 700;
        cursor: pointer;
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        box-shadow: 0 4px 16px rgba(227, 30, 36, 0.3);
        position: relative;
    }

    .mobile-filter-toggle-btn i {
        font-size: 1.2rem;
    }

    .mobile-filter-toggle-btn:active {
        transform: scale(0.98);
    }

    .mobile-filter-badge {
        position: absolute;
        top: -8px;
        right: -8px;
        min-width: 24px;
        height: 24px;
        background: linear-gradient(135deg, #10b981 0%, #059669 100%);
        color: white;
        border-radius: 12px;
        font-size: 0.75rem;
        font-weight: 800;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 0 6px;
        box-shadow: 0 2px 8px rgba(16, 185, 129, 0.4);
        animation: badgePulse 2s ease-in-out infinite;
    }

    @keyframes badgePulse {
        0%, 100% {
            transform: scale(1);
        }
        50% {
            transform: scale(1.1);
        }
    }

    /* Listing Main Area - Right Side */
    .listing-main {
        background: transparent;
        min-height: 400px;
    }

    .listing-toolbar {
        background: var(--white);
        border-radius: 16px;
        padding: 18px 24px;
        margin-bottom: 24px;
        box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
        border: 1.5px solid var(--gray-200);
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 16px;
        flex-wrap: wrap;
    }

    .listing-count {
        display: flex;
        align-items: center;
        gap: 12px;
        flex-wrap: wrap;
    }

    .listing-count-number strong {
        color: var(--primary);
        font-size: 1.3rem;
        font-weight: 800;
    }

    .listing-page-info {
        font-size: 0.88rem;
        color: var(--gray-600);
        font-weight: 500;
        padding: 4px 12px;
        background: var(--gray-100);
        border-radius: 8px;
    }

    .listing-toolbar-right {
        display: flex;
        align-items: center;
        gap: 12px;
    }
}