/* SearchMT Mega Search
   Variables personalizables desde el CSS del tema. */
.smt {
	--smt-accent: #8a1538;      /* granate */
	--smt-link: #1a5f7a;        /* enlaces/sugerencias */
	--smt-text: #4a4a4a;
	--smt-muted: #8a8a8a;
	--smt-bg: #ffffff;
	--smt-border: #e5e5e5;
	--smt-radius: 6px;
	position: relative;
	display: inline-block;
	font-size: 16px;
	line-height: 1.5;
}

/* Bloqueo del scroll de fondo cuando el panel cubre la pantalla */
html.smt-noscroll,
html.smt-noscroll body {
	overflow: hidden;
}

/* ---- Estado colapsado: solo la lupa ---- */
.smt__toggle {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: var(--smt-toggle-size, 44px);
	height: var(--smt-toggle-size, 44px);
	border: 1px solid var(--smt-toggle-border, var(--smt-border));
	border-radius: 50%;
	background: var(--smt-toggle-bg, var(--smt-bg));
	color: var(--smt-toggle-color, var(--smt-text));
	cursor: pointer;
	transition: color .2s, border-color .2s, background .2s, box-shadow .2s;
}
.smt__toggle:hover,
.smt--open .smt__toggle {
	color: var(--smt-toggle-hover, var(--smt-accent));
	border-color: var(--smt-toggle-hover, var(--smt-accent));
	background: var(--smt-toggle-hover-bg, var(--smt-toggle-bg, var(--smt-bg)));
	box-shadow: 0 2px 10px rgba(0, 0, 0, .08);
}
.smt__icon {
	width: var(--smt-icon-size, 22px);
	height: var(--smt-icon-size, 22px);
	flex: none;
}

/* ---- Panel megamenú ----
   Por defecto anclado al borde derecho de la lupa (para esquina superior
   derecha del header): se expande hacia la izquierda sin salirse de pantalla. */
.smt__panel {
	position: absolute;
	top: calc(100% + 10px);
	right: 0;
	z-index: 99999;
	width: min(var(--smt-panel-width, 860px), 92vw);
	background: var(--smt-bg);
	border: 1px solid var(--smt-border);
	border-radius: var(--smt-radius);
	box-shadow: 0 12px 40px rgba(0, 0, 0, .14);
	opacity: 0;
	transform: translateY(-6px);
	pointer-events: none;
	transition: opacity .18s ease, transform .18s ease;
}
.smt--open .smt__panel {
	opacity: 1;
	transform: translateY(0);
	pointer-events: auto;
}

/* Lupa en el lado izquierdo: el panel abre hacia la derecha */
.smt--panel-left .smt__panel {
	right: auto;
	left: 0;
}
.smt__panel[hidden] {
	display: block; /* lo controla la opacidad; hidden solo evita el flash inicial */
}

/* Modo overlay a ancho completo (como el ejemplo de referencia) */
.smt--fullwidth .smt__panel {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	width: 100%;
	min-height: 420px;
	border-radius: 0;
	border: 0;
	transform: translateY(-10px);
}
.smt--fullwidth.smt--open .smt__panel {
	transform: translateY(0);
}

/* ---- Barra de búsqueda dentro del panel ---- */
.smt__form {
	display: flex;
	align-items: center;
	gap: 14px;
	padding: 18px 24px;
	border-bottom: 1px solid var(--smt-border);
}
.smt__form .smt__icon {
	color: var(--smt-muted);
}
.smt__input {
	flex: 1;
	border: 0;
	outline: none;
	font-size: 20px;
	color: var(--smt-text);
	background: transparent;
	min-width: 0;
}
.smt__input::placeholder {
	color: #b9b9c5;
}
.smt__input::-webkit-search-cancel-button {
	display: none;
}
.smt__clear {
	border: 0;
	background: transparent;
	color: var(--smt-muted);
	font-size: 24px;
	line-height: 1;
	cursor: pointer;
	padding: 4px 8px;
	visibility: hidden;
}
.smt--typed .smt__clear {
	visibility: visible;
}
.smt__close {
	border: 0;
	background: transparent;
	color: var(--smt-text);
	font-size: 16px;
	cursor: pointer;
	padding: 4px 8px;
	white-space: nowrap;
}
.smt__close span {
	color: var(--smt-accent);
	margin-left: 6px;
	font-size: 18px;
}

/* ---- Cuerpo del panel ---- */
.smt__body {
	padding: 28px 32px 36px;
	max-height: 70vh;
	overflow-y: auto;
}
.smt__default,
.smt__results {
	display: flex;
	gap: 48px;
	flex-wrap: wrap;
}
.smt__col {
	flex: 1 1 220px;
	min-width: 200px;
}
.smt__col--wide {
	flex: 2 1 420px;
}
.smt__heading {
	margin: 0 0 14px;
	font-size: 13px;
	font-weight: 600;
	letter-spacing: .02em;
	color: var(--smt-muted);
}
.smt__group + .smt__group {
	margin-top: 26px;
}
.smt__list {
	list-style: none;
	margin: 0;
	padding: 0;
}
.smt__list li {
	margin: 0 0 12px;
}
.smt__list a {
	color: var(--smt-link);
	text-decoration: none;
	font-size: 19px;
}
.smt__list a:hover {
	text-decoration: underline;
}
.smt__list a mark {
	background: none;
	color: inherit;
	font-weight: 700;
}
.smt__result-list a {
	color: var(--smt-text);
	font-size: 19px;
}
.smt__empty {
	color: var(--smt-muted);
	font-size: 16px;
	margin: 4px 0 0;
}

/* ---- Tarjetas de acceso rápido ---- */
.smt__cards {
	display: flex;
	gap: 20px;
	flex-wrap: wrap;
}
.smt__card {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	flex: 1 1 180px;
	min-height: 130px;
	border-radius: var(--smt-radius);
	background: #2b2b2b center / cover no-repeat;
	color: #fff;
	text-decoration: none;
	font-size: 18px;
	text-align: center;
	overflow: hidden;
}
.smt__card::before {
	content: "";
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, .35);
	transition: background .2s;
}
.smt__card:hover::before {
	background: rgba(0, 0, 0, .5);
}
.smt__card span {
	position: relative;
	padding: 0 12px;
}

/* ---- Tablet ---- */
@media (max-width: 1024px) {
	.smt__panel {
		width: min(var(--smt-panel-width, 860px), 94vw);
	}
	.smt__body {
		padding: 22px 24px 30px;
	}
	.smt__default,
	.smt__results {
		gap: 28px;
	}
	.smt__input {
		font-size: 18px;
	}
	.smt__list a,
	.smt__result-list a {
		font-size: 17px;
	}
	.smt__card {
		min-height: 110px;
		font-size: 16px;
	}
}

/* ---- Móvil: panel a pantalla completa ---- */
@media (max-width: 600px) {
	.smt__panel,
	.smt--fullwidth .smt__panel {
		position: fixed;
		top: 0;
		left: 0;
		right: 0;
		bottom: 0;
		width: 100%;
		min-height: 0;
		height: 100vh;
		height: 100dvh;
		border: 0;
		border-radius: 0;
		display: flex;
		flex-direction: column;
	}
	.smt__form {
		padding: 14px 16px;
		gap: 10px;
	}
	.smt__input {
		font-size: 16px; /* evita el zoom automático de iOS */
	}
	.smt__close {
		font-size: 14px;
		padding: 4px 6px;
	}
	.smt__body {
		flex: 1;
		padding: 20px 16px 28px;
		max-height: none;
		overflow-y: auto;
		-webkit-overflow-scrolling: touch;
	}
	.smt__default,
	.smt__results {
		flex-direction: column;
		gap: 24px;
	}
	.smt__col,
	.smt__col--wide {
		flex: 1 1 auto;
		min-width: 0;
	}
	.smt__heading {
		margin-bottom: 10px;
	}
	.smt__list li {
		margin-bottom: 10px;
	}
	.smt__list a,
	.smt__result-list a {
		font-size: 16px;
	}
	.smt__cards {
		gap: 12px;
	}
	.smt__card {
		flex: 1 1 100%;
		min-height: 90px;
		font-size: 16px;
	}
}
