/* RrsExplodedView – Katalog, Modell- und Baugruppen-Seiten. Mobile first. */
.rrs-evp { --rrs-accent: #e2a62a; --rrs-ink: #1f2a33; --rrs-line: #e3e5e8; --rrs-soft: #f5f6f7; --rrs-active: #c0392b; --rrs-radius: 12px; margin: .5rem 0 2.5rem; color: var(--rrs-ink); }
.rrs-evp *, .rrs-evp *::before, .rrs-evp *::after { box-sizing: border-box; }
.rrs-evp__title { font-size: 1.35rem; line-height: 1.25; font-weight: 700; margin: 0 0 .35rem; }
.rrs-evp__intro { margin: 0 0 1rem; opacity: .8; font-size: .95rem; }
.rrs-evp__h2 { font-size: 1.1rem; font-weight: 700; margin: 1.5rem 0 .75rem; }
.rrs-evp__desc { margin: 0 0 1.25rem; }
.rrs-evp__source { margin: 1rem 0 0; font-size: .75rem; opacity: .55; }
/* SEO-Text unter den Inhalten: gut lesbar, nicht dominant */
.rrs-evp__seo { margin: 2.25rem 0 0; padding-top: 1.25rem; border-top: 1px solid var(--rrs-line); max-width: 80ch; font-size: .92rem; line-height: 1.6; color: #44515c; }
.rrs-evp__seo h2 { font-size: 1.05rem; font-weight: 700; margin: 0 0 .5rem; color: var(--rrs-ink); }
.rrs-evp__seo p { margin: 0 0 .75rem; }
@media (min-width: 768px) { .rrs-evp__title { font-size: 1.75rem; } }

/* ---------- Kacheln (Katalog, Modellreihen, Modelle, Baugruppen) ---------- */
.rrs-evp__grid { list-style: none; margin: 0; padding: 0; display: grid; gap: .75rem; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 576px) { .rrs-evp__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 992px) { .rrs-evp__grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; } }
.rrs-evp__grid > li { margin: 0; }
.rrs-evp__tile { display: flex; flex-direction: column; height: 100%; border: 1px solid var(--rrs-line); border-radius: var(--rrs-radius); background: #fff; color: inherit; text-decoration: none; overflow: hidden; transition: border-color .15s, box-shadow .15s, transform .15s; }
.rrs-evp__tile:hover, .rrs-evp__tile:focus-visible { border-color: var(--rrs-accent); box-shadow: 0 6px 18px rgba(0,0,0,.08); color: inherit; text-decoration: none; }
.rrs-evp__tile:active { transform: scale(.98); }
.rrs-evp__tile-img { display: block; aspect-ratio: 7 / 5; background: var(--rrs-soft); overflow: hidden; }
.rrs-evp__tile-img img { width: 100%; height: 100%; object-fit: contain; display: block; }
.rrs-evp__tile-body { display: flex; flex-direction: column; gap: .15rem; padding: .6rem .7rem .7rem; }
.rrs-evp__tile-title { font-weight: 700; font-size: .95rem; line-height: 1.25; }
.rrs-evp__tile-meta { font-size: .78rem; opacity: .65; }

/* ---------- Teilesuche (Modellseite) ---------- */
.rrs-evp__search { margin-top: 2rem; }
.rrs-evp__search-bar { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; margin-bottom: .75rem; }
.rrs-evp__search-bar .form-control { flex: 1 1 220px; min-height: 44px; font-size: 16px; }
.rrs-evp__search-toggle { min-height: 44px; }
.rrs-evp__search-count { font-size: .8rem; opacity: .65; }
.rrs-evp__parts { list-style: none; margin: 0; padding: 0; display: grid; gap: .4rem; }
@media (min-width: 768px) { .rrs-evp__parts { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.rrs-evp__part { display: flex; gap: .6rem; align-items: center; padding: .5rem; border: 1px solid var(--rrs-line); border-radius: 10px; background: #fff; }
.rrs-evp__part[hidden] { display: none; }
.rrs-evp__part-img { flex: 0 0 48px; width: 48px; height: 48px; border-radius: 8px; background: var(--rrs-soft); display: flex; align-items: center; justify-content: center; overflow: hidden; }
.rrs-evp__part-img img { width: 100%; height: 100%; object-fit: contain; }
.rrs-evp__part-text { min-width: 0; display: flex; flex-direction: column; gap: .15rem; }
.rrs-evp__part-name { font-weight: 600; font-size: .88rem; line-height: 1.25; color: inherit; }
.rrs-evp__part-meta { font-size: .76rem; opacity: .7; }
.rrs-evp__chips { display: flex; flex-wrap: wrap; gap: .3rem; }
.rrs-evp__chip { display: inline-flex; align-items: center; min-height: 32px; padding: .2rem .6rem; border-radius: 16px; background: var(--rrs-soft); border: 1px solid var(--rrs-line); font-size: .78rem; font-weight: 600; color: inherit; text-decoration: none; }
.rrs-evp__chip:hover { border-color: var(--rrs-accent); text-decoration: none; color: inherit; }

/* ---------- Baugruppen-Umschalter ---------- */
.rrs-evp__switch { display: flex; gap: .5rem; overflow-x: auto; margin: 0 -.75rem 1rem; padding: .1rem .75rem .5rem; scroll-snap-type: x proximity; -webkit-overflow-scrolling: touch; scrollbar-width: thin; }
.rrs-evp__switch-item { flex: 0 0 auto; scroll-snap-align: start; display: flex; align-items: center; gap: .45rem; min-height: 48px; padding: .3rem .7rem .3rem .3rem; border: 2px solid var(--rrs-line); border-radius: 24px; background: #fff; color: inherit; text-decoration: none; font-weight: 600; font-size: .88rem; white-space: nowrap; }
.rrs-evp__switch-item img { width: 52px; height: 37px; object-fit: contain; border-radius: 18px; background: var(--rrs-soft); }
.rrs-evp__switch-item:hover { border-color: #c9c9c9; color: inherit; text-decoration: none; }
.rrs-evp__switch-item.is-active { border-color: var(--rrs-accent); background: #fffaf0; }
.rrs-evp__switch-all { padding-left: .9rem; }

/* ---------- Zeichnung ---------- */
.rrs-evp__layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1rem; }
@media (min-width: 992px) {
    .rrs-evp__layout { grid-template-columns: minmax(0, 3fr) minmax(280px, 1fr); align-items: start; }
    .rrs-evp__side { position: sticky; top: 1rem; }
    .rrs-evp__list { max-height: calc(100vh - 12rem); overflow-y: auto; }
}

.rrs-evp__stage { position: relative; border: 1px solid var(--rrs-line); border-radius: var(--rrs-radius); background: #fff; }
.rrs-evp__viewport { position: relative; overflow: hidden; border-radius: var(--rrs-radius); touch-action: pan-y; user-select: none; -webkit-user-select: none; -webkit-tap-highlight-color: transparent; cursor: zoom-in; }
.rrs-evp__stage.is-zoomed .rrs-evp__viewport { cursor: grab; }
.rrs-evp__viewport.is-dragging { cursor: grabbing; }
.rrs-evp__canvas { position: relative; transform-origin: 0 0; will-change: transform; }
.rrs-evp__canvas.is-animating { transition: transform .28s ease; }
.rrs-evp__image { display: block; width: 100%; height: 100%; max-width: none; pointer-events: none; -webkit-user-drag: none; user-select: none; }

.rrs-evp__spot { position: absolute; z-index: 1; display: block; border-radius: 3px; border: calc(2px / var(--rrs-s, 1)) solid transparent; background: rgba(226,166,42,0); -webkit-user-drag: none; transition: background .15s, border-color .15s; }
.rrs-evp__spot:focus-visible, .rrs-evp__spot.is-highlight { border-color: var(--rrs-accent); background: rgba(226,166,42,.28); outline: none; }
@media (hover: hover) { .rrs-evp__spot:hover { border-color: var(--rrs-accent); background: rgba(226,166,42,.28); } }
.rrs-evp__spot--missing { background: rgba(120,120,120,.06); }
.rrs-evp__spot.is-active { border-color: var(--rrs-active); background: rgba(192,57,43,.22); animation: rrs-ev-pulse 1.4s ease-out 2; }
@keyframes rrs-ev-pulse { 0% { box-shadow: 0 0 0 0 rgba(192,57,43,.55); } 100% { box-shadow: 0 0 0 calc(18px / var(--rrs-s, 1)) rgba(192,57,43,0); } }
/* Touch: Teile leicht sichtbar machen, damit man weiß, wo man tippen kann */
@media (hover: none) { .rrs-evp__spot { background: rgba(226,166,42,.14); } }

.rrs-evp__tools { position: absolute; z-index: 4; right: .5rem; bottom: .5rem; display: flex; gap: .4rem; }
.rrs-evp__tool { width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--rrs-line); border-radius: 50%; background: rgba(255,255,255,.96); box-shadow: 0 2px 8px rgba(0,0,0,.12); font-size: 1.25rem; font-weight: 700; line-height: 1; color: var(--rrs-ink); cursor: pointer; }
.rrs-evp__tool:hover, .rrs-evp__tool:focus-visible { border-color: var(--rrs-accent); outline: none; }
.rrs-evp__tool svg { width: 20px; height: 20px; }
.rrs-evp__hint { position: absolute; z-index: 4; left: 50%; top: .6rem; transform: translateX(-50%); margin: 0; padding: .35rem .75rem; border-radius: 16px; background: rgba(31,42,51,.85); color: #fff; font-size: .78rem; white-space: nowrap; pointer-events: none; }
.rrs-evp__hint[hidden] { display: none; }

/* Vollbild */
.rrs-evp__stage.is-fullscreen { position: fixed; inset: 0; z-index: 1080; border: 0; border-radius: 0; display: flex; flex-direction: column; }
.rrs-evp__stage.is-fullscreen .rrs-evp__viewport { flex: 1 1 auto; height: 100%; border-radius: 0; }
.rrs-evp__stage.is-fullscreen .rrs-evp__tools { bottom: calc(.75rem + env(safe-area-inset-bottom)); }
html.rrs-ev-noscroll, html.rrs-ev-noscroll body { overflow: hidden; }
.rrs-evp__icon-close, .rrs-evp__stage.is-fullscreen .rrs-evp__icon-open { display: none; }
.rrs-evp__stage.is-fullscreen .rrs-evp__icon-close { display: block; }

/* ---------- Teileliste ---------- */
.rrs-evp__filter { min-height: 44px; font-size: 16px; margin-bottom: .6rem; }
.rrs-evp__list { list-style: none; margin: 0; padding: 0; display: grid; gap: .35rem; }
.rrs-evp__row { margin: 0; border: 1px solid var(--rrs-line); border-radius: 10px; background: #fff; transition: border-color .15s, box-shadow .15s; }
.rrs-evp__row[hidden] { display: none; }
.rrs-evp__row:hover { border-color: #c9c9c9; }
.rrs-evp__row.is-selected { border-color: var(--rrs-active); box-shadow: 0 0 0 3px rgba(192,57,43,.15); }
.rrs-evp__row-link { display: flex; align-items: center; gap: .6rem; min-height: 56px; padding: .4rem .5rem; color: inherit; text-decoration: none; }
.rrs-evp__row-link:hover { color: inherit; text-decoration: none; }
.rrs-evp__row-img { flex: 0 0 44px; width: 44px; height: 44px; border-radius: 8px; background: var(--rrs-soft); overflow: hidden; display: flex; align-items: center; justify-content: center; }
.rrs-evp__row-img img { width: 100%; height: 100%; object-fit: contain; }
.rrs-evp__row-text { min-width: 0; flex: 1 1 auto; display: flex; flex-direction: column; }
.rrs-evp__row-name { font-weight: 600; font-size: .86rem; line-height: 1.25; }
.rrs-evp__row-meta { font-size: .76rem; opacity: .7; }
.rrs-evp__row-pin { flex: 0 0 auto; opacity: .45; font-size: .8rem; }
.rrs-evp__note { font-size: .82rem; opacity: .75; margin: .6rem 0 0; }
.rrs-evp__missing summary { cursor: pointer; font-size: .82rem; opacity: .8; margin-top: .75rem; min-height: 32px; }
.rrs-evp__missing .rrs-evp__chips { margin-top: .4rem; }
.rrs-evp__pager { display: flex; justify-content: space-between; gap: .5rem; margin-top: 1rem; }
.rrs-evp__pager a { display: inline-flex; align-items: center; min-height: 44px; font-weight: 600; font-size: .88rem; }

/* ---------- Teilekarte: Desktop Popup, Handy Leiste unten ---------- */
.rrs-evp__panel { position: absolute; z-index: 6; width: 290px; max-width: calc(100% - 1rem); }
.rrs-evp__panel[hidden] { display: none; }
.rrs-ev-card { position: relative; display: flex; flex-direction: column; gap: .3rem; padding: .8rem; background: #fff; border: 1px solid var(--rrs-line); border-radius: 14px; box-shadow: 0 12px 32px rgba(0,0,0,.2); }
.rrs-ev-card__close { position: absolute; right: .25rem; top: .25rem; width: 40px; height: 40px; border: 0; background: none; font-size: 1.6rem; line-height: 1; cursor: pointer; opacity: .6; }
.rrs-ev-card__img { display: flex; align-items: center; justify-content: center; height: 140px; background: #f8f8f8; border-radius: 10px; overflow: hidden; }
.rrs-ev-card__img img { max-width: 100%; max-height: 100%; object-fit: contain; }
.rrs-ev-card__name { font-weight: 700; font-size: .95rem; line-height: 1.25; color: inherit; padding-right: 2rem; }
.rrs-ev-card__meta { font-size: .76rem; opacity: .65; }
.rrs-ev-card__price { font-weight: 700; font-size: 1.1rem; }
.rrs-ev-card__delivery { font-size: .8rem; }
.rrs-ev-card__delivery .delivery-information { margin: 0; }
.rrs-ev-card__btn { width: 100%; min-height: 44px; margin-top: .25rem; }
.rrs-ev-card__link { display: inline-block; font-size: .84rem; text-align: center; padding: .4rem 0; }
.rrs-ev-card__alts { margin-top: .4rem; padding-top: .45rem; border-top: 1px solid #f0f0f0; }
.rrs-ev-card__alts-title { font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; opacity: .6; margin-bottom: .3rem; }
.rrs-ev-card__alt { display: flex; align-items: center; gap: .45rem; font-size: .82rem; color: inherit; padding: .3rem 0; min-height: 44px; }
.rrs-ev-card__alt img { width: 36px; height: 36px; object-fit: contain; border-radius: 4px; background: #f6f6f6; }
.rrs-ev-card--missing .rrs-ev-card__name { padding-right: 2rem; }

@media (max-width: 767.98px) {
    .rrs-evp__panel { position: fixed; left: 0 !important; right: 0; bottom: 0; top: auto !important; width: auto; max-width: none; z-index: 1090; padding: 0 .5rem calc(.5rem + env(safe-area-inset-bottom)); }
    .rrs-ev-card { max-height: 62vh; overflow-y: auto; border-radius: 18px 18px 14px 14px; padding-top: 1.1rem; display: grid; grid-template-columns: 88px minmax(0, 1fr); column-gap: .75rem; row-gap: .2rem; align-items: start; }
    .rrs-ev-card::before { content: ''; position: absolute; left: 50%; top: .4rem; width: 40px; height: 4px; margin-left: -20px; border-radius: 2px; background: #d5d8dc; }
    .rrs-ev-card__img { grid-row: span 4; height: 88px; }
    .rrs-ev-card__btn, .rrs-ev-card__form, .rrs-ev-card__link, .rrs-ev-card__alts { grid-column: 1 / -1; }
    .rrs-ev-card--missing { display: block; }
    /* Platz, damit die Leiste nichts verdeckt */
    .rrs-evp.has-panel { padding-bottom: 45vh; }
}

/* ---------- Kacheln in der Ersatzteil-Rubrik ---------- */
.rrs-ev-tiles { margin: 2rem 0; }
.rrs-ev-tiles__heading { font-size: 1.25rem; font-weight: 700; margin: 0 0 .25rem; }
.rrs-ev-tiles__intro { margin: 0 0 .9rem; opacity: .75; font-size: .92rem; }
