/* =====================================================================
   WPCarSync – "wpcs-pro-card" Politur
   Passend zur Custom-Loop-Vorlage bpc-card.php
   Einfügen unter: Design → Customizer → Zusätzliches CSS
   --------------------------------------------------------------------
   Gescoped auf deine eigene Klasse .wpcs-pro-card -> wirkt nur dort,
   wo diese Vorlage gerendert wird. Andere Ansichten bleiben unberührt.
   ===================================================================== */

:root {
  --wpcs-burgundy: #8a1c2e;
  --wpcs-burgundy-soft: rgba(138, 28, 46, 0.08);
  --wpcs-ink: #161616;
  --wpcs-muted: #6b7280;
  --wpcs-line: #ececec;
  --wpcs-radius: 14px;
}

/* --- Plugin-Wrapper neutralisieren, falls er die Karte umschließt --- */
.vehicle-on-archive:has(.wpcs-pro-card) {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  border-radius: 0 !important;
  padding: 0 !important;
  overflow: visible !important;
}

/* --- Karte --- */
.wpcs-pro-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: #fff;
  border: 1px solid var(--wpcs-line);
  border-radius: var(--wpcs-radius);
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(0,0,0,.04);
  transition: transform .25s ease, box-shadow .25s ease;
}
.wpcs-pro-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 32px -12px rgba(0,0,0,.22);
}

/* --- Media / Bild (16:9, Hover-Zoom) --- */
.wpcs-pro-card__media {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #f1f1f1;
}
.wpcs-pro-card__media .dxim_grid_image,
.wpcs-pro-card__media .dxim_grid_image a { display: block; width: 100%; height: 100%; }
.wpcs-pro-card__media img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  transition: transform .5s ease;
}
.wpcs-pro-card:hover .wpcs-pro-card__media img { transform: scale(1.04); }

/* --- Badge (Zustand) – unten links, damit das Foto-Logo oben frei bleibt --- */
.wpcs-pro-card__badge {
  position: absolute;
  bottom: 10px; left: 10px;
  background: rgba(22,22,22,.82);
  color: #fff;
  font-size: 11px; font-weight: 600; line-height: 1.2;
  padding: 4px 9px; border-radius: 999px;
  backdrop-filter: blur(2px);
}
.wpcs-pro-card__badge:empty { display: none; }

/* --- Body (füllt die Höhe, damit Preis bündig sitzt) --- */
.wpcs-pro-card__body {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  padding: 16px 16px 18px;
}

/* --- Titel --- */
.wpcs-pro-card__title .dxim_archive_title a { text-decoration: none; color: inherit; }
.wpcs-pro-card__title h2 {
  margin: 0; font-size: 19px; font-weight: 700; letter-spacing: -0.01em; line-height: 1.2;
}
.wpcs-pro-card__title h2 .make { font-weight: 500; color: var(--wpcs-muted); }
.wpcs-pro-card__title h3 {
  margin: 6px 0 0; font-size: 13px; font-weight: 500; line-height: 1.4; color: var(--wpcs-muted);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden; min-height: 2.8em;
}

/* --- Highlights / Badges --- */
.wpcs-pro-card__highlights { margin-top: 12px; }
.wpcs-pro-card__highlights .wpcs_vehicle_highlights { display: flex; flex-wrap: wrap; gap: 6px; }
.wpcs-pro-card__highlights .wpcs_highlight {
  background: var(--wpcs-burgundy-soft); color: var(--wpcs-burgundy);
  font-size: 11.5px; font-weight: 600; padding: 5px 10px; border-radius: 999px; line-height: 1.2;
}

/* --- Datentabelle (+ Aufhebung der per JS gesetzten Fixhöhe) --- */
.wpcs-pro-card__data { margin-top: 14px; }
.wpcs-pro-card__data .dxim_archive_specifics { height: auto !important; }
.wpcs-pro-card__data .field {
  display: flex; justify-content: space-between; align-items: baseline; gap: 12px;
  padding: 9px 0; border-bottom: 1px solid var(--wpcs-line); font-size: 13.5px;
}
.wpcs-pro-card__data .field:first-child { padding-top: 0; }
.wpcs-pro-card__data .label { color: var(--wpcs-muted); }
.wpcs-pro-card__data .fact { font-weight: 600; text-align: right; }

/* --- Preis (margin-top:auto schiebt Preis+Rating+Emission nach unten) --- */
.wpcs-pro-card__price { margin-top: auto; padding-top: 14px; }
.wpcs-pro-card__price .price_big {
  display: block; font-size: 26px; font-weight: 700; letter-spacing: -0.02em; color: var(--wpcs-ink);
}
.wpcs-pro-card__price .price_netto { display: inline-block; margin-top: 2px; font-size: 12.5px; color: var(--wpcs-muted); }
.wpcs-pro-card__price .vat { font-size: 12.5px; color: var(--wpcs-muted); }
.wpcs-pro-card__price .vat::before { content: "·"; margin: 0 6px; color: #c4c4c4; }

/* --- Preisbewertung --- */
.wpcs-pro-card__rating { margin-top: 6px; font-size: 12px; color: var(--wpcs-muted); }
.wpcs-pro-card__rating:empty { display: none; }

/* --- Emissionstext --- */
.wpcs-pro-card__emission { margin-top: 10px; font-size: 11px; line-height: 1.5; color: #9aa0a6; }

/* --- Footer / Buttons --- */
.wpcs-pro-card__footer { padding: 0 16px 16px; }
.wpcs-pro-card__footer .wpcs_button_wrapper { display: flex; flex-wrap: wrap; gap: 8px; }
.wpcs-pro-card__footer .dxim_button {
  flex: 1 1 auto; min-width: 0;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  text-align: center; text-decoration: none;
  font-size: 13px; font-weight: 600; line-height: 1.2;
  padding: 10px 8px; border-radius: 9px;
  transition: background .18s ease, color .18s ease, border-color .18s ease;
}
/* primär: "anzeigen" gefüllt */
.wpcs-pro-card__footer .wpcs_vehicle_single_btn {
  background: var(--wpcs-ink); color: #fff; border: 1px solid var(--wpcs-ink); flex-grow: 1.5;
}
.wpcs-pro-card__footer .wpcs_vehicle_single_btn:hover { background: #000; border-color: #000; }
/* sekundär: alle übrigen (vergleichen, parken, anfragen) als Outline */
.wpcs-pro-card__footer .dxim_button:not(.wpcs_vehicle_single_btn) {
  background: #fff; color: var(--wpcs-ink); border: 1px solid var(--wpcs-line);
}
.wpcs-pro-card__footer .dxim_button:not(.wpcs_vehicle_single_btn):hover { border-color: #bbb; }

/* --- Schrift erben (MazdaStyle), Icons unangetastet --- */
.wpcs-pro-card,
.wpcs-pro-card h2,
.wpcs-pro-card h3,
.wpcs-pro-card .label,
.wpcs-pro-card .fact,
.wpcs-pro-card .price_big,
.wpcs-pro-card .price_netto,
.wpcs-pro-card .vat,
.wpcs-pro-card .wpcs_highlight,
.wpcs-pro-card__badge,
.wpcs-pro-card .dxim_button {
  font-family: inherit;
}