/**
 * PDP gallery — Diamonds Factory style
 */

.single-product-wrap .cd-pdp-gallery {
	background: #fff;
	border: none;
	padding: 0 !important;
	grid-column: 1;
}

.cd-pdp-gallery__stage {
	position: relative;
	background: #fff;
	min-height: 480px;
}

.cd-pdp-gallery__viewport {
	position: relative;
	min-height: 480px;
	overflow: hidden;
}

.cd-pdp-gallery__slide {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.35s ease;
	padding: 24px 48px 36px;
}

.cd-pdp-gallery__slide[data-slide-type="studio"] {
	overflow: hidden;
}

.cd-pdp-gallery__slide[data-slide-type="studio"] img {
	transition: transform 0.25s ease;
	will-change: transform;
}

@media (hover: hover) and (pointer: fine) {
	.cd-pdp-gallery__slide[data-slide-type="studio"] {
		cursor: zoom-in;
	}

	.cd-pdp-gallery__slide[data-slide-type="studio"].is-zoomed img {
		transform: scale(2.1);
		transition: transform 0.1s ease-out;
	}
}

.cd-pdp-gallery__slide.is-active {
	opacity: 1;
	visibility: visible;
	z-index: 1;
}

.cd-pdp-gallery__slide[data-slide-type="studio"] img,
.cd-pdp-gallery__slide[data-slide-type="spin"] img {
	max-width: 100%;
	max-height: 100%;
	width: auto;
	height: auto;
	object-fit: contain;
}

/* Wide/landscape product photos (e.g. bracelets, bangles) would otherwise
 * sit tiny in the middle of the tall stage with big empty bars above and
 * below — pdp-gallery.js measures each studio image's natural ratio and
 * adds this class so those specific photos fill the stage instead
 * (cropping a little background on the sides), while normal square/
 * portrait photos (rings, earrings...) keep full, uncropped "contain"
 * sizing. */
.cd-pdp-gallery__slide[data-slide-type="studio"].is-wide-photo img {
	width: 100% !important;
	height: 100% !important;
	object-fit: cover !important;
}

.cd-pdp-gallery__arrow {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	z-index: 3;
	width: 44px;
	height: 44px;
	border: none;
	background: transparent;
	color: var(--color-brand, #3d1414);
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0;
	transition: opacity 0.2s ease;
}

.cd-pdp-gallery__arrow:hover {
	opacity: 0.65;
}

.cd-pdp-gallery__arrow--prev {
	left: 8px;
}

.cd-pdp-gallery__arrow--next {
	right: 8px;
}

.cd-pdp-gallery__progress {
	position: absolute;
	left: 50%;
	bottom: 14px;
	transform: translateX(-50%);
	width: min(280px, 60%);
	height: 3px;
	background: rgba(61, 20, 20, 0.12);
	border-radius: 999px;
	overflow: hidden;
	z-index: 2;
}

.cd-pdp-gallery__progress-bar {
	display: block;
	height: 100%;
	width: 20%;
	background: var(--color-brand, #3d1414);
	border-radius: inherit;
	transition: width 0.35s ease;
}

/* 360 spin slide */
.cd-pdp-spin {
	width: 100%;
	height: 100%;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	cursor: ew-resize;
	user-select: none;
}

.cd-pdp-spin.is-dragging {
	cursor: grabbing;
}

.cd-pdp-spin__frame {
	max-width: 100%;
	max-height: 400px;
	object-fit: contain;
	pointer-events: none;
}

.cd-pdp-spin__hint {
	margin: 12px 0 0;
	font-size: 0.72rem;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--color-muted, #6b6560);
}

/* Hand / on-model slide */
.cd-pdp-gallery__slide[data-slide-type="hand"] {
	padding: 16px 72px 32px 24px;
}

.cd-pdp-hand {
	position: relative;
	width: 100%;
	height: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
}

.cd-pdp-hand__base {
	width: 100%;
	max-width: 100%;
	max-height: 430px;
	object-fit: contain;
	object-position: center center;
	transition: filter 0.25s ease, transform 0.25s ease;
	transform-origin: center center;
}

.cd-pdp-hand__ring {
	display: none !important;
}

.cd-pdp-hand__controls {
	position: absolute;
	right: 12px;
	top: 50%;
	transform: translateY(-50%);
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 16px;
	z-index: 2;
}

.cd-pdp-hand__skin {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 8px;
}

.cd-pdp-hand__skin-label {
	font-size: 0.68rem;
	color: var(--color-muted, #6b6560);
	letter-spacing: 0.02em;
}

.cd-pdp-hand__skin-slider {
	writing-mode: vertical-lr;
	direction: rtl;
	width: 4px;
	height: 110px;
	appearance: none;
	background: linear-gradient(to bottom, #8d5524, #f1c9a2);
	border-radius: 999px;
	outline: none;
	cursor: pointer;
}

.cd-pdp-hand__skin-slider::-webkit-slider-thumb {
	appearance: none;
	width: 16px;
	height: 16px;
	border-radius: 50%;
	background: #fff;
	border: 1px solid rgba(0, 0, 0, 0.15);
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
}

.cd-pdp-hand__skin-slider::-moz-range-thumb {
	width: 16px;
	height: 16px;
	border-radius: 50%;
	background: #fff;
	border: 1px solid rgba(0, 0, 0, 0.15);
}

.cd-pdp-hand__carat {
	display: flex;
	align-items: center;
	gap: 6px;
	font-size: 0.78rem;
	color: var(--color-text, #1a1a1a);
}

.cd-pdp-hand__carat-btn {
	width: 28px;
	height: 28px;
	border: 1px solid var(--color-border, #ddd);
	background: #fff;
	border-radius: 50%;
	cursor: pointer;
	font-size: 1rem;
	line-height: 1;
	padding: 0;
	color: var(--color-brand, #3d1414);
}

.cd-pdp-hand__carat-btn:hover {
	border-color: var(--color-brand, #3d1414);
}

.cd-pdp-hand__carat-value {
	min-width: 2.8em;
	text-align: center;
	font-weight: 500;
}

@media (max-width: 900px) {
	.cd-pdp-gallery__stage,
	.cd-pdp-gallery__viewport {
		min-height: 360px;
	}

	.cd-pdp-gallery__slide {
		padding: 16px 40px 32px;
	}

	.cd-pdp-gallery__slide[data-slide-type="hand"] {
		padding-right: 64px;
	}
}
