.dmtx-search-container {
	--dmtx-s-bg: #ffffff;
	--dmtx-s-border: #dcdcdc;
	--dmtx-s-text: #222222;
	--dmtx-s-muted: #888888;
	--dmtx-s-hover: #f4f6f8;
	--dmtx-s-active: #e8ecf0;
	--dmtx-s-accent: #4fb4e6;
	--dmtx-s-sale: #d32f2f;
	--dmtx-s-radius: 6px;
	--dmtx-s-shadow: 0 6px 30px rgba(0, 0, 0, 0.12);
	--dmtx-search-icon-right: 5px;
	--dmtx-search-icon-w: 30px;
	position: relative;
	width: 100%;
	font-family: Lexend, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
	font-size: 14px;
	line-height: 1.5;
	z-index: 999999;
	box-sizing: border-box;
}

.dmtx-search-container *,
.dmtx-search-container *::before,
.dmtx-search-container *::after {
	box-sizing: border-box;
}

.dmtx-search-form {
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: var(--dmtx-s-radius);
	background: transparent;
	box-shadow: none;
}

.dmtx-search-input-wrap {
	position: relative;
	display: flex;
	align-items: center;
	background: var(--dmtx-s-bg);
	background-clip: padding-box;
	border: none;
	border-radius: var(--dmtx-s-radius);
	overflow: hidden;
	clip-path: inset(0 round var(--dmtx-s-radius));
}

.dmtx-search-input {
	flex: 1 1 auto;
	width: 100%;
	min-width: 0;
	height: 42px;
	padding: 0 calc(var(--dmtx-search-icon-right) + var(--dmtx-search-icon-w) + 6px) 0 12px;
	margin: 0;
	border: none;
	border-radius: 0;
	outline: none;
	background: transparent;
	box-shadow: none;
	font-family: inherit;
	font-size: 14px;
	color: var(--dmtx-s-text);
	appearance: none;
	-webkit-appearance: none;
}

.dmtx-search-input:focus {
	outline: none;
	box-shadow: none;
}

.dmtx-search-input::placeholder {
	color: var(--dmtx-s-muted);
}

.dmtx-search-input::-webkit-search-cancel-button,
.dmtx-search-input::-webkit-search-decoration {
	-webkit-appearance: none;
}

.dmtx-search-submit {
	position: absolute;
	top: 50%;
	right: var(--dmtx-search-icon-right);
	width: var(--dmtx-search-icon-w);
	height: var(--dmtx-search-icon-w);
	box-sizing: border-box;
	transform: translateY(-50%);
	z-index: 2;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0;
	margin: 0;
	border: none;
	background: transparent;
	font-family: inherit;
	line-height: 0;
	color: var(--dmtx-s-accent);
	cursor: pointer;
	transition: color 0.15s, background 0.15s;
	border-radius: 4px;
}

.dmtx-search-submit svg {
	display: block;
	width: 18px;
	height: 18px;
	flex-shrink: 0;
}

.dmtx-search-submit:hover {
	background: rgba(79, 180, 230, 0.12);
	color: #3a9dd0;
}

.dmtx-search-submit:focus {
	outline: none;
}

.dmtx-search-submit:focus-visible {
	outline: 2px solid var(--dmtx-s-accent);
	outline-offset: 2px;
}

.dmtx-search-spinner {
	display: none;
	position: absolute;
	top: 50%;
	right: var(--dmtx-search-icon-right);
	width: var(--dmtx-search-icon-w);
	height: var(--dmtx-search-icon-w);
	box-sizing: border-box;
	transform: translateY(-50%);
	z-index: 2;
	flex-direction: row;
	align-items: center;
	justify-content: center;
	margin: 0;
	line-height: 0;
	color: var(--dmtx-s-accent);
}

.dmtx-search-spinner svg {
	display: block;
	width: 18px;
	height: 18px;
	flex-shrink: 0;
	animation: dmtx-spin 0.8s linear infinite;
}

@keyframes dmtx-spin {
	from { transform: rotate(0deg); }
	to { transform: rotate(360deg); }
}

.dmtx-search-dropdown {
	display: none;
	flex-direction: column;
	position: absolute;
	top: calc(100% + 4px);
	left: 0;
	right: 0;
	max-height: min(580px, 82vh);
	overflow: hidden;
	background: var(--dmtx-s-bg);
	border: 1px solid var(--dmtx-s-border);
	border-radius: 8px;
	box-shadow: var(--dmtx-s-shadow);
	z-index: 999999;
}

.dmtx-search-dropdown.is-open {
	display: flex;
}

.dmtx-search-results-scroll {
	flex: 1 1 auto;
	min-height: 0;
	overflow-y: auto;
	overflow-x: hidden;
	-webkit-overflow-scrolling: touch;
}

.dmtx-search-group {
	padding: 0;
}

.dmtx-search-group + .dmtx-search-group {
	border-top: 1px solid #eee;
}

.dmtx-search-group-title {
	padding: 8px 14px 4px;
	font-size: 11px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	color: var(--dmtx-s-muted);
	user-select: none;
}

.dmtx-search-item {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 8px 14px;
	text-decoration: none;
	color: var(--dmtx-s-text);
	transition: background 0.1s;
	cursor: pointer;
}

.dmtx-search-item:hover,
.dmtx-search-item.is-active {
	background: var(--dmtx-s-hover);
	text-decoration: none;
	color: var(--dmtx-s-text);
}

.dmtx-search-cat {
	padding: 7px 14px;
}

.dmtx-search-cat-icon {
	flex: 0 0 16px;
	color: var(--dmtx-s-muted);
}

.dmtx-search-cat-name {
	flex: 1;
	font-size: 13px;
	font-weight: 500;
}

.dmtx-search-thumb {
	flex: 0 0 50px;
	width: 50px;
	height: 50px;
	border-radius: 6px;
	object-fit: cover;
	background: #f5f5f5;
}

.dmtx-search-thumb-empty {
	display: flex;
	align-items: center;
	justify-content: center;
	background: #f5f5f5;
	color: #ccc;
}

.dmtx-search-product {
	min-width: 0;
}

.dmtx-search-product-info {
	flex: 1;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 2px;
}

.dmtx-search-product-name {
	font-size: 13px;
	font-weight: 500;
	line-height: 1.3;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	max-width: 100%;
	min-width: 0;
}

.dmtx-search-product-price {
	font-size: 13px;
	color: var(--dmtx-s-sale);
	font-weight: 600;
}

.dmtx-search-product-price del {
	color: var(--dmtx-s-muted);
	font-weight: 400;
	font-size: 12px;
	margin-right: 4px;
}

.dmtx-search-product-price ins {
	text-decoration: none;
	color: var(--dmtx-s-sale);
	font-weight: 600;
}

.dmtx-search-product-price .woocommerce-Price-amount {
	font-size: inherit;
}

.dmtx-search-viewall {
	display: block;
	flex-shrink: 0;
	padding: 11px 14px;
	text-align: center;
	font-size: 13px;
	font-weight: 500;
	color: var(--dmtx-s-accent);
	text-decoration: none;
	border-top: 1px solid #eee;
	background: var(--dmtx-s-bg);
	transition: background 0.1s;
	box-shadow: 0 -8px 16px -12px rgba(0, 0, 0, 0.12);
}

.dmtx-search-viewall:hover,
.dmtx-search-viewall.is-active {
	background: var(--dmtx-s-hover);
	color: var(--dmtx-s-accent);
	text-decoration: none;
}

.dmtx-search-empty {
	padding: 20px 14px;
	text-align: center;
	font-size: 13px;
	color: var(--dmtx-s-muted);
}

.dmtx-search-container mark {
	background: rgba(79, 180, 230, 0.15);
	color: inherit;
	padding: 0;
	border-radius: 2px;
}

.header-search .nav-dropdown,
.header-search-dropdown .nav-dropdown,
.header-search-dropdown ul.nav-dropdown {
	overflow: visible !important;
}

.nav-dropdown .dmtx-search-container,
.header-search-form .dmtx-search-container,
.header-search .dmtx-search-container {
	min-width: 280px;
}

.searchform-wrapper .dmtx-search-container,
.ux-search-box .dmtx-search-container {
	width: 100%;
}

.searchform-wrapper .dmtx-search-form,
.ux-search-box .dmtx-search-form,
.header-search-form .dmtx-search-form,
.header-search .dmtx-search-form,
.nav-dropdown .dmtx-search-form {
	max-width: 100%;
	border: 0;
	border-radius: var(--dmtx-s-radius);
	background: transparent;
	box-shadow: none;
}

.header-search-form .dmtx-search-dropdown,
.nav-dropdown .dmtx-search-dropdown {
	min-width: 360px;
}

.has-sticky #header.stuck .dmtx-search-dropdown {
	position: fixed;
	top: auto;
	left: auto;
	right: auto;
	min-width: 360px;
}

.mfp-content .dmtx-search-container {
	max-width: 600px;
	margin: 0 auto;
	--dmtx-search-icon-right: 8px;
	--dmtx-search-icon-w: 34px;
}

.mfp-content .dmtx-search-input {
	height: 52px;
	font-size: 18px;
	padding-right: calc(var(--dmtx-search-icon-right) + var(--dmtx-search-icon-w) + 8px);
}

.mfp-content .dmtx-search-submit svg,
.mfp-content .dmtx-search-spinner svg {
	width: 18px;
	height: 18px;
}

.mfp-content .dmtx-search-dropdown {
	max-height: min(560px, 78vh);
}

@media (max-width: 849px) {
	.dmtx-search-container {
		--dmtx-search-icon-right: 4px;
		--dmtx-search-icon-w: 28px;
	}

	.dmtx-search-input-wrap {
		border-radius: 4px;
	}

	.dmtx-search-input {
		height: 34px;
		font-size: 16px;
		padding-right: calc(var(--dmtx-search-icon-right) + var(--dmtx-search-icon-w) + 6px);
		padding-left: 8px;
	}

	.dmtx-search-submit svg,
	.dmtx-search-spinner svg {
		width: 17px;
		height: 17px;
	}

	.header-search-form .dmtx-search-container,
	.header-search .dmtx-search-container,
	.nav-dropdown .dmtx-search-container {
		min-width: 0;
	}

	.dmtx-search-dropdown {
		max-height: min(540px, 78vh);
		top: calc(100% + 8px);
	}

	.dmtx-search-thumb {
		flex: 0 0 44px;
		width: 44px;
		height: 44px;
	}

	.dmtx-search-product-name {
		font-size: 13px;
	}

	.dmtx-search-product-price {
		font-size: 12px;
	}
}

@media (max-width: 549px) {
	.dmtx-search-dropdown {
		position: fixed;
		top: auto;
		left: 8px;
		right: 8px;
		margin-top: 8px;
		max-height: min(520px, 74vh);
		border-radius: 12px;
	}
}
