/* JW.C Konfigurator (Figma node 110:1200) – 3D preview left, configuration panel right. */
.jwcfg {
	--c-bg: #0d0d0b;
	--c-line: #292925;
	--c-text: #e9e7e2;
	--c-mid: #96938a;
	--c-dim: #625f57;
	--c-card: #141411;
	--c-card-line: #272722;
	--c-active-line: #8d8b80;
	--panel-w: 587px;
	--c-cta: #434243;
	--c-glow: rgba(1, 110, 215, 0.6);
	position: relative;
	display: flex;
	width: 100%;
	height: 100vh;
	min-height: 720px;
	max-height: 1200px;
	overflow: hidden;
	background: var(--c-bg);
	color: var(--c-text);
	font-family: 'Inter', sans-serif;
	font-weight: 400;
	-webkit-font-smoothing: antialiased;
}
.jwcfg *, .jwcfg *::before, .jwcfg *::after { box-sizing: border-box; }
.jwcfg button { font: inherit; color: inherit; background: none; border: 0; margin: 0; padding: 0; cursor: pointer; letter-spacing: 0; text-transform: none; }
.jwcfg p { margin: 0; }

/* ---------------- 3D preview ---------------- */
.jwcfg__stage {
	position: relative;
	flex: 1 1 auto;
	min-width: 0;
	background: radial-gradient(ellipse 120% 90% at 50% 100%, #1b1a17 0%, #121211 60%, #0f0f0d 100%);
	overflow: hidden;
}
/* blue glow top right (Figma "Ellipse 2": #016ED7 99, blur 400) */
.jwcfg__stage::before {
	content: "";
	position: absolute;
	width: 1921px;
	height: 1443px;
	left: 217px;
	top: -828px;
	border-radius: 50%;
	background: var(--c-glow);
	opacity: 1;
	filter: blur(200px);
	pointer-events: none;
	z-index: 0;
}
.jwcfg__title {
	position: absolute;
	left: 26px;
	top: 56px;
	z-index: 3;
	margin: 0;
	font-size: 24px;
	line-height: 29px;
	font-weight: 500;
	color: var(--c-text);
	letter-spacing: 0;
	text-transform: none;
}
.jwcfg__viewer {
	position: absolute;
	inset: 0;
	z-index: 1;
	width: 100%;
	height: 100%;
	background: transparent;
	--poster-color: transparent;
	--progress-bar-color: transparent;
}
.jwcfg__viewer:focus:not(:focus-visible) { outline: none; }
.jwcfg__viewer:focus-visible { outline: 2px solid var(--c-text); outline-offset: -4px; }

/* keyboard focus: visible ring on every control (mouse clicks stay clean) */
.jwcfg button:focus-visible,
.jwcfg .jwcfg__input:focus-visible,
.jwcfg .jwcfg__step:focus-visible {
	outline: 2px solid var(--c-text) !important;
	outline-offset: 3px;
}
.jwcfg .jwcfg__tab:focus-visible { outline-offset: -2px; }

/* small side view, bottom left (also resets the camera) */
.jwcfg__thumb {
	position: absolute;
	left: 22px;
	bottom: 34px;
	z-index: 3;
	width: 153px;
	opacity: 0.95;
	transition: opacity 0.3s ease, transform 0.3s ease;
}
.jwcfg__thumb:hover { transform: translateY(-2px); }
.jwcfg__thumb img { display: block; width: 100%; height: auto; }
.jwcfg__thumb::after {
	content: "";
	display: block;
	width: 160px;
	height: 5px;
	margin: 2px 0 0 -8px;
	border-radius: 50%;
	background: radial-gradient(closest-side, rgba(0, 0, 0, 0.7), transparent);
}

/* view buttons, bottom right of the preview */
.jwcfg__views {
	position: absolute;
	right: 26px;
	bottom: 46px;
	z-index: 3;
	display: flex;
	gap: 8px;
}
.jwcfg .jwcfg__view {
	height: 38px;
	padding: 0 16.5px !important;
	border-radius: 30px;
	border: 1.27px solid #272722 !important;
	background: #121210 !important;
	color: var(--c-mid) !important;
	font-size: 16px !important;
	line-height: 1 !important;
	transition: color 0.25s ease, border-color 0.25s ease, background-color 0.25s ease;
}
.jwcfg__view:hover { color: var(--c-text) !important; }
.jwcfg__view.is-active { background: #141411 !important; border-color: #393832 !important; color: var(--c-text) !important; }

/* engraving bubble (model-viewer hotspot on the plate) */
.jwcfg__bubble {
	position: relative;
	width: 0;
	height: 0;
	pointer-events: none;
	opacity: 0;
	transition: opacity 0.35s ease;
	--bubble-x: 60px;
	--bubble-y: -150px;
	--bubble-size: 120px;
}
.jwcfg.show-bubble .jwcfg__bubble { opacity: 1; }
.jwcfg__bubble svg { position: absolute; left: 0; top: 0; overflow: visible; }
.jwcfg__bubble-circle {
	position: absolute;
	left: var(--bubble-x);
	top: var(--bubble-y);
	width: var(--bubble-size);
	height: var(--bubble-size);
	border-radius: 50%;
	background: #dcd4c7;
	box-shadow: 0 0 0 21px rgba(220, 212, 199, 0.08), 0 20px 50px rgba(0, 0, 0, 0.35);
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 10px;
	color: #27221a;
	font-size: 16px;
	line-height: 1.15;
	text-align: center;
	text-transform: uppercase;
	word-break: break-word;
}

/* dimension labels (view "Masse") */
.jwcfg__dim {
	pointer-events: none;
	opacity: 0;
	transition: opacity 0.3s ease;
	padding: 6px 12px;
	border-radius: 30px;
	border: 1px solid #393832;
	background: rgba(13, 13, 11, 0.85);
	color: var(--c-text);
	font-size: 13px;
	line-height: 1;
	white-space: nowrap;
	transform: translate(-50%, -50%);
}
.jwcfg.show-dims .jwcfg__dim { opacity: 1; }

/* ---------------- panel ---------------- */
.jwcfg__panel {
	position: relative;
	z-index: 2;
	flex: 0 0 var(--panel-w);
	width: var(--panel-w);
	display: flex;
	flex-direction: column;
	background: var(--c-bg);
	border-left: 1.27px solid var(--c-line);
}
.jwcfg__tabs {
	flex: 0 0 72px;
	display: flex;
	align-items: stretch;
	gap: 25.4px;
	padding: 0 36.8px;
	border-bottom: 1.27px solid var(--c-line);
	overflow-x: auto;
	scrollbar-width: none;
}
.jwcfg .jwcfg__tab {
	display: flex;
	align-items: center;
	align-self: stretch;
	gap: 8.9px;
	height: auto !important;
	min-height: 0 !important;
	padding: 0 !important;
	margin: 0 !important;
	white-space: nowrap;
	background: none !important;
	box-shadow: none !important;
	border: 0 !important;
	border-radius: 0 !important;
	border-bottom: 1.27px solid transparent !important;
	color: var(--c-mid) !important;
	font-size: 16px !important;
	transition: color 0.25s ease, border-color 0.25s ease;
}
.jwcfg__tab span { color: var(--c-dim); font-size: 14px; transition: color 0.25s ease; }
.jwcfg__tab:hover { color: var(--c-text) !important; }
.jwcfg__tab.is-active { color: var(--c-text) !important; border-bottom-color: var(--c-text) !important; }
.jwcfg__tab.is-active span { color: var(--c-mid); }

.jwcfg__body {
	flex: 1 1 auto;
	min-height: 0;
	overflow-y: auto;
	padding: 24px 25.4px 30px;
	scrollbar-width: thin;
	scrollbar-color: #292925 transparent;
}
.jwcfg__step { display: none; flex-direction: column; gap: 20.3px; }
.jwcfg__step.is-active { display: flex; animation: jwcfg-in 0.45s ease both; }
@keyframes jwcfg-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.jwcfg__intro { color: var(--c-mid); font-size: 16.5px; line-height: 1.25; }
.jwcfg__label {
	padding-top: 6.3px;
	color: var(--c-mid);
	font-size: 14px;
	letter-spacing: 2.54px;
	text-transform: uppercase;
}

/* option cards (2 per row) */
.jwcfg__options { display: grid; grid-template-columns: 1fr 1fr; gap: 10.2px; }
.jwcfg__card {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 7.6px;
	min-height: 83.8px;
	padding: 17.8px 12.7px 12.7px 16.5px !important;
	border: 1.27px solid var(--c-line) !important;
	border-radius: 2.54px !important;
	background: var(--c-bg) !important;
	color: var(--c-mid) !important;
	text-align: left;
	transition: border-color 0.25s ease, color 0.25s ease, background-color 0.25s ease;
}
.jwcfg__card:hover { border-color: #4a4943 !important; color: var(--c-text) !important; }
.jwcfg__card.is-selected { background: var(--c-card) !important; border-color: var(--c-active-line) !important; color: var(--c-text) !important; }
.jwcfg__card-title { font-size: 17.8px; line-height: 1.2; }
.jwcfg__card-sub { font-size: 14px; line-height: 1.2; color: var(--c-mid); }
.jwcfg__swatch {
	position: absolute;
	right: 14px;
	top: 16px;
	width: 26px;
	height: 26px;
	border-radius: 50%;
	box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.14), 0 0 0 3px var(--c-bg);
	transition: box-shadow 0.25s ease;
}
.jwcfg__card.is-selected .jwcfg__swatch { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.14), 0 0 0 3px var(--c-card), 0 0 0 4px var(--c-active-line); }

/* engraving step: plate preview + text input */
.jwcfg__plate-box {
	display: flex;
	align-items: center;
	justify-content: center;
	height: 290.8px;
	border: 1.27px solid var(--c-card-line);
	border-radius: 2.54px;
	background: var(--c-card);
}
.jwcfg__plate {
	position: relative;
	width: 230px;
	height: 193px;
	border-radius: 18px;
	padding: 9px;
	background: linear-gradient(145deg, #f6f5f1 0%, #b9b6ae 45%, #f2f0ea 70%, #a9a59c 100%);
	box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
}
.jwcfg__plate-inner {
	width: 100%;
	height: 100%;
	border-radius: 11px;
	border: 2px solid #1a1a18;
	background:
		repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.05) 0 1px, rgba(0, 0, 0, 0.04) 1px 2px),
		linear-gradient(160deg, #d9cfbd 0%, #b8ad9a 55%, #d2c8b6 100%);
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 16px;
	color: #2a2620;
	font-size: 22px;
	font-weight: 500;
	text-align: center;
	text-shadow: 0 1px 0 rgba(255, 255, 255, 0.35);
	word-break: break-word;
}
.jwcfg__plate-inner.is-empty { color: rgba(42, 38, 32, 0.35); font-weight: 400; font-size: 15px; letter-spacing: 1.5px; text-transform: uppercase; }
.jwcfg__field { display: flex; flex-direction: column; gap: 8px; }
.jwcfg__input {
	width: 100%;
	height: 52px;
	padding: 0 16.5px !important;
	border: 1.27px solid var(--c-line) !important;
	border-radius: 2.54px !important;
	background: var(--c-bg) !important;
	color: var(--c-text) !important;
	font: 400 17px/1 'Inter', sans-serif !important;
	box-shadow: none !important;
	outline: none;
	transition: border-color 0.25s ease;
}
.jwcfg__input:focus { border-color: var(--c-active-line) !important; }
.jwcfg__input::placeholder { color: var(--c-dim); }
.jwcfg__hint { display: flex; justify-content: space-between; color: var(--c-dim); font-size: 13px; }

/* delivery step */
.jwcfg__summary { display: flex; flex-direction: column; border-top: 1.27px solid var(--c-line); }
.jwcfg__summary-row {
	display: flex;
	justify-content: space-between;
	gap: 20px;
	padding: 16px 0;
	border-bottom: 1.27px solid var(--c-line);
	font-size: 16px;
}
.jwcfg__summary-row dt { color: var(--c-mid); }
.jwcfg__summary-row dd { margin: 0; color: var(--c-text); text-align: right; }
.jwcfg__note { color: var(--c-mid); font-size: 14px; line-height: 1.5; }

/* footer: price + navigation */
.jwcfg__foot {
	flex: 0 0 auto;
	display: flex;
	flex-direction: column;
	gap: 16.5px;
	padding: 16.5px 25.4px 26px;
	border-top: 1.27px solid var(--c-line);
}
.jwcfg__foot-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; }
.jwcfg__price { display: flex; align-items: baseline; gap: 8px; font-size: 28px; line-height: 34px; white-space: nowrap; }
.jwcfg__price small { font-size: 10px; line-height: 12px; }
.jwcfg__vat { margin-top: 5px; color: var(--c-mid); font-size: 14px; }
.jwcfg__nav { display: flex; gap: 7.6px; }
.jwcfg__btn {
	height: 40px;
	padding: 0 20.3px !important;
	border: 1.27px solid #373731 !important;
	border-radius: 30px !important;
	color: var(--c-text) !important;
	font-size: 14px !important;
	transition: border-color 0.25s ease, background-color 0.25s ease, opacity 0.25s ease;
}
.jwcfg__btn:hover { border-color: var(--c-active-line) !important; }
.jwcfg__btn:disabled { opacity: 0.35; cursor: default; }
.jwcfg__cta {
	height: 50px;
	width: 100%;
	border-radius: 30px !important;
	background: var(--c-cta) !important;
	color: #fff !important;
	font-size: 18px !important;
	transition: background-color 0.25s ease;
}
.jwcfg__cta:hover { background: #55545a !important; }
.jwcfg__cta.is-ready { background: var(--c-text) !important; color: var(--c-bg) !important; }
.jwcfg__cta.is-loading { opacity: 0.6; pointer-events: none; }
.jwcfg__msg { min-height: 0; color: #e0907a; font-size: 13px; }

/* ---------------- tablet / mobile ---------------- */
@media (max-width: 1280px) {
	.jwcfg { --panel-w: 460px; }
	.jwcfg__tabs { padding: 0 22px; gap: 18px; }
}
@media (max-width: 1024px) {
	.jwcfg { flex-direction: column; height: auto; max-height: none; min-height: 0; }
	.jwcfg__stage { flex: 0 0 auto; height: 62vh; min-height: 420px; }
	.jwcfg__panel { flex: 0 0 auto; width: 100%; border-left: 0; border-top: 1.27px solid var(--c-line); }
	.jwcfg__body { overflow: visible; }
	.jwcfg__thumb { display: none; }
	.jwcfg__views { right: 16px; bottom: 16px; }
	.jwcfg__title { top: 24px; left: 20px; }
}
@media (max-width: 600px) {
	.jwcfg__stage { height: 56vh; min-height: 360px; }
	.jwcfg__views { left: 16px; right: 16px; justify-content: center; }
	.jwcfg .jwcfg__view { font-size: 14px !important; padding: 0 12px !important; height: 34px; }
	/* 4 tabs share the width; labels may wrap ("Gravur / Plakette"), numbers hidden */
	.jwcfg__tabs { flex-basis: 60px; gap: 6px; padding: 0 12px; overflow: hidden; }
	.jwcfg .jwcfg__tab { flex: 1 1 0; min-width: 0; justify-content: center; text-align: center; white-space: normal; font-size: 13px !important; line-height: 1.2 !important; }
	.jwcfg .jwcfg__tab span { display: none; }
	.jwcfg__body { padding: 20px 16px 26px; }
	/* colour cards: 2 per row, compact */
	.jwcfg__options { grid-template-columns: 1fr 1fr; gap: 8px; }
	.jwcfg .jwcfg__card { min-height: 70px; padding: 13px 38px 11px 13px !important; gap: 5px; }
	.jwcfg__card-title { font-size: 15px; }
	.jwcfg__card-sub { font-size: 12px; }
	.jwcfg__swatch { width: 20px; height: 20px; right: 11px; top: 13px; }
	.jwcfg__foot { padding: 16px; }
	.jwcfg__foot-row { flex-direction: column; align-items: stretch; }
	.jwcfg__nav .jwcfg__btn { flex: 1; }
	.jwcfg__plate-box { height: 230px; }
	.jwcfg__plate { width: 190px; height: 160px; }
}

/* ===================== v2 (JW-45/47/48): surfaces, sides, engraving, summary ===================== */
.jwcfg:not(.jwcfg--sb) .jwcfg__card { padding-right: 46px !important; }
.jwcfg:not(.jwcfg--sb) .jwcfg__card-title { overflow-wrap: anywhere; }
.jwcfg__options--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.jwcfg__swatch--img { background-size: cover !important; background-position: center !important; }
.jwcfg__surface { display: flex; flex-direction: column; gap: 12px; }
.jwcfg__surface + .jwcfg__surface { margin-top: 18px; padding-top: 18px; border-top: 1.27px solid var(--c-line); }
.jwcfg__sub-title { margin: 0; color: var(--c-text); font-size: 17px; }
/* colour palette only for lacquer, own-colour field only when chosen */
.jwcfg__surface:not(.is-lack) .jwcfg__colors { display: none; }
.jwcfg__colors { display: flex; flex-direction: column; gap: 12px; }
.jwcfg__surface:not(.is-custom) .jwcfg__custom { display: none; }
/* finish: segmented buttons */
.jwcfg__seg { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.jwcfg .jwcfg__seg-btn {
	min-height: 44px; height: auto !important; padding: 8px !important; border: 1.27px solid var(--c-line) !important; border-radius: 2.54px !important;
	background: var(--c-bg) !important; color: var(--c-mid) !important; font-size: 14px !important; line-height: 1.2 !important; cursor: pointer;
	transition: border-color .25s ease, color .25s ease, background-color .25s ease;
}
.jwcfg .jwcfg__seg-btn small { display: block; font-size: 12px; opacity: .8; }
.jwcfg .jwcfg__seg-btn:hover { color: var(--c-text) !important; }
.jwcfg .jwcfg__seg-btn.is-selected { background: var(--c-card) !important; border-color: var(--c-active-line) !important; color: var(--c-text) !important; }
/* "same on both sides" switch */
.jwcfg__toggle { display: flex; align-items: center; gap: 12px; margin: 4px 0 6px; color: var(--c-text); font-size: 15px; cursor: pointer; user-select: none; }
.jwcfg__toggle input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.jwcfg__toggle-ui { position: relative; flex: 0 0 auto; width: 40px; height: 22px; border-radius: 11px; background: #2b2a26; border: 1.27px solid var(--c-line); transition: background-color .25s ease; }
.jwcfg__toggle-ui::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: var(--c-mid); transition: transform .25s ease, background-color .25s ease; }
.jwcfg__toggle input:checked + .jwcfg__toggle-ui { background: #3a3933; }
.jwcfg__toggle input:checked + .jwcfg__toggle-ui::after { transform: translateX(18px); background: var(--c-text); }
.jwcfg__toggle input:focus-visible + .jwcfg__toggle-ui { outline: 2px solid var(--c-text); outline-offset: 2px; }
.jwcfg__sides-split { display: none; }
.jwcfg.sides-split .jwcfg__sides-same { display: none; }
.jwcfg.sides-split .jwcfg__sides-split { display: block; }
/* engraving: plate preview with logo + lines, logo upload */
.jwcfg__plate-inner { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; text-align: center; }
.jwcfg__plate-logo { max-width: 60%; max-height: 44px; object-fit: contain; filter: grayscale(1) brightness(.35); }
.jwcfg__plate-logo[hidden] { display: none; }
.jwcfg__label small { color: var(--c-mid); font-size: 13px; letter-spacing: 0; text-transform: none; margin-left: 6px; }
.jwcfg__upload {
	position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; min-height: 120px; padding: 18px;
	border: 1.27px dashed #3b3a35; border-radius: 2.54px; color: var(--c-mid); text-align: center; cursor: pointer; transition: border-color .25s ease, color .25s ease;
}
.jwcfg__upload:hover { border-color: var(--c-active-line); color: var(--c-text); }
.jwcfg__upload input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.jwcfg__upload-inner { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.jwcfg__upload img { max-width: 200px; max-height: 90px; object-fit: contain; background: #fff; padding: 8px; border-radius: 2px; }
.jwcfg__upload-doc { display: inline-flex; align-items: center; justify-content: center; width: 56px; height: 68px; border: 1.27px solid var(--c-active-line); border-radius: 3px; color: var(--c-text); font-size: 13px; }
.jwcfg__upload-name { color: var(--c-text); font-size: 14px; word-break: break-all; }
.jwcfg .jwcfg__link { background: none !important; border: 0 !important; color: var(--c-mid) !important; font-size: 13px !important; text-decoration: underline !important; padding: 0 !important; cursor: pointer; }
.jwcfg__hint--block { display: block !important; margin: 0; color: var(--c-dim); font-size: 13px; line-height: 1.45; }
/* summary: label · value · surcharge */
.jwcfg:not(.jwcfg--sb) .jwcfg__summary-row { display: grid; grid-template-columns: minmax(110px, 36%) minmax(0, 1fr) auto; gap: 4px 14px; align-items: baseline; font-size: 15px; padding: 13px 0; }
.jwcfg:not(.jwcfg--sb) .jwcfg__summary-row dd { text-align: left; overflow-wrap: anywhere; }
.jwcfg__sum-price { color: var(--c-mid); white-space: nowrap; text-align: right; }
.jwcfg__sum-total { display: flex; justify-content: space-between; padding: 16px 0 2px; font-size: 18px; color: var(--c-text); }
.jwcfg__sum-net { margin: 0 0 6px; text-align: right; color: var(--c-mid); font-size: 13px; }
@media (max-width: 600px) {
	.jwcfg__options--3 { grid-template-columns: 1fr 1fr; }
	.jwcfg:not(.jwcfg--sb) .jwcfg__summary-row { grid-template-columns: minmax(0, 1fr) auto; }
	.jwcfg:not(.jwcfg--sb) .jwcfg__summary-row dt { grid-column: 1 / -1; font-size: 12px; }
	.jwcfg .jwcfg__seg-btn { font-size: 13px !important; }
}
/* 5 tabs: scroll sideways on narrow panels, the active one is kept visible (JS) */
.jwcfg:not(.jwcfg--sb) .jwcfg__tabs { overflow-x: auto; overflow-y: hidden; scrollbar-width: none; gap: 20px; }
.jwcfg:not(.jwcfg--sb) .jwcfg__tabs::-webkit-scrollbar { display: none; }
.jwcfg:not(.jwcfg--sb) .jwcfg__tab { flex: 0 0 auto; }
