/* Artolabs Product Gallery 1.3.5 — simple, sharp, clean. */

.apg-wrap {
	--apg-ink: #111;
	--apg-line: #e4e4e4;
	--apg-soft: #f5f5f5;
	--apg-ratio: 1 / 1;
	position: relative;
}
.apg-wrap *,
.apg-wrap *::before,
.apg-wrap *::after {
	box-sizing: border-box;
}

/* Category, title and rating moved above the image (left column).
   The originals are hidden only when JavaScript is running, so nothing is lost without it. */
html.apg-js body.apg-head-on .summary > .single-product-category,
html.apg-js body.apg-head-on .summary > .product_title,
html.apg-js body.apg-head-on .summary > .woocommerce-product-rating {
	display: none;
}
.apg-wrap .apg-head.is-filled {
	margin: 0 0 20px;
}
.apg-wrap .apg-head .single-product-category {
	margin: 0 0 6px;
}
.apg-wrap .apg-head .product_title {
	margin: 0 0 8px;
}
.apg-wrap .apg-head .woocommerce-product-rating {
	margin: 0;
}

/* Stage */
.apg-wrap .apg-stage {
	position: relative;
	overflow: hidden;
	background: var(--apg-soft);
	aspect-ratio: var(--apg-ratio);
	touch-action: pan-y;
	outline-offset: 2px;
}
/* Sale badge: sits on the image, top left. Clicks pass through to the image (lightbox). */
.apg-wrap .apg-badges {
	position: absolute;
	top: 12px;
	left: 12px;
	z-index: 3;
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	pointer-events: none;
}
/* Themes position .onsale themselves (absolute, from the product corner). Reset that inside the frame. */
.apg-wrap .apg-badges span.onsale {
	position: static;
	top: auto;
	right: auto;
	bottom: auto;
	left: auto;
	margin: 0;
	transform: none;
}

.apg-wrap .apg-track {
	display: flex;
	height: 100%;
	transition: transform 0.35s cubic-bezier(0.2, 0.7, 0.2, 1);
	will-change: transform;
}
.apg-wrap .apg-track.is-dragging {
	transition: none;
}
.apg-wrap .apg-slide {
	position: relative;
	flex: 0 0 100%;
	min-width: 0;
	height: 100%;
	overflow: hidden;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: zoom-in;
}
.apg-wrap .apg-slide[hidden] {
	display: none !important;
}
.apg-wrap .apg-slide .apg-img {
	display: block;
	width: 100%;
	height: 100%;
	max-width: none;
	margin: 0;
	border: 0;
	object-fit: contain;
	transition: transform 0.25s ease;
	-webkit-user-drag: none;
	user-select: none;
}
.apg-wrap.apg--cover .apg-slide .apg-img {
	object-fit: cover;
}

/* Hover zoom (mouse only) */
@media (hover: hover) and (pointer: fine) {
	.apg-wrap.apg--zoom .apg-slide.is-active:hover .apg-img {
		transform: scale(1.7);
		transform-origin: var(--apg-x, 50%) var(--apg-y, 50%);
	}
}

/* Font Preview slide: show the whole sample, never crop it */
.apg-wrap .apg-slide--preview .apg-img {
	object-fit: contain;
}
.apg-wrap .apg-thumb--preview img {
	object-fit: contain;
}

/* Arrows — theme-proof (themes often restyle every <button>) */
.apg-wrap .apg-nav {
	position: absolute;
	top: 50%;
	z-index: 2;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 34px;
	height: 34px;
	min-width: 0;
	min-height: 0;
	margin: 0;
	padding: 0;
	transform: translateY(-50%);
	background: transparent;
	color: #fff;
	border: 0;
	border-radius: 0;
	box-shadow: none;
	font: inherit;
	line-height: 1;
	letter-spacing: normal;
	text-transform: none;
	text-decoration: none;
	cursor: pointer;
	opacity: 0;
	transition: opacity 0.2s ease, background-color 0.2s ease;
}
.apg-wrap .apg-prev {
	left: 8px;
}
.apg-wrap .apg-next {
	right: 8px;
}
.apg-wrap .apg-stage:hover .apg-nav,
.apg-wrap .apg-stage:focus-within .apg-nav {
	opacity: 0.85;
}
.apg-wrap .apg-nav:hover,
.apg-wrap .apg-nav:focus-visible {
	background: transparent;
	color: #fff;
	border: 0;
}
/* Same specificity as the stage-hover rule above, and placed after it, so the arrow under the pointer wins */
.apg-wrap .apg-stage .apg-nav:hover,
.apg-wrap .apg-stage .apg-nav:focus-visible {
	opacity: 1;
}
.apg-wrap .apg-nav:focus-visible {
	outline: 2px solid #fff;
	outline-offset: 1px;
	box-shadow: 0 0 0 4px rgba(0, 0, 0, 0.45);
}
.apg-wrap .apg-nav svg {
	width: 22px;
	height: 22px;
	fill: none;
	stroke: currentColor;
	stroke-width: 2.4;
	stroke-linecap: square;
	filter: drop-shadow(0 0 1.5px rgba(0, 0, 0, 0.9)) drop-shadow(0 1px 3px rgba(0, 0, 0, 0.7));
}
@media (hover: none) {
	.apg-wrap .apg-nav {
		opacity: 0.85;
		width: 40px;
		height: 40px;
	}
}

/* Thumbnails */
.apg-wrap .apg-thumbs {
	position: relative;
	display: flex;
	gap: 8px;
	margin-top: 8px;
	padding-bottom: 2px;
	overflow-x: auto;
	scrollbar-width: thin;
}
.apg-wrap .apg-thumb {
	flex: 0 0 auto;
	width: 72px;
	height: 72px;
	min-width: 0;
	min-height: 0;
	margin: 0;
	padding: 0;
	position: relative;
	background: #000;
	color: var(--apg-ink);
	border: 1px solid transparent;
	border-radius: 0;
	box-shadow: none;
	line-height: 0;
	text-transform: none;
	cursor: pointer;
	transition: border-color 0.2s ease;
}
/* Inactive thumbnails: dark veil over the picture. Clicks pass through to the button. */
.apg-wrap .apg-thumb::after {
	content: "";
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.5);
	pointer-events: none;
	transition: opacity 0.2s ease;
}
.apg-wrap .apg-thumb[hidden] {
	display: none !important;
}
.apg-wrap .apg-thumb:hover,
.apg-wrap .apg-thumb:focus-visible {
	background: #000;
	color: var(--apg-ink);
}
.apg-wrap .apg-thumb:focus-visible::after,
.apg-wrap .apg-thumb[aria-current="true"]::after {
	opacity: 0;
}
/* Hover only where a real mouse exists; on touch screens :hover sticks after a tap */
@media (hover: hover) and (pointer: fine) {
	.apg-wrap .apg-thumb:hover::after {
		opacity: 0;
	}
}
.apg-wrap .apg-thumb[aria-current="true"] {
	border-color: var(--apg-ink);
}
.apg-wrap .apg-thumb img {
	display: block;
	width: 100%;
	height: 100%;
	margin: 0;
	object-fit: cover;
}

/* Single image: no controls */
.apg-wrap.apg--single .apg-nav,
.apg-wrap.apg--single .apg-thumbs {
	display: none;
}
.apg-wrap.apg--single .apg-slide {
	cursor: zoom-in;
}

/* Viewer: every image stacked top to bottom, scroll to browse.
   Change the backdrop with --apg-lb-bg (e.g. #fff or #ececec) and the width with --apg-lb-w. */
body.apg-lb-open {
	overflow: hidden;
}
.apg-lb {
	position: fixed;
	inset: 0;
	z-index: 999999;
	background: var(--apg-lb-bg, #121212);
	color: #fff;
}
.apg-lb[hidden] {
	display: none !important;
}
.apg-lb .apg-lb-scroll {
	position: absolute;
	inset: 0;
	box-sizing: border-box;
	padding: 56px 24px 48px;
	overflow-x: hidden;
	overflow-y: auto;
	overscroll-behavior: contain;
	overflow-anchor: none;
	-webkit-overflow-scrolling: touch;
	outline: none;
}
.apg-lb .apg-lb-list {
	display: flex;
	flex-direction: column;
	gap: 12px;
	max-width: var(--apg-lb-w, 1200px);
	margin: 0 auto;
}
.apg-lb .apg-lb-item {
	position: relative;
	width: 100%;
	margin: 0 auto;
	background: #1c1c1c;
	overflow: hidden;
}
.apg-lb .apg-lb-item.is-error {
	min-height: 120px;
}
.apg-lb .apg-lb-img {
	position: absolute;
	inset: 0;
	display: block;
	width: 100%;
	height: 100%;
	max-width: none;
	margin: 0;
	object-fit: contain;
	opacity: 0;
	transition: opacity 0.2s ease;
	-webkit-user-drag: none;
	user-select: none;
}
.apg-lb .apg-lb-item.is-loaded .apg-lb-img {
	opacity: 1;
}
.apg-lb .apg-lb-btn {
	position: absolute;
	z-index: 3;
	top: 12px;
	right: 28px;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	min-width: 0;
	min-height: 0;
	margin: 0;
	padding: 0;
	background: #000;
	color: #fff;
	border: 1px solid rgba(255, 255, 255, 0.9);
	border-radius: 0;
	box-shadow: none;
	font: inherit;
	line-height: 1;
	letter-spacing: normal;
	text-transform: none;
	cursor: pointer;
	transition: background-color 0.2s ease, border-color 0.2s ease;
}
.apg-lb .apg-lb-btn:hover,
.apg-lb .apg-lb-btn:focus-visible {
	background: var(--global-palette1, #E8590C);
	border-color: var(--global-palette1, #E8590C);
	color: #fff;
}
.apg-lb .apg-lb-btn:focus-visible {
	outline: 2px solid #fff;
	outline-offset: 2px;
}
.apg-lb .apg-lb-btn svg {
	width: 22px;
	height: 22px;
	fill: none;
	stroke: currentColor;
	stroke-width: 2.4;
	stroke-linecap: square;
}
.apg-lb .apg-lb-count {
	position: absolute;
	z-index: 2;
	left: 50%;
	bottom: 14px;
	transform: translateX(-50%);
	padding: 6px 10px;
	background: rgba(0, 0, 0, 0.65);
	color: #fff;
	font-size: 13px;
	line-height: 1;
	letter-spacing: 0.04em;
	text-transform: none;
	pointer-events: none;
}
.apg-lb .apg-lb-count[hidden] {
	display: none !important;
}
@media (max-width: 600px) {
	.apg-lb .apg-lb-scroll {
		padding: 52px 0 44px;
	}
	.apg-lb .apg-lb-list {
		gap: 6px;
	}
	.apg-lb .apg-lb-btn {
		top: 4px;
		right: 8px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.apg-wrap .apg-track,
	.apg-wrap .apg-slide .apg-img,
	.apg-lb .apg-lb-img {
		transition: none;
	}
}
