/* ==========================================================================
   Car Dealer System — Red & Black Theme
   Built to sit safely inside a DARK-background theme (as used on the live
   site). Text colors are set with !important on the elements that must
   stay readable regardless of what the parent theme tries to apply.
   ========================================================================== */

:root {
	--cdp-red: #d0021b;
	--cdp-red-dark: #a10015;
	--cdp-black: #0d0d0d;
	--cdp-panel: #161616;
	--cdp-panel-light: #202020;
	--cdp-border: #333333;
	--cdp-text: #f2f2f2;
	--cdp-text-muted: #b8b8b8;
	--cdp-radius: 8px;
}

/* ---------------------------------------------------------------------
   HARD RESET against theme-wide "fade / gradient text" effects.
   Many page-builder themes make text semi-transparent using
   -webkit-text-fill-color / background-clip / text-shadow tricks for
   scroll animations. That's a DIFFERENT property from `color`, so
   setting `color:#fff !important` alone does not fix it. We cancel all
   of it here, inside our own markup only, before applying our colors.
   --------------------------------------------------------------------- */
.cdp-wrap, .cdp-wrap *,
.cdp-modal, .cdp-modal *,
.cdp-selector-wrap, .cdp-selector-wrap *,
.cdp-modal-overlay, .cdp-modal-overlay * {
	-webkit-text-fill-color: unset !important;
	text-fill-color: unset !important;
	background-image: none !important;
	-webkit-background-clip: border-box !important;
	background-clip: border-box !important;
	text-shadow: none !important;
	opacity: 1 !important;
	animation: none !important;
	transform: none !important;
}

.cdp-wrap *, .cdp-modal *, .cdp-selector-wrap * {
	box-sizing: border-box;
}

/* Buttons ------------------------------------------------------------- */
.cdp-btn {
	display: inline-block;
	padding: 12px 20px;
	border-radius: var(--cdp-radius);
	font-weight: 700 !important;
	text-transform: uppercase;
	letter-spacing: .03em;
	text-decoration: none !important;
	border: none;
	cursor: pointer;
	font-size: 13px !important;
	line-height: 1.3;
	text-align: center;
	white-space: nowrap;
	transition: background .2s ease, transform .1s ease;
}
.cdp-btn-primary {
	background: var(--cdp-red) !important;
	color: #fff !important;
}
.cdp-btn-primary:hover {
	background: var(--cdp-red-dark) !important;
	color: #fff !important;
	transform: translateY(-1px);
}
.cdp-btn-outline {
	background: #1a1a1a !important;
	color: #fff !important;
	border: none !important;
}
.cdp-btn-outline:hover {
	background: #2c2c2c !important;
	color: #fff !important;
}
.cdp-btn-block {
	display: block;
	width: 100%;
}

/* Selector widget ------------------------------------------------------ */
.cdp-selector-wrap {
	max-width: 1100px;
	margin: 0 auto;
	padding: 20px;
}
.cdp-selector-heading {
	color: #fff !important;
	text-align: center;
	margin-bottom: 20px;
}
.cdp-selector-box {
	background: var(--cdp-panel);
	border-radius: 16px;
	padding: 32px;
	border: 1px solid var(--cdp-red);
}
.cdp-selector-form label {
	display: block;
	color: #fff !important;
	font-weight: 700;
	margin-bottom: 8px;
}
.cdp-selector-form select {
	width: 100%;
	padding: 12px 14px;
	border-radius: var(--cdp-radius);
	border: none;
	margin-bottom: 20px;
	font-size: 15px !important;
	color: #111 !important;
	background: #fff !important;
}
.cdp-selector-form .cdp-btn {
	width: 100%;
}

/* Page wrap -------------------------------------------------------------*/
.cdp-wrap {
	max-width: 1200px;
	margin: 0 auto;
	padding: 30px 20px;
}
.cdp-brand-title {
	text-align: center;
	font-size: 36px !important;
	margin-bottom: 30px;
	color: #fff !important;
}

/* Car grid --------------------------------------------------------------*/
.cdp-car-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
	gap: 24px;
}
@media (max-width: 600px) {
	.cdp-car-grid { grid-template-columns: 1fr; }
}
.cdp-car-card {
	background: #fff !important;
	border: 1px solid var(--cdp-border);
	border-radius: var(--cdp-radius);
	overflow: hidden;
	box-shadow: 0 4px 16px rgba(0,0,0,.35);
	display: flex;
	flex-direction: column;
}
.cdp-car-card-image {
	display: block;
	aspect-ratio: 4/3;
	overflow: hidden;
	background: #eee;
}
.cdp-car-card-image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}
.cdp-no-image {
	width: 100%;
	height: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
	color: #888 !important;
	background: #eee;
	font-size: 13px !important;
}
.cdp-no-image-large { min-height: 340px; border-radius: var(--cdp-radius); background: var(--cdp-panel); color: var(--cdp-text-muted) !important; }
.cdp-car-card-body {
	padding: 16px;
	flex: 1;
	display: flex;
	flex-direction: column;
}
.cdp-car-card-title {
	font-size: 18px !important;
	margin: 0 0 10px;
	color: #111 !important;
	font-weight: 800 !important;
}
.cdp-car-card-meta {
	list-style: none;
	margin: 0 0 16px;
	padding: 0;
	font-size: 14px !important;
	flex: 1;
}
.cdp-car-card-meta li { margin-bottom: 4px; color: #333 !important; }
.cdp-car-card-meta li strong { color: #111 !important; }
.cdp-car-card-actions {
	display: flex;
	flex-direction: column;
	gap: 8px;
}
.cdp-car-card-actions .cdp-btn {
	width: 100%;
}

/* Brand specs -------------------------------------------------------------*/
.cdp-brand-specs { margin-top: 50px; }
.cdp-brand-specs h2 {
	margin-bottom: 16px;
	color: #fff !important;
}
.cdp-tabs {
	display: flex;
	flex-wrap: wrap;
	border-bottom: 2px solid var(--cdp-red);
}
.cdp-tab-btn {
	background: var(--cdp-panel-light) !important;
	border: none;
	padding: 14px 26px;
	font-weight: 700 !important;
	cursor: pointer;
	text-transform: uppercase;
	font-size: 13px !important;
	color: var(--cdp-text) !important;
}
.cdp-tab-btn.active {
	background: var(--cdp-red) !important;
	color: #fff !important;
}
.cdp-tab-panel {
	display: none;
	padding: 20px;
	background: var(--cdp-panel);
	border: 1px solid var(--cdp-border);
	border-top: none;
	color: var(--cdp-text) !important;
}
.cdp-tab-panel.active { display: block; }
.cdp-tab-panel p { color: var(--cdp-text) !important; margin: 0 0 10px; }
.cdp-tab-panel strong { color: #fff !important; }
.cdp-tab-empty { color: var(--cdp-text-muted) !important; font-style: italic; }
.cdp-spec-columns {
	columns: 3;
	column-gap: 30px;
	list-style: none;
	margin: 0;
	padding: 0;
}
.cdp-spec-columns li {
	break-inside: avoid;
	margin-bottom: 8px;
	color: var(--cdp-text) !important;
	padding-left: 22px;
	position: relative;
}
.cdp-spec-columns li::before {
	content: "✓";
	position: absolute;
	left: 0;
	color: var(--cdp-red);
	font-weight: 700;
}
@media (max-width: 768px) {
	.cdp-spec-columns { columns: 1; }
}

/* Other categories --------------------------------------------------------*/
.cdp-other-categories { margin-top: 40px; }
.cdp-other-categories h2 { color: #fff !important; }
.cdp-category-buttons {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
}

/* Single car page ----------------------------------------------------------*/
.cdp-single-header h1 {
	margin-bottom: 4px;
	color: #fff !important;
}
.cdp-single-subtitle {
	color: var(--cdp-text-muted) !important;
	margin-bottom: 20px;
}
.cdp-single-columns {
	display: grid;
	grid-template-columns: 3fr 1fr;
	gap: 30px;
	align-items: start;
}
@media (max-width: 900px) {
	.cdp-single-columns { grid-template-columns: 1fr; }
}
.cdp-single-image {
	border-radius: var(--cdp-radius);
	overflow: hidden;
	margin-bottom: 0;
	background: var(--cdp-panel);
}
.cdp-single-image img { width: 100%; display: block; }
.cdp-quickspecs {
	background: var(--cdp-panel);
	color: var(--cdp-text) !important;
	display: grid;
	grid-template-columns: repeat(5, 1fr);
	gap: 10px;
	padding: 20px;
	border-radius: var(--cdp-radius);
	margin: 24px 0 30px;
	text-align: center;
	font-size: 13px !important;
	border: 1px solid var(--cdp-border);
}
@media (max-width: 700px) {
	.cdp-quickspecs { grid-template-columns: repeat(2, 1fr); }
}
.cdp-quickspecs div { color: var(--cdp-text) !important; }
.cdp-quickspecs .dashicons {
	color: var(--cdp-red) !important;
	font-size: 26px !important;
	width: 26px;
	height: 26px;
	margin-bottom: 6px;
}
.cdp-section-title {
	color: #fff !important;
	margin: 30px 0 16px;
}
.cdp-checklist {
	list-style: none;
	margin: 0;
	padding: 0;
	columns: 3;
	column-gap: 24px;
}
@media (max-width: 768px) {
	.cdp-checklist { columns: 1; }
}
.cdp-checklist li {
	break-inside: avoid;
	margin-bottom: 10px;
	font-size: 14px !important;
	color: var(--cdp-text) !important;
	padding-left: 22px;
	position: relative;
}
.cdp-checklist li .dashicons {
	position: absolute;
	left: 0;
	top: 1px;
	color: var(--cdp-red) !important;
	font-size: 16px !important;
	width: 16px;
	height: 16px;
}
.cdp-single-sidebar { position: sticky; top: 20px; }

.cdp-tech-table {
	width: 100%;
	border-collapse: collapse;
	margin-bottom: 10px;
	background: var(--cdp-panel);
	border: 1px solid var(--cdp-border);
	border-radius: var(--cdp-radius);
	overflow: hidden;
}
.cdp-tech-table tr { border-bottom: 1px solid var(--cdp-border); }
.cdp-tech-table tr:last-child { border-bottom: none; }
.cdp-tech-table th,
.cdp-tech-table td {
	text-align: left;
	padding: 10px 14px;
	font-size: 14px !important;
}
.cdp-tech-table th {
	width: 220px;
	color: var(--cdp-text-muted) !important;
	font-weight: 600 !important;
}
.cdp-tech-table td {
	color: #fff !important;
	font-weight: 500 !important;
}
@media (max-width: 600px) {
	.cdp-tech-table th { width: 140px; }
}

/* Deal popup modal ----------------------------------------------------------*/
.cdp-modal-overlay {
	display: none;
	position: fixed;
	inset: 0;
	background: rgba(0,0,0,.75);
	z-index: 99999;
	align-items: center;
	justify-content: center;
	padding: 20px;
}
.cdp-modal-overlay.active { display: flex; }
.cdp-modal {
	background: #fff !important;
	border-top: 6px solid var(--cdp-red);
	border-radius: var(--cdp-radius);
	max-width: 440px;
	width: 100%;
	padding: 30px;
	position: relative;
}
.cdp-modal h3 {
	margin-top: 0;
	color: #111 !important;
}
.cdp-modal-car-name {
	color: var(--cdp-red) !important;
	font-weight: 700;
	margin-top: -8px;
}
.cdp-modal-close {
	position: absolute;
	top: 10px;
	right: 14px;
	background: none;
	border: none;
	font-size: 26px !important;
	cursor: pointer;
	color: #999 !important;
	line-height: 1;
}
.cdp-modal label {
	display: block;
	font-weight: 700 !important;
	margin: 14px 0 6px;
	font-size: 13px !important;
	color: #111 !important;
}
.cdp-modal input,
.cdp-modal textarea {
	width: 100%;
	padding: 10px 12px;
	border: 1px solid #ddd;
	border-radius: var(--cdp-radius);
	font-size: 14px !important;
	color: #111 !important;
	background: #fff !important;
}
.cdp-modal .cdp-btn { margin-top: 20px; }
.cdp-form-response {
	margin-top: 12px;
	font-size: 13px !important;
	text-align: center;
}
