/* #805 Phase 1 - Vorschlags-Fenster "perfekte Suche" (Claude, 01.12.2026). Nur Klassen rwn-s*, greift also nur im
   neuen Fenster (5 Marken-Themes). Lage/Breite setzt rwn-suche.js (--rwn-s-left/--rwn-s-width/--rwn-s-top/--rwn-s-maxh).
   Standard = Kacheln; Liste per Klasse is-list am <ul> (Wahl im Browser gemerkt). */
.rwn-s { --rwn-s-red: #c11b1d; --rwn-s-ok: #1e7b3c; --rwn-s-okbg: #e5f3e9; --rwn-s-grey: #6b6b6b; --rwn-s-hair: #e7e4e4;
    position: absolute; z-index: 1035; top: calc(100% + 8px); left: var(--rwn-s-left, 0); width: var(--rwn-s-width, 100%);
    max-height: var(--rwn-s-maxh, 75vh); display: flex; flex-direction: column; background: #fff; color: #1a1a1a;
    border: 1px solid #ddd; border-radius: 8px; box-shadow: 0 18px 50px rgba(0, 0, 0, .22); overflow: hidden;
    text-align: left; font-size: 14px; line-height: 1.4; }
.rwn-s *, .rwn-s *::before, .rwn-s *::after { box-sizing: border-box; }
.rwn-s a { color: inherit; text-decoration: none; }
.rwn-s a:focus-visible, .rwn-s button:focus-visible { outline: 2px solid var(--rwn-s-accent, #c11b1d); outline-offset: 2px; }

/* Fahrzeugleiste */
.rwn-s__veh { order: -2; flex: 0 0 auto; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 9px 16px; background: var(--rwn-s-okbg); border-bottom: 1px solid #d7e8dc; font-size: 13.5px; }
.rwn-s__veh b { color: var(--rwn-s-ok); }
.rwn-s__veh-ico { width: 22px; height: 22px; flex: 0 0 22px; fill: none; stroke: var(--rwn-s-ok); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.rwn-s__veh-txt { flex: 1 1 0; min-width: 0; }
.rwn-s__veh-sub { color: #44604c; }
.rwn-s__veh-btn { margin-left: auto; font-weight: 600; text-decoration: underline !important; white-space: nowrap; }
.rwn-s__veh.is-off { background: #f6f6f6; border-bottom-color: #eee; color: #444; }
.rwn-s__veh.is-off a { font-weight: 700; text-decoration: underline !important; }

/* Raster: Ergebnisse (im DOM zuerst) rechts, Seitenleiste links */
.rwn-s__grid { flex: 1 1 auto; min-height: 0; display: grid; grid-template-columns: 240px minmax(0, 1fr); grid-template-areas: "side res"; overflow: auto; overscroll-behavior: contain; }
.rwn-s__grid:not(:has(.rwn-s__sec:not([hidden]))) { grid-template-columns: minmax(0, 1fr); grid-template-areas: "res"; }
.rwn-s__side:not(:has(.rwn-s__sec:not([hidden]))) { display: none !important; }
.rwn-s__res { grid-area: res; min-width: 0; padding: 12px 14px; display: flex; flex-direction: column; }
.rwn-s__side { grid-area: side; border-right: 1px solid var(--rwn-s-hair); background: #fcfcfc; padding: 14px 0; }
.rwn-s__sec + .rwn-s__sec { margin-top: 12px; }
.rwn-s__side h4 { margin: 0 16px 4px; font-size: 11.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--rwn-s-grey); }
.rwn-s__facet, .rwn-s__recent a { display: flex; justify-content: space-between; gap: 8px; padding: 6px 16px; font-size: 14px; cursor: pointer; }
.rwn-s__facet em { font-style: normal; color: var(--rwn-s-grey); font-size: 12.5px; }
.rwn-s__facet small { color: var(--rwn-s-grey); font-variant-numeric: tabular-nums; }
.rwn-s__facet:hover, .rwn-s__recent a:hover { background: #fbe9e9; color: var(--rwn-s-red); }
.rwn-s__recent a::before { content: "\21BA"; color: var(--rwn-s-grey); margin-right: 6px; }
.rwn-s__recent a { justify-content: flex-start; }

.rwn-s__head { order: -1; display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 0 2px 10px; font-size: 13px; color: var(--rwn-s-grey); }
.rwn-s__head b { color: #1a1a1a; font-size: 14px; }
.rwn-s__hr { display: flex; align-items: center; gap: 10px; }
.rwn-s__views { display: inline-flex; border: 1px solid #ddd; border-radius: 6px; overflow: hidden; }
.rwn-s__view { width: 34px; height: 30px; display: grid; place-items: center; padding: 0; border: 0; background: #fff; color: #777; cursor: pointer; }
.rwn-s__view + .rwn-s__view { border-left: 1px solid #ddd; }
.rwn-s__view svg { fill: currentColor; }
.rwn-s__view:hover { color: #1a1a1a; }
.rwn-s__view[aria-pressed="true"] { background: #1a1a1a; color: #fff; }

/* Artikel - Grundform = Liste */
.rwn-s__items { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.rwn-s-p__link { display: grid; grid-template-columns: 84px minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 8px; border-radius: 6px; }
.rwn-s-p__link:hover, .rwn-s-p__link:focus { background: #f7f6f6; }
.rwn-s-p__img { position: relative; width: 84px; height: 84px; display: grid; place-items: center; background: #fff; border: 1px solid var(--rwn-s-hair); border-radius: 6px; }
.rwn-s-p__img img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; border-radius: 6px; }
.rwn-s-p__badge { position: absolute; z-index: 1; left: -4px; top: -4px; background: var(--rwn-s-red); color: #fff; font-size: 11.5px; font-weight: 800; line-height: 1; padding: 4px 6px; border-radius: 4px; }
.rwn-s-p__body { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.rwn-s-p__name { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: 14.5px; font-weight: 600; line-height: 1.3; }
.rwn-s-p__name mark { background: #fff1b8; color: inherit; padding: 0; }
.rwn-s-p__meta { font-size: 12.5px; color: var(--rwn-s-grey); }
.rwn-s-p__tags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 3px; }
.rwn-s-p__tag { font-size: 11.5px; font-weight: 700; border-radius: 999px; padding: 2px 8px; background: #f1f1f1; color: #444; }
.rwn-s-p__tag.is-fit { background: var(--rwn-s-okbg); color: var(--rwn-s-ok); }
.rwn-s-p__tag.is-uni { background: #eef1f6; color: #33506e; }
.rwn-s-p__price { display: flex; flex-direction: column; align-items: flex-end; text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.rwn-s-p__uvp { color: var(--rwn-s-grey); font-size: 12.5px; }
.rwn-s-p__now { font-size: 17px; font-weight: 800; }
.rwn-s-p__now small { font-size: 12.5px; font-weight: 600; }
.rwn-s-p__now.is-sale { color: var(--rwn-s-red); }
.rwn-s-p__ref, .rwn-s-p__reg { color: var(--rwn-s-grey); font-size: 11.5px; }
.rwn-s-p__st { display: inline-flex; align-items: center; gap: 5px; margin-top: 3px; font-size: 12px; color: var(--rwn-s-ok); white-space: normal; }
.rwn-s-p__st i { width: 7px; height: 7px; flex: 0 0 7px; border-radius: 50%; background: currentColor; }
.rwn-s-p__st.is-late { color: #a86200; }
.rwn-s-p__st.is-no { color: #b3261e; }
.rwn-s__items.is-list .rwn-s-p:nth-child(n+7) { display: none; }

/* Kacheln */
.rwn-s__items.is-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
.rwn-s__items.is-grid .rwn-s-p__link { height: 100%; grid-template-columns: 1fr; grid-template-rows: auto 1fr auto; gap: 8px; align-items: start; padding: 10px; border: 1px solid var(--rwn-s-hair); }
.rwn-s__items.is-grid .rwn-s-p__img { width: 100%; height: auto; aspect-ratio: 1; border: 0; background: #fafafa; }
.rwn-s__items.is-grid .rwn-s-p__price { align-items: flex-start; text-align: left; }
.rwn-s__items.is-grid .rwn-s-p__name { font-size: 13.5px; }

/* Fusszeile, keine Treffer, Chips */
.rwn-s__foot { flex: 0 0 auto; display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 14px; border-top: 1px solid var(--rwn-s-hair); background: #fcfcfc; }
.rwn-s__all { display: inline-flex; align-items: center; height: 42px; padding: 0 18px; border-radius: 4px; background: var(--rwn-s-accent, #c11b1d); color: #fff !important; font-weight: 700; }
.rwn-s__all:hover { filter: brightness(.9); }
.rwn-s__kbd { font-size: 12px; color: var(--rwn-s-grey); }
.rwn-s__kbd kbd { border: 1px solid #ccc; border-bottom-width: 2px; border-radius: 4px; padding: 0 5px; font-size: 11px; font-weight: 600; background: #fff; color: #1a1a1a; }
.rwn-s__empty { padding: 22px 18px; text-align: center; color: var(--rwn-s-grey); overflow: auto; }
.rwn-s__empty-h { color: #1a1a1a; font-weight: 700; font-size: 15px; margin-bottom: 6px; }
.rwn-s__chips { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; padding-top: 8px; }
.rwn-s__chips a { border: 1px solid #ddd; border-radius: 999px; padding: 5px 12px; font-size: 13.5px; background: #fff; color: #1a1a1a; }
.rwn-s__chips a:hover { border-color: var(--rwn-s-red); color: var(--rwn-s-red); }
.rwn-s__chips a.is-recent::before { content: "\21BA  "; color: var(--rwn-s-grey); }
.rwn-s__chips-h { width: 100%; font-weight: 700; color: #1a1a1a; text-align: left; }
.rwn-s.is-start .rwn-s__chips { justify-content: flex-start; padding: 12px 16px 16px; }
.rwn-s__clear { border: 0; background: none; color: var(--rwn-s-grey); font-size: 12.5px; text-decoration: underline; cursor: pointer; margin-left: auto; }

@media (max-width: 1199.98px) {
    .rwn-s__items.is-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .rwn-s__items.is-grid .rwn-s-p:nth-child(n+9) { display: none; }
}
@media (max-width: 991.98px) {
    .rwn-s__grid { display: flex; flex-direction: column; }
    .rwn-s__grid > * { flex: 0 0 auto; }
    .rwn-s__side { order: -1; }
    .rwn-s__side { border-right: 0; border-bottom: 1px solid var(--rwn-s-hair); padding: 8px 10px; display: flex; flex-wrap: nowrap; gap: 6px; overflow-x: auto; scrollbar-width: none; }
    .rwn-s__side::-webkit-scrollbar { display: none; }
    .rwn-s__sec { display: contents; }
    .rwn-s__side h4 { display: none; }
    .rwn-s__facet, .rwn-s__recent a { flex: 0 0 auto; padding: 4px 10px; border: 1px solid #e3e3e3; border-radius: 999px; font-size: 13px; white-space: nowrap; }
    .rwn-s__recent { display: contents; }
    .rwn-s__items.is-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .rwn-s__items.is-grid .rwn-s-p:nth-child(n+7) { display: none; }
    .rwn-s__kbd { display: none; }
    .rwn-s__all { width: 100%; justify-content: center; }
}
@media (max-width: 767.98px) {
    .rwn-s { position: fixed; top: var(--rwn-s-top, 120px); left: 8px; right: 8px; width: auto; max-height: var(--rwn-s-maxh, 70vh); border-radius: 8px; }
    .rwn-s__items.is-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
    .rwn-s__items.is-grid .rwn-s-p__link { padding: 8px; }
    .rwn-s-p__link { grid-template-columns: 64px minmax(0, 1fr); gap: 10px; }
    .rwn-s-p__img { width: 64px; height: 64px; }
    .rwn-s__items.is-list .rwn-s-p__price { grid-column: 2; align-items: flex-start; text-align: left; }
    .rwn-s__items.is-list .rwn-s-p:nth-child(n+6) { display: none; }
    .rwn-s__veh { padding: 8px 12px; font-size: 13px; }
    .rwn-s__veh-sub { display: none; }
    .rwn-s__veh-btn { margin-left: 0; }
    .rwn-s__res { padding: 10px; }
}
@media (prefers-reduced-motion: no-preference) {
    .rwn-s { animation: rwn-s-in .14s ease-out; }
    @keyframes rwn-s-in { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
}
