.te-product-search {
	--te-search-accent-start: #f26b3f;
	--te-search-accent-end: #c93400;
	--te-search-border: #292929;
	--te-search-text: #25272c;
	position: relative;
	z-index: 50;
	width: 100%;
	max-width: 760px;
	font-family: inherit;
}

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

.te-product-search__form {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	gap: 0;
	width: 100%;
}

body.tax-product_cat .te-product-search {
	margin-top: 16px;
}

.te-product-search__input-wrap {
	position: relative;
	min-width: 0;
}

.te-product-search .te-product-search__input {
	width: 100%;
	height: 68px;
	margin: 0;
	padding: 0 52px 0 20px;
	border: 1px solid var(--te-search-border);
	border-radius: 10px 0 0 10px;
	background: #fff;
	box-shadow: none;
	color: var(--te-search-text);
	font: inherit;
	font-size: 18px;
	line-height: 1;
	outline: none;
}

.te-product-search .te-product-search__input:focus {
	border-color: var(--te-search-accent-start);
	box-shadow: inset 0 0 0 1px var(--te-search-accent-start);
}

.te-product-search .te-product-search__input::-webkit-search-cancel-button {
	display: none;
}

.te-product-search .te-product-search__input:placeholder-shown {
	padding-right: 20px;
}

.te-product-search .te-product-search__clear {
	position: absolute;
	top: 50%;
	right: 15px;
	transform: translateY(-50%);
	width: 30px;
	height: 30px;
	padding: 0;
	min-width: 0;
	border: 0 !important;
	border-radius: 0;
	background: transparent !important;
	background-image: none !important;
	box-shadow: none !important;
	color: #b9b9b9;
	font: inherit;
	font-size: 28px;
	line-height: 28px;
	cursor: pointer;
}

.te-product-search .te-product-search__clear:hover,
.te-product-search .te-product-search__clear:focus-visible {
	background: transparent !important;
	color: var(--te-search-text);
}

.te-product-search .te-product-search__clear[hidden] {
	display: none !important;
}

.te-product-search .te-product-search__submit {
	min-width: 126px;
	height: 68px;
	margin: 0;
	padding: 0 24px;
	border: 0 !important;
	border-radius: 0 10px 10px 0;
	background: linear-gradient(160deg, var(--te-search-accent-start), var(--te-search-accent-end)) !important;
	box-shadow: none !important;
	color: #fff !important;
	font: inherit;
	font-size: 18px;
	font-weight: 400;
	cursor: pointer;
	transition: filter 160ms ease;
}

.te-product-search .te-product-search__submit:hover,
.te-product-search .te-product-search__submit:focus-visible {
	color: #fff !important;
	filter: brightness(0.94);
}

.te-product-search__results {
	position: absolute;
	top: calc(100% + 8px);
	left: 0;
	right: 0;
	z-index: 1000;
	max-height: 520px;
	overflow-x: hidden;
	overflow-y: auto;
	border: 1px solid #d8dadd;
	background: #fff;
	box-shadow: 0 16px 40px rgba(21, 25, 32, 0.16);
}

.te-product-search__item {
	display: grid;
	grid-template-columns: 78px minmax(0, 1fr);
	gap: 14px;
	align-items: center;
	min-height: 102px;
	padding: 12px 16px;
	border-bottom: 1px solid #eceef0;
	background: #fff;
	color: var(--te-search-text);
	text-decoration: none;
	transition: background-color 140ms ease;
}

.te-product-search__item:last-child {
	border-bottom: 0;
}

.te-product-search__item:hover,
.te-product-search__item:focus-visible,
.te-product-search__item.is-active {
	background: #f7f7f8;
	color: var(--te-search-text);
	outline: none;
}

.te-product-search__thumb {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 78px;
	height: 78px;
	overflow: hidden;
	border-radius: 10px;
	background: #f6f7f8;
}

.te-product-search__image {
	display: block;
	width: 100%;
	height: 100%;
	margin: 0;
	object-fit: contain;
}

.te-product-search__details {
	display: flex;
	min-width: 0;
	flex-direction: column;
	gap: 4px;
}

.te-product-search__name {
	overflow: hidden;
	color: #24262b;
	font-size: 16px;
	font-weight: 600;
	line-height: 1.3;
	text-overflow: ellipsis;
}

.te-product-search__sku {
	overflow: hidden;
	color: #777c83;
	font-size: 13px;
	line-height: 1.3;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.te-product-search__meta {
	display: flex;
	flex-wrap: wrap;
	gap: 8px 14px;
	align-items: center;
}

.te-product-search__price {
	color: #16181c;
	font-size: 16px;
	font-weight: 600;
	line-height: 1.3;
}

.te-product-search__stock {
	font-size: 12px;
	line-height: 1.3;
}

.te-product-search__stock.is-in-stock {
	color: #2f7d41;
}

.te-product-search__stock.is-out-of-stock {
	color: #a5463d;
}

.te-product-search__message {
	padding: 20px;
	color: #686d74;
	font-size: 15px;
	text-align: center;
}

.te-product-search__message.is-error {
	color: #a5463d;
}

@media (max-width: 767px) {
	.te-product-search .te-product-search__input,
	.te-product-search .te-product-search__submit {
		height: 56px;
	}

	.te-product-search .te-product-search__input {
		padding-right: 42px;
		padding-left: 14px;
		font-size: 16px;
	}

	.te-product-search .te-product-search__input:placeholder-shown {
		padding-right: 14px;
	}

	.te-product-search .te-product-search__submit {
		min-width: 92px;
		padding: 0 14px;
		font-size: 15px;
	}

	.te-product-search .te-product-search__clear {
		right: 8px;
	}

	.te-product-search__results {
		max-height: min(60vh, 460px);
	}

	.te-product-search__item {
		grid-template-columns: 64px minmax(0, 1fr);
		gap: 11px;
		min-height: 84px;
		padding: 10px 12px;
	}

	.te-product-search__thumb {
		width: 64px;
		height: 64px;
		border-radius: 8px;
	}

	.te-product-search__name,
	.te-product-search__price {
		font-size: 14px;
	}
}
