.preowned-detail {
	--preowned-red: #eb0a1e;
	--preowned-text: #171717;
	--preowned-muted: #707070;
	--preowned-border: #dedede;
	--preowned-panel: #f3f3f3;

	width: min(100%, 1200px);
	margin: 2.5rem auto 4rem;
	color: var(--preowned-text);
}

.preowned-detail__summary {
	display: grid;
	grid-template-columns:
		minmax(0, 1.1fr)
		minmax(20rem, 0.9fr);
	gap: clamp(2rem, 5vw, 4rem);
	align-items: start;
}

.preowned-detail__media {
	display: flex;
	aspect-ratio: 4 / 3;
	align-items: center;
	justify-content: center;
	overflow: hidden;
	background: var(--preowned-panel);
}

.preowned-detail__media img {
	display: block;
	width: 100%;
	height: 100%;
	margin: 0;
	object-fit: cover;
	object-position: center;
}

.preowned-detail__placeholder {
	color: var(--preowned-muted);
	font-size: 0.9rem;
}

.preowned-detail__header {
	margin-bottom: 1.25rem;
	padding-bottom: 0.85rem;
}

.preowned-detail__eyebrow {
	margin: 0 0 0.25rem;
	color: var(--preowned-red);
	font-size: 0.75rem;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

#content .preowned-detail__title {
	margin: 0 !important;
  color: var(--preowned-text);
	font-weight: 600;
  border-bottom: 1px solid var(--preowned-red) !important;
}

.preowned-detail__specs {
	display: grid;
	gap: 0.35rem;
	margin: 0;
}

.preowned-detail__spec {
	display: grid;
	grid-template-columns: 8.5rem minmax(0, 1fr);
	gap: 0.75rem;
}

.preowned-detail__spec dt,
.preowned-detail__spec dd {
	margin: 0;
}

.preowned-detail__spec dt {
	color: var(--preowned-muted);
}

.preowned-detail__spec dd {
	color: var(--preowned-text);
	font-weight: 500;
	overflow-wrap: anywhere;
}

.preowned-detail__price {
	display: grid;
	grid-template-columns: 8.5rem minmax(0, 1fr);
	gap: 0.75rem;
	margin-top: 1.25rem;
	padding-top: 1.25rem;
	border-top: 1px solid var(--preowned-border);
}

.preowned-detail__price-label {
	color: var(--preowned-muted);
}

.preowned-detail__price-value {
	color: var(--preowned-text);
	font-size: 1.15rem;
	font-weight: 700;
}

.preowned-detail__contact {
	display: inline-flex;
	min-width: 11rem;
	min-height: 2.75rem;
	align-items: center;
	justify-content: center;
	margin-top: 1.25rem;
	padding: 0.75rem 1.5rem;
	background: var(--preowned-red);
	box-shadow: 0 3px 8px rgb(0 0 0 / 18%);
	color: #fff;
	font-weight: 700;
	line-height: 1;
	text-align: center;
	text-decoration: none;
	transition:
		background-color 160ms ease,
		box-shadow 160ms ease,
		transform 160ms ease;
}

.preowned-detail__contact:hover {
	background: #c90015;
	box-shadow: 0 5px 12px rgb(0 0 0 / 22%);
	color: #fff;
	text-decoration: none;
	transform: translateY(-1px);
}

.preowned-detail__contact:focus-visible {
	outline: 3px solid rgb(235 10 30 / 35%);
	outline-offset: 3px;
}

.preowned-detail__section {
	margin-top: clamp(2.5rem, 6vw, 4.5rem);
}

.preowned-detail__section-title {
	margin: 0 0 1.25rem;
	padding-bottom: 0.75rem;
	border-bottom: 1px solid var(--preowned-red);
	font-size: clamp(1.4rem, 2.5vw, 1.8rem);
	font-weight: 600;
	line-height: 1.2;
}

.preowned-detail__rich-text > :first-child {
	margin-top: 0;
}

.preowned-detail__rich-text > :last-child {
	margin-bottom: 0;
}

.preowned-detail p:empty {
	display: none;
}

.cm-vehicle-gallery br {
	display: none;
}

.cm-vehicle-gallery__stage > p,
.cm-vehicle-gallery__viewport > p,
.cm-vehicle-gallery__reel-shell > p,
.cm-vehicle-gallery__reel > p,
.cm-vehicle-gallery__lightbox > p,
.cm-vehicle-gallery__lightbox-controls > p {
	display: contents;
}

/* Unwrap the paragraph WordPress added around the contact button. */
.preowned-detail__information > p {
	display: contents;
}

/* Keep Price label and value in the intended grid columns. */
.preowned-detail__price > br {
	display: none;
}

@media (max-width: 800px) {
	.preowned-detail {
		margin-top: 1.5rem;
	}

	.preowned-detail__summary {
		grid-template-columns: 1fr;
		gap: 1.75rem;
	}

	.preowned-detail__media {
		aspect-ratio: 16 / 10;
	}
}

@media (max-width: 520px) {
	.preowned-detail__spec,
	.preowned-detail__price {
		grid-template-columns: 7rem minmax(0, 1fr);
		gap: 0.5rem;
	}

	.preowned-detail__contact {
		width: 100%;
	}
}