/* LO Product Filters
 *
 * Selectors are prefixed with `html body` on purpose: Hello Elementor's reset.css and the
 * Elementor kit (Site Settings > Buttons / Form fields) style every <button> and <input>
 * and load after this file. The extra specificity keeps the filter UI from inheriting
 * the big kit CTA button style.
 *
 * Colours/fonts follow the Elementor global colours/fonts. Override in Site Settings > Custom CSS:
 *   html body .lopf, html body .lopf-open { --lopf-accent: #373635; }
 */
html body .lopf,
html body .lopf-open {
	--lopf-accent: var(--e-global-color-secondary, #373635);   /* ticked boxes, chips, button */
	--lopf-accent-text: #fff;
	--lopf-heading: var(--e-global-color-primary, #111827);    /* facet headings */
	--lopf-text: var(--e-global-color-text, #1f2937);
	--lopf-muted: #6b7280;
	--lopf-border: #e5e7eb;
	--lopf-hover: #f5f5f4;
	--lopf-bg: #fff;
	--lopf-radius: 4px;
	--lopf-font: var(--e-global-typography-text-font-family, inherit);
	--lopf-heading-font: var(--e-global-typography-primary-font-family, inherit);
}

html body .lopf {
	font-family: var(--lopf-font);
	font-size: 15px;
	line-height: 1.4;
	color: var(--lopf-text);
}
html body .lopf *,
html body .lopf *::before,
html body .lopf *::after { box-sizing: border-box; }
html body .lopf [hidden] { display: none !important; }

/* Neutralise theme/kit button styles inside the filter UI */
html body .lopf button,
html body .lopf button:hover,
html body .lopf button:focus,
html body .lopf button:active {
	width: auto; min-height: 0; margin: 0; padding: 0;
	border: 0; border-radius: 0; box-shadow: none;
	background: transparent; color: inherit;
	font-family: inherit; font-size: inherit; font-weight: inherit; line-height: inherit;
	letter-spacing: normal; text-transform: none; text-decoration: none; text-align: left;
	transition: none;
}

html body .lopf .lopf__head { display: none; }
html body .lopf .lopf__title { font-family: var(--lopf-heading-font); font-weight: 700; font-size: 18px; color: var(--lopf-heading); }

/* Search */
html body .lopf .lopf__search { position: relative; margin-bottom: 18px; }
html body .lopf .lopf__search-icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--lopf-muted); pointer-events: none; }
html body .lopf .lopf__search input[type="search"],
html body .lopf .lopf__search input[type="search"]:focus {
	width: 100%; height: 42px; margin: 0;
	padding: 0 36px;
	border: 1px solid var(--lopf-border); border-radius: var(--lopf-radius);
	background: var(--lopf-bg); color: var(--lopf-text);
	font-family: inherit; font-size: 14px; line-height: normal;
	outline: none; box-shadow: none;
	-webkit-appearance: none; appearance: none;
	transition: border-color .15s, box-shadow .15s;
}
html body .lopf .lopf__search input[type="search"]:focus {
	border-color: var(--lopf-accent);
	box-shadow: 0 0 0 3px color-mix(in srgb, var(--lopf-accent) 15%, transparent);
}
html body .lopf .lopf__search input[type="search"]::-webkit-search-cancel-button { -webkit-appearance: none; display: none; }
html body .lopf .lopf__search input[type="search"]::placeholder { color: var(--lopf-muted); opacity: 1; }
html body .lopf .lopf__clear,
html body .lopf .lopf__clear:hover,
html body .lopf .lopf__clear:focus {
	position: absolute; right: 4px; top: 50%; transform: translateY(-50%);
	width: 32px; height: 32px; border-radius: 50%;
	color: var(--lopf-muted); font-size: 20px; line-height: 32px; text-align: center; cursor: pointer;
}
html body .lopf .lopf__clear:hover { background: var(--lopf-hover); color: var(--lopf-text); }

/* Active filter chips */
html body .lopf .lopf__chips { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0 0 14px; }
html body .lopf .lopf__chip,
html body .lopf .lopf__chip:focus {
	display: inline-flex; align-items: center; gap: 6px;
	padding: 5px 8px 5px 11px;
	border: 1px solid var(--lopf-accent); border-radius: 999px;
	background: color-mix(in srgb, var(--lopf-accent) 7%, #fff); color: var(--lopf-accent);
	font-size: 13px; font-weight: 600; line-height: 1.2; cursor: pointer;
	transition: background .15s, color .15s;
}
html body .lopf .lopf__chip:hover { background: var(--lopf-accent); color: var(--lopf-accent-text); border: 1px solid var(--lopf-accent); border-radius: 999px; }
html body .lopf .lopf__chip span { font-size: 16px; line-height: 1; opacity: .75; }
html body .lopf .lopf__clear-all { font-size: 13px; color: var(--lopf-muted); text-decoration: underline; margin-left: 4px; }
html body .lopf .lopf__clear-all:hover { color: var(--lopf-text); }

/* Facets */
html body .lopf .lopf__facet { border: 0; border-top: 1px solid var(--lopf-border); margin: 0; padding: 14px 0; min-width: 0; }
html body .lopf .lopf__facet:last-of-type { border-bottom: 1px solid var(--lopf-border); }
html body .lopf .lopf__legend { float: left; width: 100%; padding: 0; margin: 0; border: 0; }
html body .lopf .lopf__toggle,
html body .lopf .lopf__toggle:hover,
html body .lopf .lopf__toggle:focus {
	display: flex; align-items: center; gap: 8px; width: 100%; cursor: pointer;
	font-family: var(--lopf-heading-font); font-weight: 700; font-size: 15px; line-height: 1.3;
	color: var(--lopf-heading);
}
html body .lopf .lopf__toggle:focus-visible { outline: 2px solid var(--lopf-accent); outline-offset: 3px; }
html body .lopf .lopf__toggle::after {
	content: ""; margin-left: auto; width: 7px; height: 7px; flex: none;
	border-right: 2px solid currentColor; border-bottom: 2px solid currentColor;
	transform: translateY(-2px) rotate(45deg); transition: transform .2s; opacity: .6;
}
html body .lopf .lopf__facet.is-collapsed .lopf__toggle::after { transform: rotate(-45deg); }
html body .lopf .lopf__badge {
	min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px;
	display: inline-flex; align-items: center; justify-content: center;
	background: var(--lopf-accent); color: var(--lopf-accent-text);
	font-size: 11px; font-weight: 700; font-family: var(--lopf-font);
}
html body .lopf .lopf__facet.is-collapsed .lopf__list,
html body .lopf .lopf__facet.is-collapsed .lopf__more { display: none; }

html body .lopf .lopf__list { clear: both; list-style: none; margin: 0; padding: 10px 0 0; }
html body .lopf .lopf__item { margin: 0; padding: 0; list-style: none; }
html body .lopf .lopf__item::before,
html body .lopf .lopf__item::marker { content: none; }
html body .lopf .lopf__item label {
	position: relative; display: flex; align-items: center; gap: 10px;
	margin: 0 -8px; padding: 6px 8px; border-radius: var(--lopf-radius);
	cursor: pointer; font-weight: 400; font-size: 14.5px; line-height: 1.3; color: var(--lopf-text);
	transition: background .12s;
}
html body .lopf .lopf__item label:hover { background: var(--lopf-hover); }

/* Custom checkbox (real input kept for accessibility/keyboard) */
html body .lopf .lopf__item input[type="checkbox"] {
	position: absolute; left: 0; top: 0; width: 1px; height: 1px;
	margin: 0; padding: 0; border: 0; opacity: 0; pointer-events: none;
}
html body .lopf .lopf__box {
	position: relative; flex: none; width: 18px; height: 18px;
	border: 1.5px solid #b8bec7; border-radius: 3px; background: #fff;
	transition: background .12s, border-color .12s;
}
html body .lopf .lopf__box::after {
	content: ""; position: absolute; left: 5px; top: 1px; width: 5px; height: 10px;
	border: solid var(--lopf-accent-text); border-width: 0 2px 2px 0;
	transform: rotate(45deg) scale(0); transition: transform .12s;
}
html body .lopf .lopf__item label:hover .lopf__box { border-color: var(--lopf-accent); }
html body .lopf .lopf__item input:checked + .lopf__box { background: var(--lopf-accent); border-color: var(--lopf-accent); }
html body .lopf .lopf__item input:checked + .lopf__box::after { transform: rotate(45deg) scale(1); }
html body .lopf .lopf__item input:focus-visible + .lopf__box { outline: 2px solid var(--lopf-accent); outline-offset: 2px; }
html body .lopf .lopf__item.is-checked .lopf__name { font-weight: 600; color: var(--lopf-accent); }

html body .lopf .lopf__name { flex: 1; min-width: 0; overflow-wrap: anywhere; }
html body .lopf .lopf__count {
	flex: none; min-width: 26px; padding: 1px 7px; border-radius: 999px;
	background: #f1f1f0; color: var(--lopf-muted);
	font-size: 12px; line-height: 1.5; text-align: center; font-variant-numeric: tabular-nums;
}
html body .lopf .lopf__item.is-checked .lopf__count { background: var(--lopf-accent); color: var(--lopf-accent-text); }

/* Brand logos: whole logo, letterboxed, no cropping */
html body .lopf .lopf__logo {
	flex: none; width: 76px; height: 30px; padding: 3px 6px;
	display: inline-flex; align-items: center; justify-content: center;
	background: #fff; border: 1px solid var(--lopf-border); border-radius: 3px;
}
html body .lopf .lopf__logo img {
	display: block; width: auto; height: auto; max-width: 100%; max-height: 100%;
	margin: 0; border: 0; border-radius: 0; box-shadow: none; object-fit: contain;
}

html body .lopf .lopf__item.is-empty label { cursor: default; opacity: .4; }
html body .lopf .lopf__item.is-empty label:hover { background: none; }
html body .lopf .lopf__item.is-empty label:hover .lopf__box { border-color: #b8bec7; }
html body .lopf .lopf__item.is-extra { display: none; }
html body .lopf .lopf__facet.is-expanded .lopf__item.is-extra { display: list-item; }

html body .lopf .lopf__more,
html body .lopf .lopf__more:hover,
html body .lopf .lopf__more:focus {
	display: inline-block; margin-top: 8px; cursor: pointer;
	font-size: 13px; font-weight: 600; color: var(--lopf-accent);
}
html body .lopf .lopf__more:hover { text-decoration: underline; }

/* Actions */
html body .lopf .lopf__actions { display: flex; align-items: center; gap: 16px; padding-top: 16px; }
html body .lopf .lopf__show,
html body .lopf .lopf__show:hover,
html body .lopf .lopf__show:focus {
	padding: 13px 22px; border-radius: var(--lopf-radius);
	background: var(--lopf-accent); color: var(--lopf-accent-text);
	font-size: 15px; font-weight: 700; line-height: 1.2; text-align: center; cursor: pointer;
}
html body .lopf .lopf__show:hover { filter: brightness(1.15); }
html body .lopf .lopf__show:disabled { opacity: .5; cursor: not-allowed; filter: none; }
html body .lopf .lopf__reset { color: var(--lopf-muted); text-decoration: underline; font-size: 14px; }

/* Auto mode: results update on click, so the button only appears in the mobile drawer */
html body .lopf.lopf--auto .lopf__actions { display: none; }

/* Loading */
html body .lopf.is-loading .lopf__count,
html body .lopf.is-loading .lopf__total { opacity: .4; }
.lopf-results-loading { position: relative; opacity: .45; pointer-events: none; transition: opacity .15s; }
.lopf-results-loading::after {
	content: ""; position: absolute; left: 50%; top: 120px; width: 34px; height: 34px; margin-left: -17px;
	border: 3px solid #d1d5db; border-top-color: var(--e-global-color-secondary, #373635); border-radius: 50%;
	animation: lopf-spin .7s linear infinite;
}
@keyframes lopf-spin { to { transform: rotate(360deg); } }

/* Mobile "Filters" button + drawer — hidden on desktop */
html body .lopf-open,
html body .lopf-backdrop { display: none; }

@media (max-width: 1024px) {
	html body .lopf-open,
	html body .lopf-open:hover,
	html body .lopf-open:focus,
	html body .lopf-open:active {
		display: flex; align-items: center; justify-content: center; gap: 8px;
		width: 100%; min-height: 0; margin: 0 0 16px; padding: 12px 16px;
		background: var(--lopf-bg); color: var(--lopf-accent);
		border: 1px solid var(--lopf-accent); border-radius: var(--lopf-radius); box-shadow: none;
		font-family: var(--lopf-font); font-size: 15px; font-weight: 700; line-height: 1.2;
		letter-spacing: normal; text-transform: none; text-decoration: none; cursor: pointer;
	}
	html body .lopf-open:hover { background: var(--lopf-accent); color: var(--lopf-accent-text); }
	html body .lopf-open svg { flex: none; }
	html body .lopf-open .lopf-open__badge {
		min-width: 20px; height: 20px; padding: 0 6px;
		display: inline-flex; align-items: center; justify-content: center;
		border-radius: 10px; font-size: 12px; line-height: 1;
		background: var(--lopf-accent); color: var(--lopf-accent-text);
	}
	html body .lopf-open:hover .lopf-open__badge { background: var(--lopf-accent-text); color: var(--lopf-accent); }

	html body .lopf-backdrop:not([hidden]) {
		display: block; position: fixed; inset: 0; z-index: 99999;
		background: rgba(0, 0, 0, .45);
	}
	html body .lopf {
		position: fixed; top: 0; bottom: 0; left: 0; z-index: 100000;
		display: flex; flex-direction: column;
		width: min(380px, 88vw); height: 100%; height: 100dvh; margin: 0; padding: 0;
		background: var(--lopf-bg); overflow: hidden;
		transform: translateX(-105%); visibility: hidden;
		transition: transform .25s ease, visibility 0s linear .25s;
		box-shadow: 0 0 30px rgba(0, 0, 0, .2);
	}
	html body .lopf.is-open { transform: none; visibility: visible; transition: transform .25s ease; }

	/* header / scrolling middle / footer */
	html body .lopf .lopf__head {
		display: flex; flex: none; justify-content: space-between; align-items: center;
		padding: 12px 12px 12px 20px; border-bottom: 1px solid var(--lopf-border);
	}
	html body .lopf .lopf__close,
	html body .lopf .lopf__close:hover,
	html body .lopf .lopf__close:focus {
		width: 40px; height: 40px; border-radius: 50%;
		color: var(--lopf-text); font-size: 28px; line-height: 40px; text-align: center; cursor: pointer;
	}
	html body .lopf .lopf__close:hover { background: var(--lopf-hover); }
	html body .lopf .lopf__search { flex: none; margin: 16px 20px 4px; }
	html body .lopf .lopf__search input[type="search"],
	html body .lopf .lopf__search input[type="search"]:focus { height: 46px; font-size: 16px; } /* 16px stops iOS zoom-on-focus */
	html body .lopf .lopf__body {
		flex: 1; min-height: 0; display: flex; flex-direction: column;
		overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch;
		padding: 12px 20px 0;
	}
	html body .lopf .lopf__facet:last-of-type { border-bottom: 0; }
	html body .lopf.lopf--auto .lopf__actions,
	html body .lopf .lopf__actions {
		display: flex; position: sticky; bottom: 0; z-index: 2; flex: none;
		margin: auto -20px 0; padding: 12px 20px calc(12px + env(safe-area-inset-bottom));
		background: var(--lopf-bg); border-top: 1px solid var(--lopf-border);
		box-shadow: 0 -6px 12px rgba(0, 0, 0, .04);
	}
	html body .lopf .lopf__show { flex: 1; }
	html body .lopf .lopf__item label { padding-top: 10px; padding-bottom: 10px; } /* 44px tap targets */
	html body .lopf .lopf__box { width: 20px; height: 20px; }
	html body .lopf .lopf__box::after { left: 6px; top: 2px; }
	html body.lopf-locked { overflow: hidden; touch-action: none; }
	html body.lopf-locked .lopf { touch-action: pan-y; }
}
