.busqueda-inteligente-wrap {
	position: relative;
	width: 100%;
}

.busqueda-inteligente-panel {
	display: none;
	position: absolute;
	left: 0;
	right: 0;
	top: calc(100% + 4px);
	z-index: 1060;
	background: #fff;
	border: 1px solid #dee2e6;
	border-radius: 8px;
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
	max-height: 360px;
	overflow-y: auto;
}

.busqueda-inteligente-panel.is-open {
	display: block;
}

.busqueda-inteligente-quisiste {
	padding: 10px 14px;
	background: #fffbea;
	border-bottom: 1px solid #f0e6a8;
	font-size: 0.9rem;
}

.busqueda-inteligente-quisiste a {
	font-weight: 600;
	text-decoration: underline;
	color: var(--tp-maqu-primary, #1f2a37);
}

.busqueda-inteligente-section {
	border-bottom: 1px solid #e9ecef;
}

.busqueda-inteligente-section:last-child {
	border-bottom: 0;
}

.busqueda-inteligente-section__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 10px 14px 6px;
	background: #f8f9fa;
	border-bottom: 1px solid #e9ecef;
}

.busqueda-inteligente-section__title {
	font-size: 0.8rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.03em;
	color: #495057;
}

.busqueda-inteligente-section__ver {
	font-size: 0.78rem;
	font-weight: 600;
	color: var(--tp-maqu-primary, #1f2a37);
	text-decoration: underline;
	white-space: nowrap;
	flex-shrink: 0;
}

.busqueda-inteligente-section__ver:hover {
	color: #0d6efd;
}

.busqueda-inteligente-item {
	display: flex;
	flex-direction: row;
	align-items: center;
	gap: 12px;
	width: 100%;
	padding: 10px 14px;
	border: 0;
	border-bottom: 1px solid #f1f3f5;
	background: transparent;
	text-align: left;
	cursor: pointer;
	color: inherit;
	text-decoration: none;
}

.busqueda-inteligente-item__thumb {
	flex-shrink: 0;
	width: 48px;
	height: 48px;
	border-radius: 6px;
	overflow: hidden;
	background: #f1f3f5;
	border: 1px solid #e9ecef;
	display: flex;
	align-items: center;
	justify-content: center;
}

.busqueda-inteligente-item__thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.busqueda-inteligente-item__thumb--icon img {
	object-fit: contain;
	padding: 4px;
}

.busqueda-inteligente-item__thumb--empty {
	background: #f8f9fa url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23adb5bd'%3E%3Cpath d='M4 6h16v12H4V6zm2 2v8h12V8H6zm2 2h8v4H8v-4z'/%3E%3C/svg%3E") center/22px no-repeat;
}

.busqueda-inteligente-item__body {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	min-width: 0;
	flex: 1;
}

.busqueda-inteligente-section .busqueda-inteligente-item:last-child {
	border-bottom: 0;
}

.busqueda-inteligente-item:hover,
.busqueda-inteligente-item.is-active {
	background: #f8f9fa;
}

.busqueda-inteligente-item__label {
	font-weight: 600;
	font-size: 0.95rem;
	line-height: 1.3;
	width: 100%;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.busqueda-inteligente-item__sub {
	font-size: 0.8rem;
	color: #6c757d;
	margin-top: 2px;
	width: 100%;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.busqueda-inteligente-empty {
	padding: 12px 14px;
	font-size: 0.875rem;
	color: #6c757d;
}

.busqueda-inteligente-loading {
	padding: 12px 14px;
	font-size: 0.875rem;
	color: #6c757d;
}

.tpsearchbar__form.busqueda-inteligente-wrap,
.header-v2__search-form.busqueda-inteligente-wrap,
.v2-home-mobile-search__form.busqueda-inteligente-wrap {
	overflow: visible;
}

.busqueda-inteligente-clear {
	display: none;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	width: 28px;
	height: 28px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: transparent;
	color: #6c757d;
	font-size: 0.85rem;
	line-height: 1;
	cursor: pointer;
	transition: color 0.15s ease, background 0.15s ease;
}

.busqueda-inteligente-clear.is-visible {
	display: inline-flex;
}

.busqueda-inteligente-clear:hover,
.busqueda-inteligente-clear:focus-visible {
	color: #1f2a37;
	background: #e9ecef;
	outline: none;
}

/* Header desktop (tpsearchbar): lupa a la derecha */
.tpsearchbar__form .busqueda-inteligente-clear {
	position: absolute;
	right: 48px;
	top: 50%;
	transform: translateY(-50%);
	z-index: 2;
}

.tpsearchbar__form.busqueda-inteligente-has-value input {
	padding-right: 78px;
}

/* Header v2 móvil / barra búsqueda */
.v2-home-mobile-search__form .busqueda-inteligente-clear,
.header-v2__search-form .busqueda-inteligente-clear {
	margin-left: 0.15rem;
	margin-right: 0.1rem;
}

.v2-home-mobile-search__form .busqueda-inteligente-clear {
	position: absolute;
	right: 40px;
	top: 50%;
	transform: translateY(-50%);
	z-index: 2;
	margin: 0;
}

.v2-home-mobile-search__form.busqueda-inteligente-has-value input {
	padding-right: 72px;
}
