/* ---------------------------------------------------------------------
   06_DATABASE.CSS
   Styles für das Fahrzeughandel-Dashboard (Mockup)
   --------------------------------------------------------------------- */

.showroom-section {
    padding-top: 120px; /* Offset for header */
    padding-bottom: 4rem;
    background-color: var(--primary-dark);
    min-height: 100vh;
}

.showroom-header {
    margin-bottom: 3rem;
}

.dashboard-container {
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 2rem;
}

.showroom-header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.showroom-header p {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

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

/* ---------------------------------------------------------------------
   FILTER SIDEBAR
   --------------------------------------------------------------------- */
.filter-sidebar {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--card-border);
    border-radius: var(--border-radius-lg);
    padding: 1.5rem;
    backdrop-filter: blur(10px);
    position: sticky;
    top: 100px; /* Sticky positioning below header */
}

.filter-group {
    margin-bottom: 1.5rem;
}

.filter-group:last-child {
    margin-bottom: 0;
}

.filter-group label {
    display: block;
    color: var(--text-primary);
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.filter-select, .filter-input {
    width: 100%;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--text-primary);
    padding: 0.75rem 1rem;
    border-radius: var(--border-radius-md);
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    appearance: none;
    outline: none;
    transition: var(--transition-smooth);
}

.filter-select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 16px;
    cursor: pointer;
}

.filter-select:focus, .filter-input:focus {
    border-color: var(--accent-cyan);
    box-shadow: 0 0 0 2px rgba(6, 182, 212, 0.25);
}

/* Custom Select Faux-UI */
.custom-select-wrapper {
    position: relative;
    width: 100%;
}
.custom-select-trigger {
    width: 100%;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--text-primary);
    padding: 0.75rem 1rem;
    border-radius: var(--border-radius-md);
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: var(--transition-smooth);
}
.custom-select-trigger:hover, .custom-select-trigger.active {
    border-color: var(--accent-cyan);
    box-shadow: 0 0 0 2px rgba(6, 182, 212, 0.25);
}
.custom-select-options {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #0f1115;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--border-radius-md);
    margin-top: 0.25rem;
    z-index: 50;
    max-height: 250px;
    overflow-y: auto;
    display: none;
    box-shadow: 0 10px 15px -3px rgba(0,0,0,0.5);
}
.custom-select-options.open {
    display: block;
}
.custom-option {
    padding: 0.75rem 1rem;
    cursor: pointer;
    color: var(--text-primary);
    transition: background 0.1s;
    font-size: 0.95rem;
}
.custom-option:hover, .custom-option.selected {
    background: var(--accent-cyan);
    color: white;
}

.filter-row {
    display: flex;
    gap: 0.5rem;
}

.filter-actions {
    margin-top: 2rem;
    display: flex;
    gap: 1rem;
    flex-direction: column;
}

/* ---------------------------------------------------------------------
   VEHICLE LIST (DASHBOARD)
   --------------------------------------------------------------------- */
.vehicle-grid {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.vehicle-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--card-border);
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    transition: var(--transition-smooth);
    display: flex;
    flex-direction: row; /* Horizontal layout for list view */
    align-items: stretch;
}

.vehicle-card:hover {
    transform: translateY(-5px);
    border-color: rgba(6, 182, 212, 0.4);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.vehicle-image-wrapper {
    position: relative;
    width: 450px; /* Fixed width for the image part */
    min-width: 450px;
    overflow: hidden;
}

.vehicle-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition-smooth);
}

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

.vehicle-badge {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background: var(--accent-cyan);
    color: var(--primary-dark);
    font-size: 0.75rem;
    font-weight: 800;
    padding: 0.25rem 0.75rem;
    border-radius: 100px;
    z-index: 2;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.vehicle-content {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.vehicle-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.vehicle-subtitle {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.vehicle-features {
    display: grid;
    grid-template-columns: repeat(4, 1fr); /* 4 features in a row */
    gap: 1rem;
    margin-bottom: 2rem;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-primary);
    font-size: 0.95rem;
}

.feature-item svg {
    width: 20px;
    height: 20px;
    color: var(--accent-cyan);
}

.vehicle-footer {
    margin-top: auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1.5rem;
    border-top: 1px solid var(--card-border);
}

.vehicle-price {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary-brand-light);
}

/* ---------------------------------------------------------------------
   RESPONSIVE
   --------------------------------------------------------------------- */
@media (max-width: 1200px) {
    .vehicle-features {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 1024px) {
    .showroom-layout {
        grid-template-columns: 1fr;
    }

    #mobile-filter-toggle {
        display: flex !important;
        justify-content: center;
        gap: 10px;
        align-items: center;
        font-family: 'Montserrat', sans-serif;
        font-weight: 600;
        text-transform: uppercase;
        letter-spacing: 1px;
    }

    .filter-sidebar {
        position: static;
        margin-bottom: 2rem;
        display: none;
    }
    
    .filter-sidebar.show {
        display: block;
    }
    
    .vehicle-card {
        flex-direction: column;
    }
    
    .vehicle-image-wrapper {
        width: 100%;
        min-width: 100%;
        aspect-ratio: 16 / 9;
    }
}

/* ==========================================================================
   MOBILE OVERRIDES (Safe Append)
   ========================================================================== */
@media (max-width: 991px) {
    /* Title Fix */
    .showroom-header h1 {
        font-size: 2rem;
        word-wrap: break-word;
        hyphens: auto;
        line-height: 1.2;
    }
    
    .dashboard-container {
        padding: 0 1rem;
    }
    
    /* Filter Sidebar Animation */
    .filter-sidebar {
        display: none; /* Already in previous media query, but making sure */
    }
    .filter-sidebar.show-mobile-filter {
        display: block;
        animation: slideDown 0.3s ease-out forwards;
    }
    
    @keyframes slideDown {
        from { opacity: 0; transform: translateY(-10px); }
        to { opacity: 1; transform: translateY(0); }
    }
}