/* Inventory v2 — premium card grid. STM gallery preserved. Sidebar visual untouched (+sticky). */

body.xxs-inventory-page {
	--inv-blue: #6c98e1;
	--inv-blue-dark: #4a7bc4;
	--inv-ink: #1a1d21;
	--inv-muted: #6b7c88;
	--inv-line: rgba(21, 62, 77, 0.1);
	--inv-surf: #f3f6fa;
	--inv-radius: 16px;
	--inv-shadow: 0 2px 16px rgba(21, 62, 77, 0.07);
	--inv-shadow-hover: 0 20px 48px rgba(21, 62, 77, 0.14);
}

body.xxs-inventory-page #main {
	background: var(--inv-surf) !important;
}

body.xxs-inventory-page #main > .container {
	max-width: 1400px;
}

/* ── Layout + sticky sidebar (desktop) ── */
@media (min-width: 992px) {
	/* The top-level content wrapper (body > div, no class, inline min-height) has
	   overflow:hidden which silently breaks position:sticky on the sidebar.
	   Both axes must be visible — a single clipped axis still breaks sticky. */
	body.xxs-inventory-page > div:has(.archive-listing-page) {
		overflow: visible !important;
	}

	body.xxs-inventory-page .archive-listing-page > .container > .row {
		display: flex !important;
		align-items: flex-start !important;
		gap: 28px;
		margin-left: 0;
		margin-right: 0;
	}

	body.xxs-inventory-page .classic-filter-row.col-md-3 {
		position: sticky !important;
		top: 88px;
		float: none !important;
		flex: 0 0 300px;
		width: 300px !important;
		max-width: 300px;
		padding-left: 0;
		padding-right: 0;
	}

	body.xxs-inventory-page .col-md-9.col-sm-12 {
		float: none !important;
		flex: 1 1 0;
		width: auto !important;
		max-width: none;
		min-width: 0;
		padding-left: 0;
		padding-right: 0;
	}
}

/* ── Desktop sidebar dropdowns: modern blue look (matches homepage "Find Vehicles") ── */
body.xxs-inventory-page .classic-filter-row .select2-container {
	width: 100% !important;
}
body.xxs-inventory-page .classic-filter-row .select2-container--default .select2-selection--single {
	height: 50px !important;
	background: #ffffff !important;
	border: 1.5px solid #dce5f0 !important;
	border-radius: 12px !important;
	transition: border-color 0.15s ease, box-shadow 0.15s ease !important;
}
body.xxs-inventory-page .classic-filter-row .select2-container--default.select2-container--focus .select2-selection--single,
body.xxs-inventory-page .classic-filter-row .select2-container--default.select2-container--open .select2-selection--single {
	border-color: #1d6fb8 !important;
	box-shadow: 0 0 0 3px rgba(29, 111, 184, 0.15) !important;
}
body.xxs-inventory-page .classic-filter-row .select2-container--default .select2-selection--single .select2-selection__rendered {
	line-height: 48px !important;
	padding-left: 15px !important;
	padding-right: 38px !important;
	color: #243b53 !important;
	font-weight: 600 !important;
	font-size: 14.5px !important;
}
body.xxs-inventory-page .classic-filter-row .select2-container--default .select2-selection--single .select2-selection__arrow {
	height: 48px !important;
	right: 13px !important;
}
body.xxs-inventory-page .classic-filter-row .select2-container--default .select2-selection--single .select2-selection__arrow b {
	border-color: #6b7c88 transparent transparent transparent !important;
}
/* Opened dropdown panel + options */
body.xxs-inventory-page .select2-dropdown {
	border: 1.5px solid #dce5f0 !important;
	border-radius: 12px !important;
	box-shadow: 0 14px 34px rgba(20, 50, 63, 0.14) !important;
	overflow: hidden !important;
	margin-top: 4px !important;
}
body.xxs-inventory-page .select2-dropdown .select2-search__field {
	border: 1.5px solid #dce5f0 !important;
	border-radius: 9px !important;
	padding: 8px 12px !important;
	outline: none !important;
}
body.xxs-inventory-page .select2-container--default .select2-results__option {
	padding: 9px 15px !important;
	font-size: 14px !important;
	color: #243b53 !important;
}
body.xxs-inventory-page .select2-container--default .select2-results__option--highlighted[aria-selected] {
	background: #1d6fb8 !important;
	color: #ffffff !important;
}
body.xxs-inventory-page .select2-container--default .select2-results__option[aria-selected="true"] {
	background: rgba(29, 111, 184, 0.12) !important;
	color: #14323f !important;
	font-weight: 600 !important;
}

/* ── Desktop sidebar: tighter spacing between filter fields ── */
body.xxs-inventory-page .classic-filter-row .filter-sidebar .form-group {
	margin-bottom: 8px !important;
}
body.xxs-inventory-page .classic-filter-row .filter-sidebar .stm-slider-filter-type-unit {
	margin-top: 2px !important;
	margin-bottom: 8px !important;
}
body.xxs-inventory-page .classic-filter-row .filter-sidebar .stm-slider-filter-type-unit h5 {
	margin: 0 0 8px !important;
}
body.xxs-inventory-page .classic-filter-row .filter-sidebar .stm-price-range-unit {
	margin-bottom: 10px !important;
}

/* ── Toolbar (clean row, no card) ── */
body.xxs-inventory-page #xxsInvHead {
	margin: 0 0 10px !important;
	padding: 0 !important;
	background: transparent !important;
	border: 0 !important;
	border-radius: 0 !important;
	box-shadow: none !important;
}

/* Kill the wasted vertical space above the first product row */
body.xxs-inventory-page .stm-car-listing-sort-units {
	padding-bottom: 0 !important;
	margin-bottom: 10px !important;
}
body.xxs-inventory-page .stm-ajax-row > br {
	display: none !important;
}

body.xxs-inventory-page #xxsInvHead .xxs-inv-head__showing {
	color: var(--inv-muted) !important;
	font-size: 13px !important;
}

body.xxs-inventory-page #xxsInvHead .xxs-inv-head__showing font,
body.xxs-inventory-page #xxsInvHead .xxs-inv-head__showing a {
	color: var(--inv-blue-dark) !important;
	font-weight: 700 !important;
}

/* ── Grid: 3 pe linie desktop ── */
body.xxs-inventory-page #post-data-list.stm-isotope-sorting-list {
	display: grid !important;
	grid-template-columns: 1fr;
	gap: 20px;
	width: 100% !important;
	margin: 0 !important;
	padding: 0 !important;
}

@media (min-width: 992px) {
	body.xxs-inventory-page #post-data-list.stm-isotope-sorting-list {
		grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
	}
}

body.xxs-inventory-page #post-data-list .post-item {
	width: 100% !important;
	margin: 0 !important;
	padding: 0 !important;
	float: none !important;
}

body.xxs-inventory-page #post-data-list .post-item form {
	display: flex;
	height: 100%;
	margin: 0;
}

/* ── Empty state (no filter matches) ── */
body.xxs-inventory-page #post-data-list .xxs-inv-empty {
	grid-column: 1 / -1;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	text-align: center;
	width: 100%;
	max-width: 520px;
	margin: 32px auto 48px;
	padding: 24px 20px 36px;
}

body.xxs-inventory-page #post-data-list .xxs-inv-empty__img {
	display: block;
	width: min(280px, 78vw);
	height: auto;
	margin: 0 auto 20px;
}

body.xxs-inventory-page #post-data-list .xxs-inv-empty__text {
	margin: 0;
	font-family: Montserrat, Arial, sans-serif;
	font-size: 15px;
	font-weight: 500;
	line-height: 1.55;
	color: #5a6270;
	max-width: 420px;
}

/* ── Card shell ── */
body.xxs-inventory-page .listing-list-loop.stm-listing-directory-list-loop {
	display: flex !important;
	flex-direction: column !important;
	width: 100% !important;
	height: 100%;
	margin: 0 !important;
	padding: 0 !important;
	float: none !important;
	border: 1px solid var(--inv-line) !important;
	border-radius: var(--inv-radius) !important;
	background: #fff !important;
	overflow: hidden;
	box-shadow: var(--inv-shadow);
	transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

body.xxs-inventory-page .listing-list-loop.stm-listing-directory-list-loop:hover {
	transform: translateY(-5px);
	box-shadow: var(--inv-shadow-hover);
	border-color: rgba(108, 152, 225, 0.35) !important;
}

/* ── Image: full-width card, STM hover gallery kept intact ──
   Do NOT reposition units/thumbs or add backgrounds: STM keeps thumbs at
   z-index:-2 behind the transparent hover zones that catch the mouse. */
body.xxs-inventory-page .listing-list-loop .image {
	position: relative !important;
	z-index: 0 !important; /* stacking context so STM's z-index:-2 thumbs stay visible above card bg */
	float: none !important;
	width: 100% !important;
	max-width: none !important;
	margin: 0 !important;
	padding: 0 !important;
	overflow: hidden !important;
	background: #e8edf3;
}

body.xxs-inventory-page .listing-list-loop .interactive-hoverable {
	width: 100% !important;
	min-width: 0 !important;
}

/* image-inner is the positioned containing block for STM's absolute .hoverable-wrap.
   It must have a real height, otherwise the whole image area collapses to 0. */
body.xxs-inventory-page .listing-list-loop .image .image-inner {
	position: relative !important;
	width: 100% !important;
	height: 210px !important;
	min-height: 210px !important;
	margin: 0 !important;
}

body.xxs-inventory-page .listing-list-loop .interactive-hoverable .hoverable-wrap {
	display: flex !important;
	width: 100% !important;
}

body.xxs-inventory-page .listing-list-loop .hoverable-unit .thumb img {
	width: 100% !important;
	height: 100% !important;
	object-fit: cover !important;
}

body.xxs-inventory-page .listing-list-loop .image > .video-preview {
	opacity: 1 !important;
}

/* ── Content ── */
body.xxs-inventory-page .listing-list-loop .content {
	display: flex !important;
	flex-direction: column !important;
	flex: 1 1 auto;
	width: 100% !important;
	max-width: none !important;
	float: none !important;
	padding: 14px 16px 16px !important;
	background: #fff !important;
}

body.xxs-inventory-page .listing-list-loop .content .meta-top {
	display: contents !important;
	background: transparent !important;
}

body.xxs-inventory-page .listing-list-loop .content .meta-top .title {
	order: 1;
	margin: 0 0 10px !important;
	padding: 0 !important;
	white-space: normal !important;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	font-family: Montserrat, Arial, sans-serif !important;
	font-size: 14px !important;
	font-weight: 600 !important;
	line-height: 1.4 !important;
	color: var(--inv-ink) !important;
}

/* Spec chips (values only, like model) */
body.xxs-inventory-page .listing-list-loop .content .xxs-inv-chips {
	order: 2;
	display: flex;
	flex-wrap: wrap;
	gap: 5px;
	margin: 0 0 12px;
}

body.xxs-inventory-page .listing-list-loop .content .xxs-inv-chip {
	display: inline-flex;
	align-items: center;
	font-family: Montserrat, Arial, sans-serif;
	font-size: 11px;
	font-weight: 500;
	padding: 3px 9px;
	background: rgba(0, 0, 0, 0.04);
	color: var(--inv-muted);
	border-radius: 20px;
	border: 1px solid var(--inv-line);
	line-height: 1.3;
	text-transform: capitalize;
}

/* Auction ends — clear labelled row (moved off the photo) */
body.xxs-inventory-page .listing-list-loop .content .xxs-inv-ends {
	order: 3;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 2px;
	margin: 0 0 10px;
	padding: 8px 14px;
	background: rgba(217, 83, 79, 0.08);
	border: 1px solid rgba(217, 83, 79, 0.24);
	border-radius: 12px;
}

body.xxs-inventory-page .listing-list-loop .content .xxs-inv-ends__label {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-family: Montserrat, Arial, sans-serif;
	font-size: 10px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: var(--inv-muted);
	white-space: nowrap;
}

body.xxs-inventory-page .listing-list-loop .content .xxs-inv-ends__label i {
	font-size: 13px;
	color: #d9534f;
}

body.xxs-inventory-page .listing-list-loop .content .xxs-inv-ends__time {
	display: inline-flex !important;
	align-items: center;
	margin: 0 !important;
	padding: 0 !important;
	opacity: 1 !important;
	color: var(--inv-ink) !important;
	background: none !important;
}

body.xxs-inventory-page .listing-list-loop .content .xxs-inv-ends__time .xxs-countdown-wrap,
body.xxs-inventory-page .listing-list-loop .content .xxs-inv-ends__time .xxs-countdown-inner {
	display: inline-flex !important;
	align-items: center;
	gap: 4px;
}

body.xxs-inventory-page .listing-list-loop .content .xxs-inv-ends__time .xxs-countdown-hms,
body.xxs-inventory-page .listing-list-loop .content .xxs-inv-ends__time .xxs-countdown-days {
	font-family: Montserrat, Arial, sans-serif;
	font-size: 13px;
	font-weight: 700;
	color: #c0392b;
	white-space: nowrap;
	font-variant-numeric: tabular-nums;
	font-feature-settings: "tnum" 1;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

/* Mobile/tablet: cards are full-width, so keep "Auction ends in" + timer on one row */
@media (max-width: 991px) {
	body.xxs-inventory-page .listing-list-loop .content .xxs-inv-ends {
		flex-direction: row;
		align-items: center;
		justify-content: space-between;
		gap: 10px;
	}
}

/* Prices — BID + BUY IT NOW rendered as clear tappable BUTTONS */
body.xxs-inventory-page .listing-list-loop .content .meta-top .price.xxs-inv-prices {
	order: 4;
	display: flex !important;
	flex-direction: column !important;
	gap: 8px !important;
	width: 100% !important;
	margin: auto 0 0 !important;
	padding: 0 !important;
	background: transparent !important;
	border: 0 !important;
	overflow: visible !important;
}

/* Kill STM's skewed blue ribbon tail (.price:before) that leaks out on the left */
body.xxs-inventory-page .listing-list-loop .content .meta-top .price.xxs-inv-prices::before,
body.xxs-inventory-page .listing-list-loop .content .meta-top .price.xxs-inv-prices::after {
	display: none !important;
	content: none !important;
}

body.xxs-inventory-page .listing-list-loop .content .meta-top .price.xxs-inv-prices .xxs-inv-price-line {
	display: flex !important;
	align-items: center !important;
	justify-content: space-between !important;
	gap: 10px !important;
	width: 100% !important;
	text-align: left !important;
	border-radius: 11px !important;
	cursor: pointer !important;
	transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease, border-color 0.2s ease, filter 0.2s ease;
}

body.xxs-inventory-page .listing-list-loop .content .meta-top .price.xxs-inv-prices .xxs-inv-price-amount {
	font-variant-numeric: tabular-nums;
	font-feature-settings: "tnum" 1;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

/* BID — secondary pale-green button */
body.xxs-inventory-page .listing-list-loop .content .meta-top .price.xxs-inv-prices .xxs-inv-price-line--bid {
	padding: 9px 14px !important;
	background: rgba(56, 168, 110, 0.13) !important;
	border: 1.5px solid rgba(56, 168, 110, 0.4) !important;
}

body.xxs-inventory-page .listing-list-loop .content .meta-top .price.xxs-inv-prices .xxs-inv-price-line--bid .xxs-inv-price-label {
	font-size: 10.5px !important;
	font-weight: 700 !important;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: #2c7a51 !important;
	opacity: 0.9;
}

body.xxs-inventory-page .listing-list-loop .content .meta-top .price.xxs-inv-prices .xxs-inv-price-line--bid .xxs-inv-price-amount {
	color: #2c7a51 !important;
	font-size: 18px !important;
	font-weight: 800 !important;
	line-height: 1.05 !important;
}

body.xxs-inventory-page .listing-list-loop .content .meta-top .price.xxs-inv-prices .xxs-inv-price-line--bid:hover {
	background: rgba(56, 168, 110, 0.22) !important;
	border-color: rgba(56, 168, 110, 0.7) !important;
	transform: translateY(-1px);
}

/* BUY IT NOW — primary filled CTA button */
body.xxs-inventory-page .listing-list-loop .content .meta-top .price.xxs-inv-prices .xxs-inv-price-line--buy {
	padding: 11px 16px !important;
	background: linear-gradient(135deg, var(--inv-blue) 0%, var(--inv-blue-dark) 100%) !important;
	border: 1.5px solid transparent !important;
	box-shadow: 0 8px 20px rgba(108, 152, 225, 0.32);
}

body.xxs-inventory-page .listing-list-loop .content .meta-top .price.xxs-inv-prices .xxs-inv-price-line--buy .xxs-inv-price-label {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-size: 11px !important;
	font-weight: 800 !important;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: #fff !important;
}

body.xxs-inventory-page .listing-list-loop .content .meta-top .price.xxs-inv-prices .xxs-inv-price-line--buy .xxs-inv-price-amount {
	color: #fff !important;
	font-size: 18px !important;
	font-weight: 800 !important;
	line-height: 1.05 !important;
}

body.xxs-inventory-page .listing-list-loop .content .meta-top .price.xxs-inv-prices .xxs-inv-price-line--buy:hover {
	transform: translateY(-1px);
	box-shadow: 0 12px 26px rgba(108, 152, 225, 0.45);
	filter: brightness(1.05);
}

/* ── Inventory mode (/inventory): show only the Buy It Now button ──
   Hide the countdown row and the Bid button. */
body.xxs-mode-inventory .listing-list-loop .xxs-inv-ends,
body.xxs-mode-inventory .listing-list-loop .content .meta-top .price.xxs-inv-prices .xxs-inv-price-line--bid {
	display: none !important;
}

body.xxs-inventory-page .guest-load-more-wrap {
	margin: 28px 0 12px;
}

body.xxs-inventory-page #guest-load-more-btn {
	min-width: 240px;
	border-radius: 999px;
	box-shadow: 0 10px 28px rgba(108, 152, 225, 0.28);
}

/* ── Pagination ── */
body.xxs-inventory-page .xxs-pager {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 8px;
	margin: 32px 0 8px;
	padding: 0;
}

body.xxs-inventory-page a.xxs-pager__btn,
body.xxs-inventory-page span.xxs-pager__btn,
body.xxs-inventory-page button.xxs-pager__btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 42px;
	height: 42px;
	margin: 0;
	padding: 0 12px;
	border: 1.5px solid var(--inv-line) !important;
	border-radius: 12px !important;
	background: #fff !important;
	color: #243b53 !important;
	font-family: Montserrat, Arial, sans-serif !important;
	font-size: 14px;
	font-weight: 700;
	line-height: 1;
	text-decoration: none !important;
	text-transform: none !important;
	cursor: pointer;
	box-shadow: none;
	transition: border-color 0.15s ease, background-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
	-webkit-appearance: none;
	appearance: none;
}

body.xxs-inventory-page a.xxs-pager__btn:hover,
body.xxs-inventory-page button.xxs-pager__btn:hover {
	border-color: var(--inv-blue, #6c98e1) !important;
	color: var(--inv-blue-dark, #1d6fb8) !important;
	box-shadow: 0 6px 16px rgba(108, 152, 225, 0.22);
}

body.xxs-inventory-page .xxs-pager__btn.is-current {
	border-color: var(--inv-blue, #6c98e1) !important;
	background: var(--inv-blue, #6c98e1) !important;
	color: #fff !important;
	cursor: default;
	box-shadow: 0 8px 20px rgba(108, 152, 225, 0.32);
}

body.xxs-inventory-page .xxs-pager__btn.is-disabled {
	opacity: 0.45;
	cursor: default;
	box-shadow: none;
}

body.xxs-inventory-page .xxs-pager__nav {
	font-size: 20px;
	font-weight: 700;
}

body.xxs-inventory-page .xxs-pager__gap {
	display: inline-flex;
	align-items: flex-end;
	justify-content: center;
	min-width: 20px;
	height: 42px;
	padding-bottom: 6px;
	color: var(--inv-muted, #5a6270);
	font-weight: 700;
}

@media (max-width: 991px) {
	body.xxs-inventory-page .xxs-pager {
		gap: 6px;
		margin: 24px 0 6px;
	}
	body.xxs-inventory-page .xxs-pager__btn {
		min-width: 38px;
		height: 38px;
		padding: 0 9px;
		font-size: 13px;
	}
	body.xxs-inventory-page .xxs-pager__gap {
		height: 38px;
	}
}
