.cmps {
	--cmps-accent: #5bd1d7;
	--cmps-accent-dark: #35bbc2;
	--cmps-border: #d8d8d8;
	--cmps-text: #242424;
	--cmps-muted: #6c6c6c;
	position: relative;
	z-index: 20;
	clear: both;
	width: min(100%, 680px);
	margin: 0 auto 1.5rem;
	padding: 0;
	border: 0;
	border-radius: 0;
	background: transparent;
	box-shadow: none;
	color: var(--cmps-text);
	box-sizing: border-box;
}

.cmps *,
.cmps *::before,
.cmps *::after {
	box-sizing: border-box;
}

.cmps__title {
	display: none;a
}

.cmps__form {
	position: relative;
	margin: 0;
}

.cmps__field {
	display: flex;
	flex-direction: row-reverse;
	min-height: 50px;
}

.cmps__input {
	min-width: 0;
	width: 100%;
	height: 50px;
	margin: 0 !important;
	padding: 0 0.85rem !important;
	border: 1px solid var(--cmps-border) !important;
	border-left: 0 !important;
	border-radius: 0 !important;
	background: #fff !important;
	box-shadow: none !important;
	color: var(--cmps-text) !important;
	font: inherit;
}

.cmps__input:focus {
	position: relative;
	z-index: 1;
	border-color: var(--cmps-accent) !important;
	outline: 2px solid rgba(91, 209, 215, 0.24) !important;
	outline-offset: 0;
}

.cmps__input::-webkit-search-cancel-button {
	cursor: pointer;
}

.cmps__button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.45rem;
	min-width: 50px;
	width: 50px;
	height: 50px;
	margin: 0 !important;
	padding: 0 !important;
	border: 1px solid var(--cmps-accent) !important;
	border-radius: 0 !important;
	background: var(--cmps-accent) !important;
	box-shadow: none !important;
	color: #1b1b1b !important;
	font: inherit;
	font-weight: 700;
	line-height: 1;
	cursor: pointer;
}

.cmps__button span:last-child {
	display: none;
}

.cmps__button:hover,
.cmps__button:focus {
	border-color: var(--cmps-accent-dark) !important;
	background: var(--cmps-accent-dark) !important;
}

.cmps__button:focus-visible {
	outline: 2px solid #1b1b1b;
	outline-offset: 2px;
}

.cmps__search-icon {
	width: 17px;
	height: 17px;
	border: 2px solid currentColor;
	border-radius: 50%;
	position: relative;
	flex: 0 0 auto;
}

.cmps__search-icon::after {
	content: '';
	position: absolute;
	right: -5px;
	bottom: -3px;
	width: 7px;
	height: 2px;
	background: currentColor;
	transform: rotate(45deg);
	transform-origin: left center;
}

.cmps__desktop-holder {
	position: relative;
	display: inline-flex !important;
	align-items: center;
	justify-content: center;
	margin-left: 0.55rem !important;
	padding: 0 !important;
	list-style: none !important;
}

.cmps__desktop-trigger {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 42px;
	width: 42px;
	min-width: 42px;
	height: 42px;
	min-height: 42px;
	margin: 0 !important;
	padding: 0 !important;
	border: 0 !important;
	border-radius: 50% !important;
	background: #5bd1d7 !important;
	box-shadow: 0 2px 8px rgba(35, 155, 171, 0.24) !important;
	color: #171717 !important;
	line-height: 1 !important;
	cursor: pointer;
}

.cmps__desktop-trigger .cmps__search-icon {
	width: 16px;
	height: 16px;
	margin: 0;
	transform: translate(-2px, -2px);
}

.cmps__desktop-trigger .cmps__search-icon::after {
	right: -5px;
	bottom: -3px;
	width: 7px;
}

.cmps__desktop-trigger:hover,
.cmps__desktop-trigger:focus,
.cmps__desktop-trigger[aria-expanded="true"] {
	background: #35bbc2 !important;
	box-shadow: 0 3px 10px rgba(35, 155, 171, 0.32) !important;
}

.cmps__desktop-trigger:focus-visible {
	outline: 2px solid #171717;
	outline-offset: 2px;
}

.cmps__desktop-holder--fallback {
	position: fixed;
	top: 150px;
	right: 0;
	z-index: 999998;
	margin: 0 !important;
}

.cmps--desktop-popover {
	position: fixed;
	z-index: 999999;
	display: none;
	margin: 0;
	padding: 0;
	background: #fff;
	box-shadow: 0 10px 28px rgba(0, 0, 0, 0.18);
}

.cmps--desktop-popover.cmps--desktop-open {
	display: block;
}

.cmps--desktop-popover .cmps__field {
	box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.03);
}

.cmps__results {
	position: absolute;
	top: calc(100% + 6px);
	left: 0;
	right: 0;
	z-index: 1000;
	max-height: min(460px, 70vh);
	overflow-y: auto;
	border: 1px solid #dedede;
	border-radius: 0;
	background: #fff;
	box-shadow: 0 10px 28px rgba(0, 0, 0, 0.16);
}

.cmps__results[hidden] {
	display: none !important;
}

.cmps__result {
	display: grid;
	grid-template-columns: 58px minmax(0, 1fr) auto;
	align-items: center;
	gap: 0.8rem;
	min-height: 74px;
	padding: 0.5rem 0.75rem;
	border-bottom: 1px solid #ededed;
	background: #fff;
	color: var(--cmps-text) !important;
	text-decoration: none !important;
}

.cmps__result:last-child {
	border-bottom: 0;
}

.cmps__result:hover,
.cmps__result:focus,
.cmps__result.is-active {
	background: #effbfc;
	outline: none;
}

.cmps__result-image {
	width: 58px;
	height: 58px;
	border-radius: 5px;
	object-fit: contain;
	background: #f7f7f7;
}

.cmps__result-content {
	display: flex;
	min-width: 0;
	flex-direction: column;
	gap: 0.2rem;
}

.cmps__result-name {
	overflow: hidden;
	font-weight: 700;
	line-height: 1.3;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.cmps__result-sku {
	color: var(--cmps-muted);
	font-size: 0.85rem;
}

.cmps__result-price {
	font-weight: 700;
	white-space: nowrap;
}

.cmps__message {
	padding: 1rem;
	color: var(--cmps-muted);
	text-align: center;
}

.cmps__message--error {
	color: #a32929;
}

.cmps__message--loading::before {
	content: '';
	display: inline-block;
	width: 15px;
	height: 15px;
	margin: 0 0.5rem -2px 0;
	border: 2px solid #ddd;
	border-top-color: var(--cmps-accent);
	border-radius: 50%;
	animation: cmps-spin 0.7s linear infinite;
}

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

@media (max-width: 900px) {
	.cmps {
		width: min(100%, 680px);
	}

	.cmps__title {
		display: block;
		margin: 0 0 0.45rem;
		font-size: 0.95rem;
		font-weight: 700;
		line-height: 1.35;
	}

	.cmps__desktop-holder,
	.cmps__desktop-trigger {
		display: none !important;
	}
}

@media (max-width: 600px) {
	.cmps {
		margin-bottom: 1rem;
		padding: 0;
		border-radius: 0;
	}

	.cmps__field {
		min-height: 46px;
	}

	.cmps__input,
	.cmps__button {
		height: 46px;
	}

	.cmps__button {
		min-width: 50px;
		width: 50px;
		padding: 0 !important;
	}

	.cmps__result {
		grid-template-columns: 50px minmax(0, 1fr);
		gap: 0.65rem;
	}

	.cmps__result-image {
		width: 50px;
		height: 50px;
	}

	.cmps__result-price {
		grid-column: 2;
		font-size: 0.9rem;
	}
}

@media (prefers-reduced-motion: reduce) {
	.cmps__message--loading::before {
		animation-duration: 1.5s;
	}
}
