/* MAX Search — Frontend Widget Styles */

.max-search-widget {
	width: 100%;
}

.max-search-form {
	display: flex;
	align-items: stretch;
	position: relative;
	width: 100%;
}

/* ── Input wrap ─────────────────────────────────────── */

.max-search-input-wrap {
	position: relative;
	flex: 1 1 auto;
	display: flex;
	align-items: center;
}

.max-search-input {
	width: 100%;
	height: 48px;
	border: 1px solid #dddddd;
	border-right: none;
	border-radius: 30px 0 0 30px;
	background-color: #ffffff;
	color: #333333;
	font-size: 15px;
	padding: 0 20px;
	outline: none;
	box-sizing: border-box;
	-webkit-appearance: none;
	appearance: none;
	position: relative;
	z-index: 1;
}

.max-search-input:focus {
	border-color: #aaaaaa;
}

.max-search-input::-webkit-search-cancel-button {
	-webkit-appearance: none;
}

/* Ghost / type-ahead hint */
.max-search-ghost {
	position: absolute;
	left: 0;
	top: 0;
	height: 100%;
	display: flex;
	align-items: center;
	pointer-events: none;
	color: rgba(0, 0, 0, 0.3);
	font-size: 15px;
	padding: 0 20px;
	white-space: pre;
	z-index: 0;
	overflow: hidden;
}

/* ── Button ─────────────────────────────────────────── */

.max-search-button {
	flex: 0 0 auto;
	padding: 0 28px;
	border: none;
	border-radius: 0 30px 30px 0;
	background-color: #e63b2e;
	color: #ffffff;
	font-size: 15px;
	font-weight: 600;
	cursor: pointer;
	white-space: nowrap;
	transition: background-color 0.2s ease;
	box-sizing: border-box;
}

.max-search-button:hover {
	background-color: #c4281c;
}

.max-search-button:focus-visible {
	outline: 2px solid #e63b2e;
	outline-offset: 2px;
}

/* ── Dropdown ───────────────────────────────────────── */

.max-search-dropdown {
	position: absolute;
	top: calc(100% + 4px);
	left: 0;
	right: 0;
	background-color: #ffffff;
	border: 1px solid #dddddd;
	border-radius: 0 0 8px 8px;
	box-shadow: 0 4px 16px rgba(0, 0, 0, 0.10);
	z-index: 9999;
	overflow: hidden;
	list-style: none;
	margin: 0;
	padding: 4px 0;
}

.max-search-dropdown-item {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 10px 18px;
	cursor: pointer;
	color: #333333;
	font-size: 14px;
	transition: background-color 0.15s ease;
	text-decoration: none;
}

.max-search-dropdown-item:hover,
.max-search-dropdown-item.is-active {
	background-color: #f5f5f5;
}

.max-search-dropdown-name {
	flex: 1 1 auto;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.max-search-dropdown-name mark {
	background: none;
	color: inherit;
	font-weight: 700;
}

.max-search-sku-badge {
	flex: 0 0 auto;
	margin-left: 10px;
	padding: 2px 8px;
	border-radius: 20px;
	background-color: #f0f0f0;
	color: #888888;
	font-size: 11px;
	font-weight: 500;
	letter-spacing: 0.03em;
	white-space: nowrap;
}

/* ── Responsive ─────────────────────────────────────── */

@media (max-width: 600px) {
	.max-search-form {
		flex-direction: column;
	}

	.max-search-input-wrap {
		width: 100%;
	}

	.max-search-input {
		border-right: 1px solid #dddddd;
		border-bottom: 1px solid #dddddd;
		border-radius: 50px !important;
		font-size: 14px;
	}

	.max-search-button {
		width: 100%;
		border-radius: 50px !important;
		padding: 14px 16px;
		font-size: 14px;
	}
}
