/* Shaaz Product Filters — front end (v1.3.0). Class names kept from v1.2.x. */

.shaaz-global-filters {
	display: flex;
	flex-direction: column;
	gap: 18px;
}

/* Toolbar */
.spf-toolbar {
	display: flex;
	justify-content: flex-start;
	padding: 0 16px;
}

.spf-clear-all {
	font-size: 13px;
	text-decoration: underline;
}

/* One filter */
.shaaz-wc-filter {
	border: 1px solid #e3e3e3;
	background: #fff;
}

.shaaz-wc-filter.is-active {
	border-color: #6fc1c5;
}

.shaaz-wc-filter .widget-title {
	margin: 0;
	position: relative;
	padding: 18px 16px;
	cursor: pointer;
	display: block;
}

.shaaz-wc-filter .widget-title:focus-visible {
	outline: 2px solid #111;
	outline-offset: -2px;
}

.spf-badge {
	display: inline-block;
	min-width: 20px;
	padding: 1px 6px;
	margin-left: 6px;
	border-radius: 10px;
	background: #6fc1c5;
	color: #fff;
	font-size: 11px;
	line-height: 18px;
	text-align: center;
	vertical-align: middle;
}

.shaaz-filter-panel {
	padding: 0 16px 16px;
}

.shaaz-filter-panel[hidden] {
	display: none;
}

/* Range inputs + slider */
.shaaz-wc-filter__range-inputs {
	display: flex;
	gap: 8px;
	margin-bottom: 12px;
}

.shaaz-wc-filter__range-inputs input,
.shaaz-wc-filter select {
	width: 100%;
	padding: 8px 10px;
}

.shaaz-ui-slider {
	position: relative;
	height: 4px;
	background: #d8d8d8;
	border: none;
	margin: 18px 7px 10px;
}

.shaaz-ui-slider .ui-slider-range {
	position: absolute;
	height: 100%;
	background: #6fc1c5;
}

.shaaz-ui-slider .ui-slider-handle {
	position: absolute;
	top: -6px;
	width: 14px;
	height: 14px;
	border-radius: 50%;
	background: #fff;
	border: 3px solid #555;
	cursor: pointer;
	margin-left: -7px;
	outline: none;
	z-index: 2;
	box-sizing: content-box;
}

/* A handle at the very end of the track (jQuery UI writes left: 100%) is anchored with right: 0
   instead, so it stays inside the panel instead of being clipped. jQuery UI rewrites the inline
   style on every move, so this is matched on the style attribute rather than set once. */
.shaaz-ui-slider .ui-slider-handle[style*="left: 100%"] {
	left: auto !important;
	right: 0;
	margin-left: 0;
}

.shaaz-ui-slider .ui-slider-handle:focus-visible {
	box-shadow: 0 0 0 3px rgba(17, 17, 17, 0.35);
}

.shaaz-range-values {
	display: flex;
	justify-content: space-between;
	font-size: 12px;
	color: #666;
	margin-top: 8px;
}

/* Term list */
.shaaz-term-search {
	width: 100%;
	margin-bottom: 10px;
	padding: 8px 10px;
}

.shaaz-term-list {
	display: flex;
	flex-direction: column;
	gap: 8px;
	max-height: 240px;
	overflow: auto;
}

.shaaz-term-item {
	display: flex;
	align-items: center;
	gap: 8px;
	cursor: pointer;
}

.spf-count {
	margin-left: auto;
	font-size: 12px;
	color: #888;
}

/* Per-filter actions */
.shaaz-wc-filter__actions {
	display: flex;
	gap: 10px;
	align-items: center;
	margin-top: 12px;
}

.shaaz-wc-filter__clear {
	font-size: 13px;
	background: none;
	border: 0;
	padding: 0;
	text-decoration: underline;
	cursor: pointer;
}

.shaaz-wc-filter__button {
	padding: 9px 14px;
	border: 1px solid #111;
	background: #111;
	color: #fff;
	cursor: pointer;
}

/* selectWoo (Select2) inside a filter */
.shaaz-wc-filter .select2-container {
	width: 100% !important;
	max-width: 100%;
}

.shaaz-wc-filter .select2-container--default .select2-selection--multiple {
	min-height: 48px;
	border: 1px solid #bcbcbc;
	border-radius: 0;
	padding: 6px 8px;
	box-sizing: border-box;
}

.shaaz-wc-filter .select2-container--default .select2-selection--multiple .select2-selection__rendered {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	padding: 0 !important;
	margin: 0 !important;
	white-space: normal;
}

.shaaz-wc-filter .select2-container--default .select2-selection--multiple .select2-selection__choice {
	max-width: 100%;
	margin: 0 !important;
	padding: 5px 8px;
	background: #efefef;
	border: 1px solid #cfcfcf;
	border-radius: 0;
	font-size: 13px;
	line-height: 1.2;
	white-space: normal;
	overflow-wrap: anywhere;
}

.shaaz-wc-filter .select2-container--default .select2-search--inline .select2-search__field {
	min-width: 60px !important;
	margin: 0 !important;
}

.spf-dropdown.select2-dropdown {
	border-radius: 0;
	z-index: 100002; /* above the theme header and Kitify's mobile sidebar overlay */
}

/* Range filter where every product on the page has the same value: shown, nothing to slide. */
.spf-fixed-value {
	padding: 8px 0 2px;
	font-size: 14px;
	color: #444;
}

/* Active-filter chips above the product grid */
.spf-chips {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 0 0 20px;
}

.spf-chip {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 6px 10px;
	border: 1px solid #cfcfcf;
	background: #f6f6f6;
	color: #111;
	font-size: 13px;
	line-height: 1.3;
	text-decoration: none !important;
	transition: border-color 0.15s ease, background-color 0.15s ease;
}

.spf-chip:hover,
.spf-chip:focus-visible {
	border-color: #111;
	background: #fff;
}

.spf-chip__remove {
	font-size: 16px;
	line-height: 1;
}

.spf-chip--clear {
	background: transparent;
	border-color: transparent;
	text-decoration: underline !important;
}

/* Refreshed results: run the theme's product fade-in immediately (Lumilux delays it by 2s). */
.spf-swapped ul.products:not(.swiper-wrapper) li.product {
	animation-delay: 0s !important;
}

/* Loading state while results are fetched */
.spf-is-loading {
	opacity: 0.5;
	pointer-events: none;
	transition: opacity 0.15s ease;
}

@media (prefers-reduced-motion: reduce) {
	.spf-is-loading {
		transition: none;
	}
}

@media (max-width: 480px) {
	.shaaz-wc-filter .select2-container--default .select2-selection--multiple .select2-selection__choice {
		font-size: 12px;
		padding: 4px 6px;
	}
}
