/* =====================================================================
   Pott-Ware – UI-Komponenten v1.0 (zu Tokens v1.0)
   Baut ausschließlich auf ../tokens.css auf (Semantik-Variablen, Schicht dunkel/hell).
   Präfix pw-, Zustände über :hover/:focus-visible/:active/[disabled]/[aria-invalid]
   und zur Dokumentation zusätzlich .is-hover/.is-focus/.is-active.
   Mobil: Komponenten reagieren auf ihren Container (container queries), nicht auf den Viewport.
   ===================================================================== */

/* Bedien-Höhen, Ebenen, Preisgrößen: siehe tokens.css */

.pw-container { container-type: inline-size; }

/* ---------- Grundtypografie in Komponenten ---------- */
.pw-display { font-family: var(--font-display); font-weight: 800; text-transform: uppercase; letter-spacing: var(--track-display); line-height: var(--lh-heading); }
.pw-caption { font-size: var(--fs-caption); letter-spacing: var(--track-caption); text-transform: uppercase; font-weight: 600; color: var(--text-muted); }
.pw-mono { font-family: var(--font-mono); }
.pw-muted { color: var(--text-muted); }

/* ---------- Links ---------- */
.pw-link { color: var(--link); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.pw-link:hover, .pw-link.is-hover { text-decoration-thickness: 2px; }
.pw-link:focus-visible, .pw-link.is-focus { outline: none; box-shadow: var(--focus); border-radius: var(--radius-1); }

/* ---------- Icons ---------- */
.pw-icon { width: 24px; height: 24px; flex: none; }
.pw-icon-sm { width: 20px; height: 20px; }
.pw-icon-xs { width: 16px; height: 16px; }

/* ---------- Buttons ---------- */
.pw-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s-2);
  min-height: var(--control-h); padding: 0 var(--s-5);
  font-family: var(--font-display); font-weight: 700; font-size: 18px; letter-spacing: .04em; text-transform: uppercase; line-height: 1;
  border: 2px solid transparent; border-radius: var(--radius-1); cursor: pointer; text-decoration: none;
  transition: background var(--dur) var(--ease), border-color var(--dur) var(--ease), color var(--dur) var(--ease), transform var(--dur-fast) var(--ease);
  -webkit-tap-highlight-color: transparent; white-space: nowrap;
}
.pw-btn .pw-icon { width: 20px; height: 20px; }
.pw-btn:focus-visible, .pw-btn.is-focus { outline: none; box-shadow: var(--focus); }
.pw-btn:active, .pw-btn.is-active { transform: translateY(1px); }

/* Kaufen: Glut. Nur für Kauf-Aktionen (In den Warenkorb, Zur Kasse, Zahlungspflichtig bestellen). */
.pw-btn--kauf { background: var(--action-bg); color: var(--action-text); }
.pw-btn--kauf:hover, .pw-btn--kauf.is-hover { background: var(--action-bg-hover); }
.pw-btn--kauf:active, .pw-btn--kauf.is-active { background: var(--corten-500); color: var(--weiss); }

/* Primär (nicht Kauf): Kohle/Kalk-Fläche */
.pw-btn--primaer { background: var(--text); color: var(--bg-raised); }
.pw-btn--primaer:hover, .pw-btn--primaer.is-hover { background: var(--brand); color: var(--weiss); }

/* Sekundär: Kontur */
.pw-btn--sekundaer { background: transparent; color: var(--text); border-color: var(--line-strong); }
.pw-btn--sekundaer:hover, .pw-btn--sekundaer.is-hover { border-color: var(--text); background: var(--bg-muted); }

/* Text-Button */
.pw-btn--text { background: transparent; color: var(--link); padding: 0 var(--s-2); min-height: var(--control-h-sm); }
.pw-btn--text:hover, .pw-btn--text.is-hover { background: var(--bg-muted); }

/* Gefahr (Löschen, Stornieren) */
.pw-btn--gefahr { background: transparent; color: var(--danger); border-color: currentColor; }
.pw-btn--gefahr:hover, .pw-btn--gefahr.is-hover { background: var(--danger); color: var(--bg-raised); border-color: var(--danger); }

.pw-btn--sm { min-height: var(--control-h-sm); padding: 0 var(--s-4); font-size: 16px; }
.pw-btn--lg { min-height: var(--control-h-lg); padding: 0 var(--s-6); font-size: 20px; }
.pw-btn--block { display: flex; width: 100%; }
.pw-btn--icon { padding: 0; width: var(--control-h); flex: none; }
.pw-btn--icon.pw-btn--sm { width: var(--control-h-sm); }

.pw-btn[disabled], .pw-btn.is-disabled, .pw-btn[aria-disabled="true"] {
  background: var(--bg-muted); color: var(--text-muted); border-color: transparent; cursor: not-allowed; transform: none;
}
.pw-btn[aria-busy="true"] { cursor: progress; }
.pw-btn[aria-busy="true"] .pw-btn__label { opacity: .85; }

/* Lade-Anzeige: drehende Seilscheibe */
.pw-seilscheibe { width: 20px; height: 20px; animation: pw-dreh 900ms linear infinite; }
@keyframes pw-dreh { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .pw-seilscheibe { animation-duration: 3s; } .pw-btn, .pw-karte { transition: none; } }

/* ---------- Badges ---------- */
.pw-badge {
  display: inline-flex; align-items: center; gap: 4px; padding: 3px 8px;
  font: 600 11px/1.4 var(--font-text); letter-spacing: .06em; text-transform: uppercase;
  border-radius: var(--radius-1); border: 1px solid transparent; white-space: nowrap;
}
.pw-badge .pw-icon { width: 14px; height: 14px; }
.pw-badge--sofort { background: var(--corten-500); color: var(--weiss); }
.pw-badge--info { background: transparent; color: var(--accent); border-color: currentColor; }
.pw-badge--ok { background: transparent; color: var(--success); border-color: currentColor; }
.pw-badge--warnung { background: transparent; color: var(--warning); border-color: currentColor; }
.pw-badge--aus { background: var(--bg-muted); color: var(--text-muted); }
.pw-badge--neutral { background: transparent; color: var(--text-muted); border-color: var(--line-strong); }

/* ---------- Formulare ---------- */
.pw-feld { display: flex; flex-direction: column; gap: 6px; }
.pw-label { font-size: var(--fs-small); font-weight: 600; color: var(--text); }
.pw-label .pw-pflicht { color: var(--text-muted); font-weight: 400; }
.pw-hinweis { font-size: var(--fs-small); color: var(--text-muted); display: flex; gap: 6px; align-items: flex-start; }
.pw-hinweis .pw-icon { width: 16px; height: 16px; margin-top: 2px; }

.pw-input, .pw-select, .pw-textarea {
  font: 400 var(--fs-body)/1.4 var(--font-text); color: var(--text);
  min-height: var(--control-h); padding: 10px 12px; width: 100%;
  background: var(--bg-raised); border: 1px solid var(--line-control); border-radius: var(--radius-1);
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.pw-input::placeholder, .pw-textarea::placeholder { color: var(--text-muted); opacity: 1; }
.pw-input:hover, .pw-select:hover, .pw-textarea:hover, .pw-input.is-hover { border-color: var(--text-muted); }
.pw-input:focus, .pw-select:focus, .pw-textarea:focus, .pw-input.is-focus { outline: none; border-color: var(--text); box-shadow: var(--focus); }
.pw-input[disabled], .pw-select[disabled], .pw-textarea[disabled] { background: var(--bg-muted); color: var(--text-muted); cursor: not-allowed; }
.pw-input[readonly] { background: var(--bg-sunken); }
.pw-feld--fehler .pw-input, .pw-input[aria-invalid="true"] { border-color: var(--danger); border-width: 2px; padding: 9px 11px; }
.pw-feld--fehler .pw-hinweis { color: var(--danger); }
.pw-feld--ok .pw-input { border-color: var(--success); }
.pw-feld--ok .pw-hinweis { color: var(--success); }
.pw-textarea { min-height: 120px; resize: vertical; }
.pw-select {
  appearance: none; padding-right: 40px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236e6a64' stroke-width='2' stroke-linecap='square'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; background-size: 18px;
}

/* Eingabe mit Icon/Knopf (Suche, Passwort) */
.pw-eingabe { position: relative; display: flex; align-items: stretch; }
.pw-eingabe > .pw-icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--text-muted); pointer-events: none; width: 20px; height: 20px; }
.pw-eingabe > .pw-icon + .pw-input { padding-left: 42px; }
.pw-eingabe > .pw-input { flex: 1; }
.pw-eingabe > .pw-eingabe__knopf { position: absolute; right: 2px; top: 2px; bottom: 2px; display: flex; align-items: center; padding: 0 10px; background: none; border: 0; color: var(--text-muted); cursor: pointer; border-radius: var(--radius-1); }
.pw-eingabe > .pw-eingabe__knopf:hover { color: var(--text); }
.pw-eingabe > .pw-eingabe__knopf:focus-visible { outline: none; box-shadow: var(--focus); }

/* Checkbox & Radio */
.pw-wahl { display: flex; gap: var(--s-3); align-items: flex-start; cursor: pointer; font-size: var(--fs-body); line-height: 1.45; }
.pw-wahl input { appearance: none; flex: none; width: 22px; height: 22px; margin-top: 1px; background: var(--bg-raised); border: 2px solid var(--line-control); border-radius: var(--radius-1); display: grid; place-items: center; cursor: pointer; transition: background var(--dur-fast), border-color var(--dur-fast); }
.pw-wahl input[type="radio"] { border-radius: 50%; }
.pw-wahl input:hover { border-color: var(--text); }
.pw-wahl input:focus-visible { outline: none; box-shadow: var(--focus); }
.pw-wahl input:checked { background: var(--text); border-color: var(--text); }
.pw-wahl input[type="checkbox"]:checked::after { content: ""; width: 12px; height: 7px; border-left: 2.5px solid var(--bg-raised); border-bottom: 2.5px solid var(--bg-raised); transform: translateY(-2px) rotate(-45deg); }
.pw-wahl input[type="radio"]:checked { background: var(--bg-raised); border-color: var(--text); border-width: 7px; }
.pw-wahl input[disabled] { background: var(--bg-muted); border-color: var(--line); cursor: not-allowed; }
.pw-wahl input[disabled] + span { color: var(--text-muted); }
.pw-wahl--fehler input { border-color: var(--danger); }

/* Auswahlkarte (Zahlart, Variante) */
.pw-wahlkarte { display: flex; gap: var(--s-3); align-items: center; padding: var(--s-4); background: var(--bg-raised); border: 1px solid var(--line-control); border-radius: var(--radius-2); cursor: pointer; transition: border-color var(--dur); }
.pw-wahlkarte:hover { border-color: var(--text-muted); }
.pw-wahlkarte:has(input:checked) { border: 2px solid var(--text); padding: calc(var(--s-4) - 1px); box-shadow: inset 0 var(--schichtlinie) 0 var(--brand); }
.pw-wahlkarte:has(input:focus-visible) { box-shadow: var(--focus); }
.pw-wahlkarte input { appearance: none; width: 22px; height: 22px; border: 2px solid var(--line-control); border-radius: 50%; flex: none; margin: 0; }
.pw-wahlkarte input:checked { border: 7px solid var(--text); }
.pw-wahlkarte__text { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.pw-wahlkarte__text b { font-weight: 600; }
.pw-wahlkarte__text small { color: var(--text-muted); font-size: var(--fs-small); }

/* Menge */
.pw-menge { display: inline-flex; align-items: stretch; border: 1px solid var(--line-control); border-radius: var(--radius-1); background: var(--bg-raised); height: var(--control-h); }
.pw-menge button { width: 40px; background: none; border: 0; color: var(--text); cursor: pointer; display: grid; place-items: center; }
.pw-menge button:hover { background: var(--bg-muted); }
.pw-menge button:focus-visible { outline: none; box-shadow: var(--focus); position: relative; z-index: 1; }
.pw-menge button[disabled] { color: var(--line-strong); cursor: not-allowed; background: none; }
.pw-menge input { width: 44px; border: 0; border-inline: 1px solid var(--line); text-align: center; font: 600 var(--fs-body) var(--font-mono); color: var(--text); background: transparent; -moz-appearance: textfield; }
.pw-menge input::-webkit-inner-spin-button { -webkit-appearance: none; }
.pw-menge input:focus { outline: none; box-shadow: inset 0 0 0 2px var(--text); }
.pw-menge--sm { height: var(--control-h-sm); }
.pw-menge--sm button { width: 34px; }

/* ---------- Karten / Flächen ---------- */
.pw-flaeche { background: var(--bg-raised); border: 1px solid var(--line); border-radius: var(--radius-2); box-shadow: var(--shadow); }
.pw-flaeche--schicht { border-top: var(--schichtlinie) solid var(--brand); }

/* ---------- Produktkarte (Listing) ---------- */
.pw-karte {
  position: relative; display: flex; flex-direction: column; background: var(--bg-raised);
  border: 1px solid var(--line); border-radius: var(--radius-2); overflow: hidden;
  transition: border-color var(--dur) var(--ease), transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.pw-karte:hover, .pw-karte.is-hover { border-color: var(--line-strong); box-shadow: var(--shadow); transform: translateY(-2px); }
.pw-karte:focus-within { box-shadow: var(--focus); }
.pw-karte__bild { display: block; aspect-ratio: 1; background: var(--bg-muted); }
.pw-karte__bild img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pw-karte__badges { display: flex; gap: 6px; flex-wrap: wrap; } /* im Textbereich, nie über dem Produktbild */
.pw-karte__merken { position: absolute; top: var(--s-2); right: var(--s-2); width: 40px; height: 40px; display: grid; place-items: center; border-radius: var(--radius-1); background: rgba(13,13,13,.55); color: var(--kohle-100); border: 0; cursor: pointer; }
.pw-karte__merken:hover { color: var(--corten-300); }
.pw-karte__merken[aria-pressed="true"] svg { fill: var(--corten-400); stroke: var(--corten-400); }
.pw-karte__inhalt { display: flex; flex-direction: column; gap: 6px; padding: var(--s-4); flex: 1; }
.pw-karte__titel { font-weight: 600; font-size: var(--fs-body); line-height: 1.35; color: var(--text); text-decoration: none; }
.pw-karte__titel::after { content: ""; position: absolute; inset: 0; } /* ganze Karte klickbar */
.pw-karte__titel:focus-visible { outline: none; }
.pw-karte__meta { font-size: var(--fs-small); color: var(--text-muted); }
.pw-karte__fuss { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--s-3); margin-top: auto; padding-top: var(--s-3); }
.pw-karte__fuss .pw-btn { position: relative; z-index: 1; }
.pw-karte--aus .pw-karte__bild { opacity: .55; filter: grayscale(.6); }
.pw-karte--aus:hover { transform: none; }

/* ---------- Preis ---------- */
.pw-preis { font-family: var(--font-display); font-weight: 800; font-size: var(--fs-preis); line-height: 1; letter-spacing: .01em; color: var(--text); white-space: nowrap; }
.pw-preis--gross { font-size: var(--fs-preis-gross); }
.pw-preis__alt { font-family: var(--font-text); font-weight: 400; font-size: var(--fs-small); color: var(--text-muted); text-decoration: line-through; margin-right: 6px; }
.pw-preis__info { display: block; font-family: var(--font-text); font-weight: 400; font-size: 12px; color: var(--text-muted); margin-top: 6px; letter-spacing: 0; text-transform: none; }

/* ---------- Buy-Box (Produktseite) ---------- */
.pw-buybox { display: flex; flex-direction: column; gap: var(--s-4); padding: var(--s-5); }
.pw-buybox__fakten { list-style: none; display: grid; gap: var(--s-2); }
.pw-buybox__fakten li { display: flex; gap: var(--s-2); align-items: flex-start; font-size: var(--fs-small); }
.pw-buybox__fakten .pw-icon { width: 20px; height: 20px; color: var(--brand); flex: none; }
.pw-buybox__zeile { display: flex; gap: var(--s-3); align-items: stretch; }
.pw-buybox__zeile .pw-btn--kauf { flex: 1; }
.pw-buybox__lieferung { display: flex; gap: var(--s-2); align-items: flex-start; font-size: var(--fs-small); padding: var(--s-3); background: var(--bg-sunken); border-left: 3px solid var(--success); }
.pw-buybox__lieferung .pw-icon { width: 20px; height: 20px; color: var(--success); }
.pw-buybox__zahlarten { font-size: 12px; color: var(--text-muted); border-top: 1px solid var(--line); padding-top: var(--s-3); }

/* ---------- Header & Navigation (Rahmen, immer dunkel) ---------- */
.pw-topbar { background: var(--kohle-950); color: var(--kohle-400); font-size: 13px; }
.pw-topbar ul { list-style: none; display: flex; gap: var(--s-6); justify-content: center; padding: 8px var(--s-4); }
.pw-topbar li { display: flex; gap: 6px; align-items: center; white-space: nowrap; }
.pw-topbar .pw-icon { width: 16px; height: 16px; color: var(--corten-300); }

.pw-header { background: var(--kohle-900); color: var(--kohle-100); border-bottom: var(--schichtlinie) solid var(--corten-500); position: relative; z-index: var(--z-header); }
.pw-header__zeile { display: flex; align-items: center; gap: var(--s-5); padding: var(--s-4) var(--s-5); }
.pw-header__logo { display: block; flex: none; }
.pw-header__logo img { height: var(--logo-h-header); display: block; }
.pw-header__suche { flex: 1; max-width: 560px; }
.pw-header__aktionen { display: flex; gap: var(--s-1); margin-left: auto; }
.pw-header__knopf { position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; min-width: 56px; padding: 6px 8px; color: var(--kohle-100); text-decoration: none; font-size: 11px; border-radius: var(--radius-1); background: none; border: 0; cursor: pointer; }
.pw-header__knopf:hover { color: var(--corten-300); }
.pw-header__knopf:focus-visible { outline: none; box-shadow: 0 0 0 2px var(--corten-300); }
.pw-zaehler { position: absolute; top: 0; right: 8px; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 9px; background: var(--corten-400); color: var(--kohle-950); font: 700 11px/18px var(--font-text); text-align: center; }
.pw-header__burger { display: none; }

.pw-nav { background: var(--kohle-900); border-top: 1px solid var(--kohle-800); }
.pw-nav ul { list-style: none; display: flex; gap: var(--s-1); padding: 0 var(--s-4); overflow-x: auto; }
.pw-nav a { display: block; padding: 12px 14px; color: var(--kohle-200); text-decoration: none; font: 700 16px var(--font-display); letter-spacing: .05em; text-transform: uppercase; border-bottom: 3px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.pw-nav a:hover { color: var(--kohle-50); border-bottom-color: var(--kohle-600); }
.pw-nav a[aria-current="page"] { color: var(--kohle-50); border-bottom-color: var(--corten-500); }
.pw-nav a:focus-visible { outline: none; box-shadow: inset 0 0 0 2px var(--corten-300); }

/* Header-Suche auf dunkel */
.pw-header .pw-input { background: var(--kohle-850); border-color: var(--kohle-500); color: var(--kohle-100); }
.pw-header .pw-input::placeholder { color: var(--kohle-400); }
.pw-header .pw-input:focus { border-color: var(--kohle-300); box-shadow: 0 0 0 3px var(--kohle-900), 0 0 0 5px var(--corten-300); }

@container (max-width: 760px) {
  .pw-topbar li:not(:first-child) { display: none; }   /* mobil nur ein Fakt */
  .pw-header__zeile { flex-wrap: wrap; gap: var(--s-2); padding: var(--s-3) var(--s-4); }
  .pw-header__knopf--merken { display: none; }       /* mobil im Menü */
  .pw-header__burger { display: flex; }
  .pw-header__logo img { height: var(--logo-h-header-mobil); }
  .pw-header__suche { order: 5; flex-basis: 100%; max-width: none; }
  .pw-header__knopf span { display: none; }
  .pw-header__knopf { min-width: 44px; min-height: 44px; justify-content: center; }
  .pw-nav { display: none; }
}

/* Breadcrumb */
.pw-brotkrumen { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; font-size: var(--fs-small); color: var(--text-muted); }
.pw-brotkrumen li { display: flex; align-items: center; gap: 6px; }
.pw-brotkrumen li + li::before { content: "/"; color: var(--line-strong); }
.pw-brotkrumen a { color: var(--text-muted); text-decoration: none; }
.pw-brotkrumen a:hover { color: var(--link); text-decoration: underline; }
.pw-brotkrumen [aria-current] { color: var(--text); }

/* Tabs */
.pw-tabs { display: flex; gap: var(--s-1); border-bottom: 1px solid var(--line); overflow-x: auto; }
.pw-tabs button { padding: 12px 16px; background: none; border: 0; border-bottom: 3px solid transparent; margin-bottom: -1px; font: 700 16px var(--font-display); letter-spacing: .05em; text-transform: uppercase; color: var(--text-muted); cursor: pointer; white-space: nowrap; }
.pw-tabs button:hover { color: var(--text); }
.pw-tabs button[aria-selected="true"] { color: var(--text); border-bottom-color: var(--brand); }
.pw-tabs button:focus-visible { outline: none; box-shadow: var(--focus); }

/* Seitenwechsel */
.pw-seiten { display: flex; gap: 4px; list-style: none; align-items: center; }
.pw-seiten a, .pw-seiten span { min-width: 40px; height: 40px; display: grid; place-items: center; padding: 0 8px; border: 1px solid var(--line); border-radius: var(--radius-1); color: var(--text); text-decoration: none; font: 600 var(--fs-small) var(--font-mono); }
.pw-seiten a:hover { border-color: var(--text); }
.pw-seiten [aria-current="page"] { background: var(--text); color: var(--bg-raised); border-color: var(--text); }
.pw-seiten .pw-seiten__luecke { border: 0; }

/* Off-Canvas (Mobil-Menü, Mini-Warenkorb) */
.pw-drawer { background: var(--bg-raised); color: var(--text); display: flex; flex-direction: column; height: 100%; }
.pw-drawer__kopf { display: flex; align-items: center; justify-content: space-between; padding: var(--s-3) var(--s-4); border-bottom: 1px solid var(--line); }
.pw-drawer__kopf b { font: 800 22px var(--font-display); text-transform: uppercase; letter-spacing: .03em; }
.pw-drawer__liste { list-style: none; }
.pw-drawer__liste a { display: flex; justify-content: space-between; align-items: center; padding: 14px var(--s-4); border-bottom: 1px solid var(--line); color: var(--text); text-decoration: none; font: 700 18px var(--font-display); text-transform: uppercase; letter-spacing: .04em; min-height: 52px; }
.pw-drawer__liste a:hover { background: var(--bg-muted); }
.pw-drawer__fuss { margin-top: auto; padding: var(--s-4); border-top: 1px solid var(--line); display: grid; gap: var(--s-3); }
.pw-abdunkeln { background: rgba(13,13,13,.6); }

/* ---------- Suche: Vorschläge ---------- */
.pw-vorschlag { background: var(--bg-raised); color: var(--text); border: 1px solid var(--line-strong); border-top: var(--schichtlinie) solid var(--brand); border-radius: 0 0 var(--radius-2) var(--radius-2); box-shadow: var(--shadow-overlay); overflow: hidden; }
.pw-vorschlag__gruppe { padding: var(--s-2) 0; border-bottom: 1px solid var(--line); }
.pw-vorschlag__gruppe:last-child { border: 0; }
.pw-vorschlag__titel { padding: 4px var(--s-4); }
.pw-vorschlag a { display: flex; align-items: center; gap: var(--s-3); padding: 8px var(--s-4); color: var(--text); text-decoration: none; font-size: var(--fs-small); }
.pw-vorschlag a:hover, .pw-vorschlag a[aria-selected="true"] { background: var(--bg-muted); }
.pw-vorschlag img { width: 40px; height: 40px; border-radius: var(--radius-1); }
.pw-vorschlag mark { background: none; color: inherit; font-weight: 700; }
.pw-vorschlag .pw-preis { font-size: 18px; margin-left: auto; }

/* ---------- Warenkorb ---------- */
.pw-posten { display: grid; grid-template-columns: 88px 1fr auto; gap: var(--s-4); padding: var(--s-4) 0; border-bottom: 1px solid var(--line); align-items: start; }
.pw-posten img { width: 88px; height: 88px; border-radius: var(--radius-1); display: block; }
.pw-posten__titel { font-weight: 600; color: var(--text); text-decoration: none; }
.pw-posten__meta { font-size: var(--fs-small); color: var(--text-muted); margin-top: 2px; }
.pw-posten__aktion { display: flex; gap: var(--s-3); align-items: center; margin-top: var(--s-3); flex-wrap: wrap; }
.pw-posten__preis { text-align: right; }
.pw-posten__preis .pw-preis { font-size: 22px; }
.pw-posten__preis small { display: block; font-size: 12px; color: var(--text-muted); margin-top: 4px; }
@container (max-width: 520px) {
  .pw-posten { grid-template-columns: 64px 1fr; }
  .pw-posten img { width: 64px; height: 64px; }
  .pw-posten__preis { grid-column: 2; text-align: left; }
}

.pw-summe { display: grid; gap: var(--s-2); padding: var(--s-5); }
.pw-summe__zeile { display: flex; justify-content: space-between; gap: var(--s-4); font-size: var(--fs-small); }
.pw-summe__zeile--gesamt { font-size: var(--fs-body); font-weight: 600; border-top: 1px solid var(--line); padding-top: var(--s-3); margin-top: var(--s-2); align-items: baseline; }
.pw-summe__zeile--gesamt .pw-preis { font-size: 32px; }
.pw-summe__klein { font-size: 12px; color: var(--text-muted); }

/* ---------- Checkout-Schritte ---------- */
.pw-schritte { display: flex; list-style: none; counter-reset: s; gap: 0; }
.pw-schritte li { counter-increment: s; flex: 1; display: flex; align-items: center; gap: var(--s-2); padding: var(--s-3) 0; border-bottom: 3px solid var(--line); color: var(--text-muted); font: 700 16px var(--font-display); text-transform: uppercase; letter-spacing: .04em; }
.pw-schritte li::before { content: counter(s); width: 28px; height: 28px; flex: none; display: grid; place-items: center; border: 2px solid currentColor; border-radius: 50%; font-size: 15px; }
.pw-schritte li[data-status="fertig"] { color: var(--text); border-bottom-color: var(--text); }
.pw-schritte li[data-status="fertig"]::before { content: "✓"; background: var(--text); color: var(--bg-raised); border-color: var(--text); }
.pw-schritte li[aria-current="step"] { color: var(--text); border-bottom-color: var(--brand); }
.pw-schritte li[aria-current="step"]::before { background: var(--brand); border-color: var(--brand); color: var(--weiss); }
.pw-schritte li + li { padding-left: var(--s-3); }
@container (max-width: 520px) {
  .pw-schritte li { font-size: 0; justify-content: center; padding-left: 0 !important; }
  .pw-schritte li[aria-current="step"] { font-size: 15px; flex: 3; }
}

/* ---------- Kundenkonto & Key-Ansicht ---------- */
.pw-kontonav { list-style: none; display: grid; gap: 2px; }
.pw-kontonav a { display: flex; align-items: center; gap: var(--s-3); padding: 10px var(--s-3); color: var(--text); text-decoration: none; border-left: 3px solid transparent; font-size: var(--fs-small); font-weight: 600; }
.pw-kontonav a:hover { background: var(--bg-muted); }
.pw-kontonav a[aria-current="page"] { border-left-color: var(--brand); background: var(--bg-muted); }
.pw-kontonav .pw-icon { width: 20px; height: 20px; color: var(--text-muted); }

.pw-key { border: 1px solid var(--line); border-top: var(--schichtlinie) solid var(--brand); border-radius: var(--radius-2); background: var(--bg-raised); padding: var(--s-4) var(--s-5); display: grid; gap: var(--s-3); }
.pw-key__kopf { display: flex; justify-content: space-between; gap: var(--s-3); align-items: flex-start; flex-wrap: wrap; }
.pw-key__produkt { font: 800 22px/1.1 var(--font-display); text-transform: uppercase; letter-spacing: .03em; }
.pw-key__meta { font-size: var(--fs-small); color: var(--text-muted); margin-top: 4px; }
.pw-key__feld { display: flex; align-items: stretch; border: 1px solid var(--line-strong); border-radius: var(--radius-1); background: var(--bg-sunken); overflow: hidden; }
.pw-key__wert { flex: 1; padding: 12px 14px; font: 500 var(--fs-key)/1.3 var(--font-mono); letter-spacing: var(--track-key); color: var(--text); word-break: break-all; user-select: all; }
.pw-key__wert[data-verdeckt="true"] { letter-spacing: .1em; color: var(--text-muted); user-select: none; }
.pw-key__feld button { display: flex; align-items: center; gap: 6px; padding: 0 14px; background: var(--bg-raised); border: 0; border-left: 1px solid var(--line-strong); color: var(--text); font: 600 var(--fs-small) var(--font-text); cursor: pointer; white-space: nowrap; }
.pw-key__feld button:hover { background: var(--bg-muted); }
.pw-key__feld button:focus-visible { outline: none; box-shadow: inset 0 0 0 2px var(--text); }
.pw-key__feld button .pw-icon { width: 18px; height: 18px; }
.pw-key__feld button.is-kopiert { color: var(--success); }
.pw-key__aktionen { display: flex; gap: var(--s-3); flex-wrap: wrap; }
.pw-key--wartend .pw-key__feld { border-style: dashed; }
.pw-key--wartend .pw-key__wert { font: 400 var(--fs-small)/1.5 var(--font-text); letter-spacing: 0; color: var(--text-muted); }
@container (max-width: 520px) {
  .pw-key__feld { flex-wrap: wrap; }
  .pw-key__wert { flex-basis: 100%; font-size: 16px; }
  .pw-key__feld button { flex: 1; justify-content: center; min-height: 44px; border-left: 0; border-top: 1px solid var(--line-strong); }
  .pw-key__feld button + button { border-left: 1px solid var(--line-strong); }
}

/* Status-Zeile für Bestellungen */
.pw-status { display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-small); font-weight: 600; }
.pw-status::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: currentColor; }
.pw-status--ok { color: var(--success); }
.pw-status--pruefung { color: var(--accent); }
.pw-status--offen { color: var(--warning); }
.pw-status--fehler { color: var(--danger); }

/* ---------- Hinweise ---------- */
.pw-hinweisbox { display: flex; gap: var(--s-3); padding: var(--s-4); border: 1px solid var(--line); border-left: 4px solid var(--c, var(--accent)); background: var(--bg-raised); border-radius: var(--radius-1); font-size: var(--fs-small); align-items: flex-start; }
.pw-hinweisbox > .pw-icon { color: var(--c, var(--accent)); width: 22px; height: 22px; }
.pw-hinweisbox__text { flex: 1; }
.pw-hinweisbox__text b { display: block; font-size: var(--fs-body); margin-bottom: 2px; }
.pw-hinweisbox--info { --c: var(--accent); }
.pw-hinweisbox--ok { --c: var(--success); }
.pw-hinweisbox--warnung { --c: var(--warning); }
.pw-hinweisbox--fehler { --c: var(--danger); }
.pw-hinweisbox__zu { background: none; border: 0; color: var(--text-muted); cursor: pointer; padding: 2px; }

.pw-toast { display: flex; gap: var(--s-3); align-items: center; padding: var(--s-3) var(--s-4); background: var(--kohle-900); color: var(--kohle-100); border-left: 4px solid var(--c, var(--gruen-hell)); border-radius: var(--radius-1); box-shadow: 0 8px 24px rgba(13,13,13,.3); font-size: var(--fs-small); max-width: 420px; }
.pw-toast .pw-icon { color: var(--c, var(--gruen-hell)); }
.pw-toast a { color: var(--corten-300); font-weight: 600; margin-left: auto; white-space: nowrap; }

/* Leerzustand */
.pw-leer { text-align: center; padding: var(--s-8) var(--s-5); display: flex; flex-direction: column; align-items: center; gap: var(--s-3); }
.pw-leer svg.pw-leer__bild { width: 120px; height: 120px; color: var(--line-strong); stroke-width: 1.25; }
.pw-leer h3 { font: 800 var(--fs-h3) var(--font-display); text-transform: uppercase; letter-spacing: .03em; }
.pw-leer p { color: var(--text-muted); max-width: 420px; }

/* ---------- Footer (Rahmen, dunkel) ---------- */
.pw-footer { background: var(--kohle-950); color: var(--kohle-300); font-size: var(--fs-small); border-top: var(--schichtlinie) solid var(--corten-500); }
.pw-footer__band { display: block; width: 100%; height: auto; max-height: 120px; opacity: .7; }
.pw-footer__spalten { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: var(--s-6); padding: var(--s-7) var(--s-5); }
.pw-footer h4 { font: 700 16px var(--font-display); text-transform: uppercase; letter-spacing: .06em; color: var(--kohle-100); margin-bottom: var(--s-3); }
.pw-footer ul { list-style: none; display: grid; gap: 8px; }
.pw-footer a { color: var(--kohle-300); text-decoration: none; }
.pw-footer a:hover { color: var(--corten-300); text-decoration: underline; }
.pw-footer__unten { display: flex; flex-wrap: wrap; gap: var(--s-3) var(--s-6); justify-content: space-between; padding: var(--s-4) var(--s-5); border-top: 1px solid var(--kohle-800); color: var(--kohle-400); font-size: 12px; }
@container (max-width: 760px) {
  .pw-footer__spalten { grid-template-columns: 1fr 1fr; gap: var(--s-5); padding: var(--s-6) var(--s-4); }
  .pw-footer__spalten > :first-child { grid-column: 1 / -1; }
}
