.niomah-product-search[hidden],
.niomah-product-search [hidden] {
	display: none !important;
}

.niomah-product-search {
	position: fixed;
	z-index: 35;
	inset: var(--niomah-search-top, 0px) 0 auto;
	max-height: calc(100dvh - var(--niomah-search-top, 0px));
	overflow: auto;
	overscroll-behavior: contain;
	background: var(--wp--preset--color--warm-white, #fbfaf8);
	color: var(--wp--preset--color--ink, #252421);
	border-bottom: 1px solid var(--niomah-line, #ded9d2);
	box-shadow: 0 8px 28px #25242119;
}

.niomah-product-search__inner {
	max-width: 780px;
	margin: 0 auto;
	padding: clamp(.875rem, 3vw, 2rem) clamp(.75rem, 4vw, 2rem);
}

.niomah-product-search form {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: .4rem;
}

.niomah-product-search input[type="search"] {
	flex: 1 1 12rem;
	min-width: 0;
	max-width: 100%;
	background: transparent;
	color: inherit;
	border: 1px solid #938d84;
	border-radius: 0;
	font: inherit;
	padding: .55rem .7rem;
	box-sizing: border-box;
	min-height: 44px;
}

.niomah-product-search input::-webkit-search-cancel-button {
	appearance: none;
}

.niomah-product-search button,
.niomah-product-search__all {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 44px;
	padding: .35rem .65rem;
	border: 0;
	border-radius: 0;
	background: transparent;
	color: inherit;
	font: inherit;
	cursor: pointer;
}

.niomah-product-search button[type="submit"] {
	background: var(--wp--preset--color--ink, #252421);
	color: var(--wp--preset--color--warm-white, #fbfaf8);
}

.niomah-product-search :is(button, input, a):focus-visible,
.niomah-shop__tools :is(button, input, a):focus-visible {
	outline: 2px solid var(--wp--preset--color--charcoal, #41413f);
	outline-offset: 2px;
}

.niomah-product-search__status {
	font-size: .875rem;
	margin: .6rem 0 0;
}

.niomah-product-search__status:empty {
	margin: 0;
}

.niomah-product-search__suggestions {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	list-style: none;
	padding: 0;
	margin: 0;
	gap: 0 1rem;
}

.niomah-product-search__suggestions a {
	display: flex;
	gap: .75rem;
	align-items: center;
	padding: .55rem 0;
	border-bottom: 1px solid var(--niomah-line, #ded9d2);
	overflow-wrap: anywhere;
}

.niomah-product-search__suggestions img {
	flex: 0 0 auto;
	display: block;
	width: 56px;
	height: 56px;
	object-fit: cover;
	background: var(--wp--preset--color--stone, #efede9);
}

.niomah-product-search__suggestions strong {
	display: block;
	line-height: 1.25;
}

.niomah-product-search__suggestions :is(small, .niomah-product-search__price) {
	display: block;
	font-size: .875rem;
}

.niomah-product-search__all,
.niomah-search-collections a {
	text-decoration: underline;
	text-underline-offset: .2em;
}

.niomah-shop .niomah-shop__tools {
	border-block: 1px solid var(--niomah-line, #ded9d2);
	padding-block: .35rem;
}

.niomah-shop__tools .wc-block-product-filters__open-overlay,
.niomah-shop__tools .woocommerce-ordering select {
	min-height: 44px;
	color: inherit;
}

.niomah-shop__tools .wc-block-product-filters__open-overlay {
	padding: .35rem .65rem;
	background: transparent;
	border: 1px solid var(--niomah-line, #ded9d2);
	border-radius: 0;
}

.niomah-shop__tools .wc-block-product-filters__overlay {
	z-index: 1000;
}

.niomah-shop__tools .wc-block-product-filters__overlay-dialog {
	color: var(--wc-product-filters-text-color, var(--wp--preset--color--ink, #252421));
	background: var(--wc-product-filters-background-color, var(--wp--preset--color--warm-white, #fbfaf8));
}

.niomah-shop__tools .wc-block-product-filters__overlay-content h3 {
	font-size: 1.5rem;
	margin-block: .7rem .45rem;
}

.niomah-shop .niomah-active-filters:not(:has(button)) {
	display: none;
}

.niomah-active-filters .wp-block-button__link {
	min-height: 44px;
}

body:not(.woocommerce-shop) .niomah-search-results .niomah-shop__intro {
	display: block;
}

.niomah-search-results .niomah-shop__collection .wc-block-product-template {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: clamp(1.5rem, 4vw, 3.5rem) clamp(.75rem, 2vw, 1.75rem);
}

.niomah-search-results .niomah-shop__collection .wc-block-product-template > li {
	display: flex;
	flex-direction: column;
}

.niomah-search-results .niomah-shop__collection .wc-block-product-template > li > .wp-block-woocommerce-product-price {
	margin-block-start: auto;
}

@media (max-width: 1023px) {
	.niomah-search-results .niomah-shop__collection .wc-block-product-template {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}

@media (max-width: 768px) {
	.niomah-search-results .niomah-shop__collection .wc-block-product-template {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
	.niomah-shop__tools .wc-block-product-filter-checkbox-list__label {
		display: flex;
		align-items: center;
		min-height: 44px;
	}
	.niomah-shop__tools .wc-block-product-filters__close-overlay {
		min-width: 44px;
		min-height: 44px;
	}
}

@media (max-width: 600px) {
	.niomah-product-search__suggestions {
		grid-template-columns: minmax(0, 1fr);
	}
	.niomah-product-search input[type="search"] {
		flex-basis: 100%;
	}
	.niomah-shop__tools .woocommerce-result-count {
		order: 1;
		flex-basis: 100%;
		margin: 0;
	}
}
