.ldwd-filter-panel-body {
	display: grid;
	grid-template-columns: repeat( 12, minmax( 0, 1fr ) );
	align-items: start;
}
.ldwd-filter-panel-body .ldwd-filter-group {
	grid-column: span 12;
}
body.ldwd-filter-drawer-open {
	overflow: hidden;
}
.ldwd-filter-group {
	display: flex;
	flex-direction: column;
	min-width: 0;
}
.ldwd-filter-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	cursor: pointer;
	user-select: none;
}
.ldwd-filter-header-static {
	cursor: default;
}
.ldwd-filter-title {
	font-weight: 600;
}
.ldwd-filter-toggle-icon {
	line-height: 1;
	flex-shrink: 0;
}
.ldwd-filter-select,
.ldwd-filter-search {
	display: block;
	width: 100%;
	box-sizing: border-box;
	font: inherit;
}

/* Custom dropdown (replaces native <select> so its list can be height-limited) */
.ldwd-filter-dropdown {
	position: relative;
}
.ldwd-filter-dropdown-toggle {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	background: none;
	margin: 0;
	appearance: none;
	-webkit-appearance: none;
	text-align: left;
	cursor: pointer;
}
.ldwd-filter-dropdown-arrow {
	flex-shrink: 0;
	transition: transform 0.2s ease;
	line-height: 1;
}
.ldwd-filter-dropdown.ldwd-open .ldwd-filter-dropdown-arrow {
	transform: rotate(180deg);
}
.ldwd-filter-dropdown-panel {
	display: none;
	position: absolute;
	top: 100%;
	left: 0;
	right: 0;
	z-index: 30;
	margin-top: 4px;
	overflow-y: auto;
	max-height: calc( 10 * 38px );
}
.ldwd-filter-dropdown.ldwd-open .ldwd-filter-dropdown-panel {
	display: block;
}
.ldwd-filter-dropdown-option {
	display: block;
	width: 100%;
	background: none;
	border: 0;
	cursor: pointer;
	font: inherit;
	text-align: left;
}

/* Search autocomplete */
.ldwd-filter-search-wrap {
	position: relative;
}
.ldwd-filter-suggestions {
	display: none;
	position: absolute;
	top: 100%;
	left: 0;
	right: 0;
	z-index: 30;
	margin-top: 4px;
	overflow-y: auto;
	max-height: calc( 10 * 38px );
}
.ldwd-filter-suggestions.ldwd-open {
	display: block;
}
.ldwd-filter-suggestion {
	display: block;
	width: 100%;
	background: none;
	border: 0;
	cursor: pointer;
	font: inherit;
	text-align: left;
}
.ldwd-filter-suggestion mark {
	background: none;
	color: inherit;
	font-weight: 700;
	padding: 0;
}
.ldwd-filter-options-list {
	display: flex;
	flex-direction: column;
}
.ldwd-filter-buttons.ldwd-filter-options-list {
	flex-direction: row;
	flex-wrap: wrap;
}
.ldwd-filter-radio,
.ldwd-filter-checkbox {
	display: flex;
	align-items: center;
	gap: 8px;
	cursor: pointer;
	font: inherit;
}
.ldwd-filter-btn {
	border: 1px solid transparent;
	cursor: pointer;
	font: inherit;
	transition: background-color 0.2s ease, color 0.2s ease;
}
.ldwd-filter-swatches {
	display: flex;
	flex-wrap: wrap;
}
.ldwd-filter-swatch {
	border: 2px solid #ddd;
	cursor: pointer;
	padding: 0;
	transition: box-shadow 0.2s ease;
}
.ldwd-filter-clear {
	align-self: flex-start;
	background: transparent;
	border: 0;
	padding: 0;
	cursor: pointer;
	font: inherit;
	text-decoration: underline;
}
.ldwd-filter-apply {
	display: inline-block;
	border: 0;
	cursor: pointer;
	font: inherit;
}

/* Active Filters widget */
.ldwd-active-filters {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
}
.ldwd-active-filters-list {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
}
.ldwd-active-filter-pill {
	display: inline-flex;
	align-items: center;
	white-space: nowrap;
}
.ldwd-active-filter-remove {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	background: none;
	border: 0;
	padding: 0;
	cursor: pointer;
	line-height: 1;
}
.ldwd-active-filters-clear {
	display: inline-flex;
	align-items: center;
	background: none;
	border: 0;
	padding: 0;
	cursor: pointer;
	font: inherit;
	white-space: nowrap;
}
.ldwd-active-filters-empty-text {
	opacity: 0.7;
}

/* Sort By widget */
.ldwd-sort-select-wrap {
	position: relative;
	display: inline-block;
}
.ldwd-sort-select {
	width: 100%;
	box-sizing: border-box;
	appearance: none;
	-webkit-appearance: none;
	-moz-appearance: none;
	cursor: pointer;
	font: inherit;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23666' 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;
	background-size: 16px;
}
.ldwd-filter-no-results {
	padding: 24px;
	text-align: center;
	width: 100%;
	grid-column: 1 / -1;
}
.ldwd-filter-diagnostic {
	color: #a45c00;
	background: #fff3cd;
	border: 1px dashed #d0a000;
	border-radius: 4px;
}

/* Home Filter widget */
.ldwd-home-filter-grid {
	display: grid;
	grid-template-columns: repeat( 12, minmax( 0, 1fr ) );
	align-items: start;
}
.ldwd-home-filter-grid .ldwd-filter-group {
	grid-column: span 6;
}
.ldwd-home-filter-submit {
	display: inline-block;
	border: 0;
	cursor: pointer;
	font: inherit;
	white-space: nowrap;
}

/* Home Filter — Show More / Show Less */
.ldwd-home-filter-extra-wrap {
	display: grid;
	grid-template-rows: 0fr;
	transition: grid-template-rows 0.35s ease;
}
.ldwd-home-filter-extra-wrap.ldwd-open {
	grid-template-rows: 1fr;
}
.ldwd-home-filter-extra-inner {
	overflow: hidden;
	min-height: 0;
}
.ldwd-home-filter-actions {
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 12px;
}
.ldwd-home-filter-toggle {
	display: inline-flex;
	align-items: center;
	border: 0;
	cursor: pointer;
	font: inherit;
	white-space: nowrap;
}
.ldwd-home-filter-toggle-icon {
	display: inline-flex;
	align-items: center;
	line-height: 1;
	transition: transform 0.3s ease;
}
.ldwd-home-filter-toggle.ldwd-open .ldwd-home-filter-toggle-icon {
	transform: rotate(180deg);
}

/* Home Filter — labeled color swatches + grid columns for swatches/checkboxes.
   Scoped to .ldwd-home-filter specifically so the archive Filter widget's
   existing (label-less, non-grid) swatch/checkbox layout is unaffected. */
.ldwd-home-filter .ldwd-filter-swatches {
	display: grid;
	grid-template-columns: repeat( 6, 1fr );
	gap: 12px 16px;
}
.ldwd-filter-swatch-item {
	display: flex;
	align-items: center;
	gap: 8px;
	cursor: pointer;
}
.ldwd-filter-swatch-item .ldwd-filter-swatch {
	flex-shrink: 0;
}
.ldwd-filter-swatch-label {
	white-space: nowrap;
}
.ldwd-home-filter .ldwd-filter-options-list {
	display: grid;
	grid-template-columns: repeat( 4, 1fr );
}

/* Pagination widget */
.ldwd-pagination {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
}
.ldwd-pagination-item,
.ldwd-pagination-prevnext {
	background: none;
	border: 0;
	padding: 0;
	cursor: pointer;
	font: inherit;
	line-height: 1;
	transition: color 0.15s ease;
}
.ldwd-pagination-prevnext.ldwd-disabled {
	cursor: default;
	pointer-events: none;
}
.ldwd-pagination-dots {
	line-height: 1;
	user-select: none;
}

/* Range slider (e.g. Price) */
.ldwd-filter-range-values {
	display: flex;
	align-items: center;
	justify-content: space-between;
}
.ldwd-filter-range-slider {
	position: relative;
	height: 18px;
	display: flex;
	align-items: center;
}
.ldwd-filter-range-track {
	position: absolute;
	left: 0;
	right: 0;
	border-radius: 999px;
}
.ldwd-filter-range-fill {
	position: absolute;
	top: 0;
	bottom: 0;
	border-radius: 999px;
}
.ldwd-filter-range-input {
	position: absolute;
	left: 0;
	right: 0;
	width: 100%;
	margin: 0;
	background: transparent;
	pointer-events: none;
	-webkit-appearance: none;
	appearance: none;
}
/* Only the thumb (handle) should be interactive — the invisible track of
   each stacked <input> must not intercept clicks meant for the other handle. */
.ldwd-filter-range-input::-webkit-slider-runnable-track {
	background: transparent;
	border: none;
}
.ldwd-filter-range-input::-moz-range-track {
	background: transparent;
	border: none;
}
.ldwd-filter-range-input::-webkit-slider-thumb {
	-webkit-appearance: none;
	appearance: none;
	pointer-events: auto;
	border-style: solid;
	border-width: 2px;
	border-radius: 50%;
	cursor: pointer;
	box-shadow: 0 1px 4px rgba(0,0,0,0.25);
	margin-top: 0;
}
.ldwd-filter-range-input::-moz-range-thumb {
	pointer-events: auto;
	border-style: solid;
	border-width: 2px;
	border-radius: 50%;
	cursor: pointer;
	box-shadow: 0 1px 4px rgba(0,0,0,0.25);
	box-sizing: border-box;
}

/* Applied to the TARGET loop grid container while an AJAX request is in flight. */
.ldwd-filter-loading {
	position: relative;
	opacity: 0.5;
	pointer-events: none;
	transition: opacity 0.2s ease;
}
