/* Shade Compare – frontend
   Reference look: white pill labels, white circular grip, soft rounded viewport. */

.lsc {
	--lsc-radius: 14px;
	--lsc-pill-bg: #ffffff;
	--lsc-pill-fg: #1c1c1e;
	--lsc-grip-bg: #ffffff;
	--lsc-grip-fg: #1c1c1e;
	--lsc-line: transparent;      /* Divider line off. White line ke liye #fff kar dein. */
	--lsc-accent: #c2185b;
	--lsc-border: #e6e1da;
	--lsc-muted: #6b6660;
	--lsc-shadow: 0 2px 10px rgba(28, 24, 20, .14);

	max-width: 620px;
	margin: 0 auto;
	font-size: 15px;
}

/* ---------- Product type tabs ---------- */

.lsc__tabs {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-bottom: 16px;
}

.lsc__tab {
	padding: 9px 18px;
	border: 1px solid var(--lsc-border);
	border-radius: 999px;
	background: transparent;
	color: var(--lsc-muted);
	font-size: 14px;
	line-height: 1.2;
	cursor: pointer;
	transition: background .18s ease, color .18s ease, border-color .18s ease;
}

.lsc__tab:hover { border-color: var(--lsc-accent); color: var(--lsc-accent); }

.lsc__tab.is-active {
	background: var(--lsc-accent);
	border-color: var(--lsc-accent);
	color: #fff;
}

/* ---------- Viewport ---------- */

.lsc__viewport {
	position: relative;
	width: 100%;
	aspect-ratio: var(--lsc-ratio, 4 / 3);
	overflow: hidden;
	border-radius: var(--lsc-radius);
	background: #efe9e2;
	touch-action: pan-y;
	user-select: none;
}

.lsc__img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	pointer-events: none;
}

/* Right shade ko clip karke reveal karte hain */
.lsc__clip {
	position: absolute;
	inset: 0;
	clip-path: inset(0 0 0 var(--lsc-pos, 50%));
}

/* ---------- Label pills ---------- */

.lsc__pill {
	position: absolute;
	bottom: 22px;
	z-index: 4;
	max-width: 42%;
	padding: 12px 22px;
	border: 0;
	border-radius: 999px;
	background: var(--lsc-pill-bg);
	color: var(--lsc-pill-fg);
	font-size: 15px;
	font-family: inherit;
	line-height: 1.2;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	box-shadow: var(--lsc-shadow);
	cursor: pointer;
	transition: box-shadow .2s ease, transform .2s ease;
}

.lsc__pill--left { left: 22px; }
.lsc__pill--right { right: 22px; }

.lsc__pill:hover { transform: translateY(-1px); }

/* Jis side par abhi shade set hoga uspar ring */
.lsc__pill.is-target {
	box-shadow: var(--lsc-shadow), 0 0 0 2px var(--lsc-accent);
}

/* ---------- Handle ---------- */

.lsc__handle {
	position: absolute;
	top: 0;
	bottom: 0;
	left: var(--lsc-pos, 50%);
	z-index: 3;
	width: 2px;
	margin-left: -1px;
	background: var(--lsc-line);
	pointer-events: none;
}

.lsc__grip {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	display: grid;
	place-items: center;
	width: 56px;
	height: 56px;
	border-radius: 50%;
	background: var(--lsc-grip-bg);
	color: var(--lsc-grip-fg);
	box-shadow: var(--lsc-shadow);
}

.lsc__grip svg { width: 26px; height: 26px; }

/* Invisible range = drag + tap + keyboard, sab free me */
.lsc__range {
	position: absolute;
	inset: 0;
	z-index: 2;
	width: 100%;
	height: 100%;
	margin: 0;
	padding: 0;
	border: 0;
	background: transparent;
	opacity: 0;
	cursor: ew-resize;
	appearance: none;
	-webkit-appearance: none;
}

.lsc__range::-webkit-slider-thumb {
	-webkit-appearance: none;
	width: 56px;
	height: 100%;
	cursor: ew-resize;
}

.lsc__range::-moz-range-thumb {
	width: 56px;
	height: 100%;
	border: 0;
	opacity: 0;
	cursor: ew-resize;
}

.lsc__range:focus-visible ~ .lsc__handle .lsc__grip {
	outline: 3px solid var(--lsc-accent);
	outline-offset: 3px;
}

/* ---------- Hint ---------- */

.lsc__hint {
	margin: 16px 0 10px;
	color: var(--lsc-muted);
	font-size: 14px;
	text-align: center;
}

.lsc__hint strong {
	color: var(--lsc-accent);
	font-weight: 600;
	text-transform: capitalize;
}

/* ---------- Swatches ---------- */

.lsc__swatches {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 14px;
}

.lsc__swatch {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 7px;
	width: 76px;
	padding: 6px 2px;
	border: 0;
	background: none;
	color: var(--lsc-muted);
	font-family: inherit;
	font-size: 12px;
	line-height: 1.3;
	text-align: center;
	cursor: pointer;
}

.lsc__dot {
	width: 40px;
	height: 40px;
	border-radius: 50%;
	background-size: cover;
	background-position: center;
	box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .08);
	transition: transform .18s ease, box-shadow .18s ease;
}

.lsc__swatch:hover .lsc__dot { transform: scale(1.08); }

/* Jo do shades abhi compare ho rahe hain unpar ring */
.lsc__swatch.is-left .lsc__dot,
.lsc__swatch.is-right .lsc__dot {
	box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--lsc-accent);
}

.lsc__swatch.is-left .lsc__swatch-name,
.lsc__swatch.is-right .lsc__swatch-name {
	color: var(--lsc-pill-fg);
	font-weight: 600;
}

.lsc__swatch[hidden] { display: none; }

/* ---------- Shop buttons ---------- */

.lsc__shop {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 10px;
	margin-top: 18px;
}

.lsc__buy {
	padding: 10px 20px;
	border-radius: 999px;
	background: var(--lsc-accent);
	color: #fff;
	font-size: 14px;
	text-decoration: none;
	transition: opacity .18s ease;
}

.lsc__buy:hover { opacity: .88; color: #fff; }
.lsc__buy[hidden] { display: none; }

/* ---------- Mobile ---------- */

@media (max-width: 520px) {
	.lsc__pill {
		bottom: 14px;
		padding: 9px 16px;
		font-size: 13px;
	}
	.lsc__pill--left { left: 14px; }
	.lsc__pill--right { right: 14px; }

	.lsc__grip { width: 46px; height: 46px; }
	.lsc__grip svg { width: 22px; height: 22px; }

	.lsc__swatches { gap: 10px; }
	.lsc__swatch { width: 62px; font-size: 11px; }
	.lsc__dot { width: 34px; height: 34px; }
}

@media (prefers-reduced-motion: reduce) {
	.lsc__pill, .lsc__dot, .lsc__tab, .lsc__buy { transition: none; }
}
