/* ═══════════════════════════════════════════════════════════════════
   BASISSHOP — WooCommerce
   ═══════════════════════════════════════════════════════════════════
   Reines Aufsatz-CSS für die von WooCommerce erzeugte Auszeichnung.
   Kein PHP, keine Templates — WooCommerce liefert seine eigenen Klassen,
   wir übernehmen nur die Optik aus design.css: heller, ruhiger Grund,
   ein gedämpftes Petrol als einziger Akzent, Karten mit dünner Linie
   statt Schatten-Overkill.

   Quelle der Klassennamen: Live-Abgleich mit https://basisshop.weareweblabs.com
   (Produktliste, Produktseite, Konto-Login). Warenkorb und Kasse liefern
   im leeren Zustand kein HTML mit echten Positionen — dort wird nach den
   Standardklassen von WooCommerce 11 gestaltet. Diese Version nutzt für
   Warenkorb/Kasse den Block-Editor (wp-block-woocommerce-*), deshalb wird
   zusätzlich zur klassischen Tabellen-Auszeichnung (shop_table, form-row)
   auch die Block-Auszeichnung (wc-block-*) bedient — beide zusammen decken
   ab, was WooCommerce 11 je nach Konfiguration ausliefert.

   Nur --wlf-* und --bs-*-Tokens, keine festen Farbwerte außer bei
   Zustandsfarben ohne eigenes Token (Sternebewertung, Rabatt-Streichpreis).
   ═══════════════════════════════════════════════════════════════════ */

/* ── Grundrahmen ─────────────────────────────────────────────────────
   WooCommerce bringt seinen Inhalt in .wlf-woocommerce (Theme-Wrapper).
   Die Breite kommt vom Theme, hier nur Lesefluss und Linkfarbe, damit
   WooCommerce-eigene Links (Warenkorb-Meldung, "Zurück zum Shop" etc.)
   nicht in Browser-Blau auftauchen. */
.woocommerce, .woocommerce-page {
  color: var(--wlf-color-ink);
}
body.woocommerce .wlf-site-main a:not(.button):not(.bs-btn) {
  color: var(--wlf-color-accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}
body.woocommerce .wlf-site-main a:not(.button):not(.bs-btn):hover { color: var(--wlf-color-accent-hover); }

/* ── Brotkrumen ──────────────────────────────────────────────────────
   Dezent und klein — sie sind Orientierung, kein Gestaltungselement. */
.woocommerce-breadcrumb {
  font-size: var(--wlf-text-sm);
  color: var(--wlf-color-ink-muted);
  margin: 0 0 var(--wlf-space-5);
  padding-top: var(--wlf-space-5);
}
.woocommerce-breadcrumb a { color: var(--wlf-color-ink-muted); text-decoration: none; }
.woocommerce-breadcrumb a:hover { color: var(--wlf-color-ink); text-decoration: underline; }

/* ── Meldungen ───────────────────────────────────────────────────────
   Bewusst KEIN knalliger Flächen-Hintergrund: eine farbige Kante links
   auf ruhiger Fläche reicht, um Erfolg/Info/Fehler zu unterscheiden,
   ohne die helle Seite zu stören. Zustandsfarben stehen als Token
   bereit (--wlf-color-success/-warning/-danger), Info bekommt den
   Marken-Akzent, weil es dafür kein eigenes Token gibt. */
.woocommerce-message,
.woocommerce-info,
.woocommerce-error,
.woocommerce-noreviews,
p.no-comments {
  display: flex; flex-wrap: wrap; align-items: center; gap: var(--wlf-space-3);
  list-style: none; margin: 0 0 var(--wlf-space-5); padding: var(--wlf-space-4) var(--wlf-space-5);
  background: var(--wlf-color-surface);
  border: 1px solid var(--wlf-color-line);
  border-left: 3px solid var(--wlf-color-accent);
  border-radius: var(--wlf-radius-md);
  font-size: var(--wlf-text-sm);
}
.woocommerce-message { border-left-color: var(--wlf-color-success); }
.woocommerce-error { border-left-color: var(--wlf-color-danger); }
/* Fehlerliste kommt manchmal als <ul> mit mehreren <li>-Meldungen daher. */
.woocommerce-error li { margin: 0; }
.woocommerce-message a.button,
.woocommerce-error a.button {
  margin-left: auto;
}

/* ── Ergebniszähler & Sortierung ────────────────────────────────────
   Eine Zeile über dem Raster: links Anzahl, rechts Sortierung. Auf
   Mobil untereinander, damit das Dropdown nicht gequetscht wird. */
.woocommerce > form.woocommerce-ordering,
.woocommerce-ordering { display: inline-block; }
.woocommerce-result-count,
.woocommerce-ordering {
  margin: 0 0 var(--wlf-space-5);
}

/* Die beiden Elemente stehen im Markup ohne gemeinsamen Wrapper direkt
   nacheinander — mit Flex auf dem darüberliegenden Container ließen sie
   sich sauber in eine Zeile bringen, doch der Wrapper ist WooCommerce-
   eigen und hier nicht greifbar. Also über die Geschwister-Beziehung. */
.woocommerce-result-count {
  display: inline-block;
  color: var(--wlf-color-ink-muted);
  font-size: var(--wlf-text-sm);
}
.woocommerce-result-count + form.woocommerce-ordering {
  float: right;
}
@media (max-width: 640px) {
  .woocommerce-result-count + form.woocommerce-ordering { float: none; display: block; margin-top: var(--wlf-space-2); }
}

.orderby {
  appearance: none;
  background: var(--wlf-color-bg);
  border: 1px solid var(--wlf-color-line);
  border-radius: var(--wlf-radius-md);
  padding: .55rem 2.2rem .55rem .9rem;
  font-family: inherit; font-size: var(--wlf-text-sm); color: var(--wlf-color-ink);
  cursor: pointer;
  /* Eigener Pfeil statt System-Pfeil, damit er zur schlichten Optik passt. */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='%236a716d' stroke-width='1.6'%3E%3Cpath d='M5 8l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right .7rem center; background-size: 16px;
  transition: border-color var(--wlf-transition);
}
.orderby:hover { border-color: var(--wlf-color-ink); }
.orderby:focus-visible { outline: 2px solid var(--wlf-color-accent); outline-offset: 2px; }

/* ═══════════════════════════════════════════════════════════════════
   PRODUKTLISTE  (.woocommerce ul.products)
   ═══════════════════════════════════════════════════════════════════ */
.woocommerce ul.products {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: clamp(1rem, 2.5vw, 1.75rem);
  list-style: none;
  margin: 0 0 var(--wlf-space-7);
  padding: 0;
  clear: both; /* wegen des float bei der Sortierzeile */
}

.woocommerce ul.products li.product {
  background: var(--wlf-color-bg);
  border: 1px solid var(--wlf-color-line);
  border-radius: var(--wlf-radius-lg);
  overflow: hidden;
  display: flex; flex-direction: column;
  transition: border-color var(--wlf-transition), box-shadow var(--wlf-transition), transform var(--wlf-transition);
}
/* Dezenter Hover: Linie dunkler, leichtes Anheben — kein Schatten-Drama,
   die Felge soll wirken, nicht die Karte. */
.woocommerce ul.products li.product:hover {
  border-color: var(--wlf-color-ink);
  box-shadow: var(--wlf-shadow-md);
  transform: translateY(-2px);
}

.woocommerce ul.products li.product a.woocommerce-LoopProduct-link {
  display: flex; flex-direction: column; height: 100%;
  text-decoration: none; color: inherit;
}

/* Produktbild: auf Surface-Fläche mit Innenabstand, damit freigestellte
   Felgen "schweben" statt am Kartenrand zu kleben — object-fit: contain,
   weil beschnittene Felgenbilder Kunden beim Passform-Vergleich stören. */
.woocommerce ul.products li.product img {
  display: block;
  width: 100%; aspect-ratio: 1 / 1;
  background: var(--wlf-color-surface);
  object-fit: contain;
  padding: var(--wlf-space-4);
  box-sizing: border-box;
}

.woocommerce ul.products li.product .woocommerce-loop-product__title {
  margin: var(--wlf-space-4) var(--wlf-space-4) 0;
  font-size: var(--wlf-text-base);
  font-weight: var(--wlf-weight-bold);
  letter-spacing: -.02em;
  line-height: var(--wlf-leading-tight);
  color: var(--wlf-color-ink);
}

.woocommerce ul.products li.product .price {
  margin: .35rem var(--wlf-space-4) var(--wlf-space-4);
  margin-top: auto; /* schiebt Preis + Button ans Kartenende, egal wie lang der Titel ist */
  padding-top: .35rem;
  font-weight: var(--wlf-weight-bold);
  font-variant-numeric: tabular-nums;
  color: var(--wlf-color-ink);
}
/* Streichpreis bei reduzierten Produkten — WooCommerce liefert <del>/<ins>. */
.woocommerce ul.products li.product .price del {
  color: var(--wlf-color-ink-muted);
  font-weight: var(--wlf-weight-normal);
  margin-right: .4em;
  text-decoration-thickness: 1px;
}
.woocommerce ul.products li.product .price ins {
  text-decoration: none;
}

/* "In den Warenkorb"-Button im Raster: volle Kartenbreite, damit die
   Zeile mit dem Bild abschließt, wie bei den Modellkarten der Startseite. */
.woocommerce ul.products li.product a.button,
.woocommerce ul.products li.product a.add_to_cart_button {
  display: block;
  margin: 0 var(--wlf-space-4) var(--wlf-space-4);
  padding: .7rem 1.2rem;
  border-radius: var(--wlf-radius-pill);
  border: 1px solid var(--wlf-color-ink);
  background: var(--wlf-color-ink);
  color: #fff;
  font-size: var(--wlf-text-sm); font-weight: var(--wlf-weight-bold);
  text-align: center; text-decoration: none;
  cursor: pointer;
  transition: background var(--wlf-transition), border-color var(--wlf-transition);
}
.woocommerce ul.products li.product a.button:hover,
.woocommerce ul.products li.product a.add_to_cart_button:hover {
  background: var(--wlf-color-accent);
  border-color: var(--wlf-color-accent);
}
/* WooCommerce fügt "hinzugefügt" per AJAX-Klasse hinzu — sichtbar machen,
   damit der Kunde die Bestätigung ohne Seitenwechsel sieht. */
.woocommerce ul.products li.product a.added_to_cart {
  display: block;
  margin: 0 var(--wlf-space-4) var(--wlf-space-4);
  text-align: center; font-size: var(--wlf-text-xs);
  color: var(--wlf-color-accent); text-decoration: underline;
}

/* ── Blätterung ──────────────────────────────────────────────────── */
.woocommerce-pagination { margin-top: var(--wlf-space-6); }
.woocommerce-pagination ul.page-numbers {
  display: flex; flex-wrap: wrap; gap: .4rem;
  list-style: none; margin: 0; padding: 0;
}
.woocommerce-pagination .page-numbers li { display: contents; }
.woocommerce-pagination .page-numbers a,
.woocommerce-pagination .page-numbers span {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 2.4rem; height: 2.4rem; padding-inline: .5rem;
  border-radius: var(--wlf-radius-pill);
  border: 1px solid var(--wlf-color-line);
  font-size: var(--wlf-text-sm); font-weight: var(--wlf-weight-medium);
  color: var(--wlf-color-ink); text-decoration: none;
  transition: border-color var(--wlf-transition), background var(--wlf-transition), color var(--wlf-transition);
}
.woocommerce-pagination .page-numbers a:hover {
  border-color: var(--wlf-color-ink);
  background: var(--wlf-color-surface);
}
.woocommerce-pagination .page-numbers .current {
  background: var(--wlf-color-accent);
  border-color: var(--wlf-color-accent);
  color: var(--wlf-color-accent-ink);
}
.woocommerce-pagination .page-numbers .dots {
  border-color: transparent; color: var(--wlf-color-ink-muted);
}

/* ═══════════════════════════════════════════════════════════════════
   PRODUKTSEITE
   ═══════════════════════════════════════════════════════════════════ */
.single-product .product {
  display: grid; gap: clamp(2rem, 5vw, 3.5rem);
  margin-bottom: var(--bs-section);
}
@media (min-width: 860px) {
  .single-product .product { grid-template-columns: 1.05fr .95fr; align-items: start; }
}

/* Galerie: gleiche Fläche wie in der Produktliste, damit Bild und Karte
   optisch zur selben Familie gehören. Dieser Shop zeigt aktuell ein
   einzelnes Bild ohne Vorschau-Miniaturen (--without-images-Variante
   greift nicht, es ist einfach kein Thumbnail-Streifen vorhanden). */
.woocommerce-product-gallery {
  background: var(--wlf-color-surface);
  border-radius: var(--wlf-radius-lg);
  overflow: hidden;
}
.woocommerce-product-gallery__wrapper { margin: 0; padding: 0; list-style: none; }
.woocommerce-product-gallery__image { display: block; }
.woocommerce-product-gallery img,
.woocommerce-product-gallery__image img {
  width: 100%; aspect-ratio: 1 / 1;
  object-fit: contain;
  padding: clamp(1.5rem, 4vw, 3rem);
  box-sizing: border-box;
  display: block;
}

.summary.entry-summary { display: flex; flex-direction: column; }
.summary.entry-summary .product_title.entry-title {
  font-size: var(--wlf-text-3xl);
  line-height: var(--wlf-leading-tight);
  letter-spacing: -.03em;
  margin: 0 0 var(--wlf-space-3);
}
.summary.entry-summary > .price {
  font-size: var(--wlf-text-2xl);
  font-weight: var(--wlf-weight-bold);
  font-variant-numeric: tabular-nums;
  color: var(--wlf-color-ink);
  margin: 0 0 var(--wlf-space-5);
}

.woocommerce-product-details__short-description {
  color: var(--wlf-color-ink-muted);
  font-size: var(--wlf-text-base);
  line-height: var(--wlf-leading-base);
  margin: 0 0 var(--wlf-space-5);
}
.woocommerce-product-details__short-description p:last-child { margin-bottom: 0; }

/* Kaufzeile: Mengenfeld + Button nebeneinander, auf Mobil volle Breite. */
.summary.entry-summary form.cart {
  display: flex; flex-wrap: wrap; align-items: stretch; gap: var(--wlf-space-3);
  margin: 0 0 var(--wlf-space-5);
}
.summary.entry-summary .quantity { display: flex; }
.summary.entry-summary .quantity .qty,
input.qty {
  width: 4.5rem; height: 100%;
  border: 1px solid var(--wlf-color-line);
  border-radius: var(--wlf-radius-md);
  padding: 0 .7rem;
  font-family: inherit; font-size: var(--wlf-text-base); font-weight: var(--wlf-weight-medium);
  text-align: center; color: var(--wlf-color-ink);
  background: var(--wlf-color-bg);
  transition: border-color var(--wlf-transition);
}
.summary.entry-summary .quantity .qty:focus-visible { border-color: var(--wlf-color-accent); }

/* Kauf-Button im Stil von .bs-btn --accent — der Petrol-Akzent ist der
   einzige Ort auf der Seite, an dem er als Fläche auftaucht (Kaufabsicht
   verdient die stärkste Farbe im System). */
.single_add_to_cart_button.button,
.single_add_to_cart_button.button.alt {
  flex: 1 1 12rem;
  display: inline-flex; align-items: center; justify-content: center;
  padding: .85rem 1.6rem;
  border-radius: var(--wlf-radius-pill);
  border: 1px solid var(--wlf-color-accent);
  background: var(--wlf-color-accent);
  color: var(--wlf-color-accent-ink);
  font-size: var(--wlf-text-base); font-weight: var(--wlf-weight-bold);
  cursor: pointer;
  transition: background var(--wlf-transition), border-color var(--wlf-transition);
}
.single_add_to_cart_button.button:hover {
  background: var(--wlf-color-accent-hover);
  border-color: var(--wlf-color-accent-hover);
}
.single_add_to_cart_button.disabled,
.single_add_to_cart_button:disabled {
  opacity: .5; cursor: not-allowed;
}

/* Meta: SKU/Kategorie — kleine, ruhige Zeile, keine Konkurrenz zum Button. */
.product_meta {
  font-size: var(--wlf-text-sm);
  color: var(--wlf-color-ink-muted);
  padding-top: var(--wlf-space-4);
  border-top: 1px solid var(--wlf-color-line-soft);
  display: flex; flex-direction: column; gap: .3rem;
}
.product_meta > span { display: block; }
.product_meta a { color: var(--wlf-color-ink-muted); }
.product_meta a:hover { color: var(--wlf-color-accent); }
.product_meta .sku { color: var(--wlf-color-ink); font-weight: var(--wlf-weight-medium); }

/* ── Reiter (Zusätzliche Informationen etc.) ────────────────────────
   Schlichte Unterstreich-Tabs statt Karteikarten-Optik — passt zur
   sonst kargen Linienführung des Shops. */
.woocommerce-tabs.wc-tabs-wrapper {
  margin-top: var(--bs-section);
  border-top: 1px solid var(--wlf-color-line);
}
ul.tabs.wc-tabs {
  display: flex; flex-wrap: wrap; gap: var(--wlf-space-2);
  list-style: none; margin: 0; padding: var(--wlf-space-5) 0 0;
}
ul.tabs.wc-tabs li {
  margin: 0;
}
ul.tabs.wc-tabs li a {
  display: inline-block;
  padding: .6rem 1.1rem;
  border-radius: var(--wlf-radius-pill);
  font-size: var(--wlf-text-sm); font-weight: var(--wlf-weight-medium);
  color: var(--wlf-color-ink-muted); text-decoration: none;
  transition: background var(--wlf-transition), color var(--wlf-transition);
}
ul.tabs.wc-tabs li a:hover { background: var(--wlf-color-surface); color: var(--wlf-color-ink); }
ul.tabs.wc-tabs li.active a {
  background: var(--wlf-color-ink); color: #fff;
}
.woocommerce-tabs .woocommerce-Tabs-panel {
  padding-top: var(--wlf-space-6);
  max-width: 62ch;
  line-height: var(--wlf-leading-base);
  color: var(--wlf-color-ink-muted);
}
.woocommerce-tabs .woocommerce-Tabs-panel h2 {
  /* WooCommerce setzt hier eine <h2>, die im Fließtext optisch zu groß wäre. */
  font-size: var(--wlf-text-lg); color: var(--wlf-color-ink); margin: 0 0 var(--wlf-space-4);
}

/* Attribut-Tabelle (Größe, Lochkreis, ET, Nabenbohrung …) — für Felgen
   die wichtigste Tabelle im ganzen Shop, deshalb ruhig und gut lesbar. */
table.woocommerce-product-attributes {
  width: 100%; max-width: 62ch;
  border-collapse: collapse;
}
table.woocommerce-product-attributes tr { border-bottom: 1px solid var(--wlf-color-line-soft); }
table.woocommerce-product-attributes tr:last-child { border-bottom: 0; }
.woocommerce-product-attributes-item__label,
.woocommerce-product-attributes-item__value {
  padding: .6rem 0; text-align: left; font-size: var(--wlf-text-sm); font-weight: var(--wlf-weight-normal);
}
.woocommerce-product-attributes-item__label {
  width: 40%; color: var(--wlf-color-ink-muted); font-weight: var(--wlf-weight-medium);
}
.woocommerce-product-attributes-item__value { color: var(--wlf-color-ink); }
.woocommerce-product-attributes-item__value p { margin: 0; }

/* ── Verwandte Produkte ──────────────────────────────────────────── */
.related.products {
  margin-top: var(--bs-section);
  padding-top: var(--bs-section);
  border-top: 1px solid var(--wlf-color-line);
}
.related.products h2 {
  font-size: var(--wlf-text-2xl);
  margin: 0 0 var(--wlf-space-6);
}
/* Das Produktraster darunter erbt automatisch die Regeln von oben
   (.woocommerce ul.products), eigene Anpassungen sind nicht nötig. */

/* ═══════════════════════════════════════════════════════════════════
   WARENKORB — klassische Tabellen-Auszeichnung (shop_table)
   ═══════════════════════════════════════════════════════════════════ */
table.shop_table {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 var(--wlf-space-6);
}
table.shop_table th {
  text-align: left;
  padding: var(--wlf-space-3) var(--wlf-space-3);
  font-size: var(--wlf-text-xs); font-weight: var(--wlf-weight-bold);
  letter-spacing: var(--wlf-tracking-wide); text-transform: uppercase;
  color: var(--wlf-color-ink-muted);
  border-bottom: 1px solid var(--wlf-color-line);
}
table.shop_table td {
  padding: var(--wlf-space-4) var(--wlf-space-3);
  border-bottom: 1px solid var(--wlf-color-line-soft);
  vertical-align: middle;
  font-size: var(--wlf-text-sm);
}
table.shop_table td.product-name a { color: var(--wlf-color-ink); font-weight: var(--wlf-weight-medium); text-decoration: none; }
table.shop_table td.product-name a:hover { color: var(--wlf-color-accent); }
table.shop_table td.product-thumbnail img {
  width: 4.5rem; aspect-ratio: 1 / 1; object-fit: contain;
  background: var(--wlf-color-surface); border-radius: var(--wlf-radius-md);
  padding: .4rem;
}
table.shop_table td.product-price,
table.shop_table td.product-subtotal {
  font-weight: var(--wlf-weight-bold); font-variant-numeric: tabular-nums;
}
table.shop_table td.product-remove a.remove {
  display: inline-flex; align-items: center; justify-content: center;
  width: 1.8rem; height: 1.8rem; border-radius: 50%;
  color: var(--wlf-color-ink-muted); text-decoration: none; font-size: 1.1rem; line-height: 1;
  transition: background var(--wlf-transition), color var(--wlf-transition);
}
table.shop_table td.product-remove a.remove:hover {
  background: var(--wlf-color-surface); color: var(--wlf-color-danger);
}
table.shop_table .product-quantity input.qty { width: 3.6rem; height: 2.5rem; }

/* Coupon-Zeile + Warenkorb aktualisieren */
.woocommerce-cart-form .coupon {
  display: flex; flex-wrap: wrap; gap: var(--wlf-space-2); align-items: center;
}
.woocommerce-cart-form .coupon input#coupon_code {
  flex: 1 1 12rem;
  border: 1px solid var(--wlf-color-line); border-radius: var(--wlf-radius-md);
  padding: .65rem .85rem; font-family: inherit; font-size: var(--wlf-text-sm);
}
.woocommerce-cart-form .coupon input#coupon_code:focus-visible { border-color: var(--wlf-color-accent); }

/* Summen-Box: eigene Fläche, damit sie sich vom Positionslisting abhebt. */
.cart_totals, .cart-collaterals .cart_totals {
  background: var(--wlf-color-surface);
  border: 1px solid var(--wlf-color-line);
  border-radius: var(--wlf-radius-lg);
  padding: var(--wlf-space-5) var(--wlf-space-6);
  max-width: 26rem; margin-left: auto;
}
.cart_totals h2 { font-size: var(--wlf-text-lg); margin: 0 0 var(--wlf-space-4); }
.cart_totals table.shop_table { margin-bottom: var(--wlf-space-5); }
.cart_totals table.shop_table td,
.cart_totals table.shop_table th { padding: var(--wlf-space-2) 0; border-color: var(--wlf-color-line-soft); }
.cart_totals .order-total .amount { font-size: var(--wlf-text-lg); font-weight: var(--wlf-weight-bold); }

/* Buttons in Warenkorb/Kasse einheitlich im .bs-btn-Stil: Pille, 1px
   Rahmen, klarer Hover. "Warenkorb aktualisieren" ist zweitrangig →
   Ghost-Stil; "Zur Kasse" ist die Hauptaktion → Akzentfläche. */
.woocommerce button.button,
.woocommerce input.button,
.woocommerce a.button,
.wc-proceed-to-checkout a.checkout-button,
a.checkout-button {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .8rem 1.5rem;
  border-radius: var(--wlf-radius-pill);
  border: 1px solid var(--wlf-color-line);
  background: transparent; color: var(--wlf-color-ink);
  font-size: var(--wlf-text-sm); font-weight: var(--wlf-weight-bold);
  text-decoration: none; cursor: pointer;
  transition: background var(--wlf-transition), border-color var(--wlf-transition), color var(--wlf-transition);
}
.woocommerce button.button:hover,
.woocommerce input.button:hover,
.woocommerce a.button:hover {
  border-color: var(--wlf-color-ink); background: var(--wlf-color-bg);
}
/* Hauptaktionen (Zur Kasse, Bestellen) heben sich mit dem Akzent ab. */
.wc-proceed-to-checkout a.checkout-button,
a.checkout-button,
#place_order {
  border-color: var(--wlf-color-accent);
  background: var(--wlf-color-accent);
  color: var(--wlf-color-accent-ink);
  width: 100%;
}
.wc-proceed-to-checkout a.checkout-button:hover,
a.checkout-button:hover,
#place_order:hover {
  background: var(--wlf-color-accent-hover); border-color: var(--wlf-color-accent-hover);
}

/* Warenkorb-Tabelle auf Mobil als Karten stapeln: WooCommerce liefert
   dafür bereits data-title-Attribute auf den <td>-Zellen mit; die
   ::before-Beschriftung ist Standard-WooCommerce-Praxis und braucht
   keine eigenen Templates. */
@media (max-width: 640px) {
  table.shop_table thead { display: none; }
  table.shop_table, table.shop_table tbody, table.shop_table tr, table.shop_table td {
    display: block; width: 100%;
  }
  table.shop_table tr {
    border: 1px solid var(--wlf-color-line);
    border-radius: var(--wlf-radius-md);
    margin-bottom: var(--wlf-space-4);
    padding: var(--wlf-space-2) var(--wlf-space-4);
  }
  table.shop_table td {
    display: flex; align-items: center; justify-content: space-between; gap: var(--wlf-space-3);
    border-bottom: 1px solid var(--wlf-color-line-soft);
    text-align: right;
  }
  table.shop_table td:last-child { border-bottom: 0; }
  table.shop_table td.product-remove { justify-content: flex-end; }
  table.shop_table td::before {
    content: attr(data-title);
    font-size: var(--wlf-text-xs); font-weight: var(--wlf-weight-bold);
    text-transform: uppercase; letter-spacing: var(--wlf-tracking-wide);
    color: var(--wlf-color-ink-muted);
  }
  .cart_totals, .cart-collaterals .cart_totals { max-width: none; }
}

/* ═══════════════════════════════════════════════════════════════════
   WARENKORB & KASSE — WooCommerce-Blocks (dieser Shop verwendet den
   Block-Editor für /cart/ und /checkout/, die Klassen tragen daher das
   Präfix wc-block-* statt der klassischen shop_table-Auszeichnung).
   ═══════════════════════════════════════════════════════════════════ */
.wp-block-woocommerce-cart,
.wp-block-woocommerce-checkout {
  display: grid; gap: clamp(1.5rem, 4vw, 3rem);
}
@media (min-width: 860px) {
  .wp-block-woocommerce-cart,
  .wp-block-woocommerce-checkout {
    grid-template-columns: 1.5fr 1fr; align-items: start;
  }
}

/* Positionszeilen im Block-Warenkorb: gleiche Kartenoptik wie sonst im
   Shop, statt der WooCommerce-eigenen Fließtabelle. */
.wc-block-cart-items, .wc-block-components-order-summary {
  background: var(--wlf-color-bg);
  border: 1px solid var(--wlf-color-line);
  border-radius: var(--wlf-radius-lg);
  overflow: hidden;
}
.wc-block-cart-item, .wc-block-components-totals-item {
  padding: var(--wlf-space-4) var(--wlf-space-5);
  border-bottom: 1px solid var(--wlf-color-line-soft);
}
.wc-block-cart-item:last-child { border-bottom: 0; }
.wc-block-components-product-image img,
.wc-block-cart-item__image img {
  background: var(--wlf-color-surface);
  border-radius: var(--wlf-radius-md);
  object-fit: contain;
  padding: .5rem;
}
.wc-block-components-product-name { color: var(--wlf-color-ink); font-weight: var(--wlf-weight-medium); text-decoration: none; }
.wc-block-components-formatted-money-amount { font-variant-numeric: tabular-nums; font-weight: var(--wlf-weight-bold); }

/* Mengenfeld im Block-Warenkorb: Stepper mit +/- statt reinem Zahlenfeld —
   optisch an das übrige Formularmuster angleichen (Rahmen, Radius, Akzent
   bei Fokus), Feinheiten der internen Struktur bleiben WooCommerce-Sache. */
.wc-block-components-quantity-selector {
  border: 1px solid var(--wlf-color-line); border-radius: var(--wlf-radius-md);
  overflow: hidden;
}
.wc-block-components-quantity-selector input.wc-block-components-quantity-selector__input {
  border: 0; font-family: inherit; text-align: center;
}
.wc-block-components-quantity-selector__button {
  background: var(--wlf-color-surface); border: 0; color: var(--wlf-color-ink);
  cursor: pointer; transition: background var(--wlf-transition);
}
.wc-block-components-quantity-selector__button:hover { background: var(--wlf-color-surface-alt); }

/* Formularfelder in Adress-/Zahlungsschritten des Block-Checkouts */
.wc-block-components-text-input input,
.wc-block-components-text-input textarea,
.wc-block-components-address-form input,
.wc-block-checkout__form input[type="text"],
.wc-block-checkout__form input[type="email"],
.wc-block-checkout__form input[type="tel"] {
  border: 1px solid var(--wlf-color-line); border-radius: var(--wlf-radius-md);
  padding: .75rem .9rem; font-family: inherit; font-size: var(--wlf-text-base);
  background: var(--wlf-color-bg); color: var(--wlf-color-ink);
  transition: border-color var(--wlf-transition);
}
.wc-block-components-text-input input:focus-visible,
.wc-block-checkout__form input:focus-visible {
  border-color: var(--wlf-color-accent);
}
.wc-block-components-radio-control__option {
  border: 1px solid var(--wlf-color-line); border-radius: var(--wlf-radius-md);
  padding: var(--wlf-space-3) var(--wlf-space-4);
  transition: border-color var(--wlf-transition), background var(--wlf-transition);
}
.wc-block-components-radio-control__option:hover { border-color: var(--wlf-color-ink); }
.wc-block-components-radio-control__input:checked + .wc-block-components-radio-control__label-group,
.wc-block-components-radio-control__option:has(:checked) {
  border-color: var(--wlf-color-accent);
}

/* Bestellen-Button des Block-Checkouts — gleiche Hauptaktion-Optik wie
   der klassische Checkout-Button oben. */
.wc-block-components-checkout-place-order-button,
.wc-block-cart__submit-button {
  width: 100%;
  border-radius: var(--wlf-radius-pill);
  background: var(--wlf-color-accent); border-color: var(--wlf-color-accent);
  color: var(--wlf-color-accent-ink); font-weight: var(--wlf-weight-bold);
  transition: background var(--wlf-transition), border-color var(--wlf-transition);
}
.wc-block-components-checkout-place-order-button:hover,
.wc-block-cart__submit-button:hover {
  background: var(--wlf-color-accent-hover); border-color: var(--wlf-color-accent-hover);
}

/* ═══════════════════════════════════════════════════════════════════
   KONTO-SEITEN
   ═══════════════════════════════════════════════════════════════════ */
/* Navigation (Bestellungen, Adressen, Logout …) im Stil der Haupt-
   navigation — schmale Pillen, aktiver Punkt in Volltext-Kontrast. */
.woocommerce-MyAccount-navigation ul {
  list-style: none; margin: 0 0 var(--wlf-space-6); padding: 0;
  display: flex; flex-wrap: wrap; gap: .35rem;
  border-bottom: 1px solid var(--wlf-color-line);
  padding-bottom: var(--wlf-space-4);
}
.woocommerce-MyAccount-navigation ul li a {
  display: block; padding: .5rem .9rem; border-radius: var(--wlf-radius-pill);
  font-size: var(--wlf-text-sm); font-weight: var(--wlf-weight-medium);
  color: var(--wlf-color-ink-muted); text-decoration: none;
  transition: background var(--wlf-transition), color var(--wlf-transition);
}
.woocommerce-MyAccount-navigation ul li a:hover { background: var(--wlf-color-surface); color: var(--wlf-color-ink); }
.woocommerce-MyAccount-navigation ul li.is-active a {
  background: var(--wlf-color-ink); color: #fff;
}

/* Formulare: Login, Registrierung, Adressen, Passwort ändern — alle
   teilen sich .woocommerce-form-row / .woocommerce-Input. */
.woocommerce-form-row { margin: 0 0 var(--wlf-space-4); }
.woocommerce-form-row label {
  display: block; margin-bottom: .35rem;
  font-size: var(--wlf-text-sm); font-weight: var(--wlf-weight-medium); color: var(--wlf-color-ink);
}
.woocommerce-Input.woocommerce-Input--text,
.woocommerce-form-row select,
.woocommerce-form-row textarea {
  width: 100%; box-sizing: border-box;
  border: 1px solid var(--wlf-color-line); border-radius: var(--wlf-radius-md);
  padding: .7rem .9rem; font-family: inherit; font-size: var(--wlf-text-base);
  color: var(--wlf-color-ink); background: var(--wlf-color-bg);
  transition: border-color var(--wlf-transition);
}
.woocommerce-Input.woocommerce-Input--text:focus-visible { border-color: var(--wlf-color-accent); }
.woocommerce-form__label-for-checkbox {
  display: flex; align-items: center; gap: .5rem;
  font-size: var(--wlf-text-sm); color: var(--wlf-color-ink-muted); font-weight: var(--wlf-weight-normal);
}
.woocommerce-form-row .required { color: var(--wlf-color-danger); text-decoration: none; }

/* Login-/Bestellformular-Button im Haupt-Button-Stil (dunkel, wie
   .bs-btn) statt Akzentfarbe — Login ist keine Kaufhandlung. */
.woocommerce-button.button,
.woocommerce-form-login__submit,
.woocommerce-form-register__submit {
  border-radius: var(--wlf-radius-pill);
  background: var(--wlf-color-ink); border-color: var(--wlf-color-ink); color: #fff;
}
.woocommerce-button.button:hover,
.woocommerce-form-login__submit:hover {
  background: #000; border-color: #000;
}

/* Bestellübersicht-Tabellen auf den Konto-Seiten nutzen dieselbe
   shop_table-Optik wie der Warenkorb — keine doppelte Definition nötig. */

/* ═══════════════════════════════════════════════════════════════════
   FEINSCHLIFF: STERNEBEWERTUNG
   Für den Stern selbst gibt es kein Marken-Token (weder Gold noch
   Petrol passen als Bewertungsfarbe) — ein warmes Gelb ist hier die
   allgemein verständliche Ausnahme von der Token-Pflicht.
   ═══════════════════════════════════════════════════════════════════ */
.star-rating { color: #e0a336; font-size: var(--wlf-text-sm); }
.star-rating span::before { color: #e0a336; }

/* ═══════════════════════════════════════════════════════════════════
   RESPONSIVES FEINTUNING < 640px
   Das meiste regelt der Grid-Autofill der Produktkarten und die
   Karten-Umwandlung der Warenkorb-Tabelle bereits selbst — hier nur,
   was sonst noch aus dem Ruder läuft.
   ═══════════════════════════════════════════════════════════════════ */
@media (max-width: 640px) {
  .woocommerce ul.products { grid-template-columns: 1fr 1fr; gap: var(--wlf-space-3); }
  .single-product .woocommerce-product-details__short-description,
  .woocommerce-tabs .woocommerce-Tabs-panel { max-width: none; }
  .summary.entry-summary form.cart { flex-direction: column; }
  .summary.entry-summary .quantity { width: 100%; }
  .summary.entry-summary .quantity .qty { width: 100%; }
  .cart_totals, .cart-collaterals .cart_totals { padding: var(--wlf-space-5); }
}

/* Ganz schmale Geräte: Produktraster einspaltig, damit Titel/Preis
   nicht auf zwei Wörter pro Zeile umbrechen. */
@media (max-width: 420px) {
  .woocommerce ul.products { grid-template-columns: 1fr; }
}

/* ═══════════════════════════════════════════════════════════════════
   BEWEGUNG REDUZIEREN
   design.css setzt --wlf-transition bereits global auf 0ms; das allein
   stoppt aber keine transform-Animation wie das Karten-Anheben beim
   Hover — die muss hier zusätzlich ausgeschaltet werden.
   ═══════════════════════════════════════════════════════════════════ */
@media (prefers-reduced-motion: reduce) {
  .woocommerce ul.products li.product:hover { transform: none; }
}

/* ═══════════════════════════════════════════════════════════════════
   NACHTRAG — zwei Kollisionen mit WooCommerce' eigenen Stylesheets
   ═══════════════════════════════════════════════════════════════════
   1. woocommerce-layout.css setzt auf die Produktkarten `width: 22.05%`
      und `float: left`. Solange das Raster ein Flexbox-/Float-Layout war,
      passte das. In einem CSS-Grid bezieht sich die Prozentbreite aber auf
      die SPALTE, nicht auf die Zeile — aus 263px Spalte wurden 58px Karte.
      Deshalb muss die Breite hier ausdrücklich zurückgenommen werden.
   2. Die Marken-/Logo-Verlinkung im Kopfbereich liegt außerhalb von
      WooCommerce und darf die Akzentfarbe nicht erben.
   ─────────────────────────────────────────────────────────────────── */

.woocommerce ul.products li.product,
.woocommerce-page ul.products li.product {
	width: auto;
	float: none;
	margin: 0;
	clear: none;
}

/* WooCommerce raeumt jeder 4. Karte `clear: both` ein — im Grid stiftet das
   nur Unordnung. */
.woocommerce ul.products li.product.first,
.woocommerce ul.products li.product.last { clear: none; margin: 0; }

/* Bild darf die Karte fuellen; Woo gibt ihm sonst eine feste Hoehe. */
.woocommerce ul.products li.product a img {
	width: 100%;
	height: auto;
	display: block;
	margin: 0;
	box-shadow: none;
}

/* WooCommerce raeumt dem Produktraster einen Clearfix ein
   (ul.products::before/::after mit display:table). In einem CSS-Grid werden
   daraus zwei LEERE Rasterzellen — die erste Karte rutscht in Spalte 2. */
.woocommerce ul.products::before,
.woocommerce ul.products::after,
.woocommerce-page ul.products::before,
.woocommerce-page ul.products::after { content: none; display: none; }
