/**
 * Robin's Car Controller - front-end styling.
 * Zelfstandig (los van het WP-thema) en volledig responsive.
 */

.rcc {
	--rcc-primary: #1f9d55;
	--rcc-primary-dark: #18794a;
	--rcc-ink: #1a2230;
	--rcc-muted: #5b6573;
	--rcc-line: #e3e7ec;
	--rcc-bg: #ffffff;
	--rcc-soft: #f5f7f9;
	--rcc-radius: 14px;
	--rcc-shadow: 0 6px 24px rgba(20, 30, 45, 0.08);
	color: var(--rcc-ink);
	font-size: 16px;
	line-height: 1.5;
	box-sizing: border-box;
	max-width: 100%;
	overflow-wrap: break-word;
	word-wrap: break-word;
}

.rcc *,
.rcc *::before,
.rcc *::after {
	box-sizing: inherit;
}

.rcc img {
	max-width: 100%;
	height: auto;
	display: block;
}

/* ---------- Filters ---------- */
.rcc-filters {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	align-items: stretch;
	margin-bottom: 18px;
	padding: 14px;
	background: var(--rcc-soft);
	border: 1px solid var(--rcc-line);
	border-radius: var(--rcc-radius);
}

.rcc-filter {
	flex: 1 1 160px;
	min-width: 0;
}

.rcc-filter--search {
	flex: 2 1 240px;
}

.rcc-filters input[type="search"],
.rcc-filters select {
	width: 100%;
	padding: 11px 12px;
	border: 1px solid var(--rcc-line);
	border-radius: 10px;
	background: #fff;
	font-size: 15px;
	color: var(--rcc-ink);
}

/* Uitklapknop voor de filters (alleen zichtbaar op kleinere schermen). */
.rcc-filters-toggle {
	display: none;
	align-items: center;
	justify-content: center;
	gap: 8px;
	width: 100%;
	padding: 13px 16px;
	margin-bottom: 14px;
	background: var(--rcc-primary);
	color: #fff;
	border: none;
	border-radius: 10px;
	font-size: 15px;
	font-weight: 600;
	cursor: pointer;
}

.rcc-filters-toggle svg {
	width: 18px;
	height: 18px;
}

.rcc-filters-toggle .rcc-chevron {
	margin-left: auto;
	transition: transform 0.2s ease;
}

.rcc-filters-toggle[aria-expanded="true"] .rcc-chevron {
	transform: rotate(180deg);
}

/* Actieve filters als verwijderbare chips. */
.rcc-active-filters {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 0 0 14px;
}

.rcc-chip {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	padding: 6px 13px 6px 9px;
	background: var(--rcc-soft);
	border: 1px solid var(--rcc-line);
	border-radius: 999px;
	color: var(--rcc-ink);
	font-size: 13px;
	font-weight: 500;
	line-height: 1.1;
	text-decoration: none;
	transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.rcc-chip:hover,
.rcc-chip:focus-visible {
	background: #fdeaea;
	border-color: #f1c4c1;
	color: #b3261e;
}

.rcc-chip__x {
	width: 14px;
	height: 14px;
	flex: 0 0 14px;
}

.rcc-resultbar {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 8px 16px;
	margin: 0 0 16px;
}

.rcc-count {
	color: var(--rcc-muted);
	font-size: 14px;
	margin: 0;
}

/* Subtiele tekstlink om alle actieve filters in een keer te wissen. */
.rcc-clear-filters {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	color: var(--rcc-muted);
	font-size: 14px;
	text-decoration: none;
	cursor: pointer;
}

.rcc-clear-filters:hover {
	color: var(--rcc-primary-dark);
	text-decoration: underline;
}

.rcc-clear-filters svg {
	width: 15px;
	height: 15px;
	flex: 0 0 15px;
}

@media (max-width: 600px) {
	.rcc-resultbar {
		flex-direction: column;
		align-items: flex-start;
	}
}

/* ---------- Grid ---------- */
.rcc-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
	gap: 22px;
}

.rcc-card {
	display: flex;
	flex-direction: column;
	background: var(--rcc-bg);
	border: 1px solid var(--rcc-line);
	border-radius: var(--rcc-radius);
	overflow: hidden;
	box-shadow: var(--rcc-shadow);
	transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.rcc-card:hover {
	transform: translateY(-4px);
	box-shadow: 0 12px 30px rgba(20, 30, 45, 0.14);
}

.rcc-card__media {
	position: relative;
	display: block;
	aspect-ratio: 16 / 10;
	background: var(--rcc-soft);
	overflow: hidden;
}

.rcc-card__media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.4s ease;
}

.rcc-card:hover .rcc-card__media img {
	transform: scale(1.05);
}

.rcc-card__noimg {
	display: flex;
	align-items: center;
	justify-content: center;
	height: 100%;
	color: var(--rcc-muted);
	font-size: 14px;
}

.rcc-card__badge {
	position: absolute;
	top: 10px;
	right: 10px;
	background: rgba(31, 157, 85, 0.95);
	color: #fff;
	font-size: 12px;
	font-weight: 600;
	padding: 4px 10px;
	border-radius: 999px;
}

.rcc-card__body {
	display: flex;
	flex-direction: column;
	flex: 1;
	padding: 16px;
}

.rcc-card__title {
	font-size: 17px;
	line-height: 1.25;
	margin: 0 0 2px;
}

.rcc-card__title a {
	color: var(--rcc-ink);
	text-decoration: none;
}

.rcc-card__subtitle {
	color: var(--rcc-muted);
	font-size: 13px;
	margin: 0 0 12px;
}

.rcc-card__specs {
	list-style: none;
	margin: 0 0 14px;
	padding: 0;
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 6px 12px;
	font-size: 14px;
	color: var(--rcc-muted);
}

.rcc-card__specs li {
	display: flex;
	align-items: center;
	gap: 7px;
}

.rcc-card__specs .rcc-ico {
	width: 18px;
	height: 18px;
	flex: 0 0 18px;
	fill: none;
	stroke: var(--rcc-primary);
	stroke-width: 1.7;
	stroke-linecap: round;
	stroke-linejoin: round;
}

.rcc-card__footer {
	margin-top: auto;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	padding-top: 12px;
	border-top: 1px solid var(--rcc-line);
}

.rcc-card__price {
	font-size: 19px;
	font-weight: 700;
	color: var(--rcc-primary-dark);
}

/* ---------- Buttons ---------- */
.rcc-btn {
	display: inline-block;
	padding: 10px 16px;
	border: 1px solid transparent;
	border-radius: 10px;
	font-size: 14px;
	font-weight: 600;
	text-decoration: none;
	cursor: pointer;
	background: var(--rcc-soft);
	color: var(--rcc-ink);
	transition: background 0.15s ease, color 0.15s ease;
}

.rcc-btn--primary {
	background: var(--rcc-primary);
	color: #fff;
}

.rcc-btn--primary:hover {
	background: var(--rcc-primary-dark);
	color: #fff;
}

.rcc-btn--filter {
	flex: 0 0 auto;
}

.rcc-btn--block {
	display: block;
	width: 100%;
	text-align: center;
}

/* ---------- Pagination ---------- */
.rcc-pagination {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 26px 0 0;
}

.rcc-page {
	min-width: 40px;
	text-align: center;
	padding: 9px 12px;
	border: 1px solid var(--rcc-line);
	border-radius: 10px;
	color: var(--rcc-ink);
	text-decoration: none;
}

.rcc-page--current {
	background: var(--rcc-primary);
	border-color: var(--rcc-primary);
	color: #fff;
}

.rcc-empty {
	padding: 40px;
	text-align: center;
	background: var(--rcc-soft);
	border-radius: var(--rcc-radius);
	color: var(--rcc-muted);
}

/* ---------- Detail ---------- */
.rcc-back {
	display: inline-block;
	margin-bottom: 14px;
	color: var(--rcc-muted);
	text-decoration: none;
	font-size: 14px;
}

.rcc-detail__head {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	justify-content: space-between;
	gap: 8px;
	margin-bottom: 16px;
}

.rcc-detail__title {
	margin: 0;
	font-size: 26px;
	line-height: 1.2;
}

.rcc-detail__price {
	font-size: 26px;
	font-weight: 800;
	color: var(--rcc-primary-dark);
}

/* Gallery (swipe-carousel) */
.rcc-gallery {
	margin-bottom: 24px;
	outline: none;
}

.rcc-gallery__main {
	position: relative;
	border-radius: var(--rcc-radius);
	overflow: hidden;
	background: var(--rcc-soft);
}

/* Horizontale track met scroll-snap; native touch-swipe op mobiel. */
.rcc-gallery__track {
	display: flex;
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	-webkit-overflow-scrolling: touch;
	scrollbar-width: none;
	-ms-overflow-style: none;
}

.rcc-gallery__track::-webkit-scrollbar {
	display: none;
}

.rcc-gallery__slide {
	flex: 0 0 100%;
	scroll-snap-align: center;
	aspect-ratio: 16 / 10;
	background: var(--rcc-soft);
}

.rcc-gallery__slide img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

/* Overlay-pijltjes (desktop en mobiel). */
.rcc-gallery__nav {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	display: flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	padding: 0;
	border: none;
	border-radius: 999px;
	background: rgba(26, 34, 48, 0.55);
	color: #fff;
	cursor: pointer;
	transition: background 0.15s ease;
}

.rcc-gallery__nav:hover {
	background: rgba(26, 34, 48, 0.8);
}

.rcc-gallery__nav svg {
	width: 22px;
	height: 22px;
}

.rcc-gallery__nav--prev {
	left: 10px;
}

.rcc-gallery__nav--next {
	right: 10px;
}

.rcc-gallery__counter {
	position: absolute;
	right: 10px;
	bottom: 10px;
	padding: 3px 10px;
	border-radius: 999px;
	background: rgba(26, 34, 48, 0.6);
	color: #fff;
	font-size: 13px;
	font-weight: 600;
}

.rcc-gallery__thumbs {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(84px, 1fr));
	gap: 8px;
	margin-top: 8px;
}

.rcc-thumb {
	padding: 0;
	border: 2px solid transparent;
	border-radius: 8px;
	overflow: hidden;
	cursor: pointer;
	background: var(--rcc-soft);
	aspect-ratio: 4 / 3;
}

.rcc-thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.rcc-thumb.is-active {
	border-color: var(--rcc-primary);
}

/* Mobiel: hoofdviewer sticky zodat de foto zichtbaar blijft bij thumb-scroll,
   en de thumbnails als horizontale strip. */
@media (max-width: 768px) {
	.rcc-gallery__main {
		position: sticky;
		top: 0;
		z-index: 2;
	}

	.rcc-gallery__thumbs {
		display: flex;
		overflow-x: auto;
		gap: 8px;
		margin-top: 10px;
		padding-bottom: 4px;
		scrollbar-width: none;
		-ms-overflow-style: none;
	}

	.rcc-gallery__thumbs::-webkit-scrollbar {
		display: none;
	}

	.rcc-thumb {
		flex: 0 0 84px;
	}
}

/* Detail wrapper: voorkom dat blokken buiten het content-gebied vallen. */
.rcc-detail {
	max-width: 100%;
	overflow-x: hidden;
}

/* Detail grid */
.rcc-detail__grid {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 24px;
}

@media (min-width: 880px) {
	.rcc-detail__grid {
		grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
		align-items: start;
	}
}

/* min-width:0 laat de grid-kolommen krimpen i.p.v. te overflowen. */
.rcc-detail__main,
.rcc-detail__side {
	min-width: 0;
}

.rcc-block {
	background: var(--rcc-bg);
	border: 1px solid var(--rcc-line);
	border-radius: var(--rcc-radius);
	padding: 18px 20px;
	margin-bottom: 20px;
	overflow-wrap: break-word;
	word-wrap: break-word;
}

.rcc-block h2 {
	margin: 0 0 14px;
	font-size: 18px;
}

.rcc-specs {
	width: 100%;
	border-collapse: collapse;
	table-layout: fixed;
	font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.rcc-specs th,
.rcc-specs td {
	text-align: left;
	padding: 8px 4px;
	border-bottom: 1px solid var(--rcc-line);
	font-size: 14px;
	line-height: 1.35;
	vertical-align: top;
	overflow-wrap: normal;
	word-wrap: normal;
	word-break: normal;
}

.rcc-specs th {
	color: var(--rcc-muted);
	font-weight: 500;
	width: 42%;
	text-transform: none;
	letter-spacing: normal;
}

.rcc-options {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr));
	gap: 9px 18px;
}

.rcc-options li {
	display: grid;
	grid-template-columns: 18px minmax(0, 1fr);
	column-gap: 10px;
	align-items: start;
	list-style: none;
	margin: 0;
	padding: 0;
	font-size: 14px;
	line-height: 1.45;
}

.rcc-options li::marker {
	content: "";
}

.rcc-options li::before {
	content: "\2713";
	display: block;
	font-size: 17px;
	line-height: 1.2;
	color: var(--rcc-primary);
	font-weight: 700;
	text-align: center;
}

.rcc-description {
	font-size: 15px;
	color: #36424f;
}

/* Contact form */
.rcc-form label {
	display: block;
	margin-bottom: 10px;
}

.rcc-form input,
.rcc-form select,
.rcc-form textarea {
	width: 100%;
	padding: 11px 12px;
	border: 1px solid var(--rcc-line);
	border-radius: 10px;
	font-size: 15px;
	font-family: inherit;
	color: var(--rcc-ink);
	background: #fff;
}

.rcc-hp {
	position: absolute;
	left: -9999px;
	height: 0;
	overflow: hidden;
}

.rcc-notice {
	padding: 10px 12px;
	border-radius: 10px;
	font-size: 14px;
	margin-bottom: 12px;
}

.rcc-notice--ok {
	background: #e6f6ee;
	color: var(--rcc-primary-dark);
}

.rcc-notice--err {
	background: #fdeaea;
	color: #b3261e;
}

.rcc-dealer address {
	font-style: normal;
	color: var(--rcc-muted);
	font-size: 14px;
	line-height: 1.7;
}

.rcc-dealer a {
	color: var(--rcc-primary-dark);
}

.rcc-notfound {
	text-align: center;
	padding: 50px 20px;
}

/* ---------- Responsive ---------- */
@media (max-width: 768px) {
	.rcc-filters-toggle {
		display: flex;
	}

	.rcc-filters {
		display: none;
		flex-direction: column;
	}

	.rcc-filters.is-open {
		display: flex;
	}
}

@media (max-width: 600px) {
	.rcc-filters {
		flex-direction: column;
	}

	.rcc-filter,
	.rcc-filter--search {
		flex: 1 1 auto;
	}

	.rcc-detail__title,
	.rcc-detail__price {
		font-size: 22px;
	}

	.rcc-card__specs {
		grid-template-columns: 1fr 1fr;
	}

	/* Specificatietabel: minder padding, kleinere tekst, volle breedte benutten. */
	.rcc-block {
		padding: 14px 12px;
	}

	.rcc-specs {
		table-layout: auto;
	}

	.rcc-specs th,
	.rcc-specs td {
		padding: 6px 2px;
		font-size: 13px;
		line-height: 1.3;
	}

	.rcc-specs th {
		width: auto;
		max-width: 48%;
		padding-right: 8px;
	}

	.rcc-specs td {
		padding-left: 0;
	}
}

/* Smalle telefoons: label boven waarde voor leesbare specificaties. */
@media (max-width: 420px) {
	.rcc-specs,
	.rcc-specs tbody,
	.rcc-specs tr,
	.rcc-specs th,
	.rcc-specs td {
		display: block;
		width: 100%;
	}

	.rcc-specs tr {
		padding: 8px 0;
		border-bottom: 1px solid var(--rcc-line);
	}

	.rcc-specs th,
	.rcc-specs td {
		border-bottom: none;
		padding: 0;
		max-width: none;
	}

	.rcc-specs th {
		font-size: 12px;
		margin-bottom: 2px;
	}

	.rcc-specs td {
		font-size: 14px;
		font-weight: 500;
		color: var(--rcc-ink);
	}
}
