/*
 * Struktur des Basis-Themes.
 *
 * Was hier steht: Layout, Raster, Grundtypografie, Zustände.
 * Was hier NICHT steht: Markenfarben, Schriftdateien, Zierrat.
 *
 * Jede Regel benutzt Tokens statt fester Werte — nur so kann ein Child-Theme
 * das Aussehen ändern, ohne Selektoren zu überschreiben.
 */

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

body {
  margin: 0;
  background: var(--wlf-color-bg);
  color: var(--wlf-color-ink);
  font-family: var(--wlf-font-body);
  font-size: var(--wlf-text-base);
  line-height: var(--wlf-leading-base);
  -webkit-font-smoothing: antialiased;
}

img, svg, video { max-width: 100%; height: auto; }

a { color: var(--wlf-color-accent); }
a:hover { color: var(--wlf-color-accent-hover); }

:focus-visible {
  outline: 2px solid var(--wlf-color-accent);
  outline-offset: 2px;
}

h1, h2, h3, h4 {
  font-family: var(--wlf-font-display);
  line-height: var(--wlf-leading-tight);
  text-wrap: balance;
  margin: 0 0 var(--wlf-space-4);
}
h1 { font-size: var(--wlf-text-3xl); }
h2 { font-size: var(--wlf-text-2xl); }
h3 { font-size: var(--wlf-text-xl); }

p { margin: 0 0 var(--wlf-space-4); }

/* ── Layout ───────────────────────────────────────── */

.wlf-container {
  width: 100%;
  max-width: var(--wlf-container);
  margin-inline: auto;
  padding-inline: var(--wlf-gutter);
}
.wlf-container--narrow { max-width: var(--wlf-container-narrow); }

.wlf-site {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
.wlf-site-main { flex: 1 0 auto; padding-block: var(--wlf-space-6); }

.wlf-skip-link {
  position: absolute;
  left: -9999px;
}
.wlf-skip-link:focus {
  left: var(--wlf-space-4);
  top: var(--wlf-space-4);
  z-index: 100;
  background: var(--wlf-color-bg);
  padding: var(--wlf-space-2) var(--wlf-space-4);
  border-radius: var(--wlf-radius-sm);
}

/* ── Kopf und Fuß ─────────────────────────────────── */

.wlf-site-header {
  border-bottom: 1px solid var(--wlf-color-line);
  padding-block: var(--wlf-space-4);
}
.wlf-site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--wlf-space-5);
  flex-wrap: wrap;
}
.wlf-logo-text {
  font-family: var(--wlf-font-display);
  font-weight: var(--wlf-weight-bold);
  letter-spacing: var(--wlf-tracking-wide);
  text-transform: uppercase;
  text-decoration: none;
  color: var(--wlf-color-ink);
}

.wlf-nav ul {
  display: flex;
  gap: var(--wlf-space-5);
  list-style: none;
  margin: 0;
  padding: 0;
  flex-wrap: wrap;
}
.wlf-nav a { text-decoration: none; }

.wlf-site-footer {
  border-top: 1px solid var(--wlf-color-line);
  padding-block: var(--wlf-space-6);
  color: var(--wlf-color-ink-muted);
  font-size: var(--wlf-text-sm);
}

/* ── Modell-Raster (Felgenübersicht) ──────────────── */

.wlf-model-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: var(--wlf-space-5);
  list-style: none;
  margin: 0;
  padding: 0;
}

.wlf-model-card {
  display: flex;
  flex-direction: column;
  gap: var(--wlf-space-3);
  background: var(--wlf-color-surface);
  border: 1px solid var(--wlf-color-line);
  border-radius: var(--wlf-radius-md);
  padding: var(--wlf-space-4);
  transition: border-color var(--wlf-transition), transform var(--wlf-transition);
}
.wlf-model-card:hover {
  border-color: var(--wlf-color-accent);
  transform: translateY(-2px);
}

.wlf-model-card__media {
  aspect-ratio: 1 / 1;
  display: grid;
  place-items: center;
  background: var(--wlf-color-bg);
  border-radius: var(--wlf-radius-sm);
  overflow: hidden;
}
.wlf-model-card__media img { width: 100%; height: 100%; object-fit: contain; }

.wlf-model-card__title {
  font-size: var(--wlf-text-xl);
  margin: 0;
}
.wlf-model-card__title a { text-decoration: none; color: inherit; }

.wlf-model-card__meta {
  font-size: var(--wlf-text-sm);
  color: var(--wlf-color-ink-muted);
  display: flex;
  gap: var(--wlf-space-3);
  flex-wrap: wrap;
}

.wlf-model-card__price {
  font-weight: var(--wlf-weight-medium);
  margin-top: auto;
}

/* Farbpunkte */
.wlf-swatches {
  display: flex;
  gap: var(--wlf-space-2);
  flex-wrap: wrap;
  list-style: none;
  margin: 0;
  padding: 0;
}
.wlf-swatch {
  width: 1rem;
  height: 1rem;
  border-radius: var(--wlf-radius-pill);
  border: 1px solid var(--wlf-color-line);
  background: var(--wlf-color-surface-alt);
}

/* ── Hinweise ─────────────────────────────────────── */

.wlf-notice {
  border: 1px solid var(--wlf-color-line);
  border-left: 3px solid var(--wlf-color-warning);
  border-radius: var(--wlf-radius-sm);
  padding: var(--wlf-space-4);
  background: var(--wlf-color-surface);
  color: var(--wlf-color-ink-muted);
}

/* ── WooCommerce: nur das Nötigste ────────────────── */

/* Katalogbilder kommen als externe URL ohne Attachment — sie brauchen eine
   verlässliche Box, sonst springt das Raster beim Laden. */
.wlfc-catalog-image {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: contain;
}

/* ── Fahrzeugsuche ────────────────────────────────── */

.wlf-fitment-search {
  display: flex;
  flex-direction: column;
  gap: var(--wlf-space-4);
  background: var(--wlf-color-surface);
  border: 1px solid var(--wlf-color-line);
  border-radius: var(--wlf-radius-md);
  padding: var(--wlf-space-5);
  margin-block: var(--wlf-space-5);
}

.wlf-fitment-search__title {
  font-family: var(--wlf-font-display);
  font-size: var(--wlf-text-xl);
  margin: 0;
}
.wlf-fitment-search__hint {
  margin: 0;
  font-size: var(--wlf-text-sm);
  color: var(--wlf-color-ink-muted);
}

.wlf-fitment-search__fields {
  display: flex;
  gap: var(--wlf-space-4);
  align-items: flex-end;
  flex-wrap: wrap;
}

.wlf-field {
  display: flex;
  flex-direction: column;
  gap: var(--wlf-space-1);
}
.wlf-field__label {
  font-size: var(--wlf-text-xs);
  letter-spacing: var(--wlf-tracking-wide);
  text-transform: uppercase;
  color: var(--wlf-color-ink-muted);
}
.wlf-field__input {
  font: inherit;
  font-family: var(--wlf-font-mono);
  color: var(--wlf-color-ink);
  background: var(--wlf-color-bg);
  border: 1px solid var(--wlf-color-line);
  border-radius: var(--wlf-radius-sm);
  padding: var(--wlf-space-2) var(--wlf-space-3);
  width: 7ch;
}

.wlf-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--wlf-space-2);
  font: inherit;
  font-weight: var(--wlf-weight-medium);
  text-decoration: none;
  cursor: pointer;
  background: var(--wlf-color-accent);
  color: var(--wlf-color-accent-ink);
  border: 1px solid var(--wlf-color-accent);
  border-radius: var(--wlf-radius-sm);
  padding: var(--wlf-space-2) var(--wlf-space-5);
  transition: background var(--wlf-transition), border-color var(--wlf-transition);
}
.wlf-button:hover {
  background: var(--wlf-color-accent-hover);
  border-color: var(--wlf-color-accent-hover);
  color: var(--wlf-color-accent-ink);
}
.wlf-button--quiet {
  background: transparent;
  color: var(--wlf-color-ink);
  border-color: var(--wlf-color-line);
}
.wlf-button--quiet:hover {
  background: var(--wlf-color-surface-alt);
  border-color: var(--wlf-color-ink-muted);
  color: var(--wlf-color-ink);
}

/* ── Fahrzeug-Banner ──────────────────────────────── */

.wlf-vehicle-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--wlf-space-4);
  flex-wrap: wrap;
  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-sm);
  padding: var(--wlf-space-4) var(--wlf-space-5);
  margin-block: var(--wlf-space-5);
}
.wlf-vehicle-banner.is-filtering { border-left-color: var(--wlf-color-success); }

.wlf-vehicle-banner__vehicle,
.wlf-vehicle-banner__actions {
  display: flex;
  align-items: center;
  gap: var(--wlf-space-3);
  margin: 0;
  flex-wrap: wrap;
}
.wlf-vehicle-banner__label {
  font-size: var(--wlf-text-xs);
  letter-spacing: var(--wlf-tracking-wide);
  text-transform: uppercase;
  color: var(--wlf-color-ink-muted);
}
.wlf-vehicle-banner__reset { font-size: var(--wlf-text-sm); }

/* ── Passt-Kennzeichnung ──────────────────────────── */

.wlf-fit-badge {
  display: inline-flex;
  align-items: baseline;
  gap: var(--wlf-space-2);
  align-self: flex-start;
  font-size: var(--wlf-text-xs);
  font-weight: var(--wlf-weight-medium);
  letter-spacing: var(--wlf-tracking-wide);
  text-transform: uppercase;
  border-radius: var(--wlf-radius-sm);
  padding: var(--wlf-space-1) var(--wlf-space-3);
}
.wlf-fit-badge--yes {
  color: var(--wlf-color-success);
  background: color-mix(in srgb, var(--wlf-color-success) 12%, transparent);
}
.wlf-fit-badge--no {
  color: var(--wlf-color-ink-muted);
  background: var(--wlf-color-surface-alt);
}
.wlf-fit-badge__status {
  font-weight: var(--wlf-weight-normal);
  text-transform: none;
  letter-spacing: 0;
}
