/**
 * Vehizo Advanced CSS - KONSOLIDIERTE VERSION
 * Enthält alle Stile für Filter, Fahrzeugkarten, Layouts und andere erweiterte Funktionen.
 * Dies ist die alleinige Quelle der Wahrheit für das Design.
 * Version: 4.2.0 (Refactored)
 */

/* ==========================================================================
   FILTER SYSTEM - "Clean & Interactive" Design
   ========================================================================== */
.filter-section {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.05);
    margin-bottom: 32px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.filter-header {
    padding: 20px 24px;
    cursor: pointer;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    transition: background-color 0.2s ease;
}

.filter-header:hover {
    background-color: #f1f5f9;
}

.filter-header-static {
    cursor: default;
}

.filter-header-static:hover {
    background-color: #f8fafc;
}

.filter-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.filter-toggle-hint {
    font-size: 13px;
    color: #64748b;
    font-weight: 500;
}

.filter-title-text {
    font-size: 18px;
    font-weight: 600;
    color: #1e293b;
    margin: 0;
}

.filter-arrow {
    display: inline-block;
    transition: transform 0.3s ease;
    font-size: 10px;
}

.filter-content {
    padding: 24px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-out, padding 0.4s ease-out;
    padding-top: 0;
    padding-bottom: 0;
}

.filter-content.expanded {
    max-height: 1000px; /* Ausreichend großer Wert */
    padding: 24px;
}

.filter-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px 16px;
}

.filter-group {
    position: relative;
    background: #f8fafc;
    padding: 12px;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    transition: all 0.3s ease;
}

.filter-group:hover {
    border-color: #cbd5e1;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    transform: translateY(-1px);
}

.filter-label {
    position: absolute;
    top: 15px;
    left: 14px;
    font-size: 16px;
    color: #94a3b8;
    pointer-events: none;
    transition: all 0.2s ease-out;
    background-color: #ffffff;
    padding: 0 4px;
}

.filter-input,
.filter-select {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 500;
    background: #ffffff;
    color: #1e293b;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
}

.filter-input:hover,
.filter-select:hover {
    border-color: #cbd5e1;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.filter-input:focus,
.filter-select:focus {
    outline: none;
    border-color: var(--vehizo-primary, #3b82f6);
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.15);
    transform: translateY(-1px);
}

.filter-input:focus + .filter-label,
.filter-input:not(:placeholder-shown) + .filter-label,
.filter-select:focus + .filter-label, /* For focus */
.filter-select:valid + .filter-label { /* For when an option is selected */
    top: -8px;
    left: 10px;
    font-size: 12px;
    color: var(--vehizo-primary, #3b82f6);
}

/* Label above filter input/select */
.filter-label-top {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: #334155;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Range Slider Styles */
.slider-group {
    display: flex;
    flex-direction: column;
}

.filter-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 8px;
    border-radius: 10px;
    background: linear-gradient(to right, #e0f2fe 0%, #bae6fd 100%);
    outline: none;
    margin: 8px 0;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.filter-slider:hover {
    background: linear-gradient(to right, #bae6fd 0%, #7dd3fc 100%);
}

.filter-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 3px 8px rgba(59, 130, 246, 0.4);
    border: 3px solid #ffffff;
}

.filter-slider::-moz-range-thumb {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    cursor: pointer;
    border: 3px solid #ffffff;
    transition: all 0.3s ease;
    box-shadow: 0 3px 8px rgba(59, 130, 246, 0.4);
}

.filter-slider::-webkit-slider-thumb:hover {
    transform: scale(1.15);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.6);
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
}

.filter-slider::-moz-range-thumb:hover {
    transform: scale(1.15);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.6);
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
}

.filter-slider::-webkit-slider-thumb:active {
    transform: scale(1.05);
}

.filter-slider::-moz-range-thumb:active {
    transform: scale(1.05);
}

.slider-value {
    display: inline-block;
    font-size: 14px;
    font-weight: 700;
    color: #0f172a;
    text-align: center;
    margin-top: 6px;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    padding: 2px 8px;
    border-radius: 6px;
    min-width: 70px;
}

.filter-actions {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 16px;
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid #f1f5f9;
}

.filter-button.primary {
    background: var(--vehizo-primary, #3b82f6);
    color: white;
    font-weight: 600;
    padding: 12px 24px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.filter-button.primary:hover {
    background: var(--vehizo-button-hover, #2563eb);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.filter-button.secondary {
    background: none;
    border: none;
    color: #64748b;
    text-decoration: none;
    font-weight: 500;
    padding: 8px;
}

.filter-button.secondary:hover {
    color: #1e293b;
    text-decoration: underline;
}

/* ==========================================================================
   RESULTS SECTION
   ========================================================================== */
.results-section {
    background: white;
    border-radius: var(--vehizo-card-radius, 12px);
    padding: 1.5rem 2rem;
    margin-bottom: 2rem;
    box-shadow: var(--vehizo-shadow-small, 0 1px 3px rgba(0,0,0,0.05));
    border: 1px solid var(--vehizo-card-border, #e5e7eb);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.results-count {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--vehizo-text, #4b5563);
}

.results-count .count {
    color: var(--vehizo-primary, #3b82f6);
    font-weight: 700;
    font-size: 1.3rem;
}

.sort-container {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.sort-label {
    font-weight: 600;
    color: var(--vehizo-text-light, #6b7280);
    font-size: 0.9rem;
}

.sort-select {
    padding: 0.5rem 1rem;
    border: 1px solid var(--vehizo-card-border, #e5e7eb);
    border-radius: 8px;
    background: white;
    color: var(--vehizo-text, #4b5563);
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 160px;
}

.sort-select:focus {
    outline: none;
    border-color: var(--vehizo-primary, #3b82f6);
    box-shadow: 0 0 0 3px rgba(var(--vehizo-primary-rgb, 59, 130, 246), 0.1);
}

/* ==========================================================================
   MODERN VEHICLE CARDS - Professional & Clean
   ========================================================================== */

/* Vehicle Grid Container */
.vehizo-vehicles-grid {
    display: grid;
    grid-template-columns: repeat(var(--grid-columns, 3), 1fr);
    gap: 24px;
    margin: 24px 0;
}

/* Individual Vehicle Card */
.vehizo-vehicle-card {
    background: var(--vehizo-card-bg, #ffffff);
    border: 1px solid var(--vehizo-card-border, #e5e7eb);
    border-radius: var(--vehizo-card-radius, 12px);
    box-shadow: var(--vehizo-shadow-medium, 0 4px 16px rgba(0,0,0,0.08));
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.vehizo-vehicle-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    border-color: var(--vehizo-primary, #3b82f6);
}

/* Card Image Section */
.vehizo-vehicle-card .card-image {
    position: relative;
    width: 100%;
    height: 240px;
    overflow: hidden;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
}

.vehizo-vehicle-card .card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.vehizo-vehicle-card:hover .card-image img {
    transform: scale(1.08);
}

.vehizo-vehicle-card .no-image {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
    color: var(--vehizo-text-light, #6b7280);
    font-size: 0.9rem;
}

/* Price Badge */
.vehizo-vehicle-card .price-badge {
    position: absolute;
    top: 16px;
    right: 16px;
    background-color: var(--vehizo-primary, #3b82f6); /* Geändert zu solider Farbe */
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 700;
    font-size: calc(var(--vehizo-font-size, 16px) * 1.1);
    box-shadow: 0 4px 12px rgba(var(--vehizo-primary-rgb, 59, 130, 246), 0.4);
    z-index: 10;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* NEU: Status-Badge für "Verkauft" / "Reserviert" */
.vehizo-vehicle-card .status-badge {
    position: absolute;
    top: 16px;
    left: 50%;
    transform: translateX(-50%);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 700;
    font-size: calc(var(--vehizo-font-size, 16px) * 0.9);
    z-index: 10;
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(5px);
}

.vehizo-vehicle-card .status-badge.status-reserved {
    background-color: rgba(245, 158, 11, 0.85); /* Orange für "Reserviert" */
}

.vehizo-vehicle-card .status-badge.status-sold {
    background-color: rgba(220, 38, 38, 0.85); /* Rot für "Verkauft" */
}

/* NEU: Hot-Badge für "Besonders gefragt" */
.vehizo-vehicle-card .hot-badge {
    position: absolute;
    bottom: 10px;
    left: 16px;
    background: linear-gradient(45deg, #ff4b2b, #ff416c);
    color: white;
    padding: 5px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 700;
    z-index: 10;
}
/* Card Content Section */
.vehizo-vehicle-card .card-content {
    padding: 24px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.vehizo-vehicle-card .card-title {
    font-size: var(--vehizo-heading-size, 24px);
    font-weight: var(--vehizo-title-weight, 700);
    color: var(--vehizo-title, #1f2937);
    margin: 0 0 1rem 0;
    line-height: 1.3;
    transition: color 0.3s ease;
}

.vehizo-vehicle-card:hover .card-title {
    color: var(--vehizo-primary, #3b82f6);
}

/* Specifications List */
.vehizo-vehicle-card .specs-list {
    display: grid;
    gap: 0; /* No vertical gap, lines will separate */
    margin: 0 -24px 24px -24px; /* Extend to card edges */
    flex: 1;
}

.vehizo-vehicle-card .spec-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 24px;
    background: transparent;
    border-bottom: 1px solid var(--vehizo-card-border, #e5e7eb);
    transition: all 0.2s ease;
}

.vehizo-vehicle-card .spec-row:last-child {
    border-bottom: none;
}

.vehizo-vehicle-card:hover .spec-row {
    background-color: var(--vehizo-specs-bg, #f8fafc);
}

.vehizo-vehicle-card .spec-value {
    font-weight: 600;
    color: var(--vehizo-text, #4b5563);
    font-size: calc(var(--vehizo-font-size, 16px) * 0.9);
}

/* CTA & Park Buttons */
.vehizo-vehicle-card .cta-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: calc(var(--vehizo-spacing, 24px) * 0.75px) calc(var(--vehizo-spacing, 24px) * 1px);
    background: linear-gradient(135deg, var(--vehizo-primary, #3b82f6) 0%, var(--vehizo-button-hover, #2563eb) 100%);
    color: white;
    text-decoration: none;
    border-radius: 10px;
    font-weight: 600;
    font-size: calc(var(--vehizo-font-size, 16px) * 1rem);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    margin-bottom: calc(var(--vehizo-spacing, 24px) * 0.5px);
    box-shadow: 0 4px 12px rgba(var(--vehizo-primary-rgb, 59, 130, 246), 0.25);
}

.vehizo-vehicle-card .cta-button:hover {
    background: linear-gradient(135deg, var(--vehizo-button-hover, #2563eb) 0%, #1d4ed8 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(var(--vehizo-primary-rgb, 59, 130, 246), 0.4);
    color: white;
    text-decoration: none;
}
.vehizo-vehicle-card .cta-arrow {
    transition: transform 0.3s ease;
    font-size: 1.2em;
}

.vehizo-vehicle-card .cta-button:hover .cta-arrow {
    transform: translateX(4px);
}

.vehizo-vehicle-card .btn-park {
    width: 100%;
    margin-top: 0.75rem;
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: calc(var(--vehizo-font-size, 16px) * 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    box-shadow: 0 2px 8px rgba(251, 191, 36, 0.3);
}

.vehizo-vehicle-card .btn-park:hover {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(251, 191, 36, 0.4);
}


/* ==========================================================================
   LAYOUT VARIANTS
   ========================================================================== */

/* GRID Layout (Default) is handled by .vehizo-vehicles-grid */

/* SIDE BY SIDE Layout */
.layout-sideby .vehizo-vehicles-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
}

/* LIST Layout */
.layout-list .vehizo-vehicles-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

.layout-list .vehizo-vehicle-card {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 2rem;
    align-items: start;
}

.layout-list .vehizo-vehicle-card .card-image {
    height: 100%; /* Full height of the card content */
    min-height: 220px;
}

/* MASONRY Layout */
.layout-masonry .vehizo-vehicles-grid {
    display: block;
    columns: var(--grid-columns, 3);
    column-gap: 2rem;
}

.layout-masonry .vehizo-vehicle-card {
    break-inside: avoid;
    margin-bottom: 2rem;
    display: inline-block;
    width: 100%;
}

/* COMPACT Layout */
.layout-compact .vehizo-vehicles-grid {
    display: block;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--vehizo-card-border, #e5e7eb);
}

.layout-compact .vehizo-vehicle-card {
    display: grid;
    grid-template-columns: 100px 1fr auto;
    gap: 1.5rem;
    align-items: center;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--vehizo-card-border, #e5e7eb);
    margin: 0;
    border-radius: 0;
    box-shadow: none;
    height: auto;
}

.layout-compact .vehizo-vehicle-card:hover {
    transform: none;
    box-shadow: none;
    background: var(--vehizo-specs-bg, #f8fafc);
}

.layout-compact .vehizo-vehicle-card:last-child {
    border-bottom: none;
}

.layout-compact .vehizo-vehicle-card .card-image {
    height: 70px;
    border-radius: 6px;
}

.layout-compact .vehizo-vehicle-card .card-content {
    padding: 0;
    display: contents; /* Allows children to participate in the parent grid */
}

.layout-compact .vehizo-vehicle-card .card-title {
    font-size: 1.1rem;
    margin: 0;
}

.layout-compact .vehizo-vehicle-card .specs-list {
    display: none; /* Specs list is too complex for compact view */
}

.layout-compact .vehizo-vehicle-card .cta-button,
.layout-compact .vehizo-vehicle-card .btn-park {
    margin: 0;
    padding: 0.6rem 1rem;
    width: auto;
    font-size: 0.9rem;
}

.layout-compact .vehizo-vehicle-card .price-badge {
    position: static;
    font-size: 1.1rem;
}


/* ==========================================================================
   PAGINATION
   ========================================================================== */
.vehizo-pagination {
    margin-top: 3rem;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.vehizo-pagination a,
.vehizo-pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1rem;
    border: 1px solid var(--vehizo-card-border, #e5e7eb);
    background: white;
    color: var(--vehizo-text, #4b5563);
    text-decoration: none;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.3s ease;
    min-width: 44px;
    text-align: center;
}

.vehizo-pagination a:hover {
    background: #f8fafc;
    border-color: var(--vehizo-primary, #3b82f6);
    color: var(--vehizo-primary, #3b82f6);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.vehizo-pagination .current {
    background: linear-gradient(135deg, var(--vehizo-primary, #3b82f6) 0%, var(--vehizo-button-hover, #2563eb) 100%);
    color: white;
    border-color: transparent;
    font-weight: 700;
}

.vehizo-pagination .dots {
    background: transparent;
    border: none;
    color: var(--vehizo-text-light, #6b7280);
    cursor: default;
}

/* ==========================================================================
   NO RESULTS & LOADING STATES
   ========================================================================== */
.no-results {
    text-align: center;
    padding: 4rem 2rem;
    background: white;
    border-radius: var(--vehizo-card-radius, 12px);
    box-shadow: var(--vehizo-shadow-small, 0 1px 3px rgba(0,0,0,0.05));
    margin-top: 2rem;
}

.no-results-icon {
    font-size: 4rem;
    margin-bottom: 1.5rem;
    opacity: 0.6;
}

.no-results h3 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
    color: var(--vehizo-text, #4b5563);
    font-weight: 700;
}

.no-results p {
    font-size: 1.1rem;
    color: var(--vehizo-text-light, #6b7280);
    max-width: 500px;
    margin: 0 auto;
    line-height: 1.6;
}

/* ==========================================================================
   RESPONSIVE STYLES
   ========================================================================== */
@media (max-width: 1024px) {
    .layout-list .vehizo-vehicle-card {
        grid-template-columns: 250px 1fr;
    }
    .layout-masonry .vehizo-vehicles-grid {
        columns: 2;
    }
}

@media (max-width: 768px) {
    .filter-grid {
        grid-template-columns: 1fr;
    }
    .results-section {
        flex-direction: column;
        text-align: center;
    }
    .vehizo-vehicles-grid,
    .layout-sideby .vehizo-vehicles-grid {
        grid-template-columns: 1fr;
    }
    .layout-list .vehizo-vehicle-card {
        grid-template-columns: 1fr;
    }
    .layout-masonry .vehizo-vehicles-grid {
        columns: 1;
    }
    .layout-compact .vehizo-vehicle-card {
        grid-template-columns: 80px 1fr auto;
    }
}
/* Button-Hintergrund erzwingen */
.vehizo-vehicle-card .cta-button {
    background-image: none !important;
    background-color: var(--vehizo-primary) !important;
}

/* Hover-Effekt für den Button erzwingen */
.vehizo-vehicle-card .cta-button:hover {
    background-color: var(--vehizo-button-hover) !important;
}

/* Mögliche Glanz-Effekte komplett ausblenden */
.vehizo-vehicle-card .cta-button::before,
.vehizo-vehicle-card .cta-button::after {
    display: none !important;
}

.status-badge {
    position: absolute;
    top: 16px;
    left: 16px;
    background-color: #f97316;
    color: #fff;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 700;
    z-index: 10;
    text-transform: uppercase;
}

.status-badge.status-sold {
    background-color: #ef4444;
}
