/* ===========================================================================
 * This stylesheet relies on the CSS lockdown reset at the top of
 * widget.css (loaded first — wpw-filter-style depends on wpw-widget-style)
 * which strips any external theme/plugin/WooCommerce/Elementor styling
 * from every element under .wpw-widget before any rule below applies.
 * Every declaration here is !important so it keeps winning the cascade
 * no matter what other stylesheets load afterward.
 * ========================================================================= */

/* ===== Layout ===== */
.wpw-filter-widget {
	position: relative !important;
}

.wpw-archive {
	display: flex !important;
	flex-direction: row !important;
	gap: 40px !important;
	align-items: flex-start !important;
}

.wpw-archive__sidebar {
	width: 260px !important;
	flex: 0 0 260px !important;
}

.wpw-archive__main {
	flex: 1 1 auto !important;
	min-width: 0 !important;
}

/* ===== Mobile top bar (Filter button + sort) ===== */
.wpw-mobile-bar {
	display: none !important;
	align-items: center !important;
	justify-content: space-between !important;
	gap: 12px !important;
	margin-bottom: 16px !important;
}

.wpw-mobile-filter-btn {
	display: inline-flex !important;
	align-items: center !important;
	gap: 8px !important;
	background: #1d1d1f !important;
	color: #fff !important;
	border: none !important;
	border-radius: 4px !important;
	padding: 10px 16px !important;
	font-size: 13px !important;
	font-weight: 600 !important;
	cursor: pointer !important;
	position: relative !important;
}

.wpw-mobile-filter-icon svg {
	display: block !important;
}

/* These are outline-style icons (fill="none" stroke="currentColor" in their
   markup) — the opposite of widget.css's default fill:currentColor for
   Elementor's own icon SVGs. Prefixed with .wpw-widget so this reliably
   outranks that default on specificity alone, regardless of stylesheet
   load order. */
.wpw-widget .wpw-mobile-filter-icon svg,
.wpw-widget .wpw-filter-heading-icon svg,
.wpw-widget .wpw-clear-all-icon svg {
	fill: none !important;
	stroke: currentColor !important;
}

.wpw-mobile-filter-count {
	display: inline-flex !important;
	align-items: center !important;
	justify-content: center !important;
	min-width: 18px !important;
	height: 18px !important;
	padding: 0 4px !important;
	border-radius: 999px !important;
	background: #fff !important;
	color: #1d1d1f !important;
	font-size: 11px !important;
	font-weight: 700 !important;
}

.wpw-mobile-sort {
	display: none !important;
}

/* ===== Sidebar filter panel ===== */
.wpw-filter-panel {
	background: #fff !important;
}

.wpw-filter-panel__head {
	display: flex !important;
	align-items: center !important;
	justify-content: space-between !important;
	margin-bottom: 8px !important;
}

.wpw-filter-heading {
	display: flex !important;
	align-items: center !important;
	gap: 8px !important;
	font-size: 15px !important;
	font-weight: 700 !important;
	letter-spacing: 0.03em !important;
	text-transform: uppercase !important;
	margin: 0 0 4px !important;
}

.wpw-filter-heading-icon svg {
	display: block !important;
}

.wpw-drawer-close {
	display: none !important;
	background: none !important;
	border: none !important;
	font-size: 24px !important;
	line-height: 1 !important;
	cursor: pointer !important;
	color: #333 !important;
	padding: 4px 8px !important;
}

.wpw-clear-all {
	display: inline-flex !important;
	align-items: center !important;
	gap: 8px !important;
	background: none !important;
	border: none !important;
	padding: 0 0 16px !important;
	font-size: 13px !important;
	font-weight: 600 !important;
	color: #333 !important;
	cursor: pointer !important;
	border-bottom: 1px solid #e5e5e5 !important;
	margin-bottom: 8px !important;
	width: 100% !important;
}

.wpw-clear-all-icon svg {
	display: block !important;
}

.wpw-filter-scroll {
	overflow-y: auto !important;
}

/* ===== Filter group (collapsible section) ===== */
.wpw-filter-group {
	border-bottom: 1px solid #eee !important;
	padding-bottom: 16px !important;
	margin-bottom: 20px !important;
}

.wpw-filter-group__toggle {
	display: flex !important;
	align-items: center !important;
	justify-content: space-between !important;
	width: 100% !important;
	background: none !important;
	border: none !important;
	padding: 0 !important;
	cursor: pointer !important;
	margin-bottom: 12px !important;
}

.wpw-filter-group__title {
	font-size: 12px !important;
	font-weight: 700 !important;
	letter-spacing: 0.04em !important;
	text-transform: uppercase !important;
	color: #1d1d1f !important;
}

.wpw-filter-group__caret {
	font-size: 16px !important;
	line-height: 1 !important;
	color: #888 !important;
}

.wpw-filter-group.is-collapsed .wpw-filter-group__body {
	display: none !important;
}

.wpw-filter-group.is-collapsed .wpw-filter-group__caret::before {
	content: '+' !important;
}

/* ===== Filter options (checkbox rows) ===== */
.wpw-filter-option {
	display: flex !important;
	align-items: center !important;
	gap: 10px !important;
	font-size: 13px !important;
	color: #333 !important;
	padding: 5px 0 !important;
	cursor: pointer !important;
}

.wpw-filter-checkbox input[type="checkbox"] {
	width: 15px !important;
	height: 15px !important;
	margin: 0 !important;
	cursor: pointer !important;
}

.wpw-filter-option__label {
	flex: 1 1 auto !important;
}

.wpw-filter-count {
	font-size: 12px !important;
	color: #999 !important;
}

.wpw-filter-option.is-disabled {
	opacity: 0.4 !important;
}

/* ===== Price filter ===== */
.wpw-price-range {
	display: flex !important;
	align-items: center !important;
	gap: 10px !important;
}

.wpw-price-input {
	width: 100% !important;
	min-width: 0 !important;
	border: 1px solid #ddd !important;
	border-radius: 4px !important;
	padding: 8px 10px !important;
	font-size: 13px !important;
	-moz-appearance: textfield !important;
}

.wpw-price-input::-webkit-outer-spin-button,
.wpw-price-input::-webkit-inner-spin-button {
	-webkit-appearance: none !important;
	margin: 0 !important;
}

.wpw-price-sep {
	color: #999 !important;
	flex: 0 0 auto !important;
}

/* ===== Color swatches ===== */
.wpw-filter-swatches {
	display: flex !important;
	flex-wrap: wrap !important;
	gap: 10px !important;
}

.wpw-filter-swatch {
	width: 26px !important;
	height: 26px !important;
	border-radius: 50% !important;
	border: 2px solid #fff !important;
	box-shadow: 0 0 0 1px #ddd !important;
	padding: 0 !important;
	cursor: pointer !important;
	position: relative !important;
	background-size: cover !important;
}

.wpw-filter-swatch:hover {
	box-shadow: 0 0 0 1px #aaa !important;
}

.wpw-filter-swatch.is-active {
	box-shadow: 0 0 0 2px #fff, 0 0 0 3px #1d1d1f !important;
}

.wpw-filter-swatch.is-disabled {
	opacity: 0.35 !important;
	cursor: not-allowed !important;
}

/* ===== Tags ===== */
.wpw-filter-tags {
	display: flex !important;
	flex-wrap: wrap !important;
	gap: 8px !important;
}

.wpw-filter-tag {
	background: #f2f2f2 !important;
	border: 1px solid #e5e5e5 !important;
	border-radius: 999px !important;
	padding: 6px 14px !important;
	font-size: 12px !important;
	color: #333 !important;
	cursor: pointer !important;
	transition: all 0.15s ease !important;
}

.wpw-filter-tag:hover {
	background: #e6e6e6 !important;
}

.wpw-filter-tag.is-active {
	background: #1d1d1f !important;
	border-color: #1d1d1f !important;
	color: #fff !important;
}

.wpw-filter-tag.is-disabled {
	opacity: 0.4 !important;
}

/* ===== Group reset button ===== */
.wpw-filter-reset {
	display: inline-block !important;
	margin-top: 12px !important;
	background: #f2f2f2 !important;
	border: 1px solid #ddd !important;
	border-radius: 4px !important;
	padding: 6px 14px !important;
	font-size: 12px !important;
	color: #333 !important;
	cursor: pointer !important;
}

.wpw-filter-reset:hover {
	background: #e6e6e6 !important;
}

/* ===== Toolbar (search + sort) ===== */
.wpw-toolbar {
	display: flex !important;
	align-items: center !important;
	justify-content: space-between !important;
	gap: 16px !important;
	margin-bottom: 24px !important;
	flex-wrap: wrap !important;
}

.wpw-search-wrap {
	position: relative !important;
	flex: 1 1 320px !important;
	max-width: 420px !important;
}

.wpw-search-input {
	width: 100% !important;
	border: 1px solid #ddd !important;
	border-radius: 4px !important;
	padding: 10px 36px 10px 14px !important;
	font-size: 13px !important;
}

.wpw-search-spinner {
	position: absolute !important;
	right: 12px !important;
	top: 50% !important;
	width: 14px !important;
	height: 14px !important;
	margin-top: -7px !important;
	border: 2px solid #ddd !important;
	border-top-color: #1d1d1f !important;
	border-radius: 50% !important;
	opacity: 0 !important;
	visibility: hidden !important;
	animation: wpw-spin 0.7s linear infinite !important;
}

.wpw-search-spinner.is-visible {
	opacity: 1 !important;
	visibility: visible !important;
}

.wpw-toolbar__right {
	display: flex !important;
	align-items: center !important;
	gap: 12px !important;
}

.wpw-sort-select {
	border: 1px solid #ddd !important;
	border-radius: 4px !important;
	padding: 9px 32px 9px 12px !important;
	font-size: 12px !important;
	font-weight: 700 !important;
	text-transform: uppercase !important;
	letter-spacing: 0.03em !important;
	background: #fff !important;
	cursor: pointer !important;
}

/* ===== Results area / loading ===== */
.wpw-results-wrap {
	position: relative !important;
}

.wpw-loading-overlay {
	position: absolute !important;
	inset: 0 !important;
	background: rgba(255, 255, 255, 0.6) !important;
	display: flex !important;
	align-items: flex-start !important;
	justify-content: center !important;
	padding-top: 15% !important;
	opacity: 0 !important;
	visibility: hidden !important;
	transition: opacity 0.2s ease !important;
	z-index: 5 !important;
	pointer-events: none !important;
}

.wpw-loading-overlay.is-visible {
	opacity: 1 !important;
	visibility: visible !important;
}

.wpw-spinner {
	width: 32px !important;
	height: 32px !important;
	border: 3px solid #e5e5e5 !important;
	border-top-color: #1d1d1f !important;
	border-radius: 50% !important;
	animation: wpw-spin 0.7s linear infinite !important;
}

@keyframes wpw-spin {
	to { transform: rotate(360deg); }
}

.wpw-grid-region {
	transition: opacity 0.2s ease !important;
}

.wpw-widget.is-loading .wpw-grid-region {
	opacity: 0.5 !important;
}

/* ===== Pagination ===== */
.wpw-pagination-wrap {
	margin-top: 40px !important;
	display: flex !important;
	justify-content: center !important;
}

.wpw-pagination {
	display: flex !important;
	align-items: center !important;
	gap: 10px !important;
	font-size: 13px !important;
}

.wpw-pagination__prev,
.wpw-pagination__next {
	background: none !important;
	border: none !important;
	cursor: pointer !important;
	color: #333 !important;
	font-weight: 600 !important;
	padding: 8px 4px !important;
}

.wpw-pagination__prev:disabled,
.wpw-pagination__next:disabled {
	opacity: 0.3 !important;
	cursor: not-allowed !important;
}

.wpw-pagination__numbers {
	display: flex !important;
	align-items: center !important;
	gap: 6px !important;
}

.wpw-pagination__page {
	width: 32px !important;
	height: 32px !important;
	border-radius: 50% !important;
	border: none !important;
	background: none !important;
	cursor: pointer !important;
	font-size: 13px !important;
	color: #333 !important;
}

.wpw-pagination__page:hover {
	background: #f2f2f2 !important;
}

.wpw-pagination__page.is-active {
	background: #1d1d1f !important;
	color: #fff !important;
}

.wpw-load-more {
	background: #1d1d1f !important;
	color: #fff !important;
	border: none !important;
	border-radius: 4px !important;
	padding: 12px 32px !important;
	font-size: 13px !important;
	font-weight: 600 !important;
	cursor: pointer !important;
}

.wpw-infinite-sentinel {
	width: 100% !important;
	height: 1px !important;
}

.wpw-empty {
	grid-column: 1 / -1 !important;
	text-align: center !important;
	padding: 60px 0 !important;
	color: #888 !important;
}

/* ===== Mobile off-canvas drawer ===== */
.wpw-drawer-overlay {
	position: fixed !important;
	inset: 0 !important;
	background: rgba(0, 0, 0, 0.4) !important;
	opacity: 0 !important;
	visibility: hidden !important;
	transition: opacity 0.25s ease, visibility 0.25s ease !important;
	z-index: 999998 !important;
}

.wpw-filter-widget.wpw-drawer-open .wpw-drawer-overlay {
	opacity: 1 !important;
	visibility: visible !important;
}

body.wpw-drawer-body-lock {
	overflow: hidden !important;
}

/* ===== Responsive ===== */
@media (max-width: 991px) {
	.wpw-mobile-bar {
		display: flex !important;
	}

	.wpw-toolbar__right .wpw-desktop-sort {
		display: none !important;
	}

	.wpw-archive {
		gap: 0 !important;
	}

	.wpw-archive__sidebar {
		position: fixed !important;
		top: 0 !important;
		bottom: 0 !important;
		right: 0 !important;
		width: 86% !important;
		max-width: 420px !important;
		background: #fff !important;
		z-index: 999999 !important;
		padding: 24px 20px !important;
		box-shadow: -8px 0 24px rgba(0, 0, 0, 0.15) !important;
		transform: translateX(100%) !important;
		transition: transform 0.3s ease !important;
		overflow-y: auto !important;
	}

	.wpw-filter-widget.wpw-drawer-open .wpw-archive__sidebar {
		transform: translateX(0) !important;
	}

	.wpw-drawer-close {
		display: inline-block !important;
	}

	.wpw-filter-scroll {
		max-height: none !important;
	}
}

@media (min-width: 992px) {
	.wpw-drawer-overlay {
		display: none !important;
	}
}
