.cr-6514-container {
	position: relative;
	width: 100%;
	perspective: 1000px; /* Default, overridden by controls */
	cursor: grab;
	user-select: none;
	-webkit-user-select: none;
    /* 
       CRITICAL FOR MOBILE: 
       'pan-y' allows the browser to handle vertical scrolling natively.
       Horizontal swipes (pan-x) are intercepted by our JS listeners.
       This prevents the "stuck" feeling.
    */
    touch-action: pan-y; 
}

.cr-6514-container:active {
	cursor: grabbing;
}

.cr-6514-inner {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	transform-style: preserve-3d;
	transition: transform 0.1s linear; /* Smooth linear movement during drag */
    will-change: transform;
}

/* When resetting, we use a slower ease */
.cr-6514-inner.is-resetting {
	transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1);
}

.cr-6514-face {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	backface-visibility: hidden;
	-webkit-backface-visibility: hidden;
    overflow: hidden; /* Contains border radius on images */
}

.cr-6514-face img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
    pointer-events: none; /* Prevent image dragging ghost */
}

.cr-6514-front {
	transform: rotateY(0deg);
	z-index: 2;
}

.cr-6514-back {
	transform: rotateY(180deg);
	z-index: 1;
}

/* Spacer keeps the container height equal to the image height */
.cr-6514-spacer {
	width: 100%;
	position: relative;
	z-index: -1;
    line-height: 0;
}

.cr-6514-spacer img {
	width: 100%;
	height: auto;
	display: block;
}

.cr-6514-instructions {
	position: absolute;
	bottom: 20px;
	left: 50%;
	transform: translateX(-50%);
	background: rgba(0, 0, 0, 0.6);
	color: #fff;
	padding: 8px 16px;
	border-radius: 20px;
	font-size: 12px;
	display: flex;
	align-items: center;
	gap: 6px;
	pointer-events: none;
	opacity: 1;
	transition: opacity 0.3s;
	z-index: 10;
}

.cr-6514-container.is-interacting .cr-6514-instructions {
	opacity: 0;
}
