/* Search overlay styles moved from DS-menu.css */
/*search*/
.search_overlay {
	top: 42px;
	position: fixed;
	width: 100%;
	height: 100vh;
	background: rgba(255,255,255,1);
	display: none;
	z-index: 10000;
	overflow: hidden;
}
.inner_search_overlay {
	width: 80%;
}
.close_search_overlay {
	position: absolute;
	top: 0;
	right: 5%;
	width: 42px;
	height: 42px;
	cursor: pointer;
}
.close_search_overlay > i {
	font-size: 20px;
	position: absolute;
	top: 50%;
	right: 0;
	transform: translate(-50%, -50%);
}
.close_search_overlay:hover {
	color: #b30938;
}
.search_box {
	position: absolute;
	top: 0;
	right: calc(5% + 42px);
	border-bottom: 1px solid black;
}
/* Ensure the input looks good */
.search_box input[type="search"] {
	appearance: none;
	-webkit-appearance: none;
	border: 0;
	outline: none;
	background: transparent;
	width: 500px;
	max-width: 100%;
	padding: 8px 0;
	font-size: 16px;
	line-height: 1.4;
}
.search_results {
	position: absolute;
	top: 70px;
	left: 5%;
	width: 90%;
	max-height: calc(100vh - 140px);
	overflow-y: scroll;
	-webkit-overflow-scrolling: touch;
}
.search_results::-webkit-scrollbar {
	width: 0;  /* Remove scrollbar space */
	background: transparent;  /* Optional: just make scrollbar invisible */
}
/*search box when on admin page*/
body.admin-bar .search_overlay {
	top: 74px;
}
body.admin-bar .search_results {
	max-height: calc(100vh - 160px);
}

/* Mobile tweaks */
@media screen and ( max-width: 479px ) {
	.search_box {
		top: 0;
		left: 0;
		width: 90%;
	}
	.close_search_overlay {
		position: absolute;
		top: 0;
		right: 0;
		width: 10%;
		height: 34px;
		cursor: pointer;
		border-bottom: 1px solid black;
	}
	.close_search_overlay > i {
		top: 15px;
		right: 5px;
	}
	.search_results {
		position: absolute;
		top: 40px;
		left: 0;
		width: 100%;
	}
}



/* Product grid fallback for search overlay (scoped to avoid conflicts) */
.search_overlay .woocommerce ul.products {font-size: 0;}
.search_overlay .woocommerce ul.products > li.product {
	margin: 0 4% 15px 0;
	position: relative;
	width: 22%;
	display: inline-block;
	vertical-align: top;
}
.search_overlay .woocommerce ul.products > li.product:nth-child(4n) {margin-right: 0;}
.search_overlay .woocommerce ul.products li.product img {margin: 0 !important;}

@media only screen and (max-width: 1024px) {
	.search_overlay .woocommerce ul.products > li.product {width: 30%;}
	.search_overlay .woocommerce ul.products > li.product:nth-child(3n) {margin-right: 0;}
}
@media only screen and (max-width: 767px) {
	.search_overlay .woocommerce ul.products > li.product {width: 48%; margin: 0 4% 15px 0;}
	.search_overlay .woocommerce ul.products > li.product:nth-child(2n) {margin-right: 0;}
}