.fwb-smart-search {
	display: block;
	max-width: 640px;
	position: relative;
}

.fwb-smart-search__controls {
	display: flex;
	gap: 0.5rem;
	align-items: stretch;
}

.fwb-smart-search__input {
	flex: 1;
	padding: 0.7rem 0.85rem;
	border: 1px solid #c8d0da;
	border-radius: 4px;
	color: #1f2937;
	min-width: 0;
}

.fwb-smart-search__input::placeholder {
	color: #6b7280;
	opacity: 1;
}

.fwb-smart-search__hint {
	margin: 0.45rem 0 0;
	font-size: 0.8rem;
	line-height: 1.35;
	color: rgba(255, 255, 255, 0.9);
}

.fwb-smart-search__results {
	margin-top: 8px;
	border: 1px solid #dde3ea;
	border-radius: 12px;
	background: #fff;
	overflow-y: auto;
	overflow-x: hidden;
	max-width: 100%;
	max-height: 60vh;
	box-shadow: 0 12px 40px rgba(3, 13, 33, 0.28);
	position: relative;
	z-index: 1000000;
	display: block;
}

.fwb-smart-search__result-item {
	display: flex;
	gap: 0.85rem;
	padding: 0.8rem;
	text-decoration: none;
	color: inherit;
	border-bottom: 1px solid #edf1f5;
	width: 100%;
	box-sizing: border-box;
}

.fwb-smart-search__result-item:last-of-type {
	border-bottom: 1px solid #edf1f5;
}

.fwb-smart-search__result-image {
	flex: 0 0 68px;
}

.fwb-smart-search__result-image img {
	width: 68px;
	height: 68px;
	object-fit: cover;
	border-radius: 4px;
}

.fwb-smart-search__result-content {
	min-width: 0;
}

.fwb-smart-search__result-title {
	font-weight: 700;
	font-size: 0.98rem;
	line-height: 1.35;
	color: #111827;
}

.fwb-smart-search__result-price {
	font-size: 0.9rem;
	margin-top: 0.2rem;
	color: #111827;
}

.fwb-smart-search__error,
.fwb-smart-search__empty {
	font-size: 0.86rem;
	padding: 0.75rem 0.8rem;
}

.fwb-smart-search__results-footer {
	display: flex;
	justify-content: space-between;
	gap: 0.75rem;
	padding: 0.75rem 0.8rem;
	font-size: 0.85rem;
	background: #f8fafc;
	flex-wrap: wrap;
}

.fwb-smart-search__results-all {
	color: #0f3d8f;
	text-decoration: none;
	font-weight: 600;
}

.fwb-smart-search__results-tip {
	color: #4b5563;
}

.fwb-smart-search.is-loading .fwb-smart-search__results {
	opacity: 0.6;
}

.fwb-smart-search-overlay {
	position: fixed;
	inset: 0;
	background: rgba(15, 61, 143, 0.94);
	z-index: 999999;
	display: none;
	opacity: 0;
	pointer-events: none;
	align-items: flex-start;
	justify-content: center;
	padding: 0;
	box-sizing: border-box;
}

.fwb-smart-search-overlay.is-open,
body.fwb-smart-search-overlay-open .fwb-smart-search-overlay {
	display: flex;
	opacity: 1;
	pointer-events: auto;
	z-index: 999999;
}

.fwb-smart-search-overlay__inner {
	width: min(900px, calc(100vw - 32px));
	margin: 10vh auto 0;
	padding: 0 1rem;
	position: relative;
	z-index: 1000000;
}

.fwb-smart-search-overlay__inner .fwb-smart-search {
	max-width: 100%;
	position: relative;
	z-index: 2;
}

.fwb-smart-search-overlay__close {
	position: absolute;
	top: -2.75rem;
	right: 1rem;
	background: rgba(255, 255, 255, 0.16);
	border: 1px solid rgba(255, 255, 255, 0.45);
	color: #fff;
	font-size: 2rem;
	line-height: 1;
	cursor: pointer;
	width: 2.25rem;
	height: 2.25rem;
	border-radius: 999px;
}

@media (max-width: 640px) {
	.fwb-smart-search-overlay__inner {
		width: 100%;
		margin-top: 5vh;
		padding: 0 0.75rem;
	}

	.fwb-smart-search__controls {
		flex-direction: column;
	}

	.fwb-smart-search__controls button {
		width: 100%;
	}

	.fwb-smart-search__results {
		max-height: 65vh;
	}

	.fwb-smart-search__result-item {
		padding: 0.75rem;
	}

	.fwb-smart-search__result-image {
		flex-basis: 56px;
	}

	.fwb-smart-search__result-image img {
		width: 56px;
		height: 56px;
	}
}

.fwb-smart-search-archive-notice {
	margin: 0 0 1.25rem;
	padding: 1rem 1.25rem;
	border: 1px solid #d9e3f2;
	border-left: 4px solid #2d6cdf;
	border-radius: 6px;
	background: #f5f8ff;
}

.fwb-smart-search-archive-notice__title {
	margin: 0;
	font-weight: 600;
	font-size: 1.05rem;
	line-height: 1.35;
}

.fwb-smart-search-archive-notice__meta {
	margin-top: 0.5rem;
	font-size: 0.95rem;
	line-height: 1.5;
	color: #2c2f36;
}

.fwb-smart-search-chip {
	display: inline-block;
	margin-top: 0.55rem;
	margin-right: 0.5rem;
	padding: 0.2rem 0.65rem;
	border: 1px solid #bfd1f3;
	border-radius: 999px;
	background: #ffffff;
	font-size: 0.85rem;
	line-height: 1.35;
}

.fwb-smart-search-archive-notice__clear {
	display: inline-block;
	margin-top: 0.75rem;
	font-size: 0.9rem;
	font-weight: 500;
}
