/* =========================================================================
   Sabeny Filters — horizontal filter bar above product loop grids.
   Uses CSS custom properties so brand colours can be retuned in one place.
   ========================================================================= */

.sbnf {
	--sbnf-teal:       #0E6B6B;
	--sbnf-teal-dark:  #0A5454;
	--sbnf-ink:        #0F172A;
	--sbnf-mute:       #6B7280;
	--sbnf-line:       #E5E7EB;
	--sbnf-soft:       #F3F4F6;
	--sbnf-radius:     10px;
	--sbnf-radius-sm:  8px;
	font-family: inherit;
	color: var(--sbnf-ink);
}

/* ----- Sub-category chips -------------------------------------------
   Desktop: full strip always visible.
   Mobile (≤600px): hidden behind a "Categories" toggle button.       */
.sbnf__subcats-wrap { margin: 0 0 16px; }
.sbnf__subcats-toggle {
	display: none; /* hidden on desktop */
}
.sbnf__subcats {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}
.sbnf__chip {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 8px 14px;
	background: #fff;
	border: 1px solid var(--sbnf-line);
	border-radius: 999px;
	font-size: 13px;
	font-weight: 500;
	color: var(--sbnf-ink);
	text-decoration: none;
	line-height: 1.2;
	transition: border-color .15s ease, color .15s ease, background .15s ease;
	white-space: nowrap;
}
.sbnf__chip:hover {
	border-color: var(--sbnf-teal);
	color: var(--sbnf-teal);
}
.sbnf__chip.is-active {
	border-color: var(--sbnf-teal);
	background: var(--sbnf-teal);
	color: #fff;
}
.sbnf__chip.is-active:hover {
	background: var(--sbnf-teal-dark);
	border-color: var(--sbnf-teal-dark);
	color: #fff;
}
.sbnf__chip-x {
	font-size: 16px;
	line-height: 1;
	font-weight: 400;
	margin-right: -2px;
}

/* When Reset has nothing to clear, fade it so it doesn't grab attention. */
.sbnf__reset.is-empty {
	opacity: 0.4;
	pointer-events: none;
}

/* ----- Filter bar (controls row) ------------------------------------ */
.sbnf__bar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	flex-wrap: wrap;
	padding: 12px 0;
	border-top: 1px solid var(--sbnf-line);
	border-bottom: 1px solid var(--sbnf-line);
	margin-bottom: 12px;
}
.sbnf__group {
	display: flex;
	align-items: center;
	gap: 10px;
	flex-wrap: wrap;
}
.sbnf__reset {
	color: var(--sbnf-mute);
	font-size: 13px;
	text-decoration: underline;
	text-underline-offset: 3px;
	transition: color .15s ease;
}
.sbnf__reset:hover { color: var(--sbnf-teal); }

/* ----- Dropdown (shared) -------------------------------------------- */
.sbnf-dd {
	position: relative;
	display: inline-block;
}
.sbnf .sbnf-dd__toggle {
	-webkit-appearance: none !important;
	appearance: none !important;
	display: inline-flex !important;
	align-items: center !important;
	gap: 8px !important;
	height: 38px !important;
	padding: 0 14px !important;
	margin: 0 !important;
	background: #fff !important;
	border: 1px solid var(--sbnf-line) !important;
	border-radius: var(--sbnf-radius-sm) !important;
	box-shadow: none !important;
	outline: 0 !important;
	font-size: 13px !important;
	font-weight: 500 !important;
	font-family: inherit !important;
	letter-spacing: 0 !important;
	text-transform: none !important;
	color: var(--sbnf-ink) !important;
	line-height: 1 !important;
	cursor: pointer !important;
	transition: border-color .15s ease, background .15s ease !important;
}
.sbnf-dd__toggle:hover { border-color: var(--sbnf-teal); }
.sbnf-dd.is-open .sbnf-dd__toggle,
.sbnf-dd.has-active .sbnf-dd__toggle {
	border-color: var(--sbnf-teal);
	color: var(--sbnf-teal);
}
.sbnf-dd__toggle svg {
	transition: transform .15s ease;
}
.sbnf-dd.is-open .sbnf-dd__toggle svg { transform: rotate(180deg); }

.sbnf-dd__panel {
	position: absolute;
	top: calc(100% + 6px);
	left: 0;
	z-index: 200;
	width: 300px;
	background: #fff;
	border: 1px solid var(--sbnf-line);
	border-radius: var(--sbnf-radius);
	box-shadow: 0 10px 30px rgba(15, 23, 42, 0.10);
	display: none;
	overflow: hidden;
}
.sbnf-dd.is-open .sbnf-dd__panel { display: block; }

.sbnf-dd__panel--simple { width: 220px; }

/* ----- Search box inside panel -------------------------------------- */
.sbnf-dd__search {
	padding: 10px;
	border-bottom: 1px solid var(--sbnf-line);
	background: var(--sbnf-soft);
}
.sbnf-dd__search-input {
	width: 100%;
	height: 34px;
	padding: 0 10px;
	border: 1px solid var(--sbnf-line);
	border-radius: 6px;
	font-size: 13px;
	background: #fff;
}
.sbnf-dd__search-input:focus {
	outline: none;
	border-color: var(--sbnf-teal);
	box-shadow: 0 0 0 3px rgba(14, 107, 107, 0.12);
}

/* ----- Multi-select option list ------------------------------------- */
.sbnf-dd__options {
	max-height: 280px;
	overflow-y: auto;
	padding: 4px 0;
}
.sbnf-dd__opt {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 8px 14px;
	font-size: 13px;
	cursor: pointer;
	user-select: none;
}
.sbnf-dd__opt:hover { background: var(--sbnf-soft); }
.sbnf-dd__opt.sbnf-hidden { display: none; }
.sbnf-dd__opt input[type="checkbox"] {
	margin: 0;
	width: 16px;
	height: 16px;
	accent-color: var(--sbnf-teal);
	cursor: pointer;
	flex-shrink: 0;
}
.sbnf-dd__opt-label { flex: 1; }
.sbnf-dd__opt-count {
	color: var(--sbnf-mute);
	font-size: 12px;
}

/* ----- Sort options (single-pick, click-to-apply) -------------------
   Aggressive resets to defeat Elementor's button kit & theme button
   styling that otherwise gives each option a pill border + spacing. */
.sbnf .sbnf-dd__opt-radio,
.sbnf-dd__panel .sbnf-dd__opt-radio {
	-webkit-appearance: none !important;
	appearance: none !important;
	display: block !important;
	width: 100% !important;
	margin: 0 !important;
	padding: 11px 16px !important;
	border: 0 !important;
	border-radius: 0 !important;
	outline: 0 !important;
	box-shadow: none !important;
	background: transparent !important;
	color: var(--sbnf-ink) !important;
	font-size: 13px !important;
	font-weight: 500 !important;
	font-family: inherit !important;
	line-height: 1.4 !important;
	letter-spacing: 0 !important;
	text-align: left !important;
	text-transform: none !important;
	cursor: pointer !important;
	transition: background .15s ease !important;
}
.sbnf .sbnf-dd__opt-radio + .sbnf-dd__opt-radio {
	border-top: 1px solid var(--sbnf-line) !important;
}
.sbnf .sbnf-dd__opt-radio:hover {
	background: var(--sbnf-soft) !important;
}
.sbnf .sbnf-dd__opt-radio.is-active {
	background: var(--sbnf-soft) !important;
	color: var(--sbnf-teal) !important;
	font-weight: 700 !important;
}

/* ----- Apply / Clear actions ---------------------------------------- */
.sbnf-dd__actions {
	display: flex;
	gap: 8px;
	padding: 10px;
	border-top: 1px solid var(--sbnf-line);
	background: var(--sbnf-soft);
}
.sbnf .sbnf-dd__clear,
.sbnf .sbnf-dd__apply {
	-webkit-appearance: none !important;
	appearance: none !important;
	flex: 1 !important;
	height: 36px !important;
	margin: 0 !important;
	padding: 0 12px !important;
	border-radius: 6px !important;
	font-size: 13px !important;
	font-weight: 600 !important;
	font-family: inherit !important;
	letter-spacing: 0 !important;
	text-transform: none !important;
	line-height: 1 !important;
	box-shadow: none !important;
	outline: 0 !important;
	cursor: pointer !important;
	transition: background .15s ease !important;
}
.sbnf .sbnf-dd__clear {
	background: #fff !important;
	border: 1px solid var(--sbnf-line) !important;
	color: var(--sbnf-ink) !important;
}
.sbnf .sbnf-dd__clear:hover { background: var(--sbnf-soft) !important; }
.sbnf .sbnf-dd__apply {
	background: var(--sbnf-teal) !important;
	border: 1px solid var(--sbnf-teal) !important;
	color: #fff !important;
}
.sbnf .sbnf-dd__apply:hover { background: var(--sbnf-teal-dark) !important; border-color: var(--sbnf-teal-dark) !important; }

/* ----- Active filter chips ------------------------------------------ */
.sbnf__active {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	padding-top: 4px;
}
.sbnf__active-chip {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 4px 10px;
	background: var(--sbnf-soft);
	border: 1px solid var(--sbnf-line);
	border-radius: 999px;
	font-size: 12px;
	font-weight: 500;
	color: var(--sbnf-ink);
	text-decoration: none;
	transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.sbnf__active-chip:hover {
	background: #FEE2E2;
	border-color: #FECACA;
	color: #B91C1C;
}
.sbnf__active-x {
	font-size: 16px;
	line-height: 1;
	font-weight: 400;
}

/* ----- Mobile ------------------------------------------------------- */
@media (max-width: 600px) {
	.sbnf-dd__panel,
	.sbnf-dd__panel--simple {
		width: calc(100vw - 32px);
		max-width: 320px;
	}
	.sbnf__bar {
		gap: 8px;
	}

	/* Show the toggle button, hide chips by default */
	.sbnf .sbnf__subcats-toggle {
		-webkit-appearance: none !important;
		appearance: none !important;
		display: inline-flex !important;
		align-items: center !important;
		gap: 8px !important;
		height: 38px !important;
		padding: 0 14px !important;
		margin: 0 !important;
		background: #fff !important;
		border: 1px solid var(--sbnf-line) !important;
		border-radius: 999px !important;
		box-shadow: none !important;
		outline: 0 !important;
		font-size: 13px !important;
		font-weight: 500 !important;
		font-family: inherit !important;
		color: var(--sbnf-ink) !important;
		line-height: 1 !important;
		cursor: pointer !important;
		transition: border-color .15s ease, color .15s ease, background .15s ease !important;
	}
	.sbnf .sbnf__subcats-toggle.has-active {
		border-color: var(--sbnf-teal) !important;
		color: var(--sbnf-teal) !important;
	}
	.sbnf .sbnf__subcats-toggle[aria-expanded="true"] svg {
		transform: rotate(180deg);
	}
	.sbnf .sbnf__subcats-toggle svg {
		transition: transform .15s ease;
	}

	.sbnf__subcats {
		display: none;
		margin-top: 12px;
		padding: 12px;
		background: #fff;
		border: 1px solid var(--sbnf-line);
		border-radius: var(--sbnf-radius);
	}
	.sbnf__subcats.is-open {
		display: flex;
	}
}
