/* ==========================================================================
   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: none;
    padding: 90px 30px 40px;
    font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: var(--bh-dark);
    line-height: 1.5;
}

/* Hoved-layout: sidebar + indhold side om side */
.bilhandler-main-row {
    display: flex;
    gap: 28px;
    align-items: flex-start;
}

/* Indholds-kolonne (biler + pagination) */
.bilhandler-content-col {
    flex: 1;
    min-width: 0;
}

.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: 18px;
    margin-bottom: 0;
    box-shadow: var(--bh-shadow);
}

.bilhandler-filters-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    margin-bottom: 10px;
}

.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);
}

/* Køretøjstype toggle */
.bilhandler-vehicle-type {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}
.bh-type-radio { cursor: pointer; flex: 1; }
.bh-type-radio input[type="radio"] { display: none; }
.bh-type-radio span {
    display: block;
    text-align: center;
    padding: 10px 16px;
    border-radius: 8px;
    border: 2px solid #e5e7eb;
    font-size: 14px;
    font-weight: 600;
    color: #6b7280;
    background: #f9fafb;
    transition: all 0.2s ease;
}
.bh-type-radio input[type="radio"]:checked + span {
    background: #8B1A2B;
    border-color: #8B1A2B;
    color: #ffffff;
}
.bh-type-radio:hover span { border-color: #8B1A2B; color: #8B1A2B; }

.bilhandler-filters-actions {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    padding-top: 12px;
    border-top: 1px solid var(--bh-gray-200);
}

.bilhandler-sort {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

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

.bilhandler-sort select {
    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);
}

.bilhandler-results-count {
    display: block;
    font-size: 13px;
    color: var(--bh-gray-500);
    text-align: center;
    padding: 2px 0;
}

/* 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;
}

/* Filter-sidebar: sticky på desktop, slide-in på mobil */
.bilhandler-filters-wrapper {
    width: 290px;
    flex-shrink: 0;
    position: sticky;
    top: 100px;
    max-height: calc(100vh - 110px);
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--bh-gray-300) transparent;
}


/* 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(4, 1fr);
    gap: 16px;
    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: 70%;
    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: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    box-shadow: 0 2px 8px rgba(0,0,0,0.25);
}

.bilhandler-fuel-icon.badge-electric {
    background: #EAB308;
}

.bilhandler-fuel-icon.badge-hybrid {
    background: #0891b2;
}

.bilhandler-fuel-icon.badge-diesel {
    background: #1f2937;
}

.bilhandler-fuel-icon.badge-benzin {
    background: #059669;
}

/* Card body */
.bilhandler-card-body {
    padding: 20px;
    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: 600;
    margin: 0;
    color: var(--bh-dark);
    line-height: 1.3;
}

.bilhandler-card-variant {
    font-size: 14px;
    color: var(--bh-gray-900);
    margin: 2px 0 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

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

.bilhandler-spec-pill {
    display: inline-block;
    font-size: 12px;
    font-weight: 600;
    color: #ffffff;
    background: #1f2937;
    padding: 4px 10px;
    border-radius: 5px;
}

.bilhandler-spec-pill:last-child {
    border-right: none;
}

/* Price / financing bottom section */
.bilhandler-card-bottom {
    margin-top: auto;
    margin: 0 -20px -20px;
    background: var(--bh-gray-50);
    border-top: 1px solid var(--bh-gray-200);
    border-radius: 0 0 12px 12px;
    overflow: hidden;
}

.bilhandler-card-price {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 14px;
}

/* Info-ikon på bil-kort → linker til finansiering */
.bilhandler-financing-info-btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 17px !important;
    height: 17px !important;
    min-width: 17px !important;
    min-height: 17px !important;
    max-width: 17px !important;
    max-height: 17px !important;
    border-radius: 50% !important;
    border: 1.5px solid #8B1A2B !important;
    color: #8B1A2B !important;
    background: none !important;
    font-size: 10px !important;
    font-weight: 700 !important;
    font-style: italic !important;
    font-family: Georgia, serif !important;
    line-height: 1 !important;
    cursor: pointer !important;
    padding: 0 !important;
    margin-left: 6px !important;
    flex-shrink: 0 !important;
    vertical-align: middle !important;
    transition: background 0.15s, color 0.15s;
    box-shadow: none !important;
    text-transform: none !important;
    letter-spacing: 0 !important;
}

.bilhandler-financing-info-btn:hover {
    background: #8B1A2B;
    color: #fff;
}

.bilhandler-card-financing {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 14px 10px;
    border-top: 1px solid var(--bh-gray-200);
}

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

.bilhandler-financing-amount {
    font-size: 15px;
    font-weight: 700;
    color: var(--bh-primary);
}

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

.bilhandler-price-amount {
    font-size: 20px;
    font-weight: 700;
    color: #0f1924;
}

.bilhandler-price-amount.leasing {
    color: #0f1924;
}

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

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

.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: 90px 20px 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;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
}

.bilhandler-back-link {
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    font-size: 14px !important;
    color: #fff !important;
    background: #8B1A2B !important;
    text-decoration: none !important;
    font-weight: 600 !important;
    padding: 8px 18px !important;
    border-radius: 6px !important;
    border: none !important;
    transition: background 0.2s;
}

.bilhandler-back-link:hover {
    background: #6e1422 !important;
    text-decoration: none !important;
}

.bilhandler-single-title {
    width: 100%;
    text-align: center;
    font-size: 28px;
    font-weight: 700;
    color: #0f1924;
    margin: 0;
    line-height: 1.2;
}

/* 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: #0f1924;
}

.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,
.bilhandler-financing-card {
    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;
}

.financing-estimate {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--bh-gray-50);
    border: 1px solid var(--bh-gray-200);
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 14px;
}

.financing-estimate-label {
    font-size: 14px;
    font-weight: 500;
    color: var(--bh-gray-600);
}

.financing-estimate-amount {
    font-size: 22px;
    font-weight: 700;
    color: #0f1924;
}

.financing-intro {
    font-size: 14px;
    color: var(--bh-gray-500);
    margin: 0 0 12px;
    font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
}

.financing-calc {
    background: var(--bh-white);
    padding: 0;
}

.financing-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    font-size: 14px;
    border-bottom: 1px solid var(--bh-gray-100);
    font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
}

.financing-row:last-child {
    border-bottom: none;
}

.financing-row span {
    color: var(--bh-gray-500);
    font-weight: 500;
}

.financing-row strong {
    font-weight: 600;
    color: var(--bh-dark);
}

.financing-downpayment-row select {
    padding: 6px 10px;
    border: 1px solid var(--bh-gray-300);
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    color: var(--bh-dark);
    background: var(--bh-white);
    font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
    cursor: pointer;
}

.financing-highlight {
    border-bottom: none;
}

.financing-highlight span {
    color: var(--bh-gray-500);
}

.financing-highlight strong {
    color: var(--bh-primary);
}

.financing-disclaimer {
    font-size: 11px;
    color: var(--bh-gray-500);
    margin: 12px 0 0;
    font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
}

.financing-partner {
    font-size: 12px;
    color: var(--bh-gray-500);
    margin: 12px 0 0;
    text-align: center;
    font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
}

/* ------------------------------------------------------------------ *
 * Finansierings-sektion (fuld bredde, under beskrivelse)
 * ------------------------------------------------------------------ */
.bilhandler-financing-section {
    display: flex;
    gap: 32px;
    align-items: flex-start;
    background: var(--bh-white);
    border: 1px solid var(--bh-gray-200);
    border-radius: var(--bh-radius);
    padding: 28px;
    box-shadow: var(--bh-shadow);
    margin: 24px 0;
}

.bilhandler-financing-section h2 {
    font-size: 20px;
    font-weight: 700;
    margin: 0 0 16px;
    color: var(--bh-dark);
    font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
}

.bilhandler-financing-section-left {
    flex: 1;
    min-width: 0;
}

.bilhandler-financing-section-right {
    flex-shrink: 0;
    width: 300px;
}

/* Bullets */
.financing-bullets {
    list-style: none;
    margin: 12px 0 0;
    padding: 0;
}

.financing-bullets li {
    font-size: 14px;
    color: var(--bh-gray-700);
    padding: 5px 0 5px 20px;
    position: relative;
}

.financing-bullets li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--bh-green);
    font-weight: 700;
}

/* ------------------------------------------------------------------ *
 * SCB-elementer flyttet til venstre kolonne
 * ------------------------------------------------------------------ */

/* Grå resultattabel */
.scb-results-moved {
    background: var(--bh-gray-50) !important;
    border: 1px solid var(--bh-gray-200) !important;
    border-radius: 8px !important;
    padding: 14px 16px !important;
    margin: 16px 0 0 !important;
    width: 100% !important;
    box-sizing: border-box !important;
    font-size: 13px !important;
    font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
    color: var(--bh-gray-700) !important;
}

/* Knap – auto bredde, venstre-justeret */
#scb-btn-placeholder {
    margin-top: 16px;
}

#scb-btn-placeholder button {
    display: inline-block !important;
    width: auto !important;
    margin-top: 16px !important;
    padding: 13px 28px !important;
    background: #8B1A2B !important;
    color: #fff !important;
    border: none !important;
    border-radius: 8px !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
    cursor: pointer !important;
    letter-spacing: 0.3px !important;
    transition: background 0.2s ease !important;
}

#scb-btn-placeholder button:hover {
    background: #6d1421 !important;
}

/* Santander brand-bar under knappen */
.scb-brand-moved {
    margin-top: 12px !important;
    border-radius: 8px !important;
    overflow: hidden !important;
    width: 100% !important;
}

/* ------------------------------------------------------------------ *
 * SCB Calculator – restyle til eget design
 * ------------------------------------------------------------------ */

/* Font override på hele calculator */
#scbdkdealerexternalcalc,
#scbdkdealerexternalcalc * {
    font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
}

/* Input-felter */
#scbdkdealerexternalcalc input {
    border: 1px solid #d1d5db !important;
    border-radius: 6px !important;
    font-size: 15px !important;
    color: #111827 !important;
    background: #ffffff !important;
    padding: 10px 12px !important;
}

#scbdkdealerexternalcalc input:focus {
    outline: none !important;
    border-color: #8B1A2B !important;
    box-shadow: 0 0 0 3px rgba(139,26,43,0.12) !important;
}

/* Sektion-labels (PRIS, UDBETALING, ANTAL MÅNEDER) */
#scbdkdealerexternalcalc label {
    font-size: 11px !important;
    font-weight: 700 !important;
    letter-spacing: 0.8px !important;
    color: #374151 !important;
    text-transform: uppercase !important;
}

/* Registreringsdato-label – dæmp den */
#scbdkdealerexternalcalc [class*="date"],
#scbdkdealerexternalcalc [class*="registration"] {
    font-size: 12px !important;
    color: #6b7280 !important;
    font-weight: 500 !important;
    text-transform: none !important;
    letter-spacing: 0 !important;
}

/* mdr. tekst */
#scbdkdealerexternalcalc [class*="mdr"],
#scbdkdealerexternalcalc [class*="month-label"] {
    color: #9ca3af !important;
    font-size: 12px !important;
}


/* SCB widget – hold det ved sin naturlige bredde (300px) */
#bilhandler-scb-wrapper {
    width: 300px;
}

.scb-loading {
    font-size: 13px;
    color: var(--bh-gray-500);
    padding: 20px 0;
    text-align: center;
}

/* Fjern overflow:hidden og fast højde – viser knap og Santander-logo korrekt */
#bilhandler-scb-wrapper #scbdkdealerexternalcalc.calculator {
    overflow: visible !important;
    min-height: 0 !important;
    height: auto !important;
}

/* Mobil: stak lodret */
@media (max-width: 768px) {
    .bilhandler-financing-section {
        flex-direction: column;
    }
    .bilhandler-financing-section-right,
    #bilhandler-scb-wrapper {
        width: 100%;
    }
}

.bilhandler-dealer-card h3,
.bilhandler-quick-specs h3,
.bilhandler-financing-card 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
   ========================================================================== */

/* Smallere desktop: 3 kolonner */
@media (max-width: 1280px) and (min-width: 1025px) {
    .bilhandler-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Tablet/mobil: sidebar skjules, mobil-bar vises */
@media (max-width: 1024px) {
    /* Ophæv sidebar-layout */
    .bilhandler-main-row {
        display: block;
    }

    .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-financing-card {
        order: 4;
        width: 100%;
    }

    /* Push content below fixed header */
    .bilhandler-wrapper {
        padding-top: 90px;
        padding-left: 16px;
        padding-right: 16px;
    }

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

    /* Filters: ophæv sticky og bliv til slide-in panel */
    .bilhandler-filters-wrapper {
        position: fixed;
        top: 0;
        bottom: 0;
        left: -320px;
        width: 300px;
        height: 100vh;
        height: 100dvh;
        max-height: none;
        background: var(--bh-white);
        z-index: 999;
        overflow-y: auto;
        overscroll-behavior: contain;
        transition: left 0.3s ease;
        padding-bottom: env(safe-area-inset-bottom, 16px);
    }

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

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

    .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;
    }

    /* Single bil – mobil tilpasning */
    .bilhandler-single {
        padding: 12px;
        padding-top: 100px;
    }

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

    .bilhandler-single-content {
        gap: 16px;
    }

    .bilhandler-quick-specs,
    .bilhandler-dealer-card {
        padding: 16px;
    }

    .bilhandler-specs-grid,
    .bilhandler-equipment,
    .bilhandler-description {
        margin-bottom: 16px;
    }
}
