/* Galeria de fotos de la ficha de oferta (visor a pantalla completa). */

/* ---------- Foto principal + boton "Ver fotos" ---------- */
.detail-hero__photo {
	position: relative;
}
.gal-hero {
	display: block;
	width: 100%;
	padding: 0;
	border: 0;
	background: none;
	cursor: zoom-in;
	border-radius: var(--radius-lg);
	overflow: hidden;
}
.gal-hero img {
	transition: transform .6s var(--ease);
}
.gal-hero:hover img {
	transform: scale(1.03);
}
.gal-badge {
	position: absolute;
	right: 16px;
	bottom: 16px;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 10px 18px;
	border: 1px solid rgba(255, 255, 255, .5);
	border-radius: var(--radius-pill);
	background: rgba(3, 20, 45, .62);
	-webkit-backdrop-filter: blur(8px);
	backdrop-filter: blur(8px);
	color: #fff;
	font-family: var(--font-display);
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
	transition: background-color .2s var(--ease), transform .2s var(--ease);
}
.gal-badge:hover {
	background: var(--color-accent);
	border-color: var(--color-accent);
	color: var(--color-primary-dark);
	transform: translateY(-2px);
}
.gal-badge svg {
	flex: none;
}

/* ---------- Visor ---------- */
html.gal-lock {
	overflow: hidden;
}
.gal[hidden] {
	display: none;
}
.gal {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: flex;
	flex-direction: column;
	background: rgba(2, 13, 30, .95);
	-webkit-backdrop-filter: blur(10px);
	backdrop-filter: blur(10px);
	opacity: 0;
	transition: opacity .2s ease;
	font-family: var(--font-body);
	color: #fff;
}
.gal.is-open {
	opacity: 1;
}
.gal__top {
	flex: none;
	display: grid;
	grid-template-columns: 1fr auto 1fr;
	align-items: center;
	gap: 16px;
	padding: 16px 20px;
}
.gal__counter {
	font-size: 14px;
	font-weight: 600;
	letter-spacing: .04em;
	color: rgba(255, 255, 255, .85);
}
.gal__title {
	max-width: 60vw;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	font-size: 15px;
	font-weight: 500;
	color: rgba(255, 255, 255, .7);
}
.gal__close {
	justify-self: end;
}
.gal__btn {
	display: grid;
	place-items: center;
	width: 46px;
	height: 46px;
	padding: 0;
	border: 1px solid rgba(255, 255, 255, .25);
	border-radius: 50%;
	background: rgba(255, 255, 255, .1);
	color: #fff;
	cursor: pointer;
	transition: background-color .2s var(--ease), transform .2s var(--ease);
}
.gal__btn:hover {
	background: rgba(255, 255, 255, .24);
	transform: scale(1.06);
}
.gal__btn:focus-visible,
.gal__thumb:focus-visible {
	outline: 3px solid var(--color-accent);
	outline-offset: 2px;
}
.gal__stage {
	position: relative;
	flex: 1;
	min-height: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0 76px;
}
.gal__img {
	max-width: 100%;
	max-height: 100%;
	object-fit: contain;
	border-radius: 12px;
	box-shadow: 0 24px 70px rgba(0, 0, 0, .55);
	transition: opacity .25s ease;
	-webkit-user-select: none;
	user-select: none;
}
.gal.is-loading .gal__img {
	opacity: .25;
}
.gal__spinner {
	position: absolute;
	top: 50%;
	left: 50%;
	width: 42px;
	height: 42px;
	margin: -21px 0 0 -21px;
	border: 3px solid rgba(255, 255, 255, .25);
	border-top-color: var(--color-accent);
	border-radius: 50%;
	opacity: 0;
	animation: gal-spin .8s linear infinite;
	pointer-events: none;
}
.gal.is-loading .gal__spinner {
	opacity: 1;
}
@keyframes gal-spin {
	to { transform: rotate(360deg); }
}
.gal__nav {
	position: absolute;
	top: 50%;
	width: 54px;
	height: 54px;
	margin-top: -27px;
}
.gal__nav:hover {
	transform: scale(1.08);
}
.gal__nav--prev { left: 12px; }
.gal__nav--next { right: 12px; }
.gal__thumbs {
	flex: none;
	display: flex;
	gap: 10px;
	padding: 16px 20px 22px;
	overflow-x: auto;
	scrollbar-width: thin;
	scrollbar-color: rgba(255, 255, 255, .3) transparent;
}
.gal__thumb {
	flex: none;
	width: 96px;
	height: 64px;
	padding: 0;
	border: 2px solid transparent;
	border-radius: 10px;
	background: #0B2340;
	overflow: hidden;
	cursor: pointer;
	opacity: .55;
	transition: opacity .2s var(--ease), border-color .2s var(--ease), transform .2s var(--ease);
}
.gal__thumb img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}
.gal__thumb:hover {
	opacity: .9;
}
.gal__thumb.is-active {
	opacity: 1;
	border-color: var(--color-accent);
	transform: translateY(-2px);
}
/* Si hay pocas miniaturas, se centran. */
@media (min-width: 900px) {
	.gal__thumbs {
		justify-content: safe center;
	}
}
@media (max-width: 700px) {
	.gal__top {
		padding: 12px 14px;
		grid-template-columns: 1fr auto;
	}
	.gal__title {
		display: none;
	}
	.gal__stage {
		padding: 0 8px;
	}
	.gal__img {
		border-radius: 8px;
	}
	.gal__nav {
		display: none;
	}
	.gal__thumb {
		width: 72px;
		height: 50px;
	}
}
@media (prefers-reduced-motion: reduce) {
	.gal, .gal__img, .gal__thumb, .gal__btn, .gal-hero img {
		transition: none;
	}
	.gal__spinner {
		animation-duration: 2s;
	}
}

.gal__thumbs[hidden],
.gal__nav[hidden] {
	display: none;
}
