/* LCM Search Results — results grid. Theme-neutral, responsive. */

.lcm-results {
	--lcm-navy: #28306f;
	--lcm-red:  #cc2229;
	--lcm-blue: #1e73be;
}

/* Awning & shop results: breathing room between the filter bar above and the sort row. */
.lcm-results--awning,
.lcm-results--shop-item {
	padding-top: 28px;
}

/* Mobile: a little horizontal breathing room so the grid/cards aren't tight to
   the screen edges (Richard, msg 572). Vehicle results page only; desktop and
   tablet spacing untouched. The page container already gives ~5px at the edge,
   so this brings the content in to ~17px. */
@media ( max-width: 600px ) {
	.lcm-results:not( .lcm-results--awning ):not( .lcm-results--shop-item ) {
		padding-left: 12px;
		padding-right: 12px;
	}
}

.lcm-results__head {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin: 0 0 16px;
}

.lcm-results__summary {
	display: flex;
	align-items: center;
	gap: 14px;
	flex-wrap: wrap;
}

.lcm-results__count {
	font-weight: 600;
	margin: 0;
	color: var(--lcm-navy);
}

.lcm-results__clear {
	font-size: 0.85rem;
	font-weight: 600;
	color: var(--lcm-red);
	text-decoration: none;
	border-bottom: 1px solid currentColor;
	line-height: 1.2;
}

.lcm-results__clear:hover {
	color: #a81b21;
}

.lcm-results__sort {
	display: flex;
	align-items: center;
	gap: 8px;
}

.lcm-results__sort-label {
	font-size: 0.85rem;
	font-weight: 600;
	color: var(--lcm-navy);
	text-transform: uppercase;
	letter-spacing: 0.03em;
}

.lcm-results__sort select {
	padding: 8px 30px 8px 12px;
	border: 1px solid #d8d8de;
	border-radius: 4px;
	background-color: #fff;
	color: #1a1a1a;
	font-size: 0.9rem;
	line-height: 1.2;
	appearance: none;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%2328306f' d='M6 8L0 0h12z'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 10px center;
	cursor: pointer;
}

.lcm-results__sort select:focus {
	outline: none;
	border-color: var(--lcm-red);
	box-shadow: 0 0 0 2px rgba(204, 34, 41, 0.25);
}

.lcm-results__sort-btn {
	padding: 8px 14px;
	border: none;
	border-radius: 4px;
	background: var(--lcm-navy);
	color: #fff;
	font-weight: 600;
	cursor: pointer;
}

.lcm-results__controls {
	display: flex;
	align-items: center;
	gap: 16px;
	flex-wrap: wrap;
}

.lcm-results__view {
	display: flex;
	align-items: center;
	gap: 6px;
}

.lcm-results__view-label {
	font-size: 0.85rem;
	font-weight: 600;
	color: var(--lcm-navy);
	text-transform: uppercase;
	letter-spacing: 0.03em;
}

.lcm-results__view-btn {
	padding: 7px 12px;
	border: 1px solid #d8d8de;
	border-radius: 4px;
	background: #fff;
	color: var(--lcm-navy);
	font-size: 0.85rem;
	font-weight: 600;
	line-height: 1;
	cursor: pointer;
	text-decoration: none !important;
}

.lcm-results__view-btn:hover,
.lcm-results__view-btn:focus {
	border-color: var(--lcm-navy);
	outline: none;
}

.lcm-results__view-btn.is-active {
	background: var(--lcm-navy);
	border-color: var(--lcm-navy);
	color: #fff;
}

/* The 4-col option only changes the desktop layout; hide it on phones where the
 * grid is always a single column so the control isn't misleading. */
@media ( max-width: 600px ) {
	.lcm-results__view {
		display: none;
	}
}

/* Collapsible refine panel (native <details>). The summary is the toggle header;
 * the refine bar is the panel. Outer spacing lives on the wrapper so the two read
 * as one unit when open and the toggle keeps its gap from the panel above. */
.lcm-results__filters {
	margin: 10px 0 20px;
}

.lcm-results__filters-toggle {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 11px 16px;
	background: #f7f7f9;
	border: 1px solid #e4e4e4;
	border-radius: 6px;
	cursor: pointer;
	font-size: 0.85rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.03em;
	color: var(--lcm-navy);
	list-style: none;
	-webkit-user-select: none;
	user-select: none;
}

/* Hide the browser's default disclosure triangle (we draw our own chevron). */
.lcm-results__filters-toggle::-webkit-details-marker {
	display: none;
}
.lcm-results__filters-toggle::marker {
	content: "";
}

.lcm-results__filters-toggle:focus-visible {
	outline: none;
	border-color: var(--lcm-red);
	box-shadow: 0 0 0 2px rgba(204, 34, 41, 0.25);
}

.lcm-results__filters-chevron {
	margin-left: auto;
	width: 0;
	height: 0;
	border-left: 5px solid transparent;
	border-right: 5px solid transparent;
	border-top: 6px solid var(--lcm-navy);
	transition: transform 0.15s ease;
}

.lcm-results__filters[open] .lcm-results__filters-chevron {
	transform: rotate(180deg);
}

/* When open, merge the summary and refine bar into one seamless panel. */
.lcm-results__filters[open] .lcm-results__filters-toggle {
	border-bottom-left-radius: 0;
	border-bottom-right-radius: 0;
	margin-bottom: -1px;
}

.lcm-results__refine {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	gap: 12px;
	margin: 0;
	padding: 16px;
	background: #f7f7f9;
	border: 1px solid #e4e4e4;
	border-radius: 6px;
}

.lcm-results__filters[open] .lcm-results__refine {
	border-top-left-radius: 0;
	border-top-right-radius: 0;
}

.lcm-results__refine-label {
	align-self: center;
	font-size: 0.85rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.03em;
	color: var(--lcm-navy);
}

.lcm-results__refine-field {
	display: flex;
	flex-direction: column;
	gap: 5px;
	flex: 1 1 160px;
	min-width: 0;
}

.lcm-results__refine-field label {
	font-size: 0.75rem;
	font-weight: 600;
	letter-spacing: 0.03em;
	text-transform: uppercase;
	color: var(--lcm-navy);
}

.lcm-results__refine-field select {
	width: 100%;
	padding: 9px 30px 9px 12px;
	border: 1px solid #d8d8de;
	border-radius: 4px;
	background-color: #fff;
	color: #1a1a1a;
	font-size: 0.9rem;
	line-height: 1.2;
	appearance: none;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%2328306f' d='M6 8L0 0h12z'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 10px center;
	cursor: pointer;
}

.lcm-results__refine-field input[type="search"],
.lcm-results__refine-field input[type="text"] {
	width: 100%;
	padding: 9px 12px;
	border: 1px solid #d8d8de;
	border-radius: 4px;
	background-color: #fff;
	color: #1a1a1a;
	font-size: 0.9rem;
	line-height: 1.2;
	appearance: none;
}

.lcm-results__refine-field select:focus,
.lcm-results__refine-field input[type="search"]:focus,
.lcm-results__refine-field input[type="text"]:focus {
	outline: none;
	border-color: var(--lcm-red);
	box-shadow: 0 0 0 2px rgba(204, 34, 41, 0.25);
}

/* An empty facet still renders, shown as a muted, non-interactive "None available"
 * control rather than being hidden. */
.lcm-results__refine-field select:disabled {
	color: #8a8d94;
	background-color: #f1f1f3;
	cursor: not-allowed;
	opacity: 1;
}

.lcm-results__refine-field--price {
	flex: 1 1 220px;
}

.lcm-price-range__inputs {
	display: flex;
	align-items: center;
	gap: 8px;
}

.lcm-price-range__num {
	width: 100%;
	min-width: 0;
	padding: 9px 10px;
	border: 1px solid #d8d8de;
	border-radius: 4px;
	background-color: #fff;
	color: #1a1a1a;
	font-size: 0.9rem;
	line-height: 1.2;
}

.lcm-price-range__num:focus {
	outline: none;
	border-color: var(--lcm-red);
	box-shadow: 0 0 0 2px rgba(204, 34, 41, 0.25);
}

.lcm-price-range__dash {
	color: #8a8a92;
}

/* JS enhanced: hide the raw number inputs, show the slider. */
.lcm-price-range--enhanced .lcm-price-range__inputs {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
}

.lcm-price-range__ui {
	display: block;
}

.lcm-price-range__out {
	display: block;
	margin: 0 0 8px;
	font-size: 0.9rem;
	font-weight: 700;
	color: var(--lcm-navy);
}

.lcm-price-range__slider {
	position: relative;
	height: 22px;
}

.lcm-price-range__track,
.lcm-price-range__fill {
	position: absolute;
	top: 50%;
	height: 4px;
	border-radius: 2px;
	transform: translateY(-50%);
}

.lcm-price-range__track {
	left: 0;
	right: 0;
	background: #d8d8de;
}

.lcm-price-range__fill {
	background: var(--lcm-navy);
}

.lcm-price-range__thumb {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 22px;
	margin: 0;
	background: none;
	pointer-events: none;
	-webkit-appearance: none;
	appearance: none;
}

.lcm-price-range__thumb::-webkit-slider-runnable-track {
	background: none;
	height: 22px;
}

.lcm-price-range__thumb::-moz-range-track {
	background: none;
	height: 22px;
}

.lcm-price-range__thumb::-webkit-slider-thumb {
	-webkit-appearance: none;
	appearance: none;
	pointer-events: auto;
	width: 18px;
	height: 18px;
	border-radius: 50%;
	background: #fff;
	border: 2px solid var(--lcm-navy);
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
	cursor: pointer;
}

.lcm-price-range__thumb::-moz-range-thumb {
	pointer-events: auto;
	width: 18px;
	height: 18px;
	border-radius: 50%;
	background: #fff;
	border: 2px solid var(--lcm-navy);
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
	cursor: pointer;
}

.lcm-price-range__thumb:focus {
	outline: none;
}

.lcm-price-range__thumb:focus::-webkit-slider-thumb {
	border-color: var(--lcm-red);
	box-shadow: 0 0 0 3px rgba(204, 34, 41, 0.25);
}

.lcm-price-range__thumb:focus::-moz-range-thumb {
	border-color: var(--lcm-red);
	box-shadow: 0 0 0 3px rgba(204, 34, 41, 0.25);
}

@media ( max-width: 600px ) {
	.lcm-results__refine-field {
		flex: 1 1 100%;
	}
}

@media ( max-width: 600px ) {
	.lcm-results__head {
		flex-direction: column;
		align-items: stretch;
	}
	.lcm-results__sort {
		justify-content: space-between;
	}
}

.lcm-results__grid {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 20px;
}

.lcm-results__grid--cols-2 {
	grid-template-columns: repeat(2, 1fr);
}

.lcm-results__grid--cols-4 {
	grid-template-columns: repeat(4, 1fr);
}

/* Tablet: the 4-col view steps down to 2 so cards stay legible. */
@media ( max-width: 900px ) {
	.lcm-results__grid--cols-4 {
		grid-template-columns: repeat(2, 1fr);
	}
}

/* Mobile: always a single column, whatever desktop view is chosen. */
@media ( max-width: 600px ) {
	.lcm-results__grid,
	.lcm-results__grid--cols-2,
	.lcm-results__grid--cols-4 {
		grid-template-columns: 1fr;
	}
}

.lcm-card {
	display: flex;
	flex-direction: column;
	background: #fff;
	border: 1px solid #e4e4e4;
	border-radius: 6px;
	overflow: hidden;
	text-decoration: none;
	color: inherit;
	transition: box-shadow 0.2s, transform 0.1s;
}

.lcm-card:hover {
	box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
	transform: translateY(-2px);
}

.lcm-card__media {
	position: relative;
	aspect-ratio: 4 / 3;
	background: #f2f2f4;
	overflow: hidden;
}

/* Image carousel: slides stacked, dots page between them (Richard, msg 566).
   Replaces the old hover-swap-to-interior behaviour. */
.lcm-card__slides {
	position: absolute;
	inset: 0;
}

.lcm-card__slide {
	position: absolute;
	inset: 0;
	opacity: 0;
	transition: opacity 0.3s ease;
}

.lcm-card__slide.is-active {
	opacity: 1;
}

.lcm-card__slide img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.lcm-card__dots {
	position: absolute;
	bottom: 8px;
	left: 0;
	right: 0;
	z-index: 3;
	display: flex;
	justify-content: center;
	gap: 6px;
	padding: 0 8px;
}

/* Scope + !important to beat the theme styling bare <button> brand-red. */
.lcm-card .lcm-card__dot {
	width: 9px;
	height: 9px;
	padding: 0;
	margin: 0;
	border: 0 !important;
	border-radius: 50% !important;
	background: rgba(255, 255, 255, 0.55) !important;
	box-shadow: 0 0 2px rgba(0, 0, 0, 0.45);
	cursor: pointer;
	transition: background 0.2s, transform 0.2s;
	-webkit-appearance: none;
	appearance: none;
}

.lcm-card .lcm-card__dot:hover {
	background: rgba(255, 255, 255, 0.85) !important;
}

.lcm-card .lcm-card__dot.is-active {
	background: #fff !important;
	transform: scale(1.25);
}

.lcm-card__badges {
	position: absolute;
	top: 10px;
	left: 10px;
	z-index: 2;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 6px;
}

.lcm-card__badge {
	padding: 4px 10px;
	color: #fff;
	font-size: 0.72rem;
	font-weight: 700;
	letter-spacing: 0.05em;
	text-transform: uppercase;
	border-radius: 3px;
}

.lcm-card__badge--sale {
	background: var(--lcm-red);
}

.lcm-card__badge--reserved {
	background: #8b1a1a; /* deeper brick red, distinct from brand red */
}

/* Order Now badge: yellow background with dark-grey text (distinct from Reserved). */
.lcm-card__badge--order-now {
	background: #ffd200;
	color: #444;
}

.lcm-card__badge--coming-soon {
	background: var(--lcm-navy);
}

.lcm-card__badge--just-arrived {
	background: var(--lcm-blue);
}

.lcm-card__promo {
	margin: 0 0 10px;
	padding: 6px 10px;
	background: #fdeef0;
	border-left: 3px solid var(--lcm-red);
	border-radius: 3px;
	color: var(--lcm-navy);
	font-size: 0.8rem;
	font-weight: 600;
	line-height: 1.3;
}

.lcm-card__media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.lcm-card__placeholder {
	width: 100%;
	height: 100%;
	background: repeating-linear-gradient(45deg, #ececed, #ececed 10px, #f5f5f6 10px, #f5f5f6 20px);
}

.lcm-card__body {
	padding: 14px 16px;
}

.lcm-card__title {
	font-size: 1.05rem;
	margin: 0 0 6px;
	color: var(--lcm-navy);
	line-height: 1.3;
}

.lcm-card__price {
	margin: 0 0 6px;
	font-size: 1.1rem;
	font-weight: 700;
	color: var(--lcm-red);
}

.lcm-card__price--poa {
	color: var(--lcm-red);
}

.lcm-card__price--reserved {
	color: #8b1a1a; /* deeper brick red, distinct from brand red */
}

.lcm-card__price-was {
	color: #999;
	font-weight: 500;
	text-decoration: line-through;
	margin-right: 6px;
}

.lcm-card__price-now {
	color: var(--lcm-red);
}

.lcm-card__specs {
	list-style: none;
	margin: 0 0 10px;
	padding: 0;
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 4px 14px;
}

.lcm-card__spec {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 8px;
	font-size: 0.8rem;
	/* Integer-pixel line-height + padding so each spec row box is a whole
	   number of pixels high. Fractional row heights (the old 1.3 × 0.8rem =
	   16.64px) made consecutive dividers land on different sub-pixel offsets,
	   so one 1px hairline rasterised crisp/dark while the next blurred — the
	   "one row black, one grey" look. Whole-pixel rows keep every divider on
	   the same offset within a card, rendering them uniformly. */
	line-height: 17px;
	border-bottom: 1px solid #f0f0f2;
	padding-bottom: 4px;
}

/* Lock the spec divider to the SAME light grey hairline in every card state
   (rest, hover, focus, active) and every card variant (Sale / Reserved /
   Order Now / first row). The full border shorthand is pinned with
   !important at high specificity so no reset or theme rule can swap the
   width, style, or (crucially) let the colour fall back to the card's
   currentColor (#333) — which is what read as "black". */
.lcm-results .lcm-card .lcm-card__spec,
.lcm-results .lcm-card:hover .lcm-card__spec,
.lcm-results .lcm-card:focus .lcm-card__spec,
.lcm-results .lcm-card:active .lcm-card__spec,
.lcm-card .lcm-card__spec,
.lcm-card:hover .lcm-card__spec,
.lcm-card:focus .lcm-card__spec,
.lcm-card:active .lcm-card__spec {
	border-bottom: 1px solid #f0f0f2 !important;
}

.lcm-card__spec-label {
	color: #8a8a92;
	text-transform: uppercase;
	letter-spacing: 0.02em;
	font-size: 0.68rem;
	font-weight: 700;
}

.lcm-card__spec-value {
	color: var(--lcm-navy);
	font-weight: 600;
	text-align: right;
}

.lcm-card__meta {
	margin: 0;
	font-size: 0.85rem;
	color: #666;
}

.lcm-results .lcm-card,
.lcm-results .lcm-card:link,
.lcm-results .lcm-card:visited,
.lcm-results .lcm-card:hover,
.lcm-results .lcm-card:focus,
.lcm-results .lcm-card:active,
.lcm-card__title,
.lcm-card__price,
.lcm-card__meta,
.lcm-card__spec,
.lcm-card__promo {
	text-decoration: none !important;
}

.lcm-results__empty {
	text-align: center;
	padding: 48px 20px;
	background: #f7f7f9;
	border: 1px dashed #cfcfd6;
	border-radius: 6px;
}

.lcm-results__empty-title {
	font-size: 1.2rem;
	font-weight: 700;
	color: var(--lcm-navy);
	margin: 0 0 6px;
}

.lcm-results__empty-text {
	margin: 0;
	color: #666;
}

.lcm-results__empty-text a {
	color: var(--lcm-red);
	font-weight: 600;
}

.lcm-results__pagination {
	margin-top: 28px;
}

.lcm-results__pagination ul {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	list-style: none;
	padding: 0;
	margin: 0;
	justify-content: center;
}

.lcm-results__pagination a,
.lcm-results__pagination span {
	display: inline-block;
	padding: 8px 13px;
	border: 1px solid #d8d8de;
	border-radius: 4px;
	text-decoration: none;
	color: var(--lcm-navy);
	line-height: 1;
}

.lcm-results__pagination .current {
	background: var(--lcm-navy);
	border-color: var(--lcm-navy);
	color: #fff;
}
