/* ═══════════════════════════════════════════════════════════════════════════
   Startseite (public/index.php, Markup private/templates/home.php).
   Basis, Schriften, Farben, Kopf- und Fußzeile kommen aus css/site.css.

   Hier stehen auch alle Klassen, die das Shop-JS zur Laufzeit erzeugt oder
   umschaltet (gallery-*, custom-select*, cs-soldout, cart-*, summary-*,
   review-*, btn-submit*, cart-added-toast …). Wer dort einen Klassennamen
   ändert, muss ihn hier nachziehen.

   Breakpoint 768 px ist kein Geschmack: dieselbe Grenze benutzen das JS
   (Bewertungs-Karussell, Mobil-Vorauswahl, is_mobile) und die Galerie.
   ═══════════════════════════════════════════════════════════════════════════ */

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
.nd .modal-title { font-family: var(--nd-head); font-weight: 700; letter-spacing: -0.01em; }
.nd h2 { margin: 0; font-size: 34px; line-height: 1.12; }
.nd h3 { margin: 0; font-size: 19px; line-height: 1.25; letter-spacing: -0.01em; }
.nd main > section { scroll-margin-top: 84px; }

.nd-band { background: #fff; border-top: 1px solid var(--nd-line); border-bottom: 1px solid var(--nd-line); }
.nd-band--last { border-bottom: 0; }
.nd-link { font-size: 15px; font-weight: 700; }
.nd-stars { color: var(--nd-star); letter-spacing: 0.04em; }

/* ── Hero ───────────────────────────────────────────────────────────────── */
.nd-hero {
    max-width: 1240px; margin: 0 auto; padding: 48px var(--nd-pad) 72px;
    display: flex; flex-wrap: wrap; gap: 56px; align-items: flex-start;
}
.nd-gallery { flex: 1 1 460px; min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.nd-buy { flex: 1 1 460px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }

.nd-gallery__stage { position: relative; }
.gallery-main {
    position: relative; width: 100%; aspect-ratio: 4 / 5;
    border-radius: 20px; overflow: hidden; background: var(--nd-stage);
    transition: opacity 0.25s ease;
}
.gallery-main > img, .gallery-main > video { width: 100%; height: 100%; object-fit: cover; display: block; }
/* Bildunterschrift ohne roten Punkt (Wunsch des Betreibers). */
.gallery-caption {
    position: absolute; left: 16px; right: 16px; bottom: 16px;
    padding: 12px 14px; border-radius: 12px;
    background: rgba(255,255,255,0.95);
    font-size: 14px; line-height: 1.35; color: var(--nd-text);
    pointer-events: none;
}
.gallery-arrow {
    position: absolute; top: 50%; margin-top: -22px; z-index: 2;
    width: 44px; height: 44px; padding: 0; border: 0; border-radius: 50%;
    background: rgba(255,255,255,0.92); color: var(--nd-text);
    display: flex; align-items: center; justify-content: center; cursor: pointer;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}
.gallery-arrow:hover { background: #fff; }
.gallery-arrow--prev { left: 14px; }
.gallery-arrow--next { right: 14px; }

/* Thumbnail-Leiste (Desktop): Mechanik in scrollThumbsToActive(). */
.gallery-thumbnails { overflow: hidden; padding: 2px 0; --thumb-fade: 28px; }
.gallery-thumbnails.more-left  { -webkit-mask-image: linear-gradient(to right, transparent 0, #000 var(--thumb-fade)); mask-image: linear-gradient(to right, transparent 0, #000 var(--thumb-fade)); }
.gallery-thumbnails.more-right { -webkit-mask-image: linear-gradient(to left, transparent 0, #000 var(--thumb-fade)); mask-image: linear-gradient(to left, transparent 0, #000 var(--thumb-fade)); }
.gallery-thumbnails.more-left.more-right {
    -webkit-mask-image: linear-gradient(to right, transparent 0, #000 var(--thumb-fade), #000 calc(100% - var(--thumb-fade)), transparent 100%);
    mask-image: linear-gradient(to right, transparent 0, #000 var(--thumb-fade), #000 calc(100% - var(--thumb-fade)), transparent 100%);
}
.gallery-thumbs-track {
    display: flex; gap: 8px; width: max-content; margin: 0 auto;
    transition: transform 0.7s cubic-bezier(0.33, 0, 0.15, 1);
}
@media (prefers-reduced-motion: reduce) { .gallery-thumbs-track { transition: none; } }
.gallery-thumb {
    flex: 0 0 auto; width: 64px; height: 64px; padding: 2px;
    border: 2px solid transparent; border-radius: 12px; background: #fff;
    opacity: 0.45; cursor: pointer; transition: opacity 0.2s, border-color 0.2s;
}
.gallery-thumb:hover { opacity: 0.75; }
.gallery-thumb.active { border-color: var(--nd-text); opacity: 1; }
.gallery-thumb img { width: 100%; height: 100%; object-fit: cover; border-radius: 8px; display: block; }
.gallery-thumb-placeholder, .gallery-dot__placeholder {
    width: 100%; height: 100%; display: flex; align-items: center; justify-content: center;
    background: var(--nd-soft); border-radius: 8px; font-size: 14px; color: var(--nd-muted);
}
.gallery-dot-nav { display: none; }

/* ── Kaufbereich ────────────────────────────────────────────────────────── */
.nd-title { display: flex; flex-direction: column; gap: 4px; margin-bottom: -6px; }
.nd .nd-title h1 { margin: 0 0 0 -2px; font-size: 56px; line-height: 1; letter-spacing: -0.02em; }
.nd-subtitle { font-family: var(--nd-sans); font-weight: 400; font-size: 20px; line-height: 1.2; color: var(--nd-muted); }
.nd-lead { margin: 0; font-size: 18px; line-height: 1.5; color: var(--nd-text-2); max-width: 560px; }
/* Drei Merkmale fett nebeneinander, getrennt durch Bullets (keine Pills). */
.nd-features { margin: 0; display: flex; flex-wrap: wrap; row-gap: 4px; font-size: 14px; font-weight: 700; }
.nd-features span + span::before { content: '•'; margin: 0 0.6em; color: var(--nd-faint); font-weight: 400; }

#checkoutForm { display: flex; flex-direction: column; gap: 20px; margin: 0; }

.nd-options { display: flex; flex-direction: column; gap: 8px; padding-top: 4px; }
.nd-options__row { display: flex; gap: 12px; }
.nd-options__col { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.nd-options__col--wide { flex-grow: 1.5; }
.nd-label { font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--nd-muted); }

/* Custom Select (renderCustomSelect()) */
.custom-select { position: relative; width: 100%; }
.custom-select__trigger {
    width: 100%; height: 50px; padding: 0 40px 0 14px; position: relative;
    border: 1px solid var(--nd-field); border-radius: 12px; background: #fff;
    font-size: 16px; color: var(--nd-text); text-align: left; cursor: pointer;
    display: flex; align-items: center; gap: 6px;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.custom-select__trigger::after {
    content: ''; position: absolute; right: 14px; top: 50%; width: 16px; height: 16px; margin-top: -8px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23111' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat center / contain;
    transition: transform 0.2s;
}
.custom-select__trigger:hover { border-color: var(--nd-text); }
.custom-select--open .custom-select__trigger { border-color: var(--nd-text); }
.custom-select--open .custom-select__trigger::after { transform: rotate(180deg); }
.custom-select__trigger--loading { opacity: 0.5; cursor: wait; pointer-events: none; }
.custom-select--disabled .custom-select__trigger { opacity: 0.55; cursor: default; pointer-events: none; }
.custom-select__options {
    position: absolute; z-index: 30; top: calc(100% + 6px); left: 0; right: 0;
    padding: 6px; background: #fff; border: 1px solid var(--nd-field); border-radius: 12px;
    box-shadow: 0 10px 28px rgba(0,0,0,0.12);
    max-height: 320px; overflow-y: auto;
}
.custom-select__option {
    min-height: 44px; padding: 10px; border-radius: 8px;
    font-size: 16px; color: var(--nd-text); cursor: pointer;
    display: flex; align-items: center; justify-content: space-between; gap: 8px;
}
.custom-select__option:hover { background: var(--nd-soft); }
.custom-select__option--selected { font-weight: 700; }
.custom-select__option--disabled { color: #9a9a9a; cursor: default; }
.custom-select__option--disabled:hover { background: transparent; }
/* Ausverkauft, aber vorbestellbar: bleibt wählbar, Marker "Vorbestellung" in Orange. */
.cs-soldout { font-size: 12px; font-weight: 700; color: var(--nd-orange); letter-spacing: 0.2px; white-space: nowrap; }
.custom-select__trigger .cs-soldout { margin-left: 2px; }

.stock-notice { color: var(--nd-red); font-size: 13px; line-height: 1.4; }
.stock-notice:empty { display: none; }

/* Kabel */
.nd-cables { display: flex; flex-direction: column; gap: 10px; font-size: 15px; }
.nd-cables label { display: flex; align-items: flex-start; gap: 10px; min-height: 28px; cursor: pointer; }
.nd-cables input[type="checkbox"] { width: 18px; height: 18px; margin: 2px 0 0; flex: 0 0 auto; accent-color: var(--nd-text); cursor: pointer; }
.nd-cables input[type="checkbox"]:disabled + span { color: var(--nd-faint); }
.nd-cable-notice { display: block; color: var(--nd-red); font-size: 12px; margin-top: 2px; }
.nd-cable-notice:empty { display: none; }

/* Preis */
.nd-price { display: flex; flex-direction: column; gap: 2px; }
.nd-price .price { font-size: 36px; font-weight: 700; letter-spacing: -0.01em; line-height: 1.2; }
.nd-price .subtext { font-size: 13px; color: var(--nd-muted); }
.nd-price .subtext a { color: inherit; }

/* Kaufbuttons */
.nd-cta { display: flex; gap: 10px; max-width: 460px; }
.btn-checkout-main {
    position: relative; flex: 1 1 auto; min-height: 56px; padding: 0 18px;
    border: 0; border-radius: 12px; background: var(--nd-text); color: #fff;
    font-size: 17px; font-weight: 700; cursor: pointer; transition: background 0.2s;
}
.btn-checkout-main:hover { background: #333; }
.btn-checkout-main:disabled { background: #9a9a9a; cursor: not-allowed; }
/* Altes "In den Warenkorb"-Symbol (img/add_cart.svg), Wunsch des Betreibers. */
.btn-cart-add {
    flex: 0 0 56px; width: 56px; height: 56px; padding: 0;
    border: 1px solid var(--nd-text); border-radius: 12px; background: #fff;
    display: flex; align-items: center; justify-content: center; cursor: pointer; transition: background 0.2s;
}
.btn-cart-add:hover { background: var(--nd-soft); }
.btn-cart-add:disabled { opacity: 0.35; cursor: not-allowed; background: #fff; }
.btn-cart-add img { width: 24px; height: 24px; display: block; }

/* Vertrauenszeile */
.nd-trust {
    display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px;
    padding-top: 18px; border-top: 1px solid var(--nd-line); max-width: 600px;
}
.nd-trust__title { font-size: 15px; font-weight: 700; line-height: 1.3; }
.nd-trust__sub { font-size: 13px; color: var(--nd-muted); line-height: 1.4; margin-top: 2px; }

/* ── Abschnittsköpfe ────────────────────────────────────────────────────── */
.nd-section-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 16px; }
.nd-section-head h2 { max-width: 680px; }
.nd-section-head p { margin: 0; font-size: 16px; color: var(--nd-muted); max-width: 420px; }

/* ── Montage ────────────────────────────────────────────────────────────── */
.nd-steps { padding-top: 80px; padding-bottom: 80px; display: flex; flex-direction: column; gap: 40px; }
.nd-steps__list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; }
.nd-step { padding: 28px; border: 1px solid var(--nd-line); border-radius: 16px; display: flex; flex-direction: column; gap: 14px; background: #fff; }
.nd-step__top { display: flex; justify-content: space-between; align-items: center; }
.nd-step__icon { color: var(--nd-text); display: block; }
.nd-step__body { display: flex; flex-direction: column; gap: 8px; }
.nd-step h3 { font-size: 21px; }
.nd-step p { margin: 0; font-size: 15px; color: var(--nd-text-3); }

/* ── Funktionsweise ─────────────────────────────────────────────────────── */
.nd-how {
    padding-top: 88px; padding-bottom: 88px;
    display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
    grid-template-areas: "model title" "model text";
    grid-template-rows: auto 1fr;
    column-gap: 48px; row-gap: 18px; align-items: start;
}
.nd-how__title { grid-area: title; align-self: end; }
.nd-how__model { grid-area: model; min-width: 0; align-self: center; }
.nd-how__text { grid-area: text; min-width: 0; display: flex; flex-direction: column; gap: 18px; }
.nd-how__text p { margin: 0; font-size: 17px; color: var(--nd-text-2); }
.nd-model {
    position: relative; width: 100%; height: 580px;
    background: #fff; border-radius: 20px; overflow: hidden;
}
/* Läuft das Modell, ist nur der Würfel selbst weiß (malt doppio-model.js), drumherum das Seitenraster. */
.nd-model.model-ready { background: transparent; }
/* Fallback-Bild, bis das Modell läuft (ohne WebGL für immer). */
.nd-model > img { width: 100%; height: 100%; object-fit: contain; display: block; }
.nd-model-hint { margin-top: 10px; font-size: 13px; color: var(--nd-muted); }
.nd-specs { margin: 8px 0 0; display: grid; grid-template-columns: 130px minmax(0, 1fr); border-top: 1px solid var(--nd-line-2); font-size: 15px; }
.nd-specs dt { padding: 12px 0; border-bottom: 1px solid var(--nd-line); color: var(--nd-muted); }
.nd-specs dd { margin: 0; padding: 12px 0; border-bottom: 1px solid var(--nd-line); }

/* ── Kompatibilität ─────────────────────────────────────────────────────── */
.nd-compat { padding-top: 88px; padding-bottom: 88px; display: flex; flex-wrap: wrap; gap: 56px; }
.nd-compat__main { flex: 1 1 520px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.nd-compat__main > p { margin: 0; font-size: 16px; color: var(--nd-text-3); max-width: 600px; }
.nd-compat__side { flex: 1 1 340px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.nd-compat__drawing { width: 100%; height: auto; display: block; }
.nd-compat__drawing--mobile { display: none; }
.nd-machines { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.nd-machines li { padding: 7px 12px; border: 1px solid var(--nd-line-2); border-radius: 999px; font-size: 14px; background: #FAFAF8; }
.nd-machines .nd-machines__more { display: none; padding: 0; background: #fff; }
.nd-machines__more button { border: 0; background: none; padding: 7px 12px; font-size: 14px; color: var(--nd-muted); cursor: pointer; }
.nd-disclaimer { margin: 0; font-size: 12px; color: #6B6B6B; }
.nd .nd-compat__box h3 { font-family: var(--nd-body); letter-spacing: -0.01em; }
.nd-compat__box { padding: 24px; border-radius: 16px; background: var(--nd-soft); display: flex; flex-direction: column; gap: 10px; }
.nd-compat__box p { margin: 0; font-size: 15px; color: var(--nd-text-3); }
.nd-compat__box a { font-size: 15px; font-weight: 700; }

/* ── Bewertungen (renderReviews()) ──────────────────────────────────────── */
.nd-reviews { padding-top: 88px; padding-bottom: 88px; display: flex; flex-direction: column; gap: 32px; }
.nd-reviews__summary { font-size: 15px; color: var(--nd-muted); margin-bottom: 6px; }
.reviews-loading { color: var(--nd-muted); font-size: 14px; }
.reviews-nav { display: flex; align-items: center; gap: 16px; }
.reviews-arrow {
    flex: 0 0 auto; width: 48px; height: 48px; padding: 0;
    border: 1px solid var(--nd-line-2); border-radius: 50%; background: #fff; color: var(--nd-text);
    display: flex; align-items: center; justify-content: center; cursor: pointer;
}
.reviews-arrow:hover:not(:disabled) { border-color: var(--nd-text); }
.reviews-arrow:disabled { opacity: 0.35; cursor: default; }
.reviews-grid { flex: 1 1 auto; min-width: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; align-items: stretch; }
.review-card {
    margin: 0; padding: 28px; background: #fff; border: 1px solid var(--nd-line); border-radius: 16px;
    display: flex; flex-direction: column; gap: 12px;
}
.review-stars { color: var(--nd-star); font-size: 14px; letter-spacing: 0.04em; }
.review-text { margin: 0; font-size: 17px; line-height: 1.45; flex: 1 1 auto; overflow-wrap: anywhere; }
.review-author { font-size: 13px; color: var(--nd-muted); }
.review-translated { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; font-size: 12px; color: var(--nd-faint); }
.review-toggle-original { border: 0; background: none; padding: 0; font-size: 12px; color: var(--nd-muted); text-decoration: underline; cursor: pointer; }
.reviews-counter { text-align: center; font-size: 13px; color: var(--nd-muted); }
.reviews-counter:empty { display: none; }

/* ── FAQ ────────────────────────────────────────────────────────────────── */
.nd-faq { padding-top: 88px; padding-bottom: 88px; display: flex; flex-wrap: wrap; gap: 56px; }
.nd-faq__head { flex: 1 1 320px; min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.nd-faq__list { flex: 2 1 560px; min-width: 0; border-top: 1px solid var(--nd-line-2); }
.nd-faq__item { border-bottom: 1px solid var(--nd-line); }
.nd-faq__item summary {
    list-style: none; cursor: pointer; min-height: 64px; padding: 14px 0;
    display: flex; justify-content: space-between; align-items: center; gap: 16px; font-size: 17px;
}
.nd-faq__item summary::-webkit-details-marker { display: none; }
.nd-faq__plus { position: relative; flex: 0 0 14px; width: 14px; height: 14px; }
.nd-faq__plus::before, .nd-faq__plus::after {
    content: ''; position: absolute; left: 0; top: 6px; width: 14px; height: 2px; background: var(--nd-muted); transition: transform 0.2s;
}
.nd-faq__plus::after { transform: rotate(90deg); }
.nd-faq__item[open] .nd-faq__plus::after { transform: rotate(0deg); }
.nd-faq__answer { padding: 0 32px 20px 0; font-size: 15px; color: var(--nd-text-3); line-height: 1.55; }

/* ── Abschluss ──────────────────────────────────────────────────────────── */
.nd-final { padding-top: 0; padding-bottom: 88px; }
.nd-compat__main > p a { font-weight: 700; }
.nd-final__card { display: flex; flex-wrap: wrap; align-items: stretch; border-radius: 20px; overflow: hidden; background: var(--nd-text); color: #fff; }
.nd-final__img { flex: 1 1 360px; min-width: 0; min-height: 320px; max-height: 520px; }
.nd-final__img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.nd-final__text { flex: 1 1 420px; min-width: 0; padding: 48px; display: flex; flex-direction: column; justify-content: center; gap: 18px; }
.nd .nd-final__text h2 { color: #fff; }
.nd-final__text p { margin: 0; font-size: 16px; color: #CFCFCF; }
.nd .nd-final__btn {
    align-self: flex-start; min-height: 52px; padding: 0 28px; border-radius: 12px;
    display: flex; align-items: center; background: #fff; color: var(--nd-text);
    font-size: 16px; font-weight: 700; text-decoration: none;
}
.nd .nd-final__btn:hover { background: var(--nd-soft); color: var(--nd-text); }

/* ── Dialoge: Warenkorb, Lieferadresse, Wettlauf ────────────────────────── */
@keyframes ndModalIn { from { opacity: 0; } to { opacity: 1; } }
.modal-overlay {
    position: fixed; inset: 0; z-index: 900;
    background: rgba(17,17,17,0.55);
    display: flex; align-items: flex-start; justify-content: center;
    overflow-y: auto; padding: 40px 16px 60px;
    animation: ndModalIn 0.2s ease;
}
.modal-dialog {
    position: relative; width: 100%; max-width: 540px;
    background: #fff; border-radius: 20px; padding: 28px 32px 32px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.18);
}
.modal-back {
    min-height: 44px; margin: -8px 0 6px -4px; padding: 0 4px;
    border: 0; background: none; color: var(--nd-muted); font-size: 14px; cursor: pointer;
    display: flex; align-items: center;
}
.modal-back:hover { color: var(--nd-text); }
.modal-close {
    position: absolute; top: 12px; right: 12px; width: 44px; height: 44px; padding: 0;
    border: 0; background: none; color: var(--nd-muted); font-size: 28px; line-height: 1; cursor: pointer;
}
.modal-close:hover { color: var(--nd-text); }
.nd .modal-title { font-size: 24px; line-height: 1.2; margin: 0 0 18px; }
#cartModal .modal-title { padding-right: 40px; }
.nd-race-body { font-size: 15px; line-height: 1.5; margin: 0 0 18px; color: var(--nd-text-3); }

.modal-summary {
    background: var(--nd-soft-2); border-radius: 12px; padding: 16px;
    margin-bottom: 18px; font-size: 14px; color: var(--nd-text-3); line-height: 1.6;
}
.modal-summary:empty { display: none; }
.summary-item { display: flex; align-items: center; gap: 14px; }
.summary-thumb { width: 56px; height: 56px; object-fit: cover; border-radius: 8px; display: block; flex: 0 0 auto; }
.summary-item__text { flex: 1 1 auto; min-width: 0; }
.summary-item__price { font-size: 16px; font-weight: 700; color: var(--nd-text); white-space: nowrap; }
.summary-product { font-weight: 700; color: var(--nd-text); line-height: 1.35; }
.summary-extra { color: var(--nd-muted); }
.summary-shipping { color: var(--nd-muted); }
.summary-discount { color: var(--nd-ok); }
.summary-customs { color: #b36200; font-size: 12px; margin-top: 2px; }
.summary-price { margin-top: 6px; font-weight: 700; font-size: 17px; color: var(--nd-text); }
.summary-divider { border: 0; border-top: 1px solid var(--nd-line-2); margin: 12px 0; }

/* Formularfelder */
.modal-dialog .form-group { margin-bottom: 16px; }
.modal-dialog label { display: block; font-size: 14px; font-weight: 700; margin-bottom: 6px; }
.modal-dialog input[type="text"],
.modal-dialog input[type="email"],
.modal-dialog select {
    width: 100%; height: 48px; padding: 0 14px;
    border: 1px solid var(--nd-field); border-radius: 10px; background: #fff;
    font-family: inherit; font-size: 16px; color: var(--nd-text);
    -webkit-appearance: none; appearance: none;
}
.modal-dialog select {
    padding-right: 40px; cursor: pointer;
    background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23111' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right 14px center / 16px 16px;
}
.modal-dialog input:focus, .modal-dialog select:focus { outline: none; border-color: var(--nd-text); box-shadow: 0 0 0 3px rgba(17,17,17,0.08); }
.modal-dialog input::placeholder { color: #9a9a96; }
.form-row { display: flex; gap: 10px; }
.form-row > input { flex: 1 1 0; min-width: 0; }
.form-row .input--narrow { flex: 0 0 120px; }
.field-error { color: var(--nd-red); font-size: 13px; margin-top: 6px; }

/* Maschinenfeld (Pflicht) */
.nd-machine { padding: 16px; border: 1px solid var(--nd-text); border-radius: 12px; display: flex; flex-direction: column; gap: 6px; }
.modal-dialog .nd-machine label { margin-bottom: 0; }
.nd-required { color: #B3261E; }
.nd-machine__hint { font-size: 13px; color: var(--nd-muted); }
.nd-machine .field-error { margin-top: 0; }
.nd-machine .field-error:not([hidden]) + .nd-machine__hint,
.nd-machine__hint:has(+ .field-error:not([hidden])) { display: none; }

/* Adress-Autocomplete (Photon) */
.autocomplete-wrapper { position: relative; }
.autocomplete-dropdown {
    position: absolute; top: calc(100% + 4px); left: 0; right: 0; z-index: 20;
    background: #fff; border: 1px solid var(--nd-field); border-radius: 10px;
    box-shadow: 0 10px 28px rgba(0,0,0,0.12); max-height: 240px; overflow-y: auto;
    overscroll-behavior: contain; -webkit-overflow-scrolling: touch; /* Wischen scrollt die Liste, nicht den Dialog */
}
.autocomplete-item { padding: 11px 14px; cursor: pointer; font-size: 14px; line-height: 1.4; border-bottom: 1px solid #f0f0ee; }
.autocomplete-item:last-child { border-bottom: 0; }
.autocomplete-item:hover, .autocomplete-item.is-active { background: var(--nd-soft); }

/* Mobil, Zahlungsschritt: kürzer, damit der Bestellbutton ohne Scrollen im Bild
   steht. Das Maschinenfeld ist im Adressschritt schon geprüft; ist es beim
   Absenden doch leer, springt der Dialog dorthin zurück (validateCheckoutAddress). */
@media (max-width: 899px) {
    #addressModal.is-pay-step .nd-machine { display: none; }
    #addressModal.is-pay-step .modal-summary { margin-bottom: 12px; padding: 12px 14px; }
    #addressModal.is-pay-step .modal-title { margin-bottom: 12px; }
    #addressModal.is-pay-step .modal-back { margin-bottom: 0; }
    .pay-card { gap: 8px; margin-top: 10px; }
    .pay-card__label { font-size: 13px; margin-bottom: 2px; }
    .pay-card__field { height: 44px; padding: 11px 14px; }
    .checkout-pay .coupon-toggle { min-height: 36px; margin-top: 2px; }
    /* Karte gewählt: nur noch die Kartenkachel (volle Breite), Rückweg über
       „Zahlungsart ändern“ (setPayMethod('')). */
    .pay-methods.is-card [data-method]:not([data-method="creditcard"]),
    .pay-methods.is-card #payMoreToggle, .pay-methods.is-card #payMethodMore { display: none; }
    .pay-methods.is-card [data-method="creditcard"] { grid-column: 1 / -1; }
    .pay-methods.is-card .pay-change { display: block; } /* 0,3,0 schlägt die Grundregel */
}
.pay-methods .pay-change { display: none; } /* schlägt .coupon-toggle (steht weiter unten) */

/* Buttons im Dialog */
.btn-submit {
    display: block; width: 100%; min-height: 56px; margin-top: 8px; padding: 0 16px;
    border: 0; border-radius: 12px; background: var(--nd-text); color: #fff;
    font-size: 17px; font-weight: 700; cursor: pointer; transition: background 0.2s;
}
.btn-submit:hover { background: #333; }
.btn-submit:disabled { background: #9a9a9a; cursor: not-allowed; }
.btn-submit--ghost { background: #fff; color: var(--nd-text); border: 1px solid var(--nd-text); }
.btn-submit--ghost:hover { background: var(--nd-soft); }
.cart-resume-note { font-size: 13px; color: var(--nd-muted); margin-top: 12px; line-height: 1.45; }
.coupon-toggle {
    display: block; margin: 8px auto 0; min-height: 44px; padding: 0 8px;
    border: 0; background: none; color: var(--nd-muted); font-size: 14px; cursor: pointer;
}
.coupon-toggle:hover { color: var(--nd-text); }
#couponBox { margin-top: 8px; }

/* Eigener Checkout: Ergebnis (success.php?embed=1) im Bestelldialog. */
#addressModal.is-done .modal-dialog > :not(.checkout-done) { display: none; }
.checkout-done__card { max-width: 520px; margin: 0 auto; padding: 24px 0 8px; text-align: center; }
.checkout-done .icon { font-size: 48px; margin-bottom: 16px; }
.checkout-done h1 { font-size: 26px; line-height: 1.2; margin: 0 0 14px; }
.checkout-done p { color: var(--nd-text-3); line-height: 1.6; margin: 0 0 18px; }
.checkout-done .order-number {
    display: inline-block; margin-bottom: 20px; padding: 10px 20px; border-radius: 10px; background: var(--nd-soft);
    font-family: monospace; font-size: 17px; font-weight: 700; letter-spacing: 1px; color: var(--nd-text);
}
.checkout-done .btn {
    display: inline-block; min-height: 48px; padding: 14px 28px; border-radius: 12px;
    background: var(--nd-text); color: #fff; font-size: 15px; font-weight: 700; text-decoration: none;
}
.checkout-done .btn:hover { background: #333; }
.checkout-done .btn-secondary { background: #fff; color: var(--nd-text); border: 1px solid var(--nd-text); }
.checkout-done .btn-secondary:hover { background: var(--nd-soft); }
.checkout-done .bank-table { width: 100%; border-collapse: collapse; margin: 16px 0 24px; text-align: left; font-size: 14px; }
.checkout-done .bank-table td { padding: 8px 10px; border-bottom: 1px solid var(--nd-line-2); }
.checkout-done .bank-table td:first-child { width: 42%; color: var(--nd-muted); font-size: 12px; text-transform: uppercase; letter-spacing: 0.5px; }
.checkout-done .bank-table td:last-child { font-family: monospace; font-weight: 600; overflow-wrap: anywhere; }
.coupon-row { display: flex; gap: 8px; }
.coupon-row input { flex: 1 1 auto; min-width: 0; }
.coupon-row button {
    flex: 0 0 auto; min-width: 64px; height: 48px; padding: 0 18px;
    border: 0; border-radius: 10px; background: var(--nd-text); color: #fff; font-size: 15px; font-weight: 700; cursor: pointer;
}
.coupon-row button:disabled { background: #9a9a9a; }
.coupon-ok { color: var(--nd-ok); font-size: 13px; margin-top: 6px; }
.preorder-warning {
    margin-top: 12px; padding: 10px 12px; border-radius: 10px;
    background: #fdf2e9; border: 1px solid #f5c396; color: #9c5221; font-size: 13px; line-height: 1.45;
}

/* Eigener Checkout: Kacheln (Buttons, Klick löst aus) + Kartenfelder (Mollie
   Components, Iframes). Mollie setzt am Feld-Container has-focus / is-invalid. */
.pay-methods { border: 0; margin: 0 0 4px; padding: 0; min-width: 0; }
.pay-methods legend { padding: 0; font-size: 14px; font-weight: 700; margin-bottom: 8px; } /* 8 px Freiraum um den Google-Pay-Button */
.pay-methods__list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
#payMethodMore { margin-top: 8px; }
/* Zusatzkachel aus „Weitere Zahlungsarten“ gewählt und ungerade Anzahl: die erste Kachel
   (Wallet, darf laut Google größer sein als die Nachbarn) nimmt die ganze Zeile, damit
   die Zusatzkachel neben Überweisung steht. */
#payMethodList.has-extra > :first-child:nth-last-child(odd) { grid-column: 1 / -1; }
.pay-method {
    display: flex; align-items: center; gap: 8px; min-width: 0; min-height: 48px; margin: 0; padding: 6px 10px;
    border: 1px solid var(--nd-field); border-radius: 10px; background: #fff; color: var(--nd-text);
    font-family: inherit; font-size: 14px; font-weight: 400; line-height: 1.2; cursor: pointer;
    justify-content: center; text-align: center; /* wie das Apple-Pay-Logo (Wunsch 2026-10-29) */
}
.pay-methods__list--main .pay-method { min-height: 48px; font-size: 15px; font-weight: 700; }
.pay-method:hover { border-color: var(--nd-text); }
.pay-method:focus-visible { outline: 2px solid var(--nd-text); outline-offset: 2px; }
.pay-method.is-selected { border-color: var(--nd-text); box-shadow: 0 0 0 1px var(--nd-text); }
.pay-method:disabled { cursor: default; opacity: 0.5; }
.pay-method.is-busy { opacity: 1; border-color: var(--nd-text); animation: ndPayBusy 1s ease-in-out infinite alternate; }
@keyframes ndPayBusy { to { background: var(--nd-soft); } }
@media (prefers-reduced-motion: reduce) { .pay-method.is-busy { animation: none; background: var(--nd-soft); } }
.pay-method img { width: 32px; height: 24px; flex: 0 0 auto; }
/* Lange Namen (Sofortüberweisung, Bancomat Pay) umbrechen statt überlaufen. */
.pay-method span { min-width: 0; overflow-wrap: anywhere; hyphens: auto; }
/* Apple Pay: Apples JS-Button aus dem SDK (black, gleichwertig zum schwarzen Google-Pay-Button),
   so groß wie die Nachbarkachel. Rahmenfarbe bestimmt Apple. */
apple-pay-button.pay-apple {
    display: block; width: 100%; min-width: 0; box-sizing: border-box; cursor: pointer;
    /* border-box: Breite/Höhe inkl. Apples Rahmen und Innenabstand, sonst stand die
       Kachel um den Rahmen breiter als die Nachbarn (2026-10-29). 48 px wie die
       Nachbarkacheln (2026-10-29, kleiner, damit das Google-Pay-Logo nicht dominiert);
       5,25 px Innenabstand machen das Logo 10 % größer als die 7 px davor
       (40,5 → 44,6 px breit, in Chromium gemessen). */
    --apple-pay-button-width: 100%; --apple-pay-button-height: 48px;
    --apple-pay-button-border-radius: 10px; --apple-pay-button-padding: 5.25px 0px;
    --apple-pay-button-box-sizing: border-box;
}
apple-pay-button.pay-apple[aria-disabled="true"] { opacity: 0.5; pointer-events: none; }
/* Google Pay: Googles Button (createButton, buttonSizeMode fill) füllt die Kachel nur
   bei fester Höhe. ⚠️ Nicht am Button selbst drehen (Innenabstand, Logo, Schrift):
   die Brand Guidelines verbieten es, Google prüft das bei der Freigabe. */
.pay-google { height: 48px; min-width: 0; cursor: pointer; } /* = Nachbarkacheln, Google verlangt mindestens gleich groß */
.pay-google[aria-disabled="true"] { opacity: 0.5; pointer-events: none; }
/* Sicherheitshinweis unter den Zahlungsarten bzw. den Kartenfeldern. Bei gewählter
   Karte steht der kartenspezifische Text, der allgemeine tritt zurück. */
.pay-secure { display: flex; gap: 6px; align-items: flex-start; margin: 10px 0 0; font-size: 12px; line-height: 1.45; color: var(--nd-muted); }
.pay-secure__icon { flex: 0 0 auto; margin-top: 2px; }
.pay-methods.is-card .pay-secure--all { display: none; }
.pay-card .pay-secure { grid-column: 1 / -1; margin-top: 0; } /* volle Breite, auch im Desktop-2×2 */
/* Mobil: Nummer und Name je eine Zeile, Ablauf + CVC nebeneinander. */
.pay-card { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px 8px; margin-top: 12px; }
.pay-card__item { min-width: 0; }
.pay-card__item--wide { grid-column: 1 / -1; }
.pay-card__label { display: block; font-size: 14px; font-weight: 700; margin-bottom: 4px; }
.pay-card__field {
    height: 48px; padding: 13px 14px;
    border: 1px solid var(--nd-field); border-radius: 10px; background: #fff;
}
.pay-card__field.has-focus { border-color: var(--nd-text); box-shadow: 0 0 0 3px rgba(17,17,17,0.08); }
.pay-card__field.is-invalid { border-color: var(--nd-red); }

/* Desktop: Adressdialog zweispaltig, damit der Bestellbutton ohne Scrollen im
   Bild steht (Wunsch 2026-10-28). Links Warenkorb und Maschine (bleiben stehen),
   rechts .checkout-main: Adresse, beim eigenen Checkout danach der Zahlungsbereich
   an derselben Stelle. Ab 900 px, darunter bleibt die Spalte. */
@media (min-width: 900px) {
    #addressModal { padding: 20px 16px; }
    #addressModal .modal-dialog { max-width: 960px; margin: auto 0; padding: 20px 32px 24px; }
    #addressModal .modal-back { margin-bottom: 0; }
    #addressModal .modal-title { margin-bottom: 14px; }
    .checkout-grid {
        display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: 32px;
        grid-template-areas: "summary main" "machine main";
        grid-template-rows: auto 1fr; align-items: start;
    }
    .checkout-grid > .modal-summary { grid-area: summary; margin-bottom: 14px; padding: 12px 14px; }
    .checkout-grid > .nd-machine { grid-area: machine; margin-bottom: 14px; padding: 12px 14px; }
    .checkout-main { grid-area: main; }
    /* E-Mail und Bestätigung nebeneinander, spart eine Zeile. */
    .checkout-address { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: 10px; }
    .checkout-address > * { grid-column: 1 / -1; }
    .checkout-address > .form-group:has(#email), .checkout-address > .form-group:has(#emailConfirm) { grid-column: auto; }
    .checkout-grid .form-group { margin-bottom: 10px; }
    .checkout-grid label { margin-bottom: 4px; }
    .checkout-grid input[type="text"], .checkout-grid input[type="email"], .checkout-grid select,
    .pay-card__field { height: 44px; }
    .pay-card__field { padding: 11px 14px; }
    .checkout-pay .coupon-toggle { margin-top: 2px; min-height: 36px; }
    .checkout-pay .modal-back { margin-top: -10px; }
    /* Karte als 2×2, damit der Button im Bild bleibt. */
    .pay-card__item--wide { grid-column: auto; }
}

/* Warenkorb */
.cart-item { display: flex; align-items: flex-start; gap: 12px; padding: 14px 0; border-bottom: 1px solid #eee; }
.cart-item:last-child { border-bottom: 0; }
.cart-item-info { flex: 1 1 auto; min-width: 0; font-size: 14px; line-height: 1.5; }
.cart-item-name { font-weight: 700; }
.cart-item-sub { color: var(--nd-muted); font-size: 13px; }
.cart-item-sub:empty { display: none; }
.cart-item-price { font-weight: 700; white-space: nowrap; font-size: 14px; }
.cart-item-remove {
    width: 32px; height: 32px; margin: -6px -6px 0 0; padding: 0;
    border: 0; background: none; color: #aaa; font-size: 22px; line-height: 1; cursor: pointer;
}
.cart-item-remove:hover { color: var(--nd-red); }
.cart-empty-msg { text-align: center; color: var(--nd-faint); padding: 32px 0; font-size: 15px; }
.cart-footer { margin-top: 16px; padding-top: 16px; border-top: 2px solid var(--nd-text); }
.cart-total-row { display: flex; justify-content: space-between; font-weight: 700; font-size: 15px; margin-bottom: 12px; }
.cart-preorder-badge {
    display: inline-block; margin-left: 6px; padding: 1px 7px; border-radius: 999px;
    background: #fdf2e9; border: 1px solid #f5c396; color: #9c5221;
    font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.3px; vertical-align: middle;
}

/* ── Toast ────────────────────────────────────────────────────────────── */
.cart-added-toast {
    position: fixed; left: 50%; bottom: 28px; z-index: 9999;
    transform: translateX(-50%) translateY(60px); opacity: 0; pointer-events: none;
    background: var(--nd-text); color: #fff; padding: 12px 22px; border-radius: 999px;
    font-family: var(--nd-body); font-size: 14px; font-weight: 700;
    transition: transform 0.25s ease, opacity 0.25s ease;
}
.cart-added-toast.show { transform: translateX(-50%) translateY(0); opacity: 1; }
.mobile-cta { display: none; }

/* ── Mobil ──────────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
    .nd h2 { font-size: 25px; line-height: 1.15; }
    .nd main > section { scroll-margin-top: 64px; }
    body.nd-body { padding-bottom: var(--mobile-cta-h, 84px); }


    .nd-hero { padding: 0 0 32px; gap: 0; }
    .nd-gallery { flex-basis: 100%; gap: 0; }
    .gallery-main { border-radius: 0; }
    .gallery-arrow--prev { left: 10px; }
    .gallery-arrow--next { right: 10px; }
    .gallery-caption { left: 12px; right: 12px; bottom: 12px; padding: 10px 12px; font-size: 13px; }
    .gallery-thumbnails { display: none; }
    .gallery-dot-nav { display: flex; gap: 4px; justify-content: center; padding: 8px 16px 0; overflow: hidden; }
    /* Schrumpfen erlaubt: 13 × 30 px wären breiter als ein iPhone und würden die
       ganze Seite verbreitern (siehe docs/FRONTEND.md). */
    .gallery-dot {
        flex: 0 1 30px; min-width: 0; aspect-ratio: 1 / 1; padding: 0;
        border: 2px solid transparent; border-radius: 7px; background: #fff; overflow: hidden;
        opacity: 0.45; cursor: pointer;
    }
    .gallery-dot img { width: 100%; height: 100%; object-fit: cover; display: block; }
    .gallery-dot--active { border-color: var(--nd-text); opacity: 1; }
    .gallery-dot__placeholder { border-radius: 0; font-size: 10px; }

    .nd-buy { flex-basis: 100%; padding: 20px var(--nd-pad) 0; gap: 16px; }
    .nd .nd-title h1 { font-size: 40px; }
    .nd-subtitle { font-size: 17px; }
    .nd-lead { font-size: 16px; }
    .nd-features { font-size: 13px; flex-direction: column; }
    .nd-features span + span::before { content: none; }
    #checkoutForm { gap: 16px; }
    .nd-options__row { gap: 10px; }
    /* "Vorbestellung" zweizeilig unter dem Variantennamen statt abgeschnitten.
       Beide Felder einer Reihe wachsen gemeinsam (Stretch über die Spalte). */
    .nd-options__col .custom-select { flex: 1 1 auto; display: flex; }
    .custom-select__trigger {
        height: auto; min-height: 48px; padding: 6px 34px 6px 12px;
        flex-direction: column; align-items: flex-start; justify-content: center; gap: 1px;
        white-space: normal; line-height: 1.2; text-overflow: clip;
    }
    .custom-select__trigger .cs-soldout { margin-left: 0; font-size: 11px; line-height: 1.2; }
    .custom-select__option { flex-direction: column; align-items: flex-start; justify-content: center; gap: 1px; line-height: 1.25; }
    .custom-select__option .cs-soldout { font-size: 11px; }
    .custom-select__trigger::after { right: 12px; width: 14px; height: 14px; margin-top: -7px; }
    /* Auf dem Handy breiter als die halbe Spalte, sonst brechen die Varianten. */
    #csMtOptions { right: auto; width: max(100%, 220px); }
    #csFsOptions { left: auto; right: 0; width: max(100%, 280px); max-width: calc(100vw - 40px); }
    .stock-notice { font-size: 12px; }
    .nd-cables { gap: 8px; }
    .nd-cables label { min-height: 32px; }
    .nd-cables input[type="checkbox"] { width: 20px; height: 20px; margin-top: 1px; }
    .nd-price .price { font-size: 30px; }
    .nd-price .subtext { font-size: 12px; }
    .nd-cta { max-width: none; }
    .btn-checkout-main { min-height: 54px; font-size: 17px; }
    .btn-cart-add { flex-basis: 54px; width: 54px; height: 54px; }
    .nd-trust { gap: 10px; padding-top: 14px; max-width: none; }
    .nd-trust__title { font-size: 14px; }
    .nd-trust__sub { font-size: 12px; line-height: 1.35; }

    .nd-steps { padding-top: 36px; padding-bottom: 36px; gap: 20px; }
    .nd-section-head p { font-size: 15px; }
    .nd-steps__list { grid-template-columns: 1fr; gap: 20px; }
    .nd-step { padding: 0; border: 0; border-radius: 0; flex-direction: row; gap: 14px; align-items: flex-start; background: transparent; }
    .nd-step__top {
        flex: 0 0 44px; width: 44px; height: 44px; border: 1px solid var(--nd-line-2); border-radius: 12px; background: #fff;
        justify-content: center;
    }
    .nd-step__icon { width: 30px; height: 30px; }
    .nd-step__body { gap: 2px; }
    .nd-step h3 { font-size: 17px; }

    .nd-how { display: flex; flex-direction: column; gap: 16px; padding-top: 36px; padding-bottom: 36px; }
    .nd-how__title, .nd-how__model, .nd-how__text { align-self: stretch; }
    .nd-model { height: min(125vw, 520px); border-radius: 16px; }
    .nd-model-hint { margin-top: 8px; font-size: 12px; }
    .nd-how__text { gap: 16px; }
    .nd-how__text p { font-size: 15px; }
    .nd-specs { margin-top: 0; grid-template-columns: 100px minmax(0, 1fr); font-size: 14px; }
    .nd-specs dt, .nd-specs dd { padding: 11px 0; }

    .nd-compat { padding-top: 36px; padding-bottom: 36px; gap: 16px; }
    .nd-compat__main { flex-basis: 100%; gap: 16px; }
    .nd-compat__main > p { font-size: 15px; }
    .nd-compat__drawing--mobile { display: block; width: 240px; max-width: 100%; align-self: center; }
    .nd-compat__side { flex-basis: 100%; gap: 0; }
    .nd-compat__side .nd-compat__drawing { display: none; }
    .nd-machines { gap: 6px; }
    .nd-machines li { padding: 6px 10px; font-size: 13px; }
    .nd-machines .nd-machines__extra { display: none; }
    .nd-machines.is-open .nd-machines__extra { display: list-item; }
    .nd-machines .nd-machines__more { display: list-item; }
    .nd-machines.is-open .nd-machines__more { display: none; }
    .nd-machines__more button { padding: 6px 10px; font-size: 13px; }
    .nd-compat__box { padding: 18px; border-radius: 14px; gap: 6px; }
    .nd-compat__box h3 { font-size: 16px; }
    .nd-compat__box p, .nd-compat__box a { font-size: 14px; }

    /* Bewertungen: Swipe-Karussell (updateActiveReview() setzt die Höhe). */
    .nd-reviews { padding: 36px 0; gap: 16px; }
    .nd-reviews .nd-section-head { padding: 0 var(--nd-pad); display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
    .nd-reviews .nd-section-head .nd-link { order: 3; font-size: 14px; display: none; }
    .nd-reviews__summary { font-size: 14px; margin-bottom: 4px; }
    .reviews-nav { display: block; }
    .reviews-arrow { display: none; }
    .reviews-grid {
        display: flex; align-items: flex-start; gap: 12px;
        overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none;
        padding: 0 30px 4px; transition: height 0.25s ease;
    }
    .reviews-grid::-webkit-scrollbar { display: none; }
    .review-card { flex: 0 0 min(330px, calc(100vw - 60px)); scroll-snap-align: center; padding: 20px; border-radius: 14px; opacity: 0.5; transition: opacity 0.2s; }
    .review-card.is-active { opacity: 1; }
    .review-stars { font-size: 13px; }
    .review-text { font-size: 16px; }
    .review-author { font-size: 12px; }
    .reviews-loading { padding: 0 var(--nd-pad); }

    .nd-faq { padding-top: 36px; padding-bottom: 36px; gap: 8px; }
    .nd-faq__head { flex-basis: 100%; gap: 4px; order: 0; }
    .nd-faq__head .nd-link { display: none; }
    .nd-faq__list { flex-basis: 100%; }
    .nd-faq__item summary { min-height: 56px; font-size: 15px; }
    .nd-faq__answer { font-size: 14px; padding-right: 0; }

    .nd-final { padding-bottom: 36px; }
    .nd-final__card { border-radius: 16px; }
    .nd-final__img { flex-basis: 100%; min-height: 0; height: 220px; }
    .nd-final__text { flex-basis: 100%; padding: 24px; gap: 10px; }
    .nd .nd-final__text h2 { font-size: 24px; }
    .nd-final__text p { font-size: 14px; }
    .nd .nd-final__btn { align-self: stretch; justify-content: center; margin-top: 6px; }


    /* Kaufleiste unten (Höhe kommt per ResizeObserver als --mobile-cta-h). */
    .mobile-cta {
        display: flex; align-items: center; gap: 12px;
        position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
        padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
        background: rgba(255,255,255,0.97); border-top: 1px solid var(--nd-line);
        -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
    }
    .mobile-cta__info { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; flex: 0 1 auto; max-width: 45%; }
    .mobile-cta-price { font-size: 18px; font-weight: 700; white-space: nowrap; }
    .mobile-cta-variant { font-size: 12px; color: var(--nd-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .mobile-cta-btn {
        position: relative; flex: 1 1 auto; min-height: 52px; padding: 0 12px;
        border: 0; border-radius: 12px; background: var(--nd-text); color: #fff;
        font-size: 16px; font-weight: 700; cursor: pointer;
    }
    .mobile-cta-btn:disabled { background: #9a9a9a; cursor: not-allowed; }
    .back-to-top { bottom: calc(var(--mobile-cta-h, 84px) + 12px); }
    .cart-added-toast { bottom: calc(var(--mobile-cta-h, 84px) + 16px); }

    /* Lieferadresse: randloses Vollbild-Blatt. */
    #addressModal { padding: 0; background: #fff; animation: none; }
    #addressModal .modal-dialog { max-width: none; min-height: 100%; border-radius: 0; box-shadow: none; padding: 12px 20px calc(32px + env(safe-area-inset-bottom)); }
    .modal-overlay { padding: 16px 12px 40px; }
    .modal-dialog { padding: 24px 20px; border-radius: 16px; }
    .nd .modal-title { font-size: 22px; }
    .form-row .input--narrow { flex-basis: 100px; }
    .modal-dialog .form-group { margin-bottom: 14px; }
}

@media (max-width: 380px) {
    .nd .nd-title h1 { font-size: 36px; }
    .nd-trust__title { font-size: 13px; }
    .btn-checkout-main, .mobile-cta-btn { font-size: 15px; }
}
