/*
 * Yummy Nutro Shop Filter — styles v1.6
 * Improved mobile floating button (count badge, larger tap target, safe-area
 * inset for notched phones, pulse animation when filters active).
 *
 * Breakpoints:
 *   <=575   - small mobile (drawer, fullscreen)
 *   576-767 - large mobile (drawer)
 *   768-991 - tablet  (inline sidebar, tighter)
 *   992-1199 - desktop
 *   1200-1399 - large desktop
 *   1400+    - xl desktop
 */

:root {
	--ynsf-purple:        #7b2cbf;
	--ynsf-purple-2:      #9d4edd;
	--ynsf-purple-soft:   #f3e9f8;
	--ynsf-purple-deep:   #6e2d8c;
	--ynsf-bg:            #fff;
	--ynsf-bg-soft:       #fafafa;
	--ynsf-line:          #ececf2;
	--ynsf-line-strong:   #d8d8e0;
	--ynsf-text:          #1a1a23;
	--ynsf-text-2:        #555;
	--ynsf-muted:         #8a8a95;
	--ynsf-card-shadow:   0 4px 18px rgba(20, 20, 40, .05);
	--ynsf-card-shadow-hover: 0 10px 28px rgba(20, 20, 40, .08);
	--ynsf-radius:        16px;
	--ynsf-radius-sm:     10px;
	--ynsf-radius-chip:   10px;
	--ynsf-transition:    .18s cubic-bezier(.4,0,.2,1);
}

/* =========================================================
   CONTAINER
   ========================================================= */
.ynsf-filter {
	display: block;
	font: inherit;
	color: var(--ynsf-text);
	box-sizing: border-box;
}
.ynsf-filter *,
.ynsf-filter *::before,
.ynsf-filter *::after { box-sizing: border-box; }

.ynsf-form {
	background: var(--ynsf-bg);
	padding: 22px 20px;
	border-radius: var(--ynsf-radius);
	box-shadow: var(--ynsf-card-shadow);
	transition: opacity .15s;
}
.ynsf-busy .ynsf-form { opacity: .85; }

.ynsf-form-head {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin: 0 0 10px;
}
.ynsf-title {
	font-size: 17px;
	font-weight: 700;
	margin: 0;
	letter-spacing: -.01em;
	color: var(--ynsf-text);
}
.ynsf-close {
	display: none; /* shown only in mobile drawer */
}

/* =========================================================
   BLOCKS / FIELDSETS
   ========================================================= */
.ynsf-block {
	padding: 14px 0;
	border-top: 1px solid var(--ynsf-line);
	margin: 0;
	border-bottom: 0;
	border-left: 0;
	border-right: 0;
}
.ynsf-block:first-of-type { border-top: 0; padding-top: 4px; }
.ynsf-block:last-of-type { padding-bottom: 4px; }
.ynsf-block legend {
	font-size: 12px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .08em;
	color: var(--ynsf-muted);
	margin: 0 0 12px;
	padding: 0;
	width: 100%;
	display: flex;
	align-items: center;
	justify-content: space-between;
}
.ynsf-block legend[data-ynsf-collapse] {
	cursor: pointer;
	user-select: none;
}
.ynsf-block legend[data-ynsf-collapse]::after {
	content: "−";
	width: 18px; height: 18px;
	display: inline-flex; align-items: center; justify-content: center;
	border-radius: 50%; background: var(--ynsf-purple-soft);
	color: var(--ynsf-purple-deep);
	font-weight: 700;
	transition: transform var(--ynsf-transition);
}
.ynsf-block.is-collapsed legend[data-ynsf-collapse]::after { content: "+"; }
.ynsf-block.is-collapsed > *:not(legend) { display: none; }

/* =========================================================
   ACCESSIBILITY
   ========================================================= */
.ynsf-vh {
	position: absolute !important;
	width: 1px; height: 1px;
	margin: -1px; padding: 0;
	overflow: hidden; clip: rect(0,0,0,0);
	white-space: nowrap; border: 0;
}

/* =========================================================
   ACTIVE / CLEAR-ALL
   ========================================================= */
.ynsf-active {
	margin: 0 0 12px;
	display: flex; flex-wrap: wrap; gap: 6px;
	align-items: center;
}
.ynsf-reset {
	display: inline-block;
	background: var(--ynsf-purple-soft);
	color: var(--ynsf-purple-deep) !important;
	padding: 5px 12px;
	border-radius: 999px;
	font-size: 12px;
	font-weight: 700;
	text-decoration: none !important;
	transition: background var(--ynsf-transition);
}
.ynsf-reset:hover { background: #e5d4f1; }
.ynsf-reset::before {
	content: "×";
	margin-right: 4px;
	font-weight: 700;
}

/* =========================================================
   SEARCH
   ========================================================= */
.ynsf-form input[type="search"] {
	width: 100%;
	padding: 10px 14px;
	border: 1px solid var(--ynsf-line);
	border-radius: var(--ynsf-radius-sm);
	font-size: 14px;
	background: var(--ynsf-bg-soft);
	color: var(--ynsf-text);
	transition: border-color var(--ynsf-transition), background var(--ynsf-transition);
	-webkit-appearance: none; appearance: none;
}
.ynsf-form input[type="search"]:focus {
	outline: none;
	border-color: var(--ynsf-purple);
	background: #fff;
	box-shadow: 0 0 0 3px rgba(123, 44, 191, .12);
}
.ynsf-form input[type="search"]::-webkit-search-cancel-button {
	-webkit-appearance: none; appearance: none;
}

/* =========================================================
   PRICE
   ========================================================= */
.ynsf-price-inputs {
	display: flex; align-items: center; gap: 8px;
}
.ynsf-price-inputs input[type="number"] {
	width: 100%;
	padding: 9px 10px;
	border: 1px solid var(--ynsf-line);
	border-radius: var(--ynsf-radius-sm);
	font-size: 14px;
	font-weight: 600;
	color: var(--ynsf-text);
	background: var(--ynsf-bg-soft);
	transition: border-color var(--ynsf-transition);
	-moz-appearance: textfield;
	text-align: center;
}
.ynsf-price-inputs input[type="number"]::-webkit-outer-spin-button,
.ynsf-price-inputs input[type="number"]::-webkit-inner-spin-button {
	-webkit-appearance: none; margin: 0;
}
.ynsf-price-inputs input[type="number"]:focus {
	outline: none; border-color: var(--ynsf-purple); background: #fff;
	box-shadow: 0 0 0 3px rgba(123, 44, 191, .12);
}
.ynsf-price-sep { color: var(--ynsf-muted); font-weight: 600; }
.ynsf-price-slider {
	position: relative;
	height: 32px;
	margin: 20px 10px 8px;
}
.ynsf-price-track {
	position: absolute;
	top: 50%;
	left: 0; right: 0;
	height: 6px;
	background: linear-gradient(to bottom, #ebeaf0, #f4f3f7);
	border-radius: 999px;
	transform: translateY(-50%);
	pointer-events: none;
	box-shadow: inset 0 1px 2px rgba(0, 0, 0, .06);
}
.ynsf-price-fill {
	position: absolute;
	top: 50%;
	height: 6px;
	background: linear-gradient(90deg, var(--ynsf-purple) 0%, var(--ynsf-purple-2) 100%);
	border-radius: 999px;
	transform: translateY(-50%);
	transition: left .12s linear, right .12s linear;
	pointer-events: none;
	box-shadow: 0 1px 4px rgba(123, 44, 191, .35);
}
/* Dual-thumb range inputs overlaid on the track */
.ynsf-range {
	position: absolute;
	top: 0; left: 0;
	width: 100%;
	height: 32px;
	margin: 0;
	padding: 0;
	background: transparent;
	-webkit-appearance: none;
	appearance: none;
	pointer-events: none; /* track non-interactive; thumb gets pointer-events:auto */
}
.ynsf-range:focus { outline: none; }
/* Webkit thumb — modern, polished, white-with-purple-border + dual shadow ring */
.ynsf-range::-webkit-slider-thumb {
	-webkit-appearance: none;
	appearance: none;
	width: 22px; height: 22px;
	border-radius: 50%;
	background: #fff;
	border: 0;
	box-shadow:
		0 0 0 2px var(--ynsf-purple),
		0 2px 6px rgba(123, 44, 191, .25),
		0 1px 2px rgba(0, 0, 0, .12);
	cursor: grab;
	pointer-events: auto;
	margin-top: 0;
	transition: transform .18s cubic-bezier(.4,0,.2,1), box-shadow .18s cubic-bezier(.4,0,.2,1);
}
.ynsf-range::-webkit-slider-thumb:hover {
	transform: scale(1.12);
	box-shadow:
		0 0 0 2px var(--ynsf-purple),
		0 0 0 6px rgba(123, 44, 191, .15),
		0 3px 8px rgba(123, 44, 191, .35);
}
.ynsf-range::-webkit-slider-thumb:active {
	cursor: grabbing;
	transform: scale(1.18);
	box-shadow:
		0 0 0 2px var(--ynsf-purple),
		0 0 0 8px rgba(123, 44, 191, .22),
		0 5px 12px rgba(123, 44, 191, .45);
}
/* Firefox thumb — match Webkit */
.ynsf-range::-moz-range-thumb {
	width: 22px; height: 22px;
	border-radius: 50%;
	background: #fff;
	border: 0;
	box-shadow:
		0 0 0 2px var(--ynsf-purple),
		0 2px 6px rgba(123, 44, 191, .25),
		0 1px 2px rgba(0, 0, 0, .12);
	cursor: grab;
	pointer-events: auto;
	transition: transform .18s cubic-bezier(.4,0,.2,1), box-shadow .18s cubic-bezier(.4,0,.2,1);
}
.ynsf-range::-moz-range-thumb:hover {
	transform: scale(1.12);
	box-shadow:
		0 0 0 2px var(--ynsf-purple),
		0 0 0 6px rgba(123, 44, 191, .15),
		0 3px 8px rgba(123, 44, 191, .35);
}
.ynsf-range::-moz-range-thumb:active {
	cursor: grabbing;
	transform: scale(1.18);
	box-shadow:
		0 0 0 2px var(--ynsf-purple),
		0 0 0 8px rgba(123, 44, 191, .22),
		0 5px 12px rgba(123, 44, 191, .45);
}
/* Keyboard focus ring (accessible) */
.ynsf-range:focus-visible::-webkit-slider-thumb {
	box-shadow:
		0 0 0 2px var(--ynsf-purple),
		0 0 0 6px rgba(123, 44, 191, .25);
}
.ynsf-range:focus-visible::-moz-range-thumb {
	box-shadow:
		0 0 0 2px var(--ynsf-purple),
		0 0 0 6px rgba(123, 44, 191, .25);
}
/* Hide native track */
.ynsf-range::-webkit-slider-runnable-track { background: transparent; border: none; height: 32px; }
.ynsf-range::-moz-range-track { background: transparent; border: none; height: 32px; }
/* Stack so max-thumb is above min-thumb when they overlap */
.ynsf-range-min { z-index: 2; }
.ynsf-range-max { z-index: 3; }
.ynsf-price-range {
	display: flex; justify-content: space-between;
	font-size: 12px; color: var(--ynsf-purple-deep);
	font-weight: 600;
	margin-top: 6px;
	padding: 0 4px;
}

/* =========================================================
   TOGGLE SWITCH (in stock / on sale)
   ========================================================= */
.ynsf-toggle {
	display: flex; align-items: center; gap: 12px;
	cursor: pointer;
	font-size: 14px; font-weight: 500;
	color: var(--ynsf-text);
	padding: 4px 0;
	user-select: none;
}
.ynsf-toggle input {
	position: absolute;
	opacity: 0;
	width: 0; height: 0;
	pointer-events: none;
}
.ynsf-toggle-box {
	position: relative;
	flex: 0 0 36px;
	width: 36px; height: 20px;
	background: var(--ynsf-line-strong);
	border-radius: 999px;
	transition: background var(--ynsf-transition);
}
.ynsf-toggle-box::after {
	content: "";
	position: absolute;
	top: 2px; left: 2px;
	width: 16px; height: 16px;
	background: #fff;
	border-radius: 50%;
	box-shadow: 0 2px 4px rgba(0,0,0,.18);
	transition: transform var(--ynsf-transition);
}
.ynsf-toggle input:checked ~ .ynsf-toggle-box {
	background: linear-gradient(135deg, var(--ynsf-purple), var(--ynsf-purple-2));
}
.ynsf-toggle input:checked ~ .ynsf-toggle-box::after {
	transform: translateX(16px);
}
.ynsf-toggle input:focus-visible ~ .ynsf-toggle-box {
	box-shadow: 0 0 0 3px rgba(123,44,191,.25);
}
.ynsf-toggle-label { flex: 1; }

/* =========================================================
   RADIOS & CHECKBOXES (for category / tag lists)
   ========================================================= */
.ynsf-list { display: block; }
.ynsf-radio,
.ynsf-check {
	display: flex;
	align-items: center;
	gap: 10px;
	cursor: pointer;
	padding: 7px 0;
	font-size: 14px;
	color: var(--ynsf-text-2);
	transition: color var(--ynsf-transition);
}
.ynsf-radio:hover,
.ynsf-check:hover { color: var(--ynsf-text); }
.ynsf-radio input,
.ynsf-check input {
	position: absolute;
	opacity: 0;
	pointer-events: none;
}
.ynsf-radio-box,
.ynsf-check-box {
	width: 18px; height: 18px;
	flex: 0 0 18px;
	border: 2px solid var(--ynsf-line-strong);
	border-radius: 50%;
	background: #fff;
	position: relative;
	transition: border-color var(--ynsf-transition), background var(--ynsf-transition);
}
.ynsf-check-box { border-radius: 5px; }
.ynsf-radio input:checked ~ .ynsf-radio-box,
.ynsf-check input:checked ~ .ynsf-check-box {
	border-color: var(--ynsf-purple);
}
.ynsf-radio input:checked ~ .ynsf-radio-box::after {
	content: "";
	position: absolute; inset: 3px;
	border-radius: 50%;
	background: var(--ynsf-purple);
}
.ynsf-check input:checked ~ .ynsf-check-box {
	background: var(--ynsf-purple);
}
.ynsf-check input:checked ~ .ynsf-check-box::after {
	content: "";
	position: absolute; left: 4px; top: 0;
	width: 5px; height: 10px;
	border: solid #fff;
	border-width: 0 2px 2px 0;
	transform: rotate(45deg);
}

/* Label content: prevent letter-wrap, allow ellipsis on long names */
.ynsf-radio-label,
.ynsf-check-label,
.ynsf-toggle-label {
	flex: 1;
	min-width: 0;
	word-break: normal;
	overflow-wrap: break-word;
	hyphens: none;
	line-height: 1.35;
}
.ynsf-radio-label em,
.ynsf-check-label em {
	color: var(--ynsf-muted);
	font-style: normal;
	font-size: 12px;
	margin-left: 2px;
}

.ynsf-list-tags {
	max-height: 220px;
	overflow-y: auto;
	padding-right: 6px;
}
.ynsf-list-tags::-webkit-scrollbar { width: 6px; }
.ynsf-list-tags::-webkit-scrollbar-thumb { background: var(--ynsf-purple-deep); border-radius: 999px; }

/* =========================================================
   CHIPS (size buttons)
   ========================================================= */
.ynsf-chips-grid {
	display: flex; flex-wrap: wrap; gap: 8px;
}
.ynsf-chip {
	position: relative;
	cursor: pointer;
	display: inline-flex;
}
.ynsf-chip input {
	position: absolute;
	opacity: 0;
	pointer-events: none;
}
.ynsf-chip span {
	display: inline-block;
	padding: 8px 14px;
	min-width: 50px;
	text-align: center;
	background: #f5f5f8;
	border: 1px solid var(--ynsf-line);
	border-radius: var(--ynsf-radius-chip);
	font-size: 13px;
	font-weight: 600;
	color: var(--ynsf-text-2);
	transition: all var(--ynsf-transition);
}
.ynsf-chip:hover span {
	border-color: var(--ynsf-purple);
	color: var(--ynsf-purple);
	background: var(--ynsf-purple-soft);
}
.ynsf-chip input:checked + span {
	background: linear-gradient(135deg, var(--ynsf-purple), var(--ynsf-purple-2));
	color: #fff !important;
	border-color: var(--ynsf-purple);
	box-shadow: 0 4px 10px rgba(123,44,191,.25);
}
.ynsf-chip input:focus-visible + span {
	box-shadow: 0 0 0 3px rgba(123, 44, 191, .25);
}

/* =========================================================
   APPLY BUTTON (kept as keyboard/no-JS fallback; hidden when JS on)
   ========================================================= */
.ynsf-actions { margin-top: 18px; }
.ynsf-apply {
	width: 100%;
	padding: 12px 16px;
	border: 0;
	cursor: pointer;
	background: linear-gradient(135deg, var(--ynsf-purple), var(--ynsf-purple-2));
	color: #fff;
	font-weight: 700;
	font-size: 14px;
	letter-spacing: .02em;
	border-radius: var(--ynsf-radius-sm);
	transition: transform var(--ynsf-transition), box-shadow var(--ynsf-transition);
}
.ynsf-apply:hover {
	transform: translateY(-1px);
	box-shadow: 0 6px 16px rgba(123,44,191,.3);
}

/* Hide Apply when JS is active (auto-submit handles everything) */
html.js .ynsf-actions,
:root:has(.ynsf-filter) .ynsf-actions {
	/* fallback: we’ll just hide via JS-added class, see below */
}

/* When the filter has been hydrated by JS, hide apply button */
.ynsf-filter .ynsf-actions { display: none; }
/* But still keep it visible if html.no-js (e.g. user disables JS) */
html.no-js .ynsf-filter .ynsf-actions { display: block; }

/* =========================================================
   PRODUCT-LIST LOADING STATE (no text, just subtle fade)
   ========================================================= */
ul.products.ynsf-loading {
	opacity: .55;
	pointer-events: none;
	transition: opacity .15s ease;
}
.ynsf-loading * { cursor: progress !important; }
/* Defensive: hide any "Loading..." text injected by other plugins during fetch */
.ynsf-busy ~ * .woocommerce-info.loading,
.ynsf-busy ~ * .wc-loading,
.ynsf-busy ~ * .woocommerce-loading,
.ynsf-busy ~ * .cfvsw-loading {
	display: none !important;
}

/* =========================================================
   MOBILE: FLOATING BUTTON + DRAWER  (≤768px)
   ========================================================= */
.ynsf-mobile-toggle {
	display: none;
	align-items: center;
	justify-content: center;
	gap: 10px;
	position: fixed;
	top: calc(110px + env(safe-area-inset-top, 0px));
	right: 16px;
	z-index: 99999;
	min-height: 44px;
	padding: 0 16px 0 14px;
	border: 0;
	cursor: pointer;
	background: linear-gradient(135deg, var(--ynsf-purple), var(--ynsf-purple-2));
	color: #fff;
	font-weight: 700;
	font-size: 14px;
	letter-spacing: .015em;
	border-radius: 10px;
	box-shadow: 0 6px 16px rgba(123, 44, 191, .32), 0 2px 6px rgba(0, 0, 0, .12);
	transition: transform .18s cubic-bezier(.4,0,.2,1), box-shadow .18s cubic-bezier(.4,0,.2,1);
	-webkit-tap-highlight-color: transparent;
}
.ynsf-mobile-toggle:hover,
.ynsf-mobile-toggle:focus-visible {
	transform: translateY(-3px);
	box-shadow: 0 18px 36px rgba(123, 44, 191, .5), 0 6px 14px rgba(0, 0, 0, .14);
	outline: none;
}
.ynsf-mobile-toggle:active { transform: translateY(-1px); }
.ynsf-mobile-toggle-icon {
	width: 22px; height: 22px;
	display: inline-flex;
	align-items: center; justify-content: center;
	background: transparent;
	border-radius: 6px;
	flex: 0 0 22px;
}
.ynsf-mobile-toggle-icon svg { width: 18px; height: 18px; }
.ynsf-mobile-toggle-icon svg { display: block; }
.ynsf-mobile-toggle-text {
	font-weight: 700;
	letter-spacing: .02em;
}
.ynsf-mobile-toggle-count {
	min-width: 20px;
	height: 20px;
	padding: 0 6px;
	border-radius: 6px;
	background: #fff;
	color: var(--ynsf-purple-deep);
	font-size: 11px;
	font-weight: 800;
	line-height: 20px;
	text-align: center;
	box-shadow: 0 2px 4px rgba(0, 0, 0, .15);
	display: inline-block;
}
/* Subtle background tint when filters are active */
.ynsf-mobile-toggle.has-active {
	box-shadow: 0 6px 16px rgba(123, 44, 191, .45), 0 2px 6px rgba(0, 0, 0, .14);
}
/* When logged-in user shows WP admin bar (46px on mobile, 32px on desktop),
   push the button down so it stays below the site header. */
body.admin-bar .ynsf-mobile-toggle { top: calc(156px + env(safe-area-inset-top, 0px)); }
@media (max-width: 575px) {
	body.admin-bar .ynsf-mobile-toggle { top: calc(146px + env(safe-area-inset-top, 0px)); }
}

.ynsf-overlay {
	display: none;
	position: fixed; inset: 0;
	background: rgba(0,0,0,.5);
	backdrop-filter: blur(1px);
	z-index: 99998;
	opacity: 0;
	transition: opacity .25s ease;
}

@media (max-width: 768px) {
	.ynsf-mobile-toggle { display: inline-flex; }
	.ynsf-form {
		position: fixed;
		top: 0; right: 0; bottom: 0;
		width: min(380px, 92vw);
		transform: translateX(100%);
		transition: transform .28s cubic-bezier(.4,0,.2,1);
		z-index: 99999;
		border-radius: 0;
		padding: 20px;
		overflow-y: auto;
		box-shadow: -10px 0 30px rgba(0,0,0,.18);
	}
	/* Drawer open state works whether form is inside .ynsf-filter or portaled to body */
	.ynsf-form.ynsf-is-open,
	.ynsf-filter.is-open .ynsf-form { transform: translateX(0); }
	.ynsf-close {
		display: inline-flex;
		align-items: center;
		justify-content: center;
		width: 34px; height: 34px;
		border: 0;
		background: #f3f3f8;
		border-radius: 50%;
		font-size: 22px;
		line-height: 1;
		cursor: pointer;
		color: var(--ynsf-text-2);
	}
	.ynsf-close:hover { background: var(--ynsf-purple-soft); color: var(--ynsf-purple-deep); }
	.ynsf-overlay { display: block; }
	.ynsf-overlay.ynsf-is-open,
	.ynsf-filter.is-open .ynsf-overlay { opacity: 1; }
	.ynsf-overlay[hidden] { display: none; }
}

/* =========================================================
   DESKTOP TUNING
   ========================================================= */
/* ≤575: smallest mobile - extra-cosy drawer padding */
@media (max-width: 575px) {
	.ynsf-form { padding: 16px; }
	.ynsf-title { font-size: 16px; }
	.ynsf-mobile-toggle {
		min-height: 42px;
		padding: 0 14px 0 12px;
		font-size: 13px;
		right: 12px;
		top: calc(100px + env(safe-area-inset-top, 0px));
		border-radius: 10px;
	}
	.ynsf-mobile-toggle-icon { width: 20px; height: 20px; flex-basis: 20px; }
	.ynsf-mobile-toggle-icon svg { width: 16px; height: 16px; }
}

/* 576-767: large mobile, drawer same as default mobile */
@media (min-width: 576px) and (max-width: 767px) {
	.ynsf-form { padding: 20px; }
}

/* 768-991: tablet — inline sidebar but compact */
@media (min-width: 769px) and (max-width: 991px) {
	.ynsf-form { padding: 16px 14px; }
	.ynsf-title { font-size: 16px; }
	.ynsf-block { padding: 12px 0; }
	.ynsf-radio, .ynsf-check { font-size: 13px; padding: 6px 0; }
	.ynsf-chip span { padding: 7px 11px; min-width: 44px; font-size: 12px; }
}

/* 992-1199: small desktop */
@media (min-width: 992px) and (max-width: 1199px) {
	.ynsf-form { padding: 20px 18px; }
}

/* 1200+: large desktop - more breathing room */
@media (min-width: 1200px) {
	.ynsf-form { padding: 24px 22px; }
	.ynsf-title { font-size: 18px; }
}

/* 1400+: xl desktop - slight increase only */
@media (min-width: 1400px) {
	.ynsf-form { padding: 26px 24px; }
}

/* sticky positioning at all desktop widths */
@media (min-width: 769px) {
	.ynsf-filter { position: sticky; top: 120px; }
}

/* If site shell forces a very narrow sidebar (<240px), ensure labels truncate not letter-wrap */
@media (max-width: 1199px) {
	.ynsf-radio-label,
	.ynsf-check-label {
		overflow-wrap: break-word;
		word-break: normal;
	}
}

/* reduced motion */
@media (prefers-reduced-motion: reduce) {
	.ynsf-form, .ynsf-form *,
	.ynsf-toggle-box, .ynsf-toggle-box::after,
	.ynsf-mobile-toggle, .ynsf-overlay {
		transition: none !important;
	}
}

/* =========================================================
   v1.8 — ZEPTO-STYLE STICKY CHIP BAR + BOTTOM SHEET
   ========================================================= */

/* Chip bar hidden on desktop (sidebar filter is used there) */
.ynsf-chipbar { display: none; }

@media (max-width: 768px) {

	/* ----- Sticky chip bar (the "extra nav bar") ----- */
	.ynsf-chipbar {
		display: flex !important;
		gap: 8px;
		position: fixed;
		top: calc(64px + env(safe-area-inset-top, 0px));
		left: 0; right: 0;
		z-index: 9990;
		padding: 10px 14px;
		background: #fff;
		border-bottom: 1px solid #ececf2;
		box-shadow: 0 2px 10px rgba(0, 0, 0, .05);
		overflow-x: auto;
		overflow-y: hidden;
		-webkit-overflow-scrolling: touch;
		scrollbar-width: none;
	}
	.ynsf-chipbar::-webkit-scrollbar { display: none; }
	body.admin-bar .ynsf-chipbar { top: calc(110px + env(safe-area-inset-top, 0px)); }

	/* Hide the old floating button — chip bar replaces it */
	.ynsf-mobile-toggle { display: none !important; }

	/* Individual chips */
	.ynsf-chip-btn {
		display: inline-flex;
		align-items: center;
		gap: 5px;
		flex: 0 0 auto;
		white-space: nowrap;
		padding: 8px 14px;
		border: 1.5px solid #e2dceb;
		background: #fff;
		color: #1a1a23;
		border-radius: 999px;
		font-size: 13px;
		font-weight: 600;
		cursor: pointer;
		transition: background .2s ease, border-color .2s ease, color .2s ease;
		-webkit-tap-highlight-color: transparent;
	}
	.ynsf-chip-btn svg { flex: 0 0 auto; }
	.ynsf-chip-btn:active { background: #f3e9f8; }
	.ynsf-chip-btn.is-active {
		background: var(--ynsf-purple-soft);
		border-color: var(--ynsf-purple);
		color: var(--ynsf-purple-deep);
	}
	/* The "all filters" icon chip */
	.ynsf-chip-all {
		position: relative;
		padding: 8px 12px;
		background: linear-gradient(135deg, var(--ynsf-purple), var(--ynsf-purple-2));
		border-color: transparent;
		color: #fff;
	}
	.ynsf-chip-all.has-active::after { content: none; }
	.ynsf-chip-count {
		position: absolute;
		top: -5px; right: -5px;
		min-width: 18px; height: 18px;
		padding: 0 5px;
		border-radius: 999px;
		background: #ff9a3c;
		color: #fff;
		font-size: 10px;
		font-weight: 800;
		line-height: 18px;
		text-align: center;
	}

	/* Spacer so the fixed chip bar doesn't hide the top of the product list.
	   Applied to body via JS class. */
	body.ynsf-chipbar-on .ynsf-filter { margin-top: 0; }

	/* ----- BOTTOM SHEET (overrides the right-drawer) ----- */
	.ynsf-form {
		position: fixed !important;
		top: auto !important;
		bottom: 0 !important;
		left: 0 !important;
		right: 0 !important;
		width: 100% !important;
		max-width: 100% !important;
		height: auto !important;
		max-height: 82vh !important;
		max-height: 82dvh !important;
		transform: translateY(100%) !important;
		transition: transform .35s cubic-bezier(.4, 0, .2, 1) !important;
		border-radius: 22px 22px 0 0 !important;
		box-shadow: 0 -12px 40px rgba(0, 0, 0, .25) !important;
		padding: 0 20px calc(88px + env(safe-area-inset-bottom, 0px)) !important;
		overflow-y: auto !important;
		overflow-x: hidden !important;
		display: flex !important;
		flex-direction: column !important;
	}
	.ynsf-form.ynsf-is-open,
	.ynsf-filter.is-open .ynsf-form {
		transform: translateY(0) !important;
	}

	/* Drag handle */
	.ynsf-form::before {
		content: "";
		display: block;
		width: 44px; height: 5px;
		background: #d8d8e0;
		border-radius: 999px;
		margin: 12px auto 4px;
		flex-shrink: 0;
	}

	/* Sheet header sticky */
	.ynsf-form-head {
		position: sticky;
		top: 0;
		background: #fff;
		padding: 6px 0 14px;
		margin: 0 0 6px;
		border-bottom: 1px solid #ececf2;
		z-index: 2;
		flex-shrink: 0;
	}

	/* ----- SECTION FILTERING: show only the tapped section ----- */
	/* When a specific section is requested, hide every block first... */
	.ynsf-form[data-ynsf-show]:not([data-ynsf-show="all"]) .ynsf-block {
		display: none !important;
	}
	/* ...then reveal only the matching one */
	.ynsf-form[data-ynsf-show="categories"] [data-ynsf-section="categories"],
	.ynsf-form[data-ynsf-show="sizes"]      [data-ynsf-section="sizes"],
	.ynsf-form[data-ynsf-show="price"]      [data-ynsf-section="price"],
	.ynsf-form[data-ynsf-show="tags"]       [data-ynsf-section="tags"],
	.ynsf-form[data-ynsf-show="search"]     [data-ynsf-section="search"],
	.ynsf-form[data-ynsf-show="stock"]      [data-ynsf-section="stock"] {
		display: block !important;
	}
	/* Tags section: when shown alone, expand it (un-collapse) */
	.ynsf-form[data-ynsf-show="tags"] .ynsf-list-tags.is-collapsed > *:not(legend) {
		display: block !important;
	}
	/* Hide "Clear all" pill inside the sheet header when showing single section */
	.ynsf-form[data-ynsf-show]:not([data-ynsf-show="all"]) .ynsf-active {
		display: none !important;
	}

	/* ----- STICKY APPLY BAR at bottom of sheet ----- */
	.ynsf-filter .ynsf-actions {
		display: block !important;
		position: sticky;
		bottom: 0;
		left: 0; right: 0;
		background: #fff;
		padding: 12px 0 calc(12px + env(safe-area-inset-bottom, 0px));
		margin: 10px 0 0;
		border-top: 1px solid #ececf2;
		z-index: 3;
		flex-shrink: 0;
	}
	.ynsf-apply {
		width: 100%;
		border-radius: 12px;
		padding: 14px;
		font-weight: 800;
		text-transform: uppercase;
		letter-spacing: .04em;
	}

	/* Close button (top-right of sheet header) */
	.ynsf-close {
		display: inline-flex !important;
		position: absolute;
		top: 4px; right: 0;
		width: 32px; height: 32px;
		border-radius: 8px;
		background: #f4f1f8;
		color: var(--ynsf-purple-deep);
		align-items: center;
		justify-content: center;
		font-size: 20px;
		border: 0;
		cursor: pointer;
	}

	/* Overlay */
	.ynsf-overlay { background: rgba(0, 0, 0, .5); z-index: 99998; }
}
