:root {
	--awse-primary: #14204F;
	--awse-accent: #D7A84B;
}

.awse-search-widget,
.awse-search-widget * {
	box-sizing: border-box !important;
}

.awse-search-widget {
	--awse-primary: #14204F;
	--awse-accent: #D7A84B;
	position: relative !important;
	width: 100% !important;
	font-family: inherit !important;
	z-index: 50;
	margin: 0 !important;
	padding: 0 !important;
}

/* Main Search Bar Container */
.awse-search-widget .awse-search-bar {
	display: flex !important;
	flex-direction: row !important;
	flex-wrap: nowrap !important;
	align-items: stretch !important;
	justify-content: space-between !important;
	width: 100% !important;
	min-height: 48px !important;
	height: 48px !important;
	background: #ffffff !important;
	border: 1px solid #d9dde5 !important;
	border-radius: 6px;
	box-shadow: 0 2px 8px rgba(20, 32, 79, 0.05);
	position: relative !important;
	overflow: visible !important;
	margin: 0 !important;
	padding: 0 !important;
}

/* Category Wrap (Left side) */
.awse-search-widget .awse-category-wrap {
	position: relative !important;
	flex: 0 0 auto !important;
	display: flex !important;
	align-items: center !important;
	height: 100% !important;
	border-right: 1px solid #e4e7ec !important;
	margin: 0 !important;
	padding: 0 !important;
	background: transparent !important;
}

/* Category Toggle Button (Left side toggle) */
.awse-search-widget .awse-category-toggle {
	display: inline-flex !important;
	align-items: center !important;
	justify-content: space-between !important;
	gap: 10px !important;
	height: 100% !important;
	min-height: 100% !important;
	min-width: 140px !important;
	padding: 0 14px !important;
	border: 0 !important;
	border-radius: 6px 0 0 6px !important;
	background: transparent !important;
	color: var(--awse-primary, #14204F) !important;
	font-size: 13px !important;
	font-weight: 600 !important;
	line-height: 1.2 !important;
	text-transform: none !important;
	letter-spacing: normal !important;
	cursor: pointer !important;
	outline: none !important;
	box-shadow: none !important;
	margin: 0 !important;
	white-space: nowrap !important;
	transition: background 0.15s ease !important;
}

.awse-search-widget .awse-category-toggle:hover {
	background: rgba(0, 0, 0, 0.02) !important;
}

.awse-search-widget .awse-category-label {
	max-width: 160px;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.awse-search-widget .awse-chevron-icon {
	flex: 0 0 14px;
	width: 14px;
	height: 14px;
	transition: transform 0.2s ease;
	stroke: currentColor;
}

.awse-search-widget .awse-category-toggle[aria-expanded="true"] .awse-chevron-icon {
	transform: rotate(180deg);
}

/* Category Dropdown Menu - HIDDEN by default under category toggle */
.awse-search-widget .awse-category-menu {
	display: none !important;
	position: absolute !important;
	top: calc(100% + 6px) !important;
	left: 0 !important;
	min-width: 220px !important;
	max-width: 320px !important;
	max-height: 280px !important;
	overflow-y: auto !important;
	padding: 6px !important;
	background: #ffffff !important;
	border: 1px solid #e4e7ec !important;
	border-radius: 8px !important;
	box-shadow: 0 12px 35px rgba(18, 28, 56, 0.15) !important;
	z-index: 999999 !important;
	flex-direction: column !important;
	margin: 0 !important;
}

.awse-search-widget .awse-category-menu.is-open {
	display: flex !important;
}

/* Category Menu Items (Options) - Strict reset to defeat theme button pill styles */
.awse-search-widget .awse-category-option {
	display: flex !important;
	align-items: center !important;
	width: 100% !important;
	min-width: 100% !important;
	padding: 9px 12px !important;
	margin: 0 0 2px 0 !important;
	border: 0 !important;
	border-radius: 5px !important;
	background: transparent !important;
	color: #333b4f !important;
	font-size: 13px !important;
	font-weight: 500 !important;
	line-height: 1.4 !important;
	text-align: left !important;
	text-transform: none !important;
	letter-spacing: normal !important;
	cursor: pointer !important;
	box-shadow: none !important;
	outline: none !important;
	transition: background 0.15s ease, color 0.15s ease !important;
	white-space: normal !important;
	word-break: break-word !important;
}

.awse-search-widget .awse-category-option:last-child {
	margin-bottom: 0 !important;
}

.awse-search-widget .awse-category-option:hover,
.awse-search-widget .awse-category-option.is-active {
	background: #f0f4f9 !important;
	color: var(--awse-primary, #14204F) !important;
	font-weight: 600 !important;
}

/* Input Wrap (Middle to Right) */
.awse-search-widget .awse-input-wrap {
	display: flex !important;
	flex: 1 1 auto !important;
	flex-direction: row !important;
	flex-wrap: nowrap !important;
	align-items: stretch !important;
	height: 100% !important;
	min-width: 0 !important;
	margin: 0 !important;
	padding: 0 !important;
	background: transparent !important;
}

/* Search Input Field */
.awse-search-widget .awse-search-input {
	display: block !important;
	flex: 1 1 auto !important;
	width: 100% !important;
	min-width: 0 !important;
	height: 100% !important;
	min-height: 100% !important;
	border: 0 !important;
	outline: none !important;
	box-shadow: none !important;
	padding: 0 16px !important;
	font-size: 14px !important;
	font-weight: 400 !important;
	color: #252b39 !important;
	background: transparent !important;
	margin: 0 !important;
	border-radius: 0 !important;
	line-height: normal !important;
	-webkit-appearance: none !important;
	appearance: none !important;
}

.awse-search-widget .awse-search-input::-webkit-search-decoration,
.awse-search-widget .awse-search-input::-webkit-search-cancel-button,
.awse-search-widget .awse-search-input::-webkit-search-results-button,
.awse-search-widget .awse-search-input::-webkit-search-results-decoration {
	display: none !important;
}

.awse-search-widget .awse-search-input::placeholder {
	color: var(--awse-placeholder, #9aa1ad) !important;
	opacity: 1 !important;
}

/* Search Button (Far Right of Search Field) */
.awse-search-widget .awse-search-button {
	display: inline-flex !important;
	flex: 0 0 52px !important;
	align-items: center !important;
	justify-content: center !important;
	width: 52px !important;
	min-width: 52px !important;
	height: 100% !important;
	min-height: 100% !important;
	border: 0 !important;
	border-radius: 0 5px 5px 0 !important;
	background: var(--awse-primary, #14204F) !important;
	color: #ffffff !important;
	cursor: pointer !important;
	margin: 0 !important;
	padding: 0 !important;
	outline: none !important;
	box-shadow: none !important;
	transition: background 0.2s ease, opacity 0.2s ease !important;
}

.awse-search-widget .awse-search-button:hover {
	opacity: 0.92 !important;
}

.awse-search-widget .awse-search-icon {
	width: 18px !important;
	height: 18px !important;
	stroke: currentColor !important;
	pointer-events: none !important;
}

/* Clear Button - hidden by default, shown while writing */
.awse-search-widget .awse-clear-button {
	display: none !important;
	align-items: center !important;
	justify-content: center !important;
	padding: 0 10px !important;
	background: transparent !important;
	border: 0 !important;
	color: #9aa1ad !important;
	cursor: pointer !important;
	outline: none !important;
	transition: color 0.15s ease !important;
}

.awse-search-widget .awse-clear-button.is-visible {
	display: inline-flex !important;
}

.awse-search-widget .awse-clear-button:hover {
	color: #252b39 !important;
}

/* Popup Live Results Container */
.awse-search-widget .awse-popup {
	position: absolute !important;
	top: calc(100% + 8px) !important;
	left: 0 !important;
	width: 100% !important;
	min-width: 300px !important;
	background: #ffffff !important;
	border: 1px solid #e2e5eb !important;
	border-radius: 8px !important;
	box-shadow: 0 18px 45px rgba(14, 23, 45, 0.15) !important;
	overflow: hidden !important;
	z-index: 999990 !important;
	margin: 0 !important;
	transition: opacity 0.18s ease-out, transform 0.18s ease-out !important;
}

.awse-search-widget .awse-popup[hidden] {
	display: none !important;
}

/* Guarantee Mutual Exclusivity: When category menu is open, FORCE HIDE search popup */
.awse-search-widget.cat-menu-active .awse-popup,
.awse-search-widget:has(.awse-category-menu.is-open) .awse-popup {
	display: none !important;
	visibility: hidden !important;
	opacity: 0 !important;
	pointer-events: none !important;
}

.awse-search-widget .awse-popup-inner {
	max-height: min(620px, 72vh) !important;
	overflow-y: auto !important;
	padding: 24px 26px 20px !important;
}

.awse-search-widget .awse-popup-section + .awse-popup-section {
	margin-top: 22px !important;
}

.awse-search-widget .awse-popup-section h3 {
	margin: 0 0 12px 0 !important;
	color: #252a34 !important;
	font-size: 16px !important;
	line-height: 1.3 !important;
	font-weight: 700 !important;
}

.awse-search-widget .awse-chip-list {
	display: flex !important;
	flex-wrap: wrap !important;
	gap: 9px !important;
}

.awse-search-widget .awse-chip {
	display: inline-flex !important;
	align-items: center !important;
	border: 1px solid #e0e4ea !important;
	background: #f7f8fa !important;
	color: #4c5260 !important;
	padding: 8px 14px !important;
	border-radius: 22px !important;
	font-size: 13px !important;
	font-weight: 500 !important;
	cursor: pointer !important;
	line-height: 1.2 !important;
	transition: all 0.18s ease !important;
	outline: none !important;
	box-shadow: none !important;
	margin: 0 !important;
}

.awse-search-widget .awse-chip:hover {
	border-color: var(--awse-primary, #14204F) !important;
	color: var(--awse-primary, #14204F) !important;
	transform: translateY(-1px);
}

.awse-search-widget .awse-search-chip {
	background: #f1f4f9 !important;
	border-color: transparent !important;
	color: #2c3345 !important;
}

.awse-search-widget .awse-search-chip:hover {
	background: #e5ebf5 !important;
	border-color: var(--awse-primary, #14204F) !important;
	color: var(--awse-primary, #14204F) !important;
}

.awse-search-widget .awse-category-chip {
	background: #ffffff !important;
	border-color: #e2e7ed !important;
	color: #2c3345 !important;
}

.awse-search-widget .awse-category-chip:hover {
	background: #f7f9fc !important;
	border-color: var(--awse-primary, #14204F) !important;
	color: var(--awse-primary, #14204F) !important;
}

.awse-search-widget .awse-live-results {
	margin-top: 18px !important;
}

.awse-search-widget .awse-message {
	padding: 16px !important;
	border-radius: 7px !important;
	background: #f6f7f9 !important;
	color: #6d7380 !important;
	font-size: 13px !important;
	text-align: center !important;
	margin: 0 !important;
}

/* Product Result Items */
.awse-search-widget .awse-product-result {
	display: flex !important;
	align-items: center !important;
	gap: 13px !important;
	padding: 11px 8px !important;
	border-top: 1px solid #eef0f3 !important;
	text-decoration: none !important;
	color: inherit !important;
	transition: background 0.15s ease !important;
	border-radius: 6px !important;
}

.awse-search-widget .awse-product-result:first-child {
	border-top: 0 !important;
}

.awse-search-widget .awse-product-result:hover {
	background: #fafbfc !important;
}

.awse-search-widget .awse-product-thumb {
	width: 52px !important;
	height: 52px !important;
	flex: 0 0 52px !important;
	display: flex !important;
	align-items: center !important;
	justify-content: center !important;
	border: 1px solid #edf0f3 !important;
	border-radius: 6px !important;
	overflow: hidden !important;
	background: #ffffff !important;
}

.awse-search-widget .awse-product-image {
	width: 100% !important;
	height: 100% !important;
	object-fit: contain !important;
}

.awse-search-widget .awse-product-placeholder {
	width: 26px !important;
	height: 26px !important;
	border-radius: 4px !important;
	background: #f0f2f5 !important;
}

.awse-search-widget .awse-product-info {
	flex: 1 1 auto !important;
	display: flex !important;
	flex-direction: column !important;
	gap: 3px !important;
	min-width: 0 !important;
}

.awse-search-widget .awse-product-title {
	color: var(--awse-primary, #14204F) !important;
	font-size: 13px !important;
	line-height: 1.35 !important;
	font-weight: 600 !important;
	display: block !important;
}

.awse-search-widget .awse-product-price {
	color: var(--awse-accent, #D7A84B) !important;
	font-size: 12px !important;
	font-weight: 700 !important;
	display: block !important;
}

.awse-search-widget .awse-product-price del {
	color: #9aa1ad !important;
	font-weight: 400 !important;
	margin-right: 4px !important;
}

.awse-search-widget .awse-product-price ins {
	text-decoration: none !important;
}

.awse-search-widget .awse-product-sku {
	color: #8a909b !important;
	font-size: 11px !important;
	display: block !important;
}

.awse-search-widget .awse-product-arrow {
	color: var(--awse-primary, #14204F) !important;
	font-size: 18px !important;
	line-height: 1 !important;
	flex: 0 0 auto !important;
}

/* Mobile Responsive */
@media (max-width: 767px) {
	.awse-search-widget .awse-search-bar {
		min-height: 44px !important;
	}

	/* Category wrap is HIDDEN by default on mobile until user clicks/selects search field */
	.awse-search-widget .awse-category-wrap {
		display: none !important;
	}

	/* Category wrap APPEARS on mobile when search field is focused/active/popup-active */
	.awse-search-widget.is-focused .awse-category-wrap,
	.awse-search-widget.popup-active .awse-category-wrap,
	.awse-search-widget.awse-active .awse-category-wrap,
	.awse-search-widget.cat-menu-active .awse-category-wrap,
	.awse-search-widget:focus-within .awse-category-wrap {
		display: flex !important;
		flex: 0 0 auto !important;
		border-right: 1px solid #e4e7ec !important;
	}

	.awse-search-widget .awse-category-toggle {
		height: 100% !important;
		min-height: 44px !important;
		min-width: auto !important;
		max-width: 115px !important;
		padding: 0 8px !important;
		gap: 4px !important;
		font-size: 12px !important;
	}

	.awse-search-widget .awse-category-label {
		max-width: 72px !important;
		font-size: 12px !important;
	}

	.awse-search-widget .awse-category-menu {
		min-width: 200px !important;
		max-width: 280px !important;
		top: calc(100% + 6px) !important;
		left: 0 !important;
		z-index: 9999999 !important;
	}

	.awse-search-widget .awse-search-input {
		height: 44px !important;
		min-height: 44px !important;
		font-size: 13px !important;
		padding: 0 10px !important;
	}

	.awse-search-widget .awse-search-button {
		width: 44px !important;
		min-width: 44px !important;
		flex-basis: 44px !important;
	}

	.awse-search-widget .awse-popup-inner {
		padding: 18px 16px 16px !important;
		max-height: 75vh !important;
	}

	.awse-search-widget .awse-popup {
		top: calc(100% + 6px) !important;
		box-shadow: 0 12px 35px rgba(18, 28, 56, 0.15) !important;
		border-radius: 8px !important;
	}

	.awse-search-widget .awse-chip {
		padding: 7px 13px !important;
		font-size: 12px !important;
	}
}
