/* Luxe dress filters. Uses the Luxe Couture theme's colours and fonts when present. */
.lf-panel,
.lf-chips {
	--lf-ivory: var(--luxe-pale-ivory, #FAF6EF);
	--lf-panel: var(--luxe-warm-ivory, #E8DCCB);
	--lf-line: var(--luxe-champagne, #D2B896);
	--lf-border: var(--luxe-taupe, #A58D73);
	--lf-gold: var(--luxe-gold, #B88748);
	--lf-muted: var(--luxe-bronze, #805322);
	--lf-ink: var(--luxe-espresso, #302216);
	--lf-display: var(--luxe-font-display, 'Cormorant Garamond', Georgia, serif);
	--lf-track: var(--luxe-tracking, 0.14em);
	color: var(--lf-ink);
	font-size: 14.5px;
}

.lf-panel { display: flex; flex-direction: column; }
.lf-panel.is-loading { opacity: 0.55; pointer-events: none; transition: opacity 0.2s ease; }
.lf-panel__clear { margin: 0 0 8px; font-size: 13px; }
.lf-panel__clear a { color: var(--lf-muted); }

/* Groups */
.lf-group { border-top: 1px solid var(--lf-panel); }
.lf-more .lf-group:first-of-type { border-top: 0; }
.lf-group__title {
	display: flex;
	align-items: center;
	gap: 10px;
	min-height: 52px;
	padding: 6px 0;
	cursor: pointer;
	list-style: none;
	font-size: 12.5px;
	font-weight: 500;
	letter-spacing: var(--lf-track);
	text-transform: uppercase;
}
.lf-group__title::-webkit-details-marker { display: none; }
.lf-group__title > span:first-child { flex: 1; }
.lf-group__title::after { content: "+"; font-size: 20px; font-weight: 400; color: var(--lf-muted); letter-spacing: 0; }
.lf-group[open] > .lf-group__title::after { content: "\2212"; }
.lf-group__n {
	min-width: 20px;
	height: 20px;
	padding: 0 6px;
	border-radius: 10px;
	background: var(--lf-ink);
	color: var(--lf-ivory);
	font-size: 11px;
	line-height: 20px;
	text-align: center;
	letter-spacing: 0;
}
.lf-group__body { margin: 0; padding: 0 0 18px; border: 0; min-width: 0; }

/* Options */
.lf-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.lf-option {
	display: flex;
	align-items: center;
	gap: 10px;
	min-height: 36px;
	font-size: 14.5px;
	font-weight: 400;
	cursor: pointer;
}
.lf-option input { width: 18px; height: 18px; margin: 0; flex-shrink: 0; accent-color: var(--lf-ink); }
.lf-option__label { flex: 1; }
.lf-count { font-size: 12.5px; color: var(--lf-muted); }
.lf-option.is-empty { color: var(--lf-border); cursor: default; }
.lf-option.is-empty .lf-count { color: var(--lf-border); }

/* Colour swatches */
.lf-swatch {
	width: 20px;
	height: 20px;
	border-radius: 50%;
	flex-shrink: 0;
	box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.12);
}
.lf-swatch.is-light { box-shadow: inset 0 0 0 1px var(--lf-border); }
.lf-list--swatch .lf-option input:checked ~ .lf-swatch { box-shadow: 0 0 0 2px var(--lf-ivory), 0 0 0 3px var(--lf-ink); }

/* Size buttons */
.lf-list--button { flex-direction: row; flex-wrap: wrap; gap: 8px; }
.lf-list--button li { flex: 0 0 auto; }
.lf-list--button .lf-option {
	position: relative;
	justify-content: center;
	min-width: 52px;
	min-height: 44px;
	padding: 0 12px;
	border: 1px solid var(--lf-border);
	background: #fff;
}
.lf-list--button .lf-option input {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	opacity: 0;
	cursor: pointer;
}
.lf-list--button .lf-option__label { flex: 0 0 auto; text-align: center; }
.lf-list--button .lf-option:has(input:checked) { background: var(--lf-ink); border-color: var(--lf-ink); color: var(--lf-ivory); }
.lf-list--button .lf-option:has(input:focus-visible) { outline: 2px solid var(--lf-gold); outline-offset: 2px; }
.lf-list--button .lf-option.is-empty { border-color: var(--lf-panel); background: transparent; text-decoration: line-through; }

/* More filters */
.lf-more { border-top: 1px solid var(--lf-panel); }
.lf-more__toggle {
	display: flex;
	align-items: center;
	justify-content: space-between;
	min-height: 52px;
	cursor: pointer;
	list-style: none;
	font-family: var(--lf-display);
	font-size: 20px;
	font-weight: 600;
}
.lf-more__toggle::-webkit-details-marker { display: none; }
.lf-more__toggle::after { content: "+"; font-family: inherit; font-size: 20px; color: var(--lf-muted); }
.lf-more[open] > .lf-more__toggle::after { content: "\2212"; }
.lf-more > .lf-group { padding-left: 0; }

/* Apply button: always without JavaScript; with JavaScript only on phones. */
.lf-apply { padding-top: 16px; }
.lf-apply__btn {
	width: 100%;
	min-height: 50px;
	border: 0;
	background: var(--lf-ink);
	color: var(--lf-ivory);
	font: inherit;
	font-size: 12.5px;
	font-weight: 500;
	letter-spacing: var(--lf-track);
	text-transform: uppercase;
	cursor: pointer;
}
.lf-apply__btn:hover { background: var(--lf-muted); }
.lf-panel.lf-js .lf-apply { display: none; }

@media (max-width: 959px) {
	.lf-panel.lf-js .lf-apply {
		display: block;
		position: sticky;
		bottom: 0;
		padding: 12px 0;
		background: var(--lf-ivory);
	}
	.lf-panel.is-changed .lf-apply__btn { background: var(--lf-gold); color: var(--lf-ink); }
}

.lf-panel :focus-visible { outline: 2px solid var(--lf-gold); outline-offset: 2px; }

/* Chosen filter chips above the products */
.lf-chips { margin: 0 0 20px; }
.lf-chips ul { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; list-style: none; margin: 0; padding: 0; }
.lf-chip {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	min-height: 36px;
	padding: 0 12px 0 14px;
	border: 1px solid var(--lf-line);
	border-radius: 18px;
	background: #fff;
	color: var(--lf-ink);
	font-size: 13.5px;
	text-decoration: none;
}
.lf-chip:hover { border-color: var(--lf-ink); color: var(--lf-ink); }
.lf-chip__x { font-size: 16px; line-height: 1; color: var(--lf-muted); }
.lf-chips__clear { font-size: 13px; color: var(--lf-muted); padding: 0 6px; }
.lf-none { margin-top: 12px; }

.lf-panel .screen-reader-text,
.lf-chips .screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(1px, 1px, 1px, 1px);
	clip-path: inset(50%);
	white-space: nowrap;
}

@media (prefers-reduced-motion: reduce) {
	.lf-panel * { transition: none !important; }
}
