.xml-style-cuadricula {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 4px;
}

/* Galería responsive para [galeria] como carrusel horizontal 5/2 */
.xml-galeria-wrapper {
	position: relative;
	width: 100%;
	overflow: hidden;
}

.xml-galeria {
	display: flex;
	gap: 12px;
	overflow-x: auto;
	scroll-behavior: smooth;
	scrollbar-width: none;
	-ms-overflow-style: none;
	padding: 4px 0; /* respiración */
}
.xml-galeria::-webkit-scrollbar { display: none; }

.xml-galeria-item {
	margin: 0;
	padding: 0;
	flex: 0 0 calc((100% - (12px * 4)) / 5); /* 5 visibles en desktop con 4 gaps */
}

.xml-galeria-item img {
	display: block;
	width: 100%;
	height: auto;
	object-fit: cover;
	border-radius: 4px;
}

@media (max-width: 768px) {
	.xml-galeria { gap: 10px; }
	.xml-galeria-item { flex-basis: calc((100% - 10px) / 2); /* 2 visibles en mobile */ }
}

/* Botones de navegación de galería */
.xml-galeria-button {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	width: 36px;
	height: 36px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0;
	margin: 0;
	border: none;
	background: rgba(0,0,0,0.25);
	backdrop-filter: blur(2px);
	cursor: pointer;
	border-radius: 999px;
	z-index: 2;
}
.xml-galeria-button::after {
	content: '';
	display: block;
	width: 20px;
	height: 20px;
	background-color: #000000;
	-webkit-mask: url('../img/flecha.svg') center / contain no-repeat;
	mask: url('../img/flecha.svg') center / contain no-repeat;
}
.xml-galeria-button::after:focus {
	background-color: rgb(30, 241, 198);
}
.xml-galeria-button:hover::after { background-color: rgb(30, 241, 198); }
.xml-galeria-button.prev { left: 6px; }
.xml-galeria-button.prev::after { transform: rotate(180deg); }
.xml-galeria-button.next { right: 6px; }

/* Lightbox sencillo */
.xml-lightbox {
	position: fixed;
	inset: 0;
	background: rgba(0,0,0,0.85);
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 9999;
	cursor: default;
}
.xml-lightbox img {
	max-width: 95vw;
	max-height: 95vh;
	width: auto;
	height: auto;
	border-radius: 6px;
}

.xml-lightbox-btn {
	position: absolute;
	border: none;
	background: rgba(0,0,0,0.3);
	backdrop-filter: blur(2px);
	color: white;
	width: 40px;
	height: 40px;
	border-radius: 999px;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	justify-content: center;
}
.xml-lightbox-btn::after {
	content: '';
	display: block;
	width: 22px;
	height: 22px;
	background: white;
	-webkit-mask: url('../img/flecha.svg') center / contain no-repeat;
	mask: url('../img/flecha.svg') center / contain no-repeat;
}
.xml-lightbox-btn.prev { left: 16px; top: 50%; transform: translateY(-50%); }
.xml-lightbox-btn.prev::after { transform: rotate(180deg); }
.xml-lightbox-btn.next { right: 16px; top: 50%; transform: translateY(-50%); }
.xml-lightbox-btn.close { top: 16px; right: 16px; font-size: 24px; line-height: 1; width: 42px; height: 42px; background: rgba(255,255,255,0.9); color: #000; font-weight: 400; }
.xml-lightbox-btn.close::after { content: none; }

/* Contador centrado */
.xml-lightbox-counter {
	position: absolute;
	left: 50%;
	top: 16px;
	transform: translateX(-50%);
	color: white;
	background: rgba(0,0,0,0.35);
	padding: 6px 10px;
	border-radius: 999px;
	font-size: 14px;
}
/* Igualar alturas dentro de grid a nivel de fila */
.xml-style-cuadricula .xml-item {
	display: flex;
	flex-direction: column;
}

.xml-style-cuadricula .xml-item > .contenedorDiapo {
	flex: 1 1 auto;
	height: 100%;
}

.xml-style-carrusel {
	display: flex;
	overflow-x: auto;
	scroll-behavior: smooth;
	gap: 0px;
	position: relative;
	/* Ocultar scrollbar cross-browser y mejorar UX de arrastre */
	scrollbar-width: none; /* Firefox */
	-ms-overflow-style: none; /* IE/Edge legacy */
	cursor: grab;
	touch-action: pan-x; /* Permitir desplazamiento horizontal táctil */
	align-items: stretch; /* Asegurar misma altura de los items */
	-webkit-overflow-scrolling: touch; /* inercia iOS */
	scroll-snap-type: x mandatory; /* snap horizontal */
}

.xml-style-carrusel::-webkit-scrollbar {
	display: none;
}

/* Estado de arrastre */
.xml-style-carrusel.dragging {
	cursor: grabbing;
	user-select: none;
	-webkit-user-select: none;
}

.xml-carrusel-nav {
	text-align: center;
	margin: 10px 0;
}

.xml-carrusel-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	/* Área clickable mayor sin crecer el icono */
	padding: 8px;
	margin: 0 8px;
	cursor: pointer;
	/* Ocultar cualquier texto (◀ ▶) */
	font-size: 0;
	line-height: 0;
	/* Reset visual */
	background: none !important;
	border: none;
	border-radius: 0;
}

.xml-carrusel-button::after {
	content: '';
	display: block;
	width: 22px;
	height: 22px;
	background-color: #ffffff; /* color base del icono */
	-webkit-mask: url('../img/flecha.svg') center / contain no-repeat;
	mask: url('../img/flecha.svg') center / contain no-repeat;
}

.xml-carrusel-button:hover::after {
	background-color: rgb(30, 241, 198);
}

/* La flecha izquierda se invierte visualmente */
.xml-carrusel-button.prev::after {
	transform: rotate(180deg);
	transform-origin: center;
}
.xml-carrusel-wrapper {
	overflow: hidden;
	width: 100%;
}

.xml-style-carrusel {
	display: flex;
	transition: transform 0.3s ease;
}

/* Hacer que el contenido de cada item ocupe toda la altura disponible */
.xml-style-carrusel .xml-item {
	display: flex;
	flex-direction: column;
}

.xml-style-carrusel .xml-item > .contenedorDiapo {
	flex: 1 1 auto;
	height: 100%;
}

.xml-style-carrusel .xml-item {
	flex: 0 0 33.3333%;
	/* 3 elementos por pantalla */
	box-sizing: border-box;
	scroll-snap-align: start;
	scroll-snap-stop: always;
}

/* En móvil, desactivar el snap por completo */
@media (max-width: 768px) {
	.xml-style-carrusel {
		scroll-snap-type: none;
	}
	.xml-style-carrusel .xml-item {
		scroll-snap-align: none;
		scroll-snap-stop: normal;
	}
}
pre, div > pre {
	font-family: inherit !important;
}

.enlace-oferta svg {
	fill: rgb(30, 241, 198);
	width: 22px;
}

@media only screen and (max-width: 1024px) {
	.xml-style-cuadricula {
		grid-template-columns: repeat(3, 1fr);
		gap: 10px;
	}
}

@media only screen and (max-width: 800px) {
	.xml-style-cuadricula {
		grid-template-columns: repeat(2, 1fr);
		gap: 10px;
	}
}

@media only screen and (max-width: 480px) {
	.xml-style-cuadricula {
		grid-template-columns: repeat(1, 1fr);
		gap: 10px;
	}
	.xml-style-carrusel .xml-item {
		flex: 0 0 85%;
		/* 3 elementos por pantalla */
		box-sizing: border-box;
		scroll-snap-align: start;
		scroll-snap-stop: always;
	}

}