/* ============================================================
   Sawir Product Image Zoom for WooCommerce overlay styles
   ============================================================ */

/* Overlay */
#wc-lightbox-overlay {
	display: none;
	position: fixed;
	inset: 0;
	z-index: 99999;
	background: rgba(0, 0, 0, 0.92);
	align-items: center;
	justify-content: center;
	animation: wc-lb-fade-in 0.2s ease;
}

#wc-lightbox-overlay.is-open {
	display: flex;
}

@keyframes wc-lb-fade-in {
	from { opacity: 0; }
	to   { opacity: 1; }
}

/* Image wrapper */
#wc-lightbox-content {
	display: flex;
	align-items: center;
	justify-content: center;
	max-width: 90vw;
	max-height: 90vh;
	position: relative;
}

#wc-lightbox-img {
	max-width: 88vw;
	max-height: 88vh;
	object-fit: contain;
	border-radius: 4px;
	box-shadow: 0 8px 40px rgba(0, 0, 0, 0.6);
	transition: opacity 0.2s ease, transform 0.25s cubic-bezier(0.25, 0.46, 0.45, 0.94);
	display: block;
	cursor: zoom-in;
	user-select: none;
	-webkit-user-drag: none;
}

#wc-lightbox-img.is-loading {
	opacity: 0;
}

/* Zoomed state */
#wc-lightbox-overlay.is-zoomed #wc-lightbox-img {
	cursor: zoom-out;
	border-radius: 0;
	/* disable the smooth transition while panning for instant feedback */
}

#wc-lightbox-overlay.is-zoomed.is-dragging #wc-lightbox-img {
	transition: opacity 0.2s ease;   /* remove transform transition during drag */
	cursor: grabbing;
}

#wc-lightbox-overlay.is-zoomed:not(.is-dragging) #wc-lightbox-img {
	cursor: grab;
}

/* Hide nav buttons while zoomed so they don't interfere */
#wc-lightbox-overlay.is-zoomed #wc-lightbox-prev,
#wc-lightbox-overlay.is-zoomed #wc-lightbox-next {
	opacity: 0;
	pointer-events: none;
}

/* Shared button base */
#wc-lightbox-overlay button {
	background: none;
	border: none;
	cursor: pointer;
	color: #fff;
	line-height: 1;
	transition: opacity 0.15s, transform 0.15s;
}

#wc-lightbox-overlay button:hover {
	opacity: 0.75;
}

/* Close */
#wc-lightbox-close {
	position: fixed;
	top: 18px;
	right: 22px;
	font-size: 2.4rem;
	padding: 4px 8px;
	z-index: 1;
}

#wc-lightbox-close:hover {
	transform: scale(1.15);
}

/* Prev / Next */
#wc-lightbox-prev,
#wc-lightbox-next {
	position: fixed;
	top: 50%;
	transform: translateY(-50%);
	font-size: 4rem;
	padding: 12px 20px;
	user-select: none;
	z-index: 1;
}

#wc-lightbox-prev { left: 12px; }
#wc-lightbox-next { right: 12px; }

#wc-lightbox-prev:hover,
#wc-lightbox-next:hover {
	transform: translateY(-50%) scale(1.1);
}

/* Hide nav when only one image */
#wc-lightbox-overlay.single-image #wc-lightbox-prev,
#wc-lightbox-overlay.single-image #wc-lightbox-next {
	display: none;
}

/* Counter */
#wc-lightbox-counter {
	position: fixed;
	bottom: 18px;
	left: 50%;
	transform: translateX(-50%);
	color: rgba(255, 255, 255, 0.7);
	font-size: 0.85rem;
	letter-spacing: 0.04em;
}

/* Mobile tweaks */
@media (max-width: 600px) {
	#wc-lightbox-prev,
	#wc-lightbox-next {
		font-size: 2.8rem;
		padding: 8px 12px;
	}

	#wc-lightbox-close {
		font-size: 2rem;
		top: 10px;
		right: 12px;
	}
}
