/* Live search suggestions — under the input, left-aligned (normal autocomplete) */
.sp-suggest {
	position: absolute;
	left: 0;
	right: 0;
	top: calc(100% + 6px);
	/* ≥100 so list stacks above .find__pop chips when find overflow is visible */
	z-index: 100;
	background: #fff;
	border: 1px solid #E3E8EF;
	border-radius: 10px;
	box-shadow: 0 12px 32px rgba(16, 42, 95, .16);
	max-height: 320px;
	overflow: auto;
	box-sizing: border-box;
	text-align: left;
}
/* Search page: sit above fixed header (z≈1021) / cookie toast; cap height */
body.product-search .sp-suggest {
	z-index: 1100;
	max-height: min(320px, 50vh);
}
.sp-suggest[hidden] {
	display: none !important;
}
.sp-suggest__list {
	list-style: none;
	margin: 0;
	padding: 6px 0;
}
.sp-suggest__item {
	margin: 0;
	padding: 0;
}
.sp-suggest__btn {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	width: 100%;
	min-height: 40px;
	padding: 10px 16px;
	border: 0;
	background: transparent;
	cursor: pointer;
	font: inherit;
	text-align: left;
	color: #2E437B;
	box-sizing: border-box;
}
.sp-suggest__btn:hover,
.sp-suggest__item.is-active .sp-suggest__btn {
	background: #EAF2FB;
	color: #0066B2;
}
.sp-suggest__label {
	flex: 1 1 auto;
	min-width: 0;
	font-size: 15px;
	line-height: 1.3;
	font-weight: 400;
	/* Figma: single-line rows with type meta right-aligned */
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	text-transform: none;
}
.sp-suggest__label mark {
	background: transparent;
	color: #0066B2;
	font-weight: 600;
	padding: 0;
}
.sp-suggest__type {
	flex: 0 0 auto;
	font-size: 12px;
	color: #96A1BD;
	font-weight: 400;
	white-space: nowrap;
}

/* Field anchors need relative positioning + stacking context for z-index:100 */
.cat_hero-form label,
.cat_hero__field,
.fg .srch__field,
#search-header .search-form,
body.product-search .cat_hero__field {
	position: relative;
	z-index: 2;
}

/* Catalog hero form: dropdown under full white search bar (input area only) */
body.product-category-all .cat_hero-form {
	position: relative;
}
body.product-category-all .cat_hero-form label {
	position: relative;
	flex: 1 1 auto;
	min-width: 0;
}
/* Keep suggest under label (input column), not under whole form with buttons */
body.product-category-all .cat_hero-form .sp-suggest {
	left: 0;
	right: 0;
	width: 100%;
	min-width: 240px;
}

/* Home search — .srch stacking context so suggest paints above popular chips */
body .fg .srch {
	position: relative;
	z-index: 5;
}
body .fg .srch__field {
	position: relative;
	z-index: 2;
	flex: 1 1 auto;
	min-width: 0;
}
body .fg .srch__field .sp-suggest {
	left: 0;
	right: 0;
	z-index: 100;
}
/* Popular chips stay under open suggest / filter strip */
body .fg .find__pop {
	position: relative;
	z-index: 1;
}

/* Overlay header search */
#search-header .search-form {
	position: relative;
}
#search-header .sp-suggest {
	left: 0;
	right: 48px; /* leave room for submit if needed */
}

@media (max-width: 640px) {
	.sp-suggest {
		max-height: 240px;
	}
	.sp-suggest__type {
		display: none;
	}
}
