.psg-product-search {
	--psg-field-bg: #fff;
	--psg-field-text: #171717;
	--psg-field-border: #e5e7eb;
	--psg-field-placeholder: #9ca3af;
	--psg-field-bg-hover: #fff;
	--psg-field-text-hover: #171717;
	--psg-field-border-hover: #d1d5db;
	--psg-field-bg-active: #fff;
	--psg-field-text-active: #171717;
	--psg-field-border-active: #9ca3af;
	--psg-field-focus-ring: #111827;
	--psg-submit-bg: #171717;
	--psg-submit-text: #fff;
	--psg-submit-bg-hover: #303030;
	--psg-submit-text-hover: #fff;
	--psg-submit-bg-active: #0a0a0a;
	--psg-submit-text-active: #fff;
	--psg-mode-bg: #f7f7f8;
	--psg-mode-button-bg: #f7f7f8;
	--psg-mode-text: #616161;
	--psg-mode-bg-hover: #f7f7f8;
	--psg-mode-text-hover: #171717;
	--psg-mode-bg-active: #fff;
	--psg-mode-text-active: #171717;
	--psg-results-bg: #fff;
	--psg-results-text: #171717;
	--psg-results-muted: #737373;
	--psg-results-border: #e5e7eb;
	--psg-results-item-bg: #f1f3f5;
	--psg-results-item-text: #171717;
	--psg-error-bg: #fff5f4;
	--psg-error-text: #b42318;
	--psg-error-border: #d92d20;
	--psg-ribbon-bg: #f2c94c;
	--psg-ribbon-text: #171717;
	--psg-ribbon-size: 8px;
	--psg-field-height: 52px;
	--psg-field-radius: 12px;
	--psg-button-radius: 8px;
	--psg-mode-radius: 12px;
	--psg-results-radius: 14px;
	position: relative;
	width: 100%;
	color: var(--psg-results-text);
}

.psg-product-search__modes {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 4px;
	margin: 0 0 8px;
	padding: 4px;
	border: 1px solid var(--psg-field-border);
	border-radius: var(--psg-mode-radius);
	background: var(--psg-mode-bg);
}

.psg-product-search__mode {
	appearance: none;
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 38px;
	margin: 0;
	padding: 7px 10px;
	border: 0;
	border-radius: var(--psg-button-radius);
	background: var(--psg-mode-button-bg);
	color: var(--psg-mode-text);
	font: inherit;
	font-size: 13px;
	font-weight: 550;
	line-height: 1.2;
	cursor: pointer;
	transition: background-color 140ms ease, color 140ms ease, box-shadow 140ms ease;
}

.psg-product-search__mode:hover {
	background: var(--psg-mode-bg-hover);
	color: var(--psg-mode-text-hover);
}

.psg-product-search__mode.is-active,
.psg-product-search__mode:active {
	background: var(--psg-mode-bg-active);
	color: var(--psg-mode-text-active);
	box-shadow: 0 1px 3px rgb(0 0 0 / 8%), 0 1px 1px rgb(0 0 0 / 3%);
}

.psg-product-search__mode.is-active::after {
	content: "";
	display: inline-block;
	width: 6px;
	height: 6px;
	margin: -3px 0 0 8px;
	border-right: 1.5px solid currentColor;
	border-bottom: 1.5px solid currentColor;
	transform: rotate(45deg);
	transform-origin: center;
}

.psg-product-search__mode:focus-visible {
	outline: 2px solid var(--psg-mode-text-active);
	outline-offset: 1px;
}

.psg-product-search__form {
	position: relative;
	margin: 0;
}

.psg-product-search__field {
	position: relative;
	display: flex;
	align-items: stretch;
}

.psg-product-search__input {
	display: block;
	width: 100%;
	min-height: var(--psg-field-height);
	box-sizing: border-box;
	padding: 0 110px 0 18px;
	border: 1px solid var(--psg-field-border);
	border-radius: var(--psg-field-radius);
	background: var(--psg-field-bg);
	color: var(--psg-field-text);
	font: inherit;
	font-size: 16px;
	line-height: 1.4;
	outline: none;
	transition: background-color 160ms ease, color 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.psg-product-search__input:hover {
	border-color: var(--psg-field-border-hover);
	background: var(--psg-field-bg-hover);
	color: var(--psg-field-text-hover);
}

.psg-product-search__input:focus {
	border-color: var(--psg-field-border-active);
	background: var(--psg-field-bg-active);
	color: var(--psg-field-text-active);
	box-shadow: 0 0 0 3px color-mix(in srgb, var(--psg-field-focus-ring) 6%, transparent);
}

@supports not (color: color-mix(in srgb, #000 50%, #fff)) {
	.psg-product-search__input:focus {
		box-shadow: 0 0 0 3px rgb(17 24 39 / 6%);
	}
}

.psg-product-search__input.has-error {
	border-color: var(--psg-error-border);
	box-shadow: 0 0 0 3px color-mix(in srgb, var(--psg-error-border) 8%, transparent);
}

.psg-product-search__input::placeholder {
	color: var(--psg-field-placeholder);
}

.psg-product-search__submit {
	position: absolute;
	top: 6px;
	right: 6px;
	bottom: 6px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 92px;
	margin: 0;
	padding: 0 15px;
	border: 0;
	border-radius: var(--psg-button-radius);
	background: var(--psg-submit-bg);
	color: var(--psg-submit-text);
	font: inherit;
	font-size: 13px;
	font-weight: 650;
	cursor: pointer;
	transition: background-color 140ms ease, color 140ms ease, transform 140ms ease;
}

.psg-product-search__submit:hover {
	background: var(--psg-submit-bg-hover);
	color: var(--psg-submit-text-hover);
}

.psg-product-search__submit:active {
	background: var(--psg-submit-bg-active);
	color: var(--psg-submit-text-active);
	transform: translateY(1px);
}

.psg-product-search__submit:focus-visible {
	outline: 2px solid var(--psg-field-focus-ring);
	outline-offset: 2px;
}

.psg-product-search__feedback {
	display: none;
	margin-top: 7px;
	padding: 9px 12px;
	border-radius: var(--psg-button-radius);
	font-size: 13px;
	line-height: 1.4;
}

.psg-product-search__feedback.is-error {
	display: block;
	background: var(--psg-error-bg);
	color: var(--psg-error-text);
}

.psg-product-search__results {
	position: absolute;
	z-index: 99999;
	top: calc(100% + 8px);
	left: 0;
	right: 0;
	display: none;
	margin: 0;
	padding: 6px;
	list-style: none;
	background: var(--psg-results-bg);
	border: 1px solid var(--psg-results-border);
	border-radius: var(--psg-results-radius);
	box-shadow: 0 18px 45px rgb(0 0 0 / 11%), 0 4px 12px rgb(0 0 0 / 4%);
	overflow: hidden;
}

.psg-product-search__results.is-open {
	display: block;
}

.psg-product-search__result {
	margin: 0;
	padding: 0;
}

.psg-product-search__link {
	display: grid;
	grid-template-columns: 58px minmax(0, 1fr) auto;
	grid-template-areas: "image content price";
	align-items: center;
	gap: 14px;
	min-height: 76px;
	padding: 9px 11px;
	border-radius: 10px;
	color: var(--psg-results-text);
	text-decoration: none;
	transition: background-color 120ms ease, color 120ms ease;
}

.psg-product-search__link:hover,
.psg-product-search__link:focus,
.psg-product-search__link.is-active {
	background: var(--psg-results-item-bg);
	color: var(--psg-results-item-text);
	outline: none;
}

.psg-product-search__image-wrap {
	position: relative;
	grid-area: image;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 58px;
	height: 58px;
	overflow: hidden;
	border-radius: 9px;
	background: #f5f5f5;
}

.psg-product-search__image {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.psg-product-search__bestseller {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	display: block;
	padding: 2px 3px;
	background: var(--psg-ribbon-bg);
	color: var(--psg-ribbon-text);
	font-size: var(--psg-ribbon-size);
	font-weight: 700;
	line-height: 1.2;
	text-align: center;
	text-transform: uppercase;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.psg-product-search__content {
	grid-area: content;
	min-width: 0;
}

.psg-product-search__title {
	display: block;
	margin: 0 0 4px;
	color: inherit;
	font-size: 14px;
	font-weight: 650;
	line-height: 1.35;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.psg-product-search__sku {
	display: block;
	color: var(--psg-results-muted);
	font-size: 12px;
	font-weight: 400;
	line-height: 1.4;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.psg-product-search__price {
	grid-area: price;
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	justify-content: center;
	min-width: max-content;
	padding-left: 16px;
	color: inherit;
	font-size: 13px;
	font-weight: 600;
	line-height: 1.45;
	text-align: right;
	white-space: normal;
}

.psg-product-search__price > * {
	margin: 0;
}

.psg-product-search__price br {
	display: block;
}

.psg-product-search__price del {
	color: var(--psg-results-muted);
	font-size: 11px;
	font-weight: 400;
}

.psg-product-search__price ins {
	text-decoration: none;
}

.psg-product-search__more {
	margin: 4px 0 0;
	padding: 0;
	border-top: 1px solid var(--psg-results-border);
}

.psg-product-search__more-link {
	display: block;
	padding: 13px 16px 10px;
	color: var(--psg-results-text);
	font-size: 14px;
	font-weight: 650;
	line-height: 1.35;
	text-align: center;
	text-decoration: none;
}

.psg-product-search__more-link:hover,
.psg-product-search__more-link:focus-visible {
	color: var(--psg-results-item-text);
	text-decoration: underline;
	text-underline-offset: 3px;
}

.psg-product-search__status {
	display: block;
	padding: 14px 16px;
	color: var(--psg-results-muted);
	font-size: 13px;
	line-height: 1.4;
}

.psg-product-search.is-quarantined .psg-product-search__input,
.psg-product-search.is-quarantined .psg-product-search__submit,
.psg-product-search.is-quarantined .psg-product-search__mode {
	cursor: not-allowed;
	opacity: 0.62;
}

@media (max-width: 700px) {
	.psg-product-search__modes {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 600px) {
	.psg-product-search__input {
		padding-right: 94px;
	}

	.psg-product-search__submit {
		min-width: 78px;
		padding: 0 11px;
	}

	.psg-product-search__results {
		padding: 5px;
	}

	.psg-product-search__link {
		grid-template-columns: 54px minmax(0, 1fr);
		grid-template-areas: "image content" "image price";
		align-items: start;
		column-gap: 12px;
		row-gap: 5px;
		padding: 10px;
	}

	.psg-product-search__image-wrap {
		width: 54px;
		height: 54px;
	}

	.psg-product-search__title {
		display: -webkit-box;
		font-size: 13.5px;
		white-space: normal;
		-webkit-box-orient: vertical;
		-webkit-line-clamp: 2;
		overflow: hidden;
	}

	.psg-product-search__sku {
		font-size: 11.5px;
	}

	.psg-product-search__price {
		flex-direction: row;
		flex-wrap: nowrap;
		align-items: flex-start;
		gap: 6px;
		min-width: 0;
		padding-top: 1px;
		padding-left: 0;
		font-size: 12px;
		text-align: left;
		white-space: nowrap;
	}

	.psg-product-search__price br {
		display: none;
	}

	.psg-product-search__price > :first-child:not(del) {
		font-weight: 600;
	}

	.psg-product-search__price > :not(:first-child),
	.psg-product-search__price .woocommerce-price-suffix,
	.psg-product-search__price small {
		font-weight: 400;
	}

	.psg-product-search__more-link {
		font-size: 13.5px;
	}
}
