/**
 * Woo Fast Filter - Frontend Styles
 *
 * Mobile-first design.
 * No frameworks - pure CSS for minimal footprint.
 * Uses CSS custom properties for easy theming and style variants.
 *
 * @package JanssenFastFilters
 */

/* ==========================================================================
   CSS Custom Properties
   ========================================================================== */

.wff-wrapper {
	--wff-primary: #111;
	--wff-primary-rgb: 17, 17, 17;
	--wff-primary-hover: #333;
	--wff-active: #111;
	--wff-text: #1a1a1a;
	--wff-text-muted: #717171;
	--wff-border: #e0e0e0;
	--wff-bg: #fff;
	--wff-bg-hover: #f7f7f7;
	--wff-radius: 8px;
	--wff-radius-sm: 4px;
	--wff-transition: 0.2s ease;
	--wff-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, sans-serif;
	--wff-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
	--wff-shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.12);
	/* Semantic aliases used by active/hover filter row styles */
	--jff-primary: var(--wff-primary);
	--jff-primary-rgb: var(--wff-primary-rgb);
}

/* Soft style variant */
.wff-style-soft {
	--wff-primary: #5c6ac4;
	--wff-primary-rgb: 92, 106, 196;
	--wff-primary-hover: #4959bd;
	--wff-active: #5c6ac4;
	--wff-border: #eaeaea;
	--wff-bg-hover: #f5f6ff;
	--wff-radius: 12px;
	--wff-radius-sm: 6px;
}

/* Editorial style variant */
.wff-style-editorial {
	--wff-primary: #1a1a1a;
	--wff-primary-rgb: 26, 26, 26;
	--wff-active: #1a1a1a;
	--wff-text: #0d0d0d;
	--wff-border: #d0d0d0;
	--wff-radius: 2px;
	--wff-radius-sm: 1px;
	--wff-font: "Georgia", "Times New Roman", serif;
}

/* ==========================================================================
   Base / Reset
   ========================================================================== */

.wff-wrapper {
	font-family: var(--wff-font);
	color: var(--wff-text);
	line-height: 1.5;
	box-sizing: border-box;
}

.wff-wrapper *,
.wff-wrapper *::before,
.wff-wrapper *::after {
	box-sizing: inherit;
}

.wff-sr-only {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

/* ==========================================================================
   Mobile Toggle Button
   Sticky button at bottom of viewport on mobile.
   ========================================================================== */

.wff-mobile-toggle {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	position: fixed;
	bottom: 20px;
	left: 50%;
	transform: translateX(-50%);
	z-index: 999;
	padding: 12px 24px;
	background: var(--wff-primary);
	color: #fff;
	border: none;
	border-radius: 50px;
	font-size: 14px;
	font-weight: 600;
	font-family: var(--wff-font);
	cursor: pointer;
	box-shadow: var(--wff-shadow-lg);
	transition: background var(--wff-transition), transform var(--wff-transition);
}

.wff-mobile-toggle:hover {
	background: var(--wff-primary-hover);
}

.wff-mobile-toggle:active {
	transform: translateX(-50%) scale(0.96);
}

/* ==========================================================================
   Filter Panel
   Bottom sheet on mobile, sidebar/top on desktop.
   ========================================================================== */

.wff-panel {
	position: fixed;
	bottom: 0;
	left: 0;
	right: 0;
	z-index: 1000;
	max-height: 85vh;
	background: var(--wff-bg);
	border-radius: var(--wff-radius) var(--wff-radius) 0 0;
	box-shadow: var(--wff-shadow-lg);
	transform: translateY(100%);
	transition: transform 0.3s cubic-bezier(0.32, 0.72, 0, 1);
	overflow: hidden;
	display: flex;
	flex-direction: column;
}

.wff-panel.is-open {
	transform: translateY(0);
}

.wff-panel-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 16px 20px;
	border-bottom: 1px solid var(--wff-border);
	flex-shrink: 0;
}

.wff-panel-title {
	font-size: 16px;
	font-weight: 600;
	margin: 0;
}

.wff-panel-close {
	background: none;
	border: none;
	font-size: 24px;
	line-height: 1;
	color: var(--wff-text-muted);
	cursor: pointer;
	padding: 10px;
	min-width: 44px;
	min-height: 44px;
	display: flex;
	align-items: center;
	justify-content: center;
}

.wff-panel-body {
	overflow-y: auto;
	padding: 20px;
	flex-grow: 1;
	-webkit-overflow-scrolling: touch;
}

/* Overlay */
.wff-overlay {
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, 0.4);
	z-index: 999;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.3s ease, visibility 0.3s ease;
}

.wff-overlay.is-visible {
	opacity: 1;
	visibility: visible;
}

/* ==========================================================================
   Active Filters
   ========================================================================== */

.wff-active-filters {
	margin-bottom: 16px;
	padding-bottom: 16px;
	border-bottom: 1px solid var(--wff-border);
}

.wff-active-filters[hidden] {
	display: none;
}

.wff-active-filters-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 8px;
}

.wff-active-label {
	font-size: 12px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	color: var(--wff-text-muted);
}

.wff-clear-all {
	background: none;
	border: none;
	font-size: 13px;
	color: var(--wff-primary);
	cursor: pointer;
	padding: 8px 12px;
	margin: -8px -12px;
	font-family: var(--wff-font);
	text-decoration: underline;
	text-underline-offset: 2px;
	min-height: 44px;
	display: flex;
	align-items: center;
}

.wff-active-tags {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
}

.wff-tag {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	padding: 6px 8px 6px 12px;
	background: var(--wff-bg-hover);
	border: 1px solid var(--wff-border);
	border-radius: 50px;
	font-size: 13px;
	color: var(--wff-text);
	min-height: 36px;
}

.wff-tag-remove {
	background: none;
	border: none;
	padding: 8px;
	font-size: 16px;
	line-height: 1;
	color: var(--wff-text-muted);
	cursor: pointer;
	margin: -4px -4px -4px 0;
	min-width: 32px;
	min-height: 32px;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 50%;
	transition: background var(--wff-transition), color var(--wff-transition);
}

.wff-tag-remove:hover {
	color: var(--wff-text);
	background: rgba(0, 0, 0, 0.05);
}

/* Compact Active Filters (improved UX) */
.wff-active-compact {
	margin-bottom: 12px;
	padding-bottom: 12px;
}

.wff-active-compact .wff-active-filters-header {
	margin-bottom: 6px;
}

.wff-active-compact .wff-active-label {
	font-size: 11px;
}

.wff-active-compact .wff-clear-all {
	font-size: 12px;
	padding: 4px 8px;
	margin: -4px -8px;
	min-height: 32px;
}

.wff-active-compact .wff-active-tags {
	gap: 4px;
}

.wff-active-compact .wff-tag {
	padding: 4px 6px 4px 10px;
	font-size: 12px;
	min-height: 28px;
}

.wff-active-compact .wff-tag-remove {
	padding: 4px;
	font-size: 14px;
	min-width: 24px;
	min-height: 24px;
	margin: -2px -2px -2px 0;
}

/* ==========================================================================
   Quick Filters (Presets Wrapper)
   ========================================================================== */

.wff-quick-filters {
	margin-bottom: 12px;
	padding-bottom: 12px;
	border-bottom: 1px solid var(--wff-border);
}

.wff-quick-filters[hidden] {
	display: none;
}

.wff-quick-filters-label {
	display: block;
	font-size: 11px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	color: var(--wff-text-muted);
	margin-bottom: 8px;
}

.wff-quick-filters .wff-presets {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
}

.wff-quick-filters .wff-preset-btn {
	display: inline-flex;
	align-items: center;
	padding: 6px 12px;
	background: var(--wff-bg);
	border: 1px solid var(--wff-border);
	border-radius: 50px;
	font-size: 13px;
	font-weight: 500;
	font-family: var(--wff-font);
	color: var(--wff-text);
	cursor: pointer;
	transition: all var(--wff-transition);
	white-space: nowrap;
}

.wff-quick-filters .wff-preset-btn:hover {
	border-color: var(--wff-primary);
	background: var(--wff-bg-hover);
}

.wff-quick-filters .wff-preset-btn.active {
	background: var(--wff-active);
	border-color: var(--wff-active);
	color: #fff;
}

/* Top bar Quick Filters - horizontal layout */
.wff-quick-filters-topbar {
	padding: 12px 0;
	margin-bottom: 0;
	border-bottom: none;
	display: flex;
	align-items: center;
	gap: 12px;
}

.wff-quick-filters-topbar .wff-quick-filters-label {
	margin-bottom: 0;
	white-space: nowrap;
	flex-shrink: 0;
}

.wff-quick-filters-topbar .wff-presets {
	flex-wrap: nowrap;
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
	scrollbar-width: none;
	-ms-overflow-style: none;
}

.wff-quick-filters-topbar .wff-presets::-webkit-scrollbar {
	display: none;
}

/* ==========================================================================
   Filter Groups - Improved Visual Hierarchy
   ========================================================================== */

.wff-filter-group {
	border: none;
	padding: 0;
	margin: 0;
}

.wff-group-title {
	display: flex;
	align-items: center;
	justify-content: space-between;
	width: 100%;
	padding: 16px 0 10px;
	font-size: 13px;
	font-weight: 700;
	color: var(--wff-text);
	cursor: pointer;
	user-select: none;
	border: none;
	background: none;
	text-transform: uppercase;
	letter-spacing: 0.3px;
}

.wff-chevron {
	transition: transform var(--wff-transition);
	color: var(--wff-text-muted);
}

.wff-group-title[aria-expanded="false"] .wff-chevron {
	transform: rotate(-90deg);
}

.wff-group-content {
	padding-bottom: 16px;
	border-bottom: 1px solid var(--wff-border);
}

.wff-collapsible .wff-group-content[hidden] {
	display: none;
}

/* ==========================================================================
   Checkbox Styles
   ========================================================================== */

.wff-checkbox-label {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 6px 0;
	cursor: pointer;
	font-size: 14px;
	transition: color var(--wff-transition);
}

.wff-checkbox-label:hover {
	color: var(--wff-primary-hover);
}

.wff-checkbox {
	width: 18px;
	height: 18px;
	margin: 0;
	border: 1.5px solid var(--wff-border);
	border-radius: var(--wff-radius-sm);
	appearance: none;
	-webkit-appearance: none;
	cursor: pointer;
	flex-shrink: 0;
	transition: all var(--wff-transition);
	position: relative;
	background: var(--wff-bg);
}

.wff-checkbox:checked {
	background: var(--wff-active);
	border-color: var(--wff-active);
}

.wff-checkbox:checked::after {
	content: "";
	position: absolute;
	left: 5px;
	top: 2px;
	width: 5px;
	height: 9px;
	border: solid #fff;
	border-width: 0 2px 2px 0;
	transform: rotate(45deg);
}

.wff-checkbox:focus-visible {
	outline: 2px solid var(--wff-primary);
	outline-offset: 2px;
}

.wff-checkbox-text {
	flex-grow: 1;
}

.wff-count {
	color: var(--wff-text-muted);
	font-size: 12px;
}

.wff-children {
	padding-left: 24px;
}

/* ==========================================================================
   Row-level Hover + Checked States (Attributes)
   ========================================================================== */

/* Direct-child selector ensures category tree labels (nested deeper) are
   NOT affected — they inherit hover from .wff-term-header instead.
   border-left is always present (transparent) so activation never shifts layout.
   padding-left creates breathing room between the border and the checkbox. */
.wff-group-content > .wff-checkbox-label,
.wff-dropdown-content > .wff-checkbox-label {
	border-left: 3px solid transparent;
	border-radius: var(--wff-radius-sm);
	padding-left: 6px;
	transition: background 150ms ease, border-color 150ms ease, color var(--wff-transition);
}

/* Hover: very subtle primary tint, no border accent */
.wff-group-content > .wff-checkbox-label:hover,
.wff-dropdown-content > .wff-checkbox-label:hover {
	background: rgba(var(--jff-primary-rgb), 0.03);
	color: inherit;
}

/* Active: primary left border + subtle tint + bold label */
.wff-group-content > .wff-checkbox-label:has(.wff-checkbox:checked),
.wff-group-content > .wff-checkbox-label.wff-is-checked,
.wff-dropdown-content > .wff-checkbox-label:has(.wff-checkbox:checked),
.wff-dropdown-content > .wff-checkbox-label.wff-is-checked {
	border-left-color: var(--jff-primary);
	background: rgba(var(--jff-primary-rgb), 0.06);
}

.wff-group-content > .wff-checkbox-label:has(.wff-checkbox:checked) .wff-checkbox-text,
.wff-group-content > .wff-checkbox-label.wff-is-checked .wff-checkbox-text,
.wff-dropdown-content > .wff-checkbox-label:has(.wff-checkbox:checked) .wff-checkbox-text,
.wff-dropdown-content > .wff-checkbox-label.wff-is-checked .wff-checkbox-text {
	font-weight: 600;
}

/* Consecutive active attribute rows: merge into a visual group.
   The first keeps top radius, the last keeps bottom radius, middles lose both. */
.wff-group-content > .wff-checkbox-label.wff-is-checked + .wff-checkbox-label.wff-is-checked,
.wff-group-content > .wff-checkbox-label:has(.wff-checkbox:checked) + .wff-checkbox-label:has(.wff-checkbox:checked) {
	border-top-left-radius: 0;
	border-top-right-radius: 0;
}

.wff-group-content > .wff-checkbox-label.wff-is-checked:has(+ .wff-checkbox-label.wff-is-checked),
.wff-group-content > .wff-checkbox-label:has(.wff-checkbox:checked):has(+ .wff-checkbox-label:has(.wff-checkbox:checked)) {
	border-bottom-left-radius: 0;
	border-bottom-right-radius: 0;
}

/* ==========================================================================
   Category Taxonomy Tree + Accordion
   ========================================================================== */

/* Individual term row — contains the header (label + toggle) and optional panel */
.wff-term-item {
	display: flex;
	flex-direction: column;
}

/* Row layout: checkbox label on the left, chevron toggle on the right.
   border-left is always present (transparent) so activation never shifts layout. */
.wff-term-header {
	display: flex;
	align-items: center;
	gap: 0;
	min-height: 44px; /* WCAG touch target */
	border-left: 3px solid transparent;
	border-radius: var(--wff-radius-sm);
	cursor: pointer; /* signals full-row clickability */
	transition: background 150ms ease, border-color 150ms ease;
}

/* Hover: very subtle primary tint, no border accent */
.wff-term-header:hover {
	background: rgba(var(--jff-primary-rgb), 0.03);
}

/* The checkbox label stretches to fill available width.
   padding-left creates breathing room between the border and the checkbox. */
.wff-term-header .wff-checkbox-label {
	flex: 1;
	min-height: 44px;
	padding: 6px 0 6px 6px;
}

/* Chevron button — only rendered for parents with children */
.wff-accordion-toggle {
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	min-width: 44px;
	min-height: 44px;
	padding: 0;
	background: none;
	border: none;
	color: var(--wff-text-muted);
	cursor: pointer;
	border-radius: var(--wff-radius-sm);
	transition: background var(--wff-transition), color var(--wff-transition);
}

.wff-accordion-toggle:hover {
	background: rgba(0, 0, 0, 0.06); /* slightly darker than row hover so button is still visible */
	color: var(--wff-text);
}

.wff-accordion-toggle:focus-visible {
	outline: 2px solid var(--wff-primary);
	outline-offset: 2px;
}

/* Chevron rotates when panel is open */
.wff-accordion-chevron {
	width: 14px;
	height: 14px;
	transition: transform 160ms ease;
}

.wff-accordion-toggle[aria-expanded="true"] .wff-accordion-chevron {
	transform: rotate(180deg);
}

/* Children panel — animated via max-height trick.
 * display:block !important overrides the browser's built-in [hidden] → display:none
 * so max-height can transition smoothly instead of popping. */
.wff-accordion-panel {
	padding-left: 20px; /* Indent each level 20px relative to its parent */
	overflow: hidden;
	max-height: 800px; /* generous cap; transition plays from 0 to here on expand */
	transition: max-height 220ms ease;
}

.wff-accordion-panel[hidden] {
	display: block !important; /* keep in flow so max-height can animate */
	max-height: 0;
}

/* Active state for category tree rows: primary border + subtle tint + bold.
   :has() is the primary mechanism; .wff-is-checked is the JS-driven fallback. */
.wff-term-header:has(.wff-checkbox:checked),
.wff-term-header.wff-is-checked {
	border-left-color: var(--jff-primary);
	background: rgba(var(--jff-primary-rgb), 0.06);
}

.wff-term-header:has(.wff-checkbox:checked) .wff-checkbox-text,
.wff-term-header.wff-is-checked .wff-checkbox-text {
	font-weight: 600;
}

/* Consecutive active category rows: merge into a visual group.
   Uses :has() to detect adjacent active siblings via .wff-term-item wrappers. */
.wff-term-item:has(> .wff-term-header.wff-is-checked) + .wff-term-item:has(> .wff-term-header.wff-is-checked) > .wff-term-header,
.wff-term-item:has(> .wff-term-header:has(.wff-checkbox:checked)) + .wff-term-item:has(> .wff-term-header:has(.wff-checkbox:checked)) > .wff-term-header {
	border-top-left-radius: 0;
	border-top-right-radius: 0;
}

.wff-term-item:has(> .wff-term-header.wff-is-checked):has(+ .wff-term-item > .wff-term-header.wff-is-checked) > .wff-term-header,
.wff-term-item:has(> .wff-term-header:has(.wff-checkbox:checked)):has(+ .wff-term-item > .wff-term-header:has(.wff-checkbox:checked)) > .wff-term-header {
	border-bottom-left-radius: 0;
	border-bottom-right-radius: 0;
}

/* ==========================================================================
   Category Hierarchy — Visual Weight
   ========================================================================== */

/* Parent categories (have children) — stand out as section headings */
.wff-has-children > .wff-term-header .wff-checkbox-text {
	font-weight: 600;
}

/* Child categories (nested in accordion) — slightly recessed to signal depth */
.wff-accordion-panel .wff-term-header .wff-checkbox-text {
	font-size: 13.5px;
}

/* Leaf items have no accordion-toggle button on the right.
 * A pseudo-element spacer reserves the same width (44px) so the count column
 * aligns with parent rows that do have a toggle. No layout jump. */
.wff-term-item:not(.wff-has-children) > .wff-term-header::after {
	content: '';
	flex-shrink: 0;
	width: 44px;
}

/* Tighter dropdown context — match the 36px toggle size used there */
.wff-layout-top .wff-dropdown-content .wff-term-item:not(.wff-has-children) > .wff-term-header::after {
	width: 36px;
}

/* Dropdown context: tighter touch targets are acceptable on desktop */
.wff-layout-top .wff-dropdown-content .wff-term-header {
	min-height: 36px;
	/* Suppress left border — it clips against dropdown panel border-radius.
	   Background tint + bold text are sufficient active indicators in a panel. */
	border-left: none;
}

.wff-layout-top .wff-dropdown-content .wff-term-header .wff-checkbox-label {
	min-height: 36px;
	/* Undo the padding-left reserved for the sidebar border accent */
	padding-left: 0;
}

.wff-layout-top .wff-dropdown-content .wff-accordion-toggle {
	min-width: 36px;
	min-height: 36px;
}

/* Suppress left border for attribute labels inside dropdown panels too */
.wff-layout-top .wff-dropdown-content > .wff-checkbox-label {
	border-left: none;
	padding-left: 0;
}

/* Reduced motion: disable chevron rotation and row hover animations */
@media (prefers-reduced-motion: reduce) {
	.wff-accordion-chevron,
	.wff-accordion-toggle {
		transition: none;
	}
}

/* ==========================================================================
   Price Range
   ========================================================================== */

.wff-price-range {
	padding: 4px 0;
}

.wff-price-inputs {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-bottom: 12px;
}

.wff-price-label {
	display: flex;
	align-items: center;
	flex: 1;
	background: var(--wff-bg-hover);
	border: 1px solid var(--wff-border);
	border-radius: var(--wff-radius-sm);
	padding: 8px 10px;
	transition: border-color var(--wff-transition);
}

.wff-price-label:focus-within {
	border-color: var(--wff-primary);
}

.wff-price-currency {
	font-size: 13px;
	color: var(--wff-text-muted);
	margin-right: 4px;
}

.wff-price-input {
	border: none;
	background: none;
	width: 100%;
	font-size: 14px;
	font-family: var(--wff-font);
	color: var(--wff-text);
	outline: none;
	-moz-appearance: textfield;
}

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

.wff-price-separator {
	color: var(--wff-text-muted);
	flex-shrink: 0;
}

/* Dual range slider */
.wff-price-slider {
	position: relative;
	height: 20px;
}

/* Grey background track — inset by thumb radius so it spans thumb-center to thumb-center */
.wff-price-slider::before {
	content: '';
	position: absolute;
	top: 50%;
	left: 10px;
	right: 10px;
	height: 4px;
	transform: translateY(-50%);
	background: #e0e0e0;
	border-radius: 2px;
	z-index: 0;
}

/*
 * Colored active range.
 * --wff-min-pct and --wff-max-pct are unitless fractions (0–1) set by JS.
 * calc(10px + fraction * (100% - 20px)) maps fraction to the inset track.
 * At 0: starts at 10px (left thumb center). At 1: ends at right: 10px (right thumb center).
 */
.wff-price-slider::after {
	content: '';
	position: absolute;
	top: 50%;
	left: calc(10px + var(--wff-min-pct, 0) * (100% - 20px));
	right: calc(10px + (1 - var(--wff-max-pct, 1)) * (100% - 20px));
	height: 4px;
	transform: translateY(-50%);
	background: var(--wff-primary);
	border-radius: 2px;
	z-index: 1;
}

.wff-range {
	position: absolute;
	left: 0;
	width: 100%;
	height: 20px;
	top: 50%;
	transform: translateY(-50%);
	-webkit-appearance: none;
	appearance: none;
	background: transparent;
	pointer-events: none;
	outline: none;
	z-index: 2;
}

/* Hide native track — we draw our own via ::before / ::after on the container */
.wff-range::-webkit-slider-runnable-track {
	background: transparent;
	width: 100%;
	height: 20px;
	border: none;
	padding: 0;
	margin: 0;
}

.wff-range::-moz-range-track {
	background: transparent;
	border: none;
}

.wff-range::-moz-range-progress {
	background: transparent;
}

.wff-range::-webkit-slider-thumb {
	-webkit-appearance: none;
	width: 20px;
	height: 20px;
	border-radius: 50%;
	background: var(--wff-bg);
	border: 2px solid var(--wff-primary);
	cursor: pointer;
	pointer-events: auto;
	position: relative;
	z-index: 2;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.wff-range::-moz-range-thumb {
	width: 20px;
	height: 20px;
	border-radius: 50%;
	background: var(--wff-bg);
	border: 2px solid var(--wff-primary);
	cursor: pointer;
	pointer-events: auto;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* ==========================================================================
   Apply Button
   ========================================================================== */

.wff-actions {
	padding: 16px 0 0;
}

.wff-apply-btn {
	display: block;
	width: 100%;
	padding: 12px 20px;
	background: var(--wff-primary);
	color: #fff;
	border: none;
	border-radius: var(--wff-radius);
	font-size: 14px;
	font-weight: 600;
	font-family: var(--wff-font);
	cursor: pointer;
	transition: background var(--wff-transition), transform var(--wff-transition);
}

.wff-apply-btn:hover {
	background: var(--wff-primary-hover);
}

.wff-apply-btn:active {
	transform: scale(0.98);
}

/* ==========================================================================
   Product Results
   ========================================================================== */

.wff-results {
	width: 100%;
}

.wff-results-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 12px 0;
	margin-bottom: 16px;
	border-bottom: 1px solid var(--wff-border);
}

.wff-results-count {
	font-size: 14px;
	color: var(--wff-text-muted);
}

.wff-sort-select {
	padding: 6px 28px 6px 10px;
	border: 1px solid var(--wff-border);
	border-radius: var(--wff-radius-sm);
	font-size: 13px;
	font-family: var(--wff-font);
	color: var(--wff-text);
	background: var(--wff-bg);
	cursor: pointer;
	appearance: none;
	-webkit-appearance: none;
	background-image: url("data:image/svg+xml,%3Csvg width='10' height='6' viewBox='0 0 10 6' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L5 5L9 1' stroke='%23717171' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 10px center;
}

/* ==========================================================================
   Product Grid
   ========================================================================== */

.wff-products-grid {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 16px;
}

.wff-product-card {
	display: flex;
	flex-direction: column;
	text-decoration: none;
	color: inherit;
	transition: transform var(--wff-transition);
}

.wff-product-card:hover {
	transform: translateY(-2px);
}

.wff-product-image {
	position: relative;
	aspect-ratio: 1;
	overflow: hidden;
	border-radius: var(--wff-radius);
	background: var(--wff-bg-hover);
	margin-bottom: 10px;
}

.wff-product-image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.3s ease;
}

.wff-product-card:hover .wff-product-image img {
	transform: scale(1.04);
}

.wff-product-badge {
	position: absolute;
	top: 8px;
	left: 8px;
	padding: 3px 8px;
	font-size: 11px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.3px;
	border-radius: var(--wff-radius-sm);
}

.wff-badge-sale {
	background: #e74c3c;
	color: #fff;
}

.wff-badge-out {
	background: var(--wff-text-muted);
	color: #fff;
}

.wff-product-name {
	font-size: 14px;
	font-weight: 500;
	margin: 0 0 4px;
	line-height: 1.3;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.wff-product-price {
	font-size: 14px;
	font-weight: 600;
	color: var(--wff-text);
}

.wff-product-price del {
	font-weight: 400;
	color: var(--wff-text-muted);
	margin-right: 4px;
}

.wff-product-price ins {
	text-decoration: none;
	color: #e74c3c;
}

.wff-product-rating {
	display: flex;
	align-items: center;
	gap: 4px;
	margin-top: 4px;
	font-size: 12px;
	color: var(--wff-text-muted);
}

.wff-stars {
	color: #f5a623;
	letter-spacing: 1px;
}

/* ==========================================================================
   Loading & Empty States
   ========================================================================== */

.wff-loading {
	display: flex;
	justify-content: center;
	padding: 40px 0;
}

.wff-loading[hidden] {
	display: none;
}

.wff-spinner {
	width: 28px;
	height: 28px;
	border: 2.5px solid var(--wff-border);
	border-top-color: var(--wff-primary);
	border-radius: 50%;
	animation: wff-spin 0.6s linear infinite;
}

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

.wff-no-results {
	text-align: center;
	padding: 40px 20px;
	color: var(--wff-text-muted);
	font-size: 15px;
}

.wff-no-results p {
	margin: 0 0 16px;
}

.wff-no-results-reset {
	display: inline-block;
	padding: 10px 20px;
	background: var(--wff-bg);
	border: 1px solid var(--wff-border);
	border-radius: var(--wff-radius-sm);
	font-size: 14px;
	font-family: var(--wff-font);
	color: var(--wff-text);
	cursor: pointer;
	transition: all var(--wff-transition);
}

.wff-no-results-reset:hover {
	background: var(--wff-bg-hover);
	border-color: var(--wff-primary-hover);
	color: var(--wff-primary-hover);
}

.wff-no-results[hidden] {
	display: none;
}

/* ==========================================================================
   Pagination
   ========================================================================== */

.wff-pagination {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 4px;
	padding: 24px 0 80px; /* Extra bottom padding for mobile toggle button clearance */
}

@media (min-width: 768px) {
	.wff-pagination {
		padding: 24px 0; /* Reset to normal on desktop where toggle is hidden */
	}
}

.wff-page-btn {
	display: flex;
	align-items: center;
	justify-content: center;
	min-width: 36px;
	height: 36px;
	padding: 0 8px;
	background: none;
	border: 1px solid var(--wff-border);
	border-radius: var(--wff-radius-sm);
	font-size: 14px;
	font-family: var(--wff-font);
	color: var(--wff-text);
	cursor: pointer;
	transition: all var(--wff-transition);
}

.wff-page-btn:hover {
	background: var(--wff-bg-hover);
	border-color: var(--wff-primary-hover);
}

.wff-page-btn.is-active {
	background: var(--wff-active);
	border-color: var(--wff-active);
	color: #fff;
}

.wff-page-btn:disabled {
	opacity: 0.4;
	cursor: not-allowed;
}

/* ==========================================================================
   Desktop Layout (768px+)
   ========================================================================== */

@media (min-width: 768px) {
	/* Hide mobile toggle on desktop */
	.wff-mobile-toggle {
		display: none;
	}

	/* Reset panel from mobile bottom sheet */
	.wff-panel {
		position: static;
		max-height: none;
		transform: none;
		border-radius: var(--wff-radius);
		box-shadow: none;
		border: 1px solid var(--wff-border);
		transition: none;
	}

	.wff-panel-header {
		display: none; /* No header needed on desktop */
	}

	.wff-panel-body {
		padding: 20px;
	}

	.wff-overlay {
		display: none;
	}

	/* Product grid: 3 columns on tablet */
	.wff-products-grid {
		grid-template-columns: repeat(3, 1fr);
		gap: 20px;
	}

	/* Sidebar layout */
	.wff-layout-sidebar {
		display: grid;
		grid-template-columns: 280px 1fr;
		gap: 32px;
		align-items: start;
	}

	.wff-layout-sidebar .wff-panel {
		position: sticky;
		top: 20px;
	}

	/* Top layout */
	.wff-layout-top {
		display: flex;
		flex-direction: column;
		gap: 20px;
	}

	.wff-layout-top .wff-form {
		display: flex;
		flex-wrap: wrap;
		gap: 16px;
		align-items: flex-start;
	}

	.wff-layout-top .wff-filter-group {
		flex: 0 0 auto;
		min-width: 180px;
		position: relative;
	}

	.wff-layout-top .wff-group-content {
		border-bottom: none;
		padding-bottom: 0;
	}

	.wff-layout-top .wff-actions {
		padding: 0;
		align-self: flex-end;
	}

	.wff-layout-top .wff-apply-btn {
		width: auto;
	}

	/* Modal layout stays same as mobile but centered */
	.wff-layout-modal .wff-panel {
		position: fixed;
		top: 50%;
		left: 50%;
		bottom: auto;
		right: auto;
		transform: translate(-50%, -50%) scale(0.95);
		opacity: 0;
		visibility: hidden;
		max-width: 500px;
		width: 90%;
		max-height: 80vh;
		border-radius: var(--wff-radius);
		box-shadow: var(--wff-shadow-lg);
		transition: transform 0.3s ease, opacity 0.3s ease, visibility 0.3s ease;
	}

	.wff-layout-modal .wff-panel.is-open {
		transform: translate(-50%, -50%) scale(1);
		opacity: 1;
		visibility: visible;
	}

	.wff-layout-modal .wff-panel-header {
		display: flex;
	}

	.wff-layout-modal .wff-overlay {
		display: block;
	}

	.wff-layout-modal .wff-mobile-toggle {
		display: flex;
		position: static;
		transform: none;
		margin-bottom: 16px;
	}

	.wff-layout-modal .wff-mobile-toggle:active {
		transform: scale(0.96);
	}
}

/* ==========================================================================
   Large Desktop (1024px+)
   ========================================================================== */

@media (min-width: 1024px) {
	.wff-products-grid {
		grid-template-columns: repeat(4, 1fr);
		gap: 24px;
	}

	.wff-layout-sidebar {
		grid-template-columns: 300px 1fr;
	}
}

/* ==========================================================================
   Reduced Motion
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
	.wff-panel,
	.wff-overlay,
	.wff-product-card,
	.wff-product-image img,
	.wff-apply-btn,
	.wff-mobile-toggle,
	.wff-term-header,
	.wff-accordion-panel,
	.wff-group-content > .wff-checkbox-label,
	.wff-dropdown-content > .wff-checkbox-label {
		transition: none;
	}

	.wff-spinner {
		animation-duration: 1.5s;
	}
}

/* ==========================================================================
   TOP BAR LAYOUT - Dropdown-based Horizontal Filter Bar
   ========================================================================== */

/* Mobile: Use same floating button and panel as sidebar layout */
.wff-layout-top .wff-mobile-toggle {
	display: flex;
}

/* Mobile: Show panel (uses same base styles as sidebar) */
.wff-layout-top .wff-panel {
	/* Uses base .wff-panel styles */
}

/* Mobile: Show overlay (uses same base styles as sidebar) */
.wff-layout-top .wff-overlay {
	/* Uses base .wff-overlay styles */
}

/* Hide desktop filter bar on mobile by default */
.wff-layout-top .wff-filter-bar {
	display: none;
}

/* Presets bar */
.wff-layout-top .wff-presets-bar {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	padding: 12px 0;
}

.wff-layout-top .wff-presets-bar[hidden] {
	display: none;
}

.wff-layout-top .wff-preset-chip {
	display: inline-flex;
	align-items: center;
	padding: 8px 16px;
	background: var(--wff-bg);
	border: 1px solid var(--wff-border);
	border-radius: 50px;
	font-size: 13px;
	font-weight: 500;
	color: var(--wff-text);
	cursor: pointer;
	transition: all var(--wff-transition);
}

.wff-layout-top .wff-preset-chip:hover {
	border-color: var(--wff-primary-hover);
	background: var(--wff-bg-hover);
}

.wff-layout-top .wff-preset-chip.active {
	background: var(--wff-active);
	border-color: var(--wff-active);
	color: #fff;
}

/* Active filter chips */
.wff-layout-top .wff-active-chips {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	padding: 12px 0;
	border-bottom: 1px solid var(--wff-border);
	margin-bottom: 16px;
}

.wff-layout-top .wff-active-chips[hidden] {
	display: none;
}

.wff-layout-top .wff-active-chip {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 6px 10px 6px 12px;
	background: var(--wff-bg-hover);
	border: 1px solid var(--wff-border);
	border-radius: 50px;
	font-size: 13px;
	color: var(--wff-text);
}

.wff-layout-top .wff-chip-remove {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 18px;
	height: 18px;
	padding: 0;
	background: none;
	border: none;
	color: var(--wff-text-muted);
	cursor: pointer;
	border-radius: 50%;
	font-size: 14px;
	line-height: 1;
	transition: all var(--wff-transition);
}

.wff-layout-top .wff-chip-remove:hover {
	background: rgba(0, 0, 0, 0.08);
	color: var(--wff-text);
}

/* ==========================================================================
   Unified Toolbar
   ========================================================================== */

/* Toolbar container - flexbox with left/right sections */
.wff-toolbar {
	display: none; /* Hidden on mobile by default */
}

/* Active filters bar - hidden by default, shown via JS when filters active */
.wff-active-bar {
	display: none;
}

.wff-active-bar:not([hidden]) {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
	padding: 12px 0;
	border-bottom: 1px solid var(--wff-border);
}

.wff-active-bar .wff-active-pills {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	flex: 1;
}

.wff-active-bar .wff-filter-pill {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 6px 10px 6px 12px;
	background: var(--wff-bg-hover);
	border: 1px solid var(--wff-border);
	border-radius: 50px;
	font-size: 13px;
	color: var(--wff-text);
}

.wff-active-bar .wff-pill-remove {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 18px;
	height: 18px;
	padding: 0;
	background: none;
	border: none;
	color: var(--wff-text-muted);
	cursor: pointer;
	border-radius: 50%;
	font-size: 14px;
	line-height: 1;
	transition: all var(--wff-transition);
}

.wff-active-bar .wff-pill-remove:hover {
	background: rgba(0, 0, 0, 0.08);
	color: var(--wff-text);
}

.wff-active-bar .wff-clear-all {
	padding: 6px 12px;
	background: none;
	border: none;
	font-size: 13px;
	font-family: var(--wff-font);
	color: var(--wff-text-muted);
	cursor: pointer;
	text-decoration: underline;
	text-underline-offset: 2px;
	transition: color var(--wff-transition);
	white-space: nowrap;
}

.wff-active-bar .wff-clear-all:hover {
	color: var(--wff-primary-hover);
}

/* Mobile toolbar - show only count/sort row */
.wff-layout-top .wff-toolbar-right-mobile {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 12px 0;
	border-bottom: 1px solid var(--wff-border);
}

/* Desktop toolbar-right is hidden on mobile (it's inside .wff-toolbar which is hidden) */
.wff-layout-top .wff-toolbar-right-desktop {
	display: none;
}

.wff-layout-top .wff-toolbar-right .wff-results-count {
	font-size: 13px;
	color: var(--wff-text-muted);
}

/* ==========================================================================
   TOP BAR LAYOUT - Desktop (768px+)
   ========================================================================== */

@media (min-width: 768px) {
	.wff-layout-top {
		display: flex;
		flex-direction: column;
		gap: 0;
	}

	/* Hide mobile elements on desktop */
	.wff-layout-top .wff-mobile-toggle,
	.wff-layout-top .wff-panel,
	.wff-layout-top .wff-overlay {
		display: none;
	}

	/* Show unified toolbar on desktop */
	.wff-layout-top .wff-toolbar {
		display: flex;
		align-items: center;
		justify-content: space-between;
		gap: 16px;
		padding: 16px 0;
	}

	/* Toolbar left section - filters */
	.wff-layout-top .wff-toolbar-left {
		display: flex;
		flex-wrap: wrap;
		align-items: center;
		gap: 12px;
		flex: 1;
	}

	/* Hide mobile toolbar-right on desktop */
	.wff-layout-top .wff-toolbar-right-mobile {
		display: none;
	}

	/* Show desktop toolbar-right inside toolbar */
	.wff-layout-top .wff-toolbar-right-desktop {
		display: flex;
		align-items: center;
		gap: 16px;
		flex-shrink: 0;
	}

	.wff-layout-top .wff-toolbar-right-desktop .wff-results-count {
		font-size: 14px;
		color: var(--wff-text-muted);
		white-space: nowrap;
	}

	/* Filter bar inside toolbar - reset from standalone styles */
	.wff-layout-top .wff-filter-bar {
		display: flex;
		flex-wrap: wrap;
		align-items: center;
		gap: 12px;
		padding: 0;
		border-bottom: none;
	}

	/* Dropdown container */
	.wff-layout-top .wff-dropdown {
		position: relative;
	}

	/* Dropdown trigger button */
	.wff-layout-top .wff-dropdown-trigger {
		display: flex;
		align-items: center;
		gap: 8px;
		padding: 10px 14px;
		background: var(--wff-bg);
		border: 1px solid var(--wff-border);
		border-radius: var(--wff-radius-sm);
		font-size: 14px;
		font-weight: 500;
		font-family: var(--wff-font);
		color: var(--wff-text);
		cursor: pointer;
		transition: all var(--wff-transition);
		white-space: nowrap;
	}

	.wff-layout-top .wff-dropdown-trigger:hover {
		border-color: var(--wff-primary-hover);
	}

	.wff-layout-top .wff-dropdown-trigger[aria-expanded="true"] {
		border-color: var(--wff-active);
		background: var(--wff-bg-hover);
	}

	.wff-layout-top .wff-dropdown-trigger[aria-expanded="true"] .wff-dropdown-arrow {
		transform: rotate(180deg);
	}

	/* Dropdown count badge */
	.wff-layout-top .wff-dropdown-count {
		display: inline-flex;
		align-items: center;
		justify-content: center;
		min-width: 20px;
		height: 20px;
		padding: 0 6px;
		background: var(--wff-active);
		color: #fff;
		border-radius: 10px;
		font-size: 11px;
		font-weight: 600;
	}

	.wff-layout-top .wff-dropdown-count[hidden] {
		display: none;
	}

	/* Price dropdown value display */
	.wff-layout-top .wff-dropdown-value {
		font-weight: 400;
		color: var(--wff-text-muted);
		font-size: 13px;
	}

	.wff-layout-top .wff-dropdown-value[hidden] {
		display: none;
	}

	.wff-layout-top .wff-dropdown-arrow {
		width: 12px;  /* explicit size prevents vertical misalignment */
		height: 12px;
		flex-shrink: 0;
		transition: transform var(--wff-transition);
		color: var(--wff-text-muted);
	}

	/* Dropdown panel */
	.wff-layout-top .wff-dropdown-panel {
		position: absolute;
		top: 100%;
		left: 0;
		z-index: 100;
		min-width: 240px;  /* was 220px — wider for better readability */
		max-height: 380px; /* was 320px — more list visible before scrolling */
		overflow-y: auto;
		background: var(--wff-bg);
		border: 1px solid var(--wff-border);
		border-radius: var(--wff-radius);
		/* Layered shadow: ambient depth + sharp inner shadow = feels like a real panel */
		box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12), 0 2px 8px rgba(0, 0, 0, 0.06);
		margin-top: 6px;  /* was 4px — more separation from trigger */
		padding: 6px 0;
		scrollbar-width: thin; /* subtle scrollbar on Firefox */
	}

	.wff-layout-top .wff-dropdown-panel[hidden] {
		display: none;
	}

	.wff-layout-top .wff-dropdown-content {
		padding: 2px 8px 4px 12px; /* was 0 12px — vertical breathing + right gutter for scrollbar */
	}

	/* Price dropdown - wider */
	.wff-layout-top .wff-dropdown-panel-price {
		min-width: 280px;
		padding: 16px;
	}

	.wff-layout-top .wff-dropdown-panel-price .wff-dropdown-content {
		padding: 0;
	}

	/* Checkbox styling in dropdowns — slightly more generous row height */
	.wff-layout-top .wff-dropdown-content .wff-checkbox-label {
		padding: 9px 0;
	}

	/* Topbar buttons */
	.wff-layout-top .wff-topbar-apply {
		padding: 10px 20px;
		background: var(--wff-primary);
		color: #fff;
		border: none;
		border-radius: var(--wff-radius-sm);
		font-size: 14px;
		font-weight: 600;
		font-family: var(--wff-font);
		cursor: pointer;
		transition: background var(--wff-transition);
	}

	.wff-layout-top .wff-topbar-apply:hover {
		background: var(--wff-primary-hover);
	}

	.wff-layout-top .wff-topbar-clear {
		padding: 10px 16px;
		background: none;
		border: none;
		font-size: 14px;
		font-family: var(--wff-font);
		color: var(--wff-text-muted);
		cursor: pointer;
		text-decoration: underline;
		text-underline-offset: 2px;
		transition: color var(--wff-transition);
	}

	.wff-layout-top .wff-topbar-clear:hover {
		color: var(--wff-primary-hover);
	}

	.wff-layout-top .wff-topbar-clear[hidden] {
		display: none;
	}

	/* Results area takes full width */
	.wff-layout-top .wff-results {
		width: 100%;
	}

	/* ==========================================================================
	   FLOATING ACTIVE FILTERS - Inline with results meta
	   ========================================================================== */

	/* Results header - floating style */
	.wff-layout-top .wff-results-header-floating {
		display: flex;
		justify-content: space-between;
		align-items: center;
		flex-wrap: wrap;
		gap: 12px;
		padding: 16px 0;
		border-bottom: 1px solid var(--wff-border);
		min-height: 56px;
	}

	/* Active filters inline container */
	.wff-layout-top .wff-active-filters-inline {
		display: flex;
		align-items: center;
		flex-wrap: wrap;
		gap: 8px;
		flex: 1;
		min-width: 0;
	}

	.wff-layout-top .wff-active-filters-inline[hidden] {
		display: none;
	}

	/* Active filter pills container */
	.wff-layout-top .wff-active-pills {
		display: flex;
		align-items: center;
		flex-wrap: wrap;
		gap: 6px;
	}

	/* Individual filter pill */
	.wff-layout-top .wff-filter-pill {
		display: inline-flex;
		align-items: center;
		gap: 4px;
		padding: 5px 8px 5px 10px;
		background: var(--wff-bg-hover);
		border: 1px solid var(--wff-border);
		border-radius: 50px;
		font-size: 13px;
		color: var(--wff-text);
		animation: wff-pill-appear 0.2s ease;
	}

	@keyframes wff-pill-appear {
		from {
			opacity: 0;
			transform: translateY(-4px) scale(0.95);
		}
		to {
			opacity: 1;
			transform: translateY(0) scale(1);
		}
	}

	.wff-layout-top .wff-pill-text {
		max-width: 120px;
		overflow: hidden;
		text-overflow: ellipsis;
		white-space: nowrap;
	}

	.wff-layout-top .wff-pill-remove {
		display: flex;
		align-items: center;
		justify-content: center;
		width: 16px;
		height: 16px;
		padding: 0;
		background: none;
		border: none;
		color: var(--wff-text-muted);
		cursor: pointer;
		border-radius: 50%;
		font-size: 14px;
		line-height: 1;
		transition: all var(--wff-transition);
	}

	.wff-layout-top .wff-pill-remove:hover {
		background: rgba(0, 0, 0, 0.1);
		color: var(--wff-text);
	}

	/* Results meta - count and sorting (always pushed to the right) */
	.wff-layout-top .wff-results-meta {
		display: flex;
		align-items: center;
		gap: 16px;
		flex-shrink: 0;
		margin-left: auto;
	}

	.wff-layout-top .wff-results-meta .wff-results-count {
		font-size: 14px;
		color: var(--wff-text-muted);
		white-space: nowrap;
	}

	.wff-layout-top .wff-results-meta .wff-sort {
		flex-shrink: 0;
	}
}

/* ==========================================================================
   FLOATING ACTIVE FILTERS - Mobile styles
   ========================================================================== */

/* Mobile: Stack layout */
.wff-layout-top .wff-results-header-floating {
	display: flex;
	flex-direction: column;
	align-items: stretch;
	gap: 12px;
	padding: 12px 0;
	border-bottom: 1px solid var(--wff-border);
}

.wff-layout-top .wff-active-filters-inline {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 8px;
	order: 1;
}

.wff-layout-top .wff-active-filters-inline[hidden] {
	display: none;
}

.wff-layout-top .wff-active-pills {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 6px;
}

.wff-layout-top .wff-filter-pill {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	padding: 5px 8px 5px 10px;
	background: var(--wff-bg-hover);
	border: 1px solid var(--wff-border);
	border-radius: 50px;
	font-size: 13px;
	color: var(--wff-text);
	animation: wff-pill-appear 0.2s ease;
}

@keyframes wff-pill-appear {
	from {
		opacity: 0;
		transform: translateY(-4px) scale(0.95);
	}
	to {
		opacity: 1;
		transform: translateY(0) scale(1);
	}
}

.wff-layout-top .wff-pill-text {
	max-width: 100px;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.wff-layout-top .wff-pill-remove {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 16px;
	height: 16px;
	padding: 0;
	background: none;
	border: none;
	color: var(--wff-text-muted);
	cursor: pointer;
	border-radius: 50%;
	font-size: 14px;
	line-height: 1;
	transition: all var(--wff-transition);
}

.wff-layout-top .wff-pill-remove:hover {
	background: rgba(0, 0, 0, 0.1);
	color: var(--wff-text);
}

.wff-layout-top .wff-clear-filters-inline {
	padding: 4px 10px;
	background: none;
	border: none;
	font-size: 13px;
	font-family: var(--wff-font);
	color: var(--wff-text-muted);
	cursor: pointer;
	text-decoration: underline;
	text-underline-offset: 2px;
	transition: color var(--wff-transition);
	white-space: nowrap;
}

.wff-layout-top .wff-clear-filters-inline[hidden] {
	display: none;
}

.wff-layout-top .wff-results-meta {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	order: 2;
}

.wff-layout-top .wff-results-meta .wff-results-count {
	font-size: 13px;
	color: var(--wff-text-muted);
}

/* Desktop override for floating header */
@media (min-width: 768px) {
	.wff-layout-top .wff-results-header-floating {
		flex-direction: row;
		align-items: center;
		justify-content: space-between;
		padding: 16px 0;
	}

	.wff-layout-top .wff-active-filters-inline {
		order: 0;
		flex: 1;
		min-width: 0;
	}

	.wff-layout-top .wff-results-meta {
		order: 0;
		justify-content: flex-end;
	}

	.wff-layout-top .wff-pill-text {
		max-width: 120px;
	}
}
