/* Home page spotlight carousel — [im_featured_inventory layout="spotlight"] */

.im-spotlight {
	--im-spot-per-page: 4;
	--im-spot-gap: 1.5rem;
}

.im-spotlight__track {
	/* Keeps the off-screen cards' absolutely positioned screen-reader text
	   inside this scroller instead of widening the whole page. */
	position: relative;
	display: grid;
	grid-auto-flow: column;
	grid-auto-columns: calc((100% - (var(--im-spot-per-page) - 1) * var(--im-spot-gap)) / var(--im-spot-per-page));
	gap: var(--im-spot-gap);
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	scrollbar-width: none;
}

.im-spotlight__track::-webkit-scrollbar {
	display: none;
}

.im-spot-card {
	display: flex;
	flex-direction: column;
	min-width: 0;
	scroll-snap-align: start;
	background: var(--wp--preset--color--charcoal-card);
	border-radius: 4px;
	overflow: hidden;
	color: var(--wp--preset--color--text);
	text-decoration: none;
}

.im-spot-card:hover .im-spot-card__title {
	color: var(--wp--preset--color--primary);
}

.im-spot-card__img {
	display: block;
	width: 100%;
	aspect-ratio: 3 / 2;
	object-fit: cover;
}

.im-spot-card__stats {
	display: flex;
	justify-content: space-between;
	gap: 1rem;
	padding: 0.4rem 0.5rem;
	background: var(--wp--preset--color--charcoal-bar);
	font-size: 0.875rem;
	font-weight: 500;
	line-height: 1.5;
}

.im-spot-card__stat {
	display: inline-flex;
	align-items: center;
	gap: 0.3rem;
}

.im-spot-card__stat svg {
	width: 1rem;
	height: 1rem;
	fill: currentColor;
}

.im-spot-card__body {
	display: flex;
	flex-direction: column;
	gap: 0.35rem;
	flex: 1 1 auto;
	padding: 1rem;
	border-bottom: 1px solid var(--wp--preset--color--charcoal-rule);
}

.im-spot-card__title {
	font-size: 1.125rem;
	font-weight: 500;
	line-height: 1.3;
	transition: color 150ms ease;
}

.im-spot-card__trim {
	min-height: 1.3em;
	font-size: 0.8125rem;
	line-height: 1.3;
	color: var(--wp--preset--color--text-muted);
}

.im-spot-card__foot {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 0.35rem 0.85rem;
	padding: 0.85rem 1rem;
	font-size: 0.875rem;
	font-weight: 500;
	line-height: 1.4;
}

.im-spot-card__year {
	padding: 0.2rem 0.65rem;
	border-radius: 10px;
	background: var(--wp--preset--color--primary);
	color: var(--wp--preset--color--text);
}

.im-spot-card__spec {
	color: var(--wp--preset--color--text-muted);
}

.im-spot-card__price {
	margin-left: auto;
	font-size: 1rem;
	font-weight: 700;
	color: var(--wp--preset--color--primary);
}

.im-spotlight__nav {
	display: flex;
	justify-content: center;
	gap: 2.5rem;
	margin-top: 1.5rem;
}

.im-spotlight__nav[hidden] {
	display: none;
}

.im-spotlight__arrow {
	display: inline-flex;
	padding: 0.25rem;
	background: none;
	border: 0;
	cursor: pointer;
	color: var(--wp--preset--color--primary);
	transition: color 150ms ease;
}

.im-spotlight__arrow:hover {
	color: var(--wp--preset--color--primary-hover);
}

.im-spotlight__arrow svg {
	width: 2rem;
	height: 2rem;
	fill: none;
	stroke: currentColor;
	stroke-width: 2.5;
	stroke-linecap: round;
	stroke-linejoin: round;
}

@media (max-width: 1199px) {
	.im-spotlight {
		--im-spot-per-page: 3;
	}
}

@media (max-width: 899px) {
	.im-spotlight {
		--im-spot-per-page: 2;
		--im-spot-gap: 1rem;
	}
}

@media (max-width: 599px) {
	.im-spotlight {
		--im-spot-per-page: 1;
	}
}
