/* Nextron Product Filter — scoped to .nextron-filter / .nextron-toolbar.
   Visual tokens taken from the Nextron Product Catalogue reference. */

.nextron-filter,
.nextron-toolbar {
	--nx-navy: #110d4e;
	--nx-ink: #050530;
	--nx-purple: #8604e8;
	--nx-text: #4a4f5f;
	--nx-muted: #676b7b;
	--nx-line: #d5d5e1;
	--nx-pale: #eeeefa;
	--nx-panel: #f7f7fc;
	font-family: Montserrat, Arial, sans-serif;
	color: var(--nx-ink);
	line-height: 1.7;
	box-sizing: border-box;
}
.nextron-filter *,
.nextron-toolbar * { box-sizing: border-box; }

/* ---- Reset theme/Elementor kit button + form styling inside the component ---- */
.nextron-filter .nextron-btn,
.nextron-toolbar .nextron-chip {
	font-family: inherit;
	text-transform: none;
	letter-spacing: normal;
	box-shadow: none;
	cursor: pointer;
	-webkit-tap-highlight-color: transparent;
}
.nextron-filter label,
.nextron-toolbar label { display: block; margin: 0; line-height: 1.7; vertical-align: baseline; }
.nextron-filter fieldset { margin: 0; min-width: 0; }
.nextron-filter h3 {
	font-family: Sintony, Arial, sans-serif;
	font-size: 1.3rem;
	line-height: 1.2;
	letter-spacing: -.025em;
	color: var(--nx-navy);
	margin: 0;
}

/* ---- Panel ---- */
.nextron-filter__panel {
	padding: 20px;
	background: var(--nx-panel);
	border-radius: 5px;
}
.nextron-filter__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 18px;
}
.nextron-filter__head h3 { font-size: 1.1rem; flex: 1; }
/* Clear all + toggle: borderless, immune to theme/Elementor-kit button styles */
.nextron-filter .nextron-btn.nextron-filter__clear,
.nextron-filter .nextron-btn.nextron-filter__close {
	border: 0 !important;
	border-radius: 0 !important;
	background: transparent !important;
	box-shadow: none !important;
	outline-offset: 3px;
}
.nextron-filter .nextron-btn.nextron-filter__clear {
	padding: 4px 0 !important;
	color: var(--nx-purple) !important;
	font-size: 12px;
	font-weight: 700;
	text-decoration: none;
}
.nextron-filter .nextron-btn.nextron-filter__clear:hover,
.nextron-filter .nextron-btn.nextron-filter__clear:focus,
.nextron-filter .nextron-btn.nextron-filter__clear:active {
	background: transparent !important;
	color: var(--nx-navy) !important;
	text-decoration: underline;
}

/* Mobile-only pieces: hidden on desktop */
.nextron-filter .nextron-btn.nextron-filter__trigger,
.nextron-filter .nextron-btn.nextron-filter__close,
.nextron-filter .nextron-filter__overlay { display: none; }

.nextron-filter__label {
	font-size: 12px;
	font-weight: 600;
	margin-bottom: 10px !important;
}
.nextron-search { position: relative; }
.nextron-filter .nextron-search input[type="search"] {
	width: 100%;
	min-height: 46px;
	margin: 0;
	padding: 13px 30px 13px 12px;
	border: 1px solid var(--nx-line);
	border-radius: 4px;
	background: #fff;
	color: var(--nx-ink);
	font: 400 12px/1.4 Montserrat, Arial, sans-serif;
	box-shadow: none;
	-webkit-appearance: none;
	appearance: none;
}
.nextron-search span {
	position: absolute;
	right: 9px;
	top: 9px;
	font-size: 23px;
	line-height: 1;
	pointer-events: none;
}

/* ---- Filter groups ---- */
.nextron-group {
	border: 0;
	border-top: 1px solid var(--nx-line);
	padding: 22px 0 6px;
	margin: 22px 0 0;
}
.nextron-group legend {
	float: left; /* keeps legend inside the fieldset border box in all browsers */
	width: 100%;
	padding: 0;
	margin: 0 0 10px;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: .08em;
	text-transform: uppercase;
	color: var(--nx-navy);
}
.nextron-group__body {
	clear: both;
	max-height: 260px;
	overflow-y: auto;
	padding-right: 4px;
}
.nextron-list { list-style: none; margin: 0; padding: 0; }
.nextron-list .nextron-list { padding-left: 20px; }
.nextron-list li { margin: 0; padding: 0; }

.nextron-filter .nextron-check {
	display: flex;
	align-items: center;
	gap: 10px;
	min-height: 30px;
	margin: 4px 0;
	font-size: 12px;
	font-weight: 500;
	color: var(--nx-text);
	cursor: pointer;
}
.nextron-filter .nextron-check:hover { color: var(--nx-purple); }
.nextron-filter .nextron-check input[type="checkbox"] {
	accent-color: var(--nx-purple);
	width: 16px;
	height: 16px;
	min-height: 16px;
	margin: 0;
	padding: 0;
	flex-shrink: 0;
}
.nextron-check__count { margin-left: auto; font-size: 10px; color: var(--nx-muted); }

.nextron-filter :focus-visible,
.nextron-toolbar :focus-visible { outline: 3px solid var(--nx-purple); outline-offset: 3px; }

/* ---- Toolbar (count + sort + active chips) ---- */
.nextron-toolbar__row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 15px;
	margin-bottom: 22px;
	min-height: 43px;
}
.nextron-toolbar .nextron-toolbar__count {
	margin: 0;
	font-size: 12px;
	color: var(--nx-muted);
}
.nextron-toolbar .nextron-toolbar__sort {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 11px;
	font-weight: 600;
	color: var(--nx-ink);
}
.nextron-toolbar select {
	min-width: 150px;
	min-height: 40px;
	margin: 0;
	padding: 8px 30px 8px 12px;
	border: 1px solid var(--nx-line);
	border-radius: 4px;
	background-color: #fff;
	color: var(--nx-ink);
	font: 500 12px/1.4 Montserrat, Arial, sans-serif;
	box-shadow: none;
}
.nextron-active { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.nextron-active:not(:empty) { margin-bottom: 18px; }
.nextron-toolbar .nextron-chip {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 6px 12px;
	border: 1px solid var(--nx-line);
	border-radius: 20px;
	background: #fff;
	color: var(--nx-ink);
	font-size: 11px;
	font-weight: 600;
	line-height: 1.4;
}
.nextron-toolbar .nextron-chip:hover,
.nextron-toolbar .nextron-chip:focus { border-color: var(--nx-purple); background: #fff; color: var(--nx-purple); }
.nextron-toolbar .nextron-chip--clear { border-color: transparent; background: transparent; color: var(--nx-purple); font-weight: 700; }
.nextron-toolbar .nextron-chip--clear:hover { background: transparent; text-decoration: underline; }

/* ---- Grid loading state (only touches the grid you tagged with our class) ---- */
.nextron-products-grid { transition: opacity .2s; }
.nextron-products-grid.nextron-is-loading { opacity: .45; pointer-events: none; }

/* ---- Mobile (Elementor's 767px breakpoint): off-canvas panel from the left ---- */
@media (max-width: 767px) {
	body.nextron-lock { overflow: hidden; }

	.nextron-filter .nextron-btn.nextron-filter__trigger {
		display: flex;
		align-items: center;
		justify-content: center;
		gap: 10px;
		width: 100%;
		min-height: 48px;
		padding: 12px 20px !important;
		border: 0 !important;
		border-radius: 4px !important;
		background: var(--nx-purple) !important;
		color: #fff !important;
		font-size: .875rem;
		font-weight: 700;
		box-shadow: none !important;
	}
	.nextron-filter .nextron-btn.nextron-filter__trigger:hover,
	.nextron-filter .nextron-btn.nextron-filter__trigger:focus,
	.nextron-filter .nextron-btn.nextron-filter__trigger:active {
		background: var(--nx-navy) !important;
		color: #fff !important;
	}
	.nextron-filter__badge {
		min-width: 22px;
		padding: 0 7px;
		border-radius: 11px;
		background: #fff;
		color: var(--nx-purple);
		font-size: 11px;
		line-height: 22px;
		text-align: center;
	}
	.nextron-filter__badge[hidden] { display: none; }

	.nextron-filter .nextron-filter__overlay {
		display: block;
		position: fixed;
		inset: 0;
		z-index: 999998;
		background: #050530b8;
		opacity: 0;
		transition: opacity .25s ease;
	}
	.nextron-filter .nextron-filter__overlay[hidden] { display: none; }
	.nextron-filter.is-open .nextron-filter__overlay { opacity: 1; }

	.nextron-filter__panel {
		position: fixed;
		top: 0;
		bottom: 0;
		left: 0;
		z-index: 999999;
		width: min(340px, 86vw);
		max-width: 100%;
		overflow-y: auto;
		overscroll-behavior: contain;
		-webkit-overflow-scrolling: touch;
		padding: 20px 20px 40px;
		border-radius: 0;
		background: #fff;
		box-shadow: 8px 0 30px #0003;
		transform: translateX(-105%);
		visibility: hidden;
		transition: transform .28s ease, visibility 0s linear .28s;
	}
	.nextron-filter.is-open .nextron-filter__panel {
		transform: none;
		visibility: visible;
		transition: transform .28s ease;
	}

	.nextron-filter .nextron-btn.nextron-filter__close {
		display: grid;
		place-items: center;
		width: 40px;
		height: 40px;
		padding: 0 !important;
		color: var(--nx-text) !important;
		font-size: 30px;
		line-height: 1;
	}
	.nextron-filter .nextron-btn.nextron-filter__close:hover,
	.nextron-filter .nextron-btn.nextron-filter__close:focus,
	.nextron-filter .nextron-btn.nextron-filter__close:active {
		background: transparent !important;
		color: var(--nx-purple) !important;
	}

	.nextron-filter__head { position: sticky; top: -20px; z-index: 1; margin: -20px -20px 18px; padding: 20px; background: #fff; border-bottom: 1px solid var(--nx-line); }
	.nextron-group__body { max-height: none; }
	.nextron-toolbar__row { flex-wrap: wrap; }
}

@media (prefers-reduced-motion: reduce) {
	.nextron-filter__panel,
	.nextron-filter__overlay,
	.nextron-products-grid { transition: none !important; }
}
