/* ==========================================================================
   Bilhandler - Frontend Styles
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600;700&display=swap');

:root {
    --bh-primary: #1a56db;
    --bh-primary-hover: #1444b0;
    --bh-dark: #111827;
    --bh-gray-900: #1f2937;
    --bh-gray-700: #374151;
    --bh-gray-500: #6b7280;
    --bh-gray-300: #d1d5db;
    --bh-gray-200: #e5e7eb;
    --bh-gray-100: #f3f4f6;
    --bh-gray-50: #f9fafb;
    --bh-white: #ffffff;
    --bh-green: #059669;
    --bh-radius: 8px;
    --bh-shadow: 0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.06);
    --bh-shadow-md: 0 4px 6px rgba(0, 0, 0, 0.07), 0 2px 4px rgba(0, 0, 0, 0.06);
    --bh-shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1), 0 4px 6px rgba(0, 0, 0, 0.05);
    --bh-transition: 0.2s ease;
}

/* ==========================================================================
   Wrapper
   ========================================================================== */

.bilhandler-wrapper {
    max-width: 1280px;
    margin: 0 auto;
    padding: 20px;
    font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: var(--bh-dark);
    line-height: 1.5;
}

.bilhandler-wrapper *,
.bilhandler-wrapper *::before,
.bilhandler-wrapper *::after {
    box-sizing: border-box;
}

/* ==========================================================================
   Filters
   ========================================================================== */

.bilhandler-filters {
    background: var(--bh-white);
    border: 1px solid var(--bh-gray-200);
    border-radius: var(--bh-radius);
    padding: 20px;
    margin-bottom: 24px;
    box-shadow: var(--bh-shadow);
}

.bilhandler-filters-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 16px;
}

.bilhandler-filters-row:last-child {
    margin-bottom: 0;
}

.bilhandler-filter-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--bh-gray-700);
    margin-bottom: 4px;
}

.bilhandler-filter-group select,
.bilhandler-filter-group input[type="text"],
.bilhandler-filter-group input[type="number"] {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid var(--bh-gray-300);
    border-radius: 6px;
    font-size: 14px;
    color: var(--bh-dark);
    background: var(--bh-white);
    transition: border-color var(--bh-transition);
    appearance: auto;
}

.bilhandler-filter-group select:focus,
.bilhandler-filter-group input:focus {
    outline: none;
    border-color: var(--bh-primary);
    box-shadow: 0 0 0 3px rgba(26, 86, 219, 0.1);
}

.bilhandler-filter-group select:disabled {
    background: var(--bh-gray-100);
    color: var(--bh-gray-500);
    cursor: not-allowed;
}

.bilhandler-range-inputs {
    display: flex;
    align-items: center;
    gap: 8px;
}

.bilhandler-range-inputs input {
    flex: 1;
    min-width: 0;
}

.bilhandler-range-inputs span {
    color: var(--bh-gray-500);
}

.bilhandler-filters-actions {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    padding-top: 12px;
    border-top: 1px solid var(--bh-gray-200);
}

.bilhandler-sort {
    display: flex;
    align-items: center;
    gap: 8px;
}

.bilhandler-sort label {
    font-size: 13px;
    font-weight: 600;
    color: var(--bh-gray-700);
    white-space: nowrap;
}

.bilhandler-sort select {
    padding: 8px 12px;
    border: 1px solid var(--bh-gray-300);
    border-radius: 6px;
    font-size: 14px;
    color: var(--bh-dark);
    background: var(--bh-white);
}

.bilhandler-results-count {
    display: none;
}

/* Mobile top bar - hidden on desktop */
.bilhandler-mobile-bar {
    display: none;
    gap: 12px;
    margin-bottom: 16px;
}

.bilhandler-filter-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: var(--bh-white);
    border: 1px solid var(--bh-gray-300);
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    color: var(--bh-dark);
    cursor: pointer;
    transition: all var(--bh-transition);
}

.bilhandler-filter-toggle:hover {
    background: var(--bh-gray-100);
}

.bilhandler-mobile-sort {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 10px 16px;
    background: var(--bh-white);
    border: 1px solid var(--bh-gray-300);
    border-radius: 6px;
}

.bilhandler-mobile-sort label {
    font-size: 14px;
    font-weight: 500;
    color: var(--bh-dark);
    white-space: nowrap;
}

.bilhandler-mobile-sort select {
    padding: 0;
    border: none;
    font-size: 14px;
    font-weight: 500;
    color: var(--bh-dark);
    background: transparent;
    cursor: pointer;
}

/* Filters wrapper for mobile slide-in */
.bilhandler-filters-wrapper {
    display: contents;
}


/* Overlay for mobile */
.bilhandler-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 998;
}

.bilhandler-overlay.active {
    display: block;
}

.bilhandler-btn-reset {
    padding: 8px 16px;
    background: none;
    border: 1px solid var(--bh-gray-300);
    border-radius: 6px;
    font-size: 14px;
    color: var(--bh-gray-700);
    cursor: pointer;
    transition: all var(--bh-transition);
    white-space: nowrap;
}

.bilhandler-btn-reset:hover {
    background: var(--bh-gray-100);
    border-color: var(--bh-gray-500);
}

/* ==========================================================================
   Loading
   ========================================================================== */

.bilhandler-loading {
    text-align: center;
    padding: 40px 20px;
    color: var(--bh-gray-500);
    font-size: 15px;
}

.bilhandler-spinner {
    display: inline-block;
    width: 32px;
    height: 32px;
    border: 3px solid var(--bh-gray-200);
    border-top-color: var(--bh-primary);
    border-radius: 50%;
    animation: bh-spin 0.8s linear infinite;
    margin-bottom: 10px;
}

@keyframes bh-spin {
    to { transform: rotate(360deg); }
}

/* ==========================================================================
   Grid
   ========================================================================== */

.bilhandler-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-bottom: 24px;
}

.bilhandler-no-results {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    color: var(--bh-gray-500);
    font-size: 16px;
}

/* ==========================================================================
   Car Card - New Design
   ========================================================================== */

.bilhandler-card {
    display: flex;
    flex-direction: column;
    background: var(--bh-white);
    border: 1px solid var(--bh-gray-200);
    border-radius: 12px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    transition: box-shadow var(--bh-transition), transform var(--bh-transition);
}

.bilhandler-card:hover {
    box-shadow: var(--bh-shadow-lg);
    transform: translateY(-2px);
    text-decoration: none;
    color: inherit;
}

.bilhandler-card-image {
    position: relative;
    width: 100%;
    padding-top: 60%;
    overflow: hidden;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
}

.bilhandler-card-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.bilhandler-card:hover .bilhandler-card-image img {
    transform: scale(1.03);
}

.bilhandler-card-noimage {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--bh-gray-400);
    font-size: 14px;
}

/* Card Image Slider */
.bilhandler-card-slider {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.bilhandler-card-slider img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.bilhandler-card-slider img.active {
    opacity: 1;
}

.bilhandler-slider-prev,
.bilhandler-slider-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 24px;
    height: 24px;
    border: none;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s ease;
    z-index: 3;
    line-height: 1;
}

.bilhandler-card:hover .bilhandler-slider-prev,
.bilhandler-card:hover .bilhandler-slider-next {
    opacity: 1;
}

.bilhandler-slider-prev:hover,
.bilhandler-slider-next:hover {
    background: rgba(0, 0, 0, 1);
}

.bilhandler-slider-prev {
    left: 8px;
}

.bilhandler-slider-next {
    right: 8px;
}

/* Badges on image */
.bilhandler-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 6px 14px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    z-index: 2;
}

.badge-taxfree {
    background: rgba(59, 130, 246, 0.9);
    color: white;
}

.badge-leasing {
    background: rgba(16, 185, 129, 0.9);
    color: white;
}

/* Fuel type icon badge */
.bilhandler-fuel-icon {
    position: absolute;
    bottom: 12px;
    right: 12px;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
}

.bilhandler-fuel-icon.badge-electric {
    background: rgba(59, 130, 246, 0.95);
    color: white;
}

.bilhandler-fuel-icon.badge-hybrid {
    background: rgba(16, 185, 129, 0.95);
    color: white;
}

.bilhandler-fuel-icon.badge-diesel {
    background: rgba(0, 0, 0, 0.95);
    color: white;
}

.bilhandler-fuel-icon.badge-benzin {
    background: rgba(16, 185, 129, 0.95);
    color: white;
}

/* Card body */
.bilhandler-card-body {
    padding: 16px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.bilhandler-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}

.bilhandler-card-titles {
    flex: 1;
    min-width: 0;
}

.bilhandler-card-title {
    font-size: 18px;
    font-weight: 700;
    margin: 0;
    color: #111827;
    line-height: 1.3;
}

.bilhandler-card-variant {
    font-size: 14px;
    color: #6b7280;
    margin: 4px 0 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Spec pills - dark badges */
.bilhandler-card-specs {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 16px;
}

.bilhandler-spec-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 500;
    color: var(--bh-white);
    background: var(--bh-gray-900);
    padding: 6px 12px;
    border-radius: 6px;
    white-space: nowrap;
    min-width: 60px;
    text-align: center;
}

.bilhandler-spec-pill:last-child {
    /* No special styling needed */
}

/* Price section */
.bilhandler-card-price {
    margin-top: auto;
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding-top: 12px;
    border-top: 1px solid var(--bh-gray-100);
}

.bilhandler-price-label {
    font-size: 13px;
    color: var(--bh-gray-500);
}

.bilhandler-price-amount {
    font-size: 18px;
    font-weight: 700;
    color: var(--bh-dark);
}

.bilhandler-price-amount.leasing {
    color: var(--bh-primary);
}

/* ==========================================================================
   Pagination
   ========================================================================== */

.bilhandler-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 16px 0;
}

.bilhandler-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    border: 1px solid var(--bh-gray-300);
    border-radius: 6px;
    background: var(--bh-white);
    font-size: 14px;
    font-weight: 500;
    color: var(--bh-gray-700);
    cursor: pointer;
    transition: all var(--bh-transition);
    text-decoration: none;
}

.bilhandler-btn:hover:not(:disabled) {
    background: var(--bh-gray-100);
    border-color: var(--bh-gray-500);
}

.bilhandler-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.bilhandler-page-info {
    font-size: 14px;
    color: var(--bh-gray-500);
}

/* ==========================================================================
   Single Bil Page
   ========================================================================== */

.bilhandler-single {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
    color: var(--bh-dark);
    line-height: 1.5;
}

.bilhandler-single * {
    font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
}

.bilhandler-single *,
.bilhandler-single *::before,
.bilhandler-single *::after {
    box-sizing: border-box;
}

.bilhandler-single-header {
    margin-bottom: 20px;
}

.bilhandler-back-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 14px;
    color: var(--bh-primary);
    text-decoration: none;
    font-weight: 500;
}

.bilhandler-back-link:hover {
    text-decoration: underline;
}

/* Gallery */
.bilhandler-gallery {
    margin-bottom: 24px;
}

.bilhandler-gallery-main {
    position: relative;
    width: 100%;
    border-radius: var(--bh-radius);
    overflow: hidden;
    background: var(--bh-gray-100);
    cursor: pointer;
}

.bilhandler-gallery-main img {
    display: block;
    width: 100%;
    max-height: 500px;
    object-fit: contain;
    background: var(--bh-dark);
}

.gallery-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    border: none;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.5);
    color: var(--bh-white);
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background var(--bh-transition);
    line-height: 1;
}

.gallery-nav:hover {
    background: rgba(0, 0, 0, 0.8);
}

.gallery-prev {
    left: 12px;
}

.gallery-next {
    right: 12px;
}

.gallery-counter {
    position: absolute;
    bottom: 12px;
    right: 12px;
    background: rgba(0, 0, 0, 0.6);
    color: var(--bh-white);
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 13px;
}

.bilhandler-gallery-thumbs {
    display: flex;
    gap: 8px;
    margin-top: 8px;
    overflow-x: auto;
    padding-bottom: 4px;
}

.gallery-thumb {
    width: 80px;
    height: 60px;
    object-fit: cover;
    border-radius: 4px;
    cursor: pointer;
    opacity: 0.6;
    transition: opacity var(--bh-transition), border-color var(--bh-transition);
    border: 2px solid transparent;
    flex-shrink: 0;
}

.gallery-thumb:hover,
.gallery-thumb.active {
    opacity: 1;
}

.gallery-thumb.active {
    border-color: var(--bh-primary);
}

/* Lightbox */
.bilhandler-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
}

.lightbox-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-content img {
    max-width: 90vw;
    max-height: 85vh;
    object-fit: contain;
    border-radius: 4px;
}

.lightbox-close {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 44px;
    height: 44px;
    border: none;
    background: rgba(255, 255, 255, 0.1);
    color: var(--bh-white);
    font-size: 28px;
    cursor: pointer;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background var(--bh-transition);
    line-height: 1;
}

.lightbox-close:hover {
    background: rgba(255, 255, 255, 0.25);
}

.lightbox-nav {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    color: var(--bh-white);
    font-size: 28px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background var(--bh-transition);
    line-height: 1;
}

.lightbox-nav:hover {
    background: rgba(255, 255, 255, 0.25);
}

.lightbox-prev {
    left: 20px;
}

.lightbox-next {
    right: 20px;
}

.lightbox-counter {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    color: var(--bh-white);
    font-size: 14px;
    background: rgba(0, 0, 0, 0.5);
    padding: 6px 14px;
    border-radius: 20px;
}

/* Single Content Layout */
.bilhandler-single-content {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 30px;
    align-items: start;
}

.bilhandler-single-title {
    font-size: 28px;
    font-weight: 700;
    margin: 0 0 12px;
    line-height: 1.2;
}

.bilhandler-single-price {
    margin-bottom: 24px;
}

.bilhandler-single-price .price-amount {
    font-size: 32px;
    font-weight: 700;
    color: var(--bh-primary);
}

.bilhandler-single-price .price-type {
    display: none;
}

.bilhandler-single-price .cash-price {
    display: block;
    font-size: 15px;
    color: var(--bh-gray-500);
    margin-top: 4px;
}

/* Specs Table */
.bilhandler-specs-grid {
    background: var(--bh-white);
    margin-bottom: 30px;
}

.bilhandler-specs-grid h2,
.bilhandler-equipment h2,
.bilhandler-description h2 {
    font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 12px;
}

.bilhandler-specs-table {
    width: 100%;
    border-collapse: collapse;
    border: none;
}

.bilhandler-specs-table tr {
    border: none;
    border-bottom: 1px solid var(--bh-gray-200);
}

.bilhandler-specs-table th,
.bilhandler-specs-table td {
    padding: 12px 0;
    text-align: left;
    font-size: 14px;
    border: none;
    background: #ffffff !important;
}

.bilhandler-specs-table tr,
.bilhandler-specs-table tr:nth-child(odd),
.bilhandler-specs-table tr:nth-child(even) {
    background: #ffffff !important;
}

.bilhandler-specs-table th {
    width: 50%;
    font-weight: 500;
    color: var(--bh-gray-500);
}

.bilhandler-specs-table td {
    width: 50%;
    text-align: right;
    font-weight: 600;
    color: var(--bh-dark);
}

/* Collapsible sections */
.bilhandler-collapsible-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    user-select: none;
}

.bilhandler-collapse-arrow {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.bilhandler-collapse-arrow::before {
    content: '';
    border: solid var(--bh-gray-500);
    border-width: 0 2px 2px 0;
    display: inline-block;
    padding: 4px;
    transform: rotate(45deg);
    transition: transform 0.3s ease;
}

.bilhandler-collapsible.collapsed .bilhandler-collapse-arrow::before {
    transform: rotate(-45deg);
}

.bilhandler-collapsible-content {
    display: block !important;
    width: 100% !important;
}

.bilhandler-collapsible.collapsed .bilhandler-collapsible-content {
    display: none !important;
}

table.bilhandler-collapsible-content {
    display: table !important;
    width: 100% !important;
}

.bilhandler-collapsible.collapsed table.bilhandler-collapsible-content {
    display: none !important;
}

/* Equipment List */
.bilhandler-equipment {
    margin-bottom: 30px;
}

.bilhandler-equipment-list {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 10px 40px;
    list-style: none;
    padding: 0;
    margin: 0;
    width: 100%;
}

.bilhandler-equipment-list li {
    position: relative;
    padding-left: 20px;
    font-size: 14px;
    color: var(--bh-gray-700);
}

.bilhandler-equipment-list li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--bh-green);
    font-weight: bold;
}

/* Description */
.bilhandler-description {
    margin-bottom: 30px;
}

.bilhandler-description p {
    font-size: 14px;
    line-height: 1.7;
    color: var(--bh-gray-700);
}

/* Sidebar */
.bilhandler-dealer-card,
.bilhandler-quick-specs {
    background: var(--bh-white);
    border: 1px solid var(--bh-gray-200);
    border-radius: var(--bh-radius);
    padding: 20px;
    box-shadow: var(--bh-shadow);
    margin-bottom: 16px;
}

.bilhandler-dealer-card h3,
.bilhandler-quick-specs h3 {
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 12px;
    font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
}

.dealer-name {
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 16px;
    color: var(--bh-dark);
}

.bilhandler-btn-primary {
    display: block;
    width: 100%;
    padding: 12px;
    background: var(--bh-primary);
    color: var(--bh-white) !important;
    border: none;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    transition: background var(--bh-transition);
    text-decoration: none;
    margin-bottom: 8px;
}

.bilhandler-btn-primary:hover {
    background: var(--bh-primary-hover);
    color: var(--bh-white) !important;
    text-decoration: none;
}

.bilhandler-btn-outline {
    display: block;
    width: 100%;
    padding: 12px;
    background: var(--bh-white);
    color: var(--bh-gray-700) !important;
    border: 1px solid var(--bh-gray-300);
    border-radius: 6px;
    font-size: 15px;
    font-weight: 500;
    text-align: center;
    cursor: pointer;
    transition: all var(--bh-transition);
    text-decoration: none;
}

.bilhandler-btn-outline:hover {
    background: var(--bh-gray-100);
    text-decoration: none;
}

/* Quick Specs */
.quick-spec {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid var(--bh-gray-100);
    font-size: 14px;
}

.quick-spec:last-child {
    border-bottom: none;
}

.quick-spec strong {
    color: var(--bh-gray-500);
    font-weight: 500;
}

.quick-spec span {
    font-weight: 600;
    color: var(--bh-dark);
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 1280px) {
    .bilhandler-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 20px;
    }
}

@media (max-width: 1024px) {
    .bilhandler-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .bilhandler-single-content {
        display: flex;
        flex-direction: column;
    }

    .bilhandler-single-sidebar {
        display: contents;
    }

    .bilhandler-single-main {
        order: 2;
        width: 100%;
    }

    .bilhandler-quick-specs {
        order: 1;
        width: 100%;
    }

    .bilhandler-dealer-card {
        order: 3;
        width: 100%;
    }

    .bilhandler-filters-row {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Show mobile bar */
    .bilhandler-mobile-bar {
        display: flex;
    }

    /* Filters become slide-in panel */
    .bilhandler-filters-wrapper {
        display: block;
        position: fixed;
        top: 0;
        left: -320px;
        width: 300px;
        height: 100%;
        background: var(--bh-white);
        z-index: 999;
        overflow-y: auto;
        transition: left 0.3s ease;
    }

    .bilhandler-filters-wrapper.active {
        left: 0;
    }

    .bilhandler-filters-wrapper .bilhandler-filters {
        border: none;
        border-radius: 0;
        box-shadow: none;
        margin-bottom: 0;
    }

    .bilhandler-filters-wrapper .bilhandler-filters-row {
        grid-template-columns: 1fr;
    }

    .bilhandler-filters-wrapper .bilhandler-filters-actions {
        flex-direction: column;
        border-top: none;
        padding-top: 0;
    }

    .bilhandler-filters-wrapper .bilhandler-filters-actions .bilhandler-sort,
    .bilhandler-filters-wrapper .bilhandler-filters-actions .bilhandler-results-count {
        display: none;
    }

    .bilhandler-filters-wrapper .bilhandler-filters-actions .bilhandler-btn-reset {
        width: 100%;
        padding: 12px;
        margin-top: 8px;
    }
}

@media (max-width: 640px) {
    .bilhandler-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .bilhandler-filters-row {
        grid-template-columns: 1fr;
    }

    .bilhandler-filters-actions {
        flex-wrap: wrap;
    }

    .bilhandler-single-title {
        font-size: 22px;
    }

    .bilhandler-single-price .price-amount {
        font-size: 26px;
    }

    .bilhandler-equipment-list {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 8px 16px;
        max-width: 100%;
        overflow: hidden;
    }

    .bilhandler-equipment-list li {
        font-size: 12px;
        word-break: break-word;
    }

    .bilhandler-gallery-main img {
        max-height: 300px;
    }

    .gallery-thumb {
        width: 60px;
        height: 45px;
    }

    .bilhandler-card-title {
        font-size: 16px;
    }

    .bilhandler-spec-pill {
        font-size: 12px;
    }
}
