.shock-wc-product-gallery,
.shock-wc-product-gallery-modal,
.shock-wc-product-gallery *,
.shock-wc-product-gallery-modal * {
	box-sizing: border-box;
}

:where(.shock-wc-product-gallery, .shock-wc-product-gallery-modal) button {
	appearance: none;
	margin: 0;
	min-width: 0;
	min-height: 0;
	border-radius: 0;
	font: inherit;
	letter-spacing: normal;
	text-transform: none;
	box-shadow: none;
}

:where(.shock-wc-product-gallery, .shock-wc-product-gallery-modal) button:focus-visible {
	outline: 2px solid var(--swcpg-accent, #252b30);
	outline-offset: -3px;
}

.shock-wc-product-gallery {

	min-width: 0;
	max-width: 100%;
	width: 100%;

}

.shock-wc-product-gallery__stage {
	position: relative;
	width: 100%;
	max-width: 100%;
	min-width: 0;
	overflow: hidden;
	background: var(--swcpg-background, #f5f5f5);
	aspect-ratio: 1 / 1;
}

.shock-wc-product-gallery__main {
	display: block;
	width: 100%;
	max-width: 100%;
	min-width: 0;
	height: 100%;
	padding: 0;
	border: 0;
	background: transparent;
	cursor: pointer;
	overflow: hidden;
}

.shock-wc-product-gallery__main.is-zoomable {
	cursor: zoom-in;
}

.shock-wc-product-gallery__main img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.shock-wc-product-gallery__main.is-zooming img {
	transform: scale(1.75);
}

.shock-wc-product-gallery__main.is-sliding-next img,
.shock-wc-product-gallery-modal__stage.is-sliding-next img {
	animation: swcpgSlideNext 260ms ease;
}

.shock-wc-product-gallery__main.is-sliding-prev img,
.shock-wc-product-gallery-modal__stage.is-sliding-prev img {
	animation: swcpgSlidePrev 260ms ease;
}

@keyframes swcpgSlideNext {
	from {
		opacity: 0.65;
		transform: translateX(32px);
	}
	to {
		opacity: 1;
		transform: translateX(0);
	}
}

@keyframes swcpgSlidePrev {
	from {
		opacity: 0.65;
		transform: translateX(-32px);
	}
	to {
		opacity: 1;
		transform: translateX(0);
	}
}

.shock-wc-product-gallery__nav {
	position: absolute;
	top: 50%;
	z-index: 2;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 46px;
	height: 46px;
	padding: 0;
	border: 0;
	border-radius: 999px;
	background: #fff;
	color: var(--swcpg-text, #252b30);
	box-shadow: none;
	cursor: pointer;
	transform: translateY(-50%);
}

.shock-wc-product-gallery__nav[hidden] {
	display: none;
}

.shock-wc-product-gallery__nav svg,
.shock-wc-product-gallery-modal__close svg {
	display: block;
	fill: none;
	stroke: currentColor;
	stroke-width: 1.8;
	stroke-linecap: round;
	stroke-linejoin: round;
	pointer-events: none;
}

.shock-wc-product-gallery__nav--prev {
	left: 18px;
}

.shock-wc-product-gallery__nav--next {
	right: 18px;
}

.shock-wc-product-gallery__thumbs {
	display: grid;
	grid-template-columns: repeat(6, minmax(0, 1fr));
	gap: 10px;
	width: 100%;
	max-width: 100%;
	min-width: 0;
	margin-top: 14px;
}

.shock-wc-product-gallery__thumbs > .shock-wc-product-gallery__thumb:nth-child(n+7) {
	display: none;
}

.shock-wc-product-gallery__thumb {
	display: block;
	min-width: 0;
	height: auto;
	line-height: 0;
	position: relative;
	overflow: hidden;
	aspect-ratio: 1 / 1;
	padding: 0;
	border: 2px solid transparent;
	background: var(--swcpg-background, #f5f5f5);
	cursor: pointer;
}

.shock-wc-product-gallery__thumb[hidden] {
	display: none;
}

.shock-wc-product-gallery__thumb.is-active {
	border-color: var(--swcpg-accent, #252b30);
}

.shock-wc-product-gallery__thumb img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.shock-wc-product-gallery__more {
	position: absolute;
	inset: 0;
	display: none;
	align-items: center;
	justify-content: center;
	background: rgba(0, 0, 0, 0.5);
	color: #fff;
	font-size: 24px;
	font-weight: 700;
}

.shock-wc-product-gallery__thumb.has-more .shock-wc-product-gallery__more {
	display: flex;
}

.shock-wc-product-gallery-modal {
	position: fixed;
	inset: 0;
	z-index: 1000000;
	display: none;
	align-items: center;
	justify-content: center;
	padding: 24px;
	background: rgba(0, 0, 0, 0.72);
}

.shock-wc-product-gallery-modal.is-open {
	display: flex;
}

.shock-wc-product-gallery-modal__dialog {
	position: relative;
	display: flex;
	flex-direction: column;
	width: min(950px, 95%);
	max-height: 95vh;
	padding: 22px;
	background: #fff;
	overflow: hidden;
}

.shock-wc-product-gallery-modal__close {
	position: absolute;
	top: 14px;
	right: 14px;
	z-index: 3;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 42px;
	height: 42px;
	padding: 0;
	border: 0;
	border-radius: 999px;
	background: #fff;
	color: var(--swcpg-text, #252b30);
	box-shadow: 0 1px 2px #1243;
	cursor: pointer;
	font-size: 13px;
	line-height: 1;
}

.shock-wc-product-gallery-modal__stage {
	position: relative;
	flex: 1 1 auto;
	min-height: 0;
	height: min(72vh, 760px);
	max-height: calc(95vh - 150px);
	overflow: hidden;
	background: transparent;
}

.shock-wc-product-gallery-modal__stage img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: contain;
}

.shock-wc-product-gallery-modal__thumbs {
	flex: 0 0 auto;
	margin-top: 14px;
	overflow: hidden;
}

.shock-wc-product-gallery-modal__thumbs-track {
	display: flex;
	flex-wrap: nowrap;
	gap: 10px;
	width: 100%;
	transition: transform 260ms ease;
	will-change: transform;
}

.shock-wc-product-gallery-modal__thumbs .shock-wc-product-gallery__thumb {
	flex: 0 0 calc((100% - 50px) / 6);
}

body.shock-wc-product-gallery-modal-open {
	overflow: hidden;
}

@media (prefers-reduced-motion: reduce) {
	.shock-wc-product-gallery__main img,
	.shock-wc-product-gallery-modal__stage img {
		animation: none !important;
	}
	.shock-wc-product-gallery-modal__thumbs-track {
		transition: none;
	}
}


@media (max-width: 640px) {
	.shock-wc-product-gallery__thumbs {
		grid-template-columns: repeat(4, minmax(0, 1fr));
	}

	.shock-wc-product-gallery__thumbs > .shock-wc-product-gallery__thumb:nth-child(n+5) {
		display: none;
	}

	.shock-wc-product-gallery-modal__thumbs .shock-wc-product-gallery__thumb {
		flex-basis: calc((100% - 30px) / 4);
	}

	.shock-wc-product-gallery-modal {
		padding: 0;
	}

	.shock-wc-product-gallery-modal__dialog {
		width: 100%;
		height: 100%;
		max-height: none;
		padding: 16px;
		box-sizing: border-box;
	}

	.shock-wc-product-gallery-modal__stage {
		height: auto;
		max-height: none;
	}

}
