.emega-search-panel {
	position: absolute;
	top: calc(100% + 4px);
	left: 0;
	right: 0;
	z-index: 99999;
	max-height: 70vh;
	overflow-y: auto;
	background: #fff;
	border: 1px solid #e3e3e3;
	border-radius: 8px;
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
	text-align: left;
	color: #222;
}

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

.emega-search-item {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 8px 12px;
	color: inherit;
	text-decoration: none;
	border-bottom: 1px solid #f1f1f1;
}

.emega-search-item:hover,
.emega-search-item.is-active {
	background: #f6f7f9;
	color: inherit;
}

.emega-search-item img {
	flex: 0 0 48px;
	width: 48px;
	height: 48px;
	object-fit: contain;
	background: #fff;
	border-radius: 4px;
}

.emega-search-text {
	display: flex;
	flex-direction: column;
	gap: 2px;
	min-width: 0;
}

.emega-search-title {
	font-size: 14px;
	line-height: 1.35;
	overflow: hidden;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
}

.emega-search-title mark {
	background: none;
	color: inherit;
	font-weight: 700;
	padding: 0;
}

.emega-search-meta {
	display: flex;
	gap: 8px;
	align-items: baseline;
	font-size: 13px;
}

.emega-search-price {
	font-weight: 600;
}

.emega-search-price del {
	font-weight: 400;
	color: #888;
	margin-right: 2px;
}

.emega-search-oos {
	color: #b32d2e;
	font-size: 12px;
}

.emega-search-all,
.emega-search-empty {
	display: block;
	padding: 12px;
	text-align: center;
	font-size: 14px;
}

.emega-search-all {
	font-weight: 600;
	text-decoration: none;
}

.emega-search-empty {
	color: #666;
}

/* ------------------------------------------------------------------ listings: layout */
.emega-layout {
	display: flex;
	align-items: flex-start;
	gap: 28px;
}

.emega-layout__main {
	flex: 1 1 auto;
	min-width: 0;
}

/* ------------------------------------------------------------------ top bar */
.emega-topbar {
	display: flex;
	align-items: center;
	gap: 12px;
	margin: 0 0 16px;
	padding: 0 0 12px;
	border-bottom: 1px solid #ececec;
	font-size: 14px;
}

.emega-topbar__count {
	margin-right: auto;
}

.emega-topbar__sort {
	display: flex !important;
	align-items: center;
	gap: 8px;
	margin: 0 !important;
	white-space: nowrap;
}

.emega-topbar__sort span {
	color: #666;
}

.emega-topbar select {
	box-sizing: border-box !important;
	height: 38px !important;
	min-height: 38px !important;
	line-height: 36px !important;
	padding: 0 28px 0 10px !important;
	margin: 0 !important;
	border: 1px solid #d6d6d6 !important;
	border-radius: 4px !important;
	background-color: #fff !important;
	font-size: 14px !important;
	color: #222 !important;
	min-width: 170px;
}

.emega-topbar__filters {
	display: none;
	height: 38px;
	padding: 0 16px;
	border: 1px solid #222 !important;
	border-radius: 4px;
	background: #fff !important;
	color: #222 !important;
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
}

/* ------------------------------------------------------------------ sidebar */
.emega-sidebar {
	flex: 0 0 250px;
	width: 250px;
	font-size: 14px;
	color: #222;
}

.emega-sidebar form {
	margin: 0;
}

.emega-sidebar__head {
	display: none;
}

.emega-sidebar__clear {
	display: inline-block;
	margin: 0 0 12px;
	font-size: 13px;
	text-decoration: underline;
}

.emega-group {
	margin: 0 0 22px !important;
	padding: 0 !important;
	border: 0 !important;
	min-width: 0;
}

.emega-group legend {
	display: block;
	width: 100%;
	margin: 0 0 8px !important;
	padding: 0 !important;
	font-size: 14px;
	font-weight: 700;
	text-transform: none;
	letter-spacing: 0;
	color: #111;
}

.emega-opt {
	display: flex !important;
	align-items: center;
	gap: 8px;
	margin: 0 0 6px !important;
	padding: 0 !important;
	font-size: 14px;
	font-weight: 400;
	line-height: 1.35;
	text-transform: none;
	cursor: pointer;
}

.emega-opt input[type="radio"] {
	flex: 0 0 18px;
	width: 18px !important;
	height: 18px !important;
	margin: 0 !important;
	accent-color: #1f63b0;
}

.emega-opt small {
	color: #777;
	font-size: 12px;
}

.emega-opt--more {
	display: none !important;
}

.emega-group.is-expanded .emega-opt--more {
	display: flex !important;
}

.emega-more {
	padding: 0 !important;
	margin: 2px 0 0 26px !important;
	border: 0 !important;
	background: none !important;
	color: #1f63b0 !important;
	font-size: 13px;
	font-weight: 600;
	cursor: pointer;
	text-transform: none;
}

.emega-more::before {
	content: "\203A  ";
}

.emega-stars {
	color: #f08a24;
	letter-spacing: 1px;
}

.emega-stars span {
	color: #f08a24;
}

/* ------------------------------------------------------------------ dual slider */
.emega-range__value {
	margin: 0 0 10px;
	font-weight: 700;
}

.emega-range__track {
	position: relative;
	height: 28px;
	margin: 0 10px;
}

.emega-range__track::before,
.emega-range__fill {
	content: "";
	position: absolute;
	top: 12px;
	height: 5px;
	border-radius: 3px;
}

.emega-range__track::before {
	left: 0;
	right: 0;
	background: #d9dde3;
}

.emega-range__fill {
	background: #1f63b0;
}

.emega-range input[type="range"] {
	position: absolute;
	left: -10px;
	right: -10px;
	top: 0;
	width: calc(100% + 20px) !important;
	height: 28px !important;
	margin: 0 !important;
	padding: 0 !important;
	border: 0 !important;
	background: none !important;
	pointer-events: none;
	-webkit-appearance: none;
	appearance: none;
}

.emega-range input[type="range"]::-webkit-slider-runnable-track {
	background: none;
	border: 0;
}

.emega-range input[type="range"]::-moz-range-track {
	background: none;
	border: 0;
}

.emega-range input[type="range"]::-webkit-slider-thumb {
	-webkit-appearance: none;
	pointer-events: auto;
	width: 22px;
	height: 22px;
	margin-top: 3px;
	border: 5px solid #1f63b0;
	border-radius: 50%;
	background: #fff;
	cursor: pointer;
}

.emega-range input[type="range"]::-moz-range-thumb {
	pointer-events: auto;
	width: 12px;
	height: 12px;
	border: 5px solid #1f63b0;
	border-radius: 50%;
	background: #fff;
	cursor: pointer;
}

.emega-backdrop {
	display: none;
}

/* Theme layout not recognised: sidebar sits above the grid. */
.emega-no-grid .emega-sidebar {
	width: auto;
	margin: 0 0 20px;
}

/* ------------------------------------------------------------------ mobile drawer */
@media (max-width: 1023px) {
	.emega-layout {
		display: block;
	}

	.emega-topbar {
		flex-wrap: wrap;
		gap: 8px 10px;
	}

	.emega-topbar__count {
		order: -1;
		flex: 0 0 100%;
		margin: 0;
		font-size: 13px;
		color: #555;
	}

	.emega-topbar__filters {
		display: inline-flex !important;
		align-items: center;
		justify-content: center;
		gap: 6px;
		flex: 1 1 0;
		min-width: 0;
		height: 40px !important;
		padding: 0 12px !important;
		line-height: 1 !important;
		white-space: nowrap;
		text-transform: none !important;
		letter-spacing: 0 !important;
	}

	.emega-badge {
		display: inline-flex;
		align-items: center;
		justify-content: center;
		min-width: 18px;
		height: 18px;
		padding: 0 5px;
		border-radius: 9px;
		background: #e1251b;
		color: #fff;
		font-size: 11px;
		font-weight: 700;
		line-height: 1;
	}

	.emega-topbar__sort {
		flex: 1 1 0;
		min-width: 0;
	}

	.emega-topbar__sort span {
		display: none;
	}

	.emega-topbar select {
		width: 100% !important;
		min-width: 0;
		height: 40px !important;
		min-height: 40px !important;
	}

	.emega-sidebar {
		position: fixed;
		top: 0;
		bottom: 0;
		left: 0;
		z-index: 100000;
		width: 86vw;
		max-width: 340px;
		padding: 0 18px 24px;
		overflow-y: auto;
		background: #fff;
		box-shadow: 4px 0 24px rgba(0, 0, 0, 0.18);
		transform: translateX(-105%);
		transition: transform 0.25s ease;
	}

	.emega-sidebar__head {
		display: flex;
		align-items: center;
		justify-content: space-between;
		position: sticky;
		top: 0;
		margin: 0 -18px 14px;
		padding: 14px 18px;
		background: #fff;
		border-bottom: 1px solid #eee;
		font-size: 16px;
	}

	.emega-sidebar__close {
		padding: 0 4px !important;
		border: 0 !important;
		background: none !important;
		color: #222 !important;
		font-size: 28px;
		line-height: 1;
		cursor: pointer;
	}

	.emega-filters-open .emega-sidebar {
		transform: none;
	}

	.emega-filters-open .emega-backdrop {
		display: block;
		position: fixed;
		top: 0;
		right: 0;
		bottom: 0;
		left: 0;
		z-index: 99999;
		background: rgba(0, 0, 0, 0.45);
	}

	.emega-filters-open .emega-sidebar {
		z-index: 100000;
	}

	.emega-filters-open body {
		overflow: hidden;
	}
}

@media (prefers-reduced-motion: reduce) {
	.emega-sidebar {
		transition: none;
	}
}
