/*!
 * Centrepoint Motors — Vehicle Stock
 * Frontend stylesheet. All selectors scoped under .cpm-wrap so the plugin
 * never leaks into the surrounding WordPress theme.
 */

.cpm-wrap {
	--cpm-bg:        #0e1116;
	--cpm-bg-2:      #161b22;
	--cpm-line:      #232a33;
	--cpm-text:      #e7eaf0;
	--cpm-muted:     #8c95a3;
	--cpm-dim:       #5a6470;
	--cpm-accent:    #2ec4b6;
	--cpm-accent-2:  #1fa094;
	--cpm-blue:      #2e7bff;
	--cpm-wa:        #25d366;
	--cpm-red:       #e0344e;
	--cpm-amber:     #d99a2b;
	--cpm-radius:    14px;
	--cpm-radius-sm: 9px;
	--cpm-shadow:    0 6px 24px -8px rgba(0,0,0,.25), 0 2px 6px -2px rgba(0,0,0,.18);
	--cpm-shadow-hv: 0 14px 42px -10px rgba(0,0,0,.32), 0 6px 14px -4px rgba(0,0,0,.18);

	box-sizing: border-box;
	max-width: 1240px;
	margin: 0 auto;
	padding: 28px 16px;
	color: var(--cpm-text);
	line-height: 1.55;
}
.cpm-wrap *,
.cpm-wrap *::before,
.cpm-wrap *::after { box-sizing: border-box; }

/* ============================================================
   Section heading
   ============================================================ */
.cpm-wrap .cpm-section-title {
	font-size: clamp(1.6rem, 2.4vw, 2.2rem);
	font-weight: 800;
	letter-spacing: -0.02em;
	color: var(--cpm-bg);
	margin: 0 0 22px;
	line-height: 1.15;
}
.cpm-wrap .cpm-eyebrow {
	display: inline-block;
	font-size: .72rem;
	font-weight: 700;
	letter-spacing: .22em;
	text-transform: uppercase;
	color: var(--cpm-accent);
	margin-bottom: 8px;
}

/* ============================================================
   Grid + Vehicle Card
   ============================================================ */
.cpm-wrap .cpm-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
	gap: 22px;
}

.cpm-wrap .cpm-card-vehicle {
	background: var(--cpm-bg);
	color: var(--cpm-text);
	border-radius: var(--cpm-radius);
	overflow: hidden;
	display: flex;
	flex-direction: column;
	box-shadow: var(--cpm-shadow);
	transition: transform .25s ease, box-shadow .25s ease;
	border: 1px solid var(--cpm-line);
}
.cpm-wrap .cpm-card-vehicle:hover {
	transform: translateY(-3px);
	box-shadow: var(--cpm-shadow-hv);
}

.cpm-wrap .cpm-cc-media {
	position: relative;
	display: block;
	aspect-ratio: 16/10;
	background: linear-gradient(135deg, #1c232c 0%, #0e1116 100%);
	overflow: hidden;
}
.cpm-wrap .cpm-cc-media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform .5s ease;
}
.cpm-wrap .cpm-card-vehicle:hover .cpm-cc-media img { transform: scale(1.04); }

.cpm-wrap .cpm-cc-badges {
	position: absolute;
	top: 10px;
	left: 10px;
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	z-index: 2;
}

.cpm-wrap .cpm-cc-body {
	padding: 16px 18px 12px;
	flex: 1;
	display: flex;
	flex-direction: column;
}
.cpm-wrap .cpm-cc-body a {
	color: inherit;
	text-decoration: none;
}
.cpm-wrap .cpm-cc-title {
	font-size: 1.15rem;
	font-weight: 700;
	margin: 0 0 2px;
	letter-spacing: -0.01em;
	color: var(--cpm-text);
}
.cpm-wrap .cpm-cc-variant {
	font-size: .85rem;
	color: var(--cpm-muted);
	margin: 0 0 12px;
}

.cpm-wrap .cpm-cc-specs {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 8px 14px;
	padding: 12px 0;
	border-top: 1px solid var(--cpm-line);
	border-bottom: 1px solid var(--cpm-line);
	margin-bottom: 12px;
}
.cpm-wrap .cpm-cc-spec {
	display: flex;
	align-items: center;
	gap: 6px;
	font-size: .82rem;
	color: var(--cpm-muted);
}
.cpm-wrap .cpm-cc-spec svg {
	width: 14px;
	height: 14px;
	color: var(--cpm-accent);
	flex: none;
}

.cpm-wrap .cpm-cc-foot {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
}
.cpm-wrap .cpm-cc-price-lbl {
	font-size: .7rem;
	font-weight: 600;
	letter-spacing: .14em;
	text-transform: uppercase;
	color: var(--cpm-dim);
}
.cpm-wrap .cpm-cc-price {
	font-size: 1.4rem;
	font-weight: 800;
	color: var(--cpm-accent);
	letter-spacing: -0.02em;
	font-variant-numeric: tabular-nums;
}
.cpm-wrap .cpm-cc-price.is-sold { color: var(--cpm-red); font-size: 1.15rem; }

.cpm-wrap .cpm-cc-cta {
	padding: 0 18px 16px;
	display: flex;
	gap: 8px;
	align-items: center;
}
.cpm-wrap .cpm-cc-cta .cpm-btn:first-child { flex: 1; }

/* ============================================================
   Badges
   ============================================================ */
.cpm-wrap .cpm-badge {
	display: inline-flex;
	align-items: center;
	padding: 4px 9px;
	border-radius: 999px;
	font-size: .68rem;
	font-weight: 700;
	letter-spacing: .06em;
	text-transform: uppercase;
	background: rgba(255,255,255,.92);
	color: var(--cpm-bg);
	backdrop-filter: blur(4px);
}
.cpm-wrap .cpm-badge-sold     { background: var(--cpm-red);    color: #fff; }
.cpm-wrap .cpm-badge-reserved { background: var(--cpm-amber);  color: #fff; }
.cpm-wrap .cpm-badge-import   { background: var(--cpm-blue);   color: #fff; }
.cpm-wrap .cpm-badge-finance  { background: var(--cpm-accent); color: #fff; }

.cpm-wrap .cpm-sold-overlay {
	position: absolute;
	inset: 0;
	background: rgba(14,17,22,.55);
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 3;
	pointer-events: none;
}
.cpm-wrap .cpm-sold-overlay span {
	background: var(--cpm-red);
	color: #fff;
	padding: 10px 30px;
	border-radius: 6px;
	font-weight: 900;
	letter-spacing: .15em;
	transform: rotate(-6deg);
	font-size: 1.4rem;
	box-shadow: 0 8px 24px rgba(0,0,0,.4);
}

/* ============================================================
   Buttons
   ============================================================ */
.cpm-wrap .cpm-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 11px 18px;
	border-radius: var(--cpm-radius-sm);
	border: 1px solid transparent;
	font-size: .92rem;
	font-weight: 600;
	letter-spacing: .01em;
	cursor: pointer;
	text-decoration: none;
	transition: all .18s ease;
	line-height: 1.2;
	background: transparent;
	color: inherit;
	font-family: inherit;
}
.cpm-wrap .cpm-btn svg { width: 17px; height: 17px; flex: none; }
.cpm-wrap .cpm-btn-block { width: 100%; }
.cpm-wrap .cpm-btn-sm    { padding: 8px 12px; font-size: .85rem; }

.cpm-wrap .cpm-btn-primary {
	background: var(--cpm-accent);
	color: #fff;
	border-color: var(--cpm-accent);
}
.cpm-wrap .cpm-btn-primary:hover {
	background: var(--cpm-accent-2);
	border-color: var(--cpm-accent-2);
	color: #fff;
}
.cpm-wrap .cpm-btn-ghost {
	background: transparent;
	color: var(--cpm-text);
	border-color: var(--cpm-line);
}
.cpm-wrap .cpm-card-vehicle .cpm-btn-ghost {
	color: var(--cpm-text);
	border-color: rgba(255,255,255,.15);
	background: rgba(255,255,255,.04);
}
.cpm-wrap .cpm-btn-ghost:hover {
	background: var(--cpm-accent);
	color: #fff;
	border-color: var(--cpm-accent);
}
.cpm-wrap .cpm-btn-wa {
	background: var(--cpm-wa);
	color: #fff;
	border-color: var(--cpm-wa);
}
.cpm-wrap .cpm-btn-wa:hover {
	background: #1eb558;
	border-color: #1eb558;
	color: #fff;
}

/* ============================================================
   Stock page layout
   ============================================================ */
.cpm-wrap.cpm-stock-page { padding-top: 16px; }
.cpm-wrap .cpm-stock-layout {
	display: grid;
	grid-template-columns: 260px 1fr;
	gap: 28px;
	align-items: start;
}
@media (max-width: 880px) {
	.cpm-wrap .cpm-stock-layout { grid-template-columns: 1fr; }
}

/* ============================================================
   Filter panel (sidebar)
   ============================================================ */
.cpm-wrap .cpm-filter-panel {
	background: var(--cpm-bg);
	border: 1px solid var(--cpm-line);
	border-radius: var(--cpm-radius);
	padding: 22px 20px;
	position: sticky;
	top: 20px;
}
.cpm-wrap .cpm-filter-panel h3 {
	font-size: 1.05rem;
	font-weight: 700;
	margin: 0 0 16px;
	display: flex;
	justify-content: space-between;
	align-items: center;
	color: var(--cpm-text);
}
.cpm-wrap .cpm-fp-reset {
	font-size: .78rem;
	font-weight: 500;
	color: var(--cpm-accent);
	text-decoration: none;
}
.cpm-wrap .cpm-fp-reset:hover { text-decoration: underline; }
.cpm-wrap .cpm-fp-group { margin-bottom: 16px; }
.cpm-wrap .cpm-fp-group > label {
	display: block;
	font-size: .72rem;
	font-weight: 700;
	letter-spacing: .12em;
	text-transform: uppercase;
	color: var(--cpm-muted);
	margin-bottom: 7px;
}
.cpm-wrap .cpm-fp-group select,
.cpm-wrap .cpm-fp-range input {
	width: 100%;
	padding: 9px 11px;
	font-size: .9rem;
	background: var(--cpm-bg-2);
	color: var(--cpm-text);
	border: 1px solid var(--cpm-line);
	border-radius: var(--cpm-radius-sm);
	font-family: inherit;
	appearance: none;
	-webkit-appearance: none;
}
.cpm-wrap .cpm-fp-group select {
	background-image:
		linear-gradient(45deg, transparent 50%, var(--cpm-muted) 50%),
		linear-gradient(135deg, var(--cpm-muted) 50%, transparent 50%);
	background-position: calc(100% - 16px) 50%, calc(100% - 11px) 50%;
	background-size: 5px 5px;
	background-repeat: no-repeat;
	padding-right: 30px;
}
.cpm-wrap .cpm-fp-range {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 8px;
}
.cpm-wrap .cpm-fp-check {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: .88rem;
	color: var(--cpm-text);
	letter-spacing: 0;
	text-transform: none;
	font-weight: 500;
	cursor: pointer;
}
.cpm-wrap .cpm-fp-check input { accent-color: var(--cpm-accent); }

/* ============================================================
   Toolbar
   ============================================================ */
.cpm-wrap .cpm-toolbar {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 18px;
	flex-wrap: wrap;
	gap: 10px;
}
.cpm-wrap .cpm-count {
	font-size: .92rem;
	color: var(--cpm-bg);
}
.cpm-wrap .cpm-count strong {
	color: var(--cpm-accent);
	font-weight: 800;
	font-size: 1.15rem;
}
.cpm-wrap .cpm-sort {
	padding: 8px 30px 8px 12px;
	border: 1px solid #d0d6dd;
	border-radius: var(--cpm-radius-sm);
	background: #fff;
	font-size: .88rem;
	color: var(--cpm-bg);
	cursor: pointer;
	font-family: inherit;
}

/* ============================================================
   Empty state & pagination
   ============================================================ */
.cpm-wrap .cpm-empty {
	grid-column: 1 / -1;
	text-align: center;
	padding: 56px 24px;
	color: var(--cpm-muted);
	background: var(--cpm-bg);
	border-radius: var(--cpm-radius);
}
.cpm-wrap .cpm-empty svg {
	width: 56px;
	height: 56px;
	color: var(--cpm-dim);
	margin-bottom: 14px;
}
.cpm-wrap .cpm-empty h3 { color: var(--cpm-text); margin: 0 0 8px; }
.cpm-wrap .cpm-empty a  { color: var(--cpm-accent); text-decoration: none; }

.cpm-wrap .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 36px;
	height: 36px;
	padding: 0 10px;
	border-radius: var(--cpm-radius-sm);
	background: #fff;
	border: 1px solid #d6dce3;
	color: var(--cpm-bg);
	margin: 18px 4px 0 0;
	text-decoration: none;
	font-weight: 600;
}
.cpm-wrap .page-numbers.current { background: var(--cpm-accent); color: #fff; border-color: var(--cpm-accent); }
.cpm-wrap .page-numbers:hover:not(.current) { border-color: var(--cpm-accent); color: var(--cpm-accent); }

/* ============================================================
   Search widget
   ============================================================ */
.cpm-wrap .cpm-search {
	background: var(--cpm-bg);
	border-radius: var(--cpm-radius);
	padding: 22px 22px 18px;
	border: 1px solid var(--cpm-line);
}
.cpm-wrap .cpm-search-title {
	font-size: 1.05rem;
	font-weight: 700;
	color: var(--cpm-text);
	display: flex;
	align-items: center;
	gap: 8px;
	margin-bottom: 16px;
}
.cpm-wrap .cpm-search-title svg { width: 18px; height: 18px; color: var(--cpm-accent); }
.cpm-wrap .cpm-search-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
	gap: 12px;
	align-items: end;
}
.cpm-wrap .cpm-field label {
	display: block;
	font-size: .68rem;
	font-weight: 700;
	letter-spacing: .15em;
	text-transform: uppercase;
	color: var(--cpm-muted);
	margin-bottom: 6px;
}
.cpm-wrap .cpm-field select {
	width: 100%;
	padding: 11px 12px;
	background: var(--cpm-bg-2);
	color: var(--cpm-text);
	border: 1px solid var(--cpm-line);
	border-radius: var(--cpm-radius-sm);
	font-size: .9rem;
	appearance: none;
	-webkit-appearance: none;
	background-image:
		linear-gradient(45deg, transparent 50%, var(--cpm-muted) 50%),
		linear-gradient(135deg, var(--cpm-muted) 50%, transparent 50%);
	background-position: calc(100% - 16px) 50%, calc(100% - 11px) 50%;
	background-size: 5px 5px;
	background-repeat: no-repeat;
	padding-right: 30px;
	font-family: inherit;
}
.cpm-wrap .cpm-search .cpm-btn { height: 42px; }

/* ============================================================
   Single car page
   ============================================================ */
.cpm-wrap.cpm-single { padding-top: 18px; }

.cpm-wrap .cpm-breadcrumb {
	font-size: .85rem;
	color: var(--cpm-muted);
	margin-bottom: 12px;
}
.cpm-wrap .cpm-breadcrumb a {
	color: var(--cpm-muted);
	text-decoration: none;
}
.cpm-wrap .cpm-breadcrumb a:hover { color: var(--cpm-accent); }
.cpm-wrap .cpm-breadcrumb span { margin: 0 8px; color: var(--cpm-dim); }

.cpm-wrap .cpm-single-title {
	font-size: clamp(1.8rem, 3vw, 2.6rem);
	font-weight: 800;
	letter-spacing: -0.025em;
	margin: 0 0 4px;
	color: inherit;
	line-height: 1.1;
}
.cpm-wrap .cpm-detail-variant {
	font-size: 1.05rem;
	color: var(--cpm-muted);
	margin: 0 0 22px;
}

.cpm-wrap .cpm-detail-layout {
	display: grid;
	grid-template-columns: 1fr 380px;
	gap: 28px;
	align-items: start;
}
@media (max-width: 900px) {
	.cpm-wrap .cpm-detail-layout { grid-template-columns: 1fr; }
}

/* gallery */
.cpm-wrap .cpm-gallery-main {
	position: relative;
	aspect-ratio: 16/10;
	border-radius: var(--cpm-radius);
	overflow: hidden;
	background: #0e1116;
	margin-bottom: 12px;
}
.cpm-wrap .cpm-gallery-main img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}
.cpm-wrap .cpm-gallery-nav {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	width: 42px;
	height: 42px;
	border-radius: 999px;
	background: rgba(14,17,22,.7);
	border: none;
	color: #fff;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background .18s ease;
}
.cpm-wrap .cpm-gallery-nav:hover { background: var(--cpm-accent); }
.cpm-wrap .cpm-gallery-nav svg { width: 22px; height: 22px; }
.cpm-wrap .cpm-prev { left: 14px; }
.cpm-wrap .cpm-next { right: 14px; }
.cpm-wrap .cpm-badges-abs {
	position: absolute;
	top: 14px;
	left: 14px;
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	z-index: 2;
}

.cpm-wrap .cpm-gallery-thumbs {
	display: grid;
	grid-template-columns: repeat(5, 1fr);
	gap: 8px;
	margin-bottom: 24px;
}
.cpm-wrap .cpm-gallery-thumbs img {
	width: 100%;
	aspect-ratio: 4/3;
	object-fit: cover;
	border-radius: var(--cpm-radius-sm);
	cursor: pointer;
	opacity: .55;
	transition: opacity .18s ease, transform .18s ease;
	display: block;
}
.cpm-wrap .cpm-gallery-thumbs img:hover,
.cpm-wrap .cpm-gallery-thumbs img.active { opacity: 1; }
.cpm-wrap .cpm-gallery-thumbs img.active {
	outline: 2px solid var(--cpm-accent);
	outline-offset: 2px;
}

/* card on single page */
.cpm-wrap .cpm-card {
	background: var(--cpm-bg);
	color: var(--cpm-text);
	border-radius: var(--cpm-radius);
	padding: 22px;
	margin-bottom: 18px;
	border: 1px solid var(--cpm-line);
}
.cpm-wrap .cpm-card h3 {
	font-size: 1.05rem;
	font-weight: 700;
	margin: 0 0 16px;
	display: flex;
	align-items: center;
	gap: 8px;
	color: var(--cpm-text);
}
.cpm-wrap .cpm-card h3 svg {
	width: 18px;
	height: 18px;
	color: var(--cpm-accent);
}

.cpm-wrap .cpm-desc {
	color: var(--cpm-muted);
	line-height: 1.7;
}
.cpm-wrap .cpm-desc p { margin: 0 0 12px; }
.cpm-wrap .cpm-desc p:last-child { margin: 0; }

/* features tags */
.cpm-wrap .cpm-feature-tags {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}
.cpm-wrap .cpm-feature-tag {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	background: var(--cpm-bg-2);
	color: var(--cpm-text);
	padding: 7px 12px;
	border-radius: 999px;
	font-size: .82rem;
	font-weight: 500;
	border: 1px solid var(--cpm-line);
}
.cpm-wrap .cpm-feature-tag svg {
	width: 13px;
	height: 13px;
	color: var(--cpm-accent);
	flex: none;
}

/* sidebar */
.cpm-wrap .cpm-price-row {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding-bottom: 14px;
	margin-bottom: 14px;
	border-bottom: 1px solid var(--cpm-line);
}
.cpm-wrap .cpm-price-big {
	font-size: 2.1rem;
	font-weight: 800;
	color: var(--cpm-accent);
	letter-spacing: -0.03em;
	font-variant-numeric: tabular-nums;
	line-height: 1;
}
.cpm-wrap .cpm-price-big.is-sold { color: var(--cpm-red); font-size: 1.6rem; }
.cpm-wrap .cpm-finance-note {
	font-size: .85rem;
	color: var(--cpm-muted);
	display: flex;
	align-items: flex-start;
	gap: 6px;
	margin: 0 0 14px;
	line-height: 1.5;
}
.cpm-wrap .cpm-finance-note svg {
	width: 16px;
	height: 16px;
	color: var(--cpm-accent);
	margin-top: 2px;
	flex: none;
}

.cpm-wrap .cpm-cta-stack {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

/* spec grid */
.cpm-wrap .cpm-spec-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 14px 18px;
}
.cpm-wrap .cpm-spec-item {
	display: flex;
	flex-direction: column;
	gap: 3px;
}
.cpm-wrap .cpm-spec-lbl {
	display: flex;
	align-items: center;
	gap: 5px;
	font-size: .72rem;
	font-weight: 600;
	letter-spacing: .1em;
	text-transform: uppercase;
	color: var(--cpm-muted);
}
.cpm-wrap .cpm-spec-lbl svg {
	width: 13px;
	height: 13px;
	color: var(--cpm-accent);
	flex: none;
}
.cpm-wrap .cpm-spec-val {
	font-size: .98rem;
	font-weight: 600;
	color: var(--cpm-text);
}

/* dealer box */
.cpm-wrap .cpm-dealer-box {
	background: linear-gradient(135deg, var(--cpm-bg) 0%, #1a2129 100%);
	border-radius: var(--cpm-radius);
	padding: 22px;
	border: 1px solid var(--cpm-line);
}
.cpm-wrap .cpm-db-name {
	font-size: 1.1rem;
	font-weight: 800;
	letter-spacing: -0.01em;
	color: var(--cpm-text);
	margin-bottom: 12px;
}
.cpm-wrap .cpm-db-row {
	display: flex;
	align-items: flex-start;
	gap: 9px;
	margin-bottom: 9px;
	font-size: .88rem;
	color: var(--cpm-muted);
	line-height: 1.45;
}
.cpm-wrap .cpm-db-row:last-child { margin-bottom: 0; }
.cpm-wrap .cpm-db-row svg {
	width: 15px;
	height: 15px;
	color: var(--cpm-accent);
	flex: none;
	margin-top: 2px;
}
.cpm-wrap .cpm-db-row a {
	color: var(--cpm-text);
	text-decoration: none;
}
.cpm-wrap .cpm-db-row a:hover { color: var(--cpm-accent); }

/* related */
.cpm-wrap .cpm-related {
	margin-top: 44px;
	padding-top: 36px;
	border-top: 1px solid rgba(0,0,0,.08);
}

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 600px) {
	.cpm-wrap { padding: 18px 12px; }
	.cpm-wrap .cpm-grid { grid-template-columns: 1fr; gap: 18px; }
	.cpm-wrap .cpm-spec-grid { grid-template-columns: 1fr; }
	.cpm-wrap .cpm-gallery-thumbs { grid-template-columns: repeat(4, 1fr); }
	.cpm-wrap .cpm-price-big { font-size: 1.8rem; }
}
