/**
 * HG Automotive — premium vehicle listing cards (list + grid).
 *
 * @package HG_Automotive
 * @since 0.2.0
 * @updated 0.44.96
 */

.hg-auto-badge--success {
	background: #ecfdf3;
	color: var(--hg-auto-color-success);
}

.hg-auto-badge--warning {
	background: #fffaeb;
	color: var(--hg-auto-color-warning);
}

.hg-auto-badge--neutral {
	background: #f2f4f7;
	color: var(--hg-auto-color-steel);
}

.hg-auto-badge--muted {
	background: #f8fafc;
	color: var(--hg-auto-color-muted);
}

.hg-auto-badge--outline,
.hg-auto-badge--condition {
	background: #f2f4f7;
	border: 1px solid var(--hg-auto-color-border);
	color: var(--hg-auto-color-steel);
}

.hg-auto-badge--large {
	font-size: 0.875rem;
	padding: 0.35rem 0.75rem;
}

.hg-auto-vehicle-card {
	--hg-card-media-ratio: 4 / 3;
	position: relative;
	display: flex;
	flex-direction: column;
	max-width: 100%;
	min-width: 0;
	background: var(--hg-auto-color-surface-elevated);
	border: 1px solid var(--hg-auto-color-border);
	border-radius: var(--hg-auto-radius);
	overflow: hidden;
	box-shadow: var(--hg-auto-shadow);
	transition:
		box-shadow var(--hg-auto-transition, 160ms ease),
		transform var(--hg-auto-transition, 160ms ease),
		border-color var(--hg-auto-transition, 160ms ease);
}

.hg-auto-vehicle-card--featured {
	border-color: color-mix(in srgb, var(--hg-auto-color-accent) 42%, var(--hg-auto-color-border));
}

@media (hover: hover) and (pointer: fine) {
	.hg-auto-vehicle-card:hover {
		box-shadow: var(--hg-auto-shadow-hover, var(--hg-auto-shadow));
		transform: translateY(-2px);
		border-color: var(--hg-auto-color-border-strong, var(--hg-auto-color-border));
	}

	.hg-auto-vehicle-card:hover .hg-auto-vehicle-card__image {
		transform: scale(1.03);
	}
}

@media (prefers-reduced-motion: reduce) {
	.hg-auto-vehicle-card,
	.hg-auto-vehicle-card__image {
		transition: none;
	}

	.hg-auto-vehicle-card:hover {
		transform: none;
	}

	.hg-auto-vehicle-card:hover .hg-auto-vehicle-card__image {
		transform: none;
	}
}

/* ——— Media ——— */
.hg-auto-vehicle-card__media-wrap {
	position: relative;
	max-width: 100%;
	min-width: 0;
	overflow: hidden;
	background: linear-gradient(145deg, #e4e9ef, #d7dde6);
}

.hg-auto-vehicle-card__media {
	display: block;
	overflow: hidden;
}

.hg-auto-vehicle-card__image,
.hg-auto-vehicle-card__placeholder {
	width: 100%;
	aspect-ratio: var(--hg-card-media-ratio);
	object-fit: cover;
	height: auto;
	display: block;
	transition: transform 280ms ease;
}

.hg-auto-vehicle-card__placeholder {
	background:
		linear-gradient(145deg, #dfe5ec 0%, #cfd7e1 100%);
}

.hg-auto-vehicle-card__media-badges {
	position: absolute;
	top: 0.65rem;
	left: 0.65rem;
	z-index: 3;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 0.3rem;
	max-width: calc(100% - 3.5rem);
	pointer-events: none;
}

.hg-auto-vehicle-card__promo-badge,
.hg-auto-vehicle-card__new-listing-badge {
	font-weight: 700;
	letter-spacing: 0.03em;
	text-transform: uppercase;
	line-height: 1.2;
}

.hg-auto-vehicle-card__promo-badge {
	padding: 0.28rem 0.55rem;
	border-radius: 0.3rem;
	font-size: 0.6875rem;
	background: var(--hg-auto-color-accent);
	color: #fff;
}

.hg-auto-vehicle-card__new-listing-badge {
	padding: 0.12rem 0.32rem;
	border-radius: 0.2rem;
	font-size: 0.625rem;
	letter-spacing: 0.02em;
	border: 1px solid #99f6e4;
	background: #ecfeff;
	color: #0f766e;
}

.hg-auto-vehicle-card__media-actions {
	position: absolute;
	top: 0.55rem;
	right: 0.55rem;
	z-index: 5;
	display: flex;
	flex-direction: column;
	gap: 0.35rem;
	overflow: visible;
}

.hg-auto-vehicle-card__media-actions .hg-auto-vehicle-card__buyer-actions {
	flex-direction: column;
	gap: 0.35rem;
	padding: 0;
}

.hg-auto-vehicle-card__media-actions .hg-auto-buyer-action--icon {
	position: relative;
	width: 1.875rem;
	min-width: 1.875rem;
	min-height: 1.875rem;
	padding: 0.2rem;
	border-radius: 999px;
	background: rgba(0, 0, 0, 0.45);
	border-color: transparent;
	color: #fff;
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.18);
}

/* Expand hit area to ~44px without enlarging the visible disc. */
.hg-auto-vehicle-card__media-actions .hg-auto-buyer-action--icon::before {
	content: '';
	position: absolute;
	inset: -0.4375rem;
}

.hg-auto-vehicle-card__media-actions .hg-auto-buyer-action--icon .hg-auto-buyer-action__icon {
	width: 1.05rem;
	height: 1.05rem;
}

.hg-auto-vehicle-card__media-actions .hg-auto-buyer-action--icon:hover,
.hg-auto-vehicle-card__media-actions .hg-auto-buyer-action--icon:focus-visible {
	z-index: 2;
	background: rgba(0, 0, 0, 0.55);
	border-color: transparent;
	color: #fff;
}

.hg-auto-vehicle-card__media-actions .hg-auto-buyer-action--icon:focus-visible {
	outline: 2px solid #fff;
	outline-offset: 2px;
}

.hg-auto-vehicle-card__media-actions .hg-auto-buyer-action--favourite.is-active,
.hg-auto-vehicle-card__media-actions .hg-auto-buyer-action--compare.is-active {
	background: rgba(0, 0, 0, 0.6);
	border-color: transparent;
	color: #fff;
}

.hg-auto-vehicle-card__media-actions .hg-auto-buyer-action--favourite.is-active:hover,
.hg-auto-vehicle-card__media-actions .hg-auto-buyer-action--favourite.is-active:focus-visible,
.hg-auto-vehicle-card__media-actions .hg-auto-buyer-action--compare.is-active:hover,
.hg-auto-vehicle-card__media-actions .hg-auto-buyer-action--compare.is-active:focus-visible {
	background: rgba(0, 0, 0, 0.7);
	border-color: transparent;
	color: #fff;
}

/*
 * Keep hover labels inside the card: media-wrap + card use overflow:hidden
 * (image zoom / radius). Labels above or centered would clip at the top/right edge.
 */
.hg-auto-vehicle-card__media-actions .hg-auto-buyer-action--icon .hg-auto-buyer-action__label {
	top: calc(100% + 0.35rem);
	bottom: auto;
	left: auto;
	right: 0;
	z-index: 8;
	transform: translateY(0.15rem);
}

.hg-auto-vehicle-card__media-actions .hg-auto-buyer-action--icon:hover .hg-auto-buyer-action__label,
.hg-auto-vehicle-card__media-actions .hg-auto-buyer-action--icon:focus-visible .hg-auto-buyer-action__label,
.hg-auto-vehicle-card__media-actions .hg-auto-buyer-action--icon[aria-expanded="true"] .hg-auto-buyer-action__label {
	transform: translateY(0);
}

.hg-auto-vehicle-card__image-count {
	position: absolute;
	right: 0.55rem;
	bottom: 0.55rem;
	z-index: 3;
	display: inline-flex;
	align-items: center;
	gap: 0.3rem;
	padding: 0.28rem 0.5rem;
	border-radius: 0.3rem;
	background: rgba(18, 23, 30, 0.72);
	color: #fff;
	font-size: 0.75rem;
	font-weight: 650;
	line-height: 1;
	pointer-events: none;
}

.hg-auto-vehicle-card__image-count-icon {
	display: inline-flex;
}

.hg-auto-vehicle-card__image-count-icon svg {
	display: block;
}

.hg-auto-vehicle-card__thumbs {
	position: relative;
	z-index: 2;
	display: none;
	gap: 0.3rem;
	margin: 0;
	padding: 0.4rem 0.45rem 0.45rem;
	list-style: none;
	background: rgba(18, 23, 30, 0.04);
	border-top: 1px solid rgba(18, 23, 30, 0.06);
	max-width: 100%;
	min-width: 0;
	box-sizing: border-box;
}

.hg-auto-vehicle-card__thumb-item {
	flex: 1 1 0;
	min-width: 0;
}

.hg-auto-vehicle-card__thumb {
	position: relative;
	display: block;
	width: 100%;
	padding: 0;
	border: 0;
	border-radius: 0.3rem;
	overflow: hidden;
	background: #d7dde6;
	cursor: pointer;
	aspect-ratio: 4 / 3;
	opacity: 1;
	outline: none;
	box-shadow: none;
}

.hg-auto-vehicle-card__thumb img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

/* is-active kept for JS image swap; no visual selected/focus chrome. */
.hg-auto-vehicle-card__thumb:focus,
.hg-auto-vehicle-card__thumb:focus-visible,
.hg-auto-vehicle-card__thumb.is-active {
	outline: none;
	box-shadow: none;
}

/* ——— Body ——— */
.hg-auto-vehicle-card__body {
	display: flex;
	flex-direction: column;
	gap: var(--hg-auto-space-3);
	padding: var(--hg-auto-space-4);
	flex: 1 1 auto;
	min-width: 0;
}

.hg-auto-vehicle-card__main {
	display: flex;
	flex-direction: column;
	gap: var(--hg-auto-space-2);
	min-width: 0;
	flex: 1 1 auto;
}

.hg-auto-vehicle-card__top,
.hg-auto-vehicle-card__lower {
	display: flex;
	flex-direction: column;
	gap: var(--hg-auto-space-2);
	min-width: 0;
}

.hg-auto-vehicle-card__identity,
.hg-auto-vehicle-card__pricing {
	display: flex;
	flex-direction: column;
	gap: var(--hg-auto-space-2);
	min-width: 0;
}

.hg-auto-vehicle-card__pricing {
	gap: 0.35rem;
}

.hg-auto-vehicle-card__badges {
	display: flex;
	flex-wrap: wrap;
	gap: 0.35rem;
}

.hg-auto-vehicle-card__badges .hg-auto-badge,
.hg-auto-vehicle-card__badges .hg-trust-badge {
	font-size: 0.6875rem;
	padding: 0.2rem 0.45rem;
	border-radius: 0.25rem;
	font-weight: 650;
	line-height: 1.25;
}

.hg-auto-vehicle-card__badges .hg-trust-badge--featured {
	background: color-mix(in srgb, var(--hg-auto-color-accent) 16%, #fff);
	border-color: color-mix(in srgb, var(--hg-auto-color-accent) 40%, transparent);
	color: var(--hg-auto-color-accent);
}

.hg-auto-vehicle-card__badges .hg-trust-badge--new,
.hg-auto-vehicle-card__badges .hg-trust-badge--recent {
	background: #ecfeff;
	border-color: #99f6e4;
	color: #0f766e;
}

.hg-auto-vehicle-card__title {
	margin: 0;
	font-family: var(--hg-auto-font-sans, var(--hg-auto-font-display));
	font-size: 1.0625rem;
	font-weight: 700;
	line-height: 1.28;
	letter-spacing: -0.02em;
}

/* Line-clamp on inner text so the stretched ::after is not clipped by the title. */
.hg-auto-vehicle-card__title-text {
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

/* Primary permalink: CSS stretched link covers the whole card. */
.hg-auto-vehicle-card .hg-auto-vehicle-card__link {
	color: var(--hg-auto-color-ink);
	text-decoration: none;
}

.hg-auto-vehicle-card .hg-auto-vehicle-card__link::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 1;
}

.hg-auto-vehicle-card .hg-auto-vehicle-card__link:hover,
.hg-auto-vehicle-card .hg-auto-vehicle-card__link:focus-visible {
	color: var(--hg-auto-color-accent);
}

.hg-auto-vehicle-card:has(.hg-auto-vehicle-card__link:focus-visible) {
	border-color: var(--hg-auto-color-accent);
	box-shadow: var(--hg-auto-shadow-hover, var(--hg-auto-shadow));
}

.hg-auto-vehicle-card__variant {
	margin: 0;
	font-size: 0.875rem;
	font-weight: 500;
	color: var(--hg-auto-color-steel);
	line-height: 1.35;
	display: -webkit-box;
	-webkit-line-clamp: 1;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

/* ——— Price ——— */
.hg-auto-vehicle-card__price {
	margin: 0;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 0.2rem;
}

.hg-auto-vehicle-card__price .hg-auto-price-amounts {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 0.45rem 0.65rem;
}

.hg-auto-vehicle-card__price-value,
.hg-auto-vehicle-card__price-sale {
	font-size: 1.375rem;
	font-weight: 750;
	color: var(--hg-color-text);
	letter-spacing: -0.03em;
	line-height: 1.15;
}

.hg-auto-vehicle-card__price.is-on-sale .hg-auto-vehicle-card__price-sale {
	color: var(--hg-color-text);
}

.hg-auto-vehicle-card__price-regular {
	font-size: 0.875rem;
	font-weight: 600;
	color: var(--hg-auto-color-muted);
}

.hg-auto-vehicle-card__price-regular s {
	text-decoration-thickness: 1.5px;
}

.hg-auto-vehicle-card__price .hg-auto-price-labels {
	display: flex;
	flex-wrap: wrap;
	gap: 0.3rem;
}

.hg-auto-vehicle-card .hg-fc-estimate--compact {
	position: relative;
	z-index: 2;
	margin-top: 0.15rem;
	font-size: 0.8125rem;
	color: var(--hg-auto-color-steel);
}

/* ——— Specs ——— */
.hg-auto-vehicle-card__specs {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.35rem 0.85rem;
	row-gap: 0.45rem;
	margin: 0.15rem 0 0;
	padding: 0;
	list-style: none;
	color: var(--hg-auto-color-steel);
	font-size: 0.8125rem;
}

.hg-auto-vehicle-card__spec {
	display: inline-flex;
	align-items: center;
	gap: 0.3rem;
	min-width: 0;
}

.hg-auto-vehicle-card__spec-icon {
	display: inline-flex;
	flex-shrink: 0;
	color: var(--hg-auto-color-muted);
}

.hg-auto-vehicle-card__spec-icon svg {
	display: block;
}

.hg-auto-vehicle-card__spec-value {
	white-space: nowrap;
}

/*
 * All layouts: Condition Rating wraps in the same specs row as Year /
 * Mileage / Transmission / Fuel / Body Type. Prefer wrapping over
 * squeezing; never displaces Body Type (Core card_specs order unchanged).
 */
.hg-auto-vehicle-card--list .hg-auto-vehicle-card__spec--condition_rating,
.hg-auto-vehicle-card--grid .hg-auto-vehicle-card__spec--condition_rating,
.hg-auto-vehicle-card--compact .hg-auto-vehicle-card__spec--condition_rating {
	flex: 0 1 auto;
}

/* ——— Meta / dealer ——— */
.hg-auto-vehicle-card__meta {
	display: flex;
	flex-direction: column;
	gap: 0.15rem;
	margin-top: 0.15rem;
}

.hg-auto-vehicle-card__location,
.hg-auto-vehicle-card__dealer,
.hg-auto-vehicle-card__stock {
	margin: 0;
	font-size: 0.8125rem;
	color: var(--hg-auto-color-muted);
	line-height: 1.35;
}

.hg-auto-vehicle-card__location {
	display: inline-flex;
	align-items: center;
	gap: 0.3rem;
}

.hg-auto-vehicle-card__location-icon {
	display: inline-flex;
	flex-shrink: 0;
}

.hg-auto-vehicle-card__dealer {
	font-weight: 600;
	color: var(--hg-auto-color-steel);
}

.hg-auto-vehicle-card__dealer-link {
	position: relative;
	z-index: 2;
	color: inherit;
	text-decoration: none;
}

.hg-auto-vehicle-card__dealer-link:hover,
.hg-auto-vehicle-card__dealer-link:focus-visible {
	color: var(--hg-auto-color-accent);
}

.hg-auto-vehicle-card__lower .hg-auto-vehicle-card__meta,
.hg-auto-vehicle-card__lower .hg-auto-vehicle-card__dealer-identity {
	margin-top: 0;
	min-width: 0;
}

/* List dealer identity: divider + name/location/reviews | logo|name|private */
.hg-auto-vehicle-card__dealer-identity {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	gap: 0.65rem 1rem;
	align-items: center;
	margin: 0;
	padding-top: 0.65rem;
	border-top: 1px solid var(--hg-auto-color-border);
}

.hg-auto-vehicle-card__dealer-copy {
	display: flex;
	flex-direction: column;
	gap: 0.2rem;
	min-width: 0;
}

.hg-auto-vehicle-card__dealer-mark {
	position: relative;
	z-index: 2;
	display: flex;
	align-items: center;
	justify-content: flex-end;
	flex-shrink: 0;
}

.hg-auto-vehicle-card__logo-link {
	position: relative;
	z-index: 2;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	max-width: 130px;
	max-height: 60px;
	padding: 0.15rem 0.25rem;
	border-radius: 0.25rem;
	text-decoration: none;
	outline-offset: 2px;
}

.hg-auto-vehicle-card__logo-link:focus-visible {
	outline: 2px solid var(--hg-auto-color-accent);
}

.hg-auto-vehicle-card__logo {
	display: block;
	width: auto;
	height: auto;
	max-width: 130px;
	max-height: 56px;
	object-fit: contain;
}

.hg-auto-vehicle-card__name-mark {
	position: relative;
	z-index: 2;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	max-width: 130px;
	min-height: 2.5rem;
	padding: 0.35rem 0.5rem;
	border-radius: 0.25rem;
	text-decoration: none;
	text-align: center;
	outline-offset: 2px;
	color: var(--hg-auto-color-steel);
}

.hg-auto-vehicle-card__name-mark:focus-visible {
	outline: 2px solid var(--hg-auto-color-accent);
}

.hg-auto-vehicle-card__name-mark-text {
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 3;
	overflow: hidden;
	font-size: 0.8125rem;
	font-weight: 650;
	line-height: 1.25;
	color: inherit;
	word-break: break-word;
}

.hg-auto-vehicle-card__private-mark {
	position: relative;
	z-index: 2;
	display: inline-flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 0.2rem;
	min-width: 5.5rem;
	max-width: 8rem;
	min-height: 2.75rem;
	padding: 0.35rem 0.5rem;
	border-radius: 0.3rem;
	background: #f2f4f7;
	color: var(--hg-auto-color-steel);
	text-decoration: none;
	outline-offset: 2px;
}

.hg-auto-vehicle-card__private-mark:focus-visible {
	outline: 2px solid var(--hg-auto-color-accent);
}

.hg-auto-vehicle-card__private-icon {
	display: inline-flex;
	color: var(--hg-auto-color-muted);
}

.hg-auto-vehicle-card__private-icon svg {
	display: block;
}

.hg-auto-vehicle-card__private-label {
	font-size: 0.6875rem;
	font-weight: 650;
	line-height: 1.2;
	text-align: center;
	color: var(--hg-auto-color-steel);
}

.hg-auto-vehicle-card__reviews {
	margin: 0.1rem 0 0;
	display: flex;
	align-items: center;
	gap: 0.35rem;
	font-size: 0.8125rem;
	color: var(--hg-auto-color-steel);
	line-height: 1.3;
}

.hg-auto-vehicle-card__reviews--empty {
	color: var(--hg-auto-color-muted);
	font-weight: 500;
}

.hg-auto-vehicle-card__reviews-link,
.hg-auto-vehicle-card__reviews-static {
	position: relative;
	z-index: 2;
	display: inline-flex;
	align-items: center;
	gap: 0.35rem;
	min-width: 0;
	color: inherit;
	text-decoration: none;
}

.hg-auto-vehicle-card__reviews-link:hover,
.hg-auto-vehicle-card__reviews-link:focus-visible {
	color: var(--hg-auto-color-accent);
}

.hg-auto-vehicle-card__reviews-link:focus-visible {
	outline: 2px solid var(--hg-auto-color-accent);
	outline-offset: 2px;
	border-radius: 0.2rem;
}

.hg-auto-vehicle-card__reviews-score {
	font-weight: 700;
	letter-spacing: -0.02em;
}

.hg-auto-vehicle-card__reviews-count {
	color: var(--hg-auto-color-muted);
	font-weight: 500;
}

.hg-auto-vehicle-card .hg-auto-vs-stars {
	display: inline-flex;
	align-items: center;
	gap: 0.08rem;
	color: #f0b429;
}

.hg-auto-vehicle-card .hg-auto-vs-stars__star {
	position: relative;
	display: inline-flex;
	width: 0.8rem;
	height: 0.8rem;
}

.hg-auto-vehicle-card .hg-auto-vs-stars__base,
.hg-auto-vehicle-card .hg-auto-vs-stars__fill {
	display: block;
	width: 100%;
	height: 100%;
}

.hg-auto-vehicle-card .hg-auto-vs-stars__base {
	fill: #e4e7ec;
}

.hg-auto-vehicle-card .hg-auto-vs-stars__star--full .hg-auto-vs-stars__base {
	fill: currentColor;
}

.hg-auto-vehicle-card .hg-auto-vs-stars__star--half .hg-auto-vs-stars__fill {
	position: absolute;
	inset: 0;
	fill: currentColor;
	clip-path: inset(0 50% 0 0);
}

.hg-auto-vehicle-card--reserved {
	border-color: #f0c674;
}

/* ——— Grid ——— */
.hg-auto-vehicle-card--grid {
	height: 100%;
}

.hg-auto-vehicle-card--grid .hg-auto-vehicle-card__body {
	gap: var(--hg-auto-space-2);
	padding: var(--hg-auto-space-3);
}

.hg-auto-vehicle-card--grid .hg-auto-vehicle-card__main {
	gap: 0.35rem;
	/* Grow so specs can pin to the bottom of the content area */
	flex: 1 1 auto;
}

/* Title left + price top-right; variant stays under title in identity. */
.hg-auto-vehicle-card--grid .hg-auto-vehicle-card__top,
.hg-auto-vehicle-card--compact .hg-auto-vehicle-card__top {
	display: flex;
	flex-direction: row;
	flex-wrap: wrap;
	justify-content: space-between;
	align-items: flex-start;
	gap: 0.25rem 0.75rem;
}

.hg-auto-vehicle-card--grid .hg-auto-vehicle-card__identity,
.hg-auto-vehicle-card--compact .hg-auto-vehicle-card__identity {
	flex: 1;
	min-width: 0;
	gap: 0.2rem;
}

.hg-auto-vehicle-card--grid .hg-auto-vehicle-card__pricing,
.hg-auto-vehicle-card--compact .hg-auto-vehicle-card__pricing {
	flex: 0 0 auto;
	margin-left: auto;
	align-items: flex-end;
	text-align: right;
	gap: 0.2rem;
	max-width: 100%;
}

.hg-auto-vehicle-card--grid .hg-auto-vehicle-card__pricing .hg-auto-vehicle-card__price,
.hg-auto-vehicle-card--compact .hg-auto-vehicle-card__pricing .hg-auto-vehicle-card__price {
	align-items: flex-end;
}

.hg-auto-vehicle-card--grid .hg-auto-vehicle-card__pricing .hg-auto-price-amounts,
.hg-auto-vehicle-card--compact .hg-auto-vehicle-card__pricing .hg-auto-price-amounts {
	flex-direction: column;
	align-items: flex-end;
	justify-content: flex-end;
	gap: 0.1rem;
}

/* Labels + estimate nest under price amounts in the right column. */
.hg-auto-vehicle-card--grid .hg-auto-vehicle-card__pricing .hg-auto-vehicle-card__price--meta,
.hg-auto-vehicle-card--compact .hg-auto-vehicle-card__pricing .hg-auto-vehicle-card__price--meta {
	align-items: flex-end;
	gap: 0.25rem;
}

.hg-auto-vehicle-card--grid .hg-auto-vehicle-card__pricing .hg-auto-price-labels,
.hg-auto-vehicle-card--compact .hg-auto-vehicle-card__pricing .hg-auto-price-labels {
	justify-content: flex-end;
}

.hg-auto-vehicle-card--grid .hg-auto-vehicle-card__title {
	font-size: 1rem;
}

.hg-auto-vehicle-card--grid .hg-auto-vehicle-card__price-value,
.hg-auto-vehicle-card--grid .hg-auto-vehicle-card__price-sale {
	font-size: 1.25rem;
}

.hg-auto-vehicle-card--grid .hg-auto-vehicle-card__thumbs,
.hg-auto-vehicle-card--list .hg-auto-vehicle-card__thumbs {
	/* Flush to card edges + main image / body; keep inter-thumb gap from base. */
	padding: 0;
}

.hg-auto-vehicle-card--grid .hg-auto-vehicle-card__thumbs {
	display: flex;
}

.hg-auto-vehicle-card--grid .hg-auto-vehicle-card__thumb,
.hg-auto-vehicle-card--list .hg-auto-vehicle-card__thumb {
	/* Square + flush: no border (avoids inset clip vs card overflow:hidden radius). */
	border: 0;
	border-radius: 0;
}

.hg-auto-vehicle-card--grid .hg-auto-vehicle-card__image-count,
.hg-auto-vehicle-card--list .hg-auto-vehicle-card__image-count {
	/* Strip is shorter without vertical padding. */
	bottom: calc(0.55rem + 2.4rem);
}

/* Specs sit bottom-left of main; free space grows above (dealer follows in __lower). */
.hg-auto-vehicle-card--grid .hg-auto-vehicle-card__specs,
.hg-auto-vehicle-card--compact .hg-auto-vehicle-card__specs {
	margin-top: auto;
	justify-content: flex-start;
}

.hg-auto-vehicle-card--grid .hg-auto-vehicle-card__lower {
	display: block;
	padding-top: 0.15rem;
}

.hg-auto-vehicle-card--grid .hg-auto-vehicle-card__dealer-identity--compact,
.hg-auto-vehicle-card--compact .hg-auto-vehicle-card__dealer-identity--compact {
	padding-top: 0.55rem;
	gap: 0.5rem 0.75rem;
}

.hg-auto-vehicle-card--grid .hg-auto-vehicle-card__logo-link,
.hg-auto-vehicle-card--compact .hg-auto-vehicle-card__logo-link {
	max-width: 96px;
	max-height: 44px;
}

.hg-auto-vehicle-card--grid .hg-auto-vehicle-card__logo,
.hg-auto-vehicle-card--compact .hg-auto-vehicle-card__logo {
	max-width: 96px;
	max-height: 40px;
}

.hg-auto-vehicle-card--grid .hg-auto-vehicle-card__private-mark--compact,
.hg-auto-vehicle-card--compact .hg-auto-vehicle-card__private-mark--compact {
	min-width: 0;
	max-width: 5.5rem;
	min-height: 0;
	padding: 0.3rem 0.4rem;
	gap: 0.15rem;
}

.hg-auto-vehicle-card--grid .hg-auto-vehicle-card__private-mark--compact .hg-auto-vehicle-card__private-label,
.hg-auto-vehicle-card--compact .hg-auto-vehicle-card__private-mark--compact .hg-auto-vehicle-card__private-label {
	font-size: 0.625rem;
}

.hg-auto-vehicle-card--compact .hg-auto-vehicle-card__lower {
	display: block;
}

/* ——— List ——— */
.hg-auto-vehicle-card--list {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
}

.hg-auto-vehicle-card--list .hg-auto-vehicle-card__body {
	display: flex;
	flex-direction: column;
	gap: var(--hg-auto-space-3);
	min-width: 0;
}

/* Specs bottom-left of body; spacer above; dealer in __lower stays under specs. */
.hg-auto-vehicle-card--list .hg-auto-vehicle-card__specs {
	width: 100%;
	margin-top: auto;
	justify-content: flex-start;
}

@media (min-width: 768px) {
	.hg-auto-vehicle-card--list {
		grid-template-columns: minmax(0, 1.05fr) minmax(0, 1.15fr);
		/* Stretch body to media column height so specs can pin above dealer */
		align-items: stretch;
	}

	.hg-auto-vehicle-card--list .hg-auto-vehicle-card__media-wrap {
		display: flex;
		flex-direction: column;
	}

	.hg-auto-vehicle-card--list .hg-auto-vehicle-card__media {
		flex: 0 0 auto;
	}

	.hg-auto-vehicle-card--list .hg-auto-vehicle-card__image,
	.hg-auto-vehicle-card--list .hg-auto-vehicle-card__placeholder {
		height: auto;
		min-height: 0;
		max-height: 200px;
		aspect-ratio: 16 / 10;
		object-fit: cover;
	}

	.hg-auto-vehicle-card--list .hg-auto-vehicle-card__thumbs {
		display: flex;
	}

	.hg-auto-vehicle-card--list .hg-auto-vehicle-card__body {
		display: flex;
		flex-direction: column;
		gap: var(--hg-auto-space-2);
		padding: var(--hg-auto-space-3) var(--hg-auto-space-4);
		justify-content: flex-start;
		min-height: 0;
		align-self: stretch;
	}

	/* Unified panel: title (~55–65%) | compact price — no vertical divider */
	.hg-auto-vehicle-card--list .hg-auto-vehicle-card__top {
		display: grid;
		grid-template-columns: minmax(0, 1fr) auto;
		gap: var(--hg-auto-space-3) var(--hg-auto-space-4);
		align-items: start;
	}

	.hg-auto-vehicle-card--list .hg-auto-vehicle-card__identity {
		min-width: 0;
	}

	.hg-auto-vehicle-card--list .hg-auto-vehicle-card__pricing {
		align-items: flex-end;
		text-align: right;
		justify-self: end;
		max-width: 100%;
	}

	.hg-auto-vehicle-card--list .hg-auto-vehicle-card__price {
		align-items: flex-end;
	}

	.hg-auto-vehicle-card--list .hg-auto-vehicle-card__price .hg-auto-price-amounts {
		justify-content: flex-end;
	}

	.hg-auto-vehicle-card--list .hg-auto-vehicle-card__price .hg-auto-badge,
	.hg-auto-vehicle-card--list .hg-auto-vehicle-card__price .hg-auto-price-labels {
		justify-content: flex-end;
	}

	.hg-auto-vehicle-card--list .hg-auto-vehicle-card__price-value,
	.hg-auto-vehicle-card--list .hg-auto-vehicle-card__price-sale {
		font-size: 1.5rem;
	}

	.hg-auto-vehicle-card--list .hg-fc-estimate--compact {
		text-align: right;
	}

	.hg-auto-vehicle-card--list .hg-auto-vehicle-card__title {
		font-size: 1.1875rem;
	}

	/* Dealer follows specs (specs carry margin-top: auto) */
	.hg-auto-vehicle-card--list .hg-auto-vehicle-card__lower {
		display: block;
	}
}

/* Laptop: tighten gaps before reducing type */
@media (min-width: 768px) and (max-width: 1099px) {
	.hg-auto-vehicle-card--list .hg-auto-vehicle-card__body {
		gap: var(--hg-auto-space-2);
		padding: var(--hg-auto-space-3) var(--hg-auto-space-4);
	}

	.hg-auto-vehicle-card--list .hg-auto-vehicle-card__top {
		gap: var(--hg-auto-space-2) var(--hg-auto-space-3);
	}
}

/* Narrow tablet: allow title/price to stack */
@media (min-width: 768px) and (max-width: 900px) {
	.hg-auto-vehicle-card--list .hg-auto-vehicle-card__top {
		grid-template-columns: minmax(0, 1fr);
	}

	.hg-auto-vehicle-card--list .hg-auto-vehicle-card__pricing {
		align-items: flex-start;
		text-align: left;
		justify-self: start;
	}

	.hg-auto-vehicle-card--list .hg-auto-vehicle-card__price {
		align-items: flex-start;
	}

	.hg-auto-vehicle-card--list .hg-auto-vehicle-card__price .hg-auto-price-amounts,
	.hg-auto-vehicle-card--list .hg-auto-vehicle-card__price .hg-auto-badge,
	.hg-auto-vehicle-card--list .hg-auto-vehicle-card__price .hg-auto-price-labels {
		justify-content: flex-start;
	}

	.hg-auto-vehicle-card--list .hg-fc-estimate--compact {
		text-align: left;
	}
}

@media (min-width: 1100px) {
	.hg-auto-vehicle-card--list {
		grid-template-columns: minmax(0, 1.05fr) minmax(0, 1.15fr);
	}

	.hg-auto-vehicle-card--list .hg-auto-vehicle-card__body {
		gap: var(--hg-auto-space-3);
		padding: var(--hg-auto-space-4) var(--hg-auto-space-5);
	}

	.hg-auto-vehicle-card--list .hg-auto-vehicle-card__top {
		gap: var(--hg-auto-space-3) var(--hg-auto-space-5);
	}

	.hg-auto-vehicle-card--list .hg-auto-vehicle-card__image,
	.hg-auto-vehicle-card--list .hg-auto-vehicle-card__placeholder {
		max-height: 220px;
	}
}

/* Compact / related: denser grid card */
.hg-auto-vehicle-card--compact .hg-auto-vehicle-card__body {
	padding: var(--hg-auto-space-3);
}

.hg-auto-vehicle-card--compact .hg-auto-vehicle-card__title {
	font-size: 0.975rem;
}

.hg-auto-vehicle-card--compact .hg-auto-vehicle-card__price-value,
.hg-auto-vehicle-card--compact .hg-auto-vehicle-card__price-sale {
	font-size: 1.15rem;
}

.hg-auto-vehicle-card--compact .hg-auto-vehicle-card__thumbs {
	display: none;
}

/* Mobile efficiency */
@media (max-width: 767px) {
	.hg-auto-vehicle-card--list .hg-auto-vehicle-card__thumbs {
		display: flex;
	}

	/*
	 * List is the desktop default, but on mobile the card is a vertical compact
	 * stack. Reuse the canonical grid title-left / price-right header so List and
	 * Grid look the same under 768px (without changing the desktop List layout).
	 */
	.hg-auto-vehicle-card--list .hg-auto-vehicle-card__top {
		display: flex;
		flex-direction: row;
		flex-wrap: nowrap;
		justify-content: space-between;
		align-items: flex-start;
		gap: 0.25rem 0.75rem;
	}

	.hg-auto-vehicle-card--list .hg-auto-vehicle-card__identity {
		flex: 1 1 auto;
		min-width: 0;
		gap: 0.2rem;
	}

	.hg-auto-vehicle-card--list .hg-auto-vehicle-card__pricing {
		flex: 0 0 auto;
		margin-left: auto;
		align-items: flex-end;
		text-align: right;
		gap: 0.2rem;
		max-width: min(48%, 11.5rem);
	}

	.hg-auto-vehicle-card--list .hg-auto-vehicle-card__price {
		align-items: flex-end;
	}

	.hg-auto-vehicle-card--list .hg-auto-vehicle-card__price .hg-auto-price-amounts {
		flex-direction: column;
		align-items: flex-end;
		justify-content: flex-end;
		gap: 0.1rem;
	}

	.hg-auto-vehicle-card--list .hg-auto-vehicle-card__price .hg-auto-badge,
	.hg-auto-vehicle-card--list .hg-auto-vehicle-card__price .hg-auto-price-labels {
		justify-content: flex-end;
	}

	.hg-auto-vehicle-card--list .hg-fc-estimate--compact {
		text-align: right;
	}

	.hg-auto-vehicle-card__body {
		padding: var(--hg-auto-space-3) var(--hg-auto-space-4) var(--hg-auto-space-4);
	}

	.hg-auto-vehicle-card__price-value,
	.hg-auto-vehicle-card__price-sale {
		font-size: 1.25rem;
	}

	.hg-auto-vehicle-card__title {
		font-size: 1rem;
	}

	.hg-auto-vehicle-card__specs {
		gap: 0.3rem 0.65rem;
	}
}

@media (max-width: 639px) {
	.hg-auto-vehicle-card__media-actions .hg-auto-buyer-action--icon {
		width: 1.875rem;
		min-width: 1.875rem;
		min-height: 1.875rem;
	}
}

@media (max-width: 374px) {
	.hg-auto-vehicle-card__thumbs {
		gap: 0.2rem;
	}

	.hg-auto-vehicle-card__spec-value {
		font-size: 0.75rem;
		overflow: hidden;
		text-overflow: ellipsis;
		max-width: 100%;
	}

	.hg-auto-vehicle-card__price-value,
	.hg-auto-vehicle-card__price-sale {
		font-size: 1.125rem;
	}

	.hg-auto-vehicle-card__buyer-actions {
		flex-wrap: wrap;
	}

	/* Extremely narrow: keep side-by-side when possible; allow wrap only as last resort. */
	.hg-auto-vehicle-card--list .hg-auto-vehicle-card__top {
		flex-wrap: wrap;
	}

	.hg-auto-vehicle-card--list .hg-auto-vehicle-card__pricing {
		max-width: 100%;
	}
}
