/**
 * nl-product-archive – products of a leaf category with filter, toolbar, chips and "Load more".
 *
 * Breakpoint template, see nl-base.css. The filter form is a sidebar on desktop; below the tablet breakpoint
 * the script moves it into the bottom sheet (<dialog>). Buttons repeat their colours for :hover and :focus
 * against the theme's pink button states, as in nl-product-card.css.
 */

/* Same fix as nl-category-grid.css: a wrapping flex container would size the widget at its content width. */
.e-con-inner > .elementor-widget-nl-product-archive,
.e-con > .elementor-widget-nl-product-archive {
	width: var(--container-widget-width, 100%);
	--flex-grow: var(--container-widget-flex-grow);
}

.nl-portfolio.nl-archive {
	display: flex;
	align-items: flex-start;
	gap: 32px;
}

.nl-archive .nl-archive__aside {
	flex: none;
	width: 280px;
	padding: 20px;
	border: 1px solid var(--nl-line);
	border-radius: var(--nl-r-m);
}

.nl-archive .nl-archive__main {
	display: flex;
	flex: 1;
	flex-direction: column;
	gap: 20px;
	min-width: 0;
}

/* Shared button reset. */
.nl-archive button {
	margin: 0;
	font-family: var(--nl-font-text);
	line-height: 1;
	text-transform: none;
	letter-spacing: normal;
	white-space: nowrap;
	cursor: pointer;
	transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.nl-archive button svg {
	flex: none;
}

/* Link-style buttons: "Reset all". */
.nl-archive .nl-archive__reset,
.nl-archive .nl-archive__reset:is(:hover, :focus, :active),
.nl-archive .nl-filter__reset,
.nl-archive .nl-filter__reset:is(:hover, :focus, :active) {
	min-height: 36px;
	padding: 0 8px;
	border: 0;
	border-radius: 0;
	box-shadow: none;
	transform: none;
	background: transparent;
	font-size: 14px;
	font-weight: 600;
	color: var(--nl-action);
	text-decoration: underline;
	text-underline-offset: 3px;
}

.nl-archive .nl-filter__reset {
	padding: 0;
}

/* Toolbar */

.nl-archive .nl-archive__toolbar {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
}

.nl-archive .nl-archive__summary {
	display: flex;
	align-items: center;
	gap: 12px;
}

.nl-archive .nl-archive__filter-button,
.nl-archive .nl-archive__filter-button:is(:hover, :focus, :active) {
	display: none;
	align-items: center;
	gap: 8px;
	height: 44px;
	padding: 0 16px;
	border: 1px solid var(--nl-navy);
	border-radius: var(--nl-r-pill);
	box-shadow: none;
	transform: none;
	background: #fff;
	font-size: 15px;
	font-weight: 600;
	color: var(--nl-navy);
}

.nl-archive .nl-archive__filter-button:hover {
	background: var(--nl-surface);
	color: var(--nl-navy);
}

.nl-archive .nl-archive__filter-button svg {
	width: 18px;
	height: 18px;
}

.nl-archive .nl-archive__badge {
	display: flex;
	align-items: center;
	justify-content: center;
	min-width: 22px;
	height: 22px;
	padding: 0 6px;
	border-radius: var(--nl-r-pill);
	background: var(--nl-action);
	font-size: 12px;
	font-weight: 700;
	color: #fff;
}

.nl-archive .nl-archive__badge[hidden] {
	display: none;
}

.nl-archive .nl-archive__count {
	font-size: 15px;
	line-height: 1.4;
	color: var(--nl-navy);
}

.nl-archive .nl-archive__sort {
	display: flex;
	align-items: center;
	gap: 8px;
	margin: 0;
	font-size: 14px;
	font-weight: 400;
	color: var(--nl-text-muted);
}

.nl-archive .nl-archive__sort-select {
	width: auto;
	height: 44px;
	padding: 0 36px 0 14px;
	border: 1px solid var(--nl-field);
	border-radius: var(--nl-r-pill);
	background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2316163f' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right 12px center / 16px;
	font-family: var(--nl-font-text);
	font-size: 15px;
	color: var(--nl-navy);
	appearance: none;
}

/* Active filter chips */

.nl-archive .nl-archive__chips {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.nl-archive .nl-archive__chips[hidden] {
	display: none;
}

.nl-archive .nl-archive__chip-list {
	display: contents;
}

.nl-archive .nl-archive__chip,
.nl-archive .nl-archive__chip:is(:hover, :focus, :active) {
	display: flex;
	flex: none;
	align-items: center;
	gap: 6px;
	height: 36px;
	padding: 0 8px 0 14px;
	border: 0;
	border-radius: var(--nl-r-pill);
	box-shadow: none;
	transform: none;
	background: var(--nl-chip);
	font-size: 14px;
	font-weight: 600;
	color: var(--nl-navy);
}

.nl-archive .nl-archive__chip:hover {
	background: #cfe8f7;
	color: var(--nl-navy);
}

.nl-archive .nl-archive__chip svg {
	width: 16px;
	height: 16px;
}

/* Grid, empty state, "Load more" */

.nl-archive .nl-archive__grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 24px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.nl-archive .nl-archive__item {
	margin: 0;
}

.nl-archive .nl-archive__item[hidden],
.nl-archive .nl-archive__empty[hidden],
.nl-archive .nl-archive__more[hidden] {
	display: none;
}

.nl-archive .nl-archive__empty {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 12px;
	padding: 48px 0;
	text-align: center;
}

.nl-archive .nl-archive__empty-text {
	font-size: 16px;
	font-weight: 600;
	color: var(--nl-navy);
}

.nl-archive .nl-archive__more {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 12px;
	padding-top: 16px;
}

.nl-archive .nl-archive__progress-text {
	font-size: 14px;
	color: var(--nl-text-muted);
}

.nl-archive .nl-archive__progress {
	width: 200px;
	height: 4px;
	overflow: hidden;
	border-radius: var(--nl-r-pill);
	background: var(--nl-line);
}

.nl-archive .nl-archive__progress-bar {
	display: block;
	height: 100%;
	border-radius: var(--nl-r-pill);
	background: var(--nl-action);
}

.nl-archive .nl-archive__more-button,
.nl-archive .nl-archive__more-button:is(:hover, :focus, :active),
.nl-archive .nl-archive__empty-reset,
.nl-archive .nl-archive__empty-reset:is(:hover, :focus, :active) {
	height: 48px;
	padding: 0 28px;
	border: 1.5px solid var(--nl-action);
	border-radius: var(--nl-r-pill);
	box-shadow: none;
	transform: none;
	background: #fff;
	font-size: 15px;
	font-weight: 600;
	color: var(--nl-action);
}

.nl-archive .nl-archive__more-button:hover,
.nl-archive .nl-archive__empty-reset:hover {
	background: var(--nl-action);
	color: #fff;
}

/* Filter form */

.nl-archive .nl-filter {
	display: flex;
	flex-direction: column;
	margin: 0;
}

.nl-archive .nl-filter__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding-bottom: 16px;
}

.nl-archive .nl-filter__title,
.nl-archive .nl-archive__sheet-title {
	font-family: var(--nl-font-heading);
	font-size: 22px;
	font-weight: 900;
	line-height: 1.2;
	color: var(--nl-navy);
}

.nl-archive .nl-filter__search {
	display: flex;
	flex-direction: column;
	gap: 8px;
	padding-bottom: 20px;
}

.nl-archive .nl-filter__label {
	margin: 0;
	font-size: 14px;
	font-weight: 600;
	line-height: 1.4;
	color: var(--nl-navy);
}

.nl-archive .nl-filter__search-field {
	position: relative;
}

.nl-archive .nl-filter__search-field svg {
	position: absolute;
	top: 12px;
	right: 12px;
	width: 20px;
	height: 20px;
	color: var(--nl-text-muted);
	pointer-events: none;
}

.nl-archive .nl-filter__input,
.nl-archive .nl-filter__input:focus {
	width: 100%;
	height: 44px;
	margin: 0;
	padding: 0 14px;
	border: 1px solid var(--nl-field);
	border-radius: var(--nl-r-s);
	background: #fff;
	font-family: var(--nl-font-text);
	font-size: 15px;
	line-height: normal;
	color: var(--nl-navy);
	box-shadow: none;
}

.nl-archive .nl-filter__input:focus {
	border-color: var(--nl-action);
}

.nl-archive .nl-filter__search .nl-filter__input {
	padding-right: 44px;
}

.nl-archive .nl-filter__select {
	padding-right: 36px;
	background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2316163f' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right 12px center / 16px;
	appearance: none;
}

.nl-archive .nl-filter__group {
	min-width: 0;
	margin: 0;
	padding: 16px 0 20px;
	border: 0;
	border-top: 1px solid var(--nl-line);
}

.nl-archive div.nl-filter__group:not(.nl-filter__group--switch) {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.nl-archive .nl-filter__legend,
.nl-archive .nl-filter__summary {
	float: left;
	width: 100%;
	margin: 0;
	padding: 0 0 12px;
	font-size: 15px;
	font-weight: 700;
	line-height: 1.4;
	color: var(--nl-navy);
}

.nl-archive div.nl-filter__group > .nl-filter__legend {
	float: none;
	padding: 0;
}

/* Collapsible checkbox list */

.nl-archive .nl-filter__summary {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding-bottom: 8px;
	list-style: none;
	cursor: pointer;
}

.nl-archive .nl-filter__summary::-webkit-details-marker {
	display: none;
}

.nl-archive .nl-filter__summary svg {
	width: 18px;
	height: 18px;
	transition: transform 0.2s ease;
}

.nl-archive details[open] > .nl-filter__summary svg {
	transform: rotate(180deg);
}

.nl-archive .nl-filter__options {
	clear: both;
	display: flex;
	flex-direction: column;
	gap: 0;
	margin: 0;
	padding: 0;
	list-style: none;
}

.nl-archive .nl-filter__check {
	display: flex;
	align-items: center;
	gap: 12px;
	min-height: 32px;
	margin: 0;
	font-size: 15px;
	font-weight: 400;
	line-height: 1.3;
	color: var(--nl-navy);
	cursor: pointer;
}

.nl-archive .nl-filter__check input {
	flex: none;
	width: 20px;
	height: 20px;
	margin: 0;
	accent-color: var(--nl-action);
}

.nl-archive .nl-filter__count {
	margin-left: auto;
	font-size: 13px;
	color: var(--nl-text-muted);
}

.nl-archive .nl-filter__check:has(input:disabled),
.nl-archive .nl-filter__pill:has(input:disabled) {
	opacity: 0.45;
	cursor: default;
}

/* Pills */

.nl-archive .nl-filter__pills {
	clear: both;
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.nl-archive .nl-filter__pill {
	position: relative;
	margin: 0;
	cursor: pointer;
}

.nl-archive .nl-filter__pill-input {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	margin: 0;
	opacity: 0;
	cursor: inherit;
}

.nl-archive .nl-filter__pill span {
	display: flex;
	align-items: center;
	height: 36px;
	padding: 0 14px;
	border: 1px solid var(--nl-field);
	border-radius: var(--nl-r-pill);
	background: #fff;
	font-size: 14px;
	font-weight: 600;
	line-height: 1;
	color: var(--nl-navy);
	white-space: nowrap;
}

.nl-archive .nl-filter__pill-input:checked + span {
	border-color: var(--nl-action);
	background: var(--nl-action);
	color: #fff;
}

.nl-archive .nl-filter__pill-input:focus-visible + span {
	outline: 2px solid var(--nl-action);
	outline-offset: 2px;
}

/* Dropdown with checkboxes: looks like the select, opens the checkbox list as a panel */

.nl-archive .nl-filter__dropdown {
	position: relative;
}

.nl-archive .nl-filter__dropdown-toggle {
	display: flex;
	align-items: center;
	list-style: none;
	cursor: pointer;
}

.nl-archive .nl-filter__dropdown-toggle::-webkit-details-marker {
	display: none;
}

.nl-archive .nl-filter__dropdown-text {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.nl-archive .nl-filter__dropdown[open] > .nl-filter__dropdown-toggle {
	border-color: var(--nl-action);
}

.nl-archive .nl-filter__dropdown-panel {
	position: absolute;
	top: calc(100% + 4px);
	right: 0;
	left: 0;
	z-index: 10;
	max-height: 280px;
	overflow: auto;
	padding: 8px 14px;
	border: 1px solid var(--nl-field);
	border-radius: var(--nl-r-s);
	background: #fff;
	box-shadow: 0 8px 24px rgba(22, 22, 63, 0.12);
}

/* Toggles: switches, consecutive ones form one block */

.nl-archive .nl-filter__group--switch {
	padding: 4px 0;
}

.nl-archive .nl-filter__group--switch + .nl-filter__group--switch {
	border-top: 0;
}

.nl-archive .nl-filter__switch {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	min-height: 52px;
	margin: 0;
	cursor: pointer;
}

.nl-archive .nl-filter__switch .nl-filter__legend {
	float: none;
	width: auto;
	padding: 0;
}

.nl-archive .nl-filter__switch-input {
	position: relative;
	flex: none;
	width: 48px;
	height: 28px;
	margin: 0;
	border: 0;
	border-radius: var(--nl-r-pill);
	background: var(--nl-field);
	cursor: pointer;
	appearance: none;
	transition: background-color 0.2s ease;
}

.nl-archive .nl-filter__switch-input::before {
	content: "";
	position: absolute;
	top: 3px;
	left: 3px;
	width: 22px;
	height: 22px;
	border-radius: 50%;
	background: #fff;
	transition: transform 0.2s ease;
}

.nl-archive .nl-filter__switch-input:checked {
	background: var(--nl-action);
}

.nl-archive .nl-filter__switch-input:checked::before {
	transform: translateX(20px);
}

.nl-archive .nl-filter__switch:has(input:disabled) {
	opacity: 0.45;
	cursor: default;
}

/* Ranges: two sliders on one track plus "from"/"to" fields */

.nl-archive .nl-filter__range {
	--from: 0;
	--to: 1;

	position: relative;
	clear: both;
	height: 20px;
	margin-bottom: 14px;
}

.nl-archive .nl-filter__range::before,
.nl-archive .nl-filter__range::after {
	content: "";
	position: absolute;
	top: 8px;
	height: 4px;
	border-radius: var(--nl-r-pill);
}

.nl-archive .nl-filter__range::before {
	right: 0;
	left: 0;
	background: var(--nl-line);
}

/* The thumb centres move between 10 px and (width - 10 px). */
.nl-archive .nl-filter__range::after {
	left: calc(10px + (100% - 20px) * var(--from));
	right: calc(10px + (100% - 20px) * (1 - var(--to)));
	background: var(--nl-action);
}

.nl-archive .nl-filter__slider {
	position: absolute;
	inset: 0;
	z-index: 1;
	width: 100%;
	height: 20px;
	margin: 0;
	padding: 0;
	border: 0;
	background: transparent;
	pointer-events: none;
	appearance: none;
}

.nl-archive .nl-filter__slider::-webkit-slider-runnable-track {
	height: 20px;
	background: transparent;
}

.nl-archive .nl-filter__slider::-moz-range-track {
	height: 20px;
	background: transparent;
}

.nl-archive .nl-filter__slider::-webkit-slider-thumb {
	width: 20px;
	height: 20px;
	border: 2px solid var(--nl-action);
	border-radius: 50%;
	background: #fff;
	pointer-events: auto;
	cursor: grab;
	appearance: none;
}

.nl-archive .nl-filter__slider::-moz-range-thumb {
	box-sizing: border-box;
	width: 20px;
	height: 20px;
	border: 2px solid var(--nl-action);
	border-radius: 50%;
	background: #fff;
	pointer-events: auto;
	cursor: grab;
}

.nl-archive .nl-filter__bounds {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 8px;
}

.nl-archive .nl-filter__bound {
	display: flex;
	flex-direction: column;
	gap: 4px;
	margin: 0;
	font-size: 13px;
	font-weight: 400;
	line-height: 1.3;
	color: var(--nl-text-muted);
}

.nl-archive .nl-filter__bound .nl-filter__input {
	height: 40px;
	padding: 0 12px;
}

/* Bottom sheet (tablet and mobile) */

.nl-archive .nl-archive__sheet {
	position: fixed;
	inset: 48px 0 0;
	width: 100%;
	max-width: none;
	height: auto;
	max-height: none;
	margin: 0;
	padding: 0;
	overflow: hidden;
	border: 0;
	border-radius: var(--nl-r-l) var(--nl-r-l) 0 0;
	background: #fff;
	color: var(--nl-text);
}

.nl-archive .nl-archive__sheet[open] {
	display: flex;
	flex-direction: column;
}

.nl-archive .nl-archive__sheet::backdrop {
	background: rgba(22, 22, 63, 0.55);
}

html:has(.nl-archive__sheet[open]) {
	overflow: hidden;
}

.nl-archive .nl-archive__sheet-head {
	display: flex;
	flex: none;
	align-items: center;
	justify-content: space-between;
	padding: 12px 12px 12px var(--nl-gutter);
	border-bottom: 1px solid var(--nl-line);
}

.nl-archive .nl-archive__sheet-close,
.nl-archive .nl-archive__sheet-close:is(:hover, :focus, :active) {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	box-shadow: none;
	transform: none;
	background: var(--nl-surface);
	color: var(--nl-navy);
}

.nl-archive .nl-archive__sheet-close:hover {
	background: var(--nl-line);
}

.nl-archive .nl-archive__sheet-close svg {
	width: 22px;
	height: 22px;
}

.nl-archive .nl-archive__sheet-body {
	flex: 1;
	padding: 16px var(--nl-gutter);
	overflow-y: auto;
	overscroll-behavior: contain;
}

/* The sheet has its own heading and buttons. */
.nl-archive .nl-archive__sheet .nl-filter__head {
	display: none;
}

.nl-archive .nl-archive__sheet-foot {
	display: flex;
	flex: none;
	gap: 12px;
	padding: 12px var(--nl-gutter) 20px;
	border-top: 1px solid var(--nl-line);
	background: #fff;
}

.nl-archive .nl-archive__sheet-reset,
.nl-archive .nl-archive__sheet-reset:is(:hover, :focus, :active) {
	height: 48px;
	padding: 0 18px;
	border: 1px solid var(--nl-field);
	border-radius: var(--nl-r-pill);
	box-shadow: none;
	transform: none;
	background: #fff;
	font-size: 15px;
	font-weight: 600;
	color: var(--nl-navy);
}

.nl-archive .nl-archive__sheet-reset:hover {
	border-color: var(--nl-navy);
}

.nl-archive .nl-archive__sheet-submit,
.nl-archive .nl-archive__sheet-submit:is(:hover, :focus, :active) {
	flex: 1;
	min-width: 0;
	height: 48px;
	padding: 0 16px;
	border: 0;
	border-radius: var(--nl-r-pill);
	box-shadow: none;
	transform: none;
	background: var(--nl-action);
	font-size: 15px;
	font-weight: 600;
	color: #fff;
}

.nl-archive .nl-archive__sheet-submit:hover {
	background: var(--nl-navy);
	color: #fff;
}

@media (prefers-reduced-motion: reduce) {
	.nl-archive button,
	.nl-archive .nl-filter__summary svg,
	.nl-archive .nl-filter__switch-input,
	.nl-archive .nl-filter__switch-input::before {
		transition: none;
	}
}

@media (max-width: 1024px) {
	.nl-archive .nl-archive__aside {
		display: none;
	}

	.nl-archive .nl-archive__filter-button,
	.nl-archive .nl-archive__filter-button:is(:hover, :focus, :active) {
		display: flex;
	}

	.nl-archive .nl-archive__grid {
		gap: 20px;
	}
}

@media (max-width: 767px) {
	.nl-archive .nl-archive__grid {
		grid-template-columns: repeat(1, minmax(0, 1fr));
		gap: 12px;
	}

	.nl-archive .nl-archive__sort-label {
		position: absolute;
		width: 1px;
		height: 1px;
		overflow: hidden;
		clip: rect(0 0 0 0);
		white-space: nowrap;
	}
}
