/* «Δοκίμασέ τα» (Virtual Try-On): κουμπί στις «Μετρήσεις & εφαρμογή» + παράθυρο κάμερας. */

.csl-try-cta {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	width: 100%;
	min-height: 52px;
	margin: 14px 0 6px;
	padding: 0 20px;
	border: 0;
	border-radius: var(--theme-button-border-radius, var(--csl-radius, 12px));
	background: #000;
	color: #fff;
	font: 700 15px/1.1 var(--csl-font-display, system-ui, sans-serif);
	letter-spacing: .01em;
	cursor: pointer;
	-webkit-tap-highlight-color: transparent;
}
.csl-try-cta[hidden] { display: none; }
.csl-try-cta svg { display: block; flex: 0 0 auto; }
.csl-try-cta:hover { background: #222; }
.csl-try-cta:focus-visible { outline: 2px solid #000; outline-offset: 3px; }

html.csl-try-open, html.csl-try-open body { overflow: hidden; }

.csl-try {
	--try-fg: #fff;
	--try-dim: rgba(255, 255, 255, .72);
	--try-line: rgba(255, 255, 255, .22);
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: flex;
	flex-direction: column;
	background: #000;
	color: var(--try-fg);
	font-family: var(--csl-font, system-ui, sans-serif);
	-webkit-font-smoothing: antialiased;
}
.csl-try *, .csl-try *::before, .csl-try *::after { box-sizing: border-box; }

.csl-try__stage { position: relative; flex: 1 1 auto; min-height: 0; overflow: hidden; }
.csl-try__cv { display: block; width: 100%; height: 100%; object-fit: cover; }
.csl-try.is-photo .csl-try__cv { object-fit: contain; }
@media (min-width: 900px) and (orientation: landscape) {
	.csl-try__cv { object-fit: contain; }
}

.csl-try__top {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	z-index: 2;
	display: flex;
	align-items: flex-start;
	gap: 12px;
	padding: max(12px, env(safe-area-inset-top)) 12px 28px 16px;
	background: linear-gradient(rgba(0, 0, 0, .55), transparent);
	pointer-events: none;
}
.csl-try__name { flex: 1 1 auto; min-width: 0; margin: 10px 0 0; font: 700 14px/1.3 var(--csl-font-display, system-ui, sans-serif); text-shadow: 0 1px 6px rgba(0, 0, 0, .4); }
.csl-try__name span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.csl-try__close {
	flex: 0 0 auto;
	display: grid;
	place-items: center;
	width: 44px;
	height: 44px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: rgba(0, 0, 0, .45);
	color: #fff;
	cursor: pointer;
	pointer-events: auto;
}
.csl-try__close svg { display: block; }

.csl-try__msg {
	position: absolute;
	left: 50%;
	top: 50%;
	z-index: 1;
	width: min(340px, calc(100% - 48px));
	transform: translate(-50%, -50%);
	text-align: center;
	font-size: 15px;
	line-height: 1.45;
}
.csl-try__msg[hidden] { display: none; }
.csl-try__msg p { margin: 0 0 14px; text-shadow: 0 1px 8px rgba(0, 0, 0, .5); }
.csl-try__msg.is-hint { top: auto; bottom: 14px; transform: translateX(-50%); }
.csl-try__msg.is-hint p { display: inline-block; margin: 0; padding: 8px 14px; border-radius: 18px; background: rgba(0, 0, 0, .55); font-size: 14px; }
.csl-try__msg.is-hint .csl-try__btn { display: flex; width: max-content; margin: 10px auto 0; }
.csl-try__bar { height: 3px; margin: 0 auto 14px; width: 160px; border-radius: 3px; background: var(--try-line); overflow: hidden; }
.csl-try__bar i { display: block; height: 100%; width: 0; background: #fff; transition: width .2s linear; }

.csl-try__panel {
	flex: 0 0 auto;
	padding: 12px 16px max(14px, env(safe-area-inset-bottom));
	background: #000;
}
.csl-try__chips {
	display: flex;
	gap: 10px;
	margin: 0 -16px 12px;
	padding: 2px 16px;
	overflow-x: auto;
	scrollbar-width: none;
	scroll-snap-type: x proximity;
}
.csl-try__chips::-webkit-scrollbar { display: none; }
.csl-try__chips[hidden] { display: none; }
.csl-try__chip {
	flex: 0 0 auto;
	display: grid;
	place-items: center;
	width: 72px;
	height: 48px;
	padding: 6px;
	border: 2px solid transparent;
	border-radius: 12px;
	background: #f2f2f2;
	cursor: pointer;
	scroll-snap-align: start;
}
.csl-try__chip img { display: block; max-width: 100%; max-height: 100%; object-fit: contain; }
.csl-try__chip[aria-pressed="true"] { border-color: #fff; box-shadow: 0 0 0 2px #000 inset; }
.csl-try__chip:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

.csl-try__row { display: flex; align-items: stretch; gap: 8px; }
/* «Λήψη»: μόνο με ανεβασμένη φωτογραφία (όταν η κάμερα δεν ανοίγει). */
.csl-try__act {
	flex: 0 0 auto;
	display: inline-flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 3px;
	min-width: 64px;
	min-height: 52px;
	padding: 4px 8px;
	border: 1px solid var(--try-line);
	border-radius: 14px;
	background: none;
	color: #fff;
	font: 600 11px/1.1 var(--csl-font, system-ui, sans-serif);
	cursor: pointer;
}
.csl-try__act[hidden] { display: none; }
.csl-try__act svg { display: block; }
.csl-try__act:focus-visible, .csl-try__buy:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.csl-try__buy {
	flex: 1 1 auto;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	width: 100%;
	min-height: 52px;
	padding: 0 16px;
	border-radius: 14px;
	background: #fff;
	color: #000 !important;
	font: 700 14px/1.1 var(--csl-font-display, system-ui, sans-serif);
	text-align: center;
	text-decoration: none !important;
}
.csl-try__buy.is-off { background: rgba(255, 255, 255, .14); color: var(--try-dim) !important; pointer-events: none; }
.csl-try__buy.loading { opacity: .6; }
.csl-try__fit { margin: 12px 0 0; color: #fff; font-size: 13.5px; line-height: 1.4; text-align: center; }
.csl-try__fit[hidden] { display: none; }
.csl-try__fit a { margin-left: 4px; color: #fff; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; white-space: nowrap; }
.csl-try__note { margin: 10px 0 0; color: var(--try-dim); font-size: 11.5px; line-height: 1.4; text-align: center; }

.csl-try__btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 44px;
	margin: 4px;
	padding: 0 18px;
	border: 1px solid #fff;
	border-radius: 999px;
	background: none;
	color: #fff;
	font: 700 13px/1 var(--csl-font-display, system-ui, sans-serif);
	cursor: pointer;
}
.csl-try__btn--solid { background: #fff; color: #000; }

/* Desktop: χρώματα τέρμα αριστερά, «Στο καλάθι» τέρμα δεξιά. */
@media (min-width: 900px) {
	.csl-try__panel { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; column-gap: 20px; padding: 14px 24px 16px; }
	.csl-try__chips { margin: 0; padding: 2px 0; }
	.csl-try__row { grid-column: 2; min-width: 420px; }
	.csl-try__fit, .csl-try__note { grid-column: 1 / -1; }
}

@media (prefers-reduced-motion: reduce) {
	.csl-try__bar i { transition: none; }
}
