.wcf-filters {
	--wcf-accent: #1d4ed8;
	--wcf-accent-hover: #1e40af;
	--wcf-border: #e5e7eb;
	--wcf-text: #111827;
	--wcf-muted: #6b7280;
	--wcf-bg: #ffffff;
	--wcf-radius: 14px;

	background: var(--wcf-bg);
	border: 1px solid rgba(0,0,0,0.1);
	border-radius: 18px !important;
	padding: 24px;
	max-width: 320px;
	color: var(--e-global-color-7220ff6);
	box-sizing: border-box;
}
.wcf-filters *,
.wcf-filters *::before,
.wcf-filters *::after {
	box-sizing: border-box;
	font-family: 'Sora', Arial !important;
}

.wcf-product-toolbar,
.wcf-product-toolbar *,
.wcf-product-toolbar *::before,
.wcf-product-toolbar *::after,
.wcf-product-sort,
.wcf-product-sort *,
.wcf-product-sort *::before,
.wcf-product-sort *::after {
	box-sizing: border-box;
}

.wcf-product-toolbar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 20px;
	width: 100%;
}

.wcf-product-result-count {
	flex: 0 0 auto;
	margin: 0;
	color: #5f6875;
	font-family: 'Sora', Arial, sans-serif;
	font-size: 14px;
	font-weight: 500;
	line-height: 1.4;
	white-space: nowrap;
}

.wcf-product-result-count[hidden] {
	display: none !important;
}

.wcf-product-sort {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	flex: 0 1 auto;
	gap: 10px;
	width: auto;
	min-width: 0;
}

.wcf-product-sort > label {
	margin: 0;
	color: #1c222b;
	font-size: 14px;
	font-weight: 600;
	white-space: nowrap;
}

.wcf-product-sort-select-wrap {
	position: relative;
	width: 230px;
	max-width: 100%;
}

.wcf-product-sort-select-wrap::after {
	content: '';
	position: absolute;
	top: 50%;
	right: 16px;
	width: 8px;
	height: 8px;
	border-right: 2px solid #1c222b;
	border-bottom: 2px solid #1c222b;
	pointer-events: none;
	transform: translateY(-70%) rotate(45deg);
}

.wcf-product-sort select {
	width: 100%;
	min-height: 46px;
	margin: 0;
	padding: 10px 42px 10px 14px;
	border: 1px solid #d5dbe3;
	border-radius: 8px;
	background: #fff;
	color: #1c222b;
	font: inherit;
	font-size: 14px;
	line-height: 1.4;
	cursor: pointer;
	appearance: none;
	-webkit-appearance: none;
}

.wcf-product-sort select:hover {
	border-color: #0057cc;
}

.wcf-product-sort select:focus-visible {
	border-color: #0057cc;
	outline: 3px solid rgba(0, 87, 204, 0.18);
	outline-offset: 1px;
}

.wcf-product-sort-submit {
	min-height: 46px;
	padding: 10px 18px;
	border: 0;
	border-radius: 8px;
	background: #0057cc;
	color: #fff;
	cursor: pointer;
}

@media (max-width: 600px) {
	.wcf-product-toolbar {
		gap: 12px;
	}

	.wcf-product-result-count {
		font-size: 12px;
	}

	.wcf-product-sort > label {
		display: none;
	}

	.wcf-product-sort-select-wrap {
		width: min(62vw, 230px);
	}
}

.wcf-filters .wcf-section {
	padding-bottom: 22px;
	margin-bottom: 22px;
	border-bottom: 1px solid var(--wcf-border);
}
.wcf-filters .wcf-section:last-of-type {
	border-bottom: none;
	margin-bottom: 0;
	padding-bottom: 0;
}

.wcf-filters .wcf-section h4 {
	margin: 0 0 14px;
	font-size: 14px;
	font-weight: 600;
	color: var(--e-global-color-7220ff6) !important;
}

/* Checkboxes */
.wcf-filters .wcf-checkbox {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 6px 8px;
	margin: 0 -8px;
	border-radius: 8px;
	font-size: 14px;
	cursor: pointer;
	transition: background-color 0.15s ease;
}
.wcf-filters .wcf-checkbox:hover {
	background-color: #f9fafb;
}
.wcf-filters .wcf-checkbox input[type="checkbox"] {
	width: 17px;
	height: 17px;
	accent-color: var(--wcf-accent);
	cursor: pointer;
	flex-shrink: 0;
}
.wcf-filters .wcf-checkbox .wcf-count {
	margin-left: auto;
	color: var(--wcf-muted);
	font-size: 12px;
}

/* Category name + count shown as a single glued unit, no gap
   between the label and the "(n)" : used for child category
   checkboxes and the "Other Categories" pills. */
.wcf-cat-label {
	display: inline;
}
.wcf-count-inline {
	color: var(--wcf-muted);
	font-size: 12px;
}

/* Price slider */
.wcf-price-values {
	display: flex;
	align-items: flex-end;
	gap: 12px;
	font-size: 13px;
	font-weight: 600;
	color: var(--wcf-text);
	margin-bottom: 22px;
}
.wcf-price-field {
	display: block;
	flex: 1 1 0;
	min-width: 0;
}
.wcf-price-field-label {
	display: block;
	margin-bottom: 6px;
	font-size: 11px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: var(--wcf-muted);
}
.wcf-price-input-wrap {
	display: flex;
	align-items: center;
	gap: 6px;
	min-height: 40px;
	padding: 0 10px;
	background: #fff;
	border: 1px solid var(--wcf-border);
	border-radius: 9px;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.wcf-price-input-wrap:focus-within {
	border-color: var(--wcf-accent);
	box-shadow: 0 0 0 3px rgba(29, 78, 216, 0.1);
}
.wcf-price-input-wrap input[type="number"] {
	width: 100%;
	min-width: 0;
	padding: 8px 0;
	border: 0;
	outline: 0;
	background: transparent;
	color: var(--wcf-text);
	font: inherit;
	font-size: 13px;
	font-weight: 600;
}
.wcf-price-currency {
	flex: 0 0 auto;
	color: var(--wcf-muted);
	font-size: 11px;
	font-weight: 700;
}

/* Self-contained noUiSlider styling : does not rely on the
   library's own CSS file, so the track/fill/handles always
   render regardless of external stylesheet loading. */
.wcf-slider,
.wcf-slider * {
	box-sizing: border-box;
	-webkit-user-select: none;
	-moz-user-select: none;
	user-select: none;
	touch-action: none;
}
.wcf-slider {
	position: relative;
	height: 4px;
	margin: 10px 10px 26px;
	border-radius: 999px;
	background: var(--wcf-border);
}
.wcf-slider .noUi-base {
	position: relative;
	width: 100%;
	height: 100%;
	z-index: 1;
}
.wcf-slider .noUi-connects {
	position: relative;
	width: 100%;
	height: 100%;
	overflow: hidden;
	border-radius: 999px;
	z-index: 0;
}
.wcf-slider .noUi-connect {
	position: absolute;
	top: 0;
	right: 0;
	height: 100%;
	width: 100%;
	background: var(--wcf-accent);
	transform-origin: 0 0;
	z-index: 1;
}
.wcf-slider .noUi-origin {
	position: absolute;
	top: 0;
	right: 0;
	height: 0;
	width: 100%;
	transform-origin: 0 0;
	z-index: 2;
}
.wcf-slider .noUi-handle {
	position: absolute;
	top: -8px;
	right: -10px;
	width: 20px;
	height: 20px;
	border-radius: 50%;
	background: #fff;
	border: 2px solid var(--wcf-accent);
	box-shadow: 0 1px 3px rgba(16, 24, 40, 0.15);
	cursor: grab;
	outline: none;
}
.wcf-slider .noUi-handle:active {
	cursor: grabbing;
}
.wcf-slider .noUi-handle:focus-visible {
	outline: 2px solid var(--wcf-accent);
	outline-offset: 2px;
}
.wcf-slider .noUi-touch-area {
	position: absolute;
	top: -12px;
	left: -12px;
	right: -12px;
	bottom: -12px;
}
/* Buttons */
.wcf-filters .wcf-buttons {
	display: flex;
	align-items: center;
	gap: 16px;
	padding-bottom: 0;
	border-bottom: none;
	margin-bottom: 0;
}
.wcf-apply-btn {
	appearance: none;
	border: 1px solid #0046A6 !important;
	background: #0046A6 !important;
	color: #fff;
	font-size: 11px;
	font-weight: 700 !important;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	padding: 12px 22px !important;
	border-radius: 999px;
	cursor: pointer;
	transition: all 0.3 ease;
}
.wcf-apply-btn:hover {
	background: rgba(0, 70, 166, 0.9) !important;
	box-shadow: none !important;
}
.wcf-apply-btn:active {
	transform: scale(0.98);
}
.wcf-reset-btn {
	font-size: 12px;
	font-weight: 600 !important;
	color: var(--wcf-muted);
	text-decoration: none;
	border-bottom: 1px solid transparent;
	transition: color 0.15s ease, border-color 0.15s ease;
}
.wcf-reset-btn:hover {
	color: var(--wcf-text);
	border-color: var(--wcf-text);
}

/* Related categories */
.wcf-related-categories {
	margin: 20px 0 0;
	max-width: 320px;
}

.wcf-related-categories * {
	font-family: 'Sora', Arial !important;
}
.wcf-related-categories h4 {
	margin: 0 0 12px;
	font-size: 17px !important;
	font-weight: 600 !important;
	color: var(--e-global-color-7220ff6);
}
.wcf-related-categories ul {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 10px;
}
.wcf-related-categories a {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	padding: 20px 20px;
	background: #ffffff;
	border: 1px solid rgba(0, 0, 0, 0.1);
	border-radius: 14px;
	font-size: 13px;
	font-weight: 500 !important;
	color: var(--e-global-color-7220ff6) !important;
	text-decoration: none;
	transition: background-color 0.15s ease, border-color 0.15s ease, transform 0.05s ease, color 0.15s ease;
}
.wcf-related-categories a::after {
	content: "";
	flex-shrink: 0;
	width: 7px;
	height: 7px;
	border-right: 1.5px solid #000000;
	border-top: 1.5px solid #000000;
	transform: rotate(45deg);
	transition: border-color 0.15s ease, transform 0.15s ease;
}
.wcf-related-categories a:hover {
	background-color: #eff6ff;
	border-color: #dbeafe;
	color: #0046A6 !important;
	font-weight: 500;
}
.wcf-related-categories a:hover::after {
	border-color: var(--wcf-accent);
	transform: rotate(45deg) translate(1px, -1px);
}
.wcf-related-categories a:active {
	transform: scale(0.98);
}
.wcf-related-categories a .wcf-pill-count {
	font-weight: 400;
}

/* -------------------------------------------------------
 * Mobile: filter panel becomes a "Filters" button that
 * opens a bottom sheet (max 80vh) with a dimmed overlay.
 * "Other Categories" becomes a horizontal scroller that
 * sits right below the filter button.
 * ------------------------------------------------------- */
.wcf-mobile-bar {
	display: none;
}
.wcf-mobile-trigger {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	appearance: none;
	border: 1px solid rgba(0, 0, 0, 0.1);
	background: #0046A6 !important;
	color: var(--wcf-text);
	font-size: 13px;
	font-weight: 600 !important;
	padding: 10px 16px;
	border-radius: 999px;
	cursor: pointer;
	box-shadow: 0 1px 2px rgba(16, 24, 40, 0.05);
}
.wcf-mobile-trigger svg {
	width: 16px;
	height: 16px;
	flex-shrink: 0;
	color: var(--wcf-accent);
}
.wcf-overlay {
	display: none;
}
.wcf-panel-header {
	display: none;
}

@media (max-width: 768px) {
	.wcf-mobile-bar {
		display: flex;
		margin-bottom: 14px;
	}
	.wcf-overlay {
		display: block;
		position: fixed;
		inset: 0;
		background: rgba(17, 24, 39, 0.45);
		opacity: 0;
		visibility: hidden;
		transition: opacity 0.25s ease, visibility 0.25s ease;
		z-index: 998;
	}
	.wcf-overlay.wcf-open {
		opacity: 1;
		visibility: visible;
	}
	.wcf-filters {
		position: fixed;
		left: 0;
		right: 0;
		bottom: 0;
		width: 100%;
		max-width: none;
		max-height: 80vh;
		margin: 0;
		border-radius: 20px 20px 0 0;
		padding: 14px 20px calc(24px + env(safe-area-inset-bottom));
		box-shadow: 0 -10px 30px rgba(16, 24, 40, 0.18);
		transform: translateY(100%);
		transition: transform 0.3s ease;
		overflow-y: auto;
		-webkit-overflow-scrolling: touch;
		z-index: 999;
	}
	.wcf-filters.wcf-open {
		transform: translateY(0);
	}
	.wcf-filters::before {
		content: "";
		display: block;
		width: 36px;
		height: 4px;
		margin: 0 auto 14px;
		border-radius: 999px;
		background: var(--wcf-border);
	}
	.wcf-panel-header {
		display: flex;
		align-items: center;
		justify-content: space-between;
		margin: 0 0 18px;
		padding-bottom: 14px;
		border-bottom: 1px solid var(--wcf-border);
	}
	.wcf-panel-header .wcf-panel-title {
		font-size: 15px;
		font-weight: 700;
	}
	.wcf-panel-close {
		appearance: none;
		border: none;
		background: transparent !important;
		color: black !important;
		width: 30px;
		height: 30px;
		border-radius: 50%;
		font-size: 18px;
		line-height: 1;
		cursor: pointer;
		flex-shrink: 0;
	}
	.wcf-filters .wcf-buttons {
		gap: 12px;
	}
	.wcf-filters .wcf-apply-btn {
		flex: 1;
		text-align: center;
	}

	/* "Other Categories" : horizontally swipeable slider under
	 * the filter button (manual drag/flick only, no auto-scroll). */
	.wcf-related-categories {
		max-width: none;
		margin-top: 14px;
	}
	.wcf-related-categories .wcf-scroll-viewport {
		overflow-x: auto;
		-webkit-overflow-scrolling: touch;
		-ms-overflow-style: none;
		scrollbar-width: none;
		scroll-snap-type: x proximity;
		-webkit-mask-image: linear-gradient(to right, transparent 0, #000 24px, #000 calc(100% - 24px), transparent 100%);
		mask-image: linear-gradient(to right, transparent 0, #000 24px, #000 calc(100% - 24px), transparent 100%);
	}
	.wcf-related-categories .wcf-scroll-viewport::-webkit-scrollbar {
		display: none;
	}
	.wcf-related-categories ul {
		flex-direction: row;
		flex-wrap: nowrap;
		width: max-content;
		padding-bottom: 0;
	}
	.wcf-related-categories li {
		flex: 0 0 auto;
		scroll-snap-align: start;
	}
	.wcf-related-categories a {
		white-space: nowrap;
		border-radius: 200px;
		padding: 8px 18px;
	}
}

/*====== HIDE ELEMENTS ======*/
.wcf-stock-status, .wcf-child-categories {
	display: none;
}

/* Product Type is intentionally separate from the generic hidden
   child-category section. Explicit shortcode modes must remain visible
   even if older/custom CSS hides .wcf-child-categories. */
.wcf-filters .wcf-product-types,
.wcf-filters .wcf-product-types.wcf-force-visible {
	display: block !important;
	visibility: visible !important;
	opacity: 1 !important;
	height: auto !important;
	max-height: none !important;
	overflow: visible !important;
}
