/*
 * Autofunds Inventory Sync — front-end styles.
 *
 * Every color, radius, spacing and font is a CSS variable declared once in
 * .afis-scope below. Override them from WPCode (CSS snippet, site-wide), e.g.:
 *   .afis-scope { --afis-accent: #c8102e; --afis-radius: 12px; }
 */

.afis-scope {
	--afis-accent: #d71920;          /* Champion red */
	--afis-accent-contrast: #ffffff;
	--afis-ink: #111111;             /* Champion black */
	--afis-muted: #5f6368;
	--afis-line: #e3e3e3;
	--afis-bg: #ffffff;
	--afis-card-bg: #f4f4f4;         /* light gray card background */
	--afis-radius: 16px;
	--afis-radius-sm: 10px;
	--afis-gap: 24px;
	--afis-font: inherit;
	--afis-title-size: 1.05rem;
	--afis-price-size: 1.35rem;
	--afis-sidebar-width: 290px;
	font-family: var(--afis-font);
	color: var(--afis-ink);
	box-sizing: border-box;
}
.afis-scope *, .afis-scope *::before, .afis-scope *::after { box-sizing: inherit; }
.afis-scope .screen-reader-text {
	position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(1px, 1px, 1px, 1px); white-space: nowrap;
}
.afis-icon { display: inline-block; vertical-align: middle; flex: none; }

/* ---------- Inventory layout ----------
 * Breakpoints use container queries, so the layout follows the width of the
 * Elementor column/section that holds the shortcode, not the screen width. */
.afis-inventory-wrap { container-type: inline-size; container-name: afis; width: 100%; }
.afis-inventory {
	display: grid;
	grid-template-columns: var(--afis-sidebar-width) minmax(0, 1fr);
	gap: var(--afis-gap);
	align-items: start;
}
.afis-filters-toggle { display: none; }

/* ---------- Sidebar ---------- */
.afis-sidebar {
	background: var(--afis-bg);
	border: 1px solid var(--afis-line);
	border-radius: var(--afis-radius);
	padding: 20px;
	position: sticky;
	top: 20px;
	max-height: calc(100vh - 40px);
	overflow: auto;
}
.afis-filter-head { display: none; }
.afis-field { border: 0; margin: 0 0 18px; padding: 0; min-width: 0; }
.afis-label, .afis-field > label {
	display: block; font-weight: 600; font-size: .95rem; margin: 0 0 8px; padding: 0;
}
.afis-options { max-height: 210px; overflow: auto; padding-right: 4px; }
.afis-check { display: flex; align-items: center; gap: 8px; font-size: .92rem; padding: 3px 0; cursor: pointer; }
.afis-check input { accent-color: var(--afis-accent); width: 16px; height: 16px; margin: 0; }
.afis-count { color: var(--afis-muted); font-size: .85rem; margin-left: auto; }
.afis-range { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.afis-scope input[type="number"], .afis-scope input[type="search"], .afis-scope select {
	width: 100%; min-height: 42px; padding: 8px 12px; font: inherit; font-size: .92rem; color: var(--afis-ink);
	background: var(--afis-bg); border: 1px solid var(--afis-line); border-radius: var(--afis-radius-sm);
}
.afis-scope input:focus-visible, .afis-scope select:focus-visible, .afis-scope button:focus-visible, .afis-scope a:focus-visible {
	outline: 2px solid var(--afis-accent); outline-offset: 2px;
}
.afis-stock-row { display: flex; gap: 6px; }
.afis-btn-icon {
	flex: none; width: 42px; border: 0; border-radius: var(--afis-radius-sm); cursor: pointer;
	background: var(--afis-ink); color: #fff; display: inline-flex; align-items: center; justify-content: center;
}
.afis-hint { color: var(--afis-muted); font-size: .8rem; margin: 6px 0 0; }
.afis-reset {
	display: block; text-align: center; padding: 11px; border-radius: var(--afis-radius-sm);
	background: var(--afis-ink); color: #fff !important; text-decoration: none !important; font-weight: 600;
}
.afis-reset:hover { background: var(--afis-accent); }

/* ---------- Toolbar ---------- */
.afis-toolbar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 18px; }
.afis-showing { margin: 0; color: var(--afis-muted); font-size: .95rem; }
.afis-sort { display: flex; align-items: center; gap: 8px; font-size: .92rem; }
.afis-sort select { width: auto; min-width: 180px; }
.afis-main.is-loading { opacity: .5; transition: opacity .15s; }

/* ---------- Grid & card ---------- */
.afis-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--afis-gap); }
@container afis (max-width: 1080px) { .afis-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@container afis (max-width: 560px) { .afis-grid { grid-template-columns: 1fr; } }
.afis-card {
	position: relative; display: flex; flex-direction: column; background: var(--afis-card-bg);
	border-radius: var(--afis-radius); overflow: hidden; transition: box-shadow .2s, transform .2s;
}
.afis-card:hover { box-shadow: 0 10px 28px rgba(0, 0, 0, .12); transform: translateY(-2px); }
.afis-card-media { position: relative; aspect-ratio: 4 / 3; background: #e9e9e9; overflow: hidden; border-radius: var(--afis-radius) var(--afis-radius) 0 0; }
.afis-card-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.afis-card--nophoto .afis-card-media img { object-fit: contain; background: #ececec; }
/* Manufacturer stock photos are panoramic (2:1): shown whole, the gaps filled with a blurred, darker copy. */
.afis-card--stock .afis-card-media::before {
	content: ""; position: absolute; inset: -20px; background: var(--afis-media-bg) center / cover no-repeat;
	filter: blur(18px) brightness(.55); transform: scale(1.1);
}
.afis-card--stock .afis-card-media img { position: relative; object-fit: contain; }
.afis-stock-note {
	position: absolute; left: 50%; bottom: 10px; transform: translateX(-50%); z-index: 2; white-space: nowrap; pointer-events: none;
	background: rgba(17, 17, 17, .82); color: #fff; font-size: .72rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
	padding: 5px 11px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, .18);
}
.afis-badge {
	position: absolute; top: 12px; left: 12px; background: var(--afis-accent); color: var(--afis-accent-contrast);
	font-size: .75rem; font-weight: 700; padding: 4px 10px; border-radius: 999px; letter-spacing: .02em;
}
/* Title row: title on the left, location tag on the right. */
.afis-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.afis-card-head .afis-card-title { min-width: 0; }
.afis-location {
	position: relative; z-index: 2; /* above the stretched card link */
	flex: 0 0 auto; display: inline-flex; align-items: center; gap: 4px; margin-top: 2px; white-space: nowrap; text-decoration: none !important;
	border: 1px solid var(--afis-line); color: var(--afis-muted) !important; font-size: .75rem; font-weight: 600; line-height: 1; padding: 5px 9px 5px 7px; border-radius: 999px;
	transition: border-color .2s, color .2s, background-color .2s;
}
.afis-location:hover, .afis-location:focus-visible { border-color: var(--afis-accent); color: var(--afis-accent) !important; }
.afis-location .afis-icon { width: 13px; height: 13px; color: var(--afis-accent); }
.afis-theme-dark .afis-location { border-color: rgba(255, 255, 255, .14); color: #c9ccd3 !important; }
.afis-theme-dark .afis-location:hover, .afis-theme-dark .afis-location:focus-visible { border-color: var(--afis-accent); color: #fff !important; background: rgba(255, 42, 54, .12); }
.afis-location .screen-reader-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.afis-video-btn {
	position: absolute; right: 12px; bottom: 12px; z-index: 2; display: inline-flex; align-items: center; gap: 6px;
	border: 0; border-radius: 999px; padding: 7px 12px; font: inherit; font-size: .8rem; font-weight: 600; cursor: pointer;
	background: rgba(17, 17, 17, .85); color: #fff;
}
.afis-video-btn:hover { background: var(--afis-accent); }
.afis-card-body { display: flex; flex-direction: column; flex: 1; padding: 16px 18px 18px; }
.afis-card-title { font-size: var(--afis-title-size); line-height: 1.3; margin: 0 0 4px; font-weight: 700; }
.afis-card-link { color: inherit !important; text-decoration: none !important; }
.afis-card-link::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.afis-card-trim { margin: 0 0 12px; color: var(--afis-muted); font-size: .88rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.afis-card-specs {
	list-style: none; margin: 0 0 14px; padding: 12px 0; display: flex; flex-wrap: wrap; gap: 6px 14px;
	border-top: 1px solid var(--afis-line); border-bottom: 1px solid var(--afis-line); font-size: .84rem; color: var(--afis-muted);
}
.afis-card-specs li { display: inline-flex; align-items: center; gap: 5px; margin: 0; padding: 0; }
.afis-card-foot { margin-top: auto; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px; }
.afis-price { font-size: var(--afis-price-size); font-weight: 800; }
.afis-price--call { font-size: 1.05rem; color: var(--afis-accent); }
.afis-details { display: inline-flex; align-items: center; gap: 4px; font-size: .88rem; font-weight: 600; white-space: nowrap; }
.afis-card:hover .afis-details { color: var(--afis-accent); }
/* WhatsApp icon: sits above the stretched card link, plain (no green) to match the card. */
.afis-foot-actions { display: inline-flex; align-items: center; gap: 10px; }
.afis-wa {
	position: relative; z-index: 2; display: inline-flex; align-items: center; justify-content: center;
	width: 36px; height: 36px; margin: -6px 0; border-radius: 50%; color: inherit !important; text-decoration: none !important;
	transition: color .2s, background-color .2s;
}
.afis-wa:hover, .afis-wa:focus-visible { color: var(--afis-accent) !important; background: rgba(127, 127, 127, .14); }
.afis-wa .afis-icon { width: 22px; height: 22px; }
.afis-theme-dark .afis-wa { color: #fff !important; }
.afis-theme-dark .afis-wa:hover, .afis-theme-dark .afis-wa:focus-visible { color: var(--afis-accent) !important; background: rgba(255, 255, 255, .08); }

/* ---------- Pagination & empty ---------- */
.afis-pagination { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin-top: 28px; }
.afis-page {
	min-width: 40px; height: 40px; display: inline-flex; align-items: center; justify-content: center; padding: 0 10px;
	border-radius: 999px; border: 1px solid var(--afis-line); color: var(--afis-ink) !important; text-decoration: none !important;
}
.afis-page.is-current, .afis-page:hover { background: var(--afis-ink); color: #fff !important; border-color: var(--afis-ink); }
.afis-empty { background: var(--afis-card-bg); border-radius: var(--afis-radius); padding: 32px; text-align: center; }
.afis-empty .afis-reset,
.afis-empty .afis-reset:hover,
.afis-theme-dark .afis-empty .afis-reset { display: inline; background: none; color: var(--afis-accent) !important; padding: 0; border-radius: 0; text-decoration: underline !important; }

/* ---------- Quick search (hero pill) ---------- */
.afis-search {
	display: flex; align-items: center; gap: 0; padding: 8px 8px 8px 20px; max-width: 1100px; margin-inline: auto;
	border: 1px solid rgba(255, 255, 255, .85); border-radius: 999px; background: rgba(0, 0, 0, .25); color: #fff;
}
.afis-search-field { flex: 1; min-width: 0; position: relative; margin: 0; }
.afis-search-field + .afis-search-field { border-left: 1px solid rgba(255, 255, 255, .35); }
.afis-search select {
	-webkit-appearance: none; appearance: none;
	/* Own chevron, 22px away from the field divider (the native arrow sat on the edge). */
	background-color: transparent;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%23ffffff' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
	background-repeat: no-repeat; background-position: right 22px center; background-size: 11px 8px;
	border: 0; color: inherit; min-height: 48px; padding: 0 46px 0 16px; border-radius: 0; cursor: pointer;
}
/* Focus is shown on the whole bar (:focus-within) instead of a box around one field. */
.afis-search select:focus-visible { outline: none; }
.afis-search:focus-within { border-color: var(--afis-accent); }
.afis-search select option { color: #111; }
/* Customizable select (Chrome/Edge 135+): Champion red highlight instead of the system blue.
   Other browsers keep their native list. */
@supports (appearance: base-select) {
	.afis-search select, .afis-search select::picker(select) { appearance: base-select; }
	.afis-search select { display: flex; align-items: center; }
	.afis-search select::picker-icon { display: none; }
	.afis-search select::picker(select) { margin-top: 10px; padding: 6px; max-height: 340px; border: 1px solid rgba(17, 17, 17, .12); border-radius: 12px; background: #fff; box-shadow: 0 18px 40px rgba(0, 0, 0, .25); }
	.afis-search select option { padding: 9px 14px; border-radius: 8px; font-size: .92rem; }
	.afis-search select option::checkmark { display: none; }
	.afis-search select option:checked { background: rgba(215, 25, 32, .12); font-weight: 600; }
	.afis-search select option:hover, .afis-search select option:focus-visible { background: var(--afis-accent); color: #fff; outline: none; }
}
.afis-search-btn {
	flex: none; display: inline-flex; align-items: center; gap: 8px; border: 0; cursor: pointer; font: inherit; font-weight: 600;
	background: #fff; color: #111; border-radius: 999px; padding: 14px 34px; margin-left: 8px;
}
.afis-search-btn:hover { background: var(--afis-accent); color: var(--afis-accent-contrast); }

/* ---------- Video modal ---------- */
.afis-modal { position: fixed; inset: 0; z-index: 100000; background: rgba(0, 0, 0, .8); display: flex; align-items: center; justify-content: center; padding: 16px; }
.afis-modal[hidden] { display: none; }
.afis-modal-box { position: relative; width: min(960px, 100%); aspect-ratio: 16 / 9; background: #000; border-radius: 12px; overflow: hidden; }
.afis-modal-box iframe, .afis-modal-box video { width: 100%; height: 100%; border: 0; display: block; }
.afis-modal-close {
	position: absolute; top: 8px; right: 8px; z-index: 2; width: 40px; height: 40px; border-radius: 50%; border: 0;
	background: rgba(255, 255, 255, .9); color: #111; font-size: 24px; line-height: 1; cursor: pointer;
}

/* ---------- Responsive ---------- */
@container afis (max-width: 820px) {
	.afis-inventory { grid-template-columns: 1fr; }
	.afis-filters-toggle {
		display: inline-flex; align-items: center; gap: 8px; justify-self: start; padding: 10px 18px; border-radius: 999px;
		border: 1px solid var(--afis-ink); background: var(--afis-bg); color: var(--afis-ink); font: inherit; font-weight: 600; cursor: pointer;
	}
	/* Collapsible panel in the page flow (a fixed drawer would be trapped by the
	   container's layout containment). */
	.afis-sidebar { display: none; position: static; max-height: none; overflow: visible; }
	.afis-inventory.filters-open .afis-sidebar { display: block; }
	.afis-filter-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
	.afis-filters-close { border: 0; background: none; font-size: 28px; line-height: 1; cursor: pointer; color: var(--afis-ink); }
	.afis-sort select { min-width: 0; }
}
@media (max-width: 760px) {
	.afis-search { flex-direction: column; align-items: stretch; border-radius: 22px; padding: 12px; }
	.afis-search-field + .afis-search-field { border-left: 0; border-top: 1px solid rgba(255, 255, 255, .35); }
	.afis-search-btn { margin: 10px 0 0; justify-content: center; }
}
/* ---------- Section headings (types, brands) ---------- */
.afis-section-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 20px; }
.afis-section-title { margin: 0; font-size: clamp(1.5rem, 3vw, 2.25rem); font-weight: 800; line-height: 1.15; }
.afis-section-link { display: inline-flex; align-items: center; gap: 6px; color: var(--afis-ink) !important; text-decoration: none !important; font-weight: 500; white-space: nowrap; }
.afis-section-link:hover { color: var(--afis-accent) !important; }
/* Without a title (heading placed in Elementor) the link stays on the right. */
.afis-section-head > .afis-section-link:only-child { margin-left: auto; }
.afis-scope ul.afis-car-track, .afis-scope ul.afis-types-grid, .afis-scope ul.afis-brands-track { list-style: none; margin: 0; padding: 0; }
/* Room inside the scrolling track for the card hover lift and glow (overflow-x: auto also clips vertically). */
.afis-scope ul.afis-car-track { padding: 14px 6px 24px; }

/* ---------- Featured carousel ---------- */
.afis-carousel { position: relative; padding: 0 0 36px; overflow-x: clip; }
.afis-car-track {
	display: grid; grid-auto-flow: column; grid-auto-columns: calc((100% - 3 * var(--afis-gap)) / 4); gap: var(--afis-gap);
	overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth; scrollbar-width: none; padding: 14px 4px 22px;
}
.afis-car-track::-webkit-scrollbar { display: none; }
/* Each slide holds the same .afis-card as the inventory grid. position: relative keeps
   absolutely positioned children (screen-reader text) inside the scrolling track. */
.afis-slide { position: relative; scroll-snap-align: start; display: flex; margin: 0; }
.afis-slide > .afis-card { width: 100%; }
/* Arrows: SVG chevron centered in the circle; JS places them at the middle of the photos (--afis-nav-top). */
.afis-car-nav {
	position: absolute; top: var(--afis-nav-top, calc(50% - 36px)); z-index: 4; width: 42px; height: 42px; padding: 0; border-radius: 50%; border: 0; cursor: pointer;
	background: rgba(17, 17, 17, .8); color: #fff; line-height: 0; display: flex; align-items: center; justify-content: center;
}
.afis-car-nav svg { display: block; flex: none; }
.afis-car-prev { left: 6px; }
.afis-car-next { right: 6px; }
.afis-car-nav[disabled] { opacity: .3; cursor: default; }
.afis-car-dots { position: absolute; left: 0; right: 0; bottom: 4px; display: flex; justify-content: center; gap: 10px; }
.afis-car-dot { width: 11px; height: 11px; padding: 0; border-radius: 50%; border: 0; background: #c9c9c9; cursor: pointer; }
.afis-car-dot[aria-current="true"] { background: var(--afis-ink); }
.afis-carousel { container-type: inline-size; }
@container (max-width: 1000px) { .afis-car-track { grid-auto-columns: calc((100% - 2 * var(--afis-gap)) / 3); } }
@container (max-width: 760px) { .afis-car-track { grid-auto-columns: calc((100% - var(--afis-gap)) / 2); } }
@container (max-width: 480px) {
	.afis-car-nav { display: none; }
	/* One card centered, the neighbours peeking on both sides. */
	.afis-scope ul.afis-car-track { grid-auto-columns: 100%; gap: 14px; padding-left: 11%; padding-right: 11%; scroll-padding-inline: 11%; }
	.afis-car-track .afis-slide { scroll-snap-align: center; }
}

/* ---------- Link lists ([afis_links], footers) ---------- */
.afis-scope.afis-links { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.afis-links li { margin: 0; }
.afis-links a { color: var(--afis-muted) !important; text-decoration: none !important; font-size: .95rem; transition: color .2s, text-shadow .2s, padding .2s; }
.afis-links a:hover, .afis-links a:focus-visible { color: var(--afis-ink) !important; padding-left: 4px; }
.afis-theme-dark .afis-links a:hover, .afis-theme-dark .afis-links a:focus-visible { color: #fff !important; text-shadow: 0 0 12px var(--afis-glow); }
.afis-links-count { opacity: .6; }

/* ---------- Customer reviews ---------- */
.afis-reviews-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 28px; margin-bottom: 6px; }
.afis-reviews-score { display: flex; align-items: center; gap: 10px; color: var(--afis-muted); font-size: .95rem; }
.afis-reviews-avg { font-size: 1.75rem; font-weight: 800; line-height: 1; color: var(--afis-ink); }
.afis-reviews-head > .afis-section-link { margin-left: auto; }
.afis-stars { display: inline-flex; gap: 2px; color: var(--afis-accent); }
.afis-stars svg { display: block; width: 17px; height: 17px; }
.afis-stars .afis-star-off { opacity: .22; }
.afis-reviews-carousel .afis-car-track { grid-auto-columns: calc((100% - 2 * var(--afis-gap)) / 3); align-items: stretch; }
.afis-review {
	position: relative; display: flex; flex-direction: column; gap: 14px; width: 100%; margin: 0; padding: 30px 28px 24px;
	border-radius: var(--afis-radius); background: var(--afis-card-bg); border: 1px solid var(--afis-line);
	transition: border-color .25s, box-shadow .25s, transform .25s;
}
.afis-review:hover { transform: translateY(-4px); }
.afis-review-quote { position: absolute; top: 22px; right: 24px; width: 46px; height: 46px; color: var(--afis-accent); opacity: .16; }
.afis-review-title { margin: 0; padding-right: 48px; font-size: 1.08rem; font-weight: 700; line-height: 1.35; color: var(--afis-ink); }
.afis-review-body { color: var(--afis-muted); font-size: .96rem; line-height: 1.65; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 6; line-clamp: 6; overflow: hidden; }
.afis-review-body p { margin: 0; }
.afis-review.is-open .afis-review-body { display: block; -webkit-line-clamp: unset; line-clamp: none; }
.afis-review-more { align-self: flex-start; margin-top: -6px; padding: 0; border: 0; background: none; color: var(--afis-accent); font: inherit; font-size: .88rem; font-weight: 600; cursor: pointer; }
.afis-review-more[hidden] { display: none; }
.afis-review-more:hover { text-decoration: underline; }
.afis-review-author { display: flex; align-items: center; gap: 12px; margin-top: auto; padding-top: 16px; border-top: 1px solid var(--afis-line); }
.afis-review-avatar { flex: none; width: 42px; height: 42px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 700; color: #fff; background: var(--afis-accent); }
.afis-review-name { display: block; font-weight: 700; color: var(--afis-ink); }
.afis-review-date { display: block; margin-top: 2px; font-size: .82rem; color: var(--afis-muted); }
@container (max-width: 900px) { .afis-reviews-carousel .afis-car-track { grid-auto-columns: calc((100% - var(--afis-gap)) / 2); } }
/* Phones: same look as the New Arrivals carousel - one card centered and part of the
   previous/next cards on both sides. The track spans the screen minus 16px each side
   (the reviews section has wider side padding than New Arrivals). */
@container (max-width: 560px) {
	.afis-scope .afis-reviews-carousel ul.afis-car-track {
		grid-auto-columns: 100%; gap: 14px;
		margin-left: calc(50% - 50vw + 16px); margin-right: calc(50% - 50vw + 16px);
		padding-left: calc((100vw - 32px) * .11); padding-right: calc((100vw - 32px) * .11);
		scroll-padding-inline: calc((100vw - 32px) * .11);
	}
	.afis-reviews-carousel .afis-slide { scroll-snap-align: center; }
}

/* ---------- Browse by type ---------- */
.afis-types { container-type: inline-size; }
.afis-types-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 20px; }
.afis-types-grid li { margin: 0; }
.afis-type-tile {
	position: relative; display: flex; flex-direction: column; justify-content: flex-start; gap: 6px; aspect-ratio: 5 / 6; padding: 22px;
	border-radius: var(--afis-radius); overflow: hidden; background: #2a2a2a; color: #fff !important; text-decoration: none !important; isolation: isolate;
}
.afis-type-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; transition: transform .4s; }
/* Dark gradient at the top keeps the text readable over any photo. */
.afis-type-tile::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(0, 0, 0, .65) 0%, rgba(0, 0, 0, .15) 55%, rgba(0, 0, 0, 0) 100%); }
.afis-type-tile:hover .afis-type-img { transform: scale(1.05); }
/* Car photos from the dealer have a printed banner at the top and bottom:
   enlarge and center the photo so both banners fall outside the tile. */
.afis-type-img.is-auto { top: -17.5%; height: 135%; inset-inline: 0; bottom: auto; }
.afis-type-count { font-size: .95rem; opacity: .9; }
.afis-type-name { font-size: 1.25rem; font-weight: 700; }
@container (max-width: 560px) { .afis-types-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; } .afis-type-tile { padding: 16px; } }

/* ---------- Browse by type: full-width panels (layout="panels") ---------- */
.afis-panels { width: 100%; }
.afis-panels-title { text-align: center; margin: 0 0 28px !important; }
.afis-scope ul.afis-panels-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; }
.afis-panels-grid li { margin: 0; }
.afis-panel {
	position: relative; display: flex; align-items: center; justify-content: center; aspect-ratio: 9 / 8; overflow: hidden; isolation: isolate;
	background: #0b0c10; color: #fff !important; text-decoration: none !important; outline-offset: -3px;
}
.afis-panel-img, .afis-panel-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
/* Dealer photos have printed banners: enlarge so they fall outside the panel. */
.afis-panel-img.is-auto { top: -17.5%; height: 135%; bottom: auto; }
.afis-panel-img { filter: brightness(.45) saturate(.7) blur(1px); transform: scale(1.02); transition: filter .5s ease, transform .8s ease, opacity .5s ease; }
.afis-panel-video { opacity: 0; transition: opacity .6s ease; }
.afis-panel.is-playing .afis-panel-video { opacity: 1; }
.afis-panel.is-playing .afis-panel-img { opacity: 0; }
.afis-panel:hover .afis-panel-img, .afis-panel:focus-visible .afis-panel-img { filter: brightness(.6) saturate(.85) blur(0); transform: scale(1.06); }
/* Vignette + thin divider lines between panels */
.afis-panel::after { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; background: radial-gradient(ellipse 80% 70% at 50% 50%, rgba(5, 6, 9, .15) 0%, rgba(5, 6, 9, .75) 100%); box-shadow: inset 0 0 0 .5px rgba(255, 255, 255, .06); transition: background .5s ease; }
.afis-panel:hover::after, .afis-panel:focus-visible::after { background: radial-gradient(ellipse 80% 70% at 50% 50%, rgba(5, 6, 9, 0) 0%, rgba(5, 6, 9, .6) 100%); }
.afis-panel-body { display: flex; flex-direction: column; align-items: center; gap: 22px; padding: 24px; text-align: center; }
.afis-panel-name { font-size: clamp(28px, 3vw, 44px); font-weight: 800; letter-spacing: .08em; text-transform: uppercase; line-height: 1.05; text-shadow: 0 2px 24px rgba(0, 0, 0, .6); }
.afis-panel-btn {
	display: inline-block; padding: 12px 26px; border: 1px solid rgba(255, 255, 255, .6); border-radius: 10px; background: rgba(0, 0, 0, .35); backdrop-filter: blur(6px);
	font-size: 12px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; transition: border-color .25s, box-shadow .25s, background .25s;
}
.afis-panel:hover .afis-panel-btn, .afis-panel:focus-visible .afis-panel-btn { border-color: rgba(255, 42, 54, .55); background: rgba(255, 42, 54, .12); box-shadow: 0 0 18px rgba(255, 42, 54, .35); }
@media (max-width: 1024px) { .afis-scope ul.afis-panels-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .afis-scope ul.afis-panels-grid { grid-template-columns: 1fr; } .afis-panel { aspect-ratio: 16 / 10; } }

/* ---------- Brands in stock ---------- */
.afis-brands .afis-section-title { margin-bottom: 16px; text-align: center; }
.afis-brands-viewport { overflow: hidden; }
.afis-brands-track { display: flex; align-items: center; gap: 16px; width: max-content; }
.afis-brands.is-static .afis-brands-track { width: auto; flex-wrap: wrap; justify-content: center; }
.afis-brands-track li { margin: 0; flex: none; }
.afis-brand {
	display: flex; align-items: center; justify-content: center; min-width: 140px; height: 72px; padding: 12px 22px;
	border: 1px solid var(--afis-line); border-radius: var(--afis-radius-sm); background: var(--afis-bg); text-decoration: none !important;
	color: var(--afis-ink) !important; transition: border-color .2s;
}
.afis-brand:hover, .afis-brand:focus-visible { border-color: var(--afis-accent); }
.afis-brand img { max-height: 44px; max-width: 120px; width: auto; object-fit: contain; }
.afis-brand-name { font-weight: 700; letter-spacing: .06em; text-transform: uppercase; font-size: .92rem; white-space: nowrap; }
.afis-brands.is-scrolling .afis-brands-track { animation: afis-marquee calc(var(--afis-brand-count, 10) * 3.5s) linear infinite; }
.afis-brands.is-scrolling:hover .afis-brands-track, .afis-brands.is-scrolling:focus-within .afis-brands-track { animation-play-state: paused; }
/* With JS the strip is a real scroll area: it auto-scrolls and can be dragged (mouse) or swiped (touch). */
.afis-brands.is-js .afis-brands-track { animation: none; }
.afis-brands.is-js .afis-brands-viewport { overflow-x: auto; scrollbar-width: none; cursor: grab; touch-action: pan-x pan-y; -webkit-overflow-scrolling: touch; padding: 10px 0; }
.afis-brands.is-js .afis-brands-viewport::-webkit-scrollbar { display: none; }
.afis-brands.is-js.is-dragging .afis-brands-viewport { cursor: grabbing; user-select: none; }
.afis-brands.is-js.is-dragging .afis-brand { pointer-events: none; }
@keyframes afis-marquee { from { transform: translateX(0); } to { transform: translateX(calc(-50% - 8px)); } }

/* ==========================================================================
   Dark theme: add theme="dark" to any shortcode. Same markup, dark palette
   with thin borders, glass panels and a red glow on hover.
   ========================================================================== */
.afis-theme-dark {
	--afis-ink: #f4f5f7;
	--afis-muted: #9ba1ab;
	--afis-line: rgba(255, 255, 255, .10);
	--afis-bg: #0e0f13;
	--afis-card-bg: #14151a;
	--afis-accent: #ff2a36;
	--afis-glow: rgba(255, 42, 54, .35);
	color: var(--afis-ink);
	color-scheme: dark; /* native scrollbars, checkboxes and selects in dark */
}
.afis-theme-dark .afis-card {
	background: linear-gradient(180deg, #18191f 0%, #111216 100%);
}
/* Border drawn on top of the photo (an overlay), so the top edge stays visible on hover. */
.afis-theme-dark .afis-card::before {
	content: ""; position: absolute; inset: 0; z-index: 3; pointer-events: none; border-radius: inherit;
	border: 1px solid rgba(255, 255, 255, .08); transition: border-color .25s;
}
.afis-theme-dark .afis-card:hover::before { border-color: rgba(255, 42, 54, .55); }
.afis-theme-dark .afis-card:hover {
	box-shadow: 0 0 0 1px var(--afis-glow), 0 18px 50px rgba(255, 42, 54, .18);
}
.afis-theme-dark .afis-card-media { background: #1b1c22; }
/* The light placeholder becomes a dark one. */
.afis-theme-dark .afis-card--nophoto .afis-card-media img { filter: invert(.92); background: #ececec; }
.afis-theme-dark .afis-badge { box-shadow: 0 0 14px var(--afis-glow); }
.afis-theme-dark .afis-details { color: #fff; }
.afis-theme-dark .afis-card:hover .afis-details { color: var(--afis-accent); text-shadow: 0 0 12px var(--afis-glow); }

/* Reviews */
.afis-theme-dark .afis-review { background: linear-gradient(180deg, #18191f 0%, #111216 100%); border-color: rgba(255, 255, 255, .08); }
.afis-theme-dark .afis-review:hover { border-color: rgba(255, 42, 54, .55); box-shadow: 0 0 0 1px var(--afis-glow), 0 18px 50px rgba(255, 42, 54, .18); }
.afis-theme-dark .afis-stars { filter: drop-shadow(0 0 6px var(--afis-glow)); }
.afis-theme-dark .afis-review-quote { opacity: .22; filter: drop-shadow(0 0 10px var(--afis-glow)); }
.afis-theme-dark .afis-review-avatar { background: rgba(255, 42, 54, .12); border: 1px solid rgba(255, 42, 54, .55); box-shadow: 0 0 14px var(--afis-glow); }

/* Carousel controls */
.afis-theme-dark .afis-car-nav { background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .22); backdrop-filter: blur(8px); }
.afis-theme-dark .afis-car-nav:hover { border-color: var(--afis-accent); box-shadow: 0 0 16px var(--afis-glow); }
.afis-theme-dark .afis-car-dot { background: rgba(255, 255, 255, .22); transition: width .25s, background .25s; }
.afis-theme-dark .afis-car-dot[aria-current="true"] { width: 28px; border-radius: 6px; background: var(--afis-accent); box-shadow: 0 0 12px var(--afis-accent); }

/* Section headings */
.afis-theme-dark .afis-section-link { color: #fff !important; }
.afis-theme-dark .afis-section-link:hover { color: var(--afis-accent) !important; }

/* Brands: glass chips, faded edges */
.afis-theme-dark .afis-brands-viewport { -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
/* Glass chips; hover/focus like the hero quick-link buttons (red border, red tint, glow). */
.afis-theme-dark .afis-brand { border-radius: 14px; background: rgba(255, 255, 255, .03); border-color: rgba(255, 255, 255, .10); color: #d9dbe0 !important; backdrop-filter: blur(4px); transition: border-color .25s, box-shadow .25s, background .25s, color .25s; }
.afis-theme-dark .afis-brand:hover, .afis-theme-dark .afis-brand:focus-visible { border-color: var(--afis-accent); background: rgba(255, 42, 54, .12); color: #fff !important; box-shadow: 0 0 18px var(--afis-glow); }

/* Browse by type */
.afis-theme-dark .afis-type-tile { border: 1px solid rgba(255, 255, 255, .08); background: #15161b; }
.afis-theme-dark .afis-type-tile:hover { border-color: rgba(255, 42, 54, .6); box-shadow: 0 0 0 1px var(--afis-glow), 0 16px 44px rgba(255, 42, 54, .2); }
.afis-theme-dark .afis-type-tile::after { background: linear-gradient(180deg, rgba(5, 6, 9, .78) 0%, rgba(5, 6, 9, .2) 55%, rgba(5, 6, 9, .55) 100%); }
.afis-theme-dark .afis-type-name { letter-spacing: .04em; text-transform: uppercase; }

/* Hero search: glass bar */
.afis-search.afis-theme-dark { background: rgba(255, 255, 255, .06); border-color: rgba(255, 255, 255, .28); backdrop-filter: blur(12px); box-shadow: 0 10px 40px rgba(0, 0, 0, .45); transition: border-color .25s, box-shadow .25s, background-color .25s; }
/* Same hover as the hero quick-link buttons: red border, red tint and glow (also while a field has focus). */
.afis-search.afis-theme-dark:hover, .afis-search.afis-theme-dark:focus-within { border-color: rgba(255, 42, 54, .55); background: rgba(255, 42, 54, .12); box-shadow: 0 0 18px var(--afis-glow), 0 10px 40px rgba(0, 0, 0, .45); }
.afis-search.afis-theme-dark .afis-search-btn:hover { box-shadow: 0 0 22px var(--afis-glow); }
/* Inside the glass bar the selects stay transparent (overrides the dark form fields below). */
.afis-scope.afis-search.afis-theme-dark select { background-color: transparent; border: 0; color: #fff; }
.afis-scope.afis-search.afis-theme-dark select option { background: #111216; color: #e6e7ea; }
@supports (appearance: base-select) {
	.afis-search.afis-theme-dark select::picker(select) { background: #111216; border-color: rgba(255, 255, 255, .12); box-shadow: 0 18px 40px rgba(0, 0, 0, .6), 0 0 0 1px rgba(255, 42, 54, .15); }
	.afis-scope.afis-search.afis-theme-dark select option:checked { background: rgba(255, 42, 54, .18); color: #fff; }
	.afis-scope.afis-search.afis-theme-dark select option:hover, .afis-scope.afis-search.afis-theme-dark select option:focus-visible { background: var(--afis-accent); color: #fff; }
}

/* Inventory */
.afis-theme-dark .afis-sidebar { background: rgba(255, 255, 255, .03); border-color: var(--afis-line); }
.afis-theme-dark input[type="number"], .afis-theme-dark input[type="search"], .afis-theme-dark select { background-color: #0b0c10; color: var(--afis-ink); border-color: var(--afis-line); }
.afis-theme-dark .afis-btn-icon, .afis-theme-dark .afis-reset { background: var(--afis-accent); }
.afis-theme-dark .afis-page { color: var(--afis-ink) !important; }
.afis-theme-dark .afis-page.is-current, .afis-theme-dark .afis-page:hover { background: var(--afis-accent); border-color: var(--afis-accent); }
.afis-theme-dark .afis-filters-toggle { background: transparent; color: var(--afis-ink); border-color: var(--afis-line); }
.afis-theme-dark .afis-empty { background: var(--afis-card-bg); }

@media (prefers-reduced-motion: reduce) {
	.afis-card, .afis-sidebar, .afis-type-img, .afis-panel-img { transition: none; }
	.afis-card:hover, .afis-type-tile:hover .afis-type-img { transform: none; }
	.afis-car-track { scroll-behavior: auto; }
	.afis-review { transition: none; }
	.afis-review:hover { transform: none; }
	/* No movement: brands become a wrapped, fixed row and the duplicate copy is hidden. */
	.afis-brands.is-scrolling .afis-brands-track { animation: none; width: auto; flex-wrap: wrap; justify-content: center; }
	.afis-brands.is-scrolling .afis-brand-dup { display: none; }
}

/* ---------- Google reviews: header buttons ---------- */
.afis-reviews-head > .afis-reviews-actions { margin-left: auto; display: flex; flex-wrap: wrap; align-items: center; gap: 12px 22px; }
/* Phones: score and buttons stacked and centered under the section title. */
@media (max-width: 767px) {
	.afis-reviews .afis-reviews-head { flex-direction: column; justify-content: center; text-align: center; gap: 14px; }
	.afis-reviews .afis-reviews-score { justify-content: center; flex-wrap: wrap; }
	.afis-reviews .afis-reviews-head > .afis-reviews-actions, .afis-reviews .afis-reviews-head > .afis-section-link { margin-left: 0; justify-content: center; }
}
.afis-outline-btn {
	display: inline-flex; align-items: center; gap: 8px; padding: 9px 18px; border-radius: 999px; cursor: pointer;
	border: 1px solid var(--afis-accent); background: transparent; color: var(--afis-ink); font: inherit; font-size: .92rem; font-weight: 600; line-height: 1;
	transition: background-color .2s, color .2s, box-shadow .2s;
}
.afis-outline-btn:hover, .afis-outline-btn:focus-visible, .afis-outline-btn:active { background: var(--afis-accent); color: var(--afis-accent-contrast); }
.afis-theme-dark .afis-outline-btn { color: #fff; }
.afis-theme-dark .afis-outline-btn:hover, .afis-theme-dark .afis-outline-btn:focus-visible { box-shadow: 0 0 18px var(--afis-glow); }

/* ---------- TikTok videos ([afis_tiktok]) ---------- */
.afis-tiktok-head { justify-content: center; flex-wrap: wrap; text-align: center; }
.afis-tiktok-head > .afis-tt-follow:only-child { margin: 0 auto; }
.afis-tt-follow {
	display: inline-flex; align-items: center; gap: 8px; padding: 9px 18px; border-radius: 999px; border: 1px solid var(--afis-accent);
	color: var(--afis-ink) !important; text-decoration: none !important; font-size: .92rem; font-weight: 600; line-height: 1; transition: background-color .2s, color .2s, box-shadow .2s;
}
.afis-tt-follow:hover, .afis-tt-follow:focus-visible { background: var(--afis-accent); color: var(--afis-accent-contrast, #fff) !important; box-shadow: 0 0 18px var(--afis-glow, rgba(215, 25, 32, .35)); }
.afis-theme-dark .afis-tt-follow { color: #fff !important; }
.afis-tiktok-carousel .afis-car-track { grid-auto-columns: calc((100% - 4 * var(--afis-gap)) / 5); }
.afis-tt {
	position: relative; display: block; width: 100%; border-radius: var(--afis-radius); overflow: hidden;
	background: #000; border: 1px solid var(--afis-line); transition: transform .25s, border-color .25s, box-shadow .25s;
}
.afis-tt:hover, .afis-tt:focus-within { transform: translateY(-4px); border-color: rgba(255, 42, 54, .5); box-shadow: 0 16px 40px rgba(0, 0, 0, .35), 0 0 22px rgba(255, 42, 54, .18); }
.afis-tt-media { position: relative; display: block; aspect-ratio: 9 / 16; background: #000; }
/* TikTok's paused player as the cover: not clickable itself, so swiping the carousel works on phones. */
.afis-tt-cover { position: absolute; inset: 0; display: block; width: 100%; height: 100%; border: 0; pointer-events: none; }
.afis-tt-hit { position: absolute; inset: 0; z-index: 2; display: block; border-radius: inherit; }
.afis-tt-hit:focus-visible { outline: 2px solid var(--afis-accent); outline-offset: -2px; }
@container (max-width: 1000px) { .afis-tiktok-carousel .afis-car-track { grid-auto-columns: calc((100% - 3 * var(--afis-gap)) / 4); } }
@container (max-width: 760px) { .afis-tiktok-carousel .afis-car-track { grid-auto-columns: calc((100% - 2 * var(--afis-gap)) / 3); } }
/* Phones: one video centered, part of the previous/next videos on both sides. */
@container (max-width: 560px) {
	.afis-scope .afis-tiktok-carousel ul.afis-car-track {
		grid-auto-columns: 100%; gap: 14px;
		margin-left: calc(50% - 50vw + 16px); margin-right: calc(50% - 50vw + 16px);
		padding-left: calc((100vw - 32px) * .15); padding-right: calc((100vw - 32px) * .15);
		scroll-padding-inline: calc((100vw - 32px) * .15);
	}
	.afis-tiktok-carousel .afis-slide { scroll-snap-align: center; }
}
/* Player modal: TikTok's embed player, 9:16, as tall as the screen allows. */
.afis-tt-dialog {
	--afis-tt-w: min(400px, calc(100vw - 32px), calc((100vh - 120px) * 9 / 16));
	width: var(--afis-tt-w); max-width: none; max-height: none; margin: auto; padding: 0; border: 0; background: transparent; overflow: visible;
}
.afis-tt-dialog::backdrop { background: rgba(0, 0, 0, .8); backdrop-filter: blur(3px); }
.afis-tt-frame { width: 100%; aspect-ratio: 9 / 16; border-radius: 14px; overflow: hidden; background: #000; box-shadow: 0 24px 70px rgba(0, 0, 0, .6); }
.afis-tt-frame iframe { display: block; width: 100%; height: 100%; border: 0; }
/* Close button: above the player, lined up with its right edge. It gets focus when the
   modal opens, so only hover / keyboard focus turn it red. */
.afis-tt-close {
	position: absolute; top: -50px; right: 0; width: 40px; height: 40px; padding: 0; margin: 0; border: 0; border-radius: 50%; cursor: pointer;
	display: flex; align-items: center; justify-content: center; background: rgba(255, 255, 255, .14); color: #fff; font-size: 1.6rem; line-height: 1;
}
.afis-tt-close:focus { background: rgba(255, 255, 255, .14); color: #fff; box-shadow: none; outline: none; }
.afis-tt-close:hover, .afis-tt-close:focus-visible, .afis-tt-close:active { background: var(--afis-accent, #d71920); color: #fff; box-shadow: none; }
.afis-tt-out { display: block; margin-top: 12px; text-align: center; color: #fff !important; font-size: .9rem; font-weight: 600; text-decoration: none !important; opacity: .85; }
.afis-tt-out:hover { opacity: 1; color: #ff4b55 !important; }
@media (prefers-reduced-motion: reduce) {
	.afis-tt { transition: none; }
	.afis-tt:hover, .afis-tt:focus-within { transform: none; }
}

/* ---------- Carousel head button (New Arrivals: View All Inventory) ---------- */
.afis-carousel-head { display: flex; justify-content: flex-end; margin: 0 6px -2px; }
.afis-scope a.afis-outline-btn { text-decoration: none !important; }
.afis-theme-dark a.afis-outline-btn, .afis-theme-dark a.afis-outline-btn:visited { color: #fff !important; }
.afis-theme-dark a.afis-outline-btn:hover, .afis-theme-dark a.afis-outline-btn:focus-visible { color: var(--afis-accent-contrast) !important; }
.afis-outline-btn svg { width: 16px; height: 16px; }
@media (max-width: 767px) { .afis-carousel-head { justify-content: center; margin-bottom: 4px; } }

/* ---------- Google reviews: attribution, author photo and link ---------- */
.afis-g { flex: none; display: block; }
.afis-reviews-google .afis-review-source { position: absolute; top: 22px; right: 24px; line-height: 0; }
.afis-review-photo { object-fit: cover; padding: 0; background: rgba(127, 127, 127, .2); }
.afis-theme-dark .afis-review-photo { border: 1px solid rgba(255, 255, 255, .18); box-shadow: none; }
.afis-scope a.afis-review-name { text-decoration: none !important; color: var(--afis-ink) !important; }
.afis-scope a.afis-review-name:hover, .afis-scope a.afis-review-name:focus-visible { text-decoration: underline !important; }
.afis-theme-dark a.afis-review-name { color: #fff !important; }
.afis-reviews-note { margin: 14px 0 0; text-align: center; font-size: .8rem; color: var(--afis-muted); }
