.ax-gallery {
	margin-top: 8px;
}

.ax-gallery-grid {
	display: grid;
	grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr);
	gap: 14px;
	align-items: stretch;
}

.ax-gallery-grid--single {
	grid-template-columns: 1fr;
}

.ax-gallery-side {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 14px;
}

.ax-gallery-item {
	display: block;
	position: relative;
	overflow: hidden;
	min-height: 160px;
	border: 1px solid var(--ax-border, #d9d2c4);
	border-radius: 14px;
	background: var(--ax-sand, #f3ecdf);
	box-shadow: var(--ax-shadow-sm, 0 2px 10px rgba(0, 0, 0, 0.06));
}

.ax-gallery-item--main {
	height: 100%;
	min-height: 360px;
}

.ax-gallery-item img {
	display: block;
	width: 100%;
	height: 100%;
	min-height: 160px;
	object-fit: cover;
	transition: transform 0.35s ease;
}

.ax-gallery-item--main img {
	min-height: 360px;
}

.ax-gallery-item:hover img {
	transform: scale(1.04);
}

/* Fotos adicionales: se usan solo dentro del visor, no se muestran en la portada. */
.ax-gallery-hidden {
	display: none !important;
}

/* Visor de fotos */
.ax-glb {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 16px;
	background: rgba(7, 16, 12, 0.86);
	backdrop-filter: blur(3px);
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	transition: opacity 0.22s ease, visibility 0.22s ease;
}

.ax-glb.is-open {
	opacity: 1;
	visibility: visible;
	pointer-events: auto;
}

.ax-glb__frame {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	width: min(1100px, 100%);
	max-height: calc(100vh - 32px);
}

.ax-glb__img {
	width: auto;
	height: auto;
	max-width: 100%;
	max-height: calc(100vh - 110px);
	border-radius: 14px;
	background: #0b1f17;
	box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
	object-fit: contain;
}

.ax-glb__close,
.ax-glb__prev,
.ax-glb__next {
	position: absolute;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border: none;
	background: rgba(255, 255, 255, 0.14);
	color: #fff;
	cursor: pointer;
	transition: background-color 0.2s ease, transform 0.2s ease;
}

.ax-glb__close:hover,
.ax-glb__prev:hover,
.ax-glb__next:hover {
	background: rgba(255, 255, 255, 0.28);
}

.ax-glb__close {
	top: -8px;
	right: -8px;
	width: 42px;
	height: 42px;
	border-radius: 50%;
	font-size: 2rem;
	line-height: 1;
}

.ax-glb__prev,
.ax-glb__next {
	top: 50%;
	width: 46px;
	height: 46px;
	border-radius: 50%;
	font-size: 2.3rem;
	line-height: 1;
	transform: translateY(-50%);
}

.ax-glb__prev[hidden],
.ax-glb__next[hidden] {
	display: none;
}

.ax-glb__prev {
	left: -6px;
}

.ax-glb__next {
	right: -6px;
}

.ax-glb__prev:hover,
.ax-glb__next:hover {
	transform: translateY(-50%) scale(1.05);
}

.ax-glb__counter {
	position: absolute;
	left: 50%;
	bottom: -36px;
	transform: translateX(-50%);
	color: rgba(255, 255, 255, 0.85);
	font-family: var(--ax-font-body, inherit);
	font-size: 0.86rem;
	letter-spacing: 0.04em;
}

body.ax-glb-open {
	overflow: hidden;
}

@media (max-width: 900px) {
	.ax-gallery-grid {
		grid-template-columns: 1fr;
	}

	.ax-gallery-item--main,
	.ax-gallery-item--main img {
		min-height: 280px;
	}
}

@media (max-width: 600px) {
	.ax-gallery-side {
		grid-template-columns: 1fr 1fr;
	}

	.ax-glb__prev {
		left: 4px;
	}

	.ax-glb__next {
		right: 4px;
	}

	.ax-glb__close {
		top: 4px;
		right: 4px;
	}
}
