/* FF-WHEELS KONFIGURATOR — Card-Based Dashboard */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;900&display=swap');

:root {
  --bg: #F2F2F7;
  --card: #FFFFFF;
  --card-inner: #F5F5F7;
  --text: #1D1D1F;
  --text2: #6E6E73;
  --text3: #86868B;
  --accent: #B8860B;
  --border: rgba(0,0,0,.06);
  --r: 16px;
  --r-lg: 20px;
  --shadow: 0 2px 12px rgba(0,0,0,.06);
  --shadow-hover: 0 8px 30px rgba(0,0,0,.1);
  --sidebar-w: 380px;
  --bar-h: 80px;
  --gap: 16px;
  --edge: clamp(16px, 3vw, 40px);
  --max: 1440px;
}

/* ═══ LAYOUT ═══ */
.kfg {
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;
  grid-template-rows: auto 1fr;
  gap: var(--gap);
  padding: calc(64px + 24px) var(--edge) var(--gap);
  max-width: var(--max);
  margin: 0 auto;
  font-family: 'Inter', -apple-system, sans-serif;
}
/* min-height only on Konfigurator, not Live-Preview */
body:not(.page-template-page-live-preview):not(.page-live-preview) .kfg {
  min-height: 100vh;
}
.kfg * { box-sizing: border-box; }

/* ═══ CARD BASE ═══ */
.kfg__card {
  background: var(--card);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow);
  overflow: hidden;
}

/* Sidebar card — spans both rows, scrolls independently */
.kfg__side {
  grid-row: 1 / 3;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  padding: calc(64px + 24px) 24px 320px;
  display: flex; flex-direction: column; gap: 32px;
  min-width: 0;
  /* Fade edges via mask — no extra elements, no z-index issues */
  --fade-h: 52px;
  -webkit-mask-image: linear-gradient(to bottom,
    transparent 0,
    black var(--fade-h),
    black calc(100% - var(--fade-h)),
    transparent 100%);
  mask-image: linear-gradient(to bottom,
    transparent 0,
    black var(--fade-h),
    black calc(100% - var(--fade-h)),
    transparent 100%);
}
/* At very top: no top fade */
.kfg__side.at-top {
  -webkit-mask-image: linear-gradient(to bottom,
    black 0,
    black calc(100% - var(--fade-h)),
    transparent 100%);
  mask-image: linear-gradient(to bottom,
    black 0,
    black calc(100% - var(--fade-h)),
    transparent 100%);
}
/* At very bottom: no bottom fade */
.kfg__side.at-bottom {
  -webkit-mask-image: linear-gradient(to bottom,
    transparent 0,
    black var(--fade-h),
    black 100%);
  mask-image: linear-gradient(to bottom,
    transparent 0,
    black var(--fade-h),
    black 100%);
}
/* At both top and bottom (short content): no fades */
.kfg__side.at-top.at-bottom {
  -webkit-mask-image: none;
  mask-image: none;
}
.kfg__side::-webkit-scrollbar { width: 4px; }
.kfg__side::-webkit-scrollbar-thumb { background: rgba(0,0,0,.1); border-radius: 2px; }

/* — Remove old fade overlay rules — */
.kfg__side-fade-top, .kfg__side-fade-bot, .kfg__side-wrap { display: none !important; }

/* Video card — top right */
.kfg__viz {
  position: relative;
  min-height: 300px;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden; background: #0A0A0A;
}

/* Products card — bottom, full width */
.kfg__products-card {
  grid-column: 2;
  padding: 32px;
}
.kfg__products-card.is-fullwidth {
  grid-column: 1 / -1;
}

/* ═══ STEP SECTIONS ═══ */
.kfg__step { }
.kfg__step-num { font-size: 11px; font-weight: 700; color: var(--accent); letter-spacing: .08em; text-transform: uppercase; margin-bottom: 6px; }
.kfg__step-title-row { display: flex; align-items: center; justify-content: space-between; margin: 0 0 16px; gap: 8px; }
.kfg__step-title { font-size: 20px; font-weight: 700; color: var(--text); margin: 0; flex: 1; }
/* Compact 'ändern' button — top right of step title */
.kfg__step-change-btn {
  flex-shrink: 0; display: flex; align-items: center; gap: 4px;
  font-size: 11px; font-weight: 700; color: var(--accent); background: none;
  border: 1px solid rgba(184,134,11,.25); border-radius: 8px; padding: 5px 10px;
  cursor: pointer; font-family: inherit; transition: all .2s; white-space: nowrap;
}
.kfg__step-change-btn:hover { background: rgba(184,134,11,.07); }
.kfg__step-change-btn .material-symbols-rounded { font-size: 14px; font-variation-settings: 'FILL' 0, 'wght' 400; }

/* Sub-steps (progressive reveal within a step) */
.kfg__substep { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--border); }
.kfg__substep:first-of-type { margin-top: 0; padding-top: 0; border-top: none; }
.kfg__substep.is-hidden { display: none; }
.kfg__substep-label {
  font-size: 12px; font-weight: 700; color: var(--accent); letter-spacing: .04em;
  text-transform: uppercase; margin-bottom: 10px;
}
.kfg__substep-unit {
  font-weight: 500; color: var(--text3); letter-spacing: 0; text-transform: none; font-size: 11px;
}

/* ── Wheel model cards ── */
.kfg__wheel-model-list { display: flex; flex-direction: column; gap: 8px; }
.kfg__wheel-model-card {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px; border: 1px solid var(--border); border-radius: 12px;
  background: var(--card-inner); cursor: pointer; transition: all .18s;
}
.kfg__wheel-model-card:hover { border-color: rgba(0,0,0,.18); background: #fff; }
.kfg__wheel-model-card img { width: 52px; height: 52px; object-fit: contain; border-radius: 8px; background: #fff; }
.kfg__wheel-model-info { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.kfg__wheel-model-name { font-size: 14px; font-weight: 600; color: var(--text); }
.kfg__wheel-model-price { font-size: 12px; color: var(--text3); }
.kfg__wheel-model-arrow { font-size: 18px; color: var(--text3); }

/* ── Tag-style pills — full-width row, content-dependent sizing ── */
.kfg__wheel-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  width: 100%;
}
.kfg__wheel-chip {
  flex: 1 1 auto;
  padding: 7px 12px;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  background: var(--card-inner);
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text2);
  cursor: pointer;
  transition: border-color .15s, background .15s, color .15s;
  font-family: inherit;
  text-align: center;
  white-space: nowrap;
  line-height: 1.3;
}
.kfg__wheel-chip:hover {
  border-color: rgba(0,0,0,.22);
  color: var(--text);
  background: #fff;
}
/* Active: gold border + light tint — matches brand-btn, list-item, color-row active style */
.kfg__wheel-chip.is-active {
  border-color: var(--accent);
  background: rgba(184,134,11,.08);
  color: var(--accent);
  font-weight: 600;
}
/* Icon+text in season pills */
#kfg-season-row .kfg__wheel-chip {
  display: inline-flex; align-items: center; justify-content: center; gap: 4px;
}
#kfg-season-row .kfg__wheel-chip .material-symbols-rounded {
  font-size: 14px;
  font-variation-settings: 'FILL' 1, 'wght' 300;
  flex-shrink: 0;
}

/* ── Color rows ── */
.kfg__wheel-color-list { display: flex; flex-direction: column; gap: 6px; }
.kfg__wheel-color-row {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px; border: 1px solid var(--border); border-radius: 12px;
  background: var(--card-inner); cursor: pointer; transition: all .15s;
}
.kfg__wheel-color-row:hover { border-color: rgba(0,0,0,.18); background: #fff; }
.kfg__wheel-color-row.is-active { border-color: var(--accent); background: rgba(184,134,11,.04); }
.kfg__wheel-color-label { font-size: 13px; font-weight: 500; color: var(--text); flex: 1; text-transform: capitalize; }
.kfg__wheel-color-thumb { width: 36px; height: 36px; object-fit: contain; border-radius: 6px; background: #fff; }

/* ── Wheel summary ── */
.kfg__wheel-summary {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 12px; background: var(--card-inner); border-radius: 12px;
  border: 1px solid var(--border); margin-top: 12px;
}
.kfg__wheel-summary-img img { width: 52px; height: 52px; object-fit: contain; }
.kfg__wheel-summary-info { flex: 1; }
.kfg__wheel-summary-name-row { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.kfg__wheel-summary-name { font-size: 14px; font-weight: 600; color: var(--text); }
.kfg__wheel-summary-color { font-size: 12px; font-weight: 400; color: var(--text2); }
.kfg__wheel-summary-sub { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 4px; }

/* ── Grid card selected highlight — single 2px border, no outline duplication ── */
/* Handled at line 493 via .kfg__pcard.is-selected { border-color } */

/* HSN/TSN Input */
.kfg__hsn-row { display: flex; gap: 10px; max-width: 100%; }
.kfg__input {
  flex: 1; min-width: 0; padding: 12px 16px; border: 1px solid var(--border); border-radius: 12px;
  font-size: 14px; font-family: inherit; background: var(--card-inner);
  transition: border-color .2s; outline: none; color: var(--text);
}
.kfg__input:focus { border-color: var(--accent); }
.kfg__input::placeholder { color: var(--text3); }
.kfg__btn {
  padding: 12px 16px; border: none; border-radius: 12px; font-size: 14px;
  font-weight: 600; cursor: pointer; transition: all .2s; font-family: inherit;
  flex-shrink: 0;
}
.kfg__btn--primary { background: var(--text); color: #fff; }
.kfg__btn--primary:hover { background: #333; }
.kfg__btn--secondary { background: var(--card-inner); color: var(--text); border: 1px solid var(--border); }
.kfg__btn--secondary:hover { border-color: rgba(0,0,0,.15); }
.kfg__btn--accent { background: var(--accent); color: #fff; }
.kfg__btn--accent:hover { filter: brightness(1.1); }
.kfg__btn:disabled { opacity: .4; cursor: not-allowed; }

.kfg__divider {
  display: flex; align-items: center; gap: 12px; margin: 16px 0;
  font-size: 12px; color: var(--text3); font-weight: 500;
}
.kfg__divider::before, .kfg__divider::after { content: ''; flex: 1; height: 1px; background: var(--border); }

/* Brand Picker */
.kfg__brand-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px;
  max-height: none; overflow-y: visible; padding-right: 0;
}
.kfg__brand-btn {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 12px 8px; border: 1px solid var(--border); border-radius: 12px;
  background: var(--card-inner); cursor: pointer; transition: all .2s; font-family: inherit;
}
.kfg__brand-btn:hover { border-color: rgba(0,0,0,.15); background: #eee; }
.kfg__brand-btn.is-active { border-color: var(--accent); background: rgba(184,134,11,.06); }
.kfg__brand-btn img { width: 32px; height: 32px; object-fit: contain; }
.kfg__brand-btn span { font-size: 11px; font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }

/* Series / Variant list */
.kfg__list { display: flex; flex-direction: column; gap: 6px; }
.kfg__list-item {
  padding: 12px 16px; border: 1px solid var(--border); border-radius: 12px;
  background: var(--card-inner); cursor: pointer; transition: all .2s; font-size: 13px;
  color: var(--text); font-weight: 500; display: flex; justify-content: space-between; align-items: center;
}
.kfg__list-item:hover { border-color: rgba(0,0,0,.12); background: #eee; }
.kfg__list-item.is-active { border-color: var(--accent); background: rgba(184,134,11,.06); }
.kfg__list-item small { color: var(--text3); font-weight: 400; }

/* Family accordion: grouped model families */
.kfg__list-item--family {
  font-weight: 600; position: relative;
}
.kfg__list-item--family::after {
  content: 'expand_more'; font-family: 'Material Symbols Rounded'; font-size: 18px;
  color: var(--text3); transition: transform .25s ease;
}
.kfg__list-item--family.is-expanded::after { transform: rotate(180deg); }
.kfg__list-item--family.is-expanded { border-color: var(--accent); background: rgba(184,134,11,.04); }

.kfg__family-gens {
  display: flex; flex-direction: column; gap: 4px;
  padding: 4px 0 4px 12px; margin-bottom: 4px;
  border-left: 2px solid var(--border);
  margin-left: 16px;
}
.kfg__list-item--gen {
  padding: 10px 14px; font-size: 12px; font-weight: 400;
  border: 1px solid transparent; border-radius: 10px;
  background: transparent; color: var(--text2);
}
.kfg__list-item--gen:hover { background: var(--card-inner); border-color: var(--border); color: var(--text); }

/* Search inside steps */
.kfg__search {
  width: 100%; padding: 10px 14px 10px 36px; border: 1px solid var(--border);
  border-radius: 10px; font-size: 13px; background: var(--card-inner) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%2386868B' viewBox='0 0 24 24'%3E%3Cpath d='M15.5 14h-.79l-.28-.27A6.47 6.47 0 0 0 16 9.5 6.5 6.5 0 1 0 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z'/%3E%3C/svg%3E") 12px center no-repeat;
  font-family: inherit; outline: none; transition: border-color .2s; margin-bottom: 10px;
  color: var(--text);
}
.kfg__search:focus { border-color: var(--accent); }

/* Vehicle Info (shown after selection) */
.kfg__vehicle-info {
  background: var(--card-inner); border-radius: 12px; padding: 14px; border: 1px solid var(--border);
}
.kfg__vehicle-info-inner {
  display: flex; align-items: center; gap: 14px;
}
.kfg__vehicle-logo-wrap {
  width: 52px; height: 52px; border-radius: 10px;
  background: #fff; border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; overflow: hidden;
}
.kfg__vehicle-logo-wrap img,
.kfg__vehicle-logo { width: 36px; height: 36px; object-fit: contain; }
.kfg__vehicle-info-body { min-width: 0; flex: 1; }
.kfg__vehicle-name {
  font-size: 14px; font-weight: 700; color: var(--text); margin-bottom: 6px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.kfg__vehicle-specs { display: flex; flex-wrap: wrap; gap: 5px; }
.kfg__vehicle-tag {
  font-size: 11px; font-weight: 600; color: var(--text2); background: #fff;
  padding: 3px 9px; border-radius: 7px; white-space: nowrap;
}
.kfg__vehicle-reset {
  display: none; /* hidden — use .kfg__step-change-btn in HTML instead */
}

/* ═══ TIRE SECTION (Step 3) ═══ */
.kfg__tire-section { display: none; }
.kfg__tire-section.is-visible { display: block; margin-top: 16px; }

/* ── Tire substep chips use same base tag style — no overrides needed ── */

/* ── Tire axle divider ── */
.kfg__tire-divider {
  font-size: 10px; font-weight: 700; letter-spacing: .06em;
  text-transform: uppercase; color: var(--text3);
  padding: 10px 0 4px; border-top: 1px solid var(--border);
  margin-top: 4px;
}

/* Tire list */
.kfg__tire-list {
  display: flex; flex-direction: column; gap: 6px;
  max-height: none; overflow-y: visible; padding-right: 0;
}
.kfg__tire-item {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px; border: 1px solid var(--border); border-radius: 12px;
  background: var(--card-inner); cursor: pointer; transition: all .2s; font-family: inherit;
}
.kfg__tire-item:hover { border-color: rgba(0,0,0,.15); }
.kfg__tire-item.is-selected { border: 2px solid var(--accent); background: rgba(184,134,11,.04); padding: 11px 13px; /* compensate 1→2px border */ }
.kfg__tire-icon {
  width: 36px; height: 36px; border-radius: 10px; background: var(--card-inner);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; overflow: hidden;
}
.kfg__tire-item.is-selected .kfg__tire-icon { background: rgba(184,134,11,.12); }
.kfg__tire-info { flex: 1; min-width: 0; }
.kfg__tire-size { font-size: 14px; font-weight: 600; color: #1D1D1F; }
.kfg__tire-meta { font-size: 11px; color: #6E6E73; margin-top: 2px; }
/* tire-check dot removed — active state shown via border only */
.kfg__tire-empty { font-size: 13px; color: #86868B; text-align: center; padding: 20px 0; }
.kfg__tire-source { font-size: 10px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--text3); padding: 0 0 8px; }

/* Tire badges row wrapper */
.kfg__tire-badges { display: inline-flex; align-items: center; gap: 5px; margin-left: 8px; vertical-align: middle; }

/* Tire badges — identical style to Passend/Compat pill in product grid */
.kfg__tire-badge {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 10px; font-weight: 700; letter-spacing: .02em;
  border-radius: 980px; line-height: 1; padding: 3px 9px 3px 7px;
  cursor: default;
}
.kfg__tire-badge::before {
  content: ''; display: inline-block;
  width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0;
}
/* Empfehlung: amber dot + text only (no star) */
.kfg__tire-badge--rec { background: rgba(184,134,11,.13); color: #9A6700; }
.kfg__tire-badge--rec::before { background: #B8860B; }
/* Zugelassen: green dot + text */
.kfg__tire-badge--ok  { background: rgba(27,138,58,.13);  color: #1B8A3A; }
.kfg__tire-badge--ok::before  { background: #1B8A3A; }

.kfg__tire-item.is-recommended {
  border-color: rgba(184,134,11,.35);
  background: rgba(184,134,11,.04);
}


/* ═══ MAIN AREA ═══ */
/* Video card */
.kfg__viz-video {
  position: absolute; inset: 0; z-index: 0; pointer-events: none; overflow: hidden;
  transition: opacity .5s ease;
}
.kfg__viz-video video {
  position: absolute;
  top: 50%; left: 50%;
  width: 300px;
  height: 100vw;
  transform: translate(-50%, -50%) rotate(90deg);
  object-fit: cover;
}
/* Car image layer — shown at vehicle step, fades out when wheel video starts */
.kfg__viz-car-img {
  position: absolute; inset: 0; z-index: 0; pointer-events: none; overflow: hidden;
  opacity: 0;
  transition: opacity .5s ease;
}
.kfg__viz-car-img.is-visible { opacity: 1; }
.kfg__viz-car-img img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center 65%;
  /* Transition set inline by JS per camera shot */
  will-change: transform, filter;
}
/* Morph: blur during image swap (color/serie change) */
.kfg__viz-car-img.is-morphing img {
  filter: blur(8px) brightness(1.08);
}
/* Cinematic shot fade: blur + darken between camera cuts */
.kfg__viz-car-img.is-shot-fade img {
  filter: blur(12px) brightness(.7);
}
/* Dark overlay for readability */
.kfg__viz-overlay {
  position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(135deg, rgba(0,0,0,.5) 0%, rgba(0,0,0,.25) 100%);
}
.kfg__viz-placeholder {
  position: relative; z-index: 2; text-align: center; color: rgba(255,255,255,.85);
}
.kfg__viz-placeholder .material-symbols-rounded { font-size: 56px; color: rgba(255,255,255,.25); display: block; margin-bottom: 12px; font-variation-settings: 'FILL' 0, 'wght' 200; }
.kfg__viz-placeholder p { font-size: 14px; max-width: 280px; margin: 0 auto; line-height: 1.5; color: rgba(255,255,255,.6); }

/* ── Vehicle info — bottom-left prominent ── */
.kfg__viz-vehicle {
  position: absolute; bottom: 20px; left: 20px; z-index: 3;
  display: none;
  flex-direction: column; gap: 4px;
}
.kfg__viz-vehicle.is-visible { display: flex; }
.kfg__viz-vehicle-name {
  font-size: 20px; font-weight: 700; color: #fff;
  text-shadow: 0 1px 6px rgba(0,0,0,.4); line-height: 1.2;
}
.kfg__viz-vehicle-sub {
  font-size: 12px; color: rgba(255,255,255,.7);
  text-shadow: 0 1px 4px rgba(0,0,0,.3);
}
.kfg__viz-vehicle-chips {
  display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px;
}
.kfg__viz-chip {
  background: rgba(255,255,255,.15); backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,.25);
  border-radius: 8px; padding: 4px 10px;
  font-size: 11px; font-weight: 600; color: #fff;
  text-shadow: none;
}

/* ── Step progress overlay (top-left) ── */
.kfg__viz-steps {
  position: absolute; top: 16px; left: 16px; z-index: 3;
  display: flex; align-items: center; gap: 10px;
}
.kfg__viz-back {
  width: 32px; height: 32px; border-radius: 50%;
  background: rgba(255,255,255,.15); backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,.25);
  display: none; align-items: center; justify-content: center;
  cursor: pointer; color: #fff; transition: background .2s;
}
.kfg__viz-back.is-visible { display: flex; }
.kfg__viz-back:hover { background: rgba(255,255,255,.28); }
.kfg__viz-back .material-symbols-rounded { font-size: 16px; }
.kfg__viz-step-dots {
  display: flex; gap: 5px; align-items: center;
}
.kfg__viz-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: rgba(255,255,255,.35); transition: all .25s;
}
.kfg__viz-dot.is-active {
  width: 20px; border-radius: 3px; background: #fff;
}
.kfg__viz-step-label {
  font-size: 12px; font-weight: 600; color: rgba(255,255,255,.85);
  letter-spacing: .02em; text-shadow: 0 1px 4px rgba(0,0,0,.3);
}

/* ── Passende Felgen count (top-right of viz card) ── */
.kfg__viz-count {
  position: absolute; top: 16px; right: 16px; z-index: 3;
  display: none;
  background: rgba(255,255,255,.12); backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 10px; padding: 5px 12px;
  font-size: 12px; font-weight: 600; color: rgba(255,255,255,.9);
  letter-spacing: .01em;
}
.kfg__viz-count.is-visible { display: block; }

/* ═══ PRODUCTS CARD ═══ */
.kfg__products {
  display: none;
}
.kfg__products.is-visible { display: block; }
.kfg__products-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 24px; }
.kfg__products-head-left { display: flex; align-items: center; gap: 10px; }
.kfg__products-head-right { display: flex; align-items: center; gap: 12px; }
.kfg__products-title { color: var(--text); margin: 0; font-size: 1.1rem; font-weight: 700; }
.kfg__back-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: 10px;
  background: var(--card-inner); border: 1px solid var(--border);
  color: var(--text); cursor: pointer; transition: all .2s;
  flex-shrink: 0;
}
.kfg__back-btn:hover { background: var(--border); }
.kfg__back-btn .material-symbols-rounded { font-size: 20px; }

/* ── View toggle ── */
.kfg__view-toggle {
  display: flex; gap: 4px;
  background: var(--card-inner); border-radius: 10px; padding: 3px;
}
.kfg__view-btn {
  height: 32px; border: none; border-radius: 7px; background: transparent;
  display: flex; align-items: center; justify-content: center; gap: 5px;
  padding: 0 10px; cursor: pointer;
  color: var(--text3); transition: background .15s, color .15s;
}
.kfg__view-btn .material-symbols-rounded { font-size: 16px; font-variation-settings: 'FILL' 0, 'wght' 300; }
.kfg__view-btn-label { font-size: 12px; font-weight: 500; }
.kfg__view-btn:hover { color: var(--text); }
.kfg__view-btn.is-active { background: #fff; color: var(--text); box-shadow: 0 1px 4px rgba(0,0,0,.1); }

/* ── Desktop-only grid heading ── */
.kfg__grid-heading {
  margin-bottom: 20px;
}
.kfg__grid-heading-text {
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.02em;
  margin: 0;
}

/* ── Gestapelt (default): Serien-Karten, 3-Spalten ── */
.kfg__products-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.kfg__pcard--stacked { display: block; }

/* ── Raster: Einzelne Produkte (eine Karte pro Farbe), 4-Spalten ── */
.kfg__products-grid.is-flat { grid-template-columns: repeat(3, 1fr); gap: 16px; }
/* In Raster-Modus: die gruppierten Karten komplett ausblenden */
.kfg__products-grid.is-flat .kfg__pcard--stacked { display: none; }
/* Einzelne Produkt-Karten nur im Raster-Modus anzeigen */
.kfg__pcard--single { display: none; }
.kfg__products-grid.is-flat .kfg__pcard--single { display: block; }

/* Product card inside configurator */
.kfg__pcard {
  background: #fff; border-radius: var(--r); overflow: hidden; cursor: pointer;
  border: 2px solid transparent; transition: all .25s; text-decoration: none; color: inherit;
  box-shadow: var(--shadow);
}
.kfg__pcard:hover { box-shadow: var(--shadow-hover); transform: translateY(-2px); }
.kfg__pcard.is-selected { border-color: var(--accent); background: rgba(184,134,11,.02); }
.kfg__pcard.is-compat  { border-color: #1B8A3A; } /* passend: green border, no extra outline */
.kfg__pcard.is-selected.is-compat { border-color: var(--accent); } /* selected wins over compat */

.kfg__pcard-img { aspect-ratio: 1; background: #fff; display: flex; align-items: center; justify-content: center; padding: 5%; position: relative; }
.kfg__pcard-img img { width: 100%; height: 100%; object-fit: contain; position: absolute; top: 0; left: 0; padding: 5%; opacity: 0; transition: opacity .3s ease; }
.kfg__pcard-img img.is-active { opacity: 1; }
.kfg__pcard-badge {
  position: absolute; top: 10px; left: 10px; font-size: 10px; font-weight: 600;
  background: rgba(255,255,255,.85); backdrop-filter: blur(8px); padding: 4px 10px;
  border-radius: 980px; color: var(--text);
}
/* ── Passend badge: pill with dot (no ✓ icon) ── */
.kfg__pcard-compat {
  position: absolute; top: 10px; right: 10px;
  font-size: 10px; font-weight: 700; letter-spacing: .03em;
  padding: 3px 9px 3px 7px; border-radius: 980px;
  display: flex; align-items: center; gap: 5px;
}
.kfg__pcard-compat::before {
  content: ''; display: inline-block;
  width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0;
}
.kfg__pcard-compat--ok   { background: rgba(27,138,58,.13); color: #1B8A3A; }
.kfg__pcard-compat--ok::before   { background: #1B8A3A; }
.kfg__pcard-compat--warn { background: rgba(245,158,11,.13); color: #9A6700; }
.kfg__pcard-compat--warn::before { background: #F59E0B; }
.kfg__pcard-body { padding: 14px 16px 16px; color: #1D1D1F; border-top: 1px solid rgba(0,0,0,.06); }
.kfg__pcard-series { font-size: 11px; font-weight: 600; color: #B8860B; letter-spacing: .04em; text-transform: uppercase; }
.kfg__pcard-name { font-size: 14px; font-weight: 600; margin: 4px 0 6px; color: #1D1D1F; }
.kfg__pcard-price { font-size: 13px; color: #6E6E73; }
.kfg__pcard-price strong { color: #1D1D1F; }

/* Color swatches in card */
.kfg__pcard-swatches { display: flex; gap: 6px; margin-top: 10px; align-items: center; overflow: visible; max-width: 100%; padding: 3px 2px; }
.kfg__pcard-swatch {
  width: 20px; height: 20px; border-radius: 50%; border: 1.5px solid transparent;
  cursor: pointer; flex-shrink: 0;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.12), 0 0 0 0 transparent;
  transition: box-shadow .15s, transform .15s;
}
.kfg__pcard-swatch:hover { transform: scale(1.1); }
.kfg__pcard-swatch.is-active {
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.15), 0 0 0 2px #fff, 0 0 0 3.5px rgba(0,0,0,.55);
  transform: scale(1.05);
}
.kfg__pcard-swatch-label { font-size: 11px; color: var(--text3); margin-left: 2px; }

/* ═══ STICKY CHECKOUT BAR ═══ */
.kfg__bar {
  position: fixed; bottom: 0; left: 0; right: 0; height: var(--bar-h);
  background: rgba(255,255,255,.92); backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
  border-top: 1px solid var(--border); z-index: 100;
  transform: translateY(100%); transition: transform .4s cubic-bezier(.4,0,.2,1);
  display: flex; align-items: center; justify-content: center;
}
.kfg__bar-inner {
  width: 100%; max-width: var(--max); padding: 0 40px;
  display: flex; align-items: center; gap: 32px;
}
.kfg__bar.is-visible { transform: translateY(0); }
.kfg__bar-summary { flex: 1; }
.kfg__bar-label { font-size: 10px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--text3); }
.kfg__bar-price { font-size: 24px; font-weight: 800; color: var(--text); margin-top: 2px; }
.kfg__bar-price small { font-size: 14px; font-weight: 500; color: var(--text2); }
/* Quantity stepper */
.kfg__bar-qty {
  display: flex; align-items: center; gap: 8px; flex-shrink: 0;
  background: var(--card-inner); border: 1px solid var(--border);
  border-radius: 12px; padding: 8px 12px;
}
.kfg__bar-qty-btn {
  width: 28px; height: 28px; border-radius: 8px; border: 1px solid var(--border);
  background: #fff; cursor: pointer; font-size: 16px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  transition: all .15s; color: var(--text); line-height: 1;
}
.kfg__bar-qty-btn:hover { background: var(--accent); border-color: var(--accent); color: #fff; }
.kfg__bar-qty-val { font-size: 18px; font-weight: 800; color: var(--text); min-width: 22px; text-align: center; }
.kfg__bar-qty-lbl { font-size: 11px; font-weight: 600; color: var(--text3); }
.kfg__bar-actions { display: flex; gap: 10px; }
.kfg__bar-btn {
  padding: 14px 32px; border-radius: 12px; font-size: 14px; font-weight: 700;
  cursor: pointer; border: none; transition: all .2s; font-family: inherit;
  display: flex; align-items: center; gap: 8px;
}
.kfg__bar-btn--cart { background: var(--text); color: #fff; }
.kfg__bar-btn--cart:hover { background: #333; }
.kfg__bar-btn--save { background: var(--card-inner); color: var(--text); border: 1px solid var(--border); }

/* ═══ LOADING / STATES ═══ */
.kfg__loading { text-align: center; padding: 24px; color: var(--text3); font-size: 13px; }
.kfg__loading::before { content: ''; display: block; width: 24px; height: 24px; margin: 0 auto 8px; border: 2px solid var(--border); border-top-color: var(--accent); border-radius: 50%; animation: kfg-spin .6s linear infinite; }
@keyframes kfg-spin { to { transform: rotate(360deg); } }

.kfg__empty { text-align: center; padding: 24px; color: var(--text3); font-size: 13px; }

/* Hidden */
.kfg__step[data-state="locked"] { opacity: .4; pointer-events: none; }
.kfg__step[data-state="done"] .kfg__step-num { color: #1B8A3A; }

/* ═══ RESPONSIVE ═══ */
/* ═══ RESPONSIVE — TABLET ═══ */
@media (max-width: 1024px) {
  .kfg__products-grid { grid-template-columns: repeat(2, 1fr); }
  .kfg__bar { padding: 0 20px; }
}

/* ═══ RESPONSIVE — MOBILE ═══ */
@media (max-width: 768px) {
  /* ─ Layout: single column, no sidebar ─ */
  .kfg {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto;
    gap: 10px;
    padding: calc(56px + 12px) 10px calc(var(--mob-bar-h) + 20px);
  }
  /* Reset grid-column so viz + products card stack correctly in 1-column grid */
  .kfg__viz,
  .kfg__products-card { grid-column: 1 !important; }
  .kfg__products-card { padding: 12px; }
  .kfg__side { display: none !important; }
  .kfg__side-fade-top,
  .kfg__side-fade-bot { display: none !important; }
  /* Product grid → 1 column both modes */
  .kfg__products-grid,
  .kfg__products-grid.is-flat { grid-template-columns: 1fr !important; gap: 8px; }
  /* Grid heading — desktop only */
  .kfg__grid-heading { display: none; }
  /* Tire heading — desktop only */
  .kfg__tire-heading { display: none; }
  .kfg__viz { min-height: 220px; }
  /* Checkout bar hidden on mobile (replaced by mob-bar) */
  .kfg__bar { display: none !important; }

  /* ─ Products heading: wrap so toggle doesn't overflow ─ */
  .kfg__products-head {
    padding: 0 0 8px;
    flex-wrap: wrap; gap: 8px;
    margin-bottom: 12px;
    justify-content: flex-end; /* toggle right-aligned, title gone */
  }
  /* Hide the grid title on mobile */
  .kfg__products-title { display: none; }
  .kfg__products-head-right { flex-shrink: 0; }
  /* Toggle: always show both labels on mobile */
  .kfg__view-btn-label { display: inline; }
  .kfg__view-btn { padding: 0 10px; }

  /* ─ Product card: image fills full card width ─ */
  .kfg__pcard-img {
    height: auto !important;
    aspect-ratio: 4/3;
    width: 100%;
  }
  .kfg__pcard-img img { width: 100%; height: 100%; object-fit: contain; }
  .kfg__pcard-body { padding: 10px; }
  .kfg__pcard-name { font-size: 14px; }
  .kfg__pcard-price { font-size: 13px; }

  /* ─ Viz header ─ */
  .kfg__viz-name { font-size: 18px; }
  .kfg__viz-chip { font-size: 10px; padding: 3px 7px; border-radius: 6px; }
  .kfg__viz-vehicle-chips { gap: 4px; margin-top: 4px; }
}

/* ─────────────────────────────────────────
   MOBILE BOTTOM BAR
───────────────────────────────────────── */
:root { --mob-bar-h: 72px; }

.kfg__mob-bar {
  display: none; /* shown only on mobile via media query */
}

@media (max-width: 768px) {
  .kfg__mob-bar {
    display: flex; align-items: center; justify-content: space-between;
    position: fixed; bottom: 0; left: 0; right: 0; z-index: 200;
    height: var(--mob-bar-h);
    background: rgba(255,255,255,.96); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid var(--border);
    padding: 0 12px;
    gap: 8px;
  }
}

/* Left: price area (always visible) */
.kfg__mob-bar-price {
  display: flex; flex-direction: column; gap: 1px;
  flex: 1; min-width: 0;
}
.kfg__mob-bar-price-label {
  font-size: 10px; font-weight: 600; text-transform: uppercase;
  letter-spacing: .04em; color: var(--text3);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.kfg__mob-bar-price-amount {
  font-size: 15px; font-weight: 800; color: var(--text);
  white-space: nowrap;
}
.kfg__mob-bar-price-amount:empty::after {
  content: '–'; color: var(--text3); font-weight: 500;
}

.kfg__mob-actions { display: flex; gap: 6px; flex-shrink: 0; align-items: center; }

/* Reset btn: subtle icon, hidden until has-product */
.kfg__mob-reset-btn {
  display: none; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: 10px;
  background: transparent; border: 1px solid var(--border);
  color: var(--text3); cursor: pointer;
  transition: all .2s;
}
.kfg__mob-reset-btn .material-symbols-rounded { font-size: 18px; }
.kfg__mob-reset-btn:active { background: var(--card-inner); }
.kfg__mob-bar.has-product .kfg__mob-reset-btn { display: flex; }

/* Config/Ansehen btn: default = primary (black), becomes secondary when has-product */
.kfg__mob-config-btn {
  display: flex; align-items: center; gap: 5px;
  height: 40px; padding: 0 14px; border-radius: 10px;
  background: var(--text); border: none;
  font-size: 12px; font-weight: 700; color: #fff;
  cursor: pointer; font-family: inherit; white-space: nowrap;
  transition: all .2s;
}
.kfg__mob-config-btn .material-symbols-rounded { font-size: 16px; }
/* When complete config (wheel+tire): config btn becomes icon-only outline */
.kfg__mob-bar.has-complete .kfg__mob-config-btn {
  background: transparent; border: 1px solid var(--border); color: var(--text);
  width: 40px; padding: 0; justify-content: center;
}
/* Icon swap: default=tune, complete=visibility */
.kfg__mob-bar.has-complete .kfg__mob-icon-default { display: none !important; }
.kfg__mob-bar.has-complete .kfg__mob-icon-view { display: inline !important; }

/* Cart btn: black CTA, hidden until product configured */
.kfg__mob-cart-btn {
  display: none; align-items: center; gap: 5px;
  height: 40px; padding: 0 16px; border-radius: 10px;
  background: var(--text); color: #fff; border: none;
  font-size: 12px; font-weight: 700; cursor: pointer;
  font-family: inherit; white-space: nowrap; transition: all .2s;
}
.kfg__mob-bar.has-product .kfg__mob-cart-btn {
  display: flex;
}

/* Config modal card images — responsive */
.cfg-modal-img {
  width: 72px; height: 72px; border-radius: 10px;
  background: var(--card-inner); flex-shrink: 0;
  overflow: hidden; display: flex;
  align-items: center; justify-content: center;
}
@media (max-width: 600px) {
  .cfg-modal-img { width: 52px; height: 52px; border-radius: 8px; }
}

/* ─────────────────────────────────────────
   MOBILE BACKDROP
───────────────────────────────────────── */
.kfg__mob-backdrop {
  display: none; position: fixed; inset: 0; z-index: 299;
  background: rgba(0,0,0,.45); opacity: 0;
  transition: opacity .3s ease;
  backdrop-filter: blur(2px); -webkit-backdrop-filter: blur(2px);
}
.kfg__mob-backdrop.is-open {
  display: block; opacity: 1;
}

/* ─────────────────────────────────────────
   MOBILE BOTTOM SHEET
───────────────────────────────────────── */
.kfg__mob-sheet {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 300;
  height: 90vh;
  max-height: 90vh;
  background: var(--card);
  border-radius: 20px 20px 0 0;
  box-shadow: 0 -8px 40px rgba(0,0,0,.15);
  display: flex; flex-direction: column;
  transform: translateY(100%);
  transition: transform .38s cubic-bezier(.32,1,.3,1);
  touch-action: pan-y;   /* iOS: allow vertical pan on the whole sheet */
}
.kfg__mob-sheet.is-open {
  transform: translateY(0);
}

/* Handle + header */
.kfg__mob-sheet-header {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 16px 12px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.kfg__mob-sheet-handle {
  position: absolute; top: 8px; left: 50%; transform: translateX(-50%);
  width: 36px; height: 4px; border-radius: 2px; background: rgba(0,0,0,.12);
}
.kfg__mob-sheet-title {
  flex: 1; font-size: 15px; font-weight: 700; color: var(--text);
}
.kfg__mob-sheet-close {
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--card-inner); border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  color: var(--text2);
}
.kfg__mob-sheet-close .material-symbols-rounded { font-size: 18px; }

/* Scrollable body — flex:1 fills remaining height between header and footer */
.kfg__mob-sheet-body {
  flex: 1 1 0;
  min-height: 0;
  overflow-y: scroll;             /* scroll not auto — required for iOS Safari */
  overflow-x: hidden;
  padding: 16px;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-y: contain;
  touch-action: pan-y;            /* tells iOS: this element handles vertical pan */
}
/* CRITICAL: sidebar is hidden on mobile via display:none!important.
   When physically moved into the sheet, this higher-specificity rule shows it.
   Must kill ALL desktop sidebar properties that break sheet scroll. */
.kfg__mob-sheet-body > .kfg__side,
.kfg__mob-sheet-body .kfg__side {
  display: flex !important;
  flex-direction: column !important;
  gap: 24px !important;
  position: static !important;
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  overflow: visible !important;
  overscroll-behavior: auto !important;
  box-shadow: none !important;
  border-radius: 0 !important;
  border: none !important;
  padding: 16px 0 0 !important;
  /* Kill desktop mask-image fade — this hides content at top/bottom */
  -webkit-mask-image: none !important;
  mask-image: none !important;
  /* Kill desktop grid placement */
  grid-row: auto !important;
  /* Kill sticky */
  top: auto !important;
}
/* Reset sidebar inner styles when rendered inside sheet */
.kfg__mob-sheet-body .kfg__step { margin-bottom: 24px; }
/* Let tire list scroll naturally with the sheet body — no height cap */
.kfg__mob-sheet-body .kfg__tire-list { max-height: none; }

/* Footer checkout strip — hidden until product is configured */
.kfg__mob-sheet-footer {
  display: none;         /* hidden by default */
  align-items: center; gap: 12px;
  padding: 10px 16px; padding-bottom: max(10px, env(safe-area-inset-bottom));
  border-top: 1px solid var(--border); flex-shrink: 0;
  background: var(--card);
}
/* Show footer only when a product+price is ready */
.kfg__mob-sheet.has-product .kfg__mob-sheet-footer {
  display: flex;
}
.kfg__mob-footer-price { flex: 1; min-width: 0; }
.kfg__mob-footer-label { font-size: 9px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--text3); }
.kfg__mob-footer-amount {
  font-size: 15px; font-weight: 800; color: var(--text); margin-top: 1px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.kfg__mob-footer-amount small {
  font-size: 10px; font-weight: 500; color: var(--text3);
  display: block; margin-top: 1px;
}
.kfg__mob-footer-cart {
  display: flex; align-items: center; gap: 6px;
  padding: 12px 18px; border-radius: 12px;
  background: var(--text); color: #fff; border: none;
  font-size: 13px; font-weight: 700; cursor: pointer; font-family: inherit;
  flex-shrink: 0; white-space: nowrap;
}

/* ═══════════════════════════════════════════════════════════════════════
   TIRE CATALOG — List View in Products Card (Step 03)
   ═══════════════════════════════════════════════════════════════════════ */

/* Container wrapper */
.kfg__tire-catalog { display: none; }
.kfg__tire-catalog.is-visible { display: block; }

/* ── Tire legend panel ── */
.kfg__tire-legend {
  background: var(--card-inner); border-radius: 14px; padding: 20px;
  margin-bottom: 16px; border: 1px solid var(--border);
  animation: kfgFadeSlideDown .2s ease;
}
@keyframes kfgFadeSlideDown {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}
.kfg__tire-legend-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 0;
}
.kfg__tire-legend-item {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
}
/* Remove border on last row (items 5 & 6) */
.kfg__tire-legend-item:nth-last-child(-n+2) { border-bottom: none; }
/* Vertical divider via right border on odd (left) items */
.kfg__tire-legend-item:nth-child(odd) { border-right: 1px solid var(--border); }
.kfg__tire-legend-icon {
  flex-shrink: 0; display: flex; align-items: center; justify-content: center;
  width: 32px; min-height: 28px;
}
.kfg__tire-legend-label {
  font-size: 12px; font-weight: 700; color: var(--text); margin-bottom: 3px;
}
.kfg__tire-legend-desc {
  font-size: 11px; color: var(--text3); line-height: 1.5;
}

/* ── Filter toolbar ── */
.kfg__tire-toolbar {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 16px;
}
/* On desktop, children flow flat into the toolbar row */
.kfg__tire-toolbar-always {
  display: contents;
}
.kfg__tire-toolbar-collapsible {
  display: contents;
}
/* Filter toggle button — hidden on desktop */
.kfg__tire-filter-toggle {
  display: none; align-items: center; gap: 4px;
  height: 38px; padding: 0 12px; border-radius: 10px;
  border: 1px solid var(--border); background: var(--card-inner);
  color: var(--text); font-size: 12px; font-weight: 600;
  cursor: pointer; transition: all .15s; flex-shrink: 0;
}
.kfg__tire-filter-toggle .material-symbols-rounded { font-size: 16px; }
.kfg__tire-filter-toggle.is-active { background: var(--text); color: #fff; border-color: var(--text); }

/* Search */
.kfg__tire-search {
  flex: 1; min-width: 180px; max-width: 340px;
  padding: 9px 14px 9px 36px;
  border: 1px solid var(--border); border-radius: 10px;
  font-size: 13px; font-family: inherit;
  background: var(--card-inner) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%2386868B' viewBox='0 0 24 24'%3E%3Cpath d='M15.5 14h-.79l-.28-.27A6.47 6.47 0 0 0 16 9.5 6.5 6.5 0 1 0 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z'/%3E%3C/svg%3E") 12px center no-repeat;
  outline: none; color: var(--text); transition: border-color .2s;
}
.kfg__tire-search:focus { border-color: var(--accent); }

/* Select dropdowns */
.kfg__tire-select {
  padding: 8px 30px 8px 12px; border: 1px solid var(--border); border-radius: 10px;
  font-size: 12px; font-weight: 500; font-family: inherit;
  background: var(--card-inner); color: var(--text);
  cursor: pointer; outline: none;
  appearance: none; -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%2386868B' viewBox='0 0 24 24'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
}
.kfg__tire-select:focus { border-color: var(--accent); }

/* Result count + sort row */
.kfg__tire-results-bar {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 12px; gap: 12px;
}
.kfg__tire-results-count {
  font-size: 12px; font-weight: 500; color: var(--text3);
}
.kfg__tire-results-count strong { color: var(--text); font-weight: 700; }

/* ── Tire list container ── */
.kfg__tire-catalog-list {
  display: flex; flex-direction: column; gap: 6px;
}

/* ── Individual tire row ── */
.kfg__tire-row {
  display: flex; align-items: center; gap: 16px;
  padding: 14px 16px; border: 1px solid var(--border); border-radius: 14px;
  background: #fff; cursor: pointer; transition: all .2s;
}
.kfg__tire-row:hover { border-color: rgba(0,0,0,.15); box-shadow: 0 2px 8px rgba(0,0,0,.04); }
.kfg__tire-row.is-selected { border-color: var(--accent); background: rgba(184,134,11,.03); }

/* ── Top recommendation badge row ── */
.kfg__tire-row--top {
  position: relative;
  padding-top: 22px; /* space for the badge */
}
.kfg__tire-row-badge {
  position: absolute; top: -9px; right: 16px;
  background: var(--accent); color: #fff;
  font-size: 10px; font-weight: 700; letter-spacing: .03em;
  padding: 2px 10px; border-radius: 6px;
  display: inline-flex; align-items: center;
  box-shadow: 0 2px 6px rgba(184,134,11,.25);
  line-height: 1.4;
}
/* Brand initial / icon */
.kfg__tire-row-icon {
  width: 44px; height: 44px; border-radius: 10px;
  background: var(--card-inner); flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; font-weight: 800; color: var(--text2);
  text-transform: uppercase;
}

/* Info block */
.kfg__tire-row-info { flex: 1; min-width: 0; }
.kfg__tire-row-brand {
  font-size: 11px; font-weight: 700; color: var(--accent);
  letter-spacing: .04em; text-transform: uppercase;
}
.kfg__tire-row-name {
  font-size: 14px; font-weight: 600; color: var(--text); margin-top: 1px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.kfg__tire-row-spec {
  font-size: 12px; color: var(--text2); margin-top: 3px;
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
}
.kfg__tire-row-spec-tag {
  display: inline-flex; align-items: center; gap: 3px;
  font-size: 11px; font-weight: 500; color: var(--text3);
}

/* ── EU Label badges ── */
.kfg__tire-eu-labels {
  display: flex; gap: 5px; flex-shrink: 0; align-items: center; align-self: center;
  width: 120px; justify-content: flex-end;
}
/* Season badge duplicate: hidden on desktop (shown on mobile via override) */
.kfg__tire-eu-labels .kfg__tire-season-badge { display: none; }
.kfg__tire-eu {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 28px; height: 24px; border-radius: 6px;
  font-size: 11px; font-weight: 700; padding: 0 5px;
  line-height: 1; position: relative;
}
.kfg__tire-eu-icon {
  position: absolute; top: -4px; right: -4px;
  width: 12px; height: 12px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 8px; line-height: 1;
  box-shadow: 0 0 0 1.5px #fff;
}
.kfg__tire-eu--fuel .kfg__tire-eu-icon { background: #2E7D32; color: #fff; }
.kfg__tire-eu--grip .kfg__tire-eu-icon { background: #1565C0; color: #fff; }
/* Fuel efficiency */
.kfg__tire-eu--fuel { background: rgba(46,125,50,.1); color: #2E7D32; }
.kfg__tire-eu--fuel[data-grade="A"] { background: #1B5E20; color: #fff; }
.kfg__tire-eu--fuel[data-grade="B"] { background: #388E3C; color: #fff; }
.kfg__tire-eu--fuel[data-grade="C"] { background: rgba(46,125,50,.15); color: #2E7D32; }
.kfg__tire-eu--fuel[data-grade="D"],
.kfg__tire-eu--fuel[data-grade="E"] { background: rgba(245,124,0,.12); color: #E65100; }

/* Wet grip */
.kfg__tire-eu--grip { background: rgba(21,101,192,.1); color: #1565C0; }
.kfg__tire-eu--grip[data-grade="A"] { background: #0D47A1; color: #fff; }
.kfg__tire-eu--grip[data-grade="B"] { background: #1565C0; color: #fff; }
.kfg__tire-eu--grip[data-grade="C"] { background: rgba(21,101,192,.15); color: #1565C0; }

/* Noise */
.kfg__tire-eu--noise {
  background: rgba(0,0,0,.06); color: var(--text2);
  font-weight: 600; gap: 2px;
}
.kfg__tire-eu--noise .kfg__tire-eu-unit { font-size: 9px; font-weight: 400; }

/* ── Price + stock column ── */
.kfg__tire-row-price-col {
  text-align: right; flex-shrink: 0; width: 100px; align-self: center;
}
.kfg__tire-row-price {
  font-size: 16px; font-weight: 800; color: var(--text);
}
.kfg__tire-row-price-unit {
  font-size: 11px; font-weight: 400; color: var(--text3);
}
.kfg__tire-row-stock {
  font-size: 10px; font-weight: 600; margin-top: 3px;
  display: flex; align-items: center; gap: 4px; justify-content: flex-end;
}
.kfg__tire-row-stock::before {
  content: ''; width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0;
}
.kfg__tire-row-stock--high { color: #1B8A3A; }
.kfg__tire-row-stock--high::before { background: #1B8A3A; }
.kfg__tire-row-stock--low { color: #F59E0B; }
.kfg__tire-row-stock--low::before { background: #F59E0B; }

/* ── Season badge in row ── */
.kfg__tire-season-badge {
  font-size: 10px; font-weight: 600; padding: 2px 8px;
  border-radius: 6px; display: inline-flex; align-items: center; gap: 4px;
}
.kfg__tire-season-badge--s { background: rgba(255,152,0,.1); color: #E65100; }
.kfg__tire-season-badge--w { background: rgba(33,150,243,.1); color: #0D47A1; }
.kfg__tire-season-badge--g { background: rgba(76,175,80,.1); color: #2E7D32; }

/* ── Pagination ── */
.kfg__tire-pagination {
  display: flex; align-items: center; justify-content: center;
  gap: 6px; margin-top: 20px; padding-top: 16px;
  border-top: 1px solid var(--border);
}
.kfg__tire-page-btn {
  min-width: 36px; height: 36px; border-radius: 10px;
  border: 1px solid var(--border); background: var(--card-inner);
  font-size: 13px; font-weight: 600; color: var(--text);
  cursor: pointer; font-family: inherit; transition: all .15s;
  display: flex; align-items: center; justify-content: center;
}
.kfg__tire-page-btn:hover { border-color: rgba(0,0,0,.2); }
.kfg__tire-page-btn.is-active { background: var(--text); color: #fff; border-color: var(--text); }
.kfg__tire-page-btn:disabled { opacity: .3; cursor: default; }

/* ── Loading state ── */
.kfg__tire-catalog-loading {
  display: flex; align-items: center; justify-content: center;
  padding: 48px 0; color: var(--text3); font-size: 13px;
  flex-direction: column; gap: 12px;
}
.kfg__tire-catalog-loading::before {
  content: ''; width: 28px; height: 28px;
  border: 2.5px solid var(--border); border-top-color: var(--accent);
  border-radius: 50%; animation: kfg-spin .6s linear infinite;
}

/* ═══ RESPONSIVE — TIRE CATALOG ═══ */
@media (max-width: 768px) {
  /* 1. Back arrow: force left-aligned */
  .kfg__products-head { justify-content: flex-start; gap: 10px; }
  .kfg__products-head-left { flex-shrink: 0; }
  .kfg__products-head-right { margin-left: auto; }

  /* 2. Collapsible filter toolbar */
  .kfg__tire-toolbar { flex-direction: column; }
  .kfg__tire-toolbar-always {
    display: flex; align-items: center; gap: 8px; flex-wrap: nowrap;
    width: 100%; overflow: hidden;
  }
  .kfg__tire-filter-toggle { display: inline-flex; flex-shrink: 0; }
  .kfg__tire-search { flex: 1 1 0; min-width: 0; max-width: 100%; }
  .kfg__tire-toolbar-collapsible {
    display: none; flex-direction: column; gap: 8px;
  }
  .kfg__tire-toolbar-collapsible.is-open {
    display: flex;
    animation: kfgFadeSlideDown .2s ease;
  }
  .kfg__tire-toolbar-collapsible .kfg__tire-select { width: 100%; }

  /* 3. Tire row: grid layout with badges on own row */
  .kfg__tire-row {
    display: grid;
    grid-template-columns: 40px 1fr auto;
    grid-template-rows: auto auto;
    gap: 4px 10px;
    padding: 12px;
  }
  .kfg__tire-row-icon {
    grid-row: 1 / 3; grid-column: 1; align-self: center;
    width: 40px; height: 40px; font-size: 14px;
  }
  .kfg__tire-row-info { grid-row: 1; grid-column: 2; min-width: 0; }
  .kfg__tire-row-info .kfg__tire-row-name {
    font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  }
  .kfg__tire-row-price-col {
    grid-row: 1; grid-column: 3; align-self: center; min-width: 70px;
  }
  /* Hide season badge in spec row on mobile */
  .kfg__tire-row-spec .kfg__tire-season-badge { display: none; }
  /* Show duplicate season badge in EU labels row */
  .kfg__tire-eu-labels .kfg__tire-season-badge { display: inline-flex !important; }
  .kfg__tire-eu-labels {
    grid-row: 2; grid-column: 2 / 4;
    min-width: 0; justify-content: flex-start; gap: 4px;
  }
  .kfg__tire-eu { min-width: 24px; height: 20px; font-size: 10px; border-radius: 5px; }
  .kfg__tire-row-price { font-size: 14px; }

  .kfg__tire-legend-grid { grid-template-columns: 1fr; }
  .kfg__tire-legend-item:nth-child(odd) { border-right: none; }
  .kfg__tire-legend-item:nth-last-child(-n+2) { border-bottom: 1px solid var(--border); }
  .kfg__tire-legend-item:last-child { border-bottom: none; }
}

