/* Autohaus Kelch – Fahrzeuge (mobile.de) */

.kfz-root {
	--kfz-color: #1d4ed8;
	--kfz-cols: 4;
	margin: 0 auto;
	/* Schrift vom Theme erben */
	font-family: inherit;
	font-size: inherit;
	line-height: inherit;
}
.kfz-root button,
.kfz-root select {
	font-family: inherit;
}

/* Filter – Werte explizit setzen, damit generische Theme-/Seitenregeln (z. B. form { flex-direction: column })
   das Layout nicht kippen können. */
.kfz-root .kfz-filter {
	display: flex;
	flex-direction: row;
	flex-wrap: wrap;
	align-items: flex-end;
	gap: 16px;
	margin: 0 0 24px;
	padding: 0;
	border: none;
	background: none;
	max-width: none;
}
.kfz-root .kfz-filter__field {
	display: flex;
	flex-direction: column;
	gap: 4px;
	min-width: 200px;
	max-width: 420px;
	flex: 1 1 200px;
	height: auto;
	margin: 0;
	font-size: 0.875em;
	font-weight: 600;
}
.kfz-filter__select {
	padding: 10px 12px;
	border: 1px solid #d1d5db;
	border-radius: 8px;
	background: #fff;
	font-size: 0.95em;
	font-weight: 400;
}
.kfz-filter__select:disabled {
	opacity: 0.5;
	cursor: not-allowed;
}

/* ---------- Kachelansicht ---------- */
.kfz-grid {
	display: grid;
	grid-template-columns: repeat(var(--kfz-cols), 1fr);
	gap: 24px;
}
@media (max-width: 1100px) {
	.kfz-grid {
		grid-template-columns: repeat(2, 1fr);
	}
}
@media (max-width: 640px) {
	.kfz-grid {
		grid-template-columns: 1fr;
	}
}

.kfz-card {
	display: flex;
	flex-direction: column;
	background: #fff;
	border: 1px solid #e5e7eb;
	border-radius: 12px;
	overflow: hidden;
	transition: box-shadow 0.15s ease, transform 0.15s ease;
}
.kfz-card:hover {
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
	transform: translateY(-2px);
}
.kfz-card__imglink {
	display: block;
	aspect-ratio: 4 / 3;
	background: #f3f4f6;
}
.kfz-card__img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}
.kfz-card__noimg {
	display: flex;
	align-items: center;
	justify-content: center;
	height: 100%;
	color: #9ca3af;
	font-size: 0.875em;
}
.kfz-card__body {
	display: flex;
	flex-direction: column;
	flex: 1;
	padding: 16px;
	gap: 8px;
}
.kfz-card__title {
	font-size: 1.15em;
	line-height: 1.3;
	margin: 0;
}
.kfz-card__specs {
	list-style: none;
	display: flex;
	flex-wrap: wrap;
	gap: 4px 0;
	margin: 0;
	padding: 0;
	font-size: 0.85em;
	color: #4b5563;
}
.kfz-card__specs li:not(:last-child)::after {
	content: "·";
	margin: 0 6px;
	color: #d1d5db;
}
.kfz-card__env {
	margin: 0;
	font-size: 0.75em;
	color: #6b7280;
}
.kfz-card__footer {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-top: auto;
	padding-top: 8px;
}
.kfz-card__price {
	font-size: 1.25em;
	font-weight: 700;
	color: var(--kfz-color);
	white-space: nowrap;
}

/* ---------- Listenansicht ---------- */
.kfz-list {
	display: flex;
	flex-direction: column;
	gap: 16px;
}
.kfz-row {
	display: flex;
	gap: 20px;
	padding: 16px;
	background: #fff;
	border: 1px solid #e5e7eb;
	border-radius: 12px;
	align-items: stretch;
	transition: box-shadow 0.15s ease;
}
.kfz-row:nth-child(even) {
	background: #f8f8f8;
}
.kfz-row:hover {
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}
.kfz-row__imglink {
	flex: 0 0 280px;
	aspect-ratio: 4 / 3;
	background: #f3f4f6;
	border-radius: 8px;
	overflow: hidden;
	align-self: center;
}
.kfz-row__img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}
.kfz-row__body {
	flex: 1;
	display: flex;
	flex-direction: column;
	justify-content: center;
	gap: 8px;
	min-width: 0;
}
.kfz-row__aside {
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: flex-end;
	gap: 14px;
	text-align: right;
	min-width: 150px;
}
@media (max-width: 760px) {
	.kfz-row {
		flex-direction: column;
	}
	.kfz-row__imglink {
		flex: none;
		width: 100%;
		align-self: stretch;
	}
	.kfz-row__aside {
		flex-direction: row;
		align-items: center;
		justify-content: space-between;
		width: 100%;
		min-width: 0;
	}
}

/* Button */
.kfz-btn {
	display: inline-block;
	padding: 8px 14px;
	background: var(--kfz-color);
	color: #fff !important;
	border-radius: 8px;
	font-size: 0.875em;
	font-weight: 600;
	text-decoration: none !important;
	white-space: nowrap;
	transition: filter 0.15s ease;
}
.kfz-btn:hover {
	filter: brightness(1.12);
	color: #fff;
}

/* Pagination */
.kfz-pagination {
	display: flex;
	align-items: center;
	justify-content: center;
	flex-wrap: wrap;
	gap: 6px;
	margin-top: 28px;
}
.kfz-pagination__pages {
	display: flex;
	gap: 6px;
	align-items: center;
}
.kfz-page-btn {
	padding: 8px 14px;
	border: 1px solid #d1d5db;
	border-radius: 8px;
	background: #fff;
	color: #111827;
	font-size: 0.875em;
	cursor: pointer;
	transition: all 0.15s ease;
}
.kfz-page-btn:hover:not(:disabled) {
	border-color: var(--kfz-color);
	color: var(--kfz-color);
}
.kfz-page-btn.is-active {
	background: var(--kfz-color);
	border-color: var(--kfz-color);
	color: #fff;
	cursor: default;
}
.kfz-page-btn:disabled {
	opacity: 0.45;
	cursor: not-allowed;
}
.kfz-pagination__dots {
	color: #9ca3af;
	padding: 0 2px;
}

/* Spinner / Meldungen */
.kfz-loading {
	display: flex;
	justify-content: center;
	align-items: center;
	min-height: 240px;
}
.kfz-spinner {
	width: 44px;
	height: 44px;
	border: 5px solid rgba(0, 0, 0, 0.08);
	border-top-color: var(--kfz-color);
	border-radius: 50%;
	animation: kfz-spin 0.9s linear infinite;
}
@keyframes kfz-spin {
	to { transform: rotate(360deg); }
}
.kfz-empty,
.kfz-error {
	text-align: center;
	padding: 32px 16px;
	color: #4b5563;
}
.kfz-error {
	color: #b91c1c;
}
