/* LCM Caravan Detail — single vehicle page. Theme-neutral, responsive.
 * Loaded only on caravan singles via template_include. */

.lcm-detail {
	--lcm-navy: #28306f;
	--lcm-red:  #cc2229;
	--lcm-blue: #1e73be;
	max-width: 1200px;
	margin: 0 auto;
	padding: 24px 20px 56px;
	color: #1c1c1c;
	box-sizing: border-box;
}

.lcm-detail *,
.lcm-detail *::before,
.lcm-detail *::after {
	box-sizing: border-box;
}

/* ── Breadcrumbs ── */
.lcm-detail__breadcrumbs {
	font-size: 0.85rem;
	margin-bottom: 20px;
	color: #666;
}
.lcm-detail__breadcrumbs a {
	color: var(--lcm-navy);
	text-decoration: none;
}
.lcm-detail__breadcrumbs a:hover,
.lcm-detail__breadcrumbs a:focus {
	text-decoration: underline;
}
.lcm-detail__crumb-sep {
	margin: 0 8px;
	color: #bbb;
}
.lcm-detail__breadcrumbs [aria-current="page"] {
	color: #666;
}

/* ── Top: media + summary ── */
.lcm-detail__top {
	display: grid;
	/* minmax(0, …) floors each track at 0 so the fr fractions win. Without it the
	 * default minmax(auto, …) floors the media column at its min-content width —
	 * the overflow-scroll thumb track / intrinsic image width — which blows the
	 * column out and crushes the summary. */
	grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
	gap: 32px;
	align-items: start;
}

.lcm-detail__stage {
	position: relative;
	min-width: 0;
}
.lcm-detail__main {
	margin: 0;
	border-radius: 8px;
	overflow: hidden;
	background: #f2f3f7;
	aspect-ratio: 4 / 3;
}
.lcm-detail__main img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}
.lcm-detail__placeholder {
	aspect-ratio: 4 / 3;
	border-radius: 8px;
	background: #e7e9f2;
}

/* Thumbnail strip as a horizontal carousel. Without JS it's a natively
 * scrollable/swipeable row; JS layers on prev/next arrow buttons. */
.lcm-detail__carousel {
	position: relative;
	margin-top: 12px;
}
.lcm-detail__thumbs {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	gap: 8px;
	overflow-x: auto;
	scroll-behavior: smooth;
	scroll-snap-type: x proximity;
	-webkit-overflow-scrolling: touch;
	scrollbar-width: thin;
}
.lcm-detail__thumbs::-webkit-scrollbar {
	height: 6px;
}
.lcm-detail__thumbs::-webkit-scrollbar-thumb {
	background: #c7cad8;
	border-radius: 3px;
}
.lcm-detail__thumb {
	flex: 0 0 auto;
	width: calc( ( 100% - 32px ) / 5 );
	min-width: 84px;
	scroll-snap-align: start;
}
/* Scoped under .lcm-detail to out-specify the Elementor kit's global
 * `.elementor-kit-6 button { background: … }` rule, which would otherwise
 * paint these buttons the theme red. */
.lcm-detail .lcm-detail__thumb-btn {
	display: block;
	width: 100%;
	padding: 0;
	border: 2px solid transparent;
	border-radius: 6px;
	overflow: hidden;
	background: #f2f3f7;
	cursor: zoom-in;
	aspect-ratio: 4 / 3;
}

/* Keep the GLightbox overlay above the sticky header / Elementor layers. */
.glightbox-container { z-index: 1000000 !important; }

/* Prev/next arrows — injected by JS, so they never show in the no-JS fallback. */
.lcm-detail .lcm-detail__carousel-nav {
	position: absolute;
	top: 50%;
	transform: translateY( -50% );
	z-index: 3;
	width: 38px;
	height: 38px;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0;
	border: none;
	border-radius: 50%;
	background: rgba( 40, 48, 111, 0.92 );
	color: #fff;
	font-size: 1.1rem;
	line-height: 1;
	cursor: pointer;
	box-shadow: 0 2px 6px rgba( 0, 0, 0, 0.25 );
}
.lcm-detail__carousel-nav:hover,
.lcm-detail__carousel-nav:focus {
	background: var(--lcm-red);
}
.lcm-detail__carousel-nav--prev {
	left: -6px;
}
.lcm-detail__carousel-nav--next {
	right: -6px;
}
.lcm-detail__carousel-nav[disabled] {
	opacity: 0;
	pointer-events: none;
}
.lcm-detail__thumb-btn img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}
.lcm-detail__thumb.is-active .lcm-detail__thumb-btn,
.lcm-detail__thumb-btn:hover,
.lcm-detail__thumb-btn:focus {
	border-color: var(--lcm-red);
}

/* ── Badges (mirrors card treatment) ── */
.lcm-detail__badges {
	position: absolute;
	top: 12px;
	left: 12px;
	z-index: 2;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 6px;
}
.lcm-detail__badges .lcm-card__badge {
	display: inline-block;
	padding: 5px 12px;
	color: #fff;
	font-size: 0.78rem;
	font-weight: 700;
	line-height: 1;
	text-transform: uppercase;
	letter-spacing: 0.02em;
	border-radius: 3px;
}
.lcm-detail__badges .lcm-card__badge--sale {
	background: var(--lcm-red);
}
.lcm-detail__badges .lcm-card__badge--reserved {
	background: #8b1a1a; /* deeper brick red, distinct from brand red */
}
.lcm-detail__badges .lcm-card__badge--order-now {
	background: #ffd200;
	color: #444;
}
.lcm-detail__badges .lcm-card__badge--coming-soon {
	background: var(--lcm-navy);
}
.lcm-detail__badges .lcm-card__badge--just-arrived {
	background: var(--lcm-blue);
}

/* ── Summary ── */
.lcm-detail__title {
	margin: 0 0 12px;
	font-size: 1.9rem;
	line-height: 1.2;
	color: var(--lcm-navy);
}
.lcm-detail__price {
	margin: 0 0 16px;
	font-size: 1.7rem;
	font-weight: 700;
	color: var(--lcm-navy);
}
.lcm-detail__price--sale .lcm-detail__price-was {
	color: #888;
	font-weight: 400;
	font-size: 1.1rem;
	text-decoration: line-through;
	margin-right: 8px;
}
.lcm-detail__price--sale .lcm-detail__price-now {
	color: var(--lcm-red);
}
.lcm-detail__price--poa {
	color: var(--lcm-red);
}
.lcm-detail__price--reserved {
	color: #8b1a1a; /* deeper brick red, distinct from brand red */
}
.lcm-detail__price-euro {
	margin: -10px 0 16px;
	font-size: 1.2rem;
	font-weight: 600;
	color: var(--lcm-blue);
}
.lcm-detail__awning-type {
	display: inline-block;
	margin: 0;
	padding: 4px 12px;
	border-radius: 999px;
	background: var(--lcm-navy);
	color: #fff;
	font-size: 0.95rem;
	font-weight: 600;
	letter-spacing: 0.02em;
}
.lcm-detail__promo {
	margin: 0 0 16px;
	padding: 10px 14px;
	background: #fdf0f0;
	border-left: 3px solid var(--lcm-red);
	color: var(--lcm-navy);
	font-weight: 600;
}

.lcm-detail__specs {
	margin: 0 0 20px;
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 1px;
	background: #e3e5ee;
	border: 1px solid #e3e5ee;
	border-radius: 6px;
	overflow: hidden;
}
.lcm-detail--awning .lcm-detail__specs {
	margin-top: 28px;
}
.lcm-detail:not(.lcm-detail--awning) .lcm-detail__specs {
	margin-top: 28px;
}
.lcm-detail__specs--single {
	grid-template-columns: 1fr;
}
.lcm-detail:not(.lcm-detail--awning) .lcm-detail__specs--single {
	margin-top: 8px;
}
.lcm-detail__specs-empty {
	margin: 28px 0 20px;
	padding: 16px 18px;
	background: #f4f5fa;
	border: 1px solid #e3e5ee;
	border-radius: 6px;
	color: #5a5f7a;
	font-style: italic;
}
.lcm-detail__spec {
	display: flex;
	justify-content: space-between;
	gap: 12px;
	margin: 0;
	padding: 10px 14px;
	background: #fff;
}
.lcm-detail__spec-label {
	margin: 0;
	font-weight: 600;
	color: #666;
	text-transform: uppercase;
	font-size: 0.72rem;
	letter-spacing: 0.03em;
	align-self: center;
}
.lcm-detail__spec-value {
	margin: 0;
	font-weight: 700;
	color: var(--lcm-navy);
	text-align: right;
}

.lcm-detail__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
}
/* Awning detail: breathing room between the spec table (or the empty-state
 * "Specifications coming soon" box) and the Make an enquiry button. */
.lcm-detail--awning .lcm-detail__actions,
.lcm-detail--shop-item .lcm-detail__actions {
	margin-top: 28px;
}
/* Scoped under .lcm-detail so these beat the Elementor kit's global
 * `.elementor-kit-6 button {}` (0,1,1) rule — otherwise the Print button
 * (a real <button>) inherits the theme's red fill, font and padding instead
 * of matching the enquiry/brochure links. font-family/size are normalised so
 * the <button> matches the <a> CTAs exactly. */
.lcm-detail .lcm-detail__cta {
	display: inline-block;
	padding: 12px 22px;
	background: var(--lcm-red);
	color: #fff;
	font-family: inherit;
	font-size: 1rem;
	line-height: 1.2;
	font-weight: 700;
	text-decoration: none;
	border-radius: 4px;
	border: 2px solid var(--lcm-red);
	cursor: pointer;
}
.lcm-detail .lcm-detail__cta:hover,
.lcm-detail .lcm-detail__cta:focus {
	background: #a81b21;
	border-color: #a81b21;
	color: #fff;
}
.lcm-detail .lcm-detail__cta--ghost {
	background: transparent;
	color: var(--lcm-navy);
	border-color: var(--lcm-navy);
}
.lcm-detail .lcm-detail__cta--ghost:hover,
.lcm-detail .lcm-detail__cta--ghost:focus {
	background: var(--lcm-blue);
	border-color: var(--lcm-blue);
	color: #fff;
}

/* Print button is now icon-only: square-ish, icon centred, inherits ghost
 * colour (navy → white on hover) via currentColor on the SVG. */
.lcm-detail .lcm-detail__print--icon {
	padding: 10px 12px;
	line-height: 0;
}
.lcm-detail .lcm-detail__print-icon {
	display: block;
}

/* Labelled variant (vehicle pages): icon + "Print" text inline. */
.lcm-detail .lcm-detail__print--labeled {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	line-height: 1;
}
.lcm-detail .lcm-detail__print-label {
	font: inherit;
}

/* Vehicle detail: stack the CTAs under the specs table full-width down the
 * summary column with their text centred (Richard's request). Scoped away
 * from awning/shop, which keep the inline row. */
.lcm-detail:not(.lcm-detail--awning):not(.lcm-detail--shop-item) .lcm-detail__actions {
	flex-direction: column;
	align-items: stretch;
}
.lcm-detail:not(.lcm-detail--awning):not(.lcm-detail--shop-item) .lcm-detail__actions .lcm-detail__cta {
	width: 100%;
	box-sizing: border-box;
	text-align: center;
	justify-content: center;
}
/* No hover/focus change on these buttons (Richard): hovered looks identical to
 * resting — reset to the base colours, no shadow or transform. Solid CTAs first,
 * then the ghost variant (same specificity, later rule wins for ghost). The
 * keyboard focus outline is intentionally left untouched for accessibility. */
.lcm-detail:not(.lcm-detail--awning):not(.lcm-detail--shop-item) .lcm-detail__actions .lcm-detail__cta:hover,
.lcm-detail:not(.lcm-detail--awning):not(.lcm-detail--shop-item) .lcm-detail__actions .lcm-detail__cta:focus {
	background: var(--lcm-red);
	/* border-width !important: the Elementor kit's `.elementor-kit-6 button:hover`
	 * sets border-width:1px, shrinking the 2px border on hover — override it. */
	border: 2px solid var(--lcm-red) !important;
	color: #fff;
	box-shadow: none !important;
	transform: none !important;
}
.lcm-detail:not(.lcm-detail--awning):not(.lcm-detail--shop-item) .lcm-detail__actions .lcm-detail__cta--ghost:hover,
.lcm-detail:not(.lcm-detail--awning):not(.lcm-detail--shop-item) .lcm-detail__actions .lcm-detail__cta--ghost:focus {
	background: transparent;
	border: 2px solid var(--lcm-navy) !important;
	color: var(--lcm-navy);
	box-shadow: none !important;
	transform: none !important;
}

/* Download brochure button: inline download icon to the left of the label
 * (inline SVG, matching the Print button — the site has no consistent icon
 * font we can rely on). Icon inherits the ghost button's navy via currentColor. */
.lcm-detail .lcm-detail__brochure {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	line-height: 1;
}
.lcm-detail .lcm-detail__cta-icon {
	display: block;
	flex-shrink: 0;
}

/* ── Enquiry modal ── */
.lcm-detail__modal[hidden] {
	display: none;
}
.lcm-detail__modal {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
}
.lcm-detail__modal-backdrop {
	position: absolute;
	inset: 0;
	background: rgba(20, 24, 45, 0.6);
}
.lcm-detail__modal-dialog {
	position: relative;
	z-index: 1;
	width: 100%;
	max-width: 440px;
	max-height: calc(100vh - 40px);
	overflow-y: auto;
	background: #fff;
	border-radius: 8px;
	padding: 28px 26px 26px;
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}
.lcm-detail__modal-close {
	position: absolute;
	top: 8px;
	right: 10px;
	width: 36px;
	height: 36px;
	padding: 0;
	background: transparent;
	border: 0;
	font-size: 28px;
	line-height: 1;
	color: var(--lcm-navy);
	cursor: pointer;
}
.lcm-detail__modal-title {
	margin: 0 24px 2px 0;
	font-size: 1.35rem;
	color: var(--lcm-navy);
}
.lcm-detail__modal-vehicle {
	margin: 0 0 16px;
	font-weight: 700;
	color: var(--lcm-red);
}
.lcm-detail__field {
	display: block;
	margin-bottom: 14px;
}
.lcm-detail__field-label {
	display: block;
	margin-bottom: 4px;
	font-size: 0.9rem;
	font-weight: 600;
	color: var(--lcm-navy);
}
.lcm-detail__field input,
.lcm-detail__field textarea {
	width: 100%;
	box-sizing: border-box;
	padding: 10px 12px;
	font-family: inherit;
	font-size: 1rem;
	border: 1px solid #c7ccdb;
	border-radius: 4px;
}
.lcm-detail__field input:focus,
.lcm-detail__field textarea:focus {
	outline: none;
	border-color: var(--lcm-blue);
	box-shadow: 0 0 0 2px rgba(30, 115, 190, 0.2);
}
.lcm-detail__req {
	color: var(--lcm-red);
}
/* Honeypot: visually hidden but present for bots to fill. */
.lcm-detail__hp {
	position: absolute;
	left: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}
.lcm-detail__enquiry-submit {
	width: 100%;
	margin-top: 4px;
	text-align: center;
}
.lcm-detail__form-status {
	margin: 4px 0 12px;
	font-size: 0.92rem;
	min-height: 1.2em;
}
.lcm-detail__form-status.is-success {
	color: #1a7f37;
	font-weight: 600;
}
.lcm-detail__form-status.is-error {
	color: var(--lcm-red);
	font-weight: 600;
}
.lcm-detail__form-status.is-pending {
	color: var(--lcm-navy);
}
body.lcm-modal-open {
	overflow: hidden;
}

/* ── Body: description / features ── */
.lcm-detail__body {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
	gap: 32px;
	margin-top: 40px;
}
.lcm-detail__section {
	margin-top: 40px;
}
.lcm-detail__body .lcm-detail__section {
	margin-top: 0;
}
.lcm-detail__heading {
	margin: 0 0 14px;
	font-size: 1.3rem;
	color: var(--lcm-navy);
	padding-bottom: 8px;
	border-bottom: 2px solid #e3e5ee;
}
.lcm-detail__prose {
	line-height: 1.6;
	/* Normalise pasted content: always the site body font, always left-aligned,
	 * overriding any inherited centre/justify (v2.15.0). The sanitiser strips
	 * inline font/colour/align, this guarantees the baseline presentation. */
	font-family: inherit;
	text-align: left;
	/* Long unbroken tokens in the ACF content (emails, URLs) would otherwise
	 * force horizontal overflow on narrow screens. */
	overflow-wrap: break-word;
}
.lcm-detail__prose img {
	max-width: 100%;
	height: auto;
}
/* Vertical rhythm comes from CSS (v2.15.1), so the copy reads well even where the
 * sanitiser removed inline spacing — and authored <br>/blank-line breaks still add
 * their own gaps on top. Restores the spacing lost in the first v2.15.0 pass.
 * !important because the active theme/Elementor zeroes paragraph spacing with a
 * `margin-block: 0` reset at equal specificity; these are scoped to our prose
 * container only, so overriding is safe (v2.15.2). */
.lcm-detail__prose p {
	margin: 0 0 1em !important;
}
.lcm-detail__prose p:last-child {
	margin-bottom: 0 !important;
}
.lcm-detail__prose ul,
.lcm-detail__prose ol {
	margin: 0 0 1em !important;
	padding-left: 1.3em;
}
.lcm-detail__prose li {
	margin-bottom: 0.35em !important;
}
.lcm-detail__prose h2,
.lcm-detail__prose h3,
.lcm-detail__prose h4 {
	margin: 1.25em 0 0.5em !important;
}

/* ── Videos ── */
.lcm-detail__video-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
	gap: 24px;
}
.lcm-detail__video-title {
	margin: 0 0 10px;
	font-size: 1.05rem;
	color: var(--lcm-navy);
}
.lcm-detail__video-frame {
	position: relative;
	aspect-ratio: 16 / 9;
	border-radius: 8px;
	overflow: hidden;
	background: #000;
}
.lcm-detail__video-frame iframe {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	border: 0;
}
.lcm-detail__video-link {
	color: var(--lcm-red);
	font-weight: 600;
	text-decoration: none;
}
.lcm-detail__video-link:hover,
.lcm-detail__video-link:focus {
	text-decoration: underline;
}

/* ── Responsive ── */
@media ( max-width: 900px ) {
	.lcm-detail__top {
		grid-template-columns: minmax(0, 1fr);
	}
	.lcm-detail__body {
		grid-template-columns: minmax(0, 1fr);
		gap: 24px;
	}
	.lcm-detail__body .lcm-detail__section + .lcm-detail__section {
		margin-top: 0;
	}
}

@media ( max-width: 520px ) {
	.lcm-detail__specs {
		grid-template-columns: 1fr;
	}
	.lcm-detail__thumb {
		width: calc( ( 100% - 24px ) / 4 );
	}
	.lcm-detail__title {
		font-size: 1.5rem;
	}
	.lcm-detail__cta {
		flex: 1 1 100%;
		text-align: center;
	}
}

/* ── Print: strip the chrome, keep the key info + one main image ── */
@media print {
	#wpadminbar,
	header,
	footer,
	.elementor-location-header,
	.elementor-location-footer,
	.lcm-detail__breadcrumbs,
	.lcm-detail__carousel,
	.lcm-detail__badges,
	.lcm-detail__actions,
	.lcm-detail__videos {
		display: none !important;
	}

	.lcm-detail {
		max-width: none;
		margin: 0;
		padding: 0;
		color: #000;
	}
	.lcm-detail__top,
	.lcm-detail__body {
		display: block;
	}
	.lcm-detail__media,
	.lcm-detail__summary,
	.lcm-detail__section {
		width: 100%;
		margin-top: 0;
	}
	.lcm-detail__main {
		aspect-ratio: auto;
		max-height: 8cm;
		margin-bottom: 12px;
	}
	.lcm-detail__main img {
		width: auto;
		max-width: 100%;
		max-height: 8cm;
		height: auto;
		object-fit: contain;
	}
	.lcm-detail__title,
	.lcm-detail__price,
	.lcm-detail__price--sale .lcm-detail__price-now,
	.lcm-detail__heading {
		color: #000;
	}
	.lcm-detail__specs {
		border-color: #999;
	}
	.lcm-detail__spec {
		border: 1px solid #999;
	}
	.lcm-detail__section,
	.lcm-detail__specs,
	.lcm-detail__spec {
		break-inside: avoid;
		page-break-inside: avoid;
	}
}
