/* Product gallery (Swiper replacement for single-product media). */

.ftmps-product-gallery {
	--ftmps-gallery-border: 1px solid var(--color-border-muted, #d4d4d4);
	--ftmps-gallery-radius: 10px;
	--ftmps-gallery-gap: 0.75rem;
	--ftmps-gallery-nav-size: 40px;
	position: relative;
}

.ftmps-product-gallery-main {
	border: var(--ftmps-gallery-border);
	border-radius: var(--ftmps-gallery-radius);
	overflow: hidden;
}

.ftmps-product-gallery-slide {
	align-items: center;
	aspect-ratio: 1 / 1;
	display: flex;
	justify-content: center;
}

.ftmps-product-gallery-slide img,
.ftmps-product-gallery-slide video {
	display: block;
	height: auto;
	max-height: 100%;
	object-fit: cover;
	width: 100%;
}

.ftmps-product-gallery-video {
	background: #000;
}

.ftmps-product-gallery-nav {
	align-items: center;
	background: var(--color-surface, #fff);
	border: var(--ftmps-gallery-border);
	border-radius: 999px;
	color: currentcolor;
	display: inline-flex;
	height: var(--ftmps-gallery-nav-size);
	justify-content: center;
	position: absolute;
	top: calc(50% - (var(--ftmps-gallery-nav-size) / 2));
	width: var(--ftmps-gallery-nav-size);
	z-index: 3;
}

.ftmps-product-gallery-prev {
	left: 0.5rem;
}

.ftmps-product-gallery-next {
	right: 0.5rem;
}

.ftmps-product-gallery-slide--image {
	cursor: zoom-in;
}

.ftmps-product-gallery-expand {
	align-items: center;
	background: var(--color-surface, #fff);
	border: var(--ftmps-gallery-border);
	border-radius: 999px;
	bottom: 0.75rem;
	color: currentcolor;
	cursor: zoom-in;
	display: inline-flex;
	height: 40px;
	justify-content: center;
	position: absolute;
	right: 0.75rem;
	width: 40px;
	z-index: 3;
}

.ftmps-gallery-lightbox {
	align-items: center;
	background: rgb(0 0 0 / 88%);
	cursor: zoom-out;
	display: flex;
	inset: 0;
	justify-content: center;
	overflow: auto;
	padding: 1.5rem;
	position: fixed;
	z-index: 99999;
}

.ftmps-gallery-lightbox-image {
	height: auto;
	max-height: 100%;
	max-width: 100%;
	object-fit: contain;
	width: auto;
}

.ftmps-gallery-lightbox-close {
	align-items: center;
	background: var(--color-surface, #fff);
	border: none;
	border-radius: 999px;
	color: #000;
	cursor: pointer;
	display: inline-flex;
	font-size: 1.25rem;
	height: 44px;
	justify-content: center;
	position: fixed;
	right: 1rem;
	top: 1rem;
	width: 44px;
}

body.ftmps-gallery-lightbox-open {
	overflow: hidden;
}

.ftmps-product-gallery-thumbs {
	margin-top: var(--ftmps-gallery-gap);
}

.ftmps-product-gallery-thumbs .swiper-wrapper {
	display: flex;
	gap: 0.5rem;
}

.ftmps-product-gallery-thumb {
	border: var(--ftmps-gallery-border);
	border-radius: 4px;
	cursor: pointer;
	overflow: hidden;
	position: relative;
	width: 20%;
}

.ftmps-product-gallery-thumb-image {
	display: block;
	height: auto;
	width: 100%;
}

.ftmps-product-gallery-video-badge {
	align-items: center;
	background: rgb(0 0 0 / 70%);
	border-radius: 999px;
	color: #fff;
	display: inline-flex;
	height: 28px;
	justify-content: center;
	left: calc(50% - 14px);
	position: absolute;
	top: calc(50% - 14px);
	width: 28px;
}

.ftmps-product-gallery .swiper-slide-thumb-active {
	outline: 2px solid var(--color-primary, #3a3a3a);
	outline-offset: -2px;
}

@media (max-width: 63.99em) {

	.ftmps-product-gallery-thumbs {
		display: none;
	}
}

@media (min-width: 64em) {

	.ftmps-product-gallery-nav {
		display: none;
	}
}

