.ns-search {
	position: relative;
	width: 100%;
	max-width: 16rem;
	font-family: var(--ns-font-body, inherit);
}

.ns-search__form {
	display: flex;
	align-items: stretch;
	background: var(--ns-search-bar-bg, #fff);
	border: 1px solid var(--ns-search-border, rgba(0, 0, 0, 0.14));
	border-radius: 999px;
	overflow: hidden;
	min-height: 2.35rem;
	color: var(--ns-search-text, #333);
}

.ns-search--minimal .ns-search__form {
	border-radius: 4px;
}

.ns-search--rounded .ns-search__form {
	border-radius: 8px;
}

.ns-search__input {
	flex: 1 1 auto;
	min-width: 0;
	border: 0;
	padding: 0.45rem 0.75rem;
	font-family: var(--ns-font-body, inherit);
	font-size: 0.88rem;
	line-height: 1.3;
	background: transparent;
	color: var(--ns-search-text, #333);
}

.ns-search__input::placeholder {
	color: var(--ns-search-text, #333);
	opacity: 0.55;
}

.ns-search__input:focus {
	outline: none;
}

.ns-search__submit {
	flex: 0 0 auto;
	border: 0;
	background: transparent;
	color: var(--ns-search-text, #333);
	padding: 0 0.7rem;
	cursor: pointer;
	display: grid;
	place-items: center;
	opacity: 0.75;
}

.ns-search__submit svg {
	width: 14px;
	height: 14px;
}

.ns-search__submit:hover {
	opacity: 1;
}

.ns-search.is-loading .ns-search__submit {
	opacity: 0.4;
}

.ns-search__dropdown {
	position: absolute;
	left: 0;
	right: 0;
	top: calc(100% + 0.4rem);
	z-index: 80;
	background: var(--ns-search-bg, #fff);
	color: var(--ns-search-text, #111);
	border: 1px solid var(--ns-search-border, rgba(0, 0, 0, 0.1));
	box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12);
	max-height: min(70vh, 28rem);
	overflow: auto;
	text-align: left;
}

.ns-search__group {
	padding: 0.45rem 0;
	border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.ns-search__group:last-child {
	border-bottom: 0;
}

.ns-search__group-title {
	padding: 0.35rem 0.85rem;
	font-size: 0.72rem;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	opacity: 0.55;
}

.ns-search__item {
	display: flex;
	align-items: center;
	gap: 0.7rem;
	padding: 0.55rem 0.85rem;
	text-decoration: none;
	color: inherit;
}

.ns-search__item:hover,
.ns-search__item:focus {
	background: var(--ns-search-selected, rgba(0, 0, 0, 0.04));
}

.ns-search__thumb {
	width: 2.5rem;
	height: 2.5rem;
	object-fit: contain;
	flex: 0 0 auto;
	background: #f5f5f5;
}

.ns-search__thumb--empty {
	display: block;
}

.ns-search__item-body {
	flex: 1 1 auto;
	min-width: 0;
	display: grid;
	gap: 0.15rem;
}

.ns-search__item-title {
	font-size: 0.9rem;
	font-weight: 600;
	line-height: 1.3;
}

.ns-search__item-title mark {
	background: transparent;
	color: var(--ns-search-highlight, #3858e9);
	font-weight: 700;
	padding: 0;
}

.ns-search__sku,
.ns-search__desc {
	display: block;
	font-size: 0.72rem;
	opacity: 0.7;
	margin-top: 0.15rem;
}

.ns-search__price {
	flex: 0 0 auto;
	font-size: 0.88rem;
	font-weight: 700;
	white-space: nowrap;
}

.ns-search__count {
	margin-left: auto;
	opacity: 0.55;
	font-size: 0.8rem;
}

.ns-search__more,
.ns-search__empty {
	display: block;
	padding: 0.75rem 0.85rem;
	font-size: 0.88rem;
}

.ns-search__more {
	text-decoration: none;
	color: inherit;
	font-weight: 600;
	border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.ns-search__more:hover {
	background: rgba(0, 0, 0, 0.04);
}

.ns-search__empty {
	opacity: 0.65;
}

/* Dark header (Bricover) */
.ns-header--bricover .ns-search {
	max-width: none;
	width: 100%;
	justify-self: center;
}

.ns-header--bricover .ns-search__form {
	background: #fff !important;
	color: #111 !important;
	border: 0;
}

.ns-header--bricover .ns-search__input {
	color: #111 !important;
}

.ns-header--bricover .ns-search__submit {
	color: #111 !important;
	background: transparent !important;
}

/* Overlay panel */
.ns-search-overlay {
	position: fixed;
	inset: 0;
	z-index: 100070;
	display: flex;
	align-items: flex-start;
	justify-content: center;
	padding: 4.5rem 1rem 2rem;
}

.ns-search-overlay[hidden] {
	display: none !important;
}

.ns-search-overlay__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.55);
}

.ns-search-overlay__panel {
	position: relative;
	z-index: 1;
	width: min(100%, 40rem);
	margin-top: 1rem;
	background: #fff;
	color: #111;
	border: 1px solid #ececec;
	box-shadow: 0 18px 48px rgba(0, 0, 0, 0.18);
	padding: 1.5rem 1.25rem 1.25rem;
}

.ns-search-overlay__close {
	position: absolute;
	top: 0.45rem;
	right: 0.55rem;
	width: 2rem;
	height: 2rem;
	border: 0;
	background: transparent;
	font-size: 1.35rem;
	line-height: 1;
	cursor: pointer;
	color: #111;
}

.ns-search-overlay .ns-search {
	max-width: none;
	width: 100%;
}

.ns-search-overlay .ns-search__dropdown {
	position: static;
	margin-top: 0.75rem;
	box-shadow: none;
	max-height: min(60vh, 24rem);
}

body.ns-search-open {
	overflow: hidden;
}
