.dedanix-ew-product-search {
	--dedanix-ew-primary: #6c63ff;
	--dedanix-ew-accent: #00c896;
	--dedanix-ew-text: #1a1a2e;
	--dedanix-ew-muted: #6b7280;
	--dedanix-ew-border: #e5e7eb;
	--dedanix-ew-surface: #ffffff;
	position: relative;
	z-index: 20;
	color: var(--dedanix-ew-text);
}

.dedanix-ew-product-search *,
.dedanix-ew-product-search *::before,
.dedanix-ew-product-search *::after {
	box-sizing: border-box;
}

.dedanix-ew-search-shell {
	display: flex;
	align-items: center;
	gap: 10px;
	width: 100%;
	min-height: 48px;
	padding: 0 14px;
	background: #fff;
	border: 1px solid var(--dedanix-ew-border);
	border-radius: 8px;
	box-shadow: 0 10px 28px rgba(26, 26, 46, 0.06);
	transition: border-color 140ms ease, box-shadow 140ms ease;
}

.dedanix-ew-product-search:focus-within .dedanix-ew-search-shell {
	border-color: color-mix(in srgb, var(--dedanix-ew-primary) 42%, var(--dedanix-ew-border));
	box-shadow: 0 12px 34px rgba(26, 26, 46, 0.1);
}

.dedanix-ew-search-icon {
	width: 18px;
	height: 18px;
	border: 2px solid currentColor;
	border-radius: 50%;
	color: var(--dedanix-ew-text);
	position: relative;
	flex: 0 0 auto;
}

.dedanix-ew-search-icon::after {
	content: "";
	width: 8px;
	height: 2px;
	background: currentColor;
	position: absolute;
	right: -6px;
	bottom: -3px;
	transform: rotate(45deg);
	border-radius: 999px;
}

.dedanix-ew-product-search .dedanix-ew-search-input,
.dedanix-ew-product-search .dedanix-ew-search-input[type="search"] {
	-webkit-appearance: none;
	appearance: none;
	width: 100%;
	border: 0 solid transparent;
	border-radius: 0;
	outline: 0;
	background: transparent;
	box-shadow: none;
	color: var(--dedanix-ew-text);
	font-size: 16px;
	line-height: 1.4;
	min-width: 0;
	padding: 0;
}

.dedanix-ew-product-search .dedanix-ew-search-input:focus,
.dedanix-ew-product-search .dedanix-ew-search-input[type="search"]:focus {
	outline: 0;
	box-shadow: none;
}

.dedanix-ew-close {
	display: none;
	width: 34px;
	height: 34px;
	border: 0;
	background: transparent;
	color: #70727a;
	position: relative;
	cursor: pointer;
	flex: 0 0 auto;
}

.dedanix-ew-close::before,
.dedanix-ew-close::after {
	content: "";
	position: absolute;
	top: 16px;
	left: 8px;
	width: 18px;
	height: 2px;
	background: currentColor;
	border-radius: 999px;
}

.dedanix-ew-close::before {
	transform: rotate(45deg);
}

.dedanix-ew-close::after {
	transform: rotate(-45deg);
}

.dedanix-ew-product-search.is-open .dedanix-ew-close {
	display: block;
}

.dedanix-ew-results {
	display: none;
}

.dedanix-ew-product-search.is-open .dedanix-ew-results {
	display: block;
	position: absolute;
	top: calc(100% + 10px);
	left: 0;
	right: 0;
	background: var(--dedanix-ew-surface);
	border: 1px solid var(--dedanix-ew-border);
	border-radius: 8px;
	box-shadow: 0 20px 50px rgba(26, 26, 46, 0.14);
	overflow: hidden;
}

.dedanix-ew-results-head {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	align-items: center;
	gap: 16px;
	padding: 14px 18px;
	border-bottom: 1px solid var(--dedanix-ew-border);
	font-size: 14px;
}

.dedanix-ew-results-head strong {
	display: block;
	min-width: 0;
	line-height: 1.25;
	overflow-wrap: anywhere;
}

.dedanix-ew-sort {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	min-width: 0;
	color: var(--dedanix-ew-muted);
	font-size: 13px;
}

.dedanix-ew-sort span {
	flex: 0 0 auto;
	white-space: nowrap;
	line-height: 1.2;
}

.dedanix-ew-sort select {
	flex: 0 1 180px;
	width: 180px;
	max-width: 100%;
	min-height: 34px;
	border: 1px solid var(--dedanix-ew-border);
	border-radius: 6px;
	background: #fff;
	color: var(--dedanix-ew-text);
	font-size: 13px;
}

.dedanix-ew-suggestions {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	padding: 12px 18px;
	border-bottom: 1px solid var(--dedanix-ew-border);
}

.dedanix-ew-suggestions button {
	min-height: 32px;
	padding: 0 12px;
	border: 1px solid var(--dedanix-ew-border);
	border-radius: 999px;
	background: #fff;
	color: var(--dedanix-ew-text);
	cursor: pointer;
	font-size: 13px;
}

.dedanix-ew-suggestions button:hover,
.dedanix-ew-suggestions button:focus {
	border-color: var(--dedanix-ew-primary);
	color: var(--dedanix-ew-primary);
}

.dedanix-ew-product-list {
	max-height: 520px;
	overflow: auto;
	scrollbar-width: thin;
	scrollbar-color: color-mix(in srgb, var(--dedanix-ew-primary) 38%, #c7cbd1) transparent;
}

.dedanix-ew-product {
	display: flex;
	gap: 12px;
	align-items: center;
	position: relative;
	padding: 14px 18px;
	text-decoration: none;
	color: inherit;
	border-bottom: 1px solid #f1f3f5;
	transition: background 140ms ease, transform 140ms ease;
	outline: 0;
}

.dedanix-ew-product:hover,
.dedanix-ew-product:focus {
	background: #f8f8ff;
	transform: translateY(-1px);
}

.dedanix-ew-product:focus-visible {
	box-shadow: inset 3px 0 0 var(--dedanix-ew-primary);
}

.dedanix-ew-product-image {
	width: 58px;
	height: 58px;
	flex: 0 0 58px;
	background: #f5f5f5;
	border-radius: 8px;
	overflow: hidden;
	position: relative;
	isolation: isolate;
}

.dedanix-ew-product-image::before {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(110deg, #f4f5f7 8%, #ffffff 18%, #f4f5f7 33%);
	background-size: 200% 100%;
	animation: dedanix-ew-shimmer 1.1s linear infinite;
	opacity: 1;
	transition: opacity 160ms ease;
	z-index: -1;
}

.dedanix-ew-product-image.is-loaded::before,
.dedanix-ew-product-image.is-missing::before {
	opacity: 0;
	animation: none;
}

.dedanix-ew-product-image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	opacity: 0;
	transition: opacity 160ms ease;
}

.dedanix-ew-product-image.is-loaded img {
	opacity: 1;
}

.dedanix-ew-product-image.is-missing img {
	display: none;
}

.dedanix-ew-stock-badge {
	position: absolute;
	top: 10px;
	left: 10px;
	z-index: 2;
	display: inline-flex;
	align-items: center;
	max-width: calc(100% - 20px);
	min-height: 24px;
	padding: 3px 9px;
	border-radius: 999px;
	background: #111827;
	color: #fff;
	font-size: 11px;
	font-weight: 800;
	line-height: 1.1;
	letter-spacing: 0;
	box-shadow: 0 8px 18px rgba(17, 24, 39, 0.18);
}

.dedanix-ew-product-info {
	display: grid;
	gap: 4px;
	min-width: 0;
}

.dedanix-ew-product-title {
	font-weight: 700;
	color: var(--dedanix-ew-text);
	line-height: 1.25;
	overflow-wrap: anywhere;
}

.dedanix-ew-product-meta {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	align-items: center;
	color: var(--dedanix-ew-muted);
	font-size: 12px;
}

.dedanix-ew-sku {
	display: inline-flex;
	align-items: center;
	max-width: 100%;
	border: 0 solid transparent;
	border-radius: 0;
	background: transparent;
	color: currentColor;
	font-size: inherit;
	font-weight: inherit;
	line-height: 1.2;
	overflow-wrap: anywhere;
	padding: 0;
}

.dedanix-ew-price {
	color: var(--dedanix-ew-text);
	font-weight: 700;
	font-size: 14px;
}

.dedanix-ew-pagination {
	display: flex;
	align-items: center;
	gap: 8px;
	justify-content: flex-end;
	padding: 12px 18px;
	border-top: 1px solid #f1f3f5;
}

.dedanix-ew-pagination > span {
	color: var(--dedanix-ew-text);
	font-size: 13px;
	line-height: 1.2;
}

.dedanix-ew-pagination button {
	min-width: 32px;
	height: 32px;
	border: 1px solid var(--dedanix-ew-border);
	background: #fff;
	color: var(--dedanix-ew-text);
	border-radius: 6px;
	cursor: pointer;
	transition: background-color 140ms ease, border-color 140ms ease, color 140ms ease;
}

.dedanix-ew-pagination button:hover,
.dedanix-ew-pagination button:focus {
	border-color: var(--dedanix-ew-primary);
	color: var(--dedanix-ew-primary);
}

.dedanix-ew-pagination button.is-active {
	background: var(--dedanix-ew-primary);
	border-color: var(--dedanix-ew-primary);
	color: #fff;
}

.dedanix-ew-state {
	display: grid;
	justify-items: center;
	gap: 8px;
	margin: 0;
	padding: 28px 18px;
	color: var(--dedanix-ew-muted);
	text-align: center;
}

.dedanix-ew-state strong {
	max-width: 520px;
	color: var(--dedanix-ew-text);
	font-size: 15px;
	line-height: 1.35;
}

.dedanix-ew-state > span:last-child {
	max-width: 560px;
	font-size: 13px;
	line-height: 1.45;
}

.dedanix-ew-state-icon {
	position: relative;
	display: inline-grid;
	place-items: center;
	width: 38px;
	height: 38px;
	border-radius: 999px;
	background: #f4f5ff;
	color: var(--dedanix-ew-primary);
}

.dedanix-ew-state-icon::before,
.dedanix-ew-state-icon::after {
	content: "";
	position: absolute;
	border-radius: 999px;
}

.dedanix-ew-state-icon::before {
	width: 15px;
	height: 15px;
	border: 2px solid currentColor;
}

.dedanix-ew-state-icon::after {
	width: 8px;
	height: 2px;
	background: currentColor;
	transform: translate(9px, 8px) rotate(45deg);
}

.dedanix-ew-state-icon-loading::before {
	border-right-color: transparent;
	animation: dedanix-ew-spin 0.8s linear infinite;
}

.dedanix-ew-state-icon-refine::before {
	width: 18px;
	height: 10px;
	border: 0;
	border-top: 2px solid currentColor;
	border-bottom: 2px solid currentColor;
}

.dedanix-ew-state-icon-refine::after {
	width: 12px;
	transform: translate(0, 0);
}

.dedanix-ew-state-icon-timeout {
	background: #fff7ed;
	color: #c2410c;
}

.dedanix-ew-state-icon-timeout::before {
	width: 18px;
	height: 18px;
}

.dedanix-ew-state-icon-timeout::after {
	width: 2px;
	height: 10px;
	transform: translate(0, -1px);
}

.dedanix-ew-product-search.is-full .dedanix-ew-results {
	position: fixed;
	inset: 0;
	z-index: 999999;
	top: 0;
	left: 0;
	right: 0;
	border: 0;
	border-radius: 0;
	box-shadow: none;
	padding: 112px 40px 34px;
	overflow: auto;
	background: #fff;
}

.dedanix-ew-product-search.is-full .dedanix-ew-search-shell {
	position: fixed;
	z-index: 1000000;
	top: 22px;
	left: 40px;
	right: 40px;
	width: auto;
	box-shadow: none;
	border-width: 0 0 1px;
	border-radius: 0;
}

.dedanix-ew-full-body {
	display: grid;
	grid-template-columns: minmax(190px, 280px) 1fr;
	gap: 28px;
	align-items: start;
}

.dedanix-ew-full-body.has-no-filters {
	grid-template-columns: 1fr;
}

.dedanix-ew-filter-panel {
	position: sticky;
	top: 110px;
	align-self: start;
	display: grid;
	gap: 18px;
	max-height: calc(100vh - 140px);
	overflow: auto;
	padding: 0 4px 0 0;
	border: 1px solid transparent;
	background: transparent;
}

.dedanix-ew-filter-panel h3 {
	margin: 0 0 8px;
	font-size: 18px;
}

.dedanix-ew-filter-group {
	display: grid;
	gap: 10px;
	padding-bottom: 14px;
	border-bottom: 1px solid var(--dedanix-ew-border);
}

.dedanix-ew-filter-group:last-child {
	border-bottom: 0;
	padding-bottom: 0;
}

.dedanix-ew-filter-toggle {
	display: flex;
	align-items: center;
	justify-content: space-between;
	width: 100%;
	min-height: 28px;
	padding: 0;
	border: 1px solid transparent;
	border-radius: 0;
	background: transparent;
	color: var(--dedanix-ew-text);
	cursor: pointer;
	font-size: 14px;
	font-weight: 800;
	line-height: 1.25;
	text-align: left;
}

.dedanix-ew-filter-toggle::after {
	content: "";
	width: 8px;
	height: 8px;
	margin-left: 12px;
	border-right: 2px solid currentColor;
	border-bottom: 2px solid currentColor;
	transform: rotate(45deg) translateY(-2px);
	transition: transform 0.18s ease;
	flex: 0 0 auto;
}

.dedanix-ew-filter-group.is-open .dedanix-ew-filter-toggle::after {
	transform: rotate(225deg) translateY(-2px);
}

.dedanix-ew-filter-options {
	display: grid;
	gap: 10px;
}

.dedanix-ew-filter-group.is-closed .dedanix-ew-filter-options {
	display: none;
}

.dedanix-ew-filter-panel label {
	display: grid;
	grid-template-columns: 18px 1fr auto;
	gap: 10px;
	align-items: center;
	font-size: 14px;
}

.dedanix-ew-filter-panel .dedanix-ew-cat-option {
	padding-left: calc(var(--dedanix-ew-cat-depth, 0) * 16px);
}

.dedanix-ew-filter-panel .dedanix-ew-cat-option span {
	min-width: 0;
}

.dedanix-ew-filter-panel em {
	color: var(--dedanix-ew-muted);
	font-style: normal;
}

.dedanix-ew-price-filter {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 10px;
}

.dedanix-ew-price-filter label {
	display: grid;
	grid-template-columns: 1fr;
	gap: 5px;
	font-size: 12px;
}

.dedanix-ew-price-filter input {
	width: 100%;
	min-width: 0;
	border: 1px solid var(--dedanix-ew-border);
	border-radius: 6px;
	padding: 8px 9px;
	background: #fff;
	color: var(--dedanix-ew-text);
	font-size: 13px;
}

.dedanix-ew-price-filter button {
	grid-column: 1 / -1;
	border: 1px solid var(--dedanix-ew-border);
	border-radius: 6px;
	padding: 7px 10px;
	background: #fff;
	color: var(--dedanix-ew-muted);
	cursor: pointer;
	font-size: 13px;
}

.dedanix-ew-price-filter button:disabled {
	cursor: not-allowed;
	opacity: 0.45;
}

.dedanix-ew-product-search.is-full .dedanix-ew-product-list {
	max-height: none;
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
	gap: 22px;
	overflow: visible;
}

.dedanix-ew-product-search.is-full .dedanix-ew-product {
	display: grid;
	align-content: start;
	border: 1px solid transparent;
	border-radius: 0;
	padding: 0;
	gap: 10px;
	min-width: 0;
	background: transparent;
}

.dedanix-ew-product-search.is-full .dedanix-ew-product-image {
	width: 100%;
	height: auto;
	aspect-ratio: 1 / 1;
}

@keyframes dedanix-ew-shimmer {
	0% {
		background-position: 200% 0;
	}

	100% {
		background-position: -200% 0;
	}
}

@keyframes dedanix-ew-spin {
	to {
		transform: rotate(360deg);
	}
}

.dedanix-ew-product-search.is-full .dedanix-ew-pagination {
	grid-column: 1 / -1;
}

@media (max-width: 767px) {
	.dedanix-ew-product-search.is-open .dedanix-ew-results {
		left: 0;
		right: 0;
	}

	.dedanix-ew-product-search.is-full .dedanix-ew-results {
		padding: 92px 14px 22px;
	}

	.dedanix-ew-product-search.is-full .dedanix-ew-search-shell {
		top: 12px;
		left: 14px;
		right: 14px;
	}

	.dedanix-ew-results-head {
		align-items: flex-start;
		grid-template-columns: 1fr;
	}

	.dedanix-ew-sort {
		width: 100%;
		justify-content: space-between;
	}

	.dedanix-ew-sort select {
		width: min(210px, 100%);
		max-width: 210px;
	}

	.dedanix-ew-full-body {
		grid-template-columns: 1fr;
	}

	.dedanix-ew-filter-panel {
		position: static;
		max-height: none;
		overflow: visible;
		border: 1px solid var(--dedanix-ew-border);
		border-radius: 8px;
		padding: 12px;
	}

	.dedanix-ew-product-search.is-full .dedanix-ew-product-list {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 14px;
	}

	.dedanix-ew-product-title {
		font-size: 14px;
	}
}

@media (max-width: 420px) {
	.dedanix-ew-search-shell {
		min-height: 46px;
		padding: 0 12px;
	}

	.dedanix-ew-product-list {
		max-height: min(420px, calc(100vh - 340px));
	}

	.dedanix-ew-product {
		gap: 10px;
		padding: 12px 14px;
	}

	.dedanix-ew-product-image {
		width: 52px;
		height: 52px;
		flex-basis: 52px;
	}

	.dedanix-ew-results-head,
	.dedanix-ew-suggestions,
	.dedanix-ew-pagination {
		padding-left: 14px;
		padding-right: 14px;
	}
}

@media (max-width: 360px) {
	.dedanix-ew-product-search.is-full .dedanix-ew-product-list {
		grid-template-columns: 1fr;
	}

	.dedanix-ew-product-search.is-full .dedanix-ew-product-image {
		max-height: 220px;
	}

	.dedanix-ew-sort {
		display: grid;
		gap: 6px;
	}

	.dedanix-ew-sort select {
		max-width: none;
		width: 100%;
	}
}
