/**
 * WPCarDealer – Theme Styles
 * @package WPCarDealer
 * @copyright Copyright (c) MS&SR
 */

:root {
    --wcd-primary: #0f766e;
    --wcd-primary-hover: #0d9488;
    --wcd-secondary: #1e293b;
    --wcd-border: #e2e8f0;
    --wcd-muted: #64748b;
    --wcd-bg: #f8fafc;
    --wcd-card-bg: #ffffff;
    --wcd-radius: 8px;
    --wcd-shadow: 0 1px 3px rgba(0,0,0,.08);
    --wcd-shadow-hover: 0 4px 12px rgba(0,0,0,.12);
}

/* Layout Grid/Flex */
.wcd-grid {
    display: grid;
    grid-gap: 25px;
    align-items: flex-start;
}

.wcd-grid.wcd-grid-stretch {
    align-items: stretch;
}

.wcd-grid-1 { grid-template-columns: minmax(0, 1fr); }
.wcd-grid-2 { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.wcd-grid-3 { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr); }
.wcd-grid-4 { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr); }
.wcd-grid-1-2 { grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); }
.wcd-grid-2-1 { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
.wcd-grid-3-1 { grid-template-columns: minmax(0, 3fr) minmax(0, 1fr); }
.wcd-grid-span-2 { grid-column: span 2; }

.wcd-grid-gap-sm { grid-gap: 10px; }
.wcd-grid-gap-xs { grid-gap: 5px; }
.wcd-grid-gap-lg { grid-gap: 40px; }

.wcd-flex {
    display: flex;
}

.wcd-flex.wcd-align-center,
.wcd-grid.wcd-align-center {
    align-items: center;
}

.wcd-flex.wcd-align-end,
.wcd-grid.wcd-align-end {
    align-items: end;
}

.wcd-flex.wcd-justify-end,
.wcd-grid.wcd-justify-end {
    justify-content: end;
}

/* Spacing */
.wcd-element-spacer {
    margin: 1rem 0;
}

.wcd-element-spacer-big {
    margin: 2rem 0;
}

.wcd-clearfix::after {
    content: "";
    display: table;
    clear: both;
}

/* Vehicle Grid – volle Breite auch in Themes mit schmalem Content-Container */
.wcd-content.wcd-shortcode-vehicles {
    width: 100%;
    max-width: 100%;
    min-width: 0;
}

.wcd-vehicles-wrapper {
    display: grid;
    gap: 1.5rem;
    width: 100%;
    max-width: 100%;
    min-width: 0;
}

/* Immer 3 Spalten auf Desktop (höhere Spezifität für beide WordPress-Umgebungen) */
.wcd-content .wcd-vehicles-wrapper.wcd-layout-grid,
.wcd-vehicles-wrapper.wcd-layout-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.wcd-layout-list .wcd-vehicle {
    margin-bottom: 1rem;
}

/* Vehicle Item – gleiche Höhe, Preis/Buttons unten bündig */
.wcd-vehicle {
    display: flex;
    flex-direction: column;
    background: var(--wcd-card-bg);
    border: 1px solid var(--wcd-border);
    border-radius: var(--wcd-radius);
    overflow: hidden;
    min-width: 0;
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.wcd-vehicle .wcd-vehicle-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.wcd-vehicle:hover {
    box-shadow: var(--wcd-shadow-hover);
    border-color: var(--wcd-primary);
}

/* Einheitliches Bildformat für Fahrzeugkarten (z. B. 4:3 – leicht breiter als hoch) */
.wcd-fitted-image {
    position: relative;
    width: 100%;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: var(--wcd-bg);
}

/* Fallback für ältere Browser ohne aspect-ratio */
@supports not (aspect-ratio: 4 / 3) {
    .wcd-fitted-image {
        padding-top: 75%; /* 4:3 */
        height: 0;
    }
}

.wcd-fitted-image a {
    position: absolute;
    inset: 0;
    display: block;
}

.wcd-fitted-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
}

/* Nur Plugin-Inhalt stylen – Theme-Menü/Layout unberührt */
.wcd-content {
    box-sizing: border-box;
}

.wcd-content *,
.wcd-content *::before,
.wcd-content *::after {
    box-sizing: inherit;
}

.wcd-fitted-image .wcd-no-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    color: #94a3b8;
    font-size: 0.875rem;
}

.wcd-no-image .dashicons {
    font-size: 2.5rem;
    width: 2.5rem;
    height: 2.5rem;
}

.wcd-vehicle-info {
    padding: 1rem;
}

.wcd-vehicle-title {
    margin: 0 0 0.5rem 0;
    font-size: 1.1rem;
    font-weight: 600;
}

.wcd-vehicle-title a {
    color: #333;
    text-decoration: none;
}

.wcd-vehicle-title a:hover {
    color: var(--wcd-primary);
}

.wcd-vehicle-subtitle {
    margin: 0 0 0.5rem 0;
    font-size: 0.9rem;
    color: #666;
    font-weight: 400;
}

.wcd-vehicle-details {
    margin: 0.5rem 0;
    font-size: 0.9rem;
    color: #666;
}

.wcd-detail-item {
    display: inline-block;
    margin-right: 1rem;
}

.wcd-vehicle-price {
    margin: 1rem 0 0 0;
    padding-top: 1rem;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--wcd-primary);
}

/* Preis + Buttons in der Karte nach unten drücken (gleichmäßige Höhe) */
.wcd-vehicle .wcd-vehicle-info .wcd-vehicle-price {
    margin-top: auto;
    padding-top: 1rem;
}

.wcd-vehicle .wcd-vehicle-cta {
    margin-top: 0.75rem;
}

.wcd-price-value {
    font-size: 1.5rem;
}

/* Buttons */
.wcd-button {
    display: inline-block;
    padding: 0.625rem 1.25rem;
    background: var(--wcd-primary);
    color: #fff;
    text-decoration: none;
    border-radius: var(--wcd-radius);
    transition: background 0.2s ease;
    border: none;
    cursor: pointer;
    font-weight: 600;
}

.wcd-button:hover {
    background: var(--wcd-primary-hover);
    color: #fff;
}

.wcd-button-light {
    background: var(--wcd-bg);
    color: var(--wcd-secondary);
    border: 1px solid var(--wcd-border);
}

.wcd-button-light:hover {
    background: var(--wcd-border);
    color: var(--wcd-secondary);
}

/* Single Vehicle */

/* Theme-Breadcrumb/Titelzeile ausblenden (z. B. „Startseite / PartlyIntegrated / Fahrzeugtitel“) */
body.single-vehicle .breadcrumb,
body.single-vehicle .breadcrumbs,
body.single-vehicle [class*="breadcrumb"],
body.single-vehicle .entry-header,
body.single-vehicle .entry-header:has(.entry-title),
body.single-vehicle .page-header,
body.single-vehicle .post-header,
body.single-vehicle .content-header,
body.single-vehicle .title-section,
body.single-vehicle [class*="page-title"],
body.single-vehicle [class*="breadcrumb-wrap"],
body.wcd-vehicle-page .breadcrumb,
body.wcd-vehicle-page .breadcrumbs,
body.wcd-vehicle-page [class*="breadcrumb"],
body.wcd-vehicle-page .entry-header,
body.wcd-vehicle-page .entry-header:has(.entry-title),
body.wcd-vehicle-page .page-header,
body.wcd-vehicle-page .post-header,
body.wcd-vehicle-page .content-header,
body.wcd-vehicle-page .title-section,
body.wcd-vehicle-page [class*="page-title"],
body.wcd-vehicle-page [class*="breadcrumb-wrap"] {
    display: none !important;
}

.wcd-single-vehicle {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1.5rem 1rem;
}

.wcd-vehicle-header {
    margin-bottom: 2rem;
}

.wcd-align-right {
    text-align: right;
}

.wcd-section {
    margin: 1.5rem 0;
    padding: 1.25rem;
    background: var(--wcd-card-bg);
    border: 1px solid var(--wcd-border);
    border-radius: var(--wcd-radius);
    box-shadow: var(--wcd-shadow);
}

.wcd-section-header {
    margin: 0 0 1rem 0;
    font-size: 1.3rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.wcd-icon {
    font-size: 1.2rem;
}

.wcd-toggle {
    color: var(--wcd-primary);
    text-decoration: none;
    cursor: pointer;
}

.wcd-toggle:hover {
    text-decoration: underline;
}

.wcd-hidden {
    display: none;
}

/* Vehicle Images */
.wcd-vehicle-images-wrapper {
    margin-bottom: 2rem;
}

.wcd-vehicle-images {
    display: grid;
    gap: 1rem;
}

.wcd-vehicle-image {
    width: 100%;
    border-radius: 4px;
    overflow: hidden;
}

.wcd-vehicle-image img {
    width: 100%;
    height: auto;
    display: block;
}

.wcd-teaser-section {
    width: 100%;
    height: 400px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* Vehicle Details */
.wcd-vehicle-specifics dl {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 0.5rem 1rem;
    margin: 0;
}

.wcd-vehicle-specifics dt {
    font-weight: 600;
    color: #666;
}

.wcd-vehicle-specifics dd {
    margin: 0;
    color: #333;
}

/* Fahrzeugdaten rechts unter dem Preis (Einzelansicht) */
.wcd-vehicle-sticky-box {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.wcd-sticky-specifics {
    margin-top: 0.5rem;
}

.wcd-sticky-specifics .wcd-vehicle-specifics {
    padding: 1rem;
    background: var(--wcd-card-bg, #fff);
    border: 1px solid var(--wcd-border, #e0e0e0);
    border-radius: var(--wcd-radius, 6px);
    box-shadow: var(--wcd-shadow, 0 1px 3px rgba(0,0,0,0.06));
}

.wcd-sticky-specifics .wcd-vehicle-specifics h3 {
    margin: 0 0 0.75rem 0;
    font-size: 1.1rem;
    font-weight: 600;
}

/* Features */
.wcd-vehicle-features ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 0.5rem;
}

.wcd-vehicle-features li {
    padding: 0.5rem;
    background: #f5f5f5;
    border-radius: 4px;
}

/* CO₂-/Energieampel: EU-Energieeffizienz-Label (vertikaler A–G-Balken) */
.wcd-ampel-wrap {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    vertical-align: middle;
}
/* Vertikaler Balken A (oben) bis G (unten) – wie das offizielle EU-Label */
.wcd-ampel-eu {
    display: inline-flex;
    flex-direction: column;
    width: 22px;
    height: 56px;
    border-radius: 4px;
    overflow: hidden;
    border: 1px solid rgba(0,0,0,.15);
    box-shadow: 0 1px 3px rgba(0,0,0,.2);
}
.wcd-ampel-eu span {
    flex: 1;
    min-height: 6px;
    transition: filter 0.2s, box-shadow 0.2s;
}
.wcd-ampel-eu span.wcd-ampel-segment--active {
    box-shadow: inset 0 0 0 2px #fff, inset 0 0 6px rgba(0,0,0,.25);
    filter: brightness(1.15);
}
.wcd-ampel-eu span.wcd-ampel-s0 { background: #00a651; } /* A */
.wcd-ampel-eu span.wcd-ampel-s1 { background: #50b848; } /* B */
.wcd-ampel-eu span.wcd-ampel-s2 { background: #bed630; } /* C */
.wcd-ampel-eu span.wcd-ampel-s3 { background: #fecd05; } /* D */
.wcd-ampel-eu span.wcd-ampel-s4 { background: #f7971d; } /* E */
.wcd-ampel-eu span.wcd-ampel-s5 { background: #e84d3b; } /* F */
.wcd-ampel-eu span.wcd-ampel-s6 { background: #b71c1c; } /* G */
/* Buchstabe rechts neben dem Balken */
.wcd-ampel-letter {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.6em;
    height: 1.6em;
    border-radius: 4px;
    font-weight: 700;
    font-size: 0.95em;
    color: #fff;
    line-height: 1;
    box-shadow: 0 1px 2px rgba(0,0,0,.2);
}
.wcd-ampel-letter.wcd-ampel--a { background: #00a651; }
.wcd-ampel-letter.wcd-ampel--b { background: #50b848; }
.wcd-ampel-letter.wcd-ampel--c { background: #bed630; color: #1e293b; }
.wcd-ampel-letter.wcd-ampel--d { background: #fecd05; color: #1e293b; }
.wcd-ampel-letter.wcd-ampel--e { background: #f7971d; color: #1e293b; }
.wcd-ampel-letter.wcd-ampel--f { background: #e84d3b; }
.wcd-ampel-letter.wcd-ampel--g { background: #b71c1c; }
.wcd-ampel-letter--empty {
    background: #94a3b8 !important;
    color: #fff !important;
    font-weight: 600;
}
.wcd-ampel-wrap--no-data .wcd-ampel-eu span {
    opacity: 0.7;
}
.wcd-keyfacts .wcd-ampel-wrap .wcd-keyfacts-label {
    margin-right: 0;
}

/* Shortcode-Karten Keyfacts – hohe Spezifität */
.wcd-content.wcd-shortcode-vehicles .wcd-vehicle .wcd-keyfacts--shortcode,
.wcd-vehicle .wcd-keyfacts--shortcode {
    list-style: none;
    padding: 0;
    margin: 0 0 0.75rem 0;
    display: grid !important;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem 0.75rem;
}
.wcd-content.wcd-shortcode-vehicles .wcd-vehicle .wcd-keyfacts--shortcode .wcd-keyfact,
.wcd-vehicle .wcd-keyfacts--shortcode .wcd-keyfact {
    display: flex !important;
    align-items: center;
    gap: 0.5rem;
    margin: 0;
    font-size: 0.9rem;
}
.wcd-keyfact-icon {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    font-size: 18px;
    line-height: 1;
    color: var(--wcd-muted, #64748b);
}
.wcd-keyfact-value {
    min-width: 0;
}

/* Verbrauch / CO2 / CO2-Klasse Block (Shortcode) */
.wcd-content.wcd-shortcode-vehicles .wcd-energy-block,
.wcd-vehicle .wcd-energy-block {
    margin: 0.75rem 0;
    padding: 0.5rem 0 0;
    border-top: 1px solid var(--wcd-border);
    font-size: 0.875rem;
}
.wcd-energy-line {
    margin: 0.25rem 0;
}
.wcd-energy-label {
    font-weight: 600;
    color: var(--wcd-secondary);
}
.wcd-energy-line--ampel {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

/* CO2-Klasse: horizontaler Balken (grün → rot) + Buchstabe in grauem Kasten */
.wcd-ampel-wrap--horizontal {
    display: inline-flex;
    align-items: stretch;
    gap: 0;
}
.wcd-ampel-eu--horizontal {
    display: inline-flex;
    flex-direction: row;
    width: 100%;
    min-width: 80px;
    max-width: 140px;
    height: 20px;
    border-radius: 4px 0 0 4px;
    overflow: hidden;
    border: 1px solid rgba(0,0,0,.15);
    border-right: none;
    box-shadow: 0 1px 2px rgba(0,0,0,.1);
}
.wcd-ampel-eu--horizontal span {
    flex: 1;
    min-width: 4px;
    transition: filter 0.2s;
}
.wcd-ampel-letter--box {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    height: 20px;
    padding: 0 6px;
    border-radius: 0 4px 4px 0;
    border: 1px solid rgba(0,0,0,.15);
    font-weight: 700;
    font-size: 0.95em;
    line-height: 1;
    box-shadow: 0 1px 2px rgba(0,0,0,.1);
}
.wcd-ampel-wrap--horizontal .wcd-ampel-letter--box {
    background: #e2e8f0 !important;
    color: #1e293b !important;
    border-left: none;
}
.wcd-ampel-wrap--horizontal .wcd-ampel-letter--empty {
    background: #94a3b8 !important;
    color: #fff !important;
}
.wcd-ampel-eu--horizontal span.wcd-ampel-segment--active {
    box-shadow: inset 0 0 0 2px rgba(255,255,255,.5);
    filter: brightness(1.1);
}

/* Einheitliche Highlights-Zeile unter dem Fahrzeugtitel (Liste/Grid) */
.wcd-vehicle-highlights-line {
    margin: 0.25rem 0 0.5rem;
    font-size: 0.875em;
    color: var(--wcd-muted, #64748b);
    line-height: 1.35;
}

/* Highlights */
.wcd-highlights {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1rem;
}

.wcd-highlights li {
    padding: 1rem;
    background: #fff3cd;
    border-left: 4px solid #ffc107;
    border-radius: 4px;
}

/* Filter Form */
.wcd-filter-form {
    padding: 1.5rem;
    background: #f9f9f9;
    border-radius: 4px;
    margin-bottom: 2rem;
}

.wcd-filter-field {
    margin-bottom: 1rem;
}

.wcd-filter-field label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.wcd-filter-field input,
.wcd-filter-field select {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.wcd-filter-submit {
    margin-top: 1rem;
}

/* Contact Form */
.wcd-contact-form-wrapper {
    padding: 1.5rem;
    background: #f9f9f9;
    border-radius: 4px;
}

.wcd-form-fields {
    display: grid;
    gap: 1rem;
}

.wcd-field {
    margin-bottom: 1rem;
}

.wcd-field label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.wcd-input-text,
.wcd-input-select,
.wcd-textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
}

.wcd-textarea {
    min-height: 120px;
    resize: vertical;
}

.wcd-form-submit-wrapper {
    margin-top: 1.5rem;
}

.wcd-form-success {
    padding: 1rem;
    background: #d4edda;
    border: 1px solid #c3e6cb;
    border-radius: 4px;
    color: #155724;
}

/* Archive */
#wcd-archive-main {
    float: left;
    width: 70%;
    padding-right: 2rem;
}

#wcd-archive-sidebar {
    float: right;
    width: 28%;
}

.wcd-vehicle-count-wrapper {
    margin: 1rem 0;
    font-size: 1.1rem;
}

.wcd-vehicle-count {
    font-weight: 700;
    color: var(--wcd-primary);
}

/* Lightbox */
#wcd_lightbox {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000000;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
}

#wcd_lightbox .image_wrapper {
    position: relative;
    max-width: 80%;
    width: 80%;
    max-height: 80%;
    height: 80%;
    display: flex;
    align-items: center;
    justify-content: center;
}

#wcd_lightbox_image {
    box-shadow: 0px 0px 30px 0px rgba(0, 0, 0, 1);
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

#wcd_lightbox .wcd-icon {
    font-size: 40px;
    cursor: pointer;
    color: #fff;
    width: 40px;
    height: 40px;
}

#wcd_lightbox .wcd-icon:hover {
    color: #fff;
}

#wcd_lightbox .arrow_left {
    margin-right: 20px;
}

#wcd_lightbox .arrow_right {
    margin-left: 20px;
}

#wcd_lightbox .close {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 10;
}

/* Compare Table */
#wcd-vehicle-compare {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
}

#wcd-compare-table {
    width: auto;
    table-layout: fixed;
}

#wcd-compare-table td:first-child {
    padding-right: 40px;
}

#wcd-compare-table td {
    padding: 8px;
    vertical-align: center;
    min-width: 150px;
    max-width: 300px;
}

#wcd-compare-table h1,
#wcd-compare-table h2,
#wcd-compare-table h3,
#wcd-compare-table h4 {
    margin: 0;
    padding: 0;
    font-size: 120%;
}

#wcd-compare-table td.header {
    background: none;
    border-bottom-style: solid;
    border-bottom-width: 2px;
    padding: 20px 5px;
    font-size: 120%;
    font-weight: bold;
}

#wcd-compare-table tr.emission {
    font-size: 90%;
}

#wcd-compare-table tr.images img {
    max-width: 100%;
}

/* AJAX Loader */
.wcd-ajax-loader {
    display: none;
    position: relative;
    width: 28px;
    height: 28px;
}

.wcd-ajax-loader.active {
    display: inline-block;
}

.wcd-ajax-loader .loading {
    border: 3px solid var(--wcd-border);
    border-top-color: var(--wcd-primary);
    position: absolute;
    z-index: 100;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 50%;
    animation: wcd-rotation 750ms infinite linear;
}

@keyframes wcd-rotation {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* Vehicle Images Slideshow */
#wcd_vehicle_images_wrapper {
    position: relative;
}

#wcd_vehicle_single_image_wrapper {
    position: relative;
}

#wcd_vehicle_single_image_wrapper > a.lightbox-opener {
    display: none;
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    justify-content: center;
    align-items: center;
}

#wcd_vehicle_single_image_wrapper:hover > a.lightbox-opener {
    display: flex;
}

#wcd_vehicle_single_image_wrapper .wcd-icon.open {
    font-size: 50px;
    color: white;
}

#wcd_thumbnails_wrapper {
    position: relative;
    margin-top: 1rem;
}

.wcd-thumbnails {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 10px;
}

.wcd-image-thumbnail {
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.3s ease;
    border: 2px solid transparent;
    border-radius: 4px;
    overflow: hidden;
}

.wcd-image-thumbnail:hover,
.wcd-image-thumbnail.active {
    opacity: 1;
    border-color: var(--wcd-primary);
}

.wcd-image-thumbnail img {
    width: 100%;
    height: auto;
    display: block;
}

/* Responsive */
@media (max-width: 1400px) {
    .wcd-grid.wcd-grid-4 {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr);
    }
}

@media (max-width: 998px) {
    .wcd-grid.wcd-grid-3,
    .wcd-grid.wcd-grid-4 {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    }
}

/* Archive Layout Selector */
#wcd_archive_layout_selector {
    display: inline-block;
}

#wcd_archive_layout_selector .button {
    display: inline-block;
    cursor: pointer;
    margin-left: 10px;
}

#wcd_archive_layout_selector .button.active .line {
    background: var(--wcd-primary);
}

#wcd_archive_layout_selector .list {
    display: flex;
    width: 26px;
    height: 26px;
    justify-content: space-between;
    flex-direction: column;
}

#wcd_archive_layout_selector .list .line {
    background: var(--wcd-secondary);
    height: 6px;
}

#wcd_archive_layout_selector .grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    grid-gap: 4px;
}

#wcd_archive_layout_selector .grid .line {
    background: var(--wcd-secondary);
    width: 6px;
    height: 6px;
}

/* Order Bar */
.wcd-order-bar a.wcd-set-order.current::before {
    display: inline-block;
    content: "";
    position: relative;
    top: 2px;
    margin-right: 8px;
    padding: 4px;
    border: solid var(--wcd-primary);
    border-width: 0 2px 2px 0;
    transform: rotate(-135deg);
}

.wcd-order-bar[data-order=desc] a.wcd-set-order.current::before {
    top: -2px;
    transform: rotate(45deg);
}

.wcd-order-bar.horizontal a.wcd-set-order {
    margin-right: 20px;
}

.wcd-order-bar.vertical a.wcd-set-order {
    display: block;
}

/* Active Filters */
.wcd-filterform-active-filters .active-filter {
    display: inline-block;
    margin-right: 20px;
    padding: 3px 10px;
    font-size: smaller;
    background: var(--wcd-primary);
    color: #fff;
    border: 1px solid var(--wcd-border);
    box-shadow: inset 0 1px 1px #f0f0f0, 0 3px 6px -5px #bbb;
    border-radius: 4px;
}

.wcd-filterform-active-filters .active-filter .reset {
    cursor: pointer;
    margin-left: 5px;
}

@media (max-width: 998px) {
    .wcd-content .wcd-vehicles-wrapper.wcd-layout-grid,
    .wcd-vehicles-wrapper.wcd-layout-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 768px) {
    .wcd-grid {
        display: block;
    }
    
    .wcd-grid > * {
        margin-bottom: 1rem;
    }
    
    .wcd-grid-2,
    .wcd-grid-3 {
        grid-template-columns: 1fr;
    }
    
    .wcd-grid-span-2 {
        grid-column: span 1;
    }
    
    #wcd-archive-main,
    #wcd-archive-sidebar {
        float: none;
        width: 100%;
        padding: 0;
    }
    
    .wcd-content .wcd-vehicles-wrapper.wcd-layout-grid,
    .wcd-vehicles-wrapper.wcd-layout-grid {
        grid-template-columns: 1fr;
    }
    
    /* Mobil: Fahrzeugbild groß anzeigen – Hauptbild sichtbar, dann Thumbnails */
    #wcd_vehicle_images_wrapper .wcd-vehicle-images {
        display: flex;
        flex-direction: column;
        gap: 1rem;
    }
    #wcd_vehicle_single_image_wrapper {
        display: block !important;
        order: 1;
        min-height: 220px;
        width: 100%;
    }
    #wcd_vehicle_single_image_wrapper img#wcd_vehicle_single_image {
        width: 100%;
        height: auto;
        max-height: 70vh;
        object-fit: contain;
        display: block !important;
    }
    #wcd_vehicle_images_wrapper #wcd_thumbnails_wrapper {
        order: 2;
        margin-top: 0;
    }
    
    #wcd_lightbox .image_wrapper {
        max-width: 90%;
    }
    
    #wcd_lightbox .arrow_left {
        left: 10px;
        margin: 0;
    }
    
    #wcd_lightbox .arrow_right {
        right: 10px;
        margin: 0;
    }
}

/* BDK Finanzierung: Aufklapp-Block, mobiloptimiert */
.wcd-bdk-block {
    max-width: 100%;
    margin: 1rem 0;
}

.wcd-bdk-trigger {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 280px;
    margin: 0;
    padding: 0.75rem 1.25rem;
    font-size: 1rem;
    font-weight: 600;
    color: var(--wcd-card-bg, #fff);
    background: var(--wcd-primary, #0f766e);
    border: none;
    border-radius: var(--wcd-radius, 8px);
    cursor: pointer;
    transition: background 0.2s ease;
}

.wcd-bdk-trigger:hover {
    background: var(--wcd-primary-hover, #0d9488);
}

.wcd-bdk-trigger:focus {
    outline: 2px solid var(--wcd-primary, #0f766e);
    outline-offset: 2px;
}

.wcd-bdk-notice {
    max-width: 280px;
    margin: 0.5rem 0 0;
    font-size: 0.75rem;
    line-height: 1.35;
    color: var(--wcd-muted, #64748b);
}

.wcd-bdk-inner {
    display: none;
    max-width: 100%;
    margin-top: 1rem;
    overflow-x: auto;
    box-sizing: border-box;
}

.wcd-bdk-block.wcd-bdk-open .wcd-bdk-inner {
    display: block;
}

.wcd-bdk-inner #bdk-leadstrecke,
.wcd-bdk-inner input,
.wcd-bdk-inner select,
.wcd-bdk-inner iframe {
    max-width: 100%;
    box-sizing: border-box;
}

@media (max-width: 480px) {
    .wcd-bdk-trigger {
        max-width: 100%;
        padding: 0.65rem 1rem;
        font-size: 0.9375rem;
    }
    .wcd-bdk-notice {
        max-width: 100%;
    }
}

