/* EN Buscador. Colores ajustables con variables CSS (o desde WooCommerce → Buscador → Ajustes). */
.enb-ov,
.enb-drop {
	--enb-bg: #fff;
	--enb-fg: #1d2327;
	--enb-muted: #6b7280;
	--enb-line: #e6e8eb;
	--enb-soft: #f4f6f8;
	--enb-accent: var(--wd-primary-color, #0b3a53);
	--enb-price: var(--enb-accent);
	--enb-out: #b42318;
	font-size: 14px;
	line-height: 1.35;
	text-align: left;
	color: var(--enb-fg);
	-webkit-font-smoothing: antialiased;
}
.enb-ov[hidden], .enb-drop[hidden] { display: none !important; }
html.enb-lock, html.enb-lock body { overflow: hidden !important; }
.enb-ov mark, .enb-drop mark { background: none; color: inherit; font-weight: 700; padding: 0; }
.enb-out { font-style: normal; font-weight: 500; font-size: 12px; color: var(--enb-out); margin-left: 6px; white-space: nowrap; }
.enb-p { font-weight: 700; color: var(--enb-price); }
.enb-p del { color: var(--enb-muted); font-weight: 400; margin-right: 6px; opacity: .8; }
.enb-p ins { text-decoration: none; }

/* ================= Pantalla completa ================= */

.enb-ov {
	position: fixed;
	inset: 0;
	z-index: 100001;
	display: flex;
	flex-direction: column;
	background: var(--enb-bg);
	animation: enb-in .16s ease-out;
}
@keyframes enb-in { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }

.enb-ov-top {
	display: flex;
	align-items: center;
	gap: 20px;
	padding: 14px 28px;
	border-bottom: 1px solid var(--enb-line);
	flex: none;
}
.enb-ov-logo { flex: none; display: flex; align-items: center; }
.enb-ov-logo img { max-height: 44px; max-width: 170px; width: auto; display: block; }
.enb-ov-field {
	flex: 1;
	min-width: 0;
	display: flex;
	align-items: center;
	gap: 10px;
	margin: 0;
	padding: 6px 2px;
	border-bottom: 2px solid var(--enb-line);
	color: var(--enb-muted);
	cursor: text;
	transition: border-color .15s;
}
.enb-ov-field:focus-within { border-color: var(--enb-accent); color: var(--enb-accent); }
.enb-ov-field input[type="search"] {
	flex: 1;
	min-width: 0;
	height: auto;
	margin: 0;
	padding: 4px 0;
	border: 0 !important;
	outline: 0;
	box-shadow: none !important;
	background: transparent;
	font-size: 26px;
	font-weight: 600;
	color: var(--enb-fg);
	-webkit-appearance: none;
	appearance: none;
}
.enb-ov-field input::-webkit-search-cancel-button { display: none; }
.enb-ov-field input::placeholder { color: #9aa1a9; font-weight: 400; }
.enb-ov-clear {
	flex: none;
	padding: 6px 4px;
	border: 0;
	background: none;
	color: var(--enb-accent);
	font-size: 13px;
	font-style: italic;
	cursor: pointer;
	min-height: 0;
	box-shadow: none;
	text-transform: none;
}
.enb-ov-cart { flex: none; color: var(--enb-fg); display: flex; }
.enb-ov-close {
	flex: none;
	width: 40px;
	height: 40px;
	min-height: 0;
	padding: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	border: 0;
	border-radius: 50%;
	background: var(--enb-accent);
	color: #fff;
	cursor: pointer;
	box-shadow: none;
}

.enb-ov-main { flex: 1; min-height: 0; display: flex; }
.enb-ov-side {
	flex: 0 0 270px;
	overflow-y: auto;
	padding: 18px 22px 30px 28px;
	border-right: 1px solid var(--enb-line);
}
.enb-ov-side-head, .enb-ov-apply { display: none; }
.enb-ov-nofacets .enb-ov-side, .enb-ov-nofacets .enb-ov-fbtn { display: none; }

.enb-fg { padding: 12px 0 14px; border-bottom: 1px solid var(--enb-line); }
.enb-fg:last-child { border-bottom: 0; }
.enb-fh {
	display: flex;
	width: 100%;
	align-items: center;
	justify-content: space-between;
	padding: 4px 0 10px;
	min-height: 0;
	border: 0;
	background: none;
	box-shadow: none;
	font-size: 13px;
	font-weight: 700;
	letter-spacing: .05em;
	text-transform: uppercase;
	color: var(--enb-fg);
	cursor: pointer;
}
.enb-fh svg { transition: transform .15s; }
.enb-closed .enb-fh svg { transform: rotate(180deg); }
.enb-closed .enb-fl { display: none; }
.enb-fi {
	display: flex;
	align-items: center;
	gap: 10px;
	margin: 0;
	padding: 7px 0;
	cursor: pointer;
	font-weight: 400;
	color: var(--enb-fg);
}
.enb-fi input {
	flex: none;
	width: 18px;
	height: 18px;
	margin: 0;
	accent-color: var(--enb-accent);
	cursor: pointer;
}
.enb-fi span { flex: 1; min-width: 0; }
.enb-fi small { flex: none; color: var(--enb-muted); font-size: 12px; }
.enb-fi small:before { content: "("; }
.enb-fi small:after { content: ")"; }
.enb-fi.enb-extra { display: none; }
.enb-all-open .enb-fi.enb-extra { display: flex; }
.enb-fmore {
	margin-top: 4px;
	padding: 4px 0;
	min-height: 0;
	border: 0;
	background: none;
	box-shadow: none;
	color: var(--enb-accent);
	font-size: 13px;
	font-style: italic;
	cursor: pointer;
	text-transform: none;
}

.enb-ov-res { flex: 1; min-width: 0; overflow-y: auto; padding: 18px 28px 40px; }
.enb-ov-bar {
	display: flex;
	align-items: center;
	gap: 14px;
	min-height: 38px;
	margin-bottom: 14px;
}
.enb-ov-count { flex: 1; color: var(--enb-muted); }
.enb-ov-count strong { color: var(--enb-fg); }
.enb-approx {
	display: inline-block;
	margin-left: 8px;
	padding: 2px 8px;
	border-radius: 999px;
	background: #fff4d6;
	color: #7a5300;
	font-size: 12px;
}
.enb-ov-fbtn { display: none; }
.enb-ov-sort {
	width: auto;
	height: 38px;
	padding: 0 32px 0 12px;
	border: 1px solid var(--enb-line);
	border-radius: 6px;
	background-color: #fff;
	font-size: 14px;
	color: var(--enb-fg);
}
.enb-ov-sort[hidden] { display: none; }

.enb-ov-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
	gap: 8px;
	transition: opacity .15s;
}
.enb-ov-busy .enb-ov-grid { opacity: .55; }
.enb-card {
	display: flex;
	flex-direction: column;
	gap: 6px;
	padding: 14px 14px 18px;
	border-radius: 10px;
	color: var(--enb-fg);
	text-decoration: none;
	text-align: center;
	transition: background .15s, box-shadow .15s;
}
.enb-card:hover { background: #fff; box-shadow: 0 6px 22px rgba(15, 23, 42, .09); color: var(--enb-fg); }
.enb-img {
	display: block;
	aspect-ratio: 1 / 1;
	margin-bottom: 6px;
	border-radius: 8px;
	overflow: hidden;
}
.enb-img img { width: 100%; height: 100%; object-fit: contain; display: block; transition: transform .25s; }
.enb-card:hover .enb-img img { transform: scale(1.04); }
.enb-brand { font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--enb-muted); }
.enb-card .enb-t {
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
	font-size: 15px;
	color: var(--enb-accent);
}
.enb-card .enb-p { margin-top: auto; padding-top: 2px; font-size: 15px; }
.enb-none { display: flex; flex-direction: column; gap: 6px; padding: 60px 10px; text-align: center; grid-column: 1 / -1; color: var(--enb-muted); }
.enb-none strong { font-size: 18px; color: var(--enb-fg); }
.enb-ov-end { height: 1px; }

@media (max-width: 1024px) {
	.enb-ov-top { gap: 12px; padding: 10px 14px; }
	.enb-ov-logo { display: none; }
	.enb-ov-field input[type="search"] { font-size: 19px; }
	.enb-ov-cart { display: none; }
	.enb-ov-close { width: 36px; height: 36px; }
	.enb-ov-res { padding: 12px 12px 40px; }
	.enb-ov-grid { grid-template-columns: repeat(2, 1fr); gap: 4px; }
	.enb-card { padding: 10px 8px 14px; }
	.enb-card .enb-t { font-size: 14px; }
	.enb-card .enb-p { font-size: 14px; }
	.enb-card .enb-p del { display: block; margin: 0 0 2px; font-size: 12px; }
	.enb-ov-clear { font-size: 12px; }
	.enb-ov-fbtn {
		display: inline-flex;
		align-items: center;
		gap: 6px;
		height: 38px;
		min-height: 0;
		padding: 0 14px;
		border: 1px solid var(--enb-line);
		border-radius: 6px;
		background: #fff;
		box-shadow: none;
		color: var(--enb-fg);
		font-size: 14px;
		text-transform: none;
		cursor: pointer;
	}
	.enb-ov-count { flex-basis: 100%; order: -1; }
	.enb-ov-bar { flex-wrap: wrap; }
	.enb-ov-sort { flex: 1; }
	/* Filtros como panel lateral en móvil */
	.enb-ov-side {
		position: fixed;
		inset: 0 auto 0 0;
		z-index: 2;
		width: min(86vw, 340px);
		padding: 0 18px 80px;
		background: #fff;
		border: 0;
		box-shadow: 0 0 0 100vmax rgba(15, 23, 42, .35);
		transform: translateX(-105%);
		transition: transform .2s ease-out;
		visibility: hidden;
	}
	.enb-ov-side-open .enb-ov-side { transform: none; visibility: visible; }
	.enb-ov-side-head {
		position: sticky;
		top: 0;
		display: flex;
		align-items: center;
		justify-content: space-between;
		padding: 16px 0 10px;
		background: #fff;
		font-size: 16px;
	}
	.enb-ov-side-close { padding: 6px; min-height: 0; border: 0; background: none; box-shadow: none; color: var(--enb-fg); cursor: pointer; }
	.enb-ov-apply {
		display: block;
		position: fixed;
		left: 18px;
		bottom: 16px;
		width: calc(min(86vw, 340px) - 36px);
		height: 46px;
		border: 0;
		border-radius: 8px;
		background: var(--enb-accent);
		color: #fff;
		font-weight: 600;
		cursor: pointer;
	}
}

/* ================= Desplegable ================= */

.enb-drop {
	position: fixed;
	z-index: 100000;
	max-height: min(78vh, 640px);
	overflow-y: auto;
	background: var(--enb-bg);
	border: 1px solid var(--enb-line);
	border-radius: 10px;
	box-shadow: 0 12px 36px rgba(15, 23, 42, .16);
}
.enb-head { padding: 12px 14px 6px; font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--enb-muted); }
.enb-cols { display: flex; }
.enb-side { flex: 0 0 190px; padding-bottom: 10px; border-right: 1px solid var(--enb-line); }
.enb-list { flex: 1; min-width: 0; padding-bottom: 6px; }
.enb-chip { display: block; padding: 6px 14px; color: var(--enb-fg); text-decoration: none; }
.enb-chip:hover { background: var(--enb-soft); color: var(--enb-accent); }
.enb-item { display: flex; gap: 12px; align-items: center; padding: 8px 14px; color: var(--enb-fg); text-decoration: none; }
.enb-item:hover, .enb-item.enb-on, .enb-all.enb-on { background: var(--enb-soft); }
.enb-item img, .enb-noimg { flex: 0 0 56px; width: 56px; height: 56px; object-fit: contain; border-radius: 6px; background: #fafafa; }
.enb-txt { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.enb-item .enb-t { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.enb-empty { padding: 18px 14px; color: var(--enb-muted); }
.enb-all { display: block; padding: 12px 14px; border-top: 1px solid var(--enb-line); font-weight: 600; color: var(--enb-accent); text-decoration: none; text-align: center; }
.enb-approx-notice { padding: 10px 14px; margin: 0 0 20px; background: #fff8e6; border-left: 3px solid #f0b429; border-radius: 4px; }
@media (max-width: 640px) {
	.enb-cols { flex-direction: column-reverse; }
	.enb-side { flex: none; border-right: 0; border-top: 1px solid var(--enb-line); }
	.enb-chip { display: inline-block; padding: 6px 12px; margin: 0 0 4px 8px; border: 1px solid var(--enb-line); border-radius: 999px; }
}
