/* Inter variable font — used by the HeyWilson widget */
@font-face {
	font-family: "Inter";
	src: url( "../font/Inter-VariableFont_opsz,wght.ttf" ) format( "truetype" );
	font-weight: 100 900;
	font-style: normal;
	font-display: swap;
}

@font-face {
	font-family: "Inter";
	src: url( "../font/Inter-Italic-VariableFont_opsz,wght.ttf" ) format( "truetype" );
	font-weight: 100 900;
	font-style: italic;
	font-display: swap;
}

/* HeyWilson search widget */

/* Scoped font-family reset so themes cannot bleed their font into the widget */
.hw-search-widget,
.hw-search-widget * {
	font-family: "Inter", sans-serif;
	box-sizing: border-box;
}

.hw-search-widget {
	width: 100%;
	position: relative;
}

.hw-search-form {
	display: flex;
	align-items: center;
	width: 100%;
	border: 1px solid #c3c4c7;
	border-radius: 10px;
	background: #fff;
	box-sizing: border-box;
	padding: 0 8px 0 16px;
	gap: 0;
	min-height: 46px;
	transition: border-color 0.15s;
}

.hw-search-form.is-focused {
	border-width: 1.5px;
	border-color: #1d2327;
}

/* Search icon — left of input */
.hw-search-form .hw-search-icon {
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	color: #8c8f94;
	margin-right: 8px;
	transition: color 0.15s;
}

.hw-search-form.is-focused .hw-search-icon {
	color: #1d2327;
}

.hw-search-form .hw-search-icon svg { display: block; }

.hw-input-wrap {
	flex: 1;
	min-width: 0;
}

.hw-search-widget .hw-input-wrap input[name="s"] {
	display: block;
	width: 100%;
	height: 44px;
	padding: 0 8px 0 4px;
	font-size: 15px;
	font-family: "Inter", sans-serif;
	font-weight: 400;
	letter-spacing: normal;
	border: none;
	outline: none;
	background: transparent;
	color: #1d2327;
	box-shadow: none;
	-webkit-appearance: none;
	appearance: none;
	box-sizing: border-box;
}

.hw-search-widget .hw-input-wrap input[name="s"]:focus {
	background: transparent;
	outline: none;
	box-shadow: none;
	border: none;
	color: #1d2327;
}

.hw-search-widget .hw-input-wrap input[name="s"]::placeholder {
	color: #8c8f94;
}

/* Clear button */
.hw-search-form .hw-clear-btn {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 24px;
	height: 24px;
	padding: 0;
	background: transparent;
	border: none;
	border-radius: 4px;
	cursor: pointer;
	color: #8c8f94;
	flex-shrink: 0;
	box-shadow: none;
	text-shadow: none;
}

.hw-search-form .hw-clear-btn:hover {
	color: #1d2327;
}

.hw-search-form .hw-clear-btn:focus,
.hw-search-form .hw-clear-btn:active {
	outline: none;
	box-shadow: none;
}

.hw-search-form .hw-clear-btn svg { display: block; }

/* Vertical separator between clear and sparkles — hidden until focused */
.hw-btn-separator {
	display: none;
	width: 1px;
	height: 20px;
	background: #e2e4e7;
	flex-shrink: 0;
	margin: 0 4px;
}

.hw-search-form.has-query .hw-btn-separator {
	display: block;
}

/* Sparkles submit button — hidden until focused */
.hw-search-form .hw-sparkles-btn {
	display: none;
	align-items: center;
	justify-content: center;
	width: 26px;
	height: 26px;
	padding: 0;
	background: transparent;
	border: none;
	border-radius: 6px;
	cursor: pointer;
	color: #1d2327;
	flex-shrink: 0;
	box-shadow: none;
	text-shadow: none;
}

.hw-search-form.has-query .hw-sparkles-btn {
	display: flex;
}

.hw-search-form .hw-sparkles-btn:hover,
.hw-search-form .hw-sparkles-btn:active {
	background: transparent;
	box-shadow: none;
}

.hw-search-form .hw-sparkles-btn:focus {
	outline: none;
	box-shadow: none;
}

.hw-search-form .hw-sparkles-btn svg { display: block; }

/* Input + dropdown as one connected unit when open */

.hw-search-widget.is-open .hw-search-form {
	border-bottom-left-radius: 0;
	border-bottom-right-radius: 0;
	border-bottom-width: 1px;
	border-bottom-color: #c3c4c7;
}

.hw-search-widget.is-open .hw-suggestions {
	margin-top: 0;
	border-top: none;
	border-top-left-radius: 0;
	border-top-right-radius: 0;
	border-color: #1d2327;
	box-shadow: none;
}

/* HeyWilson autocomplete dropdown */

.hw-search-widget .hw-suggestions {
	position: absolute;
	top: 100%;
	left: 0;
	width: 100%;
	z-index: 9999;
	margin: 4px 0 0;
	padding: 6px 0 0;
	list-style: none;
	background: #fff;
	border: 1.5px solid #e2e4e7;
	border-radius: 10px;
	box-shadow: 0 4px 16px rgba( 0, 0, 0, 0.1 );
	box-sizing: border-box;
	overflow: hidden;
}

.hw-search-widget .hw-suggestion-item {
	list-style: none;
	margin: 0;
	float: none;
}

/* Section label (PRODUCTS / CATEGORIES / BRANDS) */
.hw-search-widget .hw-suggestions-section {
	display: flex;
	align-items: center;
	justify-content: space-between;
	width: 100%;
	font-size: 10px;
	font-weight: 700;
	letter-spacing: .07em;
	text-transform: uppercase;
	color: #8c8f94;
	margin-top: 4px;
	padding: 8px 16px 4px;
	border-top: 1px solid #e2e4e7;
	box-sizing: border-box;
}

.hw-search-widget .hw-suggestions-section:first-child {
	margin-top: 0;
	border-top: none;
}

.hw-search-widget .hw-view-all {
	margin-left: auto;
	padding: 0;
	flex-shrink: 0;
	font-size: 11px;
	font-weight: 400;
	letter-spacing: 0;
	text-transform: none;
	color: #8c8f94;
}

/* Shared item row — inset with rounded hover */
.hw-search-widget .hw-suggestion-item {
	display: flex;
	align-items: center;
	gap: 10px;
	margin: 1px 8px;
	padding: 6px 8px;
	border-radius: 8px;
	font-size: 13px;
	color: #1d2327;
	cursor: pointer;
}

.hw-search-widget .hw-suggestion-item:hover,
.hw-search-widget .hw-suggestion-item.is-active {
	background: #f3f4f6;
}

/* Extra breathing room after the last item in each section */
.hw-search-widget .hw-suggestion-item:has(+ .hw-suggestions-section),
.hw-search-widget .hw-pre-footer {
	margin-bottom: 7px;
}

/* Product thumbnail */
.hw-suggestion-item img {
	width: 40px;
	height: 40px;
	object-fit: cover;
	border-radius: 6px;
	flex-shrink: 0;
	box-shadow: 0 1px 4px rgba( 0, 0, 0, 0.12 );
	display: block;
}

/* Placeholder thumbnail for products without an image */
.hw-suggestion-thumb {
	width: 40px;
	height: 40px;
	border-radius: 6px;
	background: rgba( 127, 84, 179, 0.12 );
	flex-shrink: 0;
}

/* Product item — name and price inline */
.hw-suggestion-item--product .hw-item-name {
	flex: 1;
	min-width: 0;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	font-weight: 500;
	color: #1d2327;
}

/* Price — always visible, never pushed off screen */
.hw-price {
	display: flex;
	align-items: baseline;
	gap: 5px;
	font-size: 13px;
	font-weight: 500;
	color: #1d2327;
	white-space: nowrap;
	flex-shrink: 0;
	margin-left: 8px;
}

.hw-price del {
	color: #8c8f94;
	text-decoration: line-through;
	font-weight: 400;
}

.hw-price ins {
	color: #c43e0a;
	text-decoration: none;
}

/* Chevron — reserved space, revealed on product hover/active */
.hw-item-chevron {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 16px;
	flex-shrink: 0;
	margin-left: 2px;
	color: #8c8f94;
	opacity: 0;
	transition: opacity 0.12s;
}

.hw-item-chevron svg { display: block; }


.hw-search-widget .hw-suggestion-item--product:hover .hw-item-chevron,
.hw-search-widget .hw-suggestion-item--product.is-active .hw-item-chevron {
	opacity: 1;
}

/* Query suggestions */
.hw-suggestion-icon {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 16px;
	height: 16px;
	flex-shrink: 0;
	color: #8c8f94;
}

.hw-suggestion-icon svg { display: block; }

.hw-suggestion-item--query .hw-item-name {
	flex: 1;
	font-weight: 400;
	color: #1d2327;
}

.hw-suggestion-arrow {
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	color: #c3c4c7;
}

.hw-suggestion-arrow svg { display: block; }

/* Category / brand text items */
.hw-item-info {
	display: flex;
	align-items: center;
	flex: 1;
	min-width: 0;
}

.hw-suggestion-item--text .hw-item-name {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	font-weight: 400;
	color: #1d2327;
}

/* Category parent dot + label */
.hw-item-dot {
	display: inline-flex;
	align-items: center;
	vertical-align: middle;
	margin: 0 3px;
	color: #a0a3a8;
}

.hw-item-dot svg { display: block; }

.hw-item-parent {
	color: #8c8f94;
	font-weight: 400;
}

/* Powered-by footer — single full row, ends apart */
.hw-search-widget .hw-suggestions-footer {
	display: flex;
	flex-wrap: nowrap;
	align-items: center;
	justify-content: space-between;
	width: 100%;
	padding: 8px 16px;
	margin-top: 0;
	font-size: 11px;
	color: #8c8f94;
	border-top: 1px solid #e2e4e7;
	background: #fafafa;
	gap: 8px;
	box-sizing: border-box;
}

.hw-search-widget .hw-footer-hint {
	display: flex;
	align-items: center;
	gap: 6px;
	color: #8c8f94;
	flex-shrink: 0;
	white-space: nowrap;
}

/* Keycap box around the enter icon */
.hw-search-widget .hw-footer-keycap {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 20px;
	height: 20px;
	border: 1px solid #e2e4e7;
	border-radius: 5px;
	background: #fff;
	color: #8c8f94;
	flex-shrink: 0;
}

.hw-search-widget .hw-footer-keycap svg { display: block; }

.hw-search-widget .hw-footer-brand {
	display: flex;
	align-items: center;
	gap: 5px;
	margin-left: auto;
	flex-shrink: 0;
	white-space: nowrap;
}

.hw-search-widget .hw-footer-brand-logo {
	display: block;
	height: 28px;
	width: auto;
	flex-shrink: 0;
}

.hw-suggestions-footer strong { font-weight: 600; }

.hw-search-widget .hw-suggestions-footer strong a {
	color: #5B4CF8;
	text-decoration: none;
}

.hw-search-widget .hw-suggestions-footer strong a:hover { text-decoration: underline; }
