/**
 * Tek Market product lightbox.
 * Owns: product image modal and Woo zoom safety.
 */

.woocommerce div.product div.images .woocommerce-product-gallery__image a {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
	min-height: inherit;
	position: relative;
	overflow: hidden;
}

.woocommerce div.product div.images .woocommerce-product-gallery__image a img {
	display: block;
}

.woocommerce div.product div.images img.zoomImg,
.woocommerce-page div.product div.images img.zoomImg {
	width: auto;
	height: auto;
	max-width: none;
	max-height: none;
	min-width: 0;
	min-height: 0;
	object-fit: fill;
	padding: 0;
	margin: 0;
	border: 0;
	background: transparent;
	box-shadow: none;
	border-radius: 0;
	z-index: 20;
}

.woocommerce div.product div.images .woocommerce-product-gallery__trigger {
	z-index: 30;
}

.woocommerce div.product div.images .woocommerce-product-gallery__image {
	overflow: hidden;
	border-radius: var(--tkm-radius);
}

.woocommerce div.product div.images .woocommerce-product-gallery__wrapper {
	overflow: visible;
}

.tkm-product-lightbox {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: none;
	align-items: center;
	justify-content: center;
	padding: clamp(1rem, 4vw, 3rem);
	background: rgba(0, 18, 46, .88);
}

.tkm-product-lightbox[aria-hidden="false"] {
	display: flex;
}

.tkm-product-lightbox__stage {
	position: relative;
	max-width: min(1100px, 96vw);
	max-height: 88vh;
	overflow: hidden;
	border-radius: 18px;
	background: #fff;
	box-shadow: 0 28px 90px rgba(0,0,0,.36);
}

.tkm-product-lightbox__stage img {
	display: block;
	width: auto;
	max-width: 96vw;
	height: auto;
	max-height: 88vh;
	object-fit: contain;
	background: #fff;
}

.tkm-product-lightbox__close {
	position: fixed;
	top: 1rem;
	right: 1rem;
	z-index: 2;
	width: 44px;
	height: 44px;
	display: grid;
	place-items: center;
	border: 0;
	border-radius: 999px;
	background: #fff;
	color: #001f4e;
	font-size: 2rem;
	line-height: 1;
	cursor: pointer;
}

.tkm-product-lightbox.is-loading .tkm-product-lightbox__stage::before,
.woocommerce-product-gallery img.tkm-image-hydrating {
	background: linear-gradient(110deg, #eef5ff 8%, #ffffff 18%, #eef5ff 33%);
	background-size: 200% 100%;
	animation: tkmImgHydrate 1s linear infinite;
}

.tkm-product-lightbox.is-loading .tkm-product-lightbox__stage::before {
	content: "";
	display: block;
	width: min(70vw, 620px);
	height: min(60vh, 460px);
}

.woocommerce-product-gallery img.tkm-image-hydrating {
	opacity: .18;
}

body.tkm-product-lightbox-open {
	overflow: hidden;
}

@keyframes tkmImgHydrate {
	to {
		background-position-x: -200%;
	}
}
