/**
 * Desplegable de prebúsqueda bajo el buscador de la cabecera.
 */
form.has-suggest {
	position: relative;
}

.vt-suggest {
	position: absolute;
	top: calc(100% + 8px);
	left: 0;
	right: 0;
	z-index: 300;
	max-height: min(72vh, 620px);
	overflow-y: auto;
	padding: 8px;
	border: 1px solid var(--wp--preset--color--line-soft, #e8e8e8);
	border-radius: 16px;
	background: #fff;
	box-shadow: 0 24px 50px -20px rgba(17, 24, 39, 0.35);
	text-align: left;
}

@media (prefers-reduced-motion: no-preference) {
	.vt-suggest:not([hidden]) {
		animation: vt-suggest-in 0.18s ease;
	}

	@keyframes vt-suggest-in {
		from {
			opacity: 0;
			transform: translateY(-4px);
		}
		to {
			opacity: 1;
			transform: none;
		}
	}
}

.vt-suggest[hidden] {
	display: none;
}

.vt-suggest__heading {
	margin: 8px 10px 4px;
	color: var(--wp--preset--color--muted, #555);
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.12em;
	text-transform: uppercase;
}

.vt-suggest a {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 8px 10px;
	border-radius: 10px;
	color: var(--wp--preset--color--ink, #000);
	text-decoration: none;
}

.vt-suggest a:hover,
.vt-suggest a.is-active {
	background: var(--wp--preset--color--surface, #f2f2f2);
	text-decoration: none;
}

.vt-suggest mark {
	padding: 0;
	background: rgba(252, 188, 52, 0.45);
	color: inherit;
	border-radius: 2px;
}

/* Autocompletado */
.vt-suggest__term {
	justify-content: space-between;
}

.vt-suggest__term::before {
	content: "";
	flex-shrink: 0;
	width: 16px;
	height: 16px;
	background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23777' stroke-width='2.2' stroke-linecap='round'%3E%3Ccircle cx='10.5' cy='10.5' r='6.5'/%3E%3Cpath d='m20 20-4.8-4.8'/%3E%3C/svg%3E") center / contain no-repeat;
}

.vt-suggest__term-name {
	flex: 1;
	font-weight: 600;
}

.vt-suggest__term-meta {
	color: var(--wp--preset--color--muted, #555);
	font-size: 13px;
	white-space: nowrap;
}

/* Vehículos */
.vt-suggest__thumb {
	flex-shrink: 0;
	width: 64px;
	height: 48px;
	overflow: hidden;
	border-radius: 8px;
	background: var(--wp--preset--color--surface, #f2f2f2);
}

.vt-suggest__thumb img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.vt-suggest__info {
	flex: 1;
	min-width: 0;
	display: flex;
	flex-direction: column;
	line-height: 1.3;
}

.vt-suggest__title {
	overflow: hidden;
	font-weight: 700;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.vt-suggest__meta {
	overflow: hidden;
	color: var(--wp--preset--color--muted, #555);
	font-size: 13px;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.vt-suggest__side {
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	gap: 4px;
}

.vt-suggest__badge {
	padding: 1px 8px;
	border-radius: 999px;
	background: rgba(252, 188, 52, 0.25);
	color: #7a5500;
	font-size: 11px;
	font-weight: 700;
	text-transform: uppercase;
}

.vt-suggest__badge.is-nuevo {
	background: rgba(31, 36, 102, 0.1);
	color: var(--wp--preset--color--navy, #1f2466);
}

.vt-suggest__ref {
	color: var(--wp--preset--color--muted, #555);
	font-size: 12px;
	white-space: nowrap;
}

.vt-suggest__empty {
	margin: 0;
	padding: 14px 10px;
	color: var(--wp--preset--color--muted, #555);
}

.vt-suggest a.vt-suggest__all {
	justify-content: center;
	margin-top: 6px;
	border-top: 1px solid var(--wp--preset--color--line-soft, #e8e8e8);
	border-radius: 0 0 10px 10px;
	color: var(--wp--preset--color--navy, #1f2466);
	font-weight: 700;
}

/* Indicador de búsqueda en curso */
form.has-suggest.is-searching .wp-block-search__button svg {
	animation: vt-suggest-pulse 0.8s ease-in-out infinite alternate;
}

@keyframes vt-suggest-pulse {
	to {
		opacity: 0.35;
	}
}

@media (max-width: 600px) {
	.vt-suggest {
		max-height: 60vh;
	}

	.vt-suggest__thumb {
		width: 52px;
		height: 40px;
	}

	.vt-suggest__term-meta {
		font-size: 12px;
	}
}
