/* Cuvys Compare Images — WoodMart before/after slider + card grid. Isolated. */

.elementor-element.elementor-widget-cuvys-essential-commerce-compare-images,
.e-con > .elementor-widget-cuvys-essential-commerce-compare-images,
.e-con-inner > .elementor-widget-cuvys-essential-commerce-compare-images,
.elementor-edit-area .elementor-widget-cuvys-essential-commerce-compare-images {
	--width: 100%;
	--flex-grow: 1;
	--flex-basis: 100%;
	--align-self: stretch;
	--container-widget-width: 100%;
	width: 100% !important;
	max-width: 100% !important;
	flex-grow: 1 !important;
	flex-shrink: 1;
	flex-basis: 100% !important;
	align-self: stretch !important;
	min-width: 0;
	box-sizing: border-box;
}

.elementor-widget-cuvys-essential-commerce-compare-images > .elementor-widget-container {
	width: 100% !important;
	max-width: 100% !important;
	height: auto;
	box-sizing: border-box;
}

.cuvys-ec-compare-images {
	--cuvys-ec-ci-cols: 3;
	--cuvys-ec-ci-gap: 24px;
	--cuvys-ec-ci-handle-pos: 50%;
	display: grid;
	grid-template-columns: repeat(var(--cuvys-ec-ci-cols), minmax(0, 1fr));
	gap: var(--cuvys-ec-ci-gap);
	width: 100%;
	max-width: 100%;
	box-sizing: border-box;
}

.cuvys-ec-ci-card {
	display: flex;
	flex-direction: column;
	width: 100%;
	min-width: 0;
	background: #2f1028;
	border-radius: 18px;
	overflow: hidden;
	box-sizing: border-box;
}

.cuvys-ec-ci-slider {
	position: relative;
	width: 100%;
	aspect-ratio: 1 / 1;
	overflow: hidden;
	user-select: none;
	-webkit-user-select: none;
	touch-action: pan-y;
}

.cuvys-ec-ci-slider.is-dragging {
	cursor: ew-resize;
	touch-action: none;
}

.cuvys-ec-ci-layer {
	position: absolute;
	inset: 0;
}

.cuvys-ec-ci-layer--after {
	z-index: 1;
}

.cuvys-ec-ci-layer--before {
	z-index: 2;
	clip-path: inset(0 calc(100% - var(--cuvys-ec-ci-handle-pos)) 0 0);
	-webkit-clip-path: inset(0 calc(100% - var(--cuvys-ec-ci-handle-pos)) 0 0);
}

.cuvys-ec-ci-img,
.cuvys-ec-ci-placeholder {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center;
	pointer-events: none;
	-webkit-user-drag: none;
}

.cuvys-ec-ci-placeholder {
	background: linear-gradient(160deg, #d8d0cc 0%, #b8b0ab 100%);
}

.cuvys-ec-ci-layer--before .cuvys-ec-ci-placeholder {
	background: linear-gradient(160deg, #c4bbb6 0%, #9e9590 100%);
}

.cuvys-ec-ci-label {
	position: absolute;
	z-index: 4;
	top: 16px;
	padding: 4px 10px;
	border-radius: 999px;
	background: #1c0c18;
	color: #fff;
	font-size: 11px;
	line-height: 1.3;
	letter-spacing: 0.02em;
	pointer-events: none;
	white-space: nowrap;
	display: inline-block;
}

.cuvys-ec-ci-label--before {
	left: 16px;
}

.cuvys-ec-ci-label--after {
	right: 16px;
}

.cuvys-ec-ci-handle,
.elementor-widget-cuvys-essential-commerce-compare-images .cuvys-ec-ci-handle,
.elementor-edit-area .cuvys-ec-ci-handle {
	position: absolute;
	top: 0;
	bottom: 0;
	left: var(--cuvys-ec-ci-handle-pos);
	z-index: 5;
	display: block;
	width: 44px;
	height: auto;
	min-width: 0;
	min-height: 0;
	margin: 0;
	padding: 0;
	transform: translateX(-50%);
	border: 0;
	border-radius: 0;
	background: transparent;
	box-shadow: none;
	color: inherit;
	font-size: inherit;
	line-height: 0;
	cursor: ew-resize;
	appearance: none;
	-webkit-appearance: none;
	touch-action: none;
}

.cuvys-ec-ci-handle:focus-visible {
	outline: 2px solid #fff;
	outline-offset: 2px;
}

.cuvys-ec-ci-handle-line {
	position: absolute;
	top: 0;
	bottom: 0;
	left: 50%;
	width: 2px;
	transform: translateX(-50%);
	background: #fff;
	pointer-events: none;
}

.cuvys-ec-ci-handle-knob {
	position: absolute;
	top: 50%;
	left: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	transform: translate(-50%, -50%);
	border-radius: var(--cuvys-ec-ci-knob-radius, 50%);
	background: #2f1028;
	color: #fff;
	pointer-events: none;
	box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.cuvys-ec-ci-handle-icon {
	display: block;
}

.cuvys-ec-ci-meta {
	padding: 18px 16px 22px;
	text-align: center;
}

.cuvys-ec-ci-title {
	margin: 0 0 6px;
	color: #fff;
	font-size: 16px;
	font-weight: 400;
	line-height: 1.35;
}

.cuvys-ec-ci-link {
	display: inline-block;
	color: #fff;
	font-size: 13px;
	line-height: 1.4;
	text-decoration: none;
}

.cuvys-ec-ci-link:hover {
	text-decoration: underline;
}
