/* NoirMusk — shop filters: sidebar, price slider, toolbar (Sort by / Filters) and the phone filter sheet.
   Loaded after shop-custom.css; the shop's body classes scope everything to the shop and category pages. */

/* ---------------------------------------------------------------- sidebar */
html body:is(.woocommerce-shop, .tax-product_cat) .sidebar-container {
	padding-right: 36px;
}

/* heading row: "FILTERS" + "Clear all" */
html body:is(.woocommerce-shop, .tax-product_cat) .noirmusk-shop-filters-heading {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 12px;
	margin: 0 0 4px;
	padding: 0 0 18px;
	border-bottom: 1px solid #ece7de;
	font-family: var(--theme-heading-font-family);
	font-size: 14px;
	font-weight: 700;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: #1a1a1a;
}
html body:is(.woocommerce-shop, .tax-product_cat) .noirmusk-filters-clear {
	font-family: var(--theme-body-font-family), 'Inter', sans-serif;
	font-size: 12.5px;
	font-weight: 500;
	letter-spacing: 0;
	text-decoration: underline;
	text-transform: none;
	text-underline-offset: 3px;
	color: #a3703f;
}
html body:is(.woocommerce-shop, .tax-product_cat) .noirmusk-filters-clear:hover {
	color: #1a1a1a;
}

/* each filter block */
html body:is(.woocommerce-shop, .tax-product_cat) .sidebar-container .widget {
	margin: 0;
	padding: 26px 0 24px;
	border-bottom: 1px solid #f0eadf;
}
html body:is(.woocommerce-shop, .tax-product_cat) .sidebar-container .widget:last-child {
	border-bottom: 0;
}
html body:is(.woocommerce-shop, .tax-product_cat) .sidebar-container .widget-title {
	margin: 0 0 14px;
	font-family: var(--theme-body-font-family), 'Inter', sans-serif;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.14em;
	line-height: 1.3;
	text-transform: uppercase;
	color: #1a1a1a;
}
html body:is(.woocommerce-shop, .tax-product_cat) .sidebar-container .widget-title span {
	font: inherit;
	letter-spacing: inherit;
	color: inherit;
}

/* checkbox rows (Fragrance Family, For, Availability) */
html body:is(.woocommerce-shop, .tax-product_cat) .sidebar-container ul.woocommerce-widget-layered-nav-list,
html body:is(.woocommerce-shop, .tax-product_cat) .sidebar-container ul.noirmusk-availability-filter {
	margin: 0;
	padding: 0;
	list-style: none;
}
html body:is(.woocommerce-shop, .tax-product_cat) .sidebar-container .woocommerce-widget-layered-nav-list__item {
	position: relative;
	display: flex;
	align-items: center;
	gap: 10px;
	margin: 0;
	padding: 0;
	font-size: 14.5px;
	color: #3d3931;
}
html body:is(.woocommerce-shop, .tax-product_cat) .sidebar-container .woocommerce-widget-layered-nav-list__item a {
	position: static;
	display: flex;
	flex: 1 1 auto;
	align-items: center;
	gap: 12px;
	min-width: 0;
	margin: 0;
	padding: 9px 0;
	border: 0;
	font-family: var(--theme-body-font-family), 'Inter', sans-serif;
	font-size: 14.5px;
	line-height: 1.3;
	text-decoration: none;
	color: #3d3931;
	transition: color 0.2s ease;
}
/* the whole row is the click target */
html body:is(.woocommerce-shop, .tax-product_cat) .sidebar-container .woocommerce-widget-layered-nav-list__item a::after {
	/* the theme draws a tick glyph here for chosen items; ours is on the checkbox itself */
	content: '' !important;
	position: absolute;
	inset: 0;
	margin: 0 !important;
	font-size: 0 !important;
	color: transparent !important;
	background: none !important;
}
/* the checkbox */
html body:is(.woocommerce-shop, .tax-product_cat) .sidebar-container .woocommerce-widget-layered-nav-list__item a::before,
html body:is(.woocommerce-shop, .tax-product_cat) .sidebar-container .noirmusk-availability-filter input[type="checkbox"] {
	content: '';
	position: static;
	display: block;
	flex: 0 0 18px;
	width: 18px;
	height: 18px;
	margin: 0;
	padding: 0;
	box-sizing: border-box;
	border: 1.5px solid #cbbfae;
	border-radius: 4px;
	background: #fff center / 12px 12px no-repeat;
	box-shadow: none;
	transform: none;
	transition: border-color 0.2s ease, background-color 0.2s ease;
}
html body:is(.woocommerce-shop, .tax-product_cat) .sidebar-container .noirmusk-availability-filter input[type="checkbox"] {
	-webkit-appearance: none;
	appearance: none;
	cursor: pointer;
}
html body:is(.woocommerce-shop, .tax-product_cat) .sidebar-container .woocommerce-widget-layered-nav-list__item:hover a,
html body:is(.woocommerce-shop, .tax-product_cat) .sidebar-container .noirmusk-availability-filter label:hover {
	color: #a3703f;
}
html body:is(.woocommerce-shop, .tax-product_cat) .sidebar-container .woocommerce-widget-layered-nav-list__item:hover a::before,
html body:is(.woocommerce-shop, .tax-product_cat) .sidebar-container .noirmusk-availability-filter label:hover input[type="checkbox"] {
	border-color: #a3703f;
}
/* chosen */
html body:is(.woocommerce-shop, .tax-product_cat) .sidebar-container .woocommerce-widget-layered-nav-list__item--chosen a {
	font-weight: 600;
	color: #1a1a1a;
}
html body:is(.woocommerce-shop, .tax-product_cat) .sidebar-container .woocommerce-widget-layered-nav-list__item--chosen a::before,
html body:is(.woocommerce-shop, .tax-product_cat) .sidebar-container .noirmusk-availability-filter input[type="checkbox"]:checked {
	border-color: #a3703f !important;
	background-color: #a3703f !important;
	background-position: center;
	background-size: 12px 12px;
	background-repeat: no-repeat;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='4.5 12.5 10 18 19.5 6.5'/%3E%3C/svg%3E");
}
/* counts */
html body:is(.woocommerce-shop, .tax-product_cat) .sidebar-container .woocommerce-widget-layered-nav-list__item .count {
	flex: 0 0 auto;
	min-width: 22px;
	padding: 2px 8px;
	border-radius: 20px;
	background: #f6f1e7;
	font-size: 12px;
	font-variant-numeric: tabular-nums;
	line-height: 1.5;
	text-align: center;
	color: #8c867c;
}
/* Availability */
html body:is(.woocommerce-shop, .tax-product_cat) .sidebar-container .noirmusk-availability-filter li {
	margin: 0;
	padding: 0;
	font-size: 14.5px;
}
html body:is(.woocommerce-shop, .tax-product_cat) .sidebar-container .noirmusk-availability-filter label {
	display: flex;
	align-items: center;
	gap: 12px;
	margin: 0;
	padding: 9px 0;
	font-size: 14.5px;
	color: #3d3931;
	cursor: pointer;
	transition: color 0.2s ease;
}

/* price slider */
html body:is(.woocommerce-shop, .tax-product_cat) .price_slider_wrapper .price_slider {
	height: 4px;
	margin: 10px 10px 26px;
	border: 0;
	border-radius: 4px;
	background: #ebe4d7;
}
html body:is(.woocommerce-shop, .tax-product_cat) .price_slider_wrapper .ui-slider-range {
	border-radius: 4px;
	background: #a3703f;
}
html body:is(.woocommerce-shop, .tax-product_cat) .price_slider_wrapper .ui-slider-handle {
	top: -8px;
	width: 20px;
	height: 20px;
	margin-left: -10px;
	box-sizing: border-box;
	border: 2px solid #a3703f;
	border-radius: 50%;
	background: #fff;
	box-shadow: 0 2px 8px rgba(26, 26, 26, 0.2);
	cursor: grab;
	outline: none;
	transition: box-shadow 0.2s ease, transform 0.2s ease;
}
html body:is(.woocommerce-shop, .tax-product_cat) .price_slider_wrapper .ui-slider-handle:hover,
html body:is(.woocommerce-shop, .tax-product_cat) .price_slider_wrapper .ui-slider-handle:focus {
	box-shadow: 0 0 0 6px rgba(163, 112, 63, 0.18), 0 2px 8px rgba(26, 26, 26, 0.2);
}
html body:is(.woocommerce-shop, .tax-product_cat) .price_slider_wrapper .ui-slider-handle:active {
	cursor: grabbing;
	transform: scale(1.08);
}
html body:is(.woocommerce-shop, .tax-product_cat) .price_slider_amount {
	display: flex;
	flex-direction: column;
	gap: 14px;
}
html body:is(.woocommerce-shop, .tax-product_cat) .price_slider_amount .price_label {
	order: -1;
	margin: 0;
	font-size: 14px;
	line-height: 1.4;
	text-align: left;
	color: #6b665d;
}
html body:is(.woocommerce-shop, .tax-product_cat) .price_slider_amount .price_label .from,
html body:is(.woocommerce-shop, .tax-product_cat) .price_slider_amount .price_label .to {
	font-weight: 600;
	color: #1a1a1a;
}
html body:is(.woocommerce-shop, .tax-product_cat) .price_slider_amount .clear {
	display: none;
}
html body:is(.woocommerce-shop, .tax-product_cat) .price_slider_amount button.button {
	order: 2;
	float: none;
	width: 100%;
	height: 44px;
	margin: 0;
	padding: 0 20px;
	border: 0;
	border-radius: 4px !important;
	background: #1a1a1a !important;
	box-shadow: none;
	font-family: var(--theme-body-font-family), 'Inter', sans-serif;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.1em;
	line-height: 1;
	text-transform: uppercase;
	color: #fff !important;
	cursor: pointer;
	transition: background-color 0.2s ease;
}
html body:is(.woocommerce-shop, .tax-product_cat) .price_slider_amount button.button:hover {
	background: #a3703f !important;
}

/* ---------------------------------------------------------------- toolbar */
html body:is(.woocommerce-shop, .tax-product_cat) .wc-toolbar {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-bottom: 32px;
}
html body:is(.woocommerce-shop, .tax-product_cat) .wc-toolbar .woocommerce-result-count {
	margin: 0 auto 0 0;
	font-size: 14px;
	color: #6b665d;
}
html body:is(.woocommerce-shop, .tax-product_cat) .wc-toolbar .lasf-custom-dropdown {
	position: relative;
	flex: 0 0 auto;
}
html body:is(.woocommerce-shop, .tax-product_cat) .wc-toolbar .lasf-custom-dropdown > button {
	display: inline-flex;
	align-items: center;
	height: 46px;
	margin: 0;
	padding: 0 46px 0 18px;
	border: 1px solid #e0d5bf;
	border-radius: 4px;
	background: #fff;
	box-shadow: none;
	font-family: var(--theme-body-font-family), 'Inter', sans-serif;
	font-size: 14px;
	font-weight: 500;
	line-height: 1;
	color: #1a1a1a;
	cursor: pointer;
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
html body:is(.woocommerce-shop, .tax-product_cat) .wc-toolbar .lasf-custom-dropdown > button:hover,
html body:is(.woocommerce-shop, .tax-product_cat) .wc-toolbar .lasf-custom-dropdown.is-open > button {
	border-color: #a3703f;
}
html body:is(.woocommerce-shop, .tax-product_cat) .wc-toolbar .lasf-custom-dropdown.is-open > button {
	box-shadow: 0 0 0 3px rgba(163, 112, 63, 0.14);
}
html body:is(.woocommerce-shop, .tax-product_cat) .wc-toolbar .lasf-custom-dropdown > button:focus-visible {
	outline: 2px solid #a3703f;
	outline-offset: 2px;
}
/* Filters button: sliders icon, optional count */
html body:is(.woocommerce-shop, .tax-product_cat) .wc-toolbar .lasf-custom-dropdown > .btn-advanced-shop-filter {
	padding: 0 20px 0 46px;
}
html body:is(.woocommerce-shop, .tax-product_cat) .wc-toolbar .lasf-custom-dropdown > .btn-advanced-shop-filter::after {
	display: none;
}
html body:is(.woocommerce-shop, .tax-product_cat) .wc-toolbar .lasf-custom-dropdown > .btn-advanced-shop-filter::before {
	content: '';
	position: absolute;
	top: 50%;
	left: 18px;
	width: 18px;
	height: 18px;
	margin-top: -9px;
	background: currentColor;
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.9' stroke-linecap='round'%3E%3Cline x1='3' y1='7' x2='21' y2='7'/%3E%3Cline x1='3' y1='12' x2='21' y2='12'/%3E%3Cline x1='3' y1='17' x2='21' y2='17'/%3E%3Ccircle cx='8' cy='7' r='2.4' fill='%23fff'/%3E%3Ccircle cx='16' cy='12' r='2.4' fill='%23fff'/%3E%3Ccircle cx='9' cy='17' r='2.4' fill='%23fff'/%3E%3C/svg%3E") center / contain no-repeat;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.9' stroke-linecap='round'%3E%3Cline x1='3' y1='7' x2='21' y2='7'/%3E%3Cline x1='3' y1='12' x2='21' y2='12'/%3E%3Cline x1='3' y1='17' x2='21' y2='17'/%3E%3Ccircle cx='8' cy='7' r='2.4' fill='%23fff'/%3E%3Ccircle cx='16' cy='12' r='2.4' fill='%23fff'/%3E%3Ccircle cx='9' cy='17' r='2.4' fill='%23fff'/%3E%3C/svg%3E") center / contain no-repeat;
}
.noirmusk-filters-count {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 20px;
	height: 20px;
	margin-left: 10px;
	padding: 0 6px;
	box-sizing: border-box;
	border-radius: 10px;
	background: #a3703f;
	font-size: 11px;
	font-weight: 700;
	line-height: 1;
	color: #fff;
}
/* Sort by dropdown: opens on click (the theme's hover script isn't running) */
html body:is(.woocommerce-shop, .tax-product_cat) .wc-toolbar .lasf-custom-dropdown ul {
	top: calc(100% + 8px);
	right: 0;
	left: auto;
	min-width: 250px;
	margin: 0;
	padding: 6px;
	border: 1px solid #ece7de;
	border-radius: 8px;
	background: #fff;
	box-shadow: 0 22px 44px -18px rgba(26, 26, 26, 0.28);
	opacity: 0 !important;
	visibility: hidden !important;
	transform: translateY(-6px);
	transition: opacity 0.2s ease, transform 0.2s ease, visibility 0s linear 0.2s;
}
html body:is(.woocommerce-shop, .tax-product_cat) .wc-toolbar .lasf-custom-dropdown.is-open ul {
	opacity: 1 !important;
	visibility: visible !important;
	transform: none;
	transition-delay: 0s;
}
html body:is(.woocommerce-shop, .tax-product_cat) .wc-toolbar .lasf-custom-dropdown ul li {
	margin: 0;
	border: 0;
}
html body:is(.woocommerce-shop, .tax-product_cat) .wc-toolbar .lasf-custom-dropdown ul li a {
	display: flex;
	align-items: center;
	gap: 6px;
	padding: 11px 14px;
	border-radius: 6px;
	font-size: 14px;
	white-space: nowrap;
	color: #3d3931;
	transition: background-color 0.15s ease, color 0.15s ease;
}
html body:is(.woocommerce-shop, .tax-product_cat) .wc-toolbar .lasf-custom-dropdown ul li a:hover {
	background: #faf6ee;
	color: #a3703f;
}
html body:is(.woocommerce-shop, .tax-product_cat) .wc-toolbar .lasf-custom-dropdown ul li.active a {
	background: #f6f0e5;
	font-weight: 600;
	color: #1a1a1a;
}

/* ---------------------------------------------------------------- desktop: Filters button collapses the sidebar */
@media (min-width: 992px) {
	html body:is(.woocommerce-shop, .tax-product_cat).noirmusk-filters-hidden .sidebar-container {
		display: none;
	}
	html body:is(.woocommerce-shop, .tax-product_cat).noirmusk-filters-hidden .site-content--default {
		flex: 1 1 100% !important;
		width: 100% !important;
		max-width: 100% !important;
	}
}
@media (min-width: 1200px) {
	html body:is(.woocommerce-shop, .tax-product_cat).noirmusk-filters-hidden ul.products {
		grid-template-columns: repeat(4, minmax(0, 1fr));
	}
}

/* ---------------------------------------------------------------- phones and tablets: filters open as a bottom sheet */
.noirmusk-filters-overlay {
	display: none;
}
@media (max-width: 991px) {
	html body:is(.woocommerce-shop, .tax-product_cat) #site-content-wrap {
		display: block;
	}
	html body:is(.woocommerce-shop, .tax-product_cat) .site-content--default {
		width: 100% !important;
		max-width: 100% !important;
	}

	/* toolbar: result count on top, then Sort by | Filters side by side */
	html body:is(.woocommerce-shop, .tax-product_cat) .wc-toolbar {
		flex-wrap: wrap;
		gap: 10px;
		margin-bottom: 24px;
	}
	html body:is(.woocommerce-shop, .tax-product_cat) .wc-toolbar .woocommerce-result-count {
		flex: 0 0 100%;
		margin: 0 0 4px;
	}
	/* Sort by takes the room that is left, Filters is only as wide as its label (and count) */
	html body:is(.woocommerce-shop, .tax-product_cat) .wc-toolbar .lasf-custom-dropdown {
		flex: 1 1 0;
		min-width: 0;
	}
	html body:is(.woocommerce-shop, .tax-product_cat) .wc-toolbar .lasf-custom-dropdown:has(> .btn-advanced-shop-filter) {
		flex: 0 0 auto;
	}
	html body:is(.woocommerce-shop, .tax-product_cat) .wc-toolbar .lasf-custom-dropdown > button {
		width: 100%;
		padding-right: 38px;
		text-align: left;
	}
	html body:is(.woocommerce-shop, .tax-product_cat) .wc-toolbar .lasf-custom-dropdown > button > span {
		display: block;
		min-width: 0;
		overflow: hidden;
		white-space: nowrap;
		text-overflow: ellipsis;
	}
	html body:is(.woocommerce-shop, .tax-product_cat) .wc-toolbar .lasf-custom-dropdown > .btn-advanced-shop-filter {
		width: auto;
		padding: 0 18px 0 44px;
	}
	html body:is(.woocommerce-shop, .tax-product_cat) .wc-toolbar .lasf-custom-dropdown > .btn-advanced-shop-filter::before {
		left: 16px;
	}
	html body:is(.woocommerce-shop, .tax-product_cat) .wc-toolbar .wc-ordering ul {
		right: auto;
		left: 0;
		min-width: min(270px, calc(100vw - 40px));
	}

	/* the sheet */
	html body:is(.woocommerce-shop, .tax-product_cat) .sidebar-container {
		position: fixed;
		z-index: 10001;
		top: auto;
		right: 0;
		bottom: 0;
		left: 0;
		width: 100%;
		max-height: 88vh;
		box-sizing: border-box;
		overflow-y: auto;
		overscroll-behavior: contain;
		-webkit-overflow-scrolling: touch;
		padding: 0 22px !important;
		border-radius: 18px 18px 0 0;
		background: #fff;
		box-shadow: 0 -24px 60px -24px rgba(0, 0, 0, 0.4);
		transform: translateY(105%);
		visibility: hidden;
		transition: transform 0.34s cubic-bezier(0.22, 0.61, 0.36, 1), visibility 0s linear 0.34s;
	}
	html body.noirmusk-filters-open:is(.woocommerce-shop, .tax-product_cat) .sidebar-container {
		transform: none;
		visibility: visible;
		transition-delay: 0s;
	}
	html body:is(.woocommerce-shop, .tax-product_cat) .noirmusk-shop-filters-heading {
		position: sticky;
		top: 0;
		z-index: 3;
		margin: 0;
		padding: 22px 0 16px;
		background: #fff;
	}
	html body:is(.woocommerce-shop, .tax-product_cat) .noirmusk-shop-filters-heading::before {
		content: '';
		position: absolute;
		top: 9px;
		left: 50%;
		width: 42px;
		height: 4px;
		border-radius: 4px;
		background: #ddd5c8;
		transform: translateX(-50%);
	}
	.noirmusk-sheet-close {
		display: inline-flex;
		align-items: center;
		justify-content: center;
		order: 3;
		width: 34px;
		height: 34px;
		margin: -6px -8px -6px 8px;
		padding: 0;
		border: 0;
		border-radius: 50%;
		background: transparent;
		font-size: 26px;
		font-weight: 300;
		line-height: 1;
		color: #1a1a1a;
		cursor: pointer;
	}
	.noirmusk-shop-filters-heading__title {
		margin-right: auto;
	}
	.noirmusk-sheet-foot {
		position: sticky;
		bottom: 0;
		z-index: 3;
		margin: 0 -22px;
		padding: 14px 22px calc(14px + env(safe-area-inset-bottom, 0px));
		border-top: 1px solid #ece7de;
		background: #fff;
	}
	.noirmusk-sheet-apply {
		display: block;
		width: 100%;
		height: 50px;
		margin: 0;
		border: 0;
		border-radius: 4px;
		background: #1a1a1a;
		font-family: var(--theme-body-font-family), 'Inter', sans-serif;
		font-size: 15px;
		font-weight: 500;
		color: #fff;
		cursor: pointer;
	}
	.noirmusk-sheet-apply:active {
		background: #a3703f;
	}

	.noirmusk-filters-overlay {
		position: fixed;
		z-index: 10000;
		inset: 0;
		display: block;
		background: rgba(20, 18, 15, 0.52);
		opacity: 0;
		visibility: hidden;
		transition: opacity 0.3s ease, visibility 0s linear 0.3s;
	}
	html body.noirmusk-filters-open .noirmusk-filters-overlay {
		opacity: 1;
		visibility: visible;
		transition-delay: 0s;
	}
	html body.noirmusk-filters-open {
		overflow: hidden;
	}
}
@media (min-width: 992px) {
	.noirmusk-sheet-close,
	.noirmusk-sheet-foot {
		display: none;
	}
}
@media (prefers-reduced-motion: reduce) {
	html body:is(.woocommerce-shop, .tax-product_cat) .sidebar-container,
	.noirmusk-filters-overlay,
	html body:is(.woocommerce-shop, .tax-product_cat) .wc-toolbar .lasf-custom-dropdown ul {
		transition: none;
	}
}

/* "Best Sellers ✕" label shown above the results while a tag is being browsed */
.noirmusk-shop-tag {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	margin: 0 0 16px;
	padding: 4px 4px 4px 16px;
	border: 1px solid #d8c29b;
	border-radius: 30px;
	background: #faf6ee;
	font-family: var(--theme-body-font-family), 'Inter', sans-serif;
	font-size: 13.5px;
	font-weight: 600;
	color: #a3703f;
}
.noirmusk-shop-tag__clear {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 28px;
	height: 28px;
	border-radius: 50%;
	font-size: 20px;
	font-weight: 400;
	line-height: 1;
	text-decoration: none;
	color: #a3703f;
	transition: background-color 0.15s ease, color 0.15s ease;
}
.noirmusk-shop-tag__clear:hover {
	background: #a3703f;
	color: #fff;
}
