/* Stützpunkthändler — Karten mit Herstellerlogo und Nachweis-Link */

.dealer-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    border: 1px solid var(--hairline);
    background: var(--ink-2);
    position: relative;
    transition: transform .2s ease, background .2s ease, box-shadow .2s ease;
    /*
     * Die Karte liegt von Anfang an auf eigener Ebene. Entsteht die Ebene erst
     * beim Hover, zeichnet der Browser die Logos mitten im Anheben neu, und sie zittern.
     */
    transform: translateZ(0);
    backface-visibility: hidden;
}

.light-section .dealer-card {
    border-color: var(--hairline-ink);
    background: transparent;
}

/*
 * Hover hängt am unbewegten Listeneintrag. Am Kartenrand würde die
 * angehobene Karte dem Zeiger sonst entwischen und zurückspringen.
 */
.dealer-item:hover .dealer-card,
.dealer-card:focus-within {
    transform: translate3d(0, -4px, 0);
    box-shadow: 0 18px 45px rgba(10, 22, 30, .18);
}

.light-section .dealer-item:hover .dealer-card,
.light-section .dealer-card:focus-within {
    background: #fff;
    box-shadow: 0 18px 45px rgba(10, 22, 30, .10);
}

/*
 * Herstellerlogos kommen in allen Formaten und Farben. Eine weiße Fläche
 * mit fester Proportion hält sie gleich groß und lässt die Markenfarben stehen.
 */
.dealer-logo {
    aspect-ratio: 16 / 9;
    background: #fff;
    display: grid;
    place-items: center;
    padding: clamp(1.25rem, 5vw, 2rem);
    border-bottom: 1px solid var(--hairline-ink);
}

.dealer-logo img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
}

/* Platzhalter, solange kein Logo hinterlegt ist */
.dealer-wordmark {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: clamp(1.6rem, 3vw, 2.1rem);
    letter-spacing: -.01em;
    color: var(--ink);
    text-align: center;
    overflow-wrap: anywhere;
}

.dealer-body {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: clamp(1.5rem, 6vw, 2rem) clamp(1.35rem, 5.5vw, 1.8rem);
}

.dealer-scope {
    font-family: var(--font-body);
    font-weight: 600;
    font-size: var(--fs-label);
    letter-spacing: .16em;
    text-transform: uppercase;
    color: var(--signal-on-dark);
    /* Lange Einzelwörter in Versalien sprengen sonst die schmale Karte */
    overflow-wrap: anywhere;
    hyphens: auto;
}

.light-section .dealer-scope {
    color: var(--signal-on-light);
}

.dealer-card h3 {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.45rem;
    margin-block: .7rem .6rem;
}

.dealer-body > p {
    color: var(--steel);
    font-size: var(--fs-small);
    margin: 0 0 1.4rem;
}

.light-section .dealer-body > p {
    color: var(--muted-on-light);
}

/* Status sitzt unten, damit er in allen Karten einer Zeile auf gleicher Höhe steht */
.dealer-status {
    margin-top: auto;
    padding-top: 1.4rem;
    border-top: 1px solid var(--hairline);
    display: flex;
    align-items: center;
    gap: .9rem;
}

.light-section .dealer-status {
    border-top-color: var(--hairline-ink);
}

.dealer-status p {
    margin: 0;
    font-weight: 600;
    font-size: var(--fs-small);
    line-height: 1.35;
}

.dealer-status .dot {
    display: inline-block;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--signal);
    margin-right: .45rem;
    vertical-align: .15em;
}

.dealer-since {
    font-weight: 400;
    color: var(--steel);
}

.light-section .dealer-since {
    color: var(--muted-on-light);
}

.dealer-seal {
    width: auto;
    height: 3.25rem;
    flex-shrink: 0;
}

.dealer-link {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    min-height: var(--tap-min);
    margin-top: .6rem;
    font-size: var(--fs-small);
    font-weight: 600;
    text-decoration: none;
    color: inherit;
}

/* Die ganze Karte ist Trefferfläche für den Link */
.dealer-link::after {
    content: "";
    position: absolute;
    inset: 0;
}

.dealer-link .arrow {
    color: var(--signal-on-dark);
    transition: translate .2s ease;
}

.light-section .dealer-link .arrow {
    color: var(--signal-on-light);
}

.dealer-card:hover .dealer-link .arrow,
.dealer-link:focus-visible .arrow {
    translate: 4px 0;
}

.dealer-link:focus-visible {
    outline: none;
}

.dealer-card:has(.dealer-link:focus-visible) {
    outline: 2px solid var(--signal-on-dark);
    outline-offset: 3px;
}

.light-section .dealer-card:has(.dealer-link:focus-visible) {
    outline-color: var(--signal-on-light);
}
