/**
 * slice-139 (c1a): Warenkorb-Overlay (DS-047). Nur auf Seiten mit Checkout-Modus "neu".
 * Lokale Tokens ausschliesslich an .cr-cart (E-11); globale Tokens und Regeln
 * (--radius-overlay, --overlay-hover, .btn:hover) bleiben unveraendert.
 * Kein z-Index (Top Layer ueber <dialog>), keine Fremdklassen fuer Zustaende.
 * Breakpoints: < 768 Sheet unten | 768-1023 Panel rechts | 1024-1359 / >= 1360 Panel unten.
 */

/* ---------- Header-Ausloeser (R-2) ---------- */
.cr-cart-trigger-wrap { position: relative; }
.cr-cart-trigger.btn-icon {
	position: relative;
	width: 48px;
	height: 48px;
	min-width: 48px;
	padding: 0;
	overflow: visible;
	box-shadow: var(--shadow-raised);
}
.cr-cart-trigger .cas-icon { width: 24px; height: 24px; fill: currentColor; }
.cr-cart-trigger__badge {
	position: absolute;
	top: -8px;
	left: 32px;
	display: flex;
	align-items: center;
	justify-content: center;
	min-width: 24px;
	height: 24px;
	padding: 0 8px;
	border: 1px solid rgba(0, 0, 0, 0.9);
	border-radius: 16px;
	background: var(--yellow);
	color: rgba(0, 0, 0, 0.9);
	font-size: 14px;
	line-height: 20px;
}
.cr-cart-trigger__badge[hidden] { display: none; }
/* slice-223: Puls nach dem Flug des Panels ins Icon (Werte: Owner-Amendment-Weg) */
@keyframes cr-cart-pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.25); } }
.cr-cart-trigger__badge.is-pulse { animation: cr-cart-pulse 350ms ease-in-out 1; }

/* ---------- Scroll-Sperre (R-7) ---------- */
html.cr-cart-lock { overflow: hidden; }
html.cr-cart-lock--gutter { scrollbar-gutter: stable; }

/* ---------- Dialog, lokale Tokens ---------- */
dialog.cr-cart {
	--cr-cart-radius: 16px;
	--cr-cart-hover: rgba(0, 0, 0, 0.04);
	--cr-cart-press: rgba(0, 0, 0, 0.1);
	--cr-cart-focus: #000;
	--cr-cart-scrim: rgba(0, 0, 0, 0.45);
	--cr-cart-shadow-overlay: 0 8px 8px -4px rgba(0, 0, 0, 0.04), 0 20px 24px -4px rgba(0, 0, 0, 0.08);
	--cr-cart-strong: rgba(0, 0, 0, 0.9);
	--cr-cart-weak: rgba(0, 0, 0, 0.6);
	--cr-cart-stroke: rgba(0, 0, 0, 0.1);
	--cr-cart-dur: 400ms;
	--cr-cart-fly-ease: cubic-bezier(0.4, 0, 0.2, 1); /* slice-223: Flug ins Header-Icon */
	--cr-cart-fly-scale: 0.08;
	--cr-cart-block-gap: 24px; /* S-11: einzige Quelle des Blockabstands */
	--cr-cart-pad: 16px;
	position: fixed;
	inset: 0;
	width: 100%;
	height: 100%;
	max-width: none;
	max-height: none;
	margin: 0;
	padding: 0;
	border: 0;
	background: transparent;
	color: var(--cr-cart-strong);
	font-family: 'Grotex-Light', sans-serif;
	font-size: 16px;
	line-height: 22px;
	overflow: clip; /* clip statt hidden: kein programmatisches Scrollen des Dialogs */
}
dialog.cr-cart:not([open]) { display: none; }
dialog.cr-cart::backdrop { background: transparent; }
.cr-cart [hidden] { display: none !important; }
.cr-cart h2, .cr-cart h3, .cr-cart p { margin: 0; font-weight: 500; }
.cr-cart p { font-weight: 400; }

.cr-cart__scrim {
	position: absolute;
	inset: 0;
	background: var(--cr-cart-scrim);
	opacity: 0;
	transition: opacity var(--cr-cart-dur) ease-out;
	touch-action: none;
}
.cr-cart--open .cr-cart__scrim { opacity: 1; }

.cr-cart__sentinel { position: fixed; top: 0; left: 0; width: 1px; height: 1px; clip-path: inset(50%); outline: none; }
.cr-cart__live {
	position: absolute;
	top: 0;
	left: 0;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip-path: inset(50%);
	white-space: nowrap;
}

/* ---------- Panel (Mobile < 768: Sheet von unten) ---------- */
.cr-cart__panel {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	display: flex;
	flex-direction: column;
	height: calc(100vh - 48px);
	height: calc(100dvh - 48px);
	padding-bottom: env(safe-area-inset-bottom, 0px);
	background: #fff;
	border-radius: var(--cr-cart-radius) var(--cr-cart-radius) 0 0;
	box-shadow: var(--cr-cart-shadow-overlay);
	transform: translateY(100%);
	transition: transform var(--cr-cart-dur) ease-out;
}
.cr-cart--open .cr-cart__panel { transform: none; }

.cr-cart__head {
	position: relative; /* malt den Schatten ueber den Inhalt; kein z-index */
	flex: none;
	display: flex;
	align-items: center;
	justify-content: space-between;
	height: 56px;
	padding: 4px 4px 4px var(--cr-cart-pad);
	background: #fff;
	border-radius: inherit;
	border-bottom-left-radius: 0;
	border-bottom-right-radius: 0;
}
.cr-cart--scrolled .cr-cart__head { box-shadow: var(--shadow-raised); }
.cr-cart__title { font: 500 24px/32px 'Grotex-Medium', sans-serif; color: var(--cr-cart-strong); }
.cr-cart__title:focus, .cr-cart__empty-title:focus { outline: none; }

.cr-cart__body {
	flex: 1 1 auto;
	min-height: 0;
	display: flex;
	flex-direction: column;
	gap: var(--cr-cart-block-gap);
	padding-bottom: 24px;
	overflow-y: auto;
	overscroll-behavior: contain;
}
.cr-cart__items {
	display: flex;
	flex-direction: column;
	gap: var(--cr-cart-block-gap);
	overscroll-behavior: contain;
}
.cr-cart__notice-slot { margin-inline: var(--cr-cart-pad); }
.cr-cart__notice-slot:empty, .cr-cart__list:empty, .cr-cart__slot:empty, .cr-cart__checkout-note:empty { display: none; }
.cr-cart__list {
	display: flex;
	flex-direction: column;
	gap: 16px;
	margin: 0 var(--cr-cart-pad);
	padding: 4px 0;
	list-style: none;
}
.cr-cart__overview {
	display: flex;
	flex-direction: column;
	gap: var(--cr-cart-block-gap);
	margin-inline: var(--cr-cart-pad);
}

/* ---------- Notice (DS Information) ---------- */
.cr-cart__notice, .cr-cart__delivery {
	background: rgba(247, 247, 247, 0.9);
	border-radius: 12px;
}
.cr-cart__notice { padding: 16px; font: 500 16px/24px 'Grotex-Medium', sans-serif; }
.cr-cart__tier { overflow-wrap: anywhere; } /* slice-252 DE-252-2: langer Stufenname bricht in der Leiste um */
.cr-cart__checkout-note { margin-bottom: 8px; }

/* ---------- Karte (CONFIG ITEM PRODUCT, ohne Bild/Masszeile/Aktionsleiste) ---------- */
.cr-cart__card {
	margin: 0;
	padding: 16px;
	background: #f7f7f7;
	border-radius: 12px;
	box-shadow: var(--shadow-raised);
	list-style: none;
}
.cr-cart__name { margin-bottom: 8px !important; font: 500 20px/24px 'Grotex-Medium', sans-serif; overflow-wrap: anywhere; }
/* slice-139a: Kopfzeile mit Bild (112 x 84 / 160 x 120), Masszeile, Preis */
.cr-cart__kopf { display: flex; align-items: flex-start; gap: 12px; }
.cr-cart__media { flex: none; width: 112px; height: 84px; margin: 0; padding: 4px; overflow: hidden; border-radius: 8px; }
.cr-cart__media img { display: block; width: 100%; height: 100%; max-width: none; object-fit: contain; }
.cr-cart__meta { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.cr-cart__dims { font: 400 14px/24px 'Grotex-Light', sans-serif; color: var(--cr-cart-weak); overflow-wrap: anywhere; }
@media (min-width: 1024px) {
	.cr-cart__kopf { gap: 32px; }
	.cr-cart__media { width: 160px; height: 120px; }
}
.cr-cart__price { white-space: nowrap; font: 500 20px/24px 'Grotex-Medium', sans-serif !important; }
/* slice-228: Artikel-Positionen: Streichpreis vor dem Preis (Rot wie Unikat-Seite), Hinweiszeile, Bild-Rueckfall, Preisbestaetigung links */
.cr-cart__strike { display: block; font-weight: 400; color: var(--text-red-color, #C73A3A); text-decoration: line-through; }
.cr-cart__hint { margin: 12px 0 0; font: 400 14px/20px 'Grotex-Light', sans-serif; color: var(--cr-cart-strong); }
.cr-cart__media--fallback { background: var(--cr-cart-hover); }
.cr-cart__actions .cr-cart__action[data-cart-action="reprice"] { grid-column: 1; border-radius: 8px 8px 8px 12px; }
.cr-cart__toggle, .cr-cart__close {
	-webkit-appearance: none;
	appearance: none;
	display: flex;
	align-items: center;
	padding: 0;
	border: 0;
	background: transparent;
	color: inherit;
	font: inherit;
	cursor: pointer;
}
.cr-cart__toggle { align-self: flex-start; height: 48px; margin: 0 0 -8px -12px; }
.cr-cart__toggle-face, .cr-cart__close {
	border-radius: 8px;
	transition: background-color var(--cr-cart-dur) ease, box-shadow var(--cr-cart-dur) ease;
}
.cr-cart__toggle-face {
	display: flex;
	align-items: center;
	height: 32px;
	padding: 0 12px;
	font: 500 14px/24px 'Grotex-Medium', sans-serif;
	text-decoration: underline;
	text-decoration-thickness: 7%;
	text-underline-offset: 20%;
}
.cr-cart__close { justify-content: center; width: 48px; height: 48px; }
.cr-cart__close .cas-icon { width: 14px; height: 14px; fill: currentColor; }

.cr-cart__details {
	display: grid;
	grid-template-rows: 0fr;
	transition: grid-template-rows var(--cr-cart-dur) ease-out;
}
.cr-cart__card.is-open .cr-cart__details { grid-template-rows: 1fr; }
.cr-cart__details-in { min-height: 0; overflow: hidden; }
.cr-cart__card:not(.is-open) .cr-cart__details-in { visibility: hidden; transition: visibility 0s var(--cr-cart-dur); }
.cr-cart__details-box { margin-top: 16px; padding: 4px 12px; background: #fff; border-radius: 8px; }
.cr-cart__row { position: relative; display: flex; gap: 12px; padding: 8px 0 9px; font: 400 16px/22px 'Grotex-Light', sans-serif; }
.cr-cart__row::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: var(--cr-cart-stroke); }
.cr-cart__row:last-child { padding-bottom: 0; }
.cr-cart__row:last-child::after { display: none; }
.cr-cart__label { flex: 1 1 0; min-width: 96px; margin: 0; color: var(--cr-cart-weak); overflow-wrap: anywhere; }
.cr-cart__value { max-width: 187px; margin: 0; text-align: right; color: var(--cr-cart-strong); overflow-wrap: anywhere; }
.cr-cart__value:empty { display: none; }
/* slice-233: Mehrprodukt-Position. Eingeklappt Liste Name + Einzelpreis, aufgeklappt je Produkt ein Block; die Huellen laufen gegenlaeufig (immer genau eine sichtbar). */
.cr-cart__parts { display: grid; grid-template-rows: 1fr; transition: grid-template-rows var(--cr-cart-dur) ease-out; }
.cr-cart__parts[hidden] { display: none; }
.cr-cart__card.is-open .cr-cart__parts { grid-template-rows: 0fr; }
.cr-cart__parts-in { min-height: 0; overflow: hidden; }
.cr-cart__card.is-open .cr-cart__parts-in { visibility: hidden; transition: visibility 0s var(--cr-cart-dur); }
.cr-cart__parts-list { margin: 16px 0 0; padding: 4px 12px; list-style: none; background: #fff; border-radius: 8px; }
.cr-cart__parts-list .cr-cart__value { flex: none; max-width: none; white-space: nowrap; }
.cr-cart__details-box--parts { display: flex; flex-direction: column; gap: 8px; padding: 0; background: transparent; }
.cr-cart__part { padding: 4px 12px; background: #fff; border-radius: 8px; }
.cr-cart__part-head { display: flex; gap: 12px; padding: 4px 0; font: 500 16px/24px 'Grotex-Medium', sans-serif; color: var(--cr-cart-strong); }
.cr-cart__part-name { flex: 1 1 0; min-width: 0; margin: 0; overflow-wrap: anywhere; }
.cr-cart__part-price { flex: none; margin: 0; white-space: nowrap; }

/* ---------- slice-143 (c1b): Aktionsleiste (R-13), Platzhalter, Element 9.5 ---------- */
.cr-cart__card:focus { outline: none; }
.cr-cart__actions { display: grid; grid-template-columns: 1fr 1fr; margin: 16px -16px -16px; border-top: 1px solid var(--cr-cart-stroke); }
.cr-cart__actions .cr-cart__action { grid-column: 2; border-radius: 8px 8px 12px 8px; }
/* slice-142 R-4: Bearbeiten links, Trenner nur bei sichtbarem Bearbeiten */
.cr-cart__actions .cr-cart__action[data-cart-action="edit"] { grid-column: 1; position: relative; border-radius: 8px 8px 8px 12px; }
.cr-cart__action[data-cart-action="edit"]:not([hidden])::after { content: ''; position: absolute; right: 0; top: 12px; width: 1px; height: 24px; background: var(--cr-cart-stroke); }
.cr-cart__action .cas-icon-stift { flex: none; width: 16px; height: 16px; fill: currentColor; }
.cr-cart__action {
	-webkit-appearance: none;
	appearance: none;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	width: 100%;
	height: 48px;
	padding: 0;
	border: 0;
	border-radius: 8px;
	background: transparent;
	color: var(--cr-cart-strong);
	font: 500 16px/24px 'Grotex-Medium', sans-serif;
	cursor: pointer;
	transition: background-color var(--cr-cart-dur) ease, box-shadow var(--cr-cart-dur) ease;
}
.cr-cart__action-icon { flex: none; width: 16px; height: 18px; margin: 1px 2px; }
/* slice-150a: Entfernt-Meldung (DS 36573:9418): 127 = 16 + 24 + 8 + 22 + 8 + 49 (Fusszeile 48 + Linie), ganze Fusszeile klickbar */
.cr-cart__removed { box-sizing: border-box; display: flex; flex-direction: column; height: 127px; margin: 0; padding: 16px 16px 0; overflow: hidden; background: #f7f7f7; border-radius: 12px; box-shadow: var(--shadow-raised); list-style: none; }
.cr-cart .cr-cart__removed-name { font: 500 20px/24px 'Grotex-Medium', sans-serif; color: var(--cr-cart-strong); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cr-cart .cr-cart__removed-text { margin-top: 8px; font: 400 16px/22px 'Grotex-Light', sans-serif; color: var(--cr-cart-weak); }
.cr-cart__removed-foot { flex: none; margin: 8px -16px 0; border-top: 1px solid var(--cr-cart-stroke); }
.cr-cart__removed .cr-cart__action { border-radius: 0 0 12px 12px; }
.cr-cart__removed .cr-cart__action-icon { width: 20px; height: 20px; margin: 0; }

/* ---------- Leer-Zustand ---------- */
.cr-cart__empty { display: flex; flex-direction: column; gap: 16px; margin-inline: var(--cr-cart-pad); padding: 32px 0; }
.cr-cart__empty-title { font: 500 24px/32px 'Grotex-Medium', sans-serif; color: #000; }
.cr-cart__empty p { color: #000; line-height: 22px; }
.cr-cart__empty .btn { width: 100%; }

/* ---------- Trustpilot (slice-150a A-d: im Overview zwischen Gutschein und Kontakt), Zahlungs-Logos ---------- */
.cr-cart__trustpilot { display: flex; align-items: center; justify-content: center; min-height: 42px; padding: 8px 0; }
.cr-cart__pay { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin: 8px 0 0; padding: 0; list-style: none; }
.cr-cart__pay li { margin: 0; padding: 0; list-style: none; } /* D-004: Theme setzt li { list-style: disc } direkt */
.cr-cart__pay img { display: block; width: auto; min-width: 32px; max-width: var(--cr-paylogo-max-w); height: var(--cr-paylogo-h); object-fit: contain; } /* bugfix-137: Breite folgt dem Bild bis zur gemeinsamen Grenze (style.css :root); min. 32 = Einzel-Logos wie bisher 32 x 24 */

/* ---------- slice-140 (c2): Lieferwochen-Notice (84 = 16 + 24 + 4 + 24 + 16), Platzreservierung (E-26) ---------- */
.cr-cart__delivery { display: flex; align-items: flex-start; padding: 16px 12px 16px 16px; }
.cr-cart__delivery-icon { flex: none; display: block; width: 30px; height: 30px; margin-right: 12px; color: #000; }
.cr-cart__delivery-icon svg { display: block; }
.cr-cart__delivery-text { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.cr-cart .cr-cart__delivery-title { font: 500 20px/24px 'Grotex-Medium', sans-serif; color: var(--cr-cart-strong); }
.cr-cart .cr-cart__delivery-sub { margin-top: 4px; font: 500 14px/24px 'Grotex-Medium', sans-serif; color: var(--cr-cart-weak); }
.cr-cart__delivery-reserve { block-size: 84px; } /* leer, ohne Flaeche; Notice-Hoehe */
.cr-cart .cr-cart__slot--collapsing { overflow: hidden; block-size: 0 !important; margin-block-start: calc(-1 * var(--cr-cart-block-gap)); transition: block-size var(--cr-cart-dur) ease-out, margin-block-start var(--cr-cart-dur) ease-out; } /* reduced-motion: Gegenregel AC-8 unten */

/* ---------- Preisleiste (Sticky Price Bar) ---------- */
.cr-cart__summary { flex: none; padding: 16px var(--cr-cart-pad); background: #fff; border-radius: inherit; border-top-left-radius: 0; border-top-right-radius: 0; }
.cr-cart__bar { display: flex; min-height: 104px; border: 1px solid var(--cr-cart-stroke); border-radius: 12px; box-shadow: var(--shadow-raised); overflow: hidden; }
.cr-cart__bar::before { content: ''; flex: none; width: 4px; background: var(--yellow); }
.cr-cart__bar-in { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 8px; padding: 7px 16px 7px 15px; background: #fff; }
.cr-cart__total { display: flex; align-items: center; justify-content: space-between; font: 500 24px/32px 'Grotex-Medium', sans-serif !important; color: #000; white-space: nowrap; }
/* slice-150a: Gesamt + inkl. MwSt. (Grundlinie, Abstand 8); Hover der Leiste 150 ms */
.cr-cart__total-label { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 8px; min-width: 0; } /* D-005: bei 320 bricht inkl. MwSt. um statt den Betrag abzuschneiden */
.cr-cart__total-amount { flex: none; }
.cr-cart__vat { font: 400 14px/24px 'Grotex-Light', sans-serif; color: var(--cr-cart-weak); }
.cr-cart .cr-cart__bar .btn, .cr-cart .cr-cart__bar .btn::after { transition-duration: 150ms; } /* D-002: Spezifitaet (0,3,x) schlaegt .cr-cart .btn::after */
/* slice-150 A-8: Gutscheinzeile (DS Zeile Gutschein, Text/Success) unter Gesamt; Leiste waechst auf 132 / 140 / 132 */
.cr-cart__amount { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.cr-cart__discount { display: flex; align-items: center; justify-content: space-between; gap: 8px; color: #067a57; white-space: nowrap; font: 400 14px/24px 'Grotex-Light', sans-serif !important; }
.cr-cart__discount-code { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.cr-cart__discount-amount { flex: none; }
/* slice-150: Gutscheinblock im Overlay-Scope (E-11): Zustandsfarben aus den lokalen Overlay-Tokens; Slot ohne eigene Box (kein Leer-Gap) */
.cr-cart__slot[data-slot="voucher"] { display: contents; }
dialog.cr-cart .cr-gutschein { --cr-gs-strong: var(--cr-cart-strong); --cr-gs-weak: var(--cr-cart-weak); --cr-gs-hover: var(--cr-cart-hover); --cr-gs-press: var(--cr-cart-press); --cr-gs-focus: var(--cr-cart-focus); }
.cr-cart--empty .cr-cart__summary { display: none; }

/* ---------- slice-192: Oeffnen in einem Schritt (R-2), Uebergang "zur Kassa" (R-6, ADR-019) ---------- */
.cr-cart__summary { transition: opacity var(--cr-loader-fade, 150ms) linear; }
dialog.cr-cart.cr-cart--loading .cr-cart__summary { visibility: hidden; opacity: 0; transition: none; } /* Preisleiste erscheint im selben Zug wie die Liste */
@media (min-width: 1024px) {
	.cr-cart__body > .cr-loader-layer { grid-column: 1 / -1; grid-row: 2 / 4; } /* .cr-cart__body ist hier display: contents: Schicht deckt die Raster-Zeilen unter dem Kopf, Titel und x bleiben bedienbar */
}
dialog.cr-cart.cr-cart--handoff .cr-cart__scrim { background: var(--cr-handoff-bg, #8c8c8c); opacity: 1; transition: background-color var(--cr-loader-fade, 150ms) linear; } /* deckender Scrim (O-26): iFrame-Aktivitaet verdeckt */

/* ---------- Buttons im Baustein: lokale Zustaende (R-10, E-11) ---------- */
.cr-cart .btn { min-height: 48px; padding: 11px 20px; font-size: 16px; line-height: 24px; letter-spacing: 0; text-transform: none; }
.cr-cart .btn::after { transition: background var(--cr-cart-dur) ease; }
.cr-cart .btn:active { box-shadow: none; }
.cr-cart .btn:active::after { background: var(--cr-cart-press); transition: none; }
.cr-cart .btn-primary:active { background: var(--yellow); }
.cr-cart .btn:focus-visible { outline: 2px solid var(--cr-cart-focus); outline-offset: 4px; }
.cr-cart .btn:focus-visible::after { background: transparent; }
/* D-139-04: globales .btn:hover (schwarz/weiss) im Baustein neutralisieren; es wirken nur Flaeche 4 % + Schatten */
.cr-cart .btn-primary:hover { background: var(--yellow); border-color: var(--yellow); color: var(--black); text-decoration: none; }
.cr-cart .cr-kontakt .btn { min-height: 32px; padding: 0 12px; } /* slice-150a: Kontakt-Bauteil im Overlay-Scope (E-11) */
.cr-cart .cr-kontakt .btn:hover { background: transparent; border-color: transparent; color: var(--cr-cart-strong); text-decoration: underline; }
.cr-cart__close:active, .cr-cart__toggle:active .cr-cart__toggle-face { background: var(--cr-cart-press); box-shadow: none; transition: none; }
.cr-cart__close:focus-visible { outline: 2px solid var(--cr-cart-focus); outline-offset: 4px; }
.cr-cart__action:active { background: var(--cr-cart-press); box-shadow: none; transition: none; }
.cr-cart__action:focus-visible { outline: 2px solid var(--cr-cart-focus); outline-offset: -2px; } /* innerer Ring */
.cr-cart__toggle:focus-visible { outline: none; }
.cr-cart__toggle:focus-visible .cr-cart__toggle-face { outline: 2px solid var(--cr-cart-focus); outline-offset: 4px; }
@media (hover: hover) {
	.cr-cart .btn:hover:not(.cr-cart--no-hover) { box-shadow: var(--shadow-raised); }
	.cr-cart .btn:hover:not(.cr-cart--no-hover)::after { background: var(--cr-cart-hover); }
	.cr-cart .btn:active:hover::after { background: var(--cr-cart-press); }
	.cr-cart .btn:active:hover:not(.cr-cart--no-hover) { box-shadow: none; }
	.cr-cart__close:hover:not(.cr-cart--no-hover),
	.cr-cart__toggle:hover:not(.cr-cart--no-hover) .cr-cart__toggle-face { background: var(--cr-cart-hover); box-shadow: var(--shadow-raised); }
	.cr-cart__close:active:hover, .cr-cart__toggle:active:hover .cr-cart__toggle-face { background: var(--cr-cart-press); box-shadow: none; }
	.cr-cart__action:hover:not(.cr-cart--no-hover) { background: var(--cr-cart-hover); box-shadow: var(--shadow-raised); }
	.cr-cart__action:active:hover { background: var(--cr-cart-press); box-shadow: none; }
}

/* D-139-05: Fokusring des x (2 px + 4 px Abstand = 6 px) braucht 6 px Rand zu Panelkante/Viewport; Trefferflaeche 48 und Kopfhoehe 56 bleiben */
@media (max-width: 1023.98px) {
	.cr-cart__head { padding: 6px 6px 2px var(--cr-cart-pad); }
	.cr-cart__head .cr-cart__title { margin-top: -4px; }
}

/* ---------- Mobile: leerer Zustand waechst mit dem Inhalt ---------- */
@media (max-width: 767.98px) {
	.cr-cart--empty .cr-cart__panel { height: auto; max-height: calc(100dvh - 48px); padding-bottom: calc(16px + env(safe-area-inset-bottom, 0px)); }
	.cr-cart__head { touch-action: none; } /* Wischgeste auf der Kopfzeile (slice-143) */
}

/* ---------- Tablet 768-1023: Panel von rechts ---------- */
@media (min-width: 768px) and (max-width: 1023.98px) {
	dialog.cr-cart { --cr-cart-pad: 24px; }
	.cr-cart__panel { left: auto; top: 0; width: 720px; height: auto; border-radius: var(--cr-cart-radius) 0 0 var(--cr-cart-radius); transform: translateX(100%); }
	.cr-cart__total { font-size: 32px !important; line-height: 40px !important; }
	.cr-cart__trustpilot { min-height: 49px; }
	.cr-cart__bar { min-height: 112px; }
	.cr-cart__empty .btn { width: auto; align-self: flex-start; }
}

/* ---------- Desktop >= 1024: Panel von unten, Split 7 : 5 ---------- */
@media (min-width: 1024px) {
	dialog.cr-cart { --cr-cart-pad: 0px; }
	.cr-cart__panel {
		left: 40px;
		right: 40px;
		display: grid;
		grid-template-columns: 7fr 5fr;
		grid-template-rows: auto auto minmax(0, 1fr);
		column-gap: 32px;
		row-gap: var(--cr-cart-block-gap);
		align-content: start;
		height: calc(100vh - 40px);
		height: calc(100dvh - 40px);
		padding: 24px 40px 0;
		border-radius: var(--cr-cart-radius) var(--cr-cart-radius) 0 0;
	}
	.cr-cart__head { grid-column: 1 / -1; margin: 0 -40px; padding: 4px 28px 4px 40px; border-radius: 0; }
	.cr-cart__title { font-size: 32px; line-height: 40px; }
	.cr-cart__body { display: contents; }
	.cr-cart__items {
		grid-column: 1;
		grid-row: 2 / 4;
		min-height: 0;
		margin: -8px;
		padding: 8px;
		overflow-y: auto;
	}
	.cr-cart__summary { grid-column: 2; grid-row: 2; padding: 0; border-radius: 0; }
	.cr-cart__overview { grid-column: 2; grid-row: 3; align-self: start; margin: 0; }
	.cr-cart__trustpilot { order: -1; margin-top: -8px; min-height: 49px; } /* unter Preisleiste und Logos (Frame 20896:4235) */
	.cr-cart__pay { margin-top: 16px; }
	.cr-cart__empty .btn { width: auto; align-self: flex-start; }
	.cr-cart--empty .cr-cart__panel { height: auto; max-height: calc(100dvh - 40px); grid-template-rows: auto auto; padding-bottom: 40px; }
	.cr-cart--empty .cr-cart__items { grid-row: 2; padding-bottom: 48px; margin-bottom: -8px; }
	.cr-cart--empty .cr-cart__overview { grid-row: 2; }
}
@media (min-width: 1360px) {
	.cr-cart__panel { left: 0; right: 0; width: 1280px; margin-inline: auto; grid-template-columns: repeat(12, 1fr); }
	.cr-cart__items { grid-column: 1 / span 7; }
	.cr-cart__summary, .cr-cart__overview { grid-column: 8 / span 5; }
}

/* iFrame endet an der Leiste (B-1; Leiste: konfig-nav.css, slice-177); zweite Regel spiegelt die slice-122-Bannerregel in style_desktop.css (bei Aenderung dort nachziehen). */
body.cr-cart-has-bar #konfigurator {
	max-height: calc(100vh - var(--headerHeight) - var(--cr-cart-bar-h));
	max-height: calc(100dvh - var(--headerHeight) - var(--cr-cart-bar-h));
}
@media (min-width: 1024px) {
	html[data-cr-campaign-header-banner]:not([data-cr-campaign-header-banner="none"]):has(.cr-campaign-banner) body.cr-cart-has-bar #konfigurator {
		max-height: calc(100vh - var(--headerHeight) - var(--cr-banner-height, 0px) - var(--cr-cart-bar-h));
		max-height: calc(100dvh - var(--headerHeight) - var(--cr-banner-height, 0px) - var(--cr-cart-bar-h));
	}
}

/* ---------- Reduzierte Bewegung (AC-8) ---------- */
@media (prefers-reduced-motion: reduce) {
	.cr-cart, .cr-cart *, .cr-cart *::before, .cr-cart *::after { transition: none !important; animation: none !important; }
	.cr-cart-trigger__badge.is-pulse { animation: none; } /* slice-223: Badge liegt ausserhalb von .cr-cart */
}
