/**
 * CartNexa Custom Product Slider — Styles
 */

.cn-slider-wrapper {
	position: relative;
	width: 100%;
}

.cn-slider-viewport {
	position: relative;
	width: 100%;
	height: 520px;
	overflow: hidden;
	border-radius: 18px;
	background-color: var(--cn-soft-bg, #f8fcfd);
}

/* Auto height mode: viewport height is driven by the real image's aspect-ratio
   (set inline per-instance) instead of a fixed px value, so it never leaves a
   background gap when uploaded images don't match a fixed height. */
.cn-slider-wrapper.cn-slider-auto-height .cn-slider-viewport {
	height: auto;
}

.cn-slider-track {
	display: flex;
	width: 100%;
	height: 100%;
	will-change: transform;
	transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.cn-slider-wrapper.cn-dragging .cn-slider-track {
	transition: none;
}

.cn-slider-slide {
	position: relative;
	flex: 0 0 100%;
	width: 100%;
	height: 100%;
}

.cn-slider-slide img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	user-select: none;
	-webkit-user-drag: none;
}

/* Navigation Arrows */
.cn-slider-arrow {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	width: 42px;
	height: 42px;
	display: flex;
	align-items: center;
	justify-content: center;
	border: none;
	border-radius: 50%;
	background-color: rgba(255, 255, 255, 0.9);
	color: #233547;
	cursor: pointer;
	box-shadow: 0 4px 14px rgba(35, 53, 71, 0.12);
	transition: var(--cn-transition, all 0.25s ease);
	z-index: 3;
	padding: 0;
}

.cn-slider-arrow:hover {
	background-color: var(--cn-primary, #25c4c8);
	color: #fff;
	transform: translateY(-50%) scale(1.06);
}

.cn-slider-prev {
	left: 16px;
}

.cn-slider-next {
	right: 16px;
}

/* Dot Pagination */
.cn-slider-dots {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	margin-top: 16px;
}

.cn-slider-dot {
	width: 9px;
	height: 9px;
	border-radius: 50%;
	border: none;
	padding: 0;
	background-color: rgba(35, 53, 71, 0.25);
	cursor: pointer;
	transition: var(--cn-transition, all 0.25s ease);
}

.cn-slider-dot.active {
	background-color: var(--cn-primary, #25c4c8);
	width: 22px;
	border-radius: 5px;
}

.cn-slider-dot:hover {
	background-color: var(--cn-primary-hover, #19b0b4);
}

/* Editor-only notice when slider is off / has no images */
.cn-slider-editor-notice {
	border: 1px dashed var(--cn-border, #e6eef2);
	border-radius: 18px;
	padding: 40px 24px;
	text-align: center;
	background-color: var(--cn-soft-bg, #f8fcfd);
}

.cn-slider-editor-message {
	color: var(--cn-body, #667085);
	font-size: 14px;
	max-width: 460px;
	margin: 0 auto;
}

/* Tablet */
@media (max-width: 1024px) {
	.cn-slider-viewport {
		height: 420px;
	}

	.cn-slider-wrapper.cn-slider-auto-height .cn-slider-viewport {
		height: auto;
	}

	.cn-slider-arrow {
		width: 38px;
		height: 38px;
	}
}

/* Mobile */
@media (max-width: 767px) {
	.cn-slider-viewport {
		height: 320px;
		border-radius: 14px;
	}

	.cn-slider-wrapper.cn-slider-auto-height .cn-slider-viewport {
		height: auto;
	}

	.cn-slider-arrow {
		width: 34px;
		height: 34px;
	}

	.cn-slider-prev {
		left: 10px;
	}

	.cn-slider-next {
		right: 10px;
	}

	.cn-slider-dots {
		margin-top: 12px;
	}
}
