/* Tarracode YITH search overlay — match the storefront search mock. */

body.tc-yith-search-active {
	--tc-search-accent: #7bb800;
	--tc-search-accent-soft: #e8f4cc;
	--tc-search-text: #1b231d;
	--tc-search-muted: #7a847c;
	--tc-search-border: #e4e8e3;
	--tc-search-radius: 12px;
}

body.tc-yith-search-active .ywcas-popover-results,
body.tc-yith-search-active .MuiPopover-root .ywcas-popover-results,
body.tc-yith-search-active .ywcas-classic-results,
body.tc-yith-search-active .wp-block-yith-filled-block,
body.tc-yith-search-active .wp-block-yith-empty-block {
	display: none !important;
	visibility: hidden !important;
	pointer-events: none !important;
}

body.tc-yith-search-active .site-header .site-search form,
body.tc-yith-search-active .site-header .site-search .woocommerce-product-search,
body.tc-yith-search-active .site-header .site-search .yith-woocommerce-ajax-search,
body.tc-yith-search-active .site-header .site-search .yith-ajaxsearchform-container,
body.tc-yith-search-active .site-header .site-search .wp-block-yith-search-block,
body.tc-yith-search-active .site-header .site-search .ywcas-classic-search {
	max-width: none !important;
	width: 100% !important;
	margin: 0 !important;
}

body.tc-yith-search-active .site-search .ywcas-block-components-search-field .ywcas-input-field-wrapper,
body.tc-yith-search-active .ywcas-search-mobile .ywcas-block-components-search-field .ywcas-input-field-wrapper,
body.tc-yith-search-active .site-header .site-search input[type="search"],
body.tc-yith-search-active .site-header .site-search input[type="text"] {
	border-radius: var(--tc-search-radius) !important;
}

body.tc-yith-search-active .site-search .ywcas-block-components-search-field .ywcas-input-field-wrapper {
	position: relative;
	overflow: hidden !important;
	border: 1px solid var(--tc-search-border) !important;
	border-radius: var(--tc-search-radius) !important;
	box-shadow: none !important;
}

body.tc-yith-search-active .site-search .ywcas-block-components-search-field .ywcas-input-field-wrapper:focus-within {
	border-color: var(--tc-search-accent) !important;
	box-shadow: 0 0 0 3px rgba(123, 184, 0, 0.18) !important;
}

body.tc-yith-search-active .site-search .ywcas-classic-search.ywcas-small .ywcas-input-field input,
body.tc-yith-search-active .site-search .ywcas-input-field input {
	padding-right: 44px !important;
}

body.tc-yith-search-active .site-search .ywcas-submit-wrapper,
body.tc-yith-search-active .site-search .ywcas-block-components-search-field .ywcas-input-field-wrapper .ywcas-submit-wrapper,
body.tc-yith-search-active .site-header .site-search input[type="submit"],
body.tc-yith-search-active .site-header .site-search button[type="submit"] {
	background: var(--tc-search-accent) !important;
	background-image: none !important;
	border-radius: 0 !important;
}

body.tc-yith-search-active .site-search .ywcas-submit-wrapper:hover,
body.tc-yith-search-active .site-header .site-search input[type="submit"]:hover,
body.tc-yith-search-active .site-header .site-search button[type="submit"]:hover {
	background: #6ca000 !important;
}

.tc-search-clear {
	position: absolute;
	top: 50%;
	right: 54px;
	z-index: 2;
	display: none;
	align-items: center;
	justify-content: center;
	width: 28px;
	height: 28px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: transparent;
	color: #8b938c;
	transform: translateY(-50%);
	cursor: pointer;
}

.tc-search-clear.is-visible {
	display: inline-flex;
}

.tc-search-clear:hover,
.tc-search-clear:focus-visible {
	color: var(--tc-search-text);
	outline: 0;
}

.tc-search-clear svg {
	width: 16px;
	height: 16px;
}

.tc-search-dropdown {
	position: absolute;
	z-index: 10050;
	display: none;
	box-sizing: border-box;
	padding: 0;
	overflow: hidden;
	border: 1px solid var(--tc-search-border);
	border-radius: var(--tc-search-radius);
	background: #fff;
	box-shadow: 0 18px 48px rgba(22, 32, 24, 0.16);
	color: var(--tc-search-text);
	font-size: 0.9rem;
	line-height: 1.35;
}

.tc-search-dropdown.is-open {
	display: block;
}

.tc-search-dropdown[hidden] {
	display: none !important;
}

.tc-search-dropdown.is-empty .tc-search-filled,
.tc-search-dropdown:not(.is-empty) .tc-search-idle {
	display: none;
}

.tc-search-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	min-height: 280px;
}

.tc-search-col {
	display: flex;
	flex-direction: column;
	min-width: 0;
	border-right: 1px solid #f0f2ef;
}

.tc-search-col:last-child {
	border-right: 0;
}

.tc-search-col.is-hidden {
	display: none;
}

.tc-search-col__head {
	padding: 1rem 1.1rem 0.55rem;
	color: var(--tc-search-muted);
	font-size: 0.72rem;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

.tc-search-col__head-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.75rem;
	padding: 1rem 1.1rem 0.55rem;
}

.tc-search-col__head-row .tc-search-col__head {
	padding: 0;
}

.tc-search-clear-all {
	border: 0;
	background: none;
	color: var(--tc-search-accent);
	font-size: 0.78rem;
	font-weight: 600;
	cursor: pointer;
}

.tc-search-clear-all:hover {
	text-decoration: underline;
}

.tc-search-list {
	display: flex;
	flex: 1 1 auto;
	flex-direction: column;
	margin: 0;
	padding: 0 0.55rem 0.4rem;
	list-style: none;
}

.tc-search-item {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	width: 100%;
	padding: 0.55rem 0.55rem;
	border: 0;
	border-radius: 10px;
	background: transparent;
	color: inherit;
	text-align: left;
	text-decoration: none;
	cursor: pointer;
}

.tc-search-item:hover,
.tc-search-item:focus-visible {
	background: #f6f8f3;
	outline: 0;
}

.tc-search-thumb {
	flex: 0 0 auto;
	width: 48px;
	height: 48px;
	overflow: hidden;
	border: 1px solid #eef1ec;
	border-radius: 8px;
	background: #f4f6f2;
}

.tc-search-thumb img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.tc-search-icon,
.tc-search-logo {
	display: inline-flex;
	flex: 0 0 auto;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	overflow: hidden;
	border-radius: 50%;
	background: #f3f6ee;
	color: var(--tc-search-accent);
}

.tc-search-logo {
	border: 1px solid #e7ebe3;
	background: #fff;
}

.tc-search-logo img,
.tc-search-icon img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.tc-search-icon svg {
	width: 20px;
	height: 20px;
}

.tc-search-item__body {
	min-width: 0;
	flex: 1 1 auto;
}

.tc-search-item__title {
	display: block;
	overflow: hidden;
	color: var(--tc-search-text);
	font-size: 0.86rem;
	font-weight: 600;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.tc-search-item__meta {
	display: block;
	margin-top: 0.12rem;
	color: var(--tc-search-muted);
	font-size: 0.75rem;
}

.tc-search-item__price {
	display: block;
	margin-top: 0.18rem;
	color: var(--tc-search-accent);
	font-size: 0.86rem;
	font-weight: 700;
}

.tc-search-item__price .woocommerce-Price-amount,
.tc-search-item__price .amount {
	color: inherit;
	font-weight: 700;
}

.tc-search-highlight {
	padding: 0;
	background: transparent;
	color: inherit;
	font-weight: 800;
}

.tc-search-footer {
	display: flex;
	align-items: center;
	margin-top: auto;
	padding: 0.7rem 1.1rem;
	background: var(--tc-search-accent-soft);
	color: #3f5d12;
	font-size: 0.8rem;
	font-weight: 700;
	text-decoration: none;
}

.tc-search-footer:hover,
.tc-search-footer:focus-visible {
	color: #2d4708;
	text-decoration: none;
}

.tc-search-idle {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(240px, 1.15fr);
	align-items: stretch;
	min-height: 280px;
}

.tc-search-history-item {
	color: var(--tc-search-text);
	font-weight: 500;
}

.tc-search-history-item .tc-search-icon {
	width: 32px;
	height: 32px;
	background: transparent;
	color: #9aa39b;
}

.tc-search-pills {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	padding: 0.2rem 1.1rem 1.1rem;
}

.tc-search-pill {
	display: inline-flex;
	align-items: center;
	padding: 0.38rem 0.8rem;
	border: 1px solid #dfe4db;
	border-radius: 999px;
	background: #fff;
	color: var(--tc-search-text);
	font-size: 0.8rem;
	font-weight: 600;
	text-decoration: none;
	cursor: pointer;
}

.tc-search-pill:hover,
.tc-search-pill:focus-visible {
	border-color: var(--tc-search-accent);
	background: #f4f9e8;
	color: var(--tc-search-text);
	outline: 0;
}

.tc-search-cta {
	position: relative;
	display: flex;
	flex-direction: column;
	align-self: stretch;
	min-height: 260px;
	margin: 0.75rem;
	overflow: hidden;
	isolation: isolate;
	contain: paint;
	border-radius: 12px;
	background: #111c14;
	color: #fff;
	text-decoration: none;
}

.tc-search-cta::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 1;
	pointer-events: none;
	background: linear-gradient(180deg, rgba(8, 14, 10, 0.42) 0%, rgba(8, 14, 10, 0.12) 42%, rgba(8, 14, 10, 0.5) 100%);
}

.tc-search-cta__art {
	position: absolute;
	top: 50%;
	left: 50%;
	z-index: 0;
	display: block;
	width: 116%;
	height: 116%;
	max-width: none;
	max-height: none;
	pointer-events: none;
	object-fit: cover;
	object-position: 68% 50%;
	transform: translate(-50%, -50%);
}

.tc-search-cta__body {
	position: relative;
	z-index: 2;
	display: flex;
	flex: 1 1 auto;
	flex-direction: column;
	max-width: 100%;
	padding: 1.15rem 1.1rem 1rem;
}

.tc-search-cta__title {
	margin: 0 0 0.4rem;
	color: #7bb800;
	font-size: 0.72rem;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

.tc-search-cta__subtitle {
	margin: 0 0 0.9rem;
	color: #fff;
	font-size: 1.12rem;
	font-weight: 700;
	line-height: 1.25;
}

.tc-search-cta__btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	align-self: flex-start;
	width: auto;
	margin-top: auto;
	padding: 0.55rem 0.9rem;
	border-radius: 8px;
	background: var(--tc-search-accent);
	color: #fff;
	font-size: 0.8rem;
	font-weight: 700;
}

.tc-search-query-chip {
	margin: 0 0 1rem;
}

.tc-search-empty-msg {
	padding: 0.4rem 1.1rem 1rem;
	color: var(--tc-search-muted);
	font-size: 0.82rem;
}

.tc-search-dropdown.is-loading .tc-search-filled {
	opacity: 0.65;
}

@media (max-width: 899px) {
	.tc-search-grid,
	.tc-search-idle {
		grid-template-columns: 1fr;
		min-height: 0;
	}

	.tc-search-col {
		border-right: 0;
		border-bottom: 1px solid #f0f2ef;
	}

	.tc-search-cta {
		min-height: 200px;
	}
}
