/**
 * Header search autosuggest panel.
 *
 * Scoped strictly to the .search-suggest dropdown (sprint D7 — the existing
 * search field / button / label / drawer styling is left untouched). The
 * panel anchors to .search__field, which already has position: relative
 * (style.css). Reuses theme tokens; no new design system, no !important.
 */

.search-suggest {
	position: absolute;
	top: calc(100% + 8px);
	left: 0;
	right: 0;
	z-index: 20;
	max-height: 360px;
	overflow-y: auto;
	background-color: var(--white);
	border: 1px solid var(--border-color);
	border-radius: 4px;
	box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12);
	text-align: left;
}

.search-suggest__list {
	list-style: none;
	margin: 0;
	padding: 6px 0;
}

.search-suggest__row {
	margin: 0;
}

.search-suggest__item {
	display: grid;
	grid-template-columns: 48px minmax(0, 1fr) auto;
	align-items: center;
	gap: 14px;
	padding: 9px 16px;
	color: var(--text-primary);
	text-decoration: none;
	transition: background-color 0.15s ease;
}

.search-suggest__item.is-active,
.search-suggest__item:hover {
	background-color: var(--border-color);
}

.search-suggest__thumb {
	display: block;
	width: 48px;
	height: 48px;
	flex: 0 0 48px;
}

.search-suggest__thumb img {
	width: 48px;
	height: 48px;
	object-fit: cover;
	border-radius: 3px;
	display: block;
}

.search-suggest__title {
	font-size: 14px;
	line-height: 1.4;
	color: var(--text-primary);
	overflow: hidden;
	text-overflow: ellipsis;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
}

.search-suggest__price {
	font-size: 14px;
	font-weight: 500;
	white-space: nowrap;
	text-align: right;
	color: var(--text-primary);
}

/* WC price markup: dim the struck-through "was" price on sale items. */
.search-suggest__price del {
	display: block;
	font-size: 12px;
	font-weight: 400;
	color: var(--text-secondary);
	text-decoration: line-through;
}

.search-suggest__price ins {
	text-decoration: none;
}

.search-suggest__price .screen-reader-text {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.search-suggest__view-all {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 12px 16px;
	border-top: 1px solid var(--border-color);
	font-size: 13px;
	font-weight: 500;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: var(--text-primary);
	text-decoration: none;
	transition: color 0.15s ease, background-color 0.15s ease;
}

.search-suggest__view-all i {
	font-size: 12px;
	transition: transform 0.15s ease;
}

.search-suggest__view-all.is-active,
.search-suggest__view-all:hover {
	color: var(--gold-color);
	background-color: var(--border-color);
}

.search-suggest__view-all.is-active i,
.search-suggest__view-all:hover i {
	transform: translateX(3px);
}

.search-suggest__empty {
	margin: 0;
	padding: 18px 16px;
	font-size: 14px;
	color: var(--text-secondary);
	text-align: center;
}

/* Loading row — uses Bootstrap's .spinner-border (already loaded site-wide);
   currentColor inherits the gold so the ring matches the theme accent. */
.search-suggest__loading {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	padding: 18px 16px;
	color: var(--gold-color);
}

.search-suggest__loading .spinner-border {
	width: 18px;
	height: 18px;
	border-width: 2px;
}

.search-suggest__loading-text {
	font-size: 13px;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: var(--text-secondary);
}
