/**
 * 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;
    margin: 0 !important;
}

/* 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;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.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;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

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

/* Einzel-Fahrzeugbereich sicher innerhalb des Inhaltsbereichs halten,
   egal was das Theme macht */
body.single-vehicle .wcd-single-vehicle {
    box-sizing: border-box;
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: hidden;
}
body.single-vehicle .wcd-single-vehicle * {
    max-width: 100%;
}

/* Zurück-Button oben links – fancy */
.wcd-single-back {
    margin-bottom: 1.5rem;
}

.wcd-back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1rem 0.6rem 0.85rem;
    background: var(--wcd-card-bg, #fff);
    color: var(--wcd-primary);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    border: 1px solid var(--wcd-border, #e2e8f0);
    border-radius: 999px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    transition: color 0.2s ease, background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease;
}

.wcd-back-link:hover {
    color: var(--wcd-primary-hover);
    background: var(--wcd-bg, #f8fafc);
    border-color: var(--wcd-primary);
    box-shadow: 0 2px 8px rgba(15, 118, 110, 0.15);
    transform: translateX(-2px);
}

.wcd-back-icon {
    display: inline-block;
    width: 0.45em;
    height: 0.45em;
    border-left: 2.5px solid currentColor;
    border-bottom: 2.5px solid currentColor;
    transform: rotate(-135deg);
    flex-shrink: 0;
}

.wcd-back-link:hover .wcd-back-icon {
    transform: rotate(-135deg) translateX(-2px);
}

/* Fußzeile Fahrzeugdetail (Irrtümer / Zwischenverkauf vorbehalten) */
.wcd-single-footer {
    margin-top: 2.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--wcd-border, #e2e8f0);
    text-align: center;
}

.wcd-single-footer-title {
    margin: 0 0 0.5rem 0;
    font-size: 0.95rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: var(--wcd-secondary, #1e293b);
}

.wcd-single-disclaimer {
    margin: 0;
    font-size: 0.85rem;
    color: var(--wcd-muted, #64748b);
}

.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;
    margin: 0 !important;
}

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

/* Fahrzeugdetails rechts (Einzelansicht): Preis → Fahrzeugdaten → Kontaktdaten */
.wcd-vehicle-sticky-box {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

/* Preis-Karte – aufbereitet */
.wcd-sticky-price-card {
    padding: 1.5rem;
    background: linear-gradient(180deg, var(--wcd-card-bg, #fff) 0%, var(--wcd-bg, #f8fafc) 100%);
    border: 1px solid var(--wcd-border, #e2e8f0);
    border-radius: var(--wcd-radius);
    box-shadow: var(--wcd-shadow, 0 1px 3px rgba(0,0,0,0.06));
}

.wcd-vehicle-price--detail {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.wcd-vehicle-price--detail .wcd-price-line {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.5rem;
}

.wcd-vehicle-price--detail .wcd-price-label {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--wcd-muted, #64748b);
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.wcd-vehicle-price--detail .wcd-price-line--brutto {
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--wcd-border, #e2e8f0);
}

.wcd-vehicle-price--detail .wcd-price-line--brutto .wcd-price-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--wcd-primary);
    letter-spacing: -0.02em;
}

.wcd-vehicle-price--detail .wcd-price-line--netto .wcd-price-value {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--wcd-secondary);
}

.wcd-vehicle-price--detail .wcd-price-vat {
    margin: 0.25rem 0 0 0;
    font-size: 0.85rem;
    color: var(--wcd-muted, #64748b);
}

.wcd-sticky-actions {
    margin-top: 1.25rem;
}

/* Fahrzeugdaten (unter dem Preis) */
.wcd-sticky-specifics .wcd-vehicle-specifics {
    padding: 1.25rem;
    background: var(--wcd-card-bg, #fff);
    border: 1px solid var(--wcd-border, #e2e8f0);
    border-radius: var(--wcd-radius);
    box-shadow: var(--wcd-shadow, 0 1px 3px rgba(0,0,0,0.06));
}

.wcd-sticky-specifics .wcd-vehicle-specifics h3 {
    margin: 0 0 1rem 0;
    font-size: 1rem;
    font-weight: 600;
    color: var(--wcd-secondary);
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

/* Kontaktdaten (unter den Fahrzeugdetails) */
.wcd-sticky-dealer {
    padding: 0;
    background: transparent;
    border: none;
    box-shadow: none;
}

.wcd-dealer-card {
    padding: 1.5rem;
    background: linear-gradient(180deg, var(--wcd-bg, #f8fafc) 0%, var(--wcd-card-bg, #fff) 100%);
    border: 1px solid var(--wcd-border, #e2e8f0);
    border-radius: var(--wcd-radius);
    box-shadow: var(--wcd-shadow, 0 1px 3px rgba(0,0,0,0.06));
}

.wcd-dealer-card__title {
    margin: 0 0 1rem 0;
    font-size: 1rem;
    font-weight: 600;
    color: var(--wcd-secondary);
    text-transform: uppercase;
    letter-spacing: 0.02em;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--wcd-border, #e2e8f0);
}

.wcd-dealer-card .wcd-dealer-name {
    margin: 0 0 0.5rem 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--wcd-secondary);
}

.wcd-dealer-card .wcd-dealer-address {
    margin: 0 0 1rem 0;
    font-size: 0.95rem;
    color: var(--wcd-muted, #64748b);
    line-height: 1.5;
}

.wcd-dealer-card .wcd-dealer-phone-wrap,
.wcd-dealer-card .wcd-dealer-inquiry-wrap {
    margin: 0 0 0.75rem 0;
}

.wcd-dealer-card .wcd-dealer-inquiry-wrap:last-child {
    margin-bottom: 0;
}

.wcd-dealer-card .wcd-button-phone {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.65rem 1.15rem;
    background: #c62828;
    color: #fff !important;
    text-decoration: none;
    border-radius: var(--wcd-radius);
    font-weight: 600;
    font-size: 1rem;
    transition: background 0.2s ease, transform 0.15s ease;
}

.wcd-dealer-card .wcd-button-phone:hover {
    background: #b71c1c;
    color: #fff !important;
    transform: translateY(-1px);
}

.wcd-dealer-card .wcd-button-inquiry {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.65rem 1.25rem;
    background: var(--wcd-primary);
    color: #fff !important;
    text-decoration: none;
    border-radius: var(--wcd-radius);
    font-weight: 600;
    transition: background 0.2s ease, transform 0.15s ease;
}

.wcd-dealer-card .wcd-button-inquiry:hover {
    background: var(--wcd-primary-hover);
    color: #fff !important;
    transform: translateY(-1px);
}

/* Kontaktdaten über dem Kontaktformular (ohne doppelte Section-Optik) */
.wcd-contact-data-section {
    margin: 1.5rem 0;
    padding: 0;
    border: none;
    background: none;
    box-shadow: none;
}

.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;
    word-wrap: break-word;
    overflow-wrap: break-word;
    max-width: 100%;
}

/* 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 – Fahrzeugbörse */
.wcd-filter-form {
    padding: 1.5rem 1.5rem 1.75rem;
    background: #f5f5f5;
    border-radius: 0;
    margin: 0 0 2rem;
    border-top: 1px solid #e5e7eb;
    border-bottom: 1px solid #e5e7eb;
}

.wcd-filter-form--compact {
    width: 100%;
}

/* Top-Icons (Angebote, PKW, Nutzfahrzeuge, Wohnmobile) */
.wcd-filter-topcats {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    margin: 0 0 1rem;
}

.wcd-filter-topcat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
    opacity: 0.4;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.wcd-filter-topcat .dashicons {
    font-size: 1.8rem;
}

.wcd-filter-topcat--active {
    opacity: 1;
    color: #c8102e;
}

.wcd-filter-topcat-label {
    font-weight: 600;
}

/* Grid der Eingabefelder */
.wcd-filter-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.75rem 1rem;
    margin-top: 0.75rem;
}

.wcd-filter-cell {
    display: flex;
    flex-direction: column;
}

.wcd-filter-label {
    font-weight: 600;
    margin-bottom: 0.3rem;
}

.wcd-filter-input,
.wcd-filter-form input[type="number"],
.wcd-filter-form input[type="text"],
.wcd-filter-form select {
    width: 100%;
    height: 3rem;
    padding: 0 0.85rem;
    border-radius: 3px;
    border: 1px solid #d1d5db;
    background-color: #ffffff;
    font-size: 0.95rem;
    line-height: 1.4;
    box-sizing: border-box;
}

.wcd-filter-input:focus,
.wcd-filter-form select:focus {
    outline: none;
    border-color: #c8102e;
    box-shadow: 0 0 0 1px #c8102e33;
}

.wcd-filter-sep {
    color: #6b7280;
}

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

.wcd-filter-row--condition {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.wcd-filter-checkboxes {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.35rem 1rem;
    font-size: 0.9rem;
}

.wcd-filter-checkbox {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.wcd-filter-checkbox input[type="checkbox"] {
    margin: 0;
}

.wcd-filter-bottom {
    margin-top: 1.5rem;
}

.wcd-filter-submit-btn {
    display: block;
    width: 100%;
    border: none;
    background: #c8102e;
    color: #ffffff;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 0.95rem 1.5rem;
    cursor: pointer;
}

.wcd-filter-submit-btn:hover {
    background: #a10d25;
}

.wcd-filter-submit-text {
    display: block;
    text-align: center;
}

@media (max-width: 1024px) {
    .wcd-filter-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .wcd-filter-checkboxes {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .wcd-filter-grid {
        grid-template-columns: minmax(0, 1fr);
    }
    .wcd-filter-topcats {
        gap: 1rem;
    }
}

/* Contact Form */
.wcd-contact-form-wrapper {
    padding: 1.5rem;
    background: var(--wcd-bg, #f8fafc);
    border: 1px solid var(--wcd-border, #e2e8f0);
    border-radius: var(--wcd-radius, 8px);
}

.wcd-form-context-wrapper {
    margin-bottom: 1.25rem;
    padding: 1rem;
    background: #fff;
    border-radius: 4px;
}

.wcd-form-context-label {
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.wcd-form-context-html img {
    max-width: 100%;
    height: auto;
}

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

.wcd-turnstile-wrap {
    margin: 1rem 0;
}

.wcd-field {
    margin-bottom: 1rem;
    position: relative;
    z-index: 1;
}

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

.wcd-field label {
    cursor: pointer;
}

.wcd-field select.wcd-input-select,
.wcd-field .wcd-input-select {
    cursor: pointer;
    appearance: auto;
    min-height: 2.5rem;
}

/* Anrede und andere Selects auf Mobil: größerer Touch-Bereich, zuverlässig bedienbar */
@media (max-width: 768px), (pointer: coarse) {
    .wcd-contact-form-wrapper .wcd-field select.wcd-input-select,
    .wcd-contact-form-wrapper .wcd-field .wcd-input-select {
        min-height: 2.75rem;
        padding: 0.75rem 2rem 0.75rem 0.75rem;
        font-size: 1rem;
        -webkit-appearance: menulist;
        appearance: menulist;
    }
}

.wcd-input-text,
.wcd-input-select,
.wcd-textarea,
.wcd-contact-form-wrapper .wcd-input {
    width: 100%;
    max-width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--wcd-border, #e2e8f0);
    border-radius: 4px;
    font-size: 1rem;
    box-sizing: border-box;
}

.wcd-form-privacy,
.wcd-form-captcha {
    margin-top: 1rem;
}

.wcd-checkbox-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem 1.5rem;
}

.wcd-checkbox-group .wcd-checkbox-label {
    font-weight: normal;
}

.wcd-required {
    color: var(--wcd-primary, #0f766e);
}

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

.wcd-form-error {
    padding: 1rem;
    margin-bottom: 1rem;
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    border-radius: 4px;
    color: #721c24;
}

/* Archive */
#wcd-archive-main {
    float: none;
    width: 100%;
    padding-right: 0;
}

.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(3, minmax(0, 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;
}

/* Thumbnails: immer 3 pro Reihe, auch mobil,
   ohne dass der Container breiter als der Inhalt wird */

/* 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 – Breite hart auf Viewport begrenzen, nichts verschiebt sich */
.wcd-bdk-block {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    margin: 1rem 0;
    overflow: hidden;
    box-sizing: border-box;
}

/* Nach Klick: eingebetteter Rechner darf Seite nicht verbreitern (max. Viewport) */
body.single-vehicle .wcd-bdk-block,
body.single-vehicle .wcd-section.wcd-bdk-section {
    max-width: 100vw !important;
    overflow: hidden !important;
}

.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;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    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 {
    min-width: 0;
    max-width: 100%;
    overflow-x: auto;
}

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

.wcd-bdk-inner iframe {
    max-width: 100% !important;
    width: 100% !important;
    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%;
    }
}

/* ========== Mobilansicht Single-Fahrzeug: nichts darf die Seite verbreitern ========== */
@media (max-width: 768px) {
    html body.single-vehicle,
    html body.wcd-vehicle-page {
        overflow-x: hidden !important;
        max-width: 100vw !important;
    }
    html:has(body.single-vehicle),
    html:has(body.wcd-vehicle-page) {
        overflow-x: hidden !important;
    }
    body.single-vehicle .wcd-single-vehicle,
    body.wcd-vehicle-page .wcd-single-vehicle {
        width: 100% !important;
        max-width: calc(100vw - 2rem) !important; /* 1rem Abstand links/rechts, nichts klebt am Rand */
        min-width: 0 !important;
        box-sizing: border-box !important;
        padding-left: 1rem !important;
        padding-right: 1rem !important;
        margin-left: auto !important;
        margin-right: auto !important;
        overflow-x: hidden !important;
    }
    body.single-vehicle .wcd-single-vehicle > *,
    body.wcd-vehicle-page .wcd-single-vehicle > * {
        min-width: 0 !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }
    body.single-vehicle .wcd-single-main,
    body.wcd-vehicle-page .wcd-single-main,
    body.single-vehicle .wcd-vehicle-images-wrapper,
    body.wcd-vehicle-page .wcd-vehicle-images-wrapper,
    body.single-vehicle #wcd_thumbnails_wrapper,
    body.wcd-vehicle-page #wcd_thumbnails_wrapper,
    body.single-vehicle .wcd-thumbnails,
    body.wcd-vehicle-page .wcd-thumbnails {
        min-width: 0 !important;
        max-width: 100% !important;
    }
    body.single-vehicle .wcd-section,
    body.wcd-vehicle-page .wcd-section {
        min-width: 0 !important;
        max-width: 100% !important;
    }
    body.single-vehicle .wcd-bdk-block,
    body.wcd-vehicle-page .wcd-bdk-block,
    body.single-vehicle .wcd-bdk-inner,
    body.wcd-vehicle-page .wcd-bdk-inner {
        max-width: 100% !important;
        min-width: 0 !important;
    }
}

