/* CTE Productos Destacados: una fila por producto destacado, alternando
   el lado de la imagen en zigzag (fila 1 imagen-texto, fila 2
   texto-imagen, fila 3 imagen-texto...), separadas por una línea recta.
   Sin bordes redondeados en ningún sitio (imagen, botón), a juego con el
   resto del sistema CTE.
   Cambia --cte-fd-accent si quieres otro color de acento en vez de negro,
   y --cte-fd-img-height / --cte-fd-img-height-mobile para el alto de la
   imagen en escritorio/móvil (mejor desde los ajustes del módulo en
   Divi — "Image height..." — que tocando esto a mano). */

.cte-featured {
	--cte-fd-accent: #000000;
	--cte-fd-text: #222222;
	--cte-fd-accent-text: #ffffff;
	--cte-fd-img-height: 420px;
	--cte-fd-img-height-mobile: 220px;
	display: flex;
	flex-direction: column;
}

.cte-featured__row {
	display: flex;
	align-items: center;
	gap: 48px;
	padding: 40px 0;
	border-bottom: 1px solid #e5e5e5;
}

.cte-featured__row:last-child {
	border-bottom: none;
}

/* Fila 1 imagen-izquierda / texto-derecha (orden normal del DOM), fila 2
   al revés, fila 3 otra vez normal... — o justo al contrario si el
   ajuste "First row starts with" del módulo está en "Text on the left". */
.cte-featured--start-image .cte-featured__row:nth-child(even) {
	flex-direction: row-reverse;
}

.cte-featured--start-text .cte-featured__row:nth-child(odd) {
	flex-direction: row-reverse;
}

.cte-featured__image-link,
.cte-featured__body {
	flex: 1 1 0;
	min-width: 0;
}

/* Fondo blanco detrás de la imagen: como se ve ENTERA (sin recortar, ver
   "object-fit: contain" debajo), si la foto no llena todo el hueco deja
   ver este fondo a los lados/arriba-abajo en vez de un recorte feo. */
.cte-featured__image-link {
	display: block;
	overflow: hidden;
	background: #ffffff;
}

.cte-featured__image,
.cte-featured__image--placeholder {
	display: block;
	width: 100%;
	height: var(--cte-fd-img-height);
	/* "contain" en vez de "cover": la foto se ve SIEMPRE entera, sin
	   recortar ningún borde, aunque no llene el hueco entero. */
	object-fit: contain;
	background: #ffffff;
	/* Sombra suave que seguí el contorno real del PNG (son siempre PNGs
	   con fondo transparente) en vez de un rectángulo detrás — por eso
	   "filter: drop-shadow" y no "box-shadow". */
	filter: drop-shadow(0 10px 18px rgba(0, 0, 0, .16));
	transition: transform .25s ease;
}

.cte-featured__image-link:hover .cte-featured__image {
	transform: scale(1.03);
}

.cte-featured__body {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 16px;
}

.cte-featured__title {
	margin: 0;
	font-size: 26px;
	font-weight: 700;
	line-height: 1.25;
	letter-spacing: .01em;
	color: var(--cte-fd-text);
}

.cte-featured__title a {
	color: inherit;
	text-decoration: none;
}

.cte-featured__title a:hover {
	text-decoration: underline;
}

.cte-featured__excerpt {
	margin: 0;
	font-size: 15px;
	line-height: 1.6;
	color: var(--cte-fd-text);
	opacity: .8;
}

.cte-featured__excerpt p {
	margin: 0 0 .6em;
}

.cte-featured__excerpt p:last-child {
	margin-bottom: 0;
}

/* Botón: fondo negro (o el color de acento que elijas), letras blancas,
   recto sin bordes redondeados — mismo lenguaje visual que el resto del
   sistema CTE (menú, badges de categoría). */
.cte-featured__button {
	display: inline-block;
	margin-top: 4px;
	padding: 13px 28px;
	background: var(--cte-fd-accent);
	color: var(--cte-fd-accent-text);
	font-size: 13px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .06em;
	text-decoration: none;
	border-radius: 0;
	transition: opacity .15s ease;
}

.cte-featured__button:hover {
	opacity: .85;
	color: var(--cte-fd-accent-text);
}

.cte-featured__empty {
	opacity: .7;
}

/* En móvil/tablet, siempre en columna (imagen arriba, texto debajo),
   pase lo que pase con la alternancia de escritorio. */
@media (max-width: 900px) {
	.cte-featured__row {
		flex-direction: column !important;
		align-items: stretch;
		gap: 20px;
		padding: 28px 0;
	}

	/* En escritorio la fila es horizontal (flex-direction: row), así que
	   "flex: 1 1 0" reparte ANCHO entre imagen y texto sin problema. Pero
	   aquí la fila pasa a ser columna, y ese mismo "flex: 1 1 0" reparte
	   ALTO en su lugar — combinado con el "overflow: hidden" del enlace,
	   eso hace que el navegador le calcule un alto mínimo de 0 y recorte
	   la imagen entera (se quedaba invisible). Con "flex: 0 0 auto" el
	   enlace vuelve a medir lo que ocupe su contenido (la imagen, con su
	   alto fijo de aquí abajo), en vez de intentar repartir alto. */
	.cte-featured__image-link {
		flex: 0 0 auto;
	}

	.cte-featured__image,
	.cte-featured__image--placeholder {
		height: var(--cte-fd-img-height-mobile);
	}

	.cte-featured__body {
		align-items: stretch;
	}

	.cte-featured__title {
		font-size: 21px;
	}

	.cte-featured__button {
		text-align: center;
	}
}
