/*!
 * Driveway - dealers.css (handle `stepfox-cd-dealers`, dep `stepfox-cd`)
 *
 * Everything that makes a dealership and a make look right on its own:
 *
 *   - ATOMS shared by cards, popups, the dealer card and every field below
 *     (PHP helpers in fields-dealer.php / fields-make.php):
 *       .sfcd-logo        stepfox_cd_dealer_logo_html()   generated logo or monogram disc
 *       .sfcd-mono        stepfox_cd_make_monogram_html() make initials on the make colour
 *       .sfcd-stars       stepfox_cd_rating_stars_html()  five stars, fractional fill
 *       .sfcd-rating-badge                                 compact star + number pill
 *       .sfcd-open        stepfox_cd_open_badge_html()    "Open · until 8 pm" / "Closed · opens 9 am"
 *   - the DEALER fields  .sfcd-f-dealer-{name,photo,logo,tagline,rating,phone,email,
 *                          address,hours,bio,reviews,stats,brands,amenities,socials,contact-buttons}
 *   - the MAKE fields    .sfcd-f-make-{name,image,count,median,link,tagline}
 *   - dealer-loop / make-loop grid defaults (.sfcd-loop--dealers / --makes)
 *
 * Rules: every colour is a palette preset var(--wp--preset--color--<slug>), so the
 * dark scheme (presets re-mapped on :root) flips everything; the only literals are
 * the fallbacks inside var() and the near-black / white pair over an arbitrary
 * make colour. Aliases (--sfd-*) are declared on the component roots, not on
 * :root, so a dark band that re-maps the presets locally is honoured. Secondary
 * text is derived from currentColor, so a field dropped on a photo or a dark
 * hero stays legible. Field rules use two classes (.sfcd-f.sfcd-f-x) so they sit
 * above cards.css defaults while Stepfox Looks' #block_x rules still win. Hover
 * effects are gated by (hover: hover); motion is off under reduced motion.
 */

/* ======================================================================
 * 0. Scoped tokens
 * ==================================================================== */
.sfcd-logo,
.sfcd-mono,
.sfcd-stars,
.sfcd-rating-badge,
.sfcd-open,
[class*="sfcd-f-dealer-"],
[class*="sfcd-f-make-"],
.sfcd-cbtn {
	--sfd-ink: var(--wp--preset--color--ink, #0e1116);
	--sfd-muted: var(--wp--preset--color--muted, #596372);
	--sfd-base: var(--wp--preset--color--base, #f2f3f5);
	--sfd-panel: var(--wp--preset--color--panel, #ffffff);
	--sfd-panel-2: var(--wp--preset--color--panel-2, #e6e8ec);
	--sfd-line: var(--wp--preset--color--line, rgba(14, 17, 22, 0.1));
	--sfd-accent: var(--wp--preset--color--accent, #c2410c);
	--sfd-accent-strong: var(--sfcd-accent-strong, var(--wp--preset--color--accent, #c2410c));
	--sfd-accent-2: var(--wp--preset--color--accent-2, #1d4ed8);
	--sfd-neon: var(--wp--preset--color--neon, #0b8a5f);
	--sfd-navy: var(--wp--preset--color--violet, #1b2a4a);
	--sfd-turf: var(--wp--preset--color--turf, #dfe8f7);
	--sfd-gold: var(--wp--preset--color--gold, #8a6400);
	--sfd-f-ui: var(--wp--preset--font-family--ui, "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif);
	--sfd-f-body: var(--wp--preset--font-family--body, var(--sfd-f-ui));
	--sfd-f-display: var(--wp--preset--font-family--display, "Archivo", var(--sfd-f-ui));
	--sfd-f-num: var(--wp--preset--font-family--num, "Space Grotesk", var(--sfd-f-ui));
	--sfd-ease: cubic-bezier(0.2, 0.8, 0.2, 1);
	/* Secondary text: muted palette ink, or 72% of whatever colour the field sits in. */
	--sfd-soft: var(--sfd-muted);
}

@supports (color: color-mix(in srgb, red 50%, transparent)) {
	.sfcd-logo,
	.sfcd-mono,
	.sfcd-rating-badge,
	.sfcd-open,
	[class*="sfcd-f-dealer-"],
	[class*="sfcd-f-make-"],
	.sfcd-cbtn {
		--sfd-soft: color-mix(in srgb, currentColor 72%, transparent);
	}
}

/* ======================================================================
 * 1. Atoms
 * ==================================================================== */

/* ---- Logo disc: the generated logo image or a monogram ---- */
.sfcd-logo {
	--_s: var(--sfcd-logo-size, 48px);
	position: relative;
	display: inline-grid;
	flex: none;
	place-items: center;
	box-sizing: border-box;
	width: var(--_s);
	height: var(--_s);
	overflow: hidden;
	border-radius: 50%;
	background: var(--sfd-panel);
	box-shadow: inset 0 0 0 1px var(--sfd-line);
	vertical-align: middle;
	line-height: 1;
}

.sfcd-logo.is-rounded {
	border-radius: calc(var(--_s) * 0.26);
}

.sfcd-logo.is-square {
	border-radius: 6px;
}

.sfcd-logo__img {
	display: block;
	width: 100%;
	height: 100%;
	max-width: none;
	object-fit: cover;
}

.sfcd-logo--mono {
	background-color: var(--sfd-accent-strong);
	background-image: linear-gradient(145deg, rgba(255, 255, 255, 0.2), rgba(0, 0, 0, 0.12));
	box-shadow: none;
	color: var(--sfd-base);
	font-family: var(--sfd-f-display);
	font-size: calc(var(--_s) * 0.38);
	font-weight: 800;
	letter-spacing: 0.01em;
	user-select: none;
}

.sfcd-logo--mono[data-tone="2"] {
	background-color: var(--sfd-accent-2);
}

.sfcd-logo--mono[data-tone="3"] {
	background-color: var(--sfd-navy);
}

.sfcd-logo--mono[data-tone="4"] {
	background-color: var(--sfd-neon);
}

.sfcd-logo__t {
	display: block;
	transform: translateY(0.02em);
}

/* ---- Make monogram disc ---- */
.sfcd-mono {
	--_s: var(--sfcd-mono-size, 48px);
	display: inline-grid;
	flex: none;
	place-items: center;
	box-sizing: border-box;
	width: var(--_s);
	height: var(--_s);
	border-radius: 50%;
	background-color: var(--sfcd-mono-bg, var(--sfd-navy));
	background-image: linear-gradient(145deg, rgba(255, 255, 255, 0.2), rgba(0, 0, 0, 0.14));
	box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.08);
	color: var(--sfcd-mono-fg, var(--sfd-base));
	font-family: var(--sfd-f-display);
	font-size: calc(var(--_s) * 0.44);
	font-weight: 800;
	line-height: 1;
	vertical-align: middle;
	user-select: none;
}

.sfcd-mono[data-len="2"] {
	font-size: calc(var(--_s) * 0.36);
	letter-spacing: -0.02em;
}

.sfcd-mono[data-len="3"] {
	font-size: calc(var(--_s) * 0.28);
	letter-spacing: -0.03em;
}

.sfcd-mono[data-tone="1"] {
	--sfcd-mono-bg: var(--sfd-accent-strong);
}

.sfcd-mono[data-tone="2"] {
	--sfcd-mono-bg: var(--sfd-accent-2);
}

.sfcd-mono[data-tone="4"] {
	--sfcd-mono-bg: var(--sfd-neon);
}

.sfcd-mono__t {
	display: block;
	transform: translateY(0.02em);
}

/* ---- Star rating: five stars, fractional fill ---- */
.sfcd-stars {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	font-family: var(--sfd-f-num);
	font-feature-settings: "tnum" 1, "lnum" 1;
	line-height: 1;
	white-space: nowrap;
}

.sfcd-stars__track {
	position: relative;
	display: inline-block;
	line-height: 0;
}

.sfcd-stars__base,
.sfcd-stars__fill {
	display: inline-flex;
	gap: 2px;
	white-space: nowrap;
}

.sfcd-stars__base {
	color: var(--sfd-panel-2);
}

@supports (color: color-mix(in srgb, red 50%, transparent)) {
	.sfcd-stars__base {
		color: color-mix(in srgb, var(--sfd-muted) 30%, transparent);
	}
}

.sfcd-stars__fill {
	position: absolute;
	top: 0;
	bottom: 0;
	left: 0;
	width: var(--sfcd-fill, 0%);
	overflow: hidden;
	color: var(--sfd-gold);
}

.sfcd-stars__s {
	display: block;
	flex: none;
}

.sfcd-stars__num {
	font-size: 14.5px;
	font-weight: 700;
	letter-spacing: -0.005em;
	color: inherit;
}

.sfcd-stars__count {
	font-size: 13px;
	font-weight: 500;
	/* 92% of the star row's own colour: the 72% soft tone was 3.3:1 on white. */
	color: var(--sfd-muted);
}

@supports (color: color-mix(in srgb, red 50%, transparent)) {
	.sfcd-stars__count {
		color: color-mix(in srgb, currentColor 92%, transparent);
	}
}

/* ---- Compact rating badge ---- */
.sfcd-rating-badge {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	min-height: 26px;
	padding: 0 11px 0 8px;
	border-radius: 999px;
	background: var(--sfd-panel-2);
	box-shadow: inset 0 0 0 1px var(--sfd-line);
	color: var(--sfd-ink);
	font-family: var(--sfd-f-num);
	font-feature-settings: "tnum" 1, "lnum" 1;
	font-size: 13px;
	font-weight: 700;
	line-height: 1;
}

.sfcd-rating-badge .sfcd-ico {
	color: var(--sfd-gold);
}

.sfcd-rating-badge__count {
	font-weight: 500;
	color: var(--sfd-muted);
}

/* ---- Open-now badge ---- */
.sfcd-open {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	box-sizing: border-box;
	min-height: 26px;
	padding: 3px 12px 3px 10px;
	border-radius: 999px;
	background: var(--sfd-panel-2);
	box-shadow: inset 0 0 0 1px var(--sfd-line);
	color: var(--sfd-ink);
	font-family: var(--sfd-f-ui);
	font-size: 12.5px;
	font-weight: 600;
	letter-spacing: 0.005em;
	line-height: 1.2;
	white-space: nowrap;
}

.sfcd-open__dot {
	position: relative;
	flex: none;
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: var(--sfd-muted);
}

.sfcd-open--open .sfcd-open__dot {
	background: var(--sfd-neon);
}

.sfcd-open--soon .sfcd-open__dot {
	background: var(--sfd-gold);
}

.sfcd-open--closed .sfcd-open__dot {
	background: var(--sfd-muted);
}

@supports (background: color-mix(in srgb, red 50%, blue)) {
	.sfcd-open--open {
		background: color-mix(in srgb, var(--sfd-neon) 12%, var(--sfd-panel));
		box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--sfd-neon) 32%, transparent);
	}

	.sfcd-open--soon {
		background: color-mix(in srgb, var(--sfd-gold) 12%, var(--sfd-panel));
		box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--sfd-gold) 34%, transparent);
	}
}

@media (prefers-reduced-motion: no-preference) {
	.sfcd-open--open .sfcd-open__dot::after {
		content: "";
		position: absolute;
		inset: -3px;
		border-radius: 50%;
		border: 2px solid var(--sfd-neon);
		opacity: 0;
		animation: sfcd-open-pulse 2.4s var(--sfd-ease) infinite;
	}
}

@keyframes sfcd-open-pulse {
	0% {
		opacity: 0.55;
		transform: scale(0.6);
	}

	70%,
	100% {
		opacity: 0;
		transform: scale(1.5);
	}
}

@media (forced-colors: active) {
	.sfcd-open,
	.sfcd-rating-badge,
	.sfcd-logo {
		border: 1px solid CanvasText;
	}

	.sfcd-open__dot {
		background: CanvasText;
	}
}

/* ======================================================================
 * 2. Dealer fields
 * ==================================================================== */

/* ---- name ---- */
.sfcd-f.sfcd-f-dealer-name {
	margin: 0;
	font-family: var(--sfd-f-display);
	font-size: clamp(18px, 1.1vw + 14px, 22px);
	font-weight: 700;
	line-height: 1.2;
	letter-spacing: -0.012em;
}

.sfcd-f-dealer-name a,
.sfcd-f-make-name a {
	color: inherit;
	text-decoration: none;
}

.sfcd-f-dealer-name a:hover {
	color: var(--sfd-accent-strong);
}

/* ---- storefront photo ---- */
.sfcd-f.sfcd-f-dealer-photo {
	position: relative;
	margin: 0;
	aspect-ratio: var(--sfcd-aspect, 4 / 3);
	overflow: hidden;
	border-radius: 16px;
	background: var(--sfd-panel-2);
	isolation: isolate;
}

.sfcd-f-dealer-photo.is-square {
	border-radius: 0;
}

.sfcd-f-dealer-photo.is-circle {
	aspect-ratio: 1 / 1;
	max-width: 260px;
	border-radius: 50%;
}

.sfcd-f-dealer-photo.is-fill {
	position: absolute;
	inset: 0;
	aspect-ratio: auto;
	border-radius: 0;
}

.sfcd-f-dealer-photo__link {
	display: block;
	width: 100%;
	height: 100%;
}

.sfcd-f-dealer-photo__img {
	display: block;
	width: 100%;
	height: 100%;
	max-width: none;
	object-fit: cover;
	object-position: 50% 55%;
	transition: transform 0.8s var(--sfd-ease);
}

@media (hover: hover) {
	.sfcd-f-dealer-photo:hover .sfcd-f-dealer-photo__img {
		transform: scale(1.04);
	}
}

.sfcd-f-dealer-photo.is-placeholder {
	background-color: var(--sfd-turf);
	background-image: repeating-linear-gradient(135deg, rgba(128, 138, 156, 0.1) 0 2px, transparent 2px 16px);
}

.sfcd-f-dealer-photo__ph {
	display: grid;
	width: 100%;
	height: 100%;
	place-items: center;
}

/* ---- logo ---- */
.sfcd-f.sfcd-f-dealer-logo {
	display: inline-flex;
	line-height: 0;
}

.sfcd-f-dealer-logo__link {
	display: inline-flex;
	border-radius: 50%;
	color: inherit;
	text-decoration: none;
}

.sfcd-f-dealer-logo__link:focus-visible,
.sfcd-f-dealer-rating__link:focus-visible,
.sfcd-f-dealer-photo__link:focus-visible {
	outline: 2px solid var(--sfd-accent-2);
	outline-offset: 3px;
}

/* ---- tagline / bio ---- */
.sfcd-f.sfcd-f-dealer-tagline {
	margin: 0;
	color: var(--sfd-soft);
	font-family: var(--sfd-f-ui);
	font-size: 14px;
	font-weight: 500;
	line-height: 1.45;
}

.sfcd-f.sfcd-f-dealer-bio {
	color: var(--sfd-soft);
	font-family: var(--sfd-f-body);
	font-size: 15px;
	line-height: 1.65;
}

.sfcd-f-dealer-bio p {
	margin: 0 0 0.8em;
}

.sfcd-f-dealer-bio p:last-child {
	margin-bottom: 0;
}

/* ---- reviews: summary + review cards ---- */
.sfcd-f.sfcd-f-dealer-reviews {
	container-type: inline-size;
	display: block;
	color: var(--sfd-ink);
	font-family: var(--sfd-f-body);
}

.sfcd-f.sfcd-f-dealer-reviews[data-sfcd-reviews] {
	scroll-margin-top: calc(var(--sfcd-header-h, 72px) + var(--wp-admin--admin-bar--height, 0px) + 24px);
}

.sfcd-f-dealer-reviews__anchor {
	display: block;
	position: relative;
	top: calc(-1 * (var(--sfcd-header-h, 72px) + var(--wp-admin--admin-bar--height, 0px) + 24px));
	visibility: hidden;
	height: 0;
	width: 0;
}

.sfcd-rev-sum {
	display: flex;
	align-items: center;
	gap: 16px;
	margin: 0 0 24px;
}

.sfcd-rev-sum__score {
	font: 800 clamp(40px, 7cqi, 56px) / 1 var(--sfd-f-num);
	font-feature-settings: "tnum" 1, "lnum" 1;
	letter-spacing: -0.02em;
	color: var(--sfd-ink);
}

.sfcd-rev-sum__meta {
	display: grid;
	gap: 6px;
	justify-items: start;
}

.sfcd-rev-sum__text {
	color: var(--sfd-soft);
	font-size: 14px;
	line-height: 1.3;
}

.sfcd-rev-list {
	display: grid;
	gap: 16px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.sfcd-rev-list--grid {
	grid-template-columns: 1fr;
}

@container (min-width: 640px) {
	.sfcd-rev-list--grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@container (min-width: 980px) {
	.sfcd-rev-list--grid {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}

.sfcd-rev-list__item {
	display: flex;
	min-width: 0;
	margin: 0;
	padding: 0;
}

.sfcd-rev {
	display: flex;
	flex-direction: column;
	gap: 12px;
	width: 100%;
	min-width: 0;
	box-sizing: border-box;
	padding: 20px;
	border: 1px solid var(--sfd-line);
	border-radius: 16px;
	background: var(--sfd-panel);
}

.sfcd-rev__head {
	display: flex;
	align-items: center;
	gap: 12px;
	min-width: 0;
}

.sfcd-rev__avatar {
	--sfd-tone: var(--sfd-accent-2);
	display: grid;
	flex: none;
	place-items: center;
	width: 40px;
	height: 40px;
	border-radius: 50%;
	background: var(--sfd-turf);
	color: var(--sfd-tone);
	font: 700 14px / 1 var(--sfd-f-num);
	letter-spacing: 0.02em;
}

@supports (color: color-mix(in srgb, red 50%, transparent)) {
	.sfcd-rev__avatar {
		background: color-mix(in srgb, var(--sfd-tone) 14%, var(--sfd-panel));
	}
}

.sfcd-rev__avatar[data-tone="1"] {
	--sfd-tone: var(--sfd-accent-strong);
}

.sfcd-rev__avatar[data-tone="2"] {
	--sfd-tone: var(--sfd-neon);
}

.sfcd-rev__avatar[data-tone="3"] {
	--sfd-tone: var(--sfcd-gold-strong, var(--sfd-gold));
}

.sfcd-rev__avatar[data-tone="4"] {
	--sfd-tone: var(--sfd-navy);
}

.sfcd-rev__avatar[data-tone="5"] {
	--sfd-tone: var(--sfd-muted);
}

.sfcd-rev__who {
	display: grid;
	gap: 2px;
	min-width: 0;
}

.sfcd-rev__name {
	overflow: hidden;
	color: var(--sfd-ink);
	font: 700 15px / 1.25 var(--sfd-f-ui);
	text-overflow: ellipsis;
	white-space: nowrap;
}

.sfcd-rev__meta {
	display: -webkit-box;
	overflow: hidden;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
	line-clamp: 2;
	color: var(--sfd-soft);
	font-size: 13px;
	line-height: 1.35;
}

.sfcd-rev__stars {
	display: block;
	line-height: 1;
}

.sfcd-rev__text {
	margin: 0;
	padding: 0;
	border: 0;
}

.sfcd-rev__text p {
	margin: 0;
	color: var(--sfd-ink);
	font-size: 15px;
	line-height: 1.6;
}

.sfcd-rev-list--list .sfcd-rev {
	flex-direction: column;
}

/* ---- rating ---- */
.sfcd-f.sfcd-f-dealer-rating {
	display: flex;
	align-items: center;
	margin: 0;
}

.sfcd-f-dealer-rating__link {
	display: inline-flex;
	border-radius: 6px;
	color: inherit;
	text-decoration: none;
}

@media (hover: hover) {
	.sfcd-f-dealer-rating__link:hover .sfcd-stars__num,
	.sfcd-f-dealer-rating__link:hover .sfcd-rating-badge__num {
		text-decoration: underline;
		text-underline-offset: 3px;
	}
}

/* ---- phone / email ---- */
.sfcd-f.sfcd-f-dealer-phone,
.sfcd-f.sfcd-f-dealer-email {
	margin: 0;
	font-family: var(--sfd-f-num);
	font-feature-settings: "tnum" 1, "lnum" 1;
	font-size: 15px;
	font-weight: 600;
	line-height: 1.4;
}

.sfcd-f-dealer-phone a,
.sfcd-f-dealer-email a,
.sfcd-f-dealer-phone > span,
.sfcd-f-dealer-email > span {
	display: inline-flex;
	align-items: center;
	gap: 9px;
	color: inherit;
	text-decoration: none;
	overflow-wrap: anywhere;
}

.sfcd-f-dealer-phone .sfcd-ico,
.sfcd-f-dealer-email .sfcd-ico,
.sfcd-f-dealer-address .sfcd-ico {
	color: var(--sfd-accent-2);
}

.sfcd-f-dealer-phone .sfcd-f__l {
	font-family: var(--sfd-f-ui);
	font-size: 11.5px;
	font-weight: 700;
	letter-spacing: 0.07em;
	text-transform: uppercase;
	color: var(--sfd-soft);
}

.sfcd-f-dealer-phone a:hover,
.sfcd-f-dealer-email a:hover {
	color: var(--sfd-accent-strong);
}

.sfcd-f-dealer-phone a:focus-visible,
.sfcd-f-dealer-email a:focus-visible,
.sfcd-f-dealer-address__dir:focus-visible {
	border-radius: 4px;
	outline: 2px solid var(--sfd-accent-2);
	outline-offset: 3px;
}

/* ---- address ---- */
.sfcd-f.sfcd-f-dealer-address {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 8px;
}

.sfcd-f-dealer-address__text {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	margin: 0;
	font-family: var(--sfd-f-body);
	font-size: 15px;
	font-style: normal;
	font-weight: 500;
	line-height: 1.5;
}

.sfcd-f-dealer-address__text .sfcd-ico {
	margin-top: 2px;
}

.sfcd-f-dealer-address__dir {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-family: var(--sfd-f-ui);
	font-size: 13.5px;
	font-weight: 700;
	color: var(--sfd-accent-2);
	text-decoration: none;
}

.sfcd-f-dealer-address:has(.sfcd-f-dealer-address__text .sfcd-ico) .sfcd-f-dealer-address__dir {
	margin-inline-start: 26px;
}

.sfcd-f-dealer-address__dir:hover {
	text-decoration: underline;
	text-underline-offset: 3px;
}

/* ---- hours ---- */
.sfcd-f.sfcd-f-dealer-hours {
	display: flex;
	flex-direction: column;
	gap: 12px;
	font-family: var(--sfd-f-ui);
}

.sfcd-f-dealer-hours__head {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 8px 14px;
}

.sfcd-f-dealer-hours__title {
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.09em;
	text-transform: uppercase;
	color: var(--sfd-soft);
}

.sfcd-f-dealer-hours__table {
	width: 100%;
	margin: 0;
	border-collapse: separate;
	border-spacing: 0;
	font-feature-settings: "tnum" 1, "lnum" 1;
	font-size: 14.5px;
	line-height: 1.4;
}

.sfcd-f-dealer-hours__table th,
.sfcd-f-dealer-hours__table td {
	padding: 9px 10px;
	border: 0;
	border-top: 1px solid var(--sfd-line);
	background: transparent;
	vertical-align: middle;
}

.sfcd-f-dealer-hours__table tr:first-child > * {
	border-top-color: transparent;
}

.sfcd-f-dealer-hours__table th {
	width: 4.5em;
	font-weight: 600;
	text-align: start;
	color: var(--sfd-soft);
}

.sfcd-f-dealer-hours__table td {
	font-weight: 500;
	text-align: end;
}

.sfcd-f-dealer-hours__cell {
	display: inline-flex;
	align-items: center;
	justify-content: flex-end;
	gap: 10px;
}

.sfcd-f-dealer-hours__row.is-closed td {
	color: var(--sfd-soft);
}

.sfcd-f-dealer-hours__row.is-today > * {
	border-top-color: transparent;
	background: var(--sfd-panel-2);
	color: var(--sfd-ink);
	font-weight: 700;
}

.sfcd-f-dealer-hours__row.is-today + .sfcd-f-dealer-hours__row > * {
	border-top-color: transparent;
}

.sfcd-f-dealer-hours__row.is-today > th {
	border-radius: 10px 0 0 10px;
}

.sfcd-f-dealer-hours__row.is-today > td {
	border-radius: 0 10px 10px 0;
}

@supports (background: color-mix(in srgb, red 50%, blue)) {
	.sfcd-f-dealer-hours__row.is-today > * {
		background: color-mix(in srgb, var(--sfd-accent-strong) 9%, var(--sfd-panel));
	}
}

.sfcd-f-dealer-hours__today {
	padding: 3px 7px;
	border-radius: 999px;
	background: var(--sfd-accent-strong);
	color: var(--sfd-base);
	font-size: 10px;
	font-weight: 800;
	letter-spacing: 0.08em;
	line-height: 1;
	text-transform: uppercase;
}

.sfcd-f-dealer-hours .screen-reader-text,
.sfcd-f-dealer-hours .sfcd-sr {
	position: absolute !important;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	clip-path: inset(50%);
	white-space: nowrap;
	border: 0;
}

/* ---- stats ---- */
.sfcd-f.sfcd-f-dealer-stats {
	/* Four stats lay out as one row of 4 or an even 2x2, never 3+1: below
	   --sfd-stats-4up the minimum track jumps to half the width. */
	--sfd-stats-gap: 14px;
	--sfd-stats-4up: 400px;
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(max(calc((100% - 3 * var(--sfd-stats-gap)) / 4), clamp(0px, (var(--sfd-stats-4up) - 100%) * 999, calc((100% - var(--sfd-stats-gap)) / 2))), 1fr));
	gap: var(--sfd-stats-gap);
	margin: 0;
	padding: 0;
	list-style: none;
}

.sfcd-f-dealer-stats .sfcd-stat {
	display: flex;
	flex-direction: column;
	gap: 4px;
	min-width: 0;
}

.sfcd-f-dealer-stats .sfcd-stat__v {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	font-family: var(--sfd-f-num);
	font-feature-settings: "tnum" 1, "lnum" 1;
	font-size: clamp(22px, 1.4vw + 14px, 26px);
	font-weight: 700;
	line-height: 1.05;
	letter-spacing: -0.02em;
}

.sfcd-f-dealer-stats .sfcd-stat--rating .sfcd-ico {
	color: var(--sfd-gold);
}

.sfcd-f-dealer-stats .sfcd-stat__l {
	overflow: hidden;
	color: var(--sfd-soft);
	font-family: var(--sfd-f-ui);
	font-size: 11.5px;
	font-weight: 700;
	letter-spacing: 0.07em;
	text-overflow: ellipsis;
	text-transform: uppercase;
	white-space: nowrap;
}

/* ---- brands carried ---- */
.sfcd-f-dealer-brands__list,
.sfcd-f-dealer-amenities__list {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.sfcd-f-dealer-brands__list > li {
	margin: 0;
}

.sfcd-f-dealer-brands__chip {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	box-sizing: border-box;
	min-height: 36px;
	padding: 4px 14px 4px 5px;
	border-radius: 999px;
	background: var(--sfd-panel);
	box-shadow: inset 0 0 0 1px var(--sfd-line);
	color: var(--sfd-ink);
	font-family: var(--sfd-f-ui);
	font-size: 13.5px;
	font-weight: 600;
	line-height: 1.2;
	text-decoration: none;
	transition: box-shadow 0.2s var(--sfd-ease), transform 0.2s var(--sfd-ease);
}

a.sfcd-f-dealer-brands__chip:focus-visible {
	outline: 2px solid var(--sfd-accent-2);
	outline-offset: 2px;
}

@media (hover: hover) {
	a.sfcd-f-dealer-brands__chip:hover {
		box-shadow: inset 0 0 0 1px var(--sfd-accent-strong);
		transform: translateY(-1px);
	}
}

/* ---- amenities ---- */
.sfcd-f-dealer-amenities__item {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	margin: 0;
	padding: 7px 13px 7px 11px;
	border-radius: 999px;
	background: var(--sfd-panel-2);
	color: var(--sfd-ink);
	font-family: var(--sfd-f-ui);
	font-size: 13.5px;
	font-weight: 500;
	line-height: 1.2;
}

.sfcd-f-dealer-amenities__item .sfcd-ico {
	color: var(--sfd-accent-2);
}

.sfcd-f-dealer-amenities.is-list .sfcd-f-dealer-amenities__list {
	flex-direction: column;
	gap: 10px;
}

.sfcd-f-dealer-amenities.is-list .sfcd-f-dealer-amenities__item {
	padding: 0;
	border-radius: 0;
	background: none;
	font-size: 15px;
}

/* ---- socials ---- */
.sfcd-f.sfcd-f-dealer-socials {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.sfcd-f-dealer-socials > li {
	margin: 0;
}

.sfcd-f-dealer-socials__link {
	display: inline-grid;
	box-sizing: border-box;
	width: 40px;
	height: 40px;
	place-items: center;
	border: 0;
	border-radius: 50%;
	background: var(--sfd-panel);
	box-shadow: inset 0 0 0 1px var(--sfd-line);
	color: var(--sfd-ink);
	text-decoration: none;
	transition: background-color 0.2s var(--sfd-ease), color 0.2s var(--sfd-ease), box-shadow 0.2s var(--sfd-ease);
}

.sfcd-f-dealer-socials__link:focus-visible {
	outline: 2px solid var(--sfd-accent-2);
	outline-offset: 2px;
}

@media (hover: hover) {
	.sfcd-f-dealer-socials__link:hover {
		background: var(--sfd-accent-strong);
		box-shadow: none;
		color: var(--sfd-base);
	}
}

/* ---- contact buttons ---- */
.sfcd-f.sfcd-f-dealer-contact-buttons {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
}

.sfcd-f-dealer-contact-buttons.is-stack {
	flex-direction: column;
}

.sfcd-f-dealer-contact-buttons.is-stack .sfcd-cbtn {
	width: 100%;
}

.sfcd-cbtn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	box-sizing: border-box;
	min-height: 46px;
	padding: 0 20px;
	border: 1px solid transparent;
	border-radius: 12px;
	font-family: var(--sfd-f-ui);
	font-size: 14.5px;
	font-weight: 700;
	line-height: 1;
	text-align: center;
	text-decoration: none;
	cursor: pointer;
	transition: background-color 0.2s var(--sfd-ease), border-color 0.2s var(--sfd-ease), color 0.2s var(--sfd-ease), transform 0.2s var(--sfd-ease);
}

.sfcd-cbtn--primary {
	background: var(--sfd-accent-strong);
	color: var(--sfd-base);
}

.sfcd-cbtn--accent {
	background: var(--sfd-accent-2);
	color: var(--sfd-base);
}

.sfcd-cbtn--ghost {
	border-color: var(--sfd-line);
	background: var(--sfd-panel);
	color: var(--sfd-ink);
}

.sfcd-cbtn:focus-visible {
	outline: 2px solid var(--sfd-accent-2);
	outline-offset: 3px;
}

@media (hover: hover) {
	.sfcd-cbtn:hover {
		transform: translateY(-1px);
	}

	.sfcd-cbtn--ghost:hover {
		border-color: var(--sfd-ink);
	}
}

@supports (background: color-mix(in srgb, red 50%, blue)) {
	@media (hover: hover) {
		.sfcd-cbtn--primary:hover {
			background: color-mix(in srgb, var(--sfd-accent-strong) 86%, var(--sfd-ink));
		}

		.sfcd-cbtn--accent:hover {
			background: color-mix(in srgb, var(--sfd-accent-2) 86%, var(--sfd-ink));
		}
	}
}

@media (forced-colors: active) {
	.sfcd-cbtn {
		border-color: ButtonText;
	}
}

/* ======================================================================
 * 3. Make fields
 * ==================================================================== */

.sfcd-f.sfcd-f-make-name {
	margin: 0;
	font-family: var(--sfd-f-display);
	font-size: clamp(18px, 1.1vw + 14px, 22px);
	font-weight: 700;
	line-height: 1.2;
	letter-spacing: -0.012em;
}

.sfcd-f-make-name a:hover {
	color: var(--sfd-accent-strong);
}

.sfcd-f.sfcd-f-make-count,
.sfcd-f.sfcd-f-make-median {
	font-family: var(--sfd-f-num);
	font-feature-settings: "tnum" 1, "lnum" 1;
	font-size: 13.5px;
	font-weight: 600;
}

.sfcd-f-make-median .sfcd-f__l {
	font-family: var(--sfd-f-ui);
	font-weight: 500;
	opacity: 0.78;
}

.sfcd-f.sfcd-f-make-tagline {
	margin: 0;
	font-family: var(--sfd-f-body);
	font-size: 14px;
	line-height: 1.45;
	opacity: 0.8;
}

/* ---- image: photo + scrim, or a monogram tile on the make colour ---- */
.sfcd-f.sfcd-f-make-image {
	position: relative;
	margin: 0;
	aspect-ratio: var(--sfcd-aspect, 4 / 3);
	overflow: hidden;
	border-radius: 16px;
	background: var(--sfd-panel-2);
	isolation: isolate;
}

.sfcd-f-make-image.is-fill {
	position: absolute;
	inset: 0;
	aspect-ratio: auto;
	border-radius: 0;
}

.sfcd-f-make-image__img {
	display: block;
	width: 100%;
	height: 100%;
	max-width: none;
	object-fit: cover;
	transition: transform 0.9s var(--sfd-ease);
}

.sfcd-f-make-image__scrim {
	position: absolute;
	inset: 0;
	background: var(--wp--preset--gradient--scrim, linear-gradient(180deg, rgba(0, 0, 0, 0) 38%, rgba(0, 0, 0, 0.66) 100%));
	pointer-events: none;
}

@media (hover: hover) {
	:where(.sfcd-loop) > *:hover .sfcd-f-make-image__img,
	.sfcd-f-make-image:hover .sfcd-f-make-image__img {
		transform: scale(1.05);
	}
}

.sfcd-f-make-image.is-placeholder {
	display: grid;
	place-items: center;
	color: var(--sfd-soft);
}

.sfcd-f-make-image.is-mono {
	width: 100%;
	container-type: inline-size;
	background-color: var(--sfcd-make-color, var(--sfd-navy));
	background-image:
		radial-gradient(120% 90% at 16% 6%, rgba(255, 255, 255, 0.24), rgba(255, 255, 255, 0) 56%),
		linear-gradient(160deg, rgba(0, 0, 0, 0) 38%, rgba(0, 0, 0, 0.26));
	color: var(--sfcd-make-on, var(--sfd-base));
}

.sfcd-f-make-image.is-mono[data-sfcd-tone="1"] {
	--sfcd-make-color: var(--sfd-accent-strong);
}

.sfcd-f-make-image.is-mono[data-sfcd-tone="2"] {
	--sfcd-make-color: var(--sfd-accent-2);
}

.sfcd-f-make-image.is-mono[data-sfcd-tone="4"] {
	--sfcd-make-color: var(--sfd-neon);
}

/* A faint ring and a dashed road line behind the letters. */
.sfcd-f-make-image.is-mono::before,
.sfcd-f-make-image.is-mono::after {
	content: "";
	position: absolute;
	pointer-events: none;
}

.sfcd-f-make-image.is-mono::before {
	top: -42%;
	right: -34%;
	width: 120%;
	aspect-ratio: 1;
	border: 2px solid currentColor;
	border-radius: 50%;
	opacity: 0.13;
}

.sfcd-f-make-image.is-mono::after {
	right: 9%;
	bottom: 13%;
	left: 9%;
	border-top: 3px dashed currentColor;
	opacity: 0.2;
}

.sfcd-f-make-image__mono {
	position: absolute;
	inset: 0;
	z-index: 1;
	display: grid;
	place-items: center;
}

.sfcd-f-make-image__t {
	font-family: var(--sfd-f-display);
	font-size: 64px;
	font-weight: 800;
	line-height: 1;
	letter-spacing: -0.03em;
	transform: translateY(-0.04em);
}

@supports (font-size: 1cqw) {
	.sfcd-f-make-image__t {
		font-size: clamp(36px, 34cqw, 150px);
	}
}

/* ---- stretched link over the nearest tile ---- */
.sfcd-f.sfcd-f-make-link {
	position: static;
	display: block;
	width: 0;
	height: 0;
	margin: 0 !important;
	padding: 0 !important;
	overflow: visible;
	outline: none;
}

.sfcd-f-make-link::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 3;
	border-radius: inherit;
}

.sfcd-f-make-link:focus-visible::after {
	border-radius: 16px;
	box-shadow: inset 0 0 0 3px var(--sfd-accent-2);
}

/* ======================================================================
 * 4. Loops (dealer-loop / make-loop defaults under cards.css's .sfcd-loop grid)
 * ==================================================================== */

.sfcd-loop--dealers {
	--sfcd-loop-min: 260px;
}

.sfcd-loop--makes {
	--sfcd-loop-min: 200px;
}

@media (max-width: 599px) {
	.sfcd-loop--dealers.is-mobile-rail,
	.sfcd-loop--makes.is-mobile-rail {
		grid-auto-columns: min(72%, 280px);
	}
}

/* ======================================================================
 * 5. Reduced motion
 * ==================================================================== */

@media (prefers-reduced-motion: reduce) {
	.sfcd-f-dealer-photo__img,
	.sfcd-f-make-image__img,
	.sfcd-f-dealer-brands__chip,
	.sfcd-f-dealer-socials__link,
	.sfcd-cbtn {
		transition: none;
	}

	.sfcd-f-dealer-photo:hover .sfcd-f-dealer-photo__img,
	.sfcd-f-make-image:hover .sfcd-f-make-image__img,
	:where(.sfcd-loop) > *:hover .sfcd-f-make-image__img,
	a.sfcd-f-dealer-brands__chip:hover,
	.sfcd-cbtn:hover {
		transform: none;
	}
}
