.ma-featured-inventory {
	padding: 70px 24px;
	background-color: #ffffff;
	margin: 0px !important;
	position: relative;
	background-size: cover;
	background-position: center;
	background-repeat: no-repeat;
}

/* Incoming and Sold sit back-to-back with the sections above them (Available
   Stock, Incoming), so they don't need the same full 70px of breathing room
   on top that a section opening straight off the hero does. */
.ma-incoming-inventory,
.ma-sold-vehicles {
	padding-top: 40px;
}

.ma-featured-inventory.has-background-image::before {
	content: "";
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.45);
}

/* Base .ma-featured-inventory__eyebrow / __heading styles live in the
   theme's main style.css (not here), since these classes are now a shared
   section-header pattern reused on plain pages (About, Contact) that don't
   include this block — this stylesheet only loads when the block itself is
   present, so anything needed sitewide can't live only in here. */

.ma-featured-inventory.has-background-image > * {
	position: relative;
	z-index: 1;
}

/* Only when a background photo (+ dark overlay) is actually set does the
   heading need to flip to light text — the default (no image) background
   is plain white, so it keeps the standard dark heading / red eyebrow. */
.ma-featured-inventory.has-background-image .ma-featured-inventory__eyebrow {
	color: #D2232A;
}

.ma-featured-inventory.has-background-image .ma-featured-inventory__heading {
	color: #ffffff;
}

.ma-featured-inventory__carousel {
	position: relative;
	max-width: 1500px;
	margin: 0 auto;
}

.ma-featured-inventory__footer {
	text-align: center;
	max-width: 1500px;
	margin: 32px auto 0;
}

.ma-featured-inventory__see-all {
	display: inline-block;
	color: #3d3636;
	font-weight: 600;
	text-decoration: none;
	white-space: nowrap;
}

.ma-featured-inventory.has-background-image .ma-featured-inventory__see-all {
	color: #ffffff;
}

.ma-featured-inventory__see-all:hover {
	text-decoration: underline;
}

.ma-featured-inventory__track {
	display: flex;
	gap: 16px;
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	padding-bottom: 8px;
	scrollbar-width: none;
}

.ma-featured-inventory__track::-webkit-scrollbar {
	display: none;
}

/* Available Stock only (not the shared .ma-incoming-inventory or
   .ma-sold-vehicles instances of this same block/markup, which both keep
   their horizontal carousel) — since the homepage now opens straight on
   this section on mobile (hero + info blocks hidden above), it shows a
   static 2-column grid instead of requiring a horizontal swipe to see more
   than one car at a time. */
@media (max-width: 767px) {
	.ma-featured-inventory:not(.ma-incoming-inventory):not(.ma-sold-vehicles) .ma-featured-inventory__track {
		display: grid;
		grid-template-columns: repeat(2, 1fr);
		gap: 12px;
		overflow-x: visible;
	}

	.ma-featured-inventory:not(.ma-incoming-inventory):not(.ma-sold-vehicles) .ma-vehicle-card {
		flex: none;
		width: auto;
		/* Grid items default to min-width:auto, which uses the content's
		   natural minimum size (image, unbreakable price text, etc.)
		   instead of actually shrinking to fit the 1fr column — without
		   this, the second card overflows off-screen rather than resizing
		   down, leaving only a sliver of it visible. */
		min-width: 0;
	}

	.ma-featured-inventory:not(.ma-incoming-inventory):not(.ma-sold-vehicles) .ma-vehicle-card__media img {
		height: 130px;
	}

	/* Cap the mobile grid at 4 cars (a full 2x2) — the block still queries
	   its usual 8, so this just hides the rest; "View All Stock" below
	   remains the way to see the full list. */
	.ma-featured-inventory:not(.ma-incoming-inventory):not(.ma-sold-vehicles) .ma-vehicle-card:nth-child(n + 5) {
		display: none;
	}

	.ma-featured-inventory:not(.ma-incoming-inventory):not(.ma-sold-vehicles) .ma-featured-inventory__nav {
		display: none;
	}

	.ma-featured-inventory {
		padding-left: 16px;
		padding-right: 16px;
	}
}

.ma-vehicle-card {
	flex: 0 0 230px;
	scroll-snap-align: start;
	border: 1px solid #e5e5e5;
	border-radius: 10px;
	overflow: hidden;
	background: #fff;
	display: flex;
	flex-direction: column;
}

.ma-vehicle-card__media {
	position: relative;
}

.ma-vehicle-card__media img {
	width: 100%;
	height: 180px;
	object-fit: cover;
	display: block;
}

.ma-vehicle-card__badge {
	position: absolute;
	top: 12px;
	padding: 4px 10px;
	font-size: 11px;
	font-weight: 700;
	font-family: var(--wp--preset--font-family--oswald);
	text-transform: uppercase;
	color: #fff;
	background: #D2232A;
	border-radius: 4px;
	letter-spacing: 0.5px;
}

.ma-vehicle-card__badge--featured,
.ma-vehicle-card__badge--arriving,
.ma-vehicle-card__badge--sold {
	left: 12px;
}

.ma-vehicle-card__badge--sale {
	right: 12px;
}

/* Muted, slightly desaturated photo signals "no longer available" at a
   glance without needing to read the badge first. */
.ma-vehicle-card--sold .ma-vehicle-card__media img {
	filter: grayscale(60%);
	opacity: 0.75;
}

.ma-vehicle-card__body {
	padding: 18px;
	display: flex;
	flex-direction: column;
	flex: 1;
}

.ma-vehicle-card__title {
	display: block;
	color: #1a1a1a;
	font-family: var(--wp--preset--font-family--oswald);
	font-weight: 600;
	text-transform: uppercase;
	font-size: 1rem;
	letter-spacing: 0.02em;
	text-decoration: none;
	margin-bottom: 4px;
}

.ma-vehicle-card__title:hover {
	color: #D2232A;
}

.ma-vehicle-card__spec-line {
	color: #7a7a7a;
	font-size: 0.85rem;
	margin: 0 0 8px;
}

.ma-vehicle-card__meta {
	display: flex;
	flex-wrap: wrap;
	gap: 4px 14px;
	color: #5a5a5a;
	font-size: 0.82rem;
	margin-bottom: 14px;
}

.ma-vehicle-card__footer {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	margin-top: auto;
	padding-top: 10px;
	border-top: 1px solid #eee;
	margin-bottom: 14px;
}

.ma-vehicle-card__price {
	display: flex;
	align-items: baseline;
	gap: 8px;
}

.ma-vehicle-card__price-current {
	color: #D2232A;
	font-weight: 800;
	font-size: 1.3rem;
}

.ma-vehicle-card__price-regular {
	color: #9a9a9a;
	text-decoration: line-through;
	font-size: 0.9rem;
}

.ma-vehicle-card__stock {
	color: #16A34A;
	font-weight: 700;
	font-size: 0.75rem;
	text-transform: uppercase;
	letter-spacing: 0.03em;
}

.ma-vehicle-card__eta {
	color: #D2232A;
	font-weight: 700;
	font-size: 0.85rem;
}

.ma-vehicle-card__sold-label {
	color: #5a5a5a;
	font-weight: 700;
	font-size: 0.75rem;
	text-transform: uppercase;
	letter-spacing: 0.03em;
}

.ma-vehicle-card__button {
	display: block;
	text-align: center;
	background: #D2232A;
	color: #ffffff;
	font-weight: 700;
	font-size: 0.85rem;
	text-transform: uppercase;
	letter-spacing: 0.03em;
	text-decoration: none;
	padding: 11px 16px;
	border-radius: 999px;
	transition: background-color 0.2s ease;
}

.ma-vehicle-card__button:hover {
	background: #A81B22;
	color: #ffffff;
}

.ma-vehicle-card__button--outline {
	background: transparent;
	color: #D2232A;
	border: 1.5px solid #D2232A;
}

.ma-vehicle-card__button--outline:hover {
	background: #D2232A;
	color: #ffffff;
}

.ma-featured-inventory__nav {
	position: absolute;
	top: 35%;
	width: 36px;
	height: 36px;
	border-radius: 50%;
	border: 1px solid #ddd;
	background: #fff;
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 20px;
	line-height: 1;
	cursor: pointer;
	z-index: 2;
}

.ma-featured-inventory__prev {
	left: -18px;
}

.ma-featured-inventory__next {
	right: -18px;
}

.ma-featured-inventory__empty {
	text-align: center;
	color: #777;
	width: 100%;
}

.ma-featured-inventory.has-background-image .ma-featured-inventory__empty {
	color: #ffffff;
}
