/* Grundlayout / Typography */
body {
    margin: 0;
    font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: #f3f4f6;
    color: #111827;
}

/* Page-Container */
.page-shell {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem 3rem;
}

.page-header h1 {
    margin: 0 0 0.25rem;
    font-size: 1.8rem;
    font-weight: 600;
    letter-spacing: -0.02em;
}

.page-header p {
    margin: 0;
    color: #6b7280;
    font-size: 0.95rem;
}

/* Hinweis wenn keine Fahrzeuge da sind */
.vehicle-empty-hint {
    margin-top: 1.5rem;
    color: #6b7280;
    font-size: 0.95rem;
}

/* Fahrzeugliste */
.vehicle-list {
    margin-top: 1.75rem;
    display: flex;
    flex-direction: column;
    gap: 1.1rem;
}

/* Klickbare Kacheln */
.vehicle-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

/* einzelne Fahrzeug-Karte */
.vehicle-card {
    background: #ffffff;
    border-radius: 14px;
    padding: 1.05rem 1.4rem 1.2rem;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.12);
    border: 1px solid #e5e7eb;
    transition: box-shadow 0.15s ease, transform 0.1s ease, border-color 0.15s ease;
}

.vehicle-card-link:hover .vehicle-card {
    box-shadow: 0 18px 38px rgba(15, 23, 42, 0.22);
    transform: translateY(-1px);
    border-color: #d1d5db;
}

/* Kopfbereich der Karte (Titel + Status + Lieferdatum) */
.vehicle-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #e5e7eb;
    margin-bottom: 0.8rem;
}

.vehicle-header-main {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    min-width: 0;
}

.vehicle-title {
    margin: 0;
    font-size: 1.15rem;
    font-weight: 600;
    letter-spacing: -0.01em;
}

.vehicle-status-chip {
    display: inline-flex;
    align-items: center;
    padding: 0.1rem 0.55rem;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 500;
    color: #ffffff;
}

/* Statusfarben (Chip & Overlay verwenden dieselben Klassen) */
.badge-available  { background: #16a34a; }
.badge-reserved   { background: #f59e0b; }
.badge-building   { background: #3b82f6; }
.badge-sold       { background: #6b7280; }
.badge-none       { display: none; }

.vehicle-header-meta {
    text-align: right;
    min-width: 120px;
}

.vehicle-delivery-label {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #6b7280;
    margin-bottom: 0.1rem;
}

.vehicle-delivery {
    font-size: 0.95rem;
    color: #111827;
    font-weight: 500;
}

/* Body-Bereich: Bild + zwei Textspalten */
.vehicle-card-body {
    display: grid;
    grid-template-columns: auto minmax(0, 1.2fr) minmax(0, 1.2fr);
    gap: 1.25rem;
    align-items: flex-start;
}

/* Spalte 1: Bild */
.vehicle-col-image {
    max-width: 320px;
}

.vehicle-image-cover {
    position: relative;
    display: inline-flex;
    padding: 0.55rem;
    border-radius: 12px;
    background: linear-gradient(135deg, #f9fafb, #e5e7eb);
    border: 1px solid #e5e7eb;
}

.vehicle-image-cover img {
    display: block;
    max-width: 300px;
    max-height: 300px;
    width: auto;
    height: auto;
    object-fit: contain;
}

/* Platzhalter, wenn kein Bild vorhanden ist */
.vehicle-image-placeholder {
    width: 260px;
    height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    color: #9ca3af;
    background: repeating-linear-gradient(
        -45deg,
        #f3f4f6,
        #f3f4f6 6px,
        #e5e7eb 6px,
        #e5e7eb 12px
    );
    border-radius: 10px;
}

/* Status-Badge auf dem Bild */
.vehicle-badge-status {
    position: absolute;
    top: 0.4rem;
    left: 0.6rem;
    font-size: 0.75rem;
    padding: 0.18rem 0.5rem;
    border-radius: 999px;
    font-weight: 500;
    color: #ffffff;
    backdrop-filter: blur(4px);
    box-shadow: 0 4px 10px rgba(15,23,42,0.3);
}

/* Spalten 2 & 3: Fahrzeug / Aggregat */
.vehicle-col-vehicle,
.vehicle-col-aggregate {
    min-width: 0;
}

.vehicle-section-title {
    font-size: 1rem;
    font-weight: 800;
    color: #007bc4;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 0.35rem;
}

/* Kurztexte (direkt sichtbarer Teil) */
.vehicle-short {
    font-size: 0.93rem;
    line-height: 1.6;
    color: #111827;
    margin-bottom: 0.3rem;
}

.vehicle-short p {
    margin-top: 0;
    margin-bottom: 0.25rem;
}

.vehicle-short-empty {
    color: #9ca3af;
    font-style: italic;
}

/* Toggle-Zeile / Button */
.toggle-row {
    margin-top: 0.1rem;
}

.toggle-btn {
    border: none;
    background: none;
    padding: 0;
    margin: 0;
    font-size: 0.86rem;
    color: #2563eb;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.32rem;
}

.toggle-btn .chevron {
    display: inline-block;
    transition: transform 0.15s ease;
    font-size: 0.9rem;
}

.toggle-btn[aria-expanded="true"] .chevron {
    transform: rotate(180deg);
}

/* ausgeklappter Langtext-Block */
.vehicle-detail {
    margin-top: 0.35rem;
    padding: 0.5rem 0.7rem 0.6rem;
    border-radius: 10px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    font-size: 0.9rem;
    line-height: 1.6;
    color: #111827;
}

.vehicle-detail p {
    margin-top: 0;
    margin-bottom: 0.35rem;
}

/* Responsive Breakpoints */

/* Tablet: 2 Spalten */
@media (max-width: 900px) {
    .vehicle-card-body {
        grid-template-columns: auto minmax(0, 1fr);
        grid-template-rows: auto auto;
        grid-template-areas:
            "image vehicle"
            "image aggregat";
        column-gap: 1.25rem;
        row-gap: 0.9rem;
    }

    .vehicle-col-image     { grid-area: image; }
    .vehicle-col-vehicle   { grid-area: vehicle; }
    .vehicle-col-aggregate { grid-area: aggregat; }

    .vehicle-header-meta {
        text-align: left;
    }

    .vehicle-image-cover img {
        max-width: 260px;
        max-height: 260px;
    }
}

/* Mobile: alles untereinander */
@media (max-width: 640px) {
    .page-shell {
        padding: 1.4rem 0.75rem 2.2rem;
    }

    .vehicle-card {
        padding: 0.9rem 0.9rem 1rem;
        border-radius: 12px;
    }

    .vehicle-card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.45rem;
        margin-bottom: 0.7rem;
    }

    .vehicle-header-meta {
        text-align: left;
    }

    .vehicle-card-body {
        grid-template-columns: 1fr;
        grid-template-areas:
            "image"
            "vehicle"
            "aggregat";
        gap: 0.85rem;
    }

    .vehicle-col-image     { grid-area: image; }
    .vehicle-col-vehicle   { grid-area: vehicle; }
    .vehicle-col-aggregate { grid-area: aggregat; }

    .vehicle-col-image {
        max-width: 100%;
    }

    .vehicle-image-cover img {
        max-width: 100%;
        max-height: 240px;
    }
}
/* --- Galerie / Slider Erweiterung --- */

.vehicle-gallery {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.vehicle-gallery-main {
    display: flex;
    justify-content: flex-start;
}

/* Thumbnails unter dem Hauptbild */
.vehicle-gallery-thumbs {
    display: flex;
    flex-wrap: nowrap;
    gap: 0.4rem;
    margin-top: 0.2rem;
    overflow-x: auto;
    padding-bottom: 0.15rem;
}

.vehicle-thumb {
    border: 1px solid #d1d5db;
    background: #ffffff;
    border-radius: 6px;
    padding: 2px;
    cursor: pointer;
    flex: 0 0 auto;
    width: 56px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.05s ease;
}

.vehicle-thumb img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    display: block;
}

.vehicle-thumb:hover {
    border-color: #2563eb;
    box-shadow: 0 2px 6px rgba(15,23,42,0.15);
    transform: translateY(-1px);
}

.vehicle-thumb.is-active {
    border-color: #2563eb;
    box-shadow: 0 0 0 1px rgba(37,99,235,0.6);
}

/* --- Lightbox für Großansicht --- */

.vehicle-lightbox {
    position: fixed;
    inset: 0;
    z-index: 60;
}

.vehicle-lightbox-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.65);
}

.vehicle-lightbox-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    margin: 4vh auto;
    background: #111827;
    border-radius: 12px;
    padding: 0.75rem;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    box-shadow: 0 25px 60px rgba(0,0,0,0.65);
}

.vehicle-lightbox-close {
    border: none;
    background: #111827;
    color: #e5e7eb;
    font-size: 1rem;
    cursor: pointer;
    padding: 0.2rem 0.5rem;
    border-radius: 999px;
    margin-bottom: 0.4rem;
}

#vehicle-lightbox-image {
    max-width: 100%;
    max-height: 80vh;
    display: block;
    border-radius: 8px;
}
