/* Shop filters — shared across structures */
.ns-archive__layout {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 2rem;
	align-items: start;
	width: 100%;
	min-width: 0;
}

.ns-catalog--filtered .ns-archive__layout {
	grid-template-columns: minmax(12rem, 15rem) minmax(0, 1fr);
}

.ns-archive__main,
.ns-shop-filters {
	min-width: 0;
	max-width: 100%;
}

.ns-archive__toolbar:empty {
	display: none;
}

.ns-shop-filters {
	position: sticky;
	top: 1.25rem;
	font-family: var(--ns-font-body, inherit);
	font-size: 0.88rem;
	color: var(--ns-color-text, #1a1a1a);
}

.ns-shop-filters__block {
	margin: 0 0 2rem;
}

.ns-shop-filters__head {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 0.75rem;
	margin-bottom: 0.85rem;
}

.ns-shop-filters__title {
	margin: 0;
	font-family: var(--ns-font-body, inherit);
	font-size: 0.95rem;
	font-weight: 700;
	letter-spacing: 0.01em;
}

.ns-shop-filters__reset {
	font-size: 0.78rem;
	text-decoration: underline;
	color: inherit;
	opacity: 0.7;
}

.ns-shop-filters__chips {
	list-style: none;
	margin: 0 0 1rem;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	gap: 0.4rem;
}

.ns-shop-filters__chips a {
	display: inline-flex;
	align-items: center;
	gap: 0.35rem;
	padding: 0.3rem 0.55rem;
	border: 1px solid #ddd;
	background: #fff;
	text-decoration: none;
	color: inherit;
	font-size: 0.75rem;
}

.ns-shop-filter__slider {
	position: relative;
	height: 1.75rem;
	margin: 0 0 0.85rem;
}

.ns-shop-filter__range {
	position: absolute;
	left: 0;
	right: 0;
	width: 100%;
	appearance: none;
	background: transparent;
	pointer-events: none;
	height: 1.75rem;
}

.ns-shop-filter__range::-webkit-slider-runnable-track {
	height: 3px;
	background: #ddd;
}

.ns-shop-filter__range::-webkit-slider-thumb {
	appearance: none;
	width: 14px;
	height: 14px;
	border-radius: 50%;
	background: #1a1a1a;
	margin-top: -5.5px;
	pointer-events: auto;
	cursor: pointer;
}

.ns-shop-filter__range::-moz-range-track {
	height: 3px;
	background: #ddd;
}

.ns-shop-filter__range::-moz-range-thumb {
	width: 14px;
	height: 14px;
	border: 0;
	border-radius: 50%;
	background: #1a1a1a;
	pointer-events: auto;
	cursor: pointer;
}

.ns-shop-filter__swatches {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	gap: 0.45rem;
}

.ns-shop-filter__swatches a {
	display: flex;
	align-items: center;
	gap: 0.55rem;
	text-decoration: none;
	color: inherit;
	font-size: 0.88rem;
}

.ns-shop-filter__swatch {
	width: 1.1rem;
	height: 1.1rem;
	border: 1px solid rgba(0, 0, 0, 0.2);
	border-radius: 50%;
	flex: 0 0 auto;
}

.ns-shop-filter__swatches li.is-active .ns-shop-filter__swatch {
	outline: 2px solid #1a1a1a;
	outline-offset: 2px;
}

.ns-shop-filter__ratings .ns-shop-filter__stars {
	letter-spacing: 0.05em;
	color: #c4a000;
	font-size: 0.95rem;
}

.ns-archive__count {
	margin: 0 0 1rem;
	font-size: 0.88rem;
	opacity: 0.75;
}

.ns-archive__layout.is-filtering {
	opacity: 0.55;
	pointer-events: none;
	transition: opacity 0.15s ease;
}

.ns-archive__layout.is-filtering::after {
	content: attr(data-loading-label);
	position: fixed;
	left: 50%;
	top: 50%;
	transform: translate(-50%, -50%);
	z-index: 50;
	padding: 0.65rem 1rem;
	background: #1a1a1a;
	color: #fff;
	font-size: 0.75rem;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	pointer-events: none;
	opacity: 1;
}

.ns-shop-filter {
	border-bottom: 1px solid #e6e6e6;
	padding: 0;
}

.ns-shop-filter__summary {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.75rem;
	padding: 0.7rem 0;
	cursor: pointer;
	list-style: none;
	font-family: var(--ns-font-body, inherit);
	font-size: 0.88rem;
	font-weight: 400;
	user-select: none;
}

.ns-shop-filter__summary::-webkit-details-marker {
	display: none;
}

.ns-shop-filter__summary::after {
	content: "";
	width: 0.45rem;
	height: 0.45rem;
	border-right: 1px solid currentColor;
	border-bottom: 1px solid currentColor;
	transform: rotate(45deg);
	opacity: 0.7;
	flex: 0 0 auto;
	margin-top: -0.2rem;
	transition: transform 0.2s ease;
}

.ns-shop-filter[open] > .ns-shop-filter__summary::after {
	transform: rotate(-135deg);
	margin-top: 0.15rem;
}

.ns-shop-filter__panel {
	padding: 0 0 1rem;
}

.ns-shop-filter__list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	gap: 0.45rem;
	max-height: 14rem;
	overflow-y: auto;
}

.ns-shop-filter__list a {
	display: flex;
	justify-content: space-between;
	gap: 0.75rem;
	text-decoration: none;
	color: inherit;
	font-family: var(--ns-font-body, inherit);
	font-size: 0.84rem;
	padding: 0.15rem 0;
}

.ns-shop-filter__list li.is-active a,
.ns-shop-filter__list a:hover {
	opacity: 0.7;
}

.ns-shop-filter__list li.is-active .ns-shop-filter__term {
	text-decoration: underline;
	text-underline-offset: 0.15em;
}

.ns-shop-filter__count {
	opacity: 0.55;
	font-size: 0.82em;
}

.ns-shop-filter__price-row {
	display: flex;
	align-items: center;
	gap: 0.35rem;
	flex-wrap: wrap;
}

.ns-shop-filter__currency,
.ns-shop-filter__dash {
	font-size: 0.85rem;
	opacity: 0.7;
}

.ns-shop-filter__price input[type="number"] {
	width: 3.75rem;
	min-height: 2rem;
	padding: 0.25rem 0.35rem;
	border: 1px solid #d8d8d8;
	border-radius: 0.2rem;
	background: #fff;
	font-family: var(--ns-font-body, inherit);
	font-size: 0.82rem;
}

.ns-shop-filter__apply {
	margin-top: 0.65rem;
	min-height: 2rem;
	padding: 0.3rem 0.75rem;
	border: 1px solid #1a1a1a;
	background: #fff;
	font-family: var(--ns-font-body, inherit);
	font-size: 0.72rem;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	cursor: pointer;
}

.ns-shop-ordering {
	margin: 0;
	display: grid;
	gap: 0.45rem;
}

.ns-shop-ordering__label {
	display: block;
	font-size: 0.88rem;
	font-weight: 400;
	font-family: var(--ns-font-body, inherit);
}

.ns-shop-ordering__control {
	position: relative;
}

.ns-shop-ordering__control::after {
	content: "";
	position: absolute;
	right: 0.9rem;
	top: 50%;
	width: 0.45rem;
	height: 0.45rem;
	border-right: 1px solid #1a1a1a;
	border-bottom: 1px solid #1a1a1a;
	transform: translateY(-65%) rotate(45deg);
	pointer-events: none;
}

.ns-shop-ordering__select,
.ns-shop-filters .woocommerce-ordering select.orderby {
	width: 100%;
	min-height: 2.25rem;
	padding: 0.4rem 2rem 0.4rem 0.7rem;
	border: 1px solid #d8d8d8;
	border-radius: 0.25rem;
	background: #fff;
	color: inherit;
	font-family: var(--ns-font-body, inherit);
	font-size: 0.84rem;
	appearance: none;
	-webkit-appearance: none;
	box-shadow: none;
	cursor: pointer;
}

@media (max-width: 900px) {
	.ns-catalog--filtered .ns-archive__layout {
		grid-template-columns: 1fr;
		gap: 1.5rem;
	}

	.ns-shop-filters {
		position: static;
	}
}

@media (max-width: 600px) {
	.ns-shop-filters__head {
		flex-wrap: wrap;
	}
}
