/* ============================================
   EW Woo Gallery - Masonry Layout + Lightbox
   ============================================ */

/* --- Masonry Grid --- */
.ew-gallery {
	column-count: 3;
	column-gap: 12px;
}

.ew-gallery__item {
	break-inside: avoid;
	margin-bottom: 12px;
	overflow: hidden;
	line-height: 0;
}

.ew-gallery__item img {
	width: 100%;
	height: auto;
	display: block;
	border-radius: 6px;
	transition: transform 0.3s ease, filter 0.3s ease;
}

.ew-gallery__item a {
	display: block;
	cursor: zoom-in;
}

.ew-gallery__item img:hover {
	transform: scale(1.03);
	filter: brightness(1.05);
}

/* --- Lightbox Overlay --- */
.ew-lightbox {
	position: fixed;
	inset: 0;
	z-index: 100000;
	background: rgba(0, 0, 0, 0.92);
	display: flex;
	align-items: center;
	justify-content: center;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.3s ease, visibility 0.3s ease;
}

.ew-lightbox.is-open {
	opacity: 1;
	visibility: visible;
}

.ew-lightbox__img {
	max-width: 90vw;
	max-height: 90vh;
	object-fit: contain;
	border-radius: 4px;
	transition: opacity 0.25s ease;
	user-select: none;
	-webkit-user-drag: none;
}

.ew-lightbox__img.is-loading {
	opacity: 0;
}

/* --- Lightbox Controls --- */
.ew-lightbox__close,
.ew-lightbox__prev,
.ew-lightbox__next {
	position: absolute;
	background: none;
	border: none;
	color: #fff;
	cursor: pointer;
	padding: 12px;
	opacity: 0.7;
	transition: opacity 0.2s ease;
	line-height: 1;
	z-index: 1;
}

.ew-lightbox__close:hover,
.ew-lightbox__prev:hover,
.ew-lightbox__next:hover {
	opacity: 1;
}

.ew-lightbox__close {
	top: 16px;
	right: 16px;
	font-size: 32px;
}

.ew-lightbox__prev,
.ew-lightbox__next {
	top: 50%;
	transform: translateY(-50%);
	font-size: 40px;
}

.ew-lightbox__prev {
	left: 16px;
}

.ew-lightbox__next {
	right: 16px;
}

/* --- Counter --- */
.ew-lightbox__counter {
	position: absolute;
	bottom: 16px;
	left: 50%;
	transform: translateX(-50%);
	color: rgba(255, 255, 255, 0.7);
	font-size: 14px;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	user-select: none;
}
