/* ActorShop product gallery. Loaded only on WooCommerce single product pages. */
body.actorshop.single-product .actorshop-product-gallery {
	position: sticky;
	top: calc(var(--actorshop-promo-banner-height, 0px) + var(--actorshop-header-height, 88px) + 18px);
	align-self: start;
	z-index: 2;
	display: block !important;
	margin-bottom: 0;
	overflow-anchor: none;
}

body.actorshop.single-product .actorshop-product-gallery__stage {
	position: relative;
	display: block !important;
	width: 100% !important;
	aspect-ratio: 1 / 1;
	height: auto !important;
	margin: 0;
	transform: none !important;
	transition-duration: 0s !important;
	overflow: hidden;
	--actorshop-gallery-index: 0;
	--actorshop-gallery-drag: 0px;
	--actorshop-gallery-slide-offset: 0;
}

body.actorshop.single-product .actorshop-product-gallery__slide {
	position: absolute;
	inset: 0;
	z-index: 0;
	display: flex !important;
	align-items: center;
	justify-content: center;
	width: 100% !important;
	height: 100%;
	margin: 0;
	float: none !important;
	overflow: hidden;
	border: 0;
	background: linear-gradient(145deg, #f2f2f2 0%, #f8f8f8 58%, #ffffff 100%);
	opacity: 1;
	pointer-events: none;
	transform: translate3d(calc((var(--actorshop-gallery-slide-offset, 0) * 100%) + var(--actorshop-gallery-drag, 0px)), 0, 0);
	transition: transform 340ms cubic-bezier(0.22, 0.72, 0.18, 1), opacity 220ms ease;
	will-change: transform;
}

body.actorshop.single-product .actorshop-product-gallery__slide.is-active,
body.actorshop.single-product .actorshop-product-gallery__slide.flex-active-slide {
	z-index: 1;
	pointer-events: auto;
}

body.actorshop.single-product .actorshop-product-gallery__stage.is-dragging .actorshop-product-gallery__slide,
body.actorshop.single-product .actorshop-product-gallery__stage.is-settling .actorshop-product-gallery__slide {
	transition: none !important;
}

body.actorshop.single-product .actorshop-product-gallery__slide a {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
	cursor: grab;
	touch-action: pan-y pinch-zoom;
	-webkit-user-drag: none;
	user-select: none;
}

body.actorshop.single-product .actorshop-product-gallery.is-product-gallery-grabbing .actorshop-product-gallery__slide a {
	cursor: grabbing;
}

body.actorshop.single-product .actorshop-product-gallery__slide img {
	display: block;
	width: 100%;
	height: 100%;
	background: transparent;
	object-fit: contain;
	transition: opacity 260ms ease, transform 360ms cubic-bezier(0.2, 0.8, 0.2, 1), filter 360ms ease;
	-webkit-user-drag: none;
	user-select: none;
}

body.actorshop.single-product .actorshop-product-gallery__slide:hover img {
	transform: scale(1.018);
	filter: contrast(1.02);
}

body.actorshop.single-product .actorshop-product-gallery .actorshop-product-thumbs {
	display: grid;
	grid-template-columns: 42px minmax(0, 1fr) 42px;
	gap: 10px;
	align-items: stretch;
	margin-top: 14px;
}

body.actorshop.single-product .actorshop-product-gallery .actorshop-product-thumbs__track {
	min-width: 0;
	overflow: hidden;
}

body.actorshop.single-product .actorshop-product-gallery .actorshop-product-thumbs__button {
	display: inline-grid;
	place-items: center;
	min-width: var(--actorshop-carousel-button-size, 42px);
	border: 1px solid var(--actorshop-control-border);
	border-radius: var(--actorshop-radius-control, 0px);
	background: #ffffff;
	color: #111111;
	cursor: pointer;
	transition: background 160ms ease, border-color 160ms ease, color 160ms ease, opacity 160ms ease;
}

body.actorshop.single-product .actorshop-product-gallery .actorshop-product-thumbs__button:hover,
body.actorshop.single-product .actorshop-product-gallery .actorshop-product-thumbs__button:focus-visible {
	border-color: #111111;
	background: #111111;
	color: #ffffff;
}

body.actorshop.single-product .actorshop-product-gallery .actorshop-product-thumbs__button:disabled {
	cursor: default;
	opacity: 0.34;
}

body.actorshop.single-product .actorshop-product-gallery .actorshop-product-thumbs__button svg,
body.actorshop.single-product .actorshop-product-gallery .actorshop-product-thumbs__button .actorshop-icon {
	width: calc(var(--actorshop-ui-icon-size, 20px) - 3px);
	height: calc(var(--actorshop-ui-icon-size, 20px) - 3px);
	font-size: calc(var(--actorshop-ui-icon-size, 20px) - 3px);
	stroke: currentColor;
	stroke-width: 2;
}

body.actorshop.single-product .actorshop-product-gallery__thumbs {
	display: flex;
	gap: 10px;
	margin: 0;
	padding: 0;
	overflow-x: auto;
	overscroll-behavior-inline: contain;
	scroll-behavior: smooth;
	scroll-padding-inline: 2px;
	scroll-snap-type: x mandatory;
	scrollbar-width: thin;
	list-style: none;
}

body.actorshop.single-product .actorshop-product-gallery__thumbs::-webkit-scrollbar {
	height: 6px;
}

body.actorshop.single-product .actorshop-product-gallery__thumbs::-webkit-scrollbar-track {
	background: #efefef;
}

body.actorshop.single-product .actorshop-product-gallery__thumbs::-webkit-scrollbar-thumb {
	background: #111111;
}

body.actorshop.single-product .actorshop-product-gallery__thumbs li {
	flex: 0 0 clamp(82px, 11vw, 112px);
	width: auto !important;
	float: none;
	scroll-snap-align: start;
	overflow: hidden;
	border: 1px solid var(--actorshop-line);
	background: #f7f7f7;
}

body.actorshop.single-product .actorshop-product-gallery__thumb {
	display: block;
	width: 100%;
	padding: 0;
	border: 0;
	background: transparent;
	cursor: pointer;
}

body.actorshop.single-product .actorshop-product-gallery__thumb img {
	display: block;
	width: 100%;
	aspect-ratio: 1 / 1;
	object-fit: contain;
	opacity: 0.58;
	transition: opacity 160ms ease, transform 160ms ease;
}

body.actorshop.single-product .actorshop-product-gallery__thumb.is-active img,
body.actorshop.single-product .actorshop-product-gallery__thumb:hover img,
body.actorshop.single-product .actorshop-product-gallery__thumb:focus-visible img {
	opacity: 1;
	transform: scale(1.03);
}

body.actorshop.single-product .actorshop-product-gallery-bars {
	display: none;
}

body.actorshop.single-product .actorshop-product-gallery.is-product-gallery-static .actorshop-product-thumbs,
body.actorshop.single-product .actorshop-product-gallery.is-product-gallery-static .actorshop-product-gallery-bars {
	display: none !important;
}

@media (max-width: 900px) {
	body.actorshop.single-product .actorshop-product-gallery {
		position: static !important;
		display: block !important;
		width: 100% !important;
		margin: 0 !important;
		overflow: visible !important;
	}

	body.actorshop.single-product .actorshop-product-gallery__stage {
		order: 1;
		aspect-ratio: 1 / 1;
		height: auto !important;
		min-height: 0 !important;
		overflow: hidden !important;
		touch-action: pan-y pinch-zoom;
		user-select: none;
		contain: layout paint;
	}

	body.actorshop.single-product .actorshop-product-gallery__slide {
		position: absolute;
		inset: 0;
		height: 100%;
		min-height: 0;
	}

	body.actorshop.single-product .actorshop-product-gallery__slide.is-active {
		display: flex !important;
		align-items: center;
		justify-content: center;
	}

	body.actorshop.single-product .actorshop-product-gallery__slide a {
		display: flex;
		align-items: center;
		justify-content: center;
		width: 100%;
		height: 100%;
	}

	body.actorshop.single-product .actorshop-product-gallery__slide img {
		width: 100%;
		height: 100%;
		object-fit: contain;
	}

	body.actorshop.single-product .actorshop-product-gallery__slide:hover img {
		filter: none;
		transform: none;
	}

	body.actorshop.single-product .actorshop-product-gallery .actorshop-product-thumbs,
	body.actorshop.single-product .actorshop-product-gallery__thumbs {
		display: none !important;
	}

	body.actorshop.single-product .actorshop-product-gallery-bars {
		--actorshop-gallery-active-left: 0px;
		--actorshop-gallery-active-width: 0px;
		box-sizing: border-box;
		order: 2;
		position: relative;
		z-index: 1;
		display: flex;
		align-items: center;
		gap: 0;
		width: 100%;
		height: 4px;
		min-height: 4px;
		max-height: 4px;
		margin: 12px 0 4px;
		background: rgba(17, 17, 17, 0.16);
		overflow: hidden;
		font-size: 0;
		line-height: 0;
	}

	body.actorshop.single-product .actorshop-product-gallery-bars::before {
		content: "";
		position: absolute;
		z-index: 1;
		top: 0;
		bottom: 0;
		left: var(--actorshop-gallery-active-left, 0px);
		width: var(--actorshop-gallery-active-width, 0px);
		background: var(--actorshop-text, #111111);
		transition: left 260ms cubic-bezier(0.2, 0.75, 0.25, 1), width 260ms cubic-bezier(0.2, 0.75, 0.25, 1);
		will-change: left, width;
	}

	body.actorshop.single-product .actorshop-product-gallery-bars__item {
		position: relative;
		z-index: 2;
		box-sizing: border-box;
		flex: 1 1 0;
		height: 4px;
		min-height: 4px;
		max-height: 4px;
		min-width: 0;
		padding: 0;
		border: 0;
		border-radius: 0;
		background: transparent;
		cursor: pointer;
		font-size: 0;
		line-height: 0;
	}

	body.actorshop.single-product .actorshop-product-gallery-bars__item:not(:last-child)::after {
		content: "";
		position: absolute;
		top: 0;
		right: 0;
		bottom: 0;
		width: 3px;
		background: #ffffff;
		pointer-events: none;
	}
}
