/* Reutiliza el buscador en vivo nativo del tema Martfury (form.products-search /
   input.search-field / dropdown .search-results generado por el JS del tema,
   martfury/js/scripts.js, cargado en todo el sitio) — acá solo se restylea, no se
   reimplementa nada de la lógica AJAX ni el ranking de resultados. */
.omega-hw-buscador { position: relative; width: 100%; }
.omega-hw-buscador .products-search { position: relative; display: block; width: 100%; }
.omega-hw-buscador .psearch-content { display: block; width: 100%; }
.omega-hw-buscador .product-cat { display: none; } /* OMEGA no usa categorías en el buscador */
.omega-hw-buscador .search-wrapper { position: relative; width: 100%; }

/* Diseño exacto de la propuesta: un solo input con el ícono adentro a la
   izquierda (no un botón navy separado como en el primer intento). */
.omega-hw-buscador .search-field {
	width: 100%; height: 42px;
	border: 1.5px solid #e2e8f0;
	border-radius: 8px;
	padding: 0 16px 0 44px;
	font-family: GothamBook, Gotham, sans-serif;
	font-size: 14px;
	color: #0f172a;
	background: #f1f5f9;
	outline: none;
	transition: border-color 160ms, box-shadow 160ms, background 160ms;
}
.omega-hw-buscador .search-field:focus {
	border-color: #1e3a8a;
	box-shadow: 0 0 0 3px rgba(30,58,138,0.12);
	background: #fff;
}
.omega-hw-buscador .search-field::placeholder { color: #64748b; }

/* El botón de submit real del tema se convierte en el ícono — sigue siendo
   clickeable/funcional, solo que ahora se ve como el ícono de la propuesta
   en vez de un botón aparte. */
.omega-hw-buscador .search-submit {
	position: absolute;
	left: 14px; top: 50%;
	transform: translateY(-50%);
	width: 20px; height: 20px;
	padding: 0; border: none;
	background-color: transparent !important;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='17' height='17' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2.5'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cpath d='m21 21-4.35-4.35'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: center;
	font-size: 0;
	color: transparent;
	cursor: pointer;
	z-index: 2;
}

/* El JS del tema espera este div YA presente en el HTML (hace
   $currentForm.find('.search-results').html(...) — no lo crea si no existe).
   Por eso vive siempre en el markup, vacío hasta que el JS lo llene; se
   oculta con :empty para que no aparezca como una cajita en blanco antes de
   escribir o cuando no hay resultados que mostrar. */
.omega-hw-buscador .search-results:empty { display: none; }
.omega-hw-buscador .search-results {
	position: absolute;
	top: calc(100% + 8px);
	left: 0; right: 0;
	background: #fff;
	border: 1px solid #e2e8f0;
	border-radius: 10px;
	box-shadow: 0 12px 32px rgba(15,31,92,0.16);
	padding: 12px 8px;
	max-height: 420px;
	overflow-y: auto;
	overflow-x: hidden;
	z-index: 200;
}
.omega-hw-buscador .search-results ul { margin: 0; padding: 0; list-style: none; }
.omega-hw-buscador .search-results ul li {
	display: flex; align-items: center; gap: 10px;
	padding: 8px;
	border-radius: 8px;
	transition: background 140ms;
}
@media (hover: hover) and (pointer: fine) {
	.omega-hw-buscador .search-results ul li:hover { background: #f1f5f9; }
}

.omega-hw-buscador .search-results .image-item {
	flex-shrink: 0;
	display: block;
}
.omega-hw-buscador .search-results .image-item img {
	width: 48px; height: 48px;
	border-radius: 6px;
	border: 1px solid #e2e8f0;
	background: #f1f5f9;
	object-fit: contain;
}
.omega-hw-buscador .search-results .content-item { min-width: 0; flex: 1; }
.omega-hw-buscador .search-results .rating-item { display: none; }

.omega-hw-buscador .search-results .title-item {
	display: -webkit-box;
	-webkit-line-clamp: 2; -webkit-box-orient: vertical;
	overflow: hidden;
	font-family: GothamBook, Gotham, sans-serif !important; font-weight: 600;
	font-size: 13px; line-height: 1.35;
	text-decoration: none;
	margin-bottom: 3px;
}
.omega-hw-buscador .search-results .price-item { font-size: 13px; }
.omega-hw-buscador .search-results .price-item .woocommerce-Price-amount { font-weight: 700; color: #0f1f5c; }
.omega-hw-buscador .search-results .woocommerce-price-suffix { color: #64748b; font-weight: 400; font-size: 11px; margin-left: 4px; }

/* El tema sobreescribe el color de <a> en :hover con !important propio (mismo
   blindaje ya aplicado en el mini-carrito, la card de producto y la pastilla de
   sucursal) — .title-item viene azul #0066cc por defecto en el tema. */
.omega-hw-buscador .search-results a.title-item { color: #0f172a !important; }
@media (hover: hover) and (pointer: fine) {
	.omega-hw-buscador .search-results a.title-item:hover { color: #1e3a8a !important; }
}

@media (max-width: 480px) {
	.omega-hw-buscador .search-results { left: -8px; right: -8px; }
}
