/*
 * Grundlagen: Container, Typografie, Bedienelemente, Hilfsklassen.
 * Alles unter .pl gehalten, damit das Eltern-Theme unberührt bleibt.
 */

.pl *,
.pl *::before,
.pl *::after {
	box-sizing: border-box;
}

body.pl {
	margin: 0;
	background: var(--pl-bg-page);
	color: var(--pl-text-primary);
	font-family: var(--pl-font-sans);
	font-size: var(--pl-text-md);
	line-height: var(--pl-leading-normal);
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
}

/*
 * Linkfarbe fuer gewoehnliche Verweise.
 *
 * Die Ausnahmen sind noetig, weil dieser Selektor zwei Klassen tief ist und
 * damit JEDE einklassige Komponentenregel schlaegt. Ein <a class="pl-btn
 * pl-btn--primary"> bekam so die Linkfarbe statt seiner eigenen — die
 * Schaltflaeche wurde blau auf blau und damit unlesbar. Fuer .pl-nav__cta
 * stand deshalb schon eine Sonderregel in header.css; hier ist der Riegel
 * an der Wurzel, damit nicht jede weitere Komponente ihre eigene braucht.
 *
 * Die Ausnahmen stehen in :where(), weil das selbst KEINE Spezifitaet
 * beisteuert. Ein blosses :not(.pl-btn) waere eine Klasse hoeher und wuerde
 * die Sonderregel fuer .pl-nav__cta ueberholen — die Schaltflaeche in der
 * Kopfzeile waere dann ihrerseits blau auf blau.
 */
.pl a:not(:where(.pl-btn, .pl-tile, .pl-brand, .pl-home-card, .pl-guide)) {
	color: var(--pl-text-link);
	text-decoration: none;
	transition: color var(--pl-dur-fast) var(--pl-ease-out);
}

.pl a:not(:where(.pl-btn, .pl-tile, .pl-brand, .pl-home-card, .pl-guide)):hover {
	color: var(--pl-accent-hover);
}

/* Schaltflaechen und Kacheln bringen ihren Uebergang selbst mit. */
.pl a.pl-btn,
.pl a.pl-tile {
	text-decoration: none;
}

.pl ::selection {
	background: var(--pl-blue-100);
	color: var(--pl-gray-950);
}

/*
 * Der Fokusring — mit `!important`, und das ist hier die richtige Wahl.
 *
 * Viele Bausteine setzen `box-shadow: none` mit mehr als einer Klasse, um
 * Schatten des Eltern-Themes loszuwerden (Auswahlfelder, Klappknöpfe, der
 * Preisregler, die Knöpfe der Kaufbox …) — und schlugen damit diesen Ring
 * (0,2,0). Am 3.10.2026 so gefunden: mit der Tabulatortaste war auf
 * mehreren Bedienelementen gar nicht mehr zu sehen, wo man steht. Ein
 * sichtbarer Fokus darf an keiner Spezifität scheitern.
 *
 * Die Rundung steht dagegen in `:where()` und damit auf Spezifität (0,1,0):
 * eine Karte mit eigenem Radius (10px) behält ihn beim Fokus, statt auf 4px
 * zu springen. Nur was selbst keinen hat — ein Textlink —, bekommt 4px.
 */
.pl :focus-visible {
	outline: none;
	box-shadow: var(--pl-focus-ring) !important;
}

.pl :where(:focus-visible) {
	border-radius: var(--pl-radius-xs);
}

.pl img {
	max-width: 100%;
	height: auto;
}

/* Layout -------------------------------------------------------------- */

.pl-container {
	width: 100%;
	max-width: var(--pl-container-max);
	margin: 0 auto;
	padding: 0 var(--pl-gutter);
}

.pl-main {
	display: block;
	min-height: 50vh;
}

.pl-page {
	padding: var(--pl-space-10) 0 var(--pl-space-24);
}

.pl-page__title {
	margin: 0 0 var(--pl-space-2);
	font-size: var(--pl-text-3xl);
	font-weight: var(--pl-weight-bold);
	letter-spacing: var(--pl-tracking-tighter);
	line-height: var(--pl-leading-snug);
}

.pl-page__lead {
	margin: 0;
	color: var(--pl-text-secondary);
}

/* Hilfsklassen -------------------------------------------------------- */

.pl .screen-reader-text,
.pl-skip {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0 0 0 0);
	clip-path: inset(50%);
	white-space: nowrap;
	border: 0;
}

.pl-skip:focus {
	position: fixed;
	top: var(--pl-space-3);
	left: var(--pl-space-3);
	z-index: 200;
	width: auto;
	height: auto;
	margin: 0;
	padding: var(--pl-space-3) var(--pl-space-5);
	clip: auto;
	clip-path: none;
	background: var(--pl-surface-inverse);
	color: var(--pl-text-inverse);
	border-radius: var(--pl-radius-sm);
	font-weight: var(--pl-weight-semibold);
}

.pl [hidden] {
	display: none !important;
}

/* Wortmarke ----------------------------------------------------------- */

.pl-wordmark {
	font-size: var(--pl-text-xl);
	font-weight: var(--pl-weight-bold);
	letter-spacing: var(--pl-tracking-tight);
	color: var(--pl-text-primary);
	white-space: nowrap;
}

.pl-wordmark span {
	color: var(--pl-accent);
}

.pl-wordmark--inverse {
	color: var(--pl-text-inverse);
}

.pl-wordmark--inverse span {
	color: var(--pl-blue-400);
}

/* Buttons ------------------------------------------------------------- */

.pl-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: var(--pl-space-2);
	height: var(--pl-control-h-lg);
	padding: 0 var(--pl-space-6);
	border: 1px solid transparent;
	border-radius: var(--pl-radius-sm);
	font-family: inherit;
	font-size: var(--pl-text-md);
	font-weight: var(--pl-weight-semibold);
	line-height: 1;
	cursor: pointer;
	text-decoration: none;
	transition: background var(--pl-dur-fast) var(--pl-ease-out),
		border-color var(--pl-dur-fast) var(--pl-ease-out),
		color var(--pl-dur-fast) var(--pl-ease-out);
}

.pl-btn--primary {
	background: var(--pl-accent);
	color: var(--pl-text-inverse);
}

.pl-btn--primary:hover {
	background: var(--pl-accent-hover);
	color: var(--pl-text-inverse);
}

.pl-btn--primary:active {
	background: var(--pl-accent-press);
}

.pl-btn--ghost {
	background: var(--pl-gray-0);
	border-color: var(--pl-border-strong);
	color: var(--pl-text-primary);
}

.pl-btn--ghost:hover {
	border-color: var(--pl-gray-500);
	color: var(--pl-text-primary);
}

/*
 * Verschoben aus home.css (29.9.2026): die Variante steht jetzt auf der
 * Startseite UND im Beratungs-Block der CAD-Landingpage. In home.css waere
 * sie dort nicht geladen gewesen -- und eine zweite Fassung in pages.css
 * waere zwei Weiss-Werte fuer denselben Knopf. Button-Varianten gehoeren
 * ohnehin zu den uebrigen Buttons.
 */
/*
 * Zweitrangige Schaltfläche auf dem Bild. Kein Weiss-auf-Weiss, sondern eine
 * Kontur — auf einem hellen Foto bliebe eine weisse Fläche sonst unsichtbar.
 */
.pl-btn--onimage {
	background: rgba(255, 255, 255, 0.12);
	border-color: rgba(255, 255, 255, 0.55);
	color: var(--pl-text-inverse);
	backdrop-filter: blur(6px);
}

.pl-btn--onimage:hover {
	background: rgba(255, 255, 255, 0.2);
	border-color: rgba(255, 255, 255, 0.8);
	color: var(--pl-text-inverse);
}

/*
 * Weisse Schaltfläche auf dunklem Grund — Bühne und Konfigurator-Band der
 * Startseite. Ohne Rahmen wie im Entwurf: der durchsichtige 1px-Rahmen von
 * `.pl-btn` machte sie sonst 2px breiter als dort.
 */
.pl-btn--light {
	border-width: 0;
	background: var(--pl-gray-0);
	color: var(--pl-text-primary);
}

.pl-btn--light:hover {
	background: #ededf0;
	color: var(--pl-text-primary);
}

/*
 * Kontur auf dem Bild, ohne Milchglas — die zweite Schaltfläche der Bühne.
 * `--onimage` daneben trägt `backdrop-filter` und eine kräftigere Fläche;
 * das ist der Entwurf der CAD-Seite, nicht der der Startseite.
 */
.pl-btn--glass {
	background: rgba(255, 255, 255, 0.08);
	border-color: rgba(255, 255, 255, 0.55);
	color: var(--pl-text-inverse);
}

.pl-btn--glass:hover {
	background: rgba(255, 255, 255, 0.16);
	border-color: #fff;
	color: var(--pl-text-inverse);
}

/*
 * Fokus und Druck behalten die Schriftfarbe.
 *
 * Das Eltern-Theme setzt `a:hover, a:focus, a:active { color: #2154ac }`
 * (0,1,1) — gegen die einzelne Variantenklasse gewinnt das. Abgesichert war
 * nur `:hover`; bei Tastaturfokus und beim Drücken wurde „Direkt Ihr Notebook
 * konfigurieren" dunkelblau auf dem dunklen Bild und „Angebot anfordern" blau
 * auf blau. Im Entwurf zeigt der Fokus nur den Ring.
 */
.pl a.pl-btn--primary:focus,
.pl a.pl-btn--primary:active,
.pl a.pl-btn--glass:focus,
.pl a.pl-btn--glass:active,
.pl a.pl-btn--onimage:focus,
.pl a.pl-btn--onimage:active {
	color: var(--pl-text-inverse);
}

.pl a.pl-btn--light:focus,
.pl a.pl-btn--light:active,
.pl a.pl-btn--ghost:focus,
.pl a.pl-btn--ghost:active {
	color: var(--pl-text-primary);
}

.pl-btn--block {
	width: 100%;
}

.pl-btn[disabled],
.pl-btn.is-busy {
	opacity: 0.55;
	pointer-events: none;
}

.pl-iconbtn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 38px;
	height: 38px;
	padding: 0;
	background: none;
	border: none;
	border-radius: var(--pl-radius-sm);
	color: var(--pl-text-primary);
	cursor: pointer;
	transition: background var(--pl-dur-fast) var(--pl-ease-out);
}

.pl-iconbtn:hover {
	background: var(--pl-surface-card);
}

/* Das Eltern-Theme setzt `button:focus { outline: thin dotted }`; nach einem
   Mausklick stand dann ein gepunkteter Rahmen um das Symbol, solange das
   Menü offen war. Tastaturfokus zeigt weiter den Ring aus `.pl :focus-visible`. */
.pl .pl-iconbtn:focus,
.pl .pl-langbtn:focus {
	outline: none;
}

/* Preise -------------------------------------------------------------- */

.pl-price,
.pl-price .amount,
.pl-price bdi {
	font-family: var(--pl-font-mono);
	font-size: var(--pl-text-md);
	font-weight: var(--pl-weight-medium);
	color: var(--pl-text-primary);
}

.pl-price--lg,
.pl-price--lg .amount,
.pl-price--lg bdi {
	font-size: 24px;
}

.pl-price--xl,
.pl-price--xl .amount,
.pl-price--xl bdi {
	font-size: 26px;
	font-weight: var(--pl-weight-semibold);
}

.pl-price del {
	color: var(--pl-text-tertiary);
	font-weight: var(--pl-weight-regular);
	margin-right: var(--pl-space-2);
}

.pl-price__legal {
	display: block;
	font-family: var(--pl-font-sans);
	font-size: var(--pl-text-xs);
	color: var(--pl-text-tertiary);
	line-height: var(--pl-leading-normal);
}

/* Verfügbarkeit ------------------------------------------------------- */

.pl-stock {
	display: inline-flex;
	align-items: center;
	gap: var(--pl-space-2);
	min-height: 22px;
	padding: 2px var(--pl-space-2);
	border-radius: var(--pl-radius-xs);
	font-size: var(--pl-text-xs);
	font-weight: var(--pl-weight-medium);
	line-height: 1.3;
	white-space: nowrap;
}

.pl-stock--in {
	background: var(--pl-success-bg);
	color: var(--pl-green-700);
}

.pl-stock--out {
	background: var(--pl-surface-card);
	color: var(--pl-text-secondary);
}

.pl-stock__dot {
	width: 5px;
	height: 5px;
	border-radius: var(--pl-radius-pill);
	background: currentColor;
}

.pl-badge {
	display: inline-flex;
	align-items: center;
	height: 24px;
	padding: 0 var(--pl-space-3);
	border-radius: var(--pl-radius-xs);
	font-size: var(--pl-text-xs);
	font-weight: var(--pl-weight-medium);
}

.pl-badge--cto {
	background: var(--pl-accent-subtle);
	color: var(--pl-blue-700);
}

/* Auswahlfelder ------------------------------------------------------- */

.pl-select {
	position: relative;
	display: inline-flex;
	align-items: center;
}

.pl-select select {
	appearance: none;
	-webkit-appearance: none;
	height: var(--pl-control-h-md);
	padding: 0 34px 0 var(--pl-space-3);
	background: var(--pl-gray-0);
	border: 1px solid var(--pl-border-input);
	border-radius: var(--pl-radius-sm);
	font-family: inherit;
	font-size: var(--pl-text-base);
	font-weight: var(--pl-weight-medium);
	color: var(--pl-text-primary);
	cursor: pointer;
}

.pl-select select:hover {
	border-color: var(--pl-gray-500);
}

.pl-select > .pl-icon {
	position: absolute;
	right: var(--pl-space-3);
	color: var(--pl-text-secondary);
	pointer-events: none;
}

/* Optionen (Checkbox/Radio) ------------------------------------------- */

.pl-option {
	display: flex;
	align-items: center;
	gap: var(--pl-space-3);
	min-height: 30px;
	font-size: var(--pl-text-base);
	color: var(--pl-text-primary);
	cursor: pointer;
}

.pl-option__input {
	flex: none;
	margin: 0;
	accent-color: var(--pl-accent);
	width: 15px;
	height: 15px;
}

.pl-option__label {
	flex: 1;
	min-width: 0;
}

.pl-option__delta {
	flex: none;
	font-family: var(--pl-font-mono);
	font-size: var(--pl-text-xs);
	color: var(--pl-text-tertiary);
	font-variant-numeric: tabular-nums;
}

/*
 * Ersparnis absetzen, damit sie sich vom Aufpreis unterscheidet — sonst
 * liest sich "− 95,20 €" auf einen Blick wie ein weiterer Aufschlag.
 */
.pl-option__delta--minus {
	color: var(--pl-accent-strong, var(--pl-text-secondary));
}

/* Fließtext ----------------------------------------------------------- */

.pl-prose {
	color: var(--pl-text-secondary);
	line-height: var(--pl-leading-relaxed);
	max-width: 760px;
}

.pl-prose > :first-child {
	margin-top: 0;
}

.pl-prose > :last-child {
	margin-bottom: 0;
}

/*
 * Ueberschriften im Beschreibungstext tragen KEINE eigene Optik.
 *
 * Der Editor der Warenwirtschaft kann H3 bis H6, aber nur als Gliederung:
 * im Text sollen sie stehen wie der Text drumherum, bloss mit dem Tag darum.
 * Ohne diese Regel griffe hier der Browser-Standard (gross und fett), und
 * der Shop zeigte etwas anderes als das Feld, in das es jemand getippt hat.
 *
 * Das Gegenstueck steht in `wws/resources/css/app.css` unter `.rt__feld`.
 * Wer ihnen wieder ein Aussehen geben will, aendert BEIDE Stellen.
 *
 * Nur innerhalb von `.pl-prose`: die Abschnittsueberschriften der
 * Produktseite (`.pl-pdp__subhead`) behalten ihre.
 */
.pl-prose h3,
.pl-prose h4,
.pl-prose h5,
.pl-prose h6 {
	margin: 0 0 1em;
	font-size: inherit;
	font-weight: inherit;
	line-height: inherit;
	color: inherit;
}

.pl-bullets {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: var(--pl-space-2);
	max-width: 760px;
}

.pl-bullets li {
	position: relative;
	padding-left: var(--pl-space-4);
	color: var(--pl-text-secondary);
}

.pl-bullets li::before {
	content: "";
	position: absolute;
	left: 0;
	top: 0.62em;
	width: 4px;
	height: 4px;
	border-radius: var(--pl-radius-pill);
	background: var(--pl-accent);
}

/* Brotkrumen ---------------------------------------------------------- */

.pl-crumbs {
	padding: var(--pl-space-5) 0 0;
	font-size: var(--pl-text-sm);
	color: var(--pl-text-tertiary);
}

.pl-crumbs a {
	color: var(--pl-text-secondary);
}

.pl-crumbs a:hover {
	color: var(--pl-text-primary);
}

.pl-crumbs__sep {
	margin: 0 var(--pl-space-2);
	color: var(--pl-gray-300);
}

/* Overlay-Abdunkelung (Filter-Schublade auf Mobilgeräten) ------------- */

.pl-scrim {
	position: fixed;
	inset: 0;
	z-index: 60;
	background: rgba(15, 15, 18, 0.4);
	backdrop-filter: blur(2px);
}

@media (prefers-reduced-motion: reduce) {
	.pl *,
	.pl *::before,
	.pl *::after {
		transition-duration: 0.01ms !important;
		animation-duration: 0.01ms !important;
	}
}

/* Rechtstext-Pop-up -------------------------------------------------- */

/*
 * Ein Abschnitt der Seite Rechtliches in einem `<dialog>` (`pl_legal_dialogs()`,
 * inc/product-data.php; legal-dialog.js): „Versandkosten“ auf den
 * Produktseiten (seit dem 31.10.2026), AGB, Datenschutz, Cookies und Widerruf
 * in der Kasse (seit dem 3.11.2026). Bis dahin `.pl-versand-dialog` in
 * product.css.
 */
/*
 * Halb so breit wie der Inhalt der Seite (Container ohne Rand), auf schmalen
 * Bildschirmen nie schmaler als 480px oder breiter als das Fenster minus
 * 32px. Der Innenrand sitzt am Rumpf und nicht am `<dialog>`: so ist ein
 * Klick, dessen Ziel der Dialog selbst ist, immer einer daneben.
 */
.pl-legal-dialog {
	width: min(calc(100vw - 32px), max(480px, calc((min(100vw, var(--pl-container-max)) - 2 * var(--pl-gutter)) / 2)));
	max-width: none;
	max-height: calc(100vh - 48px);
	margin: auto;
	padding: 0;
	border: 1px solid var(--pl-border-hairline);
	border-radius: var(--pl-radius-lg);
	background: #fff;
	color: var(--pl-text-primary);
	box-shadow: var(--pl-shadow-overlay);
}

.pl-legal-dialog::backdrop {
	background: rgba(15, 15, 18, 0.4);
}

.pl-legal-dialog__body {
	max-width: none;
	padding: var(--pl-space-8);
	font-size: var(--pl-text-md);
}

.pl-legal-dialog__body h2 {
	margin: 0 var(--pl-space-10) var(--pl-space-5) 0;
	font-family: inherit;
	font-size: 22px;
	font-weight: var(--pl-weight-semibold);
	line-height: 1.3;
	letter-spacing: -0.01em;
	color: var(--pl-text-primary);
}

.pl-legal-dialog__body h3 {
	margin: var(--pl-space-5) 0 var(--pl-space-1);
	font-weight: var(--pl-weight-semibold);
	color: var(--pl-text-primary);
}

.pl-legal-dialog__body p {
	margin: 0;
}

/*
 * Mit `.pl` und Elementnamen davor: das Eltern-Theme gibt jedem `button`
 * Fläche, Polster und Versalien.
 *
 * Das Kreuz KLEBT oben rechts (seit dem 3.11.2026): absolut gesetzt scrollte
 * es mit dem Text weg, und bei den AGB blieb auf dem Telefon nach dem ersten
 * Wischen nichts zum Schliessen als der 16px schmale Rand. Es steht im Fluss
 * (rechts über `margin-left: auto`), der negative Rand unten zieht den Rumpf
 * wieder ganz nach oben — ungescrollt steht alles wie vorher. Weisser Grund,
 * weil der Text beim Scrollen darunter durchläuft.
 */
.pl button.pl-legal-dialog__close {
	position: sticky;
	top: var(--pl-space-5);
	z-index: 1;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	min-width: 0;
	padding: 0;
	margin: var(--pl-space-5) var(--pl-space-5) calc(-36px - var(--pl-space-5)) auto;
	background: #fff;
	border: 0;
	border-radius: var(--pl-radius-xs);
	box-shadow: none;
	color: var(--pl-text-secondary);
	cursor: pointer;
}

.pl button.pl-legal-dialog__close:hover {
	background: var(--pl-gray-50);
	color: var(--pl-text-primary);
}

@media (max-width: 600px) {
	.pl-legal-dialog__body {
		padding: var(--pl-space-5);
	}

	.pl button.pl-legal-dialog__close {
		top: var(--pl-space-3);
		margin: var(--pl-space-3) var(--pl-space-3) calc(-36px - var(--pl-space-3)) auto;
	}
}

/* Marken der Zahlungsarten ------------------------------------------------
 * In HTML und CSS nachgebaut wie im Entwurf, keine Markenbilder von aussen
 * (`pl_paymarks_html()`, inc/icons.php). Seit dem 9.11.2026 hier statt in
 * product.css: der Footer zeigt sie auf jeder Seite, dazu „Rechnung" und
 * „Amazon Pay". */
.pl-paymarks {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px;
}

.pl-paymark {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 42px;
	height: 26px;
	border: 1px solid #e3e3e8;
	border-radius: 4px;
	background: #fff;
	line-height: 1;
	white-space: nowrap;
}

.pl-paymark--visa {
	font-size: 11px;
	font-weight: 800;
	font-style: italic;
	letter-spacing: 0.02em;
	color: #1a1f71;
}

.pl-paymark--mc span {
	display: inline-block;
	width: 13px;
	height: 13px;
	border-radius: 999px;
	background: #eb001b;
}

.pl-paymark--mc span + span {
	margin-left: -5px;
	background: #f79e1b;
	mix-blend-mode: multiply;
}

.pl-paymark--paypal {
	font-size: 10px;
	font-weight: 700;
	font-style: italic;
	color: #003087;
}

.pl-paymark--paypal span {
	color: #0070ba;
}

/* Rechnung: kein Markenzeichen, ein Belegsymbol mit dem Wort. */
.pl-paymark--rechnung {
	width: auto;
	gap: 4px;
	padding: 0 7px;
	font-size: 11px;
	font-weight: 600;
	color: #2a2a31;
}

.pl-paymark--rechnung svg {
	flex: none;
}

/* Amazon Pay: „amazon" fett mit dem orangen Bogen darunter, „pay" daneben. */
.pl-paymark--amazon {
	width: auto;
	gap: 2px;
	padding: 0 7px 2px;
	font-size: 11px;
	font-weight: 400;
	letter-spacing: -0.01em;
	color: #232f3e;
}

.pl-paymark__amazon {
	position: relative;
	font-weight: 800;
}

.pl-paymark__amazon::after {
	content: '';
	position: absolute;
	left: 10%;
	right: 6%;
	bottom: -4px;
	height: 4px;
	border-bottom: 1.5px solid #ff9900;
	border-radius: 0 0 60% 60%;
}

/* --------------------------------------------------------------------------
 * Germanizeds Hinweis auf die gesetzliche Gewährleistung (das Bild, nur auf
 * dem Server) — ausgeblendet seit dem 9.11.2026, so gewünscht. Überall, wo
 * das Theme-CSS greift; in den Mails steht er weiter.
 *
 * Er ist die „harmonisierte Mitteilung“ aus Art. 6 Abs. 1 lit. l und
 * Art. 22a der Verbraucherrechte-Richtlinie (gilt seit dem 27.9.2026): vor
 * einer Bestellung durch Verbraucher ist sie Pflicht. Wer sie hier
 * ausblendet, muss sie an anderer Stelle vor dem Kaufabschluss zeigen —
 * zurück kommt sie, indem diese Regel fällt.
 * ------------------------------------------------------------------------ */
.wc-gzd-legal-guarantee {
	display: none !important;
}
