/* eBedding4You instant search dropdown */

.eb4u-search-wrap {
	position: relative;
	width: 100%;
}

.eb4u-search-panel {
	position: absolute;
	top: 100%;
	left: 0;
	z-index: 9999;
	width: 860px;
	max-width: 94vw;
	margin-top: 6px;
	background: #fff;
	border: 1px solid #e2e2e2;
	border-radius: 8px;
	box-shadow: 0 12px 32px rgba(0, 0, 0, 0.14);
	max-height: 78vh;
	overflow-y: auto;
}

.eb4u-search-panel[hidden] {
	display: none;
}

.eb4u-search-status {
	padding: 24px 16px;
	font-size: 14px;
	color: #777;
	text-align: center;
}

.eb4u-search-header {
	padding: 12px 16px 6px;
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: #9a9a9a;
}

/* Two-pane layout: categories sidebar + product main */
.eb4u-search-body {
	display: grid;
	grid-template-columns: 200px 1fr;
	align-items: start;
}

.eb4u-search-body.is-single {
	grid-template-columns: 1fr;
}

.eb4u-search-sidebar {
	border-right: 1px solid #eee;
	padding-bottom: 8px;
}

.eb4u-search-main {
	min-width: 0;
}

.eb4u-search-cats {
	display: flex;
	flex-direction: column;
	padding: 2px 8px 4px;
}

.eb4u-search-cat {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	padding: 7px 8px;
	border-radius: 6px;
	text-decoration: none;
	color: #333;
	transition: background-color 0.12s ease;
}

.eb4u-search-cat:hover {
	background: #f6f8fa;
}

.eb4u-search-cat-name {
	font-size: 13px;
	line-height: 1.3;
}

.eb4u-search-cat-count {
	flex: 0 0 auto;
	font-size: 11px;
	font-weight: 600;
	color: #888;
	background: #f0f0f0;
	border-radius: 10px;
	padding: 1px 8px;
}

@media (max-width: 640px) {
	.eb4u-search-body {
		grid-template-columns: 1fr;
	}

	.eb4u-search-sidebar {
		border-right: 0;
		border-bottom: 1px solid #eee;
	}

	.eb4u-search-cats {
		flex-direction: row;
		flex-wrap: wrap;
	}
}

/* Responsive product grid */
.eb4u-search-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 2px;
	padding: 4px 8px 8px;
}

@media (max-width: 640px) {
	.eb4u-search-grid {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (max-width: 400px) {
	.eb4u-search-grid {
		grid-template-columns: 1fr;
	}
}

.eb4u-search-card {
	display: flex;
	flex-direction: column;
	padding: 10px;
	text-decoration: none;
	color: #222;
	border-radius: 8px;
	transition: background-color 0.12s ease;
}

.eb4u-search-card:hover,
.eb4u-search-card.is-active {
	background: #f6f8fa;
}

.eb4u-search-figure {
	position: relative;
	width: 100%;
	aspect-ratio: 1 / 1;
	background: #f3f3f3;
	border-radius: 6px;
	overflow: hidden;
	margin-bottom: 8px;
}

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

.eb4u-search-badge {
	position: absolute;
	bottom: 6px;
	right: 6px;
	font-size: 10px;
	font-weight: 600;
	line-height: 1;
	padding: 4px 7px;
	border-radius: 4px;
	background: #e9f7ef;
	color: #1b7a43;
	white-space: nowrap;
}

.eb4u-search-badge.is-oos {
	background: #fde9e7;
	color: #b3261e;
}

.eb4u-search-sku {
	font-size: 10px;
	letter-spacing: 0.03em;
	text-transform: uppercase;
	color: #9a9a9a;
	margin-bottom: 2px;
}

.eb4u-search-title {
	font-size: 13px;
	line-height: 1.3;
	font-weight: 500;
	margin-bottom: 6px;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	min-height: 2.6em;
}

.eb4u-search-price {
	margin-top: auto;
	font-weight: 700;
	font-size: 14px;
	color: #111;
}

.eb4u-search-viewall {
	display: block;
	padding: 13px 14px;
	text-align: center;
	font-size: 13px;
	font-weight: 600;
	text-decoration: none;
	color: #fff;
	background: #111;
	position: sticky;
	bottom: 0;
}

.eb4u-search-viewall:hover {
	background: #333;
	color: #fff;
}
