/* Autohaus-Bundle – Fahrzeugmarkt. Farben/Schriften über CSS-Variablen des Themes überschreibbar. */
:root {
    --ah-navy: #0A2036;
    --ah-blue: #013F7E;
    --ah-cyan: #1BADD5;
    --ah-surface: #F4F6F9;
    --ah-line: #E3E8EE;
    --ah-input: #CFD8E2;
    --ah-text: #0A2036;
    --ah-muted: #4A5868;
    --ah-radius: 14px;
    --ah-font-head: Archivo, system-ui, sans-serif;
}

/* ---------- Grundbausteine ---------- */
.ahv-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 18px; border-radius: 10px; border: 1px solid transparent; font-family: inherit; font-weight: 600; font-size: 15px; line-height: 1.2; text-decoration: none; cursor: pointer; transition: background .15s, border-color .15s; }
.ahv-btn--primary { background: var(--ah-blue); color: #fff; }
.ahv-btn--primary:hover { background: var(--ah-navy); color: #fff; }
.ahv-btn--ghost { background: #fff; border-color: var(--ah-input); color: var(--ah-text); }
.ahv-btn--ghost:hover { border-color: var(--ah-blue); color: var(--ah-blue); }
.ahv-btn--light { background: var(--ah-cyan); color: var(--ah-navy); }
.ahv-link { color: var(--ah-blue); font-weight: 600; text-decoration: none; }
.ahv-link:hover { text-decoration: underline; }
.ahv-note { font-size: 12px; color: var(--ah-muted); margin: 4px 0 0; line-height: 1.45; }
.ahv-warning { font-size: 13px; font-weight: 700; margin: 6px 0 0; }
.ahv-legal { font-size: 12px; color: var(--ah-muted); line-height: 1.5; margin-top: 16px; }
.ahv-badge { display: inline-block; min-width: 20px; padding: 0 6px; border-radius: 999px; background: var(--ah-blue); color: #fff; font-size: 12px; text-align: center; }

/* ---------- Suche ---------- */
.ahv-search { display: flex; flex-direction: column; gap: 12px; }
.ahv-search--sidebar { background: #fff; border: 1px solid var(--ah-line); border-radius: 16px; padding: 16px; }
.ahv-search--compact { background: #fff; border-radius: 16px; padding: 18px 20px; box-shadow: 0 20px 48px rgba(10, 32, 54, .18); gap: 12px; }
.ahv-search__fields { display: flex; flex-direction: column; gap: 10px; }
.ahv-search__row { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px; align-items: stretch; }
.ahv-search__submit { width: 100%; height: 48px; font-size: 16px; }
.ahv-search--sidebar .ahv-search__submit { position: sticky; bottom: 12px; box-shadow: 0 8px 20px rgba(1, 63, 126, .25); }
.ahv-search__reset { align-self: center; font-size: 13px; color: var(--ah-muted); text-decoration: underline; }
.ahv-search__reset:hover { color: var(--ah-blue); }
.ahv-segment { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.ahv-search--compact .ahv-segment { display: inline-grid; align-self: flex-start; min-width: 260px; }
.ahv-segment label { position: relative; }
.ahv-segment input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.ahv-segment span { display: block; padding: 8px 16px; border-radius: 8px; font-weight: 600; font-size: 14px; color: var(--ah-muted); text-align: center; background: #fff; border: 1px solid var(--ah-line); }
.ahv-segment input:checked + span { background: rgba(27, 173, 213, .14); border-color: transparent; color: var(--ah-blue); }
.ahv-segment input:focus-visible + span { outline: 2px solid var(--ah-blue); outline-offset: 2px; }
.ahv-f { position: relative; min-width: 0; }
.ahv-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ahv-pair[hidden], .ahv-mode[hidden], .ahv-note[hidden] { display: none !important; }

/* Felder: Platzhalter statt Beschriftung */
.ahv-select, .ahv-input, .ahv-ms__toggle {
    width: 100%; height: 44px; border: 1px solid var(--ah-input); border-radius: 8px; padding: 0 34px 0 12px; background-color: #fff; color: var(--ah-text);
    font: 500 14px var(--ah-font, inherit); box-sizing: border-box; text-align: left;
}
.ahv-input { padding-right: 12px; }
.ahv-input::placeholder { color: var(--ah-text); opacity: 1; }
.ahv-select, .ahv-ms__toggle {
    -webkit-appearance: none; appearance: none; cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%230A2036' stroke-width='2'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 12px center;
}
.ahv-select:focus, .ahv-input:focus, .ahv-ms__toggle:focus-visible { outline: none; border-color: var(--ah-blue); box-shadow: 0 0 0 3px rgba(27, 173, 213, .25); }
.ahv-select:has(option:checked:not([value=""])), .ahv-ms__toggle.has-value { border-color: var(--ah-blue); background-color: rgba(27, 173, 213, .06); }

/* Mehrfachauswahl */
.ahv-ms { position: relative; }
.ahv-ms-native.is-enhanced { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.ahv-ms-native:not(.is-enhanced) { width: 100%; min-height: 44px; border: 1px solid var(--ah-input); border-radius: 8px; font: inherit; }
.ahv-ms__toggle { display: flex; align-items: center; gap: 8px; }
.ahv-ms__text { flex: 1; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.ahv-ms__badge { flex: 0 0 auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--ah-blue); color: #fff; font-size: 12px; font-weight: 700; display: inline-grid; place-items: center; }
.ahv-ms.is-open .ahv-ms__toggle { border-color: var(--ah-blue); box-shadow: 0 0 0 3px rgba(27, 173, 213, .2); }
.ahv-ms.is-disabled .ahv-ms__toggle { color: var(--ah-muted); background-color: var(--ah-surface); cursor: not-allowed; }
.ahv-ms__panel {
    position: absolute; left: 0; top: calc(100% + 4px); z-index: 30;
    width: max(100%, 260px); max-width: min(340px, calc(100vw - 32px));
    background: #fff; border: 1px solid var(--ah-blue); border-radius: 10px;
    box-shadow: 0 16px 32px rgba(10, 32, 54, .18); display: flex; flex-direction: column;
}
/* rechte Hälfte eines Paares: Liste nach links öffnen */
.ahv-pair > .ahv-f:last-child .ahv-ms__panel { left: auto; right: 0; }
.ahv-ms__panel[hidden] { display: none; }
.ahv-ms__list { max-height: 260px; overflow-y: auto; padding: 6px; overscroll-behavior: contain; }
.ahv-ms__group { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ah-muted); padding: 10px 8px 4px; }
.ahv-ms__item { display: flex; align-items: center; gap: 10px; min-height: 36px; padding: 4px 8px; border-radius: 6px; cursor: pointer; font-size: 14px; }
.ahv-ms__item:hover { background: var(--ah-surface); }
.ahv-ms__item input { width: 18px; height: 18px; margin: 0; accent-color: var(--ah-blue); flex: 0 0 auto; }
.ahv-ms__label { flex: 1; }
.ahv-ms__count { font-size: 12px; color: var(--ah-muted); }
.ahv-ms__count::before { content: "["; } .ahv-ms__count::after { content: "]"; }
.ahv-ms__item.is-empty { opacity: .4; cursor: default; }
.ahv-ms__empty { padding: 10px; font-size: 13px; color: var(--ah-muted); margin: 0; }
.ahv-ms__foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; padding: 8px; border-top: 1px solid var(--ah-line); }
.ahv-ms__foot > button { flex: 1 1 auto; }
.ahv-ms__reset, .ahv-ms__apply { min-height: 34px; padding: 0 14px; border-radius: 6px; font: 600 13px var(--ah-font, inherit); cursor: pointer; }
.ahv-ms__reset { border: 1px solid var(--ah-input); background: #fff; color: var(--ah-text); }
.ahv-ms__apply { border: 0; background: var(--ah-navy); color: #fff; }
.ahv-ms__apply:hover { background: var(--ah-blue); }
@media (max-width: 1023px) { .ahv-ms__list { max-height: 50vh; } }
.ahv-search [data-ahv-mode][hidden] { display: none !important; }
.ahv-search.is-loading [data-ahv-total] { opacity: .5; }

/* ---------- Liste ---------- */
.ahv-toolbar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 20px; }
.ahv-toolbar__chips { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.ahv-toolbar__total { font-size: 17px; margin-right: 6px; }
.ahv-chip { display: inline-flex; align-items: center; gap: 6px; background: #E2ECF6; color: var(--ah-blue); font-size: 13px; font-weight: 600; padding: 6px 10px; border-radius: 999px; text-decoration: none; }
.ahv-chip:hover { background: var(--ah-blue); color: #fff; }
.ahv-chip--reset { background: transparent; text-decoration: underline; }
.ahv-toolbar__sort { display: flex; align-items: center; gap: 10px; }
.ahv-toolbar__sort label { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--ah-muted); }
.ahv-toolbar__sort select { height: 40px; border: 1px solid var(--ah-input); border-radius: 10px; padding: 0 10px; font-family: inherit; font-weight: 500; font-size: 14px; background: #fff; }
.ahv-viewswitch { display: flex; border: 1px solid var(--ah-input); border-radius: 10px; overflow: hidden; }
.ahv-viewswitch button { width: 40px; height: 40px; border: 0; background: #fff; color: var(--ah-text); cursor: pointer; display: grid; place-items: center; }
.ahv-viewswitch button.is-active { background: var(--ah-blue); color: #fff; }

.ahv-grid { display: grid; gap: 20px; }
.ahv-grid--grid { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.ahv-grid--list { grid-template-columns: 1fr; }

.ahv-card { background: #fff; border: 1px solid var(--ah-line); border-radius: var(--ah-radius); overflow: hidden; display: flex; flex-direction: column; transition: box-shadow .2s, transform .2s; }
.ahv-card:hover { box-shadow: 0 12px 32px rgba(10, 32, 54, .12); transform: translateY(-2px); }
.ahv-card__media { position: relative; display: block; aspect-ratio: 4 / 3; background: #E6EBF1; }
.ahv-card__media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ahv-card__noimg { display: grid; place-items: center; height: 100%; color: var(--ah-muted); font-size: 14px; }
.ahv-card__count { position: absolute; right: 10px; bottom: 10px; background: rgba(10, 32, 54, .75); color: #fff; font-size: 12px; padding: 2px 8px; border-radius: 6px; }
.ahv-card__body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.ahv-card__title { font: 700 18px/1.25 var(--ah-font-head); margin: 0; }
.ahv-card__title a { color: inherit; text-decoration: none; }
.ahv-card__title a::after { content: ''; position: absolute; inset: 0; } /* ganze Karte klickbar */
.ahv-card { position: relative; }
.ahv-card__variant { margin: -6px 0 0; font-size: 13px; color: var(--ah-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ahv-card__facts { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; font-size: 12px; color: #33475B; }
.ahv-card__facts li { background: #F0F3F7; padding: 3px 8px; border-radius: 6px; }
.ahv-card__price { margin-top: auto; padding-top: 12px; border-top: 1px solid #EDF1F5; display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.ahv-card__price strong { font: 800 24px var(--ah-font-head); }
.ahv-card__price span { font-size: 12px; color: var(--ah-muted); }
.ahv-card__rate { margin: 0; font-size: 13px; }
.ahv-card__env { margin: 0; font-size: 11px; color: #5B6878; line-height: 1.4; }
.ahv-card__rating { position: relative; z-index: 1; min-height: 28px; }
.ahv-card--list { flex-direction: row; flex-wrap: wrap; }
.ahv-card--list .ahv-card__media { flex: 0 0 280px; aspect-ratio: auto; min-height: 190px; }
.ahv-card--list .ahv-card__body { flex: 1 1 320px; }
.ahv-card__more { position: relative; z-index: 1; align-self: flex-start; }

.ahv-empty { background: #fff; border: 1px solid var(--ah-line); border-radius: 16px; padding: 32px; display: flex; flex-direction: column; gap: 16px; align-items: flex-start; }
.ahv-pagination { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 28px 0 8px; }
.ahv-pagination a, .ahv-pagination span { min-width: 44px; height: 44px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--ah-input); background: #fff; color: var(--ah-text); display: inline-flex; align-items: center; justify-content: center; font-weight: 600; text-decoration: none; box-sizing: border-box; }
.ahv-pagination a.is-current { background: var(--ah-blue); border-color: var(--ah-blue); color: #fff; }
.ahv-pagination span { border: 0; background: none; }
.ahv-footnote { font-size: 12px; color: #5B6878; margin-top: 24px; }
.ahv-more { margin-top: 20px; }

/* ---------- Detail ---------- */
.ahv-detail { display: flex; flex-direction: column; gap: 24px; }
.ahv-detail__crumbs { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; font-size: 14px; color: var(--ah-muted); }
.ahv-detail__top { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(300px, 1fr); gap: 28px; align-items: start; }
.ahv-gallery { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.ahv-gallery__stage { position: relative; aspect-ratio: 4 / 3; border-radius: 16px; overflow: hidden; background: #DCE3EB; }
.ahv-gallery__track, .ahv-lightbox__track {
    list-style: none; margin: 0; padding: 0; display: flex; height: 100%;
    overflow-x: auto; overflow-y: hidden; scroll-snap-type: x mandatory; overscroll-behavior-x: contain;
    scrollbar-width: none; -webkit-overflow-scrolling: touch;
}
.ahv-gallery__track::-webkit-scrollbar, .ahv-lightbox__track::-webkit-scrollbar { display: none; }
.ahv-gallery__track:focus-visible { outline: 3px solid var(--ah-cyan); outline-offset: -3px; }
.ahv-gallery__track.is-dragging, .ahv-lightbox__track.is-dragging { scroll-snap-type: none; cursor: grabbing; user-select: none; }
.ahv-gallery__slide, .ahv-lightbox__slide { flex: 0 0 100%; scroll-snap-align: start; scroll-snap-stop: always; height: 100%; }
.ahv-gallery__open { display: block; width: 100%; height: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; }
@media (hover: hover) and (pointer: fine) { .ahv-gallery__track { cursor: grab; } }
.ahv-gallery__open img { width: 100%; height: 100%; object-fit: cover; display: block; -webkit-user-drag: none; }
.ahv-gallery__nav, .ahv-lightbox__nav {
    position: absolute; top: 50%; transform: translateY(-50%); width: 48px; height: 48px; border-radius: 999px; border: 0;
    background: rgba(255, 255, 255, .92); color: var(--ah-navy); font-size: 28px; line-height: 1; cursor: pointer;
    box-shadow: 0 4px 12px rgba(10, 32, 54, .15); transition: opacity .2s, background .2s; z-index: 2;
}
.ahv-gallery__nav:hover, .ahv-lightbox__nav:hover { background: #fff; }
.ahv-gallery__nav--prev, .ahv-lightbox__nav--prev { left: 14px; }
.ahv-gallery__nav--next, .ahv-lightbox__nav--next { right: 14px; }
@media (hover: none) { .ahv-gallery__nav { display: none; } }
.ahv-gallery__counter { position: absolute; right: 14px; bottom: 14px; background: rgba(10, 32, 54, .75); color: #fff; font-size: 13px; font-weight: 600; padding: 4px 12px; border-radius: 999px; pointer-events: none; }
.ahv-gallery__zoom { position: absolute; right: 14px; top: 14px; width: 40px; height: 40px; border: 0; border-radius: 10px; background: rgba(10, 32, 54, .6); color: #fff; font-size: 20px; cursor: pointer; z-index: 2; }
.ahv-gallery__zoom:hover { background: rgba(10, 32, 54, .85); }
.ahv-gallery__thumbs { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: thin; }
.ahv-gallery__thumb { flex: 0 0 104px; height: 78px; padding: 0; border: 2px solid transparent; border-radius: 10px; overflow: hidden; cursor: pointer; background: #E6EBF1; opacity: .75; transition: opacity .15s, border-color .15s; }
.ahv-gallery__thumb:hover { opacity: 1; }
.ahv-gallery__thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ahv-gallery__thumb.is-active { border-color: var(--ah-blue); opacity: 1; }
@media (max-width: 767px) {
    .ahv-gallery__thumb { flex-basis: 72px; height: 54px; }
    .ahv-gallery__stage { border-radius: 12px; }
}

/* Vollbild */
.ahv-lightbox { width: 100vw; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: rgba(6, 18, 31, .96); color: #fff; overflow: hidden; }
.ahv-lightbox::backdrop { background: rgba(6, 18, 31, .96); }
.ahv-lightbox__track { touch-action: pan-x pinch-zoom; }
.ahv-lightbox__track:focus { outline: none; }
.ahv-lightbox__slide { display: flex; align-items: center; justify-content: center; padding: 56px 16px; }
.ahv-lightbox__slide img { max-width: 100%; max-height: 100%; object-fit: contain; display: block; -webkit-user-drag: none; }
.ahv-lightbox__counter { position: absolute; left: 50%; top: 16px; transform: translateX(-50%); font-size: 14px; font-weight: 600; color: #C9D6E3; }
.ahv-lightbox__close { position: absolute; right: 12px; top: 8px; width: 44px; height: 44px; border: 0; border-radius: 10px; background: rgba(255, 255, 255, .12); color: #fff; font-size: 30px; line-height: 1; cursor: pointer; }
.ahv-lightbox__close:hover { background: rgba(255, 255, 255, .22); }
@media (hover: none) { .ahv-lightbox__nav { display: none; } }
.ahv-pricebox { background: #fff; border: 1px solid var(--ah-line); border-radius: 16px; padding: 24px; display: flex; flex-direction: column; gap: 14px; position: sticky; top: 16px; }
.ahv-pricebox__title { font: 800 28px/1.15 var(--ah-font-head); margin: 0; }
.ahv-pricebox__variant { margin: -8px 0 0; color: var(--ah-muted); }
.ahv-pricebox__price { border-top: 1px solid #EDF1F5; padding-top: 14px; display: flex; justify-content: space-between; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.ahv-pricebox__price strong { font: 800 36px var(--ah-font-head); }
.ahv-pricebox__price span { font-size: 13px; color: var(--ah-muted); }
.ahv-pricebox__rate { display: flex; justify-content: space-between; align-items: center; background: #F0F6FB; border-radius: 12px; padding: 12px 16px; color: var(--ah-text); text-decoration: none; }
.ahv-pricebox__rate span { font-size: 13px; color: var(--ah-muted); }
.ahv-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.ahv-actions .ahv-btn--primary { grid-column: 1 / -1; min-height: 52px; }
.ahv-contact { display: flex; gap: 14px; align-items: center; border-top: 1px solid #EDF1F5; padding-top: 14px; }
.ahv-contact img { width: 64px; height: 64px; border-radius: 999px; object-fit: cover; object-position: center 15%; }
.ahv-contact div { display: flex; flex-direction: column; font-size: 14px; }
.ahv-contact__label { font-size: 12px; color: var(--ah-muted); }
.ahv-box { background: #fff; border: 1px solid var(--ah-line); border-radius: 16px; padding: 28px; }
.ahv-box > h2, .ahv-similar > h2 { font: 700 22px var(--ah-font-head); margin: 0 0 18px; }
.ahv-facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 16px 24px; margin: 0; }
.ahv-facts dt { font-size: 13px; color: var(--ah-muted); }
.ahv-facts dd { margin: 2px 0 0; font-weight: 600; }
.ahv-tags { list-style: none; padding: 0; margin: 0 0 16px; display: flex; flex-wrap: wrap; gap: 8px; }
.ahv-tags li { background: #E2ECF6; color: var(--ah-blue); font-size: 14px; font-weight: 600; padding: 6px 12px; border-radius: 999px; }
.ahv-columns { columns: 3 220px; padding-left: 18px; margin: 12px 0 0; font-size: 15px; color: #33475B; }
.ahv-description { font-size: 15px; color: #33475B; line-height: 1.6; max-height: 260px; overflow: hidden; position: relative; }
.ahv-description.is-open { max-height: none; }
.ahv-description:not(.is-open)::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 80px; background: linear-gradient(transparent, #fff); }
.ahv-finance__grid { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(260px, 1fr); gap: 28px; }
.ahv-finance__inputs { display: flex; flex-direction: column; gap: 22px; }
.ahv-range { display: flex; flex-direction: column; gap: 8px; font-weight: 600; font-size: 14px; }
.ahv-range span { display: flex; justify-content: space-between; }
.ahv-range input { width: 100%; accent-color: var(--ah-blue); }
.ahv-terms { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.ahv-terms legend { font-weight: 600; font-size: 14px; margin-bottom: 8px; }
.ahv-terms label { position: relative; }
.ahv-terms input { position: absolute; opacity: 0; }
.ahv-terms span { display: inline-flex; min-height: 40px; align-items: center; padding: 0 14px; border: 1px solid var(--ah-input); border-radius: 10px; font-weight: 600; font-size: 14px; cursor: pointer; }
.ahv-terms input:checked + span { background: var(--ah-blue); border-color: var(--ah-blue); color: #fff; }
.ahv-terms input:focus-visible + span { outline: 2px solid var(--ah-blue); outline-offset: 2px; }
.ahv-finance__result { background: var(--ah-navy); color: #fff; border-radius: 14px; padding: 24px; display: flex; flex-direction: column; gap: 6px; }
.ahv-finance__result > span { font-size: 13px; color: #A9C2DA; }
.ahv-finance__result > strong { font: 800 38px var(--ah-font-head); }
.ahv-finance__result dl { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; font-size: 13px; color: #C9D6E3; margin: 10px 0 0; }
.ahv-finance__result dl div { display: contents; }
.ahv-finance__result dd { margin: 0; text-align: right; color: #fff; }
.ahv-finance__result .ahv-btn { margin-top: 12px; }
.ahv-similar .ahv-grid { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }

@media (max-width: 960px) {
    .ahv-detail__top, .ahv-finance__grid { grid-template-columns: 1fr; }
    .ahv-pricebox { position: static; }
}
@media (max-width: 600px) {
    .ahv-card--list .ahv-card__media { flex-basis: 100%; }
    .ahv-box { padding: 20px; }
    .ahv-actions { grid-template-columns: 1fr; }
}
@media print {
    .ahv-gallery__thumbs, .ahv-gallery__nav, .ahv-actions, .ahv-similar, .ahv-finance__inputs, .ahv-search { display: none !important; }
    .ahv-detail__top { grid-template-columns: 1fr 1fr; }
    .ahv-description { max-height: none; }
    .ahv-description::after { display: none; }
}

/* ---------- Handy/Tablet: Filter der Seitenleiste als Overlay ---------- */
.ahv-filter-toggle, .ahv-filter-close { display: none; }
@media (max-width: 1023px) {
    .ahv-filter-toggle { display: inline-flex; width: 100%; height: 52px; position: sticky; top: 12px; z-index: 5; box-shadow: 0 8px 20px rgba(1, 63, 126, .25); }
    .ahv-filter-toggle .ahv-badge { background: var(--ah-cyan); color: var(--ah-navy); }
    .ahv-filter-toggle__count { font-weight: 500; opacity: .85; }
    .ahv-search--sidebar { display: none; }
    .ahv-search--sidebar.is-open {
        display: flex; position: fixed; inset: 0; z-index: 1000; border-radius: 0; border: 0;
        overflow-y: auto; overscroll-behavior: contain; padding: 56px 20px 20px;
    }
    .ahv-search--sidebar.is-open .ahv-filter-close {
        display: flex; align-items: center; justify-content: center; position: absolute; top: 10px; right: 12px;
        width: 44px; height: 44px; border: 0; border-radius: 10px; background: var(--ah-surface); color: var(--ah-navy);
        font-size: 28px; line-height: 1; cursor: pointer;
    }
    html.ahv-noscroll { overflow: hidden; }
}
html.ahv-noscroll { overflow: hidden; }

/* Aufklappbereich (Detailseite: vollständige Ausstattung) */
.ahv-details { display: flex; flex-direction: column; gap: 14px; }
.ahv-details > summary { cursor: pointer; font: 700 16px var(--ah-font-head); list-style: none; display: flex; justify-content: space-between; align-items: center; min-height: 32px; }
.ahv-details > summary::after { content: '+'; font-weight: 400; color: var(--ah-blue); font-size: 20px; }
.ahv-details[open] > summary::after { content: '–'; }
.ahv-details > summary::-webkit-details-marker { display: none; }

/* ---------- Karussell (Startseite) ---------- */
.ahv-carousel { --ahv-per: 1; --ahv-gap: 20px; position: relative; }
@media (min-width: 640px) { .ahv-carousel { --ahv-per: 2; } }
@media (min-width: 1024px) { .ahv-carousel { --ahv-per: 3; } }
.ahv-carousel__track {
    list-style: none; margin: 0; padding: 4px 0 8px; display: flex; gap: var(--ahv-gap);
    overflow-x: auto; overflow-y: hidden; scroll-snap-type: x mandatory; overscroll-behavior-x: contain;
    scrollbar-width: none; -ms-overflow-style: none;
}
.ahv-carousel__track::-webkit-scrollbar { display: none; }
.ahv-carousel__track:focus-visible { outline: 3px solid var(--ah-cyan); outline-offset: 4px; border-radius: 12px; }
.ahv-carousel__slide { flex: 0 0 calc((100% - (var(--ahv-per) - 1) * var(--ahv-gap)) / var(--ahv-per)); scroll-snap-align: start; display: flex; min-width: 0; }
.ahv-carousel__slide > * { flex: 1; }
.ahv-carousel__nav {
    position: absolute; top: calc(50% - 24px); transform: translateY(-50%); z-index: 2;
    width: 48px; height: 48px; border-radius: 999px; border: 1px solid var(--ah-line);
    background: #fff; color: var(--ah-navy); font-size: 28px; line-height: 1; cursor: pointer;
    box-shadow: 0 6px 18px rgba(10, 32, 54, .16); transition: background .15s, color .15s;
}
.ahv-carousel__nav:hover { background: var(--ah-blue); color: #fff; border-color: var(--ah-blue); }
.ahv-carousel__nav--prev { left: -14px; }
.ahv-carousel__nav--next { right: -14px; }
@media (min-width: 1360px) { .ahv-carousel__nav--prev { left: -64px; } .ahv-carousel__nav--next { right: -64px; } }
.ahv-carousel__dots { display: flex; justify-content: center; flex-wrap: wrap; gap: 4px; margin-top: 16px; }
.ahv-carousel__dot { width: 28px; height: 28px; padding: 0; border: 0; background: none; cursor: pointer; display: grid; place-items: center; }
.ahv-carousel__dot::before { content: ""; width: 10px; height: 10px; border-radius: 999px; background: var(--ah-input); transition: width .25s, background .25s; }
.ahv-carousel__dot.is-active::before { width: 28px; background: var(--ah-blue); }
.ahv-carousel__dot:focus-visible { outline: 2px solid var(--ah-cyan); border-radius: 6px; }
.ahv-carousel.is-static .ahv-carousel__nav, .ahv-carousel.is-static .ahv-carousel__dots { display: none; }

/* Gleiten per Skript: Einrasten währenddessen aus */
.ahv-gallery__track.is-animating, .ahv-lightbox__track.is-animating, .ahv-carousel__track.is-animating { scroll-snap-type: none; }
/* Vorschaubilder ohne Scrollbalken */
.ahv-gallery__thumbs { scrollbar-width: none; -ms-overflow-style: none; padding-bottom: 0; }
.ahv-gallery__thumbs::-webkit-scrollbar { display: none; }
/* Liste lädt (Live-Suche) */
.ahv-listroot { transition: opacity .2s; }
.ahv-listroot.is-loading { opacity: .45; pointer-events: none; }

/* Fußnoten unter der Liste */
.ahv-footnotes { margin-top: 24px; display: flex; flex-direction: column; gap: 6px; }
.ahv-footnotes .ahv-footnote { margin: 0; }
.ahv-legal + .ahv-legal { margin-top: 6px; }
/* Kachel-/Listenansicht nur ab Tablet sinnvoll */
@media (max-width: 767px) {
    .ahv-viewswitch { display: none; }
    .ahv-card--list { flex-direction: column; }
    .ahv-card--list .ahv-card__media { flex-basis: auto; aspect-ratio: 4 / 3; min-height: 0; }
}

/* Hinweis gesetzliche Gewährleistung (Detailseite) */
.ahv-warranty-link { display: flex; align-items: center; gap: 12px; width: 100%; margin-top: 12px; padding: 10px 12px; border: 1px solid #C9D3E8; border-radius: 12px; background: #F2F5FB; color: #003399; text-align: left; font-family: inherit; font-size: 13px; line-height: 1.35; cursor: pointer; }
.ahv-warranty-link:hover { border-color: #003399; }
.ahv-warranty-link strong { font-size: 14px; }
.ahv-warranty-link__icon { flex: 0 0 36px; height: 36px; border-radius: 8px; background: #003399 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23FFCC00' stroke-width='2' stroke-linejoin='round'%3E%3Cpath d='M12 3 5 6v5c0 4.5 3 8 7 10 4-2 7-5.5 7-10V6z'/%3E%3C/svg%3E") center / 22px no-repeat; }
