/* Yel Novedades Grid — estilos basados en la grilla original (The Grid, skin Maren personalizado) */

.yel-novedades {
	/* Toma los colores globales de Divi 5 (Global Colors) y cae a los valores de marca si no existen. */
	--yel-azul: var(--gcid-primary-color, #0e0069);
	--yel-naranja: var(--gcid-secondary-color, #ff6b00);
	--yel-gris: var(--gcid-body-color, #515151);
	--yel-gris-claro: #999999;
	--yel-borde: #bbbbbb;
	--yel-borde-suave: #dddddd;
	--yel-img-alto: 270px;
	--yel-img-radio: 18px;
	display: block;
	width: 100%;
	font-family: inherit;
	clear: both;
}

.yel-novedades * {
	box-sizing: border-box;
}

/* ---------- Barra superior: filtros + buscador ---------- */

.yel-novedades-top {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	align-items: center;
	gap: 20px;
	padding-bottom: 20px;
	margin-bottom: 40px;
}

.yel-filtros {
	display: inline-flex;
	flex-wrap: wrap;
	justify-content: center;
}

.yel-novedades .yel-filtro {
	-webkit-appearance: none;
	appearance: none;
	background: #fff;
	border: 1px solid var(--yel-borde);
	border-radius: 0;
	color: var(--yel-gris-claro);
	font-family: inherit;
	font-size: 14px;
	font-weight: 600;
	line-height: 30px;
	padding: 0 15px;
	margin: 0 0 0 -1px;
	cursor: pointer;
	white-space: nowrap;
	transition: color .2s ease, box-shadow .2s ease;
}

.yel-novedades .yel-filtro:first-child {
	margin-left: 0;
}

.yel-novedades .yel-filtro:hover,
.yel-novedades .yel-filtro:focus-visible {
	color: var(--yel-azul);
	outline: none;
	position: relative;
	z-index: 1;
}

.yel-novedades .yel-filtro.activo {
	color: var(--yel-azul);
	box-shadow: 0 3px 5px 0 rgba(0, 0, 0, .13);
	position: relative;
	z-index: 1;
}

.yel-buscador {
	display: inline-flex;
	align-items: center;
	height: 32px;
	border: 1px solid var(--yel-borde-suave);
	background: #fff;
	color: var(--yel-gris-claro);
}

.yel-buscador-icono {
	display: inline-flex;
	align-items: center;
	padding: 0 8px 0 12px;
	color: var(--yel-gris-claro);
}

.yel-novedades input.yel-buscar {
	-webkit-appearance: none;
	appearance: none;
	border: 0;
	outline: none;
	background: #fff;
	box-shadow: none;
	margin: 0;
	padding: 0 10px 0 0;
	height: 30px;
	width: 150px;
	max-width: 50vw;
	color: var(--yel-gris-claro);
	font-family: inherit;
	font-size: 14px;
	font-weight: 600;
	line-height: 30px;
}

.yel-novedades input.yel-buscar::placeholder {
	color: var(--yel-gris-claro);
	opacity: 1;
}

.yel-novedades input.yel-buscar::-webkit-search-cancel-button {
	display: none;
}

.yel-novedades .yel-buscar-limpiar {
	-webkit-appearance: none;
	appearance: none;
	background: transparent;
	border: 0;
	border-left: 1px solid var(--yel-borde-suave);
	border-radius: 0;
	color: var(--yel-gris-claro);
	font-size: 20px;
	line-height: 30px;
	height: 30px;
	width: 32px;
	padding: 0;
	margin: 0;
	cursor: pointer;
}

.yel-novedades .yel-buscar-limpiar:hover {
	color: var(--yel-azul);
}

/* ---------- Grilla ---------- */

/* Se incluye la variante con #id para ganar en especificidad a reglas previas del tema (#contenedor-novedades). */
.yel-novedades .contenedor-novedades,
.yel-novedades #contenedor-novedades {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	row-gap: 70px;
	column-gap: 40px;
	width: 100%;
}

.yel-novedades .contenedor-novedades.columnas-1,
.yel-novedades #contenedor-novedades.columnas-1 { grid-template-columns: minmax(0, 1fr); }
.yel-novedades .contenedor-novedades.columnas-3,
.yel-novedades #contenedor-novedades.columnas-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.yel-novedades .contenedor-novedades.columnas-4,
.yel-novedades #contenedor-novedades.columnas-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.yel-novedades.cargando .contenedor-novedades {
	opacity: .55;
	transition: opacity .2s ease;
}

/* ---------- Tarjeta ---------- */

.yel-novedades .item-novedad {
	display: block;
	margin: 0;
	padding: 0;
	font-family: inherit;
	animation: yel-aparecer .35s ease both;
}

@keyframes yel-aparecer {
	from { opacity: 0; transform: translateY(8px); }
	to   { opacity: 1; transform: none; }
}

.yel-novedades .imagen-novedad-link {
	display: block;
	text-decoration: none;
}

.yel-novedades .imagen-novedad {
	display: block;
	width: 100%;
	height: var(--yel-img-alto);
	background-color: #f0f0f5;
	background-size: cover;
	background-position: center;
	background-repeat: no-repeat;
	border-radius: var(--yel-img-radio);
	transition: transform .3s ease, box-shadow .3s ease;
}

.yel-novedades .imagen-novedad-link:hover .imagen-novedad {
	box-shadow: 0 8px 24px rgba(14, 0, 105, .12);
}

.yel-novedades .imagen-novedad.sin-imagen {
	background-image: linear-gradient(135deg, #f0f0f5 0%, #e1e1ee 100%);
}

.yel-novedades .categorias-novedad {
	display: inline-block !important;
	color: var(--yel-gris) !important;
	text-transform: uppercase !important;
	font-size: 14px !important;
	font-weight: 200 !important;
	line-height: 1 !important;
	padding: 15px 0 !important;
	border: 0 !important;
}

.yel-novedades .categorias-novedad a {
	color: inherit !important;
	text-decoration: none;
}

.yel-novedades .categorias-novedad a:hover {
	color: var(--yel-azul) !important;
}

.yel-novedades .titulo-novedad {
	margin: 0 !important;
	padding: 16px 0 0 !important;
	color: var(--yel-azul) !important;
	font-size: 25px !important;
	font-weight: 600 !important;
	line-height: 1.2 !important;
	text-transform: none !important;
	border-top: 0.25px solid rgba(14, 0, 105, .25) !important;
}

.yel-novedades .titulo-novedad a {
	color: inherit !important;
	text-decoration: none;
}

.yel-novedades .titulo-novedad a:hover {
	color: var(--yel-naranja) !important;
}

.yel-novedades .extracto-novedad {
	margin: 0 !important;
	padding: 18px 0 40px !important;
	color: var(--yel-gris) !important;
	font-size: 18px !important;
	font-weight: 300 !important;
	line-height: 22px !important;
}

.yel-novedades .datos-novedades {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 16px;
}

.yel-novedades .datos-novedades span,
.yel-novedades .dato-fecha {
	color: var(--yel-gris) !important;
	font-size: 14px !important;
	font-weight: 200 !important;
	font-style: normal !important;
	line-height: 1 !important;
}

.yel-novedades .leer-m {
	float: none;
	margin-left: auto;
	white-space: nowrap;
}

.yel-novedades .leer-m a {
	color: inherit !important;
	text-transform: uppercase;
	text-decoration: none;
}

.yel-novedades .leer-m a:hover {
	color: var(--yel-azul) !important;
}

/* ---------- Mensajes ---------- */

.yel-novedades .yel-sin-resultados,
.yel-novedades .yel-error {
	text-align: center;
	color: var(--yel-gris);
	font-size: 18px;
	font-weight: 300;
	padding: 40px 0 0;
	margin: 0;
}

.yel-novedades .yel-error {
	color: #c0392b;
}

/* ---------- Botón "Cargar más" ---------- */

.yel-novedades .btn-cargar-novedades {
	-webkit-appearance: none;
	appearance: none;
	display: block;
	width: 100%;
	max-width: 270px;
	margin: 50px auto 0;
	padding: 18px 0;
	background: var(--yel-naranja);
	color: #fff;
	border: 0;
	border-radius: 16px;
	font-family: inherit;
	font-size: 18px;
	font-weight: 300;
	line-height: 1.2;
	text-align: center;
	cursor: pointer;
	transition: background .2s ease;
}

.yel-novedades .btn-cargar-novedades:hover,
.yel-novedades .btn-cargar-novedades:focus-visible {
	background: var(--yel-azul);
	color: #fff;
	outline: none;
}

.yel-novedades .btn-cargar-novedades[disabled] {
	opacity: .6;
	cursor: wait;
}

.yel-novedades [hidden] {
	display: none !important;
}

/* ---------- Responsive ---------- */

@media (max-width: 980px) {
	.yel-novedades .contenedor-novedades.columnas-3,
	.yel-novedades .contenedor-novedades.columnas-4,
	.yel-novedades #contenedor-novedades.columnas-3,
	.yel-novedades #contenedor-novedades.columnas-4 {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 767px) {
	.yel-novedades .contenedor-novedades,
	.yel-novedades #contenedor-novedades,
	.yel-novedades .contenedor-novedades.columnas-3,
	.yel-novedades .contenedor-novedades.columnas-4,
	.yel-novedades #contenedor-novedades.columnas-3,
	.yel-novedades #contenedor-novedades.columnas-4 {
		grid-template-columns: minmax(0, 1fr);
		row-gap: 50px;
	}

	.yel-novedades-top {
		margin-bottom: 30px;
	}

	.yel-novedades .titulo-novedad {
		font-size: 22px !important;
	}

	.yel-novedades input.yel-buscar {
		width: 130px;
	}
}
