.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;
	}

}

/* === Estilos para sistema de filtros === */
.xml-loop-wrapper {
	width: 100%;
}

/* Botones flotantes móvil (ocultos por defecto) */
.xml-mobile-filter-buttons {
	display: none;
}

.xml-btn-apply-mobile {
	display: none;
}

.xml-filters-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 20px;
}

.xml-btn-close-filters {
	display: none;
	background: #ff4444;
	color: white;
	border: none;
	border-radius: 50%;
	width: 32px;
	height: 32px;
	font-size: 20px;
	cursor: pointer;
	transition: all 0.2s;
	align-items: center;
	justify-content: center;
	line-height: 1;
}

.xml-btn-close-filters:hover {
	background: #cc0000;
	transform: rotate(90deg);
}

.xml-filters-section {
	background: transparent;
	border-radius: 32px;
	padding: 24px;
	margin-bottom: 32px;
	border: solid 1px #fff;
	box-shadow: 0 2px 8px rgba(30, 241, 198, 0.08);
	max-width: 1440px;
	margin-left: auto;
	margin-right: auto;
	border: 1px solid #000000;
}

.xml-filters-section h3 {
	margin: 0;
	font-size: 20px;
	font-weight: 600;
	color: #737373 !important;
    font-family: 'Ubuntu' !important;
}

.xml-filters-grid {
	display: grid;
	grid-template-columns: 1fr 1fr 1fr 1fr 50px;
	gap: 16px;
	margin-bottom: 20px;
}

.xml-filter-item {
	display: flex;
	flex-direction: column;
}

.xml-filter-item label {
	font-size: 14px;
	font-weight: 500;
	color: #737373 !important;
    font-family: 'Ubuntu' !important;
	margin-bottom: 6px;
}

.xml-filter-select,
.xml-range-inputs input {
	padding: 10px 12px;
	border: 1px solid rgba(30, 241, 198, 0.5);
	border-radius: 32px;
	font-size: 14px;
	background: #000;
	color: #ffffff;
	transition: border-color 0.2s;
}

.xml-filter-select {
	-webkit-appearance: none;
	-moz-appearance: none;
	appearance: none;
	background-image: url('data:image/svg+xml;charset=UTF-8,%3csvg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="rgb(30, 241, 198)" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"%3e%3cpolyline points="6 9 12 15 18 9"%3e%3c/polyline%3e%3c/svg%3e');
	background-repeat: no-repeat;
	background-position: right 8px center;
	background-size: 16px;
	padding-right: 32px;
}

.xml-range-inputs input {
	background: transparent;
}

.xml-filter-select:focus,
.xml-range-inputs input:focus {
	outline: none;
	border-color: #1ef1c6;
}

.xml-range-inputs {
	display: flex;
	align-items: center;
	gap: 8px;
}

.xml-range-inputs input {
	flex: 1;
}

.xml-range-inputs span {
	color: #fff;
	font-weight: 500;
}

/* Range sliders container */
.xml-range-container {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.xml-range-value {
	color: #FFFFFF !important;
    font-family: 'Ubuntu' !important;
	font-weight: 600;
	font-size: 14px;
	text-align: left;
}

/* Estilo de los range sliders */
.xml-slider {
	-webkit-appearance: none;
	appearance: none;
	width: 100%;
	height: 6px;
	border-radius: 3px;
	background: #333;
	outline: none;
	opacity: 0.9;
	transition: opacity 0.2s;
}

.xml-slider:hover {
	opacity: 1;
}

/* Thumb de WebKit (Chrome, Safari) */
.xml-slider::-webkit-slider-thumb {
	-webkit-appearance: none;
	appearance: none;
	width: 18px;
	height: 18px;
	border-radius: 50%;
	background: #1ef1c6;
	cursor: pointer;
	box-shadow: 0 0 8px rgba(30, 241, 198, 0.5);
	transition: all 0.2s;
}

.xml-slider::-webkit-slider-thumb:hover {
	background: #17d4ac;
	transform: scale(1.1);
	box-shadow: 0 0 12px rgba(30, 241, 198, 0.8);
}

/* Thumb de Firefox */
.xml-slider::-moz-range-thumb {
	width: 18px;
	height: 18px;
	border-radius: 50%;
	background: #1ef1c6;
	cursor: pointer;
	border: none;
	box-shadow: 0 0 8px rgba(30, 241, 198, 0.5);
	transition: all 0.2s;
}

.xml-slider::-moz-range-thumb:hover {
	background: #17d4ac;
	transform: scale(1.1);
	box-shadow: 0 0 12px rgba(30, 241, 198, 0.8);
}

/* Header para el precio con botón clear */
.xml-filter-price-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 4px;
}

.xml-filter-price-header label {
	margin-bottom: 0;
}

/* Contenedor del botón clear como filtro independiente */
.xml-filter-clear {
	display: flex;
	align-items: flex-end;
	justify-content: center;
	padding-bottom: 8px;
	max-width: 50px;
	width: 50px;
}

.xml-btn-clear {
	background: #ffffff;
	color: #000000;
	border: none;
	border-radius: 4px;
	width: 48px;
	height: 48px;
	font-size: 20px;
	font-weight: bold;
	cursor: pointer;
	transition: all 0.2s;
	flex-shrink: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	line-height: 1;
}

.xml-btn-clear:hover {
	background: #ffffff;
	color: #000000;
	transform: rotate(90deg);
}

.xml-btn-primary,
.xml-btn-secondary {
	padding: 12px 24px;
	border-radius: 4px;
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
	transition: all 0.2s;
	border: none;
	margin-right: 12px;
}

.xml-btn-primary {
	background: #1ef1c6;
	color: #111;
}

.xml-btn-primary:hover {
	background: #17d6af;
	transform: translateY(-1px);
	box-shadow: 0 4px 12px rgba(30, 241, 198, 0.3);
}

.xml-btn-secondary {
	background: #e9ecef;
	color: #555;
}

.xml-btn-secondary:hover {
	background: #dee2e6;
}

.xml-sort-section {
	background: transparent;
	border: 0;
	border-radius: 8px;
	padding: 16px 20px;
	margin-bottom: 24px;
	display: flex;
	align-items: center;
	gap: 12px;
	max-width: 1440px;
	margin-left: auto;
	margin-right: auto;
}

.xml-sort-section label {
	font-size: 14px;
	font-weight: 500;
	color: #737373 !important;
    font-family: 'Ubuntu' !important;
	margin: 0;
}

.xml-sort-select {
	padding: 8px 12px;
	border: 1px solid rgba(30, 241, 198, 0.5);
	border-radius: 32px;
	font-size: 14px;
	background: #000;
	min-width: 200px;
	color: #fff;
	-webkit-appearance: none;
	-moz-appearance: none;
	appearance: none;
	background-image: url('data:image/svg+xml;charset=UTF-8,%3csvg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="rgb(30, 241, 198)" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"%3e%3cpolyline points="6 9 12 15 18 9"%3e%3c/polyline%3e%3c/svg%3e');
	background-repeat: no-repeat;
	background-position: right 8px center;
	background-size: 16px;
	padding-right: 32px;
}

/* Animaciones para filtrado */
.xml-item {
	opacity: 1;
	transform: scale(1);
	transition: opacity 0.3s ease, transform 0.3s ease;
}

.xml-item.filtering-out {
	opacity: 0;
	transform: scale(0.95);
}

.xml-item.filtering-in {
	animation: fadeInScale 0.4s ease forwards;
}

@keyframes fadeInScale {
	from {
		opacity: 0;
		transform: scale(0.95);
	}
	to {
		opacity: 1;
		transform: scale(1);
	}
}

/* Responsive para filtros */
@media only screen and (max-width: 768px) {
	/* Mostrar botones flotantes sticky a la izquierda en horizontal */
	.xml-mobile-filter-buttons {
		display: flex;
		flex-direction: row;
		position: fixed;
		top: 100px;
		left: 20px;
		gap: 12px;
		z-index: 998;
	}
	
	.xml-btn-clear-mobile,
	.xml-btn-open-filters {
		background: #1ef1c6;
		color: #000;
		border: none;
		border-radius: 50%;
		width: 56px;
		height: 56px;
		font-size: 24px;
		cursor: pointer;
		box-shadow: 0 4px 12px rgba(30, 241, 198, 0.4);
		display: flex;
		align-items: center;
		justify-content: center;
		transition: all 0.3s;
	}
	
	.xml-btn-clear-mobile svg,
	.xml-btn-open-filters svg {
		width: 28px;
		height: 28px;
	}
	
	.xml-btn-clear-mobile:active,
	.xml-btn-open-filters:active {
		transform: scale(0.95);
	}
	
	.xml-btn-clear-mobile {
		background: white;
		color: #000;
		opacity: 0;
		pointer-events: none;
		transition: opacity 0.3s, transform 0.3s, background 0.3s;
	}
	
	.xml-btn-clear-mobile.visible {
		opacity: 1;
		pointer-events: auto;
	}
	
	.xml-btn-clear-mobile svg {
		stroke: #000;
		transition: stroke 0.3s;
	}
	
	.xml-btn-clear-mobile:hover {
		background: white;
	}
	
	.xml-btn-clear-mobile:hover svg {
		stroke: #1ef1c6;
	}
	
	/* Ocultar botón clear desktop */
	.xml-filter-clear {
		display: none;
	}
	
	/* Convertir filtros en modal */
	.xml-filters-section {
		position: fixed;
		top: 0;
		left: 0;
		right: 0;
		bottom: 0;
		background: rgba(0, 0, 0, 0.95);
		z-index: 1000;
		margin: 0;
		border-radius: 0;
		max-width: 100%;
		padding: 20px;
		overflow-y: auto;
		transform: translateX(100%);
		transition: transform 0.3s ease;
	}
	
	.xml-filters-section.active {
		transform: translateX(0);
	}
	
	.xml-btn-close-filters {
		display: flex;
	}
	
	.xml-filters-grid {
		grid-template-columns: 1fr;
	}
	
	/* Ordenar dentro del modal */
	.xml-sort-section {
		background: transparent;
		border: solid 1px rgba(255, 255, 255, 0.3);
		margin-top: 20px;
		margin-bottom: 0;
		padding: 16px;
	}
	
	.xml-sort-section label {
		color: #1ef1c6;
	}
	
	.xml-sort-select {
		width: 100%;
		background: transparent;
		color: white;
		border: 1px solid rgba(30, 241, 198, 0.5);
		padding: 10px 12px;
		border-radius: 4px;
	}
	
	/* Botón aplicar móvil */
	.xml-btn-apply-mobile {
		display: block;
		width: 100%;
		background: #1ef1c6;
		color: #000;
		border: none;
		padding: 16px;
		margin-top: 24px;
		border-radius: 8px;
		font-size: 16px;
		font-weight: 600;
		cursor: pointer;
		transition: all 0.3s;
		box-shadow: 0 4px 12px rgba(30, 241, 198, 0.3);
	}
	
	.xml-btn-apply-mobile:active {
		transform: scale(0.98);
		background: #17d4ac;
	}
	
	.xml-btn-primary,
	.xml-btn-secondary {
		display: block;
		width: 100%;
		margin: 8px 0;
	}
}