/**
 * VV Child Theme — Clean Integrated Inventory Filter Styles
 *
 * Pixel-perfect implementation matching light rounded card aesthetic & multi-select tag pills.
 */

/* ── Hide Old WooCommerce Product Categories Widget ───────────────────────── */
.widget_product_categories {
	display: none !important;
}

/* ── Fix Sidebar Parallax / Sticky Scroll Glitch ───────────────────────── */
#sidebar,
.post-type-archive-product #sidebar,
.woocommerce #sidebar,
#sidebar.sticky-sidebar,
.woocommerce #sidebar.sticky-sidebar,
.vv-widget-car-filters {
	transform: none !important;
	will-change: auto !important;
	transition: none !important;
	position: relative !important;
	top: auto !important;
}

.vv-widget-car-filters {
	margin: 0 0 24px 0 !important;
	padding: 0 !important;
	background: transparent !important;
	border: none !important;
}

.vv-filter-panel {
	width: 100% !important;
	max-width: 100% !important;
	display: flex;
	flex-direction: column;
	gap: 12px;
	font-family: 'Manrope', -apple-system, BlinkMacSystemFont, sans-serif;
}

.vv-filter-card {
	background: transparent;
	border: none;
	border-bottom: 1px solid #eeeeee;
	border-radius: 0;
	padding: 16px 0;
	box-shadow: none;
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.vv-filter-card--general {
	border-bottom: 1px solid #eeeeee;
	padding-top: 0;
}

.vv-filter-card__header {
	display: flex;
	align-items: center;
	justify-content: space-between;
}

.vv-filter-card__title {
	font-size: 0.95rem;
	font-weight: 800;
	color: #111111;
	margin: 0;
	letter-spacing: -0.01em;
}

.vv-filter-card__subtitle {
	font-size: 0.88rem;
	font-weight: 800;
	color: #111111;
	margin: 0;
	letter-spacing: -0.01em;
}

.vv-filter-reset-all {
	font-size: 0.78rem;
	font-weight: 700;
	color: #888888;
	text-decoration: none;
	transition: color 0.2s ease;
}

.vv-filter-reset-all:hover {
	color: #e8001c;
}

.vv-filter-card__toggle {
	background: none;
	border: none;
	padding: 0;
	font-size: 14px;
	color: #888888;
	cursor: pointer;
	transition: transform 0.2s ease, color 0.2s ease;
}

.vv-filter-card__toggle:hover {
	color: #111111;
}

.vv-filter-card--collapsed .vv-filter-card__body {
	display: none;
}

.vv-filter-card--collapsed .vv-filter-card__toggle {
	transform: rotate(45deg);
}

.vv-filter-card__body {
	display: flex;
	flex-direction: column;
	gap: 14px;
	margin-top: 4px;
}

/* ── Multi-Select Tag Control ─────────────────────────────────────────── */
.vv-multiselect {
	position: relative;
	width: 100%;
}

.vv-multiselect__box {
	min-height: 48px;
	background: #f1f5f9;
	border: 1px solid transparent;
	border-radius: 14px;
	padding: 6px 12px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	cursor: pointer;
	transition: background 0.2s ease, border-color 0.2s ease;
	user-select: none;
}

.vv-multiselect__box:hover,
.vv-multiselect__box:focus,
.vv-multiselect--open .vv-multiselect__box {
	background: #ffffff;
	border-color: #cbd5e1;
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.vv-multiselect__tags {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px;
	flex: 1;
}

.vv-multiselect__placeholder {
	font-size: 0.88rem;
	font-weight: 500;
	color: #64748b;
}

.vv-tag-pill {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	background: #ffffff;
	border: 1px solid rgba(0, 0, 0, 0.08);
	border-radius: 8px;
	padding: 4px 10px;
	font-size: 0.82rem;
	font-weight: 700;
	color: #0f172a;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.vv-tag-remove {
	background: none;
	border: none;
	padding: 0;
	font-size: 13px;
	font-weight: 800;
	color: #e8001c;
	cursor: pointer;
	line-height: 1;
	margin-left: 2px;
}

.vv-tag-remove:hover {
	opacity: 0.75;
}

.vv-multiselect__controls {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-left: 8px;
}

.vv-multiselect__clear {
	background: none;
	border: none;
	padding: 0;
	font-size: 15px;
	font-weight: 800;
	color: #e8001c;
	cursor: pointer;
	line-height: 1;
}

.vv-multiselect__clear:hover {
	opacity: 0.75;
}

.vv-multiselect__arrow {
	font-size: 12px;
	color: #94a3b8;
	transition: transform 0.2s ease;
}

.vv-multiselect--open .vv-multiselect__arrow {
	transform: rotate(180deg);
}

.vv-multiselect__dropdown {
	position: absolute;
	top: calc(100% + 4px);
	left: 0;
	right: 0;
	background: #ffffff;
	border: 1px solid #e2e8f0;
	border-radius: 12px;
	box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
	z-index: 100;
	max-height: 220px;
	overflow-y: auto !important;
	-webkit-overflow-scrolling: touch !important;
	overscroll-behavior: contain;
	touch-action: pan-y;
	padding: 8px;
	display: none;
	flex-direction: column;
	gap: 4px;
}

.vv-multiselect--open .vv-multiselect__dropdown {
	display: flex;
}

.vv-multiselect__option {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 8px 10px;
	border-radius: 8px;
	font-size: 0.85rem;
	font-weight: 600;
	color: #334155;
	cursor: pointer;
	transition: background 0.15s ease;
}

.vv-multiselect__option:hover {
	background: #f8fafc;
	color: #0f172a;
}

.vv-multiselect__option input[type="checkbox"] {
	width: 16px;
	height: 16px;
	accent-color: #e8001c;
	cursor: pointer;
}

/* Sub-group & Labels */
.vv-filter-subgroup {
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.vv-filter-subhead {
	display: flex;
	align-items: center;
	justify-content: space-between;
	font-size: 0.82rem;
	font-weight: 700;
	color: #333333;
}

.vv-filter-reset-group {
	background: none;
	border: none;
	padding: 0;
	font-size: 0.75rem;
	font-weight: 600;
	color: #e8001c;
	cursor: pointer;
	transition: opacity 0.2s ease;
}

.vv-filter-reset-group:hover {
	opacity: 0.75;
}

/* Controls: Selects & Inputs */
.vv-filter-select,
.vv-filter-input {
	width: 100%;
	height: 40px;
	background: #ffffff;
	border: 1px solid #e2e8f0;
	border-radius: 8px;
	padding: 0 12px;
	font-family: inherit;
	font-size: 0.85rem;
	font-weight: 500;
	color: #1d2327;
	outline: none;
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
	appearance: none;
	-webkit-appearance: none;
	box-sizing: border-box;
}

.vv-filter-select {
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23666666' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 12px center;
	padding-right: 32px;
}

.vv-filter-select:focus,
.vv-filter-input:focus {
	border-color: #e8001c;
	box-shadow: 0 0 0 2px rgba(232, 0, 28, 0.12);
}

.vv-filter-range-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 8px;
}

/* Toggle Switches */
.vv-filter-toggles {
	display: flex;
	align-items: center;
	justify-content: flex-start;
	gap: 20px;
	margin-top: 6px;
}

.vv-toggle-label {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	font-size: 0.82rem;
	font-weight: 700;
	color: #222222;
	cursor: pointer;
	user-select: none;
}

.vv-toggle-checkbox {
	display: none;
}

.vv-toggle-slider {
	width: 38px;
	height: 20px;
	background-color: #cbd5e1;
	border-radius: 999px;
	position: relative;
	transition: background-color 0.25s ease;
}

.vv-toggle-slider::before {
	content: '';
	position: absolute;
	width: 16px;
	height: 16px;
	border-radius: 50%;
	background-color: #ffffff;
	top: 2px;
	left: 2px;
	transition: transform 0.25s ease;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.vv-toggle-checkbox:checked + .vv-toggle-slider {
	background-color: #e8001c;
}

.vv-toggle-checkbox:checked + .vv-toggle-slider::before {
	transform: translateX(18px);
}

/* Submit Button */
.vv-filter-actions {
	margin-top: 8px;
}

.vv-filter-submit-btn {
	width: 100%;
	height: 42px;
	border-radius: 8px;
	background: #111111;
	color: #ffffff;
	border: none;
	font-weight: 700;
	font-size: 0.88rem;
	cursor: pointer;
	transition: background 0.2s ease;
}

.vv-filter-submit-btn:hover {
	background: #e8001c;
}

/* ── Mobile-Friendly Numeric Pagination Bar ────────────────────────────── */
.vv-pagination {
	width: 100%;
	margin: 36px 0 24px 0;
	display: flex;
	justify-content: center;
	align-items: center;
	clear: both;
}

.vv-pagination__list {
	display: flex;
	align-items: center;
	justify-content: center;
	flex-wrap: wrap;
	gap: 8px;
	list-style: none !important;
	padding: 0 !important;
	margin: 0 !important;
}

.vv-pagination__item {
	display: inline-flex;
	align-items: center;
	justify-content: center;
}

.vv-pagination__item a,
.vv-pagination__item span {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 40px;
	height: 40px;
	padding: 0 14px;
	border-radius: 10px;
	font-size: 0.92rem;
	font-weight: 700;
	color: #222222;
	background: #ffffff;
	border: 1px solid #e2e2e2;
	text-decoration: none !important;
	transition: all 0.2s ease;
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
}

.vv-pagination__item a:hover {
	border-color: #e8001c;
	color: #e8001c;
	background: #fff5f6;
	transform: translateY(-1px);
}

.vv-pagination__item.is-active span,
.vv-pagination__item span.current {
	background: #e8001c !important;
	color: #ffffff !important;
	border-color: #e8001c !important;
	box-shadow: 0 4px 12px rgba(232, 0, 28, 0.25);
}

.vv-pagination__item span.dots {
	border: none;
	background: transparent;
	box-shadow: none;
	color: #888888;
	min-width: 24px;
	padding: 0 4px;
}

@media (max-width: 640px) {
	.vv-pagination {
		margin: 28px 0 16px 0;
	}

	.vv-pagination__list {
		gap: 6px;
	}

	.vv-pagination__item a,
	.vv-pagination__item span {
		min-width: 36px;
		height: 36px;
		padding: 0 10px;
		font-size: 0.85rem;
		border-radius: 8px;
	}
}

.vv-infinite-scroll-loader {
	display: inline-flex;
	align-items: center;
	gap: 12px;
	background: #ffffff;
	padding: 10px 24px;
	border-radius: 30px;
	box-shadow: 0 4px 18px rgba(0, 0, 0, 0.08);
	border: 1px solid #eaeaea;
}

.vv-loader-text {
	font-size: 0.92rem;
	font-weight: 700;
	color: #222222;
	letter-spacing: -0.01em;
}

.vv-spinner {
	animation: vv-rotate 0.9s linear infinite;
	transform-origin: center center;
}

.vv-spinner-path {
	stroke: #e8001c;
	stroke-dasharray: 90, 150;
	stroke-dashoffset: 0;
	stroke-linecap: round;
	animation: vv-dash 1.4s ease-in-out infinite;
}

@keyframes vv-rotate {
	100% {
		transform: rotate(360deg);
	}
}

@keyframes vv-dash {
	0% {
		stroke-dasharray: 1, 200;
		stroke-dashoffset: 0;
	}
	50% {
		stroke-dasharray: 90, 150;
		stroke-dashoffset: -35px;
	}
	100% {
		stroke-dasharray: 90, 150;
		stroke-dashoffset: -124px;
	}
}
