/**
 * Biltmore Motors — shop / auctions archive
 * Scoped under .biltmore-shop-auctions and body.biltmore-shop-auctions-page
 */

.biltmore-shop-auctions,
.bma-endpoint-auctions.biltmore-shop-auctions,
body.biltmore-shop-auctions-page {
	--bsa-bg: #fafafa;
	--bsa-bg-2: #f4f5f7;
	--bsa-bg-3: #ffffff;
	--bsa-text: #0a0b0d;
	--bsa-text-secondary: #5c6370;
	--bsa-text-muted: #8b919a;
	--bsa-border: #e8eaed;
	--bsa-brand: #ff2800;
	--bsa-brand-soft: rgba(255, 40, 0, 0.08);
	--bsa-brand-border: rgba(255, 40, 0, 0.35);
	--bsa-warm-soft: rgba(255, 176, 32, 0.1);
	--bsa-warm-border: rgba(255, 176, 32, 0.35);
	--hau-success-soft: #ecfdf5;
	--hau-success-border: #cce8d6;
	--hau-success-text: #2f6b4f;
	--bsa-grad-brand: linear-gradient(135deg, #ff2800 0%, #ff6b35 100%);
	--bsa-radius-sm: 8px;
	--bsa-radius-md: 12px;
	--bsa-radius-lg: 16px;
	--bsa-radius-pill: 999px;
	--bsa-shadow-sm: 0 2px 8px rgba(10, 11, 13, 0.06);
	--bsa-shadow-md: 0 8px 24px rgba(10, 11, 13, 0.08);
	--bsa-mono: "SF Mono", "Consolas", "Monaco", monospace;
}

body.biltmore-shop-auctions-page .autobid_header_title_breadcrumbs,
body.biltmore-shop-auctions-page .page-title {
	display: none !important;
}

body.biltmore-shop-auctions-page .high-padding {
	padding-top: 0 !important;
	padding-bottom: 64px !important;
	background: transparent !important;
}

body.biltmore-shop-auctions-page .high-padding > .container.blog-posts {
	max-width: 1200px !important;
}

.biltmore-shop-auctions *,
.biltmore-shop-auctions *::before,
.biltmore-shop-auctions *::after {
	box-sizing: border-box;
}

/* Hero */
.bsa-hero {
	position: relative;
	overflow: hidden;
	padding: 56px 0 48px;
	background: var(--bsa-bg-3);
	border-bottom: 1px solid var(--bsa-border);
	width: 100%;
	max-width: 100%;
	margin-left: 0;
	margin-right: 0;
	left: auto;
	right: auto;
}

.bsa-hero-bg {
	position: absolute;
	inset: 0;
	background:
		radial-gradient(ellipse 80% 60% at 50% -10%, rgba(255, 40, 0, 0.07), transparent 55%),
		linear-gradient(180deg, #fff 0%, var(--bsa-bg) 100%);
	pointer-events: none;
}

.bsa-hero-grid-lines {
	position: absolute;
	inset: 0;
	opacity: 0.35;
	background-image:
		linear-gradient(var(--bsa-border) 1px, transparent 1px),
		linear-gradient(90deg, var(--bsa-border) 1px, transparent 1px);
	background-size: 48px 48px;
	mask-image: linear-gradient(180deg, #000 0%, transparent 85%);
	pointer-events: none;
}

.bsa-container {
	width: 100%;
	max-width: 1140px;
	margin: 0 auto;
	padding: 0 24px;
}

.bsa-hero-content {
	position: relative;
	z-index: 1;
	max-width: 760px;
	margin: 0 auto;
	text-align: center;
}

.bsa-section-label {
	display: inline-flex;
	padding: 8px 16px;
	background: var(--bsa-warm-soft);
	border: 1px solid var(--bsa-warm-border);
	border-radius: var(--bsa-radius-pill);
	font-family: var(--bsa-mono);
	font-size: 13px !important;
	font-weight: 700;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: #c47a00;
	margin-bottom: 16px;
}

.bsa-section-label.accent {
	background: var(--bsa-brand-soft);
	border-color: var(--bsa-brand-border);
	color: var(--bsa-brand);
}

.bsa-hero-title {
	font-size: clamp(28px, 4vw, 42px) !important;
	font-weight: 700 !important;
	line-height: 1.15 !important;
	letter-spacing: -0.03em;
	margin: 0 0 14px !important;
	color: var(--bsa-text) !important;
}

.bsa-hero-title .brand-grad {
	background: var(--bsa-grad-brand);
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent;
}

.bsa-hero-lead {
	margin: 0 0 24px;
	font-size: 18px !important;
	line-height: 1.65 !important;
	color: var(--bsa-text-secondary) !important;
}

.bsa-hero-stats {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 12px;
	margin-bottom: 22px;
}

.bsa-hero-stat {
	min-width: 150px;
	padding: 14px 18px;
	background: var(--bsa-bg-3);
	border: 1px solid var(--bsa-border);
	border-radius: var(--bsa-radius-md);
	box-shadow: var(--bsa-shadow-sm);
}

.bsa-hero-stat--warm {
	border-color: var(--bsa-warm-border);
	background: rgba(255, 255, 255, 0.96);
}

.bsa-hero-stat-value {
	display: block;
	font-size: 28px !important;
	font-weight: 700 !important;
	line-height: 1.1 !important;
	color: var(--bsa-text) !important;
}

.bsa-hero-stat-label {
	display: block;
	margin-top: 4px;
	font-size: 13px !important;
	font-weight: 600;
	color: var(--bsa-text-muted) !important;
}

.bsa-hero-trust {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 10px 18px;
	margin-bottom: 24px;
	font-size: 14px !important;
	font-weight: 600;
	color: var(--bsa-text-secondary) !important;
}

.bsa-hero-trust i {
	color: var(--bsa-brand);
	margin-right: 6px;
}

.bsa-hero-actions {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 12px;
}

.bsa-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 12px 22px;
	border-radius: var(--bsa-radius-pill);
	font-size: 15px !important;
	font-weight: 700;
	text-decoration: none !important;
	transition: 0.2s ease;
}

.bsa-btn-primary {
	background: var(--bsa-brand);
	border: 2px solid var(--bsa-brand);
	color: #fff !important;
}

.bsa-btn-primary:hover {
	background: #e02400;
	border-color: #e02400;
	color: #fff !important;
}

.bsa-btn-secondary {
	background: var(--bsa-bg-3);
	border: 1px solid var(--bsa-border);
	color: var(--bsa-text) !important;
}

.bsa-btn-secondary:hover {
	border-color: var(--bsa-brand-border);
	color: var(--bsa-brand) !important;
}

/* Layout — filters left, auctions right */
.bsa-shop-layout {
	display: grid;
	grid-template-columns: 300px minmax(0, 1fr);
	gap: 24px;
	align-items: start;
	width: 100%;
}

.bsa-shop-layout--no-sidebar {
	grid-template-columns: minmax(0, 1fr);
}

.bsa-shop-aside,
.bsa-shop-main {
	min-width: 0;
	width: 100% !important;
	max-width: none !important;
	float: none !important;
	clear: none !important;
	padding: 0 !important;
	margin: 0 !important;
	order: unset !important;
}

body.biltmore-shop-auctions-page .bsa-shop-aside.sidebar-content,
body.biltmore-shop-auctions-page.woocommerce.archive .bsa-shop-aside.sidebar-content {
	background: transparent !important;
	box-shadow: none !important;
	border-radius: 0 !important;
}

@media (min-width: 992px) {
	body.biltmore-shop-auctions-page .bsa-shop-aside.sidebar-content,
	body.biltmore-shop-auctions-page.woocommerce.archive .bsa-shop-aside.sidebar-content {
		overflow: visible !important;
	}
}

@media (max-width: 991px) {
	body.biltmore-shop-auctions-page .bsa-shop-aside.sidebar-content,
	body.biltmore-shop-auctions-page.woocommerce.archive .bsa-shop-aside.sidebar-content {
		overflow-y: auto !important;
		overflow-x: hidden !important;
		-webkit-overflow-scrolling: touch;
	}

	body.biltmore-shop-auctions-page .bsa-filters-panel {
		overflow: visible;
	}
}

.bsa-shop-main.biltmore-home-about-poc {
	width: 100% !important;
	max-width: none !important;
	margin: 0 !important;
	padding: 0 !important;
	float: none !important;
}

@media (min-width: 993px) {
	body.biltmore-shop-auctions-page .container.blog-posts > .bsa-shop-layout {
		display: grid !important;
		flex-direction: row !important;
	}

	body.biltmore-shop-auctions-page .container.blog-posts > .row {
		display: block !important;
	}

	body.biltmore-shop-auctions-page .bsa-shop-aside {
		grid-column: 1;
		grid-row: 1;
	}

	body.biltmore-shop-auctions-page .bsa-shop-main {
		grid-column: 2;
		grid-row: 1;
	}

	body.biltmore-shop-auctions-page .bsa-shop-layout--no-sidebar .bsa-shop-main {
		grid-column: 1 / -1;
	}
}

.biltmore-shop-auctions .autobid-shop-sort-group nav.gridlist-toggle {
	display: none !important;
}

/* Homepage auction cards inside shop */
.biltmore-shop-auctions .bsa-auctions-grid,
.biltmore-shop-auctions .hau-auctions-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 18px;
	margin: 0;
	padding: 0;
}

.biltmore-shop-auctions .bsa-auctions-grid .hau-auction-card,
.biltmore-shop-auctions .hau-auctions-grid .hau-auction-card {
	height: 100%;
}

/* Auction card badges — shop archive (hardcoded colors for reliable pills) */
.biltmore-shop-auctions .hau-auction-media,
body.biltmore-shop-auctions-page .hau-auction-media,
.bsa-shop-main .hau-auction-media {
	position: relative;
}

.biltmore-shop-auctions .hau-auction-media-badges,
body.biltmore-shop-auctions-page .hau-auction-media-badges,
.bsa-shop-main .hau-auction-media-badges {
	position: absolute !important;
	top: 12px !important;
	right: 12px !important;
	left: auto !important;
	bottom: auto !important;
	display: flex !important;
	flex-direction: row;
	align-items: flex-start;
	justify-content: flex-end;
	pointer-events: none;
	z-index: 3;
}

.biltmore-shop-auctions .hau-auction-media-badges--stack,
body.biltmore-shop-auctions-page .hau-auction-media-badges--stack,
.bsa-shop-main .hau-auction-media-badges--stack {
	flex-direction: column !important;
	align-items: flex-end !important;
	gap: 6px !important;
	max-width: calc(100% - 24px);
}

.biltmore-shop-auctions .hau-auction-card--reserve-not-met .hau-auction-media-badges--stack,
body.biltmore-shop-auctions-page .hau-auction-card--reserve-not-met .hau-auction-media-badges--stack,
.bsa-shop-main .hau-auction-card--reserve-not-met .hau-auction-media-badges--stack {
	left: 50% !important;
	right: auto !important;
	transform: translateX(-50%);
	align-items: center !important;
	width: max-content;
	max-width: calc(100% - 24px);
}

.biltmore-shop-auctions .hau-auction-card--reserve-not-met .hau-auction-media-badges--stack .hau-auction-badge,
body.biltmore-shop-auctions-page .hau-auction-card--reserve-not-met .hau-auction-media-badges--stack .hau-auction-badge,
.bsa-shop-main .hau-auction-card--reserve-not-met .hau-auction-media-badges--stack .hau-auction-badge {
	text-align: center !important;
	justify-content: center !important;
}

.biltmore-shop-auctions .hau-auction-badge,
body.biltmore-shop-auctions-page .hau-auction-badge,
.bsa-shop-main .hau-auction-badge {
	display: inline-flex !important;
	align-items: center;
	gap: 6px;
	padding: 6px 12px !important;
	border-radius: 999px !important;
	border: 1px solid transparent;
	background: rgba(255, 255, 255, 0.96) !important;
	box-shadow: 0 2px 8px rgba(10, 11, 13, 0.06) !important;
	font-family: var(--bsa-mono, "Consolas", monospace);
	font-size: 11px !important;
	font-weight: 700 !important;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	line-height: 1.2 !important;
	color: #0a0b0d !important;
	white-space: normal;
	text-align: right;
}

.biltmore-shop-auctions .hau-auction-media-badges--stack .hau-auction-badge,
body.biltmore-shop-auctions-page .hau-auction-media-badges--stack .hau-auction-badge,
.bsa-shop-main .hau-auction-media-badges--stack .hau-auction-badge {
	max-width: 100%;
	text-wrap: balance;
}

.biltmore-shop-auctions .hau-auction-badge--live,
body.biltmore-shop-auctions-page .hau-auction-badge--live,
.bsa-shop-main .hau-auction-badge--live {
	border-color: rgba(255, 40, 0, 0.35) !important;
	color: #ff2800 !important;
}

.biltmore-shop-auctions .hau-auction-badge--live::before,
body.biltmore-shop-auctions-page .hau-auction-badge--live::before,
.bsa-shop-main .hau-auction-badge--live::before {
	content: "";
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: #ff2800;
	flex-shrink: 0;
	animation: bsa-live-pulse 1.6s ease-in-out infinite;
}

.biltmore-shop-auctions .hau-auction-badge--ending-soon,
body.biltmore-shop-auctions-page .hau-auction-badge--ending-soon,
.bsa-shop-main .hau-auction-badge--ending-soon {
	border-color: rgba(255, 176, 32, 0.35) !important;
	color: #c47a00 !important;
}

.biltmore-shop-auctions .hau-auction-badge--reserve-fail,
body.biltmore-shop-auctions-page .hau-auction-badge--reserve-fail,
.bsa-shop-main .hau-auction-badge--reserve-fail {
	border-color: rgba(255, 40, 0, 0.35) !important;
	color: #ff2800 !important;
}

.biltmore-shop-auctions .hau-auction-badge--reserve-fail:not(.hau-auction-badge--relist-note)::before,
body.biltmore-shop-auctions-page .hau-auction-badge--reserve-fail:not(.hau-auction-badge--relist-note)::before,
.bsa-shop-main .hau-auction-badge--reserve-fail:not(.hau-auction-badge--relist-note)::before {
	content: "";
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: #ff2800;
	flex-shrink: 0;
}

.biltmore-shop-auctions .hau-auction-badge--relist-note,
body.biltmore-shop-auctions-page .hau-auction-badge--relist-note,
.bsa-shop-main .hau-auction-badge--relist-note {
	font-size: 10px !important;
	letter-spacing: 0.06em;
}

.biltmore-shop-auctions .hau-auction-badge--reserved,
body.biltmore-shop-auctions-page .hau-auction-badge--reserved,
.bsa-shop-main .hau-auction-badge--reserved {
	border-color: rgba(22, 163, 74, 0.35) !important;
	color: #16a34a !important;
}

.biltmore-shop-auctions .hau-auction-badge--reserved::before,
body.biltmore-shop-auctions-page .hau-auction-badge--reserved::before,
.bsa-shop-main .hau-auction-badge--reserved::before {
	content: "";
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: #16a34a;
	flex-shrink: 0;
}

.biltmore-shop-auctions .hau-auction-badge--ended,
body.biltmore-shop-auctions-page .hau-auction-badge--ended,
.bsa-shop-main .hau-auction-badge--ended {
	border-color: rgba(92, 99, 112, 0.28) !important;
	color: #5c6370 !important;
}

@keyframes bsa-live-pulse {
	0%,
	100% {
		opacity: 1;
		transform: scale(1);
	}
	50% {
		opacity: 0.55;
		transform: scale(0.85);
	}
}

/* Filter panel */
.bsa-filters-panel {
	background: var(--bsa-bg-3);
	border: 1px solid var(--bsa-border);
	border-radius: var(--bsa-radius-lg);
	box-shadow: var(--bsa-shadow-sm);
	overflow: hidden;
	position: sticky;
	top: 92px;
}

.bsa-filters-head {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 12px;
	padding: 18px 18px 14px;
	border-bottom: 1px solid var(--bsa-border);
	background: linear-gradient(180deg, #fff 0%, var(--bsa-bg) 100%);
}

.bsa-filters-head-text {
	display: flex;
	align-items: flex-start;
	gap: 12px;
}

.bsa-filters-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	border-radius: var(--bsa-radius-sm);
	background: var(--bsa-brand-soft);
	border: 1px solid var(--bsa-brand-border);
	color: var(--bsa-brand);
	flex-shrink: 0;
}

.bsa-filters-title {
	margin: 0 0 4px !important;
	font-size: 18px !important;
	font-weight: 700 !important;
	color: var(--bsa-text) !important;
	line-height: 1.2 !important;
}

.bsa-filters-subtitle {
	margin: 0;
	font-size: 13px !important;
	line-height: 1.45 !important;
	color: var(--bsa-text-muted) !important;
}

.bsa-filters-panel {
	position: relative;
}

/* Toolbar */
.biltmore-shop-auctions .autobid-shop-sort-group {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 22px !important;
	padding: 14px 16px;
	background: var(--bsa-bg-3);
	border: 1px solid var(--bsa-border);
	border-radius: var(--bsa-radius-md);
	box-shadow: var(--bsa-shadow-sm);
}

.biltmore-shop-auctions .autobid-shop-sort-group .woocommerce-result-count {
	margin: 0 !important;
	font-size: 14px !important;
	color: var(--bsa-text-muted) !important;
}

.biltmore-shop-auctions .autobid-shop-sort-group .woocommerce-ordering,
.biltmore-shop-auctions .autobid-shop-sort-group form.woocommerce-ordering {
	margin: 0 !important;
}

.biltmore-shop-auctions .autobid-shop-sort-group select.orderby {
	min-width: 210px;
	padding: 10px 14px !important;
	border: 1px solid var(--bsa-border) !important;
	border-radius: var(--bsa-radius-pill) !important;
	background: var(--bsa-bg) !important;
	font-size: 14px !important;
	font-weight: 600 !important;
	color: var(--bsa-text) !important;
}

.biltmore-shop-auctions .autobid-shop-filters-button {
	display: inline-flex !important;
	align-items: center;
	gap: 8px;
	padding: 10px 16px !important;
	border-radius: var(--bsa-radius-pill) !important;
	background: var(--bsa-brand) !important;
	border: 2px solid var(--bsa-brand) !important;
	color: #fff !important;
	font-weight: 700 !important;
	cursor: pointer;
}

.biltmore-shop-auctions .autobid-shop-sort-group nav.gridlist-toggle {
	margin: 0 !important;
}

.biltmore-shop-auctions .autobid-shop-sort-group .gridlist-toggle a {
	border-radius: var(--bsa-radius-sm) !important;
	border: 1px solid var(--bsa-border) !important;
	background: var(--bsa-bg) !important;
}

.biltmore-shop-auctions .autobid-shop-sort-group .gridlist-toggle a.active {
	border-color: var(--bsa-brand-border) !important;
	background: var(--bsa-brand-soft) !important;
}

.biltmore-shop-auctions .autobid-shop-sort-group .woof_products_top_panel {
	width: 100%;
	margin: 0 !important;
}

.biltmore-shop-auctions .autobid-shop-sort-group .woof_products_top_panel ul {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.biltmore-shop-auctions .autobid-shop-sort-group .woof_products_top_panel li a {
	display: inline-flex;
	padding: 6px 12px;
	border-radius: var(--bsa-radius-pill);
	background: var(--bsa-brand-soft);
	border: 1px solid var(--bsa-brand-border);
	font-size: 12px !important;
	font-weight: 700;
	color: var(--bsa-brand) !important;
}

/* Pagination */
.biltmore-shop-auctions .woocommerce-pagination {
	margin-top: 28px;
}

.biltmore-shop-auctions .woocommerce-pagination ul.page-numbers {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 8px;
	border: none !important;
}

.biltmore-shop-auctions .woocommerce-pagination ul.page-numbers li {
	border: none !important;
}

.biltmore-shop-auctions .woocommerce-pagination ul.page-numbers a,
.biltmore-shop-auctions .woocommerce-pagination ul.page-numbers span {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 40px;
	height: 40px;
	padding: 0 12px;
	border-radius: var(--bsa-radius-sm) !important;
	border: 1px solid var(--bsa-border) !important;
	background: var(--bsa-bg-3) !important;
	font-weight: 700 !important;
}

.biltmore-shop-auctions .woocommerce-pagination ul.page-numbers span.current {
	background: var(--bsa-brand) !important;
	border-color: var(--bsa-brand) !important;
	color: #fff !important;
}

/* Mobile filters drawer */
@media (max-width: 991px) {
	.bsa-shop-layout {
		display: block;
	}

	.bsa-shop-aside {
		margin-bottom: 20px;
	}

	.bsa-hero {
		padding: 40px 0 32px;
	}

	.bsa-hero-stats {
		flex-direction: column;
		align-items: stretch;
	}

	.bsa-filters-panel {
		position: static;
	}

	body.biltmore-shop-auctions-page .autobid-shop-sidebar.is-active .bsa-filters-panel {
		box-shadow: var(--bsa-shadow-md);
	}

	.biltmore-shop-auctions .bsa-auctions-grid,
	.biltmore-shop-auctions .hau-auctions-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 14px;
	}
}

@media (max-width: 767px) {
	.biltmore-shop-auctions .bsa-auctions-grid,
	.biltmore-shop-auctions .hau-auctions-grid {
		grid-template-columns: 1fr;
	}

	.biltmore-shop-auctions .autobid-shop-sort-group {
		flex-direction: column;
		align-items: stretch;
	}

	.biltmore-shop-auctions .autobid-shop-sort-group select.orderby {
		min-width: 0;
		width: 100%;
	}
}

@media (max-width: 640px) {
	.biltmore-shop-auctions .bsa-auctions-grid,
	.biltmore-shop-auctions .hau-auctions-grid {
		grid-template-columns: 1fr;
	}

	.bsa-hero-actions {
		flex-direction: column;
	}

	.bsa-btn {
		width: 100%;
	}
}
