/* KFZ PDP - Product detail page enhancements (gallery + fitment) */

/* --- Gallery --- */
.kfz-gallery {
  display: grid;
  grid-template-columns: 86px 1fr;
  gap: 16px;
  align-items: start;
}

@media (max-width: 992px) {
  .kfz-gallery {
    grid-template-columns: 1fr;
  }
}

.kfz-thumbs {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 10px;
  border-radius: 18px;
  border: 1px solid rgba(0, 0, 0, 0.06);
  background: #fff;
  max-height: 520px;
  overflow: auto;
}

@media (max-width: 992px) {
  .kfz-thumbs {
    order: 2;
    flex-direction: row;
    max-height: unset;
    overflow: auto;
    padding: 10px;
  }
}

.kfz-thumb {
  width: 64px;
  height: 64px;
  border-radius: 14px;
  overflow: hidden;
  border: 2px solid transparent;
  cursor: pointer;
  background: #f7f7f7;
  flex: 0 0 auto;
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.kfz-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.kfz-thumb.is-active {
  border-color: rgba(59, 130, 246, 0.85);
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.15);
}

.kfz-thumb:hover {
  transform: translateY(-1px);
}

@media (max-width: 992px) {
  .kfz-thumb:hover {
    transform: none;
  }
}

.kfz-main {
  position: relative;
  border-radius: 22px;
  border: 1px solid rgba(0, 0, 0, 0.06);
  overflow: hidden;
  background: #fff;
  min-height: 520px;
  display: grid;
  place-items: center;
}

@media (max-width: 992px) {
  .kfz-main {
    min-height: 360px;
  }
}

.kfz-main img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  background: #fff;
}

.kfz-main .kfz-nav {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 14px;
  pointer-events: none;
}

.kfz-main .kfz-nav button {
  pointer-events: auto;
  width: 52px;
  height: 52px;
  border-radius: 999px;
  border: 0;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  display: grid;
  place-items: center;
  font-size: 22px;
  line-height: 1;
  transition: transform 0.15s ease, background 0.15s ease;
}

.kfz-main .kfz-nav button:hover {
  transform: scale(1.03);
  background: #fff;
}

.kfz-main .kfz-count {
  position: absolute;
  left: 14px;
  bottom: 14px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 999px;
  padding: 6px 10px;
  font-weight: 700;
  font-size: 13px;
}

/* --- Buy card typography + mini meta rows (Verfügbar/Bestand) --- */
.kfz-title,
.kfz-card--buy h1,
.kfz-card--buy .product_title {
  font-size: clamp(20px, 2.0vw, 28px);
  line-height: 1.12;
  font-weight: 800;
  letter-spacing: -0.01em;
  margin: 0;
}

.kfz-price,
.kfz-card--buy .price,
.kfz-card--buy .price_color {
  font-size: clamp(24px, 2.4vw, 36px);
  line-height: 1.05;
  font-weight: 900;
  margin: 14px 0 0;
}

/* eBay Mini-Infos (Versand / Verfügbar / Bestand) */
.kfz-mini {
  margin-top: 14px;
}

.kfz-mini-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  padding: 8px 0;
  border-top: 1px solid rgba(17, 24, 39, 0.08);
}

.kfz-mini-row:first-child {
  border-top: 0;
  padding-top: 0;
}

.kfz-mini-key {
  font-size: 13px;
  font-weight: 700;
  color: #111827;
}

.kfz-mini-val {
  font-size: 13px;
  color: #111827;
  text-align: right;
}

/* Verfügbar + Bestand -> grün (Fallback via Reihenfolge: 2. + 3. Zeile) */
.kfz-mini-row:nth-child(2) .kfz-mini-val,
.kfz-mini-row:nth-child(3) .kfz-mini-val {
  color: #16a34a;
  font-weight: 800;
}

/* Optional: wenn du im Template Klassen setzt */
.kfz-status--ok { color: #16a34a; font-weight: 800; }
.kfz-status--bad { color: #dc2626; font-weight: 800; }

/* Wunschzettel-Link etwas dezenter (oder per CSS ausblenden, wenn gewünscht) */
.kfz-card--buy a[href*="wish"],
.kfz-card--buy a[href*="wishlist"] {
  font-size: 14px;
  color: rgba(17, 24, 39, 0.55);
  text-decoration: none;
}
.kfz-card--buy a[href*="wish"]:hover,
.kfz-card--buy a[href*="wishlist"]:hover {
  color: rgba(17, 24, 39, 0.8);
  text-decoration: underline;
}

/* --- Fitment --- */
.kfz-fitment .table {
  margin: 0;
}

.kfz-fitment .table thead th {
  font-weight: 800;
  border-bottom: 2px solid rgba(0, 0, 0, 0.08);
  white-space: nowrap;
}

.kfz-fitment .table td,
.kfz-fitment .table th {
  vertical-align: middle;
}

.kfz-fitment .table-responsive {
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(0, 0, 0, 0.06);
}

/* slightly tighter table for many rows */
.kfz-fitment .table-sm td,
.kfz-fitment .table-sm th {
  padding: 0.45rem 0.55rem;
}

/* zebra */
.kfz-fitment .table-striped tbody tr:nth-of-type(odd) {
  background-color: rgba(0, 0, 0, 0.03);
}

/* --- Attribute table --- */
.kfz-attr-table th {
  width: 42%;
  font-weight: 800;
  color: #111827;
}

.kfz-attr-table td {
  color: #111827;
}
