.wp-block-uve-builder-sabores-galeria.novaSaboresGallery[class] {
	--uve-block-current-margin-top: 0px;
	--uve-block-current-margin-bottom: 0px;
	padding: clamp(42px, 6.3vw, 90px) clamp(22px, 5.2vw, 72px);
}

.novaSaboresGallery--daily {
	background: #f3f3f5;
}

.novaSaboresGallery__inner {
	max-width: 1280px;
	margin-inline: auto;
}

.novaSaboresGallery__title {
	margin: 0;
	font-size: clamp(25px, 3vw, 42px);
	font-weight: 600;
	line-height: 1.1;
	letter-spacing: -0.035em;
	text-transform: uppercase;
}

.novaSaboresGallery__description {
	max-width: 65ch;
	margin: 14px 0 0;
	line-height: 1.6;
}

.novaSaboresGallery__grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: clamp(8px, 1vw, 14px);
	margin-top: clamp(20px, 2.5vw, 32px);
}

.novaSaboresGallery--daily .novaSaboresGallery__grid {
	grid-template-columns: repeat(2, minmax(0, 1fr));
}

.novaSaboresGallery__photo {
	position: relative;
	overflow: hidden;
	aspect-ratio: 1;
	margin: 0;
	background: #e8e7e4;
}

.novaSaboresGallery--daily .novaSaboresGallery__photo {
	aspect-ratio: 4 / 3;
}

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

.novaSaboresGallery__photo figcaption {
	position: absolute;
	inset: auto 0 0;
	padding: 36px 14px 13px;
	background: linear-gradient(transparent, rgba(0, 0, 0, .9) 84%);
	color: #fff;
	font-size: clamp(12px, 1.05vw, 15px);
	font-weight: 600;
	line-height: 1.35;
	text-align: left;
}

@media (max-width: 700px) {
	.novaSaboresGallery__grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 480px) {
	.novaSaboresGallery__grid,
	.novaSaboresGallery--daily .novaSaboresGallery__grid {
		grid-template-columns: 1fr;
	}
}

/*
 * Degustación: rejilla de fotos cuadradas, todas del mismo tamaño y alineadas con el título.
 * La tarjeta naranja va al final y ocupa las casillas libres de la última fila,
 * así nunca quedan huecos (se calcula con su posición: es siempre el último elemento).
 */
.novaSaboresGallery--tasting .novaSaboresGallery__title {
	font-size: clamp(32px, 4.2vw, 56px);
	font-weight: 700;
	line-height: 1.05;
	letter-spacing: -0.04em;
	text-transform: none;
	color: #202020;
}

.novaSaboresGallery--tasting .novaSaboresGallery__description {
	max-width: 820px;
	margin-top: clamp(14px, 1.6vw, 22px);
	font-size: clamp(16px, 1.4vw, 20px);
	line-height: 1.75;
	color: #444;
}

.novaSaboresGallery--tasting .novaSaboresGallery__grid {
	grid-template-columns: repeat(4, minmax(0, 1fr));
	align-items: stretch;
	gap: clamp(14px, 2vw, 28px);
	margin-top: clamp(32px, 4.4vw, 64px);
}

.novaSaboresGallery--tasting .novaSaboresGallery__photo {
	width: 100%;
	border-radius: 16px;
	box-shadow: 0 12px 28px rgb(0 0 0 / 14%);
}

.novaSaboresGallery--tasting .novaSaboresGallery__photo figcaption {
	padding: 56px 18px 18px;
	background: linear-gradient(transparent, rgb(0 0 0 / 78%) 72%);
	font-size: clamp(13px, 1.15vw, 17px);
	font-weight: 700;
	line-height: 1.3;
}

.novaSaboresGallery__card {
	display: flex;
	align-items: flex-end;
	min-width: 0;
	min-height: 100%;
	padding: clamp(18px, 2vw, 28px);
	border-radius: 16px;
	background: #ef7c23;
	box-shadow: 0 12px 28px rgb(0 0 0 / 14%);
}

.novaSaboresGallery__cardText {
	margin: 0;
	font-size: clamp(22px, 2.5vw, 36px);
	font-weight: 700;
	line-height: 1.05;
	letter-spacing: -0.02em;
	color: #202020;
}

/* Tarjeta sola en una casilla: cuadrada como las fotos. */
.novaSaboresGallery--tasting .novaSaboresGallery__card {
	aspect-ratio: 1;
}

/* 4 columnas: la tarjeta rellena el resto de la última fila. */
@media (min-width: 1025px) {
	.novaSaboresGallery--tasting .novaSaboresGallery__card:nth-child(4n+1) { grid-column: 1 / -1; }
	.novaSaboresGallery--tasting .novaSaboresGallery__card:nth-child(4n+2) { grid-column: span 3; }
	.novaSaboresGallery--tasting .novaSaboresGallery__card:nth-child(4n+3) { grid-column: span 2; }
	.novaSaboresGallery--tasting .novaSaboresGallery__card:not(:nth-child(4n)) { aspect-ratio: auto; }
	.novaSaboresGallery--tasting .novaSaboresGallery__card:nth-child(4n+1) { min-height: clamp(150px, 14vw, 200px); }
}

/* 3 columnas. */
@media (min-width: 701px) and (max-width: 1024px) {
	.novaSaboresGallery--tasting .novaSaboresGallery__grid {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}

	.novaSaboresGallery--tasting .novaSaboresGallery__card:nth-child(3n+1) { grid-column: 1 / -1; }
	.novaSaboresGallery--tasting .novaSaboresGallery__card:nth-child(3n+2) { grid-column: span 2; }
	.novaSaboresGallery--tasting .novaSaboresGallery__card:not(:nth-child(3n)) { aspect-ratio: auto; }
	.novaSaboresGallery--tasting .novaSaboresGallery__card:nth-child(3n+1) { min-height: 160px; }
}

/* 2 columnas. */
@media (max-width: 700px) {
	.novaSaboresGallery--tasting .novaSaboresGallery__grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 12px;
	}

	.novaSaboresGallery--tasting .novaSaboresGallery__photo,
	.novaSaboresGallery--tasting .novaSaboresGallery__card {
		border-radius: 14px;
	}

	.novaSaboresGallery--tasting .novaSaboresGallery__photo figcaption {
		padding: 40px 12px 12px;
	}

	.novaSaboresGallery--tasting .novaSaboresGallery__card {
		padding: 14px;
	}

	.novaSaboresGallery__cardText {
		font-size: clamp(18px, 5.4vw, 26px);
		overflow-wrap: anywhere;
	}

	.novaSaboresGallery--tasting .novaSaboresGallery__card:nth-child(2n+1) {
		grid-column: 1 / -1;
		aspect-ratio: auto;
		min-height: 130px;
	}
}
