.rz-product-gallery {
	box-sizing: border-box;
	position: relative;
}

.rz-product-gallery *,
.rz-product-gallery *::before,
.rz-product-gallery *::after {
	box-sizing: inherit;
}

.rz-product-gallery .woocommerce-product-gallery__trigger {
	display: none;
}

.rz-product-gallery__viewport {
	aspect-ratio: 1 / 1;
	margin: 0 auto 24px;
	position: relative;
	width: 100%;
}

.rz-product-gallery .woocommerce-product-gallery__wrapper {
	height: 100%;
	margin: 0;
	position: relative;
	width: 100%;
}

.rz-product-gallery.is-rz-gallery-ready .woocommerce-product-gallery__wrapper > .rz-product-gallery__slide {
	align-items: center;
	display: none !important;
	float: none !important;
	inset: 0;
	justify-content: center;
	position: absolute;
	width: 100% !important;
}

.rz-product-gallery.is-rz-gallery-ready .woocommerce-product-gallery__wrapper > .rz-product-gallery__slide.is-active {
	display: flex !important;
}

.rz-product-gallery .rz-product-gallery__slide > a,
.rz-product-gallery .rz-product-gallery__video-trigger {
	align-items: center;
	background: transparent;
	border: 0;
	box-shadow: none;
	cursor: pointer;
	display: flex;
	height: 100%;
	justify-content: center;
	margin: 0;
	outline-offset: 4px;
	padding: 0;
	position: relative;
	text-decoration: none;
	width: 100%;
}

.rz-product-gallery .rz-product-gallery__video-trigger {
	background-color: #111;
	background-image: var(--rz-video-preview);
	background-position: center;
	background-repeat: no-repeat;
	background-size: cover;
	overflow: hidden;
}

.rz-product-gallery .rz-product-gallery__video-trigger::before {
	background: rgba(0, 0, 0, 0.16);
	content: "";
	inset: 0;
	position: absolute;
	z-index: 1;
}

.rz-product-gallery .rz-product-gallery__slide img:not(.zoomImg) {
	display: block;
	height: auto !important;
	margin: auto;
	max-height: 100%;
	max-width: 100%;
	object-fit: contain;
	width: auto !important;
}

.rz-product-gallery__arrow {
	align-items: center;
	background: rgba(117, 117, 117, 0.24);
	border: 0;
	border-radius: 50%;
	box-shadow: none;
	cursor: pointer;
	display: flex;
	height: 40px;
	justify-content: center;
	margin: 0;
	opacity: 1;
	padding: 0;
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	transition: background-color 160ms ease, opacity 160ms ease;
	width: 40px;
	z-index: 5;
}

.rz-product-gallery__arrow:hover,
.rz-product-gallery__arrow:focus {
	background: rgba(117, 117, 117, 0.38);
}

.rz-product-gallery__arrow--prev {
	left: 0;
}

.rz-product-gallery__arrow--next {
	right: 0;
}

.rz-product-gallery__arrow span {
	border-color: #fff;
	border-style: solid;
	border-width: 0 0 2px 2px;
	display: block;
	height: 13px;
	width: 13px;
}

.rz-product-gallery__arrow--prev span {
	transform: translateX(2px) rotate(45deg);
}

.rz-product-gallery__arrow--next span {
	transform: translateX(-2px) rotate(225deg);
}

.rz-product-gallery__thumb-strip {
	display: grid;
	gap: 16px;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	margin: 0 auto;
	width: 100%;
}

.rz-product-gallery__thumb {
	aspect-ratio: 1 / 1;
	align-items: center;
	background: #fff;
	border: 1px solid transparent;
	box-shadow: none;
	cursor: pointer;
	display: flex;
	justify-content: center;
	margin: 0;
	min-width: 0;
	overflow: hidden;
	padding: 0;
	position: relative;
	transition: border-color 160ms ease, box-shadow 160ms ease;
	width: 100%;
}

.rz-product-gallery__thumb[hidden] {
	display: none !important;
}

.rz-product-gallery__thumb.is-active {
	border-color: #bababa;
	box-shadow: 0 0 0 1px rgba(186, 186, 186, 0.45);
}

.rz-product-gallery__thumb img {
	display: block;
	height: 100%;
	max-height: 100%;
	max-width: 100%;
	object-fit: contain;
	width: 100%;
}

.rz-product-gallery__thumb--placeholder {
	background: transparent;
	border-color: transparent;
	cursor: default;
	pointer-events: none;
}

.rz-product-gallery__thumb--video {
	background-color: #111;
	background-image: var(--rz-video-preview);
	background-position: center;
	background-repeat: no-repeat;
	background-size: cover;
}

.rz-product-gallery__thumb--video::before {
	background: rgba(0, 0, 0, 0.12);
	content: "";
	inset: 0;
	position: absolute;
	z-index: 1;
}

.rz-product-gallery__play-icon {
	align-items: center;
	background: #ff0000;
	border-radius: 10px;
	display: flex;
	height: 48px;
	justify-content: center;
	left: 50%;
	position: absolute;
	top: 50%;
	transform: translate(-50%, -50%);
	width: 68px;
	z-index: 2;
}

.rz-product-gallery__play-icon::before {
	border-bottom: 10px solid transparent;
	border-left: 16px solid #fff;
	border-top: 10px solid transparent;
	content: "";
	display: block;
	margin-left: 4px;
}

.rz-product-gallery__thumb .rz-product-gallery__play-icon {
	border-radius: 6px;
	height: 26px;
	width: 36px;
}

.rz-product-gallery__thumb .rz-product-gallery__play-icon::before {
	border-bottom-width: 5px;
	border-left-width: 8px;
	border-top-width: 5px;
	margin-left: 2px;
}

.rz-product-gallery__modal[hidden] {
	display: none;
}

.rz-product-gallery__modal {
	align-items: center;
	background: rgba(0, 0, 0, 0.78);
	display: flex;
	inset: 0;
	justify-content: center;
	padding: 24px;
	position: fixed;
	z-index: 99999;
}

.rz-product-gallery__modal-dialog {
	background: #000;
	max-width: 1120px;
	position: relative;
	width: min(1120px, 94vw);
}

.rz-product-gallery__modal-fullscreen,
.rz-product-gallery__modal-close {
	align-items: center;
	background: rgba(0, 0, 0, 0.72);
	border: 1px solid rgba(255, 255, 255, 0.35);
	border-radius: 50%;
	color: #fff;
	cursor: pointer;
	display: flex;
	font-size: 30px;
	height: 42px;
	justify-content: center;
	line-height: 1;
	margin: 0;
	padding: 0;
	position: absolute;
	top: -14px;
	width: 42px;
	z-index: 2;
}

.rz-product-gallery__modal-fullscreen {
	right: 36px;
}

.rz-product-gallery__modal-fullscreen span {
	border: 2px solid #fff;
	display: block;
	height: 16px;
	width: 16px;
}

.rz-product-gallery__modal.is-rz-video-fullscreen .rz-product-gallery__modal-fullscreen span {
	height: 12px;
	width: 12px;
}

.rz-product-gallery__modal-close {
	padding-bottom: 3px;
	right: -14px;
}

.rz-product-gallery__modal-content {
	aspect-ratio: 16 / 9;
	background: #000;
	width: 100%;
}

.rz-product-gallery__modal.is-rz-video-fullscreen {
	padding: 0;
}

.rz-product-gallery__modal.is-rz-video-fullscreen .rz-product-gallery__modal-dialog {
	align-items: center;
	display: flex;
	height: 100dvh;
	justify-content: center;
	max-width: none;
	width: 100vw;
}

.rz-product-gallery__modal.is-rz-video-fullscreen .rz-product-gallery__modal-content {
	height: min(calc(100dvh - 56px), 56.25vw);
	width: min(100vw, calc((100dvh - 56px) * 1.7778));
}

.rz-product-gallery__modal.is-rz-video-fullscreen .rz-product-gallery__modal-close {
	right: 14px;
	top: 14px;
}

.rz-product-gallery__modal.is-rz-video-fullscreen .rz-product-gallery__modal-fullscreen {
	right: 66px;
	top: 14px;
}

.rz-product-gallery__modal-content iframe,
.rz-product-gallery__modal-content video {
	border: 0;
	display: block;
	height: 100%;
	width: 100%;
}

@media (max-width: 768px) {
	.rz-product-gallery__viewport {
		margin-bottom: 18px;
	}

	.rz-product-gallery__thumb-strip {
		gap: 8px;
	}

	.rz-product-gallery__arrow {
		height: 36px;
		width: 36px;
	}

	.rz-product-gallery__play-icon {
		height: 42px;
		width: 60px;
	}

	.rz-product-gallery__modal {
		padding: 18px;
	}

	.rz-product-gallery__modal-close {
		right: -10px;
		top: -10px;
	}

	.rz-product-gallery__modal-fullscreen {
		right: 38px;
		top: -10px;
	}
}
