/* Dónde Jugar Listings — Gallery + lightbox. */

/* Gallery (single-listing detail). */
/* Prefixed with `button` so width:100% outranks hello-elementor's
   [type=button] rule (same specificity as a plain class) — see board.css. */
button.djl-gallery__main {
	position: relative;
	display: block;
	width: 100%;
	padding: 0;
	border: 0;
	background: #eef1f4;
	cursor: zoom-in;
	border-radius: 8px;
	overflow: hidden;
	/* Uniform frame for the main image regardless of the source aspect ratio,
	   so swapping in a tall/short image never resizes the frame or shifts the
	   thumbs. The image is taken out of flow (absolute) so its intrinsic size
	   can't drag the frame height — the height comes purely from the ratio. */
	aspect-ratio: 4 / 3;
}

.djl-gallery__main .djl-detail__img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.djl-gallery__thumbs {
	display: flex;
	flex-wrap: nowrap;
	gap: 0.5rem;
	margin-top: 0.5rem;
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	-webkit-overflow-scrolling: touch;
	padding-bottom: 0.35rem;
	scrollbar-width: thin;
}

.djl-gallery__thumb {
	flex: 0 0 84px;
	width: 84px;
	height: 84px;
	min-width: 84px;
	max-width: 84px;
	padding: 0;
	border: 2px solid transparent;
	border-radius: 6px;
	background: none;
	cursor: pointer;
	overflow: hidden;
	scroll-snap-align: start;
}

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

.djl-gallery__thumb.is-active {
	border-color: var(--djl-accent, #d35400);
}

/* Lightbox overlay. */
body.djl-lightbox-lock {
	overflow: hidden;
}

.djl-lightbox {
	display: none;
	position: fixed;
	inset: 0;
	z-index: 100000;
	background: rgba(0, 0, 0, 0.85);
	align-items: center;
	justify-content: center;
	padding: 2rem;
}

.djl-lightbox.is-open {
	display: flex;
}

.djl-lightbox__img {
	max-width: 92vw;
	max-height: 88vh;
	object-fit: contain;
	border-radius: 6px;
	box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.djl-lightbox__close {
	position: absolute;
	top: 1rem;
	right: 1rem;
	width: 2.5rem;
	height: 2.5rem;
	font-size: 1.8rem;
	line-height: 1;
	color: #fff;
	background: rgba(0, 0, 0, 0.4);
	border: 0;
	border-radius: 50%;
	cursor: pointer;
}

.djl-lightbox__nav {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	width: 3rem;
	height: 3rem;
	font-size: 2rem;
	line-height: 1;
	color: #fff;
	background: rgba(0, 0, 0, 0.4);
	border: 0;
	border-radius: 50%;
	cursor: pointer;
}

.djl-lightbox__nav--prev { left: 1rem; }
.djl-lightbox__nav--next { right: 1rem; }

.djl-lightbox__close:hover,
.djl-lightbox__nav:hover {
	background: var(--djl-accent, #d35400);
}
