/*
 * STARARTIST Single Product Media
 * Version 1.6.2
 */

.starartist-single-media,
.starartist-single-media *,
.starartist-single-thumbs,
.starartist-single-thumbs * {
	box-sizing: border-box;
}

/* ===== Main 1:1 media stage ===== */
.starartist-single-media {
	position: relative;
	width: 100%;
	aspect-ratio: 1 / 1;
	overflow: hidden;
	background: #f5f5f5;
	isolation: isolate;
}

.starartist-single-media__viewport,
.starartist-single-media__track,
.starartist-single-media__slide {
	width: 100%;
	height: 100%;
}

.starartist-single-media__viewport {
	overflow: hidden;
}

.starartist-single-media__track {
	display: flex;
	overflow-x: auto;
	overflow-y: hidden;
	scroll-snap-type: x mandatory;
	scroll-behavior: smooth;
	scrollbar-width: none;
	overscroll-behavior-inline: contain;
	-webkit-overflow-scrolling: touch;
}

.starartist-single-media__track::-webkit-scrollbar {
	display: none;
}

.starartist-single-media__slide {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 100%;
	min-width: 100%;
	overflow: hidden;
	scroll-snap-align: start;
	scroll-snap-stop: always;
	background: #f5f5f5;
}


.starartist-single-media__picture {
	display: block;
	width: 100%;
	height: 100%;
	margin: 0;
	padding: 0;
}

/* Override WooCommerce's global image height:auto rule. */
.starartist-single-media .starartist-single-media__image,
.starartist-single-media .starartist-single-media__video {
	display: block !important;
	width: 100% !important;
	height: 100% !important;
	max-width: none !important;
	max-height: none !important;
	margin: 0 !important;
	padding: 0 !important;
	object-fit: contain !important;
	object-position: center center !important;
	background: #f5f5f5;
	user-select: none;
}

.starartist-single-media__image {
	-webkit-user-drag: none;
}

.starartist-single-media__video {
	border: 0;
}

.starartist-single-media__arrow {
	position: absolute;
	top: 50%;
	z-index: 6;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 44px;
	padding: 0;
	margin: 0;
	border: 0;
	border-radius: 2px;
	background: rgba(255, 255, 255, 0.52);
	box-shadow: none;
	color: #111;
	cursor: pointer;
	transform: translateY(-50%);
	opacity: 0.88;
	transition: background-color 160ms ease, opacity 160ms ease;
	-webkit-tap-highlight-color: transparent;
}

.starartist-single-media__arrow--previous {
	left: 14px;
}

.starartist-single-media__arrow--next {
	right: 14px;
}

.starartist-single-media__arrow svg {
	width: 18px;
	height: 18px;
	fill: none;
	stroke: currentColor;
	stroke-width: 1.2;
	stroke-linecap: round;
	stroke-linejoin: round;
}

.starartist-single-media__arrow:hover,
.starartist-single-media__arrow:focus-visible {
	background: rgba(255, 255, 255, 0.92);
	opacity: 1;
}

.starartist-single-media__arrow:focus-visible {
	outline: 1px solid currentColor;
	outline-offset: 2px;
}

.starartist-single-media.has-single-item .starartist-single-media__arrow {
	display: none !important;
}

/* ===== Vertical thumbnails ===== */
.starartist-single-thumbs {
	width: 76px;
	max-width: 76px;
	max-height: min(640px, calc(100vh - 150px));
	overflow-y: auto;
	overflow-x: hidden;
	scrollbar-width: none;
}

.starartist-single-thumbs::-webkit-scrollbar {
	display: none;
}

.starartist-single-thumbs__list {
	display: flex;
	flex-direction: column;
	gap: 14px;
	width: 76px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.starartist-single-thumbs__item {
	width: 76px;
	height: 76px;
	margin: 0;
	padding: 0;
}

.starartist-single-thumbs__button {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 76px;
	height: 76px;
	margin: 0;
	padding: 0;
	overflow: hidden;
	border: 1px solid transparent;
	border-radius: 0;
	background: #f5f5f5;
	box-shadow: none;
	cursor: pointer;
	opacity: 0.90;
	transition: border-color 150ms ease, opacity 150ms ease;
	-webkit-tap-highlight-color: transparent;
}

.starartist-single-thumbs__button:hover {
	opacity: 1;
	border-color: #b8b8b8;
}

.starartist-single-thumbs__button.is-active,
.starartist-single-thumbs__button[aria-current="true"] {
	border-color: #111;
	opacity: 1;
}

.starartist-single-thumbs__button:focus-visible {
	outline: 1px solid #111;
	outline-offset: 2px;
}

.starartist-single-thumbs .starartist-single-thumbs__image {
	display: block !important;
	width: 100% !important;
	height: 100% !important;
	max-width: none !important;
	max-height: none !important;
	margin: 0 !important;
	padding: 0 !important;
	object-fit: cover !important;
	object-position: center center !important;
	-webkit-user-drag: none;
	user-select: none;
}

.starartist-single-thumbs__play {
	position: absolute;
	left: 50%;
	top: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 28px;
	height: 28px;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.88);
	color: #111;
	transform: translate(-50%, -50%);
	pointer-events: none;
}

.starartist-single-thumbs__play svg {
	width: 12px;
	height: 12px;
	fill: currentColor;
}

/*
 * Mobile product media:
 * - keep touch swipe
 * - restore previous/next arrows as simple black glyphs with no background
 * - thumbnail rail can still be repositioned/re-enabled by the Elementor mobile layout
 */
@media (max-width: 767px) {
	.starartist-single-thumbs {
		display: none !important;
	}

	.starartist-single-media__arrow {
		display: inline-flex !important;
		width: 34px;
		height: 48px;
		background: transparent !important;
		border: 0 !important;
		border-radius: 0 !important;
		box-shadow: none !important;
		color: #111 !important;
		opacity: 1 !important;
	}

	.starartist-single-media__arrow--previous {
		left: 8px;
	}

	.starartist-single-media__arrow--next {
		right: 8px;
	}

	.starartist-single-media__arrow svg {
		width: 22px;
		height: 22px;
		stroke-width: 1.45;
	}

	.starartist-single-media__arrow:hover,
	.starartist-single-media__arrow:focus-visible {
		background: transparent !important;
		opacity: 0.65 !important;
	}
}

@media (prefers-reduced-motion: reduce) {
	.starartist-single-media__track {
		scroll-behavior: auto;
	}

	.starartist-single-media__arrow,
	.starartist-single-thumbs__button {
		transition: none;
	}
}


/* ===== Balenciaga-style large product image viewer ===== */
html.starartist-lightbox-open,
body.starartist-lightbox-open {
	overflow: hidden !important;
}

/*
 * Product image zoom cursor.
 * Custom black outlined circle with a black plus; no magnifying-glass handle.
 */
.starartist-single-media__image,
.starartist-single-media__video {
	cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 32 32'%3E%3Ccircle cx='16' cy='16' r='10.5' fill='white' fill-opacity='.88' stroke='%23111' stroke-width='1.5'/%3E%3Cpath d='M11.5 16h9M16 11.5v9' fill='none' stroke='%23111' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E") 16 16, zoom-in !important;
}

.starartist-single-lightbox[hidden] {
	display: none !important;
}

/*
 * The overlay itself is the scroll container.
 * The source page remains locked underneath, while the enlarged image can be
 * explored with the normal mouse wheel / trackpad / touch scroll — no dragging.
 */
.starartist-single-lightbox {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: block;
	width: 100vw;
	height: 100dvh;
	margin: 0;
	padding: 0;
	overflow-x: hidden;
	overflow-y: auto;
	overscroll-behavior: contain;
	-webkit-overflow-scrolling: touch;
	background: #fff;
	opacity: 0;
	visibility: hidden;
	transition: opacity 180ms ease, visibility 180ms ease;
	scrollbar-width: thin;
}

.starartist-single-lightbox.is-open {
	opacity: 1;
	visibility: visible;
}

/* Large-view stage fills the viewport width. */
.starartist-single-lightbox__stage {
	position: relative;
	display: flex;
	align-items: flex-start;
	justify-content: center;
	width: 100%;
	min-height: 100dvh;
	margin: 0;
	padding: 0;
	overflow: visible;
	background: #fff;
}

/*
 * Full-size image: viewport-wide, natural height.
 * A square source therefore becomes roughly 100vw tall on desktop, which is
 * intentionally taller than many viewports and is explored by normal scrolling.
 */
.starartist-single-lightbox .starartist-single-lightbox__image {
	display: block !important;
	width: 100vw !important;
	height: auto !important;
	max-width: none !important;
	max-height: none !important;
	margin: 0 auto !important;
	padding: 0 !important;
	object-fit: contain !important;
	object-position: top center !important;
	background: #fff !important;
	/* Black outlined circle with minus: click once to exit enlarged view. */
	cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 32 32'%3E%3Ccircle cx='16' cy='16' r='10.5' fill='white' fill-opacity='.88' stroke='%23111' stroke-width='1.5'/%3E%3Cpath d='M11.5 16h9' fill='none' stroke='%23111' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E") 16 16, zoom-out !important;
	user-select: none;
	-webkit-user-drag: none;
}

.starartist-single-lightbox .starartist-single-lightbox__video {
	display: block !important;
	width: 100vw !important;
	height: auto !important;
	max-width: none !important;
	max-height: 100dvh !important;
	margin: 0 auto !important;
	padding: 0 !important;
	object-fit: contain !important;
	background: #000 !important;
}

/* Fixed viewer controls remain visible while the customer scrolls the large image. */
.starartist-single-lightbox__close,
.starartist-single-lightbox__arrow {
	position: fixed;
	z-index: 100003;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 0;
	background: rgba(255, 255, 255, 0.78);
	box-shadow: none;
	color: #111;
	cursor: pointer;
	-webkit-tap-highlight-color: transparent;
	transition: opacity 150ms ease, background-color 150ms ease;
}

.starartist-single-lightbox__close {
	top: 18px;
	right: 18px;
	width: 38px;
	height: 38px;
}

.starartist-single-lightbox__close svg {
	width: 20px;
	height: 20px;
	fill: none;
	stroke: currentColor;
	stroke-width: 1.1;
	stroke-linecap: round;
}

.starartist-single-lightbox__arrow {
	top: 50%;
	width: 44px;
	height: 56px;
	transform: translateY(-50%);
}

.starartist-single-lightbox__arrow--previous {
	left: 14px;
}

.starartist-single-lightbox__arrow--next {
	right: 14px;
}

.starartist-single-lightbox__arrow svg {
	width: 22px;
	height: 22px;
	fill: none;
	stroke: currentColor;
	stroke-width: 1.05;
	stroke-linecap: round;
	stroke-linejoin: round;
}

.starartist-single-lightbox__close:hover,
.starartist-single-lightbox__arrow:hover,
.starartist-single-lightbox__close:focus-visible,
.starartist-single-lightbox__arrow:focus-visible {
	background: rgba(255, 255, 255, 0.96);
	opacity: 0.65;
}

.starartist-single-lightbox__close:focus-visible,
.starartist-single-lightbox__arrow:focus-visible {
	outline: 1px solid #111;
	outline-offset: 2px;
}

@media (max-width: 767px) {
	/*
	 * Mobile large-view behavior (1.5.8):
	 * - full-screen cover presentation, no white area below a square image
	 * - custom two-finger pinch zoom independent of viewport-meta restrictions
	 * - one-finger pan only after the image has been enlarged
	 */
	.starartist-single-lightbox {
		overflow: hidden !important;
		touch-action: none !important;
		overscroll-behavior: none !important;
	}

	.starartist-single-lightbox__stage {
		position: relative;
		display: block;
		width: 100vw;
		height: 100dvh;
		min-width: 100vw;
		min-height: 100dvh;
		overflow: hidden;
		background: #fff;
		touch-action: none !important;
	}

	/* Small neutral loading indicator while the original file is requested. */
	.starartist-single-lightbox__stage.is-loading::after {
		content: "";
		position: absolute;
		left: 50%;
		top: 50%;
		width: 18px;
		height: 18px;
		margin: -9px 0 0 -9px;
		border: 1px solid rgba(17, 17, 17, 0.22);
		border-top-color: #111;
		border-radius: 50%;
		animation: starartist-lightbox-spin 700ms linear infinite;
		pointer-events: none;
	}

	.starartist-single-lightbox .starartist-single-lightbox__image {
		position: absolute !important;
		left: 50% !important;
		top: 50% !important;
		max-width: none !important;
		max-height: none !important;
		margin: 0 !important;
		padding: 0 !important;
		object-fit: fill !important;
		object-position: center center !important;
		transform-origin: center center !important;
		will-change: auto !important;
		image-rendering: auto !important;
		touch-action: none !important;
		opacity: 0;
		transition: opacity 120ms ease;
	}

	.starartist-single-lightbox .starartist-single-lightbox__image.is-ready {
		opacity: 1;
	}

	.starartist-single-lightbox .starartist-single-lightbox__video {
		width: 100vw !important;
		height: 100dvh !important;
		max-width: none !important;
		max-height: none !important;
		object-fit: contain !important;
		touch-action: manipulation;
	}

	.starartist-single-lightbox__close {
		top: 10px;
		right: 10px;
		width: 36px;
		height: 36px;
	}

	.starartist-single-lightbox__arrow {
		width: 36px;
		height: 48px;
		background: transparent !important;
		color: #111 !important;
	}

	.starartist-single-lightbox__arrow--previous {
		left: 2px;
	}

	.starartist-single-lightbox__arrow--next {
		right: 2px;
	}
}

@keyframes starartist-lightbox-spin {
	to { transform: rotate(360deg); }
}
