/* ─────────────────────────────────────────────
   Alty Sticker Builder — Design System v3
   Senior UI/UX pass: compact, canvas-first
   ───────────────────────────────────────────── */

:root {
	--alty-accent:        #20d7a1;
	--alty-accent-deep:   #0f9a73;
	--alty-ink:           #0d1117;
	--alty-ink-soft:      #374151;
	--alty-muted:         #6b7280;
	--alty-muted-light:   #9ca3af;
	--alty-surface:       #f9fafb;
	--alty-background:    #e8eaed;
	--alty-panel:         #ffffff;
	--alty-stroke:        rgba(17, 24, 39, 0.09);
	--alty-stroke-md:     rgba(17, 24, 39, 0.14);
	--alty-shadow-sm:     0 1px 3px rgba(16,20,24,.08), 0 4px 12px rgba(16,20,24,.06);
	--alty-shadow:        0 8px 32px rgba(16,20,24,.14);
	--alty-shadow-xl:     0 24px 64px rgba(16,20,24,.18);
	--alty-radius-sm:     0.5rem;
	--alty-radius:        0.875rem;
	--alty-radius-lg:     1.25rem;
	--alty-radius-xl:     1.75rem;
	--alty-bar-h:         88px;
	--alty-header-h:      52px;
	--alty-sidebar-w:     400px;
	--font-body:          "Space Grotesk", "Inter", "Helvetica Neue", Arial, sans-serif;
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; }

html {
	height: 100%;
}

body.alty-sticker-builder-page {
	margin: 0 !important;
	padding: 0 !important;
	height: 100%;
	overflow: hidden;
	background:
		radial-gradient(ellipse at top left,  rgba(32,215,161,.12) 0%, transparent 40%),
		radial-gradient(ellipse at bottom right, rgba(56,189,248,.10) 0%, transparent 36%),
		var(--alty-background);
	color: var(--alty-ink);
	font-family: var(--font-body);
	-webkit-font-smoothing: antialiased;
}

/* Kill WordPress admin bar interference */
body.alty-sticker-builder-page #wpadminbar {
	display: none !important;
}

html body.alty-sticker-builder-page {
	margin-top: 0 !important;
	padding-top: 0 !important;
}

/* ════════════════════════════════════════════
   SHELL
   ════════════════════════════════════════════ */

.alty-builder-shell {
	position: fixed;
	inset: 0;
	display: grid;
	grid-template-rows: var(--alty-header-h) 1fr;
	overflow: hidden;
}

/* ════════════════════════════════════════════
   HEADER
   ════════════════════════════════════════════ */

.alty-builder-header {
	position: sticky;
	top: 0;
	z-index: 40;
	height: var(--alty-header-h);
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	padding: 0 1rem;
	background: rgba(10, 13, 18, 0.92);
	backdrop-filter: blur(20px) saturate(1.4);
	-webkit-backdrop-filter: blur(20px) saturate(1.4);
	border-bottom: 1px solid rgba(255,255,255,.06);
	color: #fff;
}

.alty-builder-header__brand,
.alty-builder-header__cart,
.alty-builder-header__title-group,
.alty-builder-header__actions,
.alty-builder-header__languages,
.alty-builder-header__language-link {
	display: flex;
	align-items: center;
}

.alty-builder-header__brand {
	flex: 1 1 auto;
	min-width: 0;
	gap: 0.75rem;
}

.alty-builder-header__cart {
	flex-shrink: 0;
}

.alty-builder-header__actions {
	flex-shrink: 0;
	gap: 0.55rem;
}

.alty-builder-header__title-group {
	min-width: 0;
	gap: 0.65rem;
}

.alty-builder-header__logo {
	width: 1.75rem;
	height: 1.75rem;
	border-radius: 0.45rem;
	object-fit: cover;
	background: rgba(255,255,255,.06);
	border: 1px solid rgba(255,255,255,.08);
	flex-shrink: 0;
}

.alty-builder-header__title {
	margin: 0;
	font-size: 1rem;
	font-weight: 700;
	letter-spacing: -0.02em;
	line-height: 1.1;
	color: #fff;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.alty-builder-header__back,
.alty-builder-header__cart-link {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	padding: 0.42rem 0.78rem;
	border-radius: 999px;
	border: 1px solid rgba(255,255,255,.08);
	color: rgba(255,255,255,.82);
	text-decoration: none;
	font-size: 0.8rem;
	font-weight: 600;
	background: rgba(255,255,255,.04);
	transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.alty-builder-header__back:hover,
.alty-builder-header__cart-link:hover {
	background: rgba(255,255,255,.08);
	border-color: rgba(255,255,255,.14);
	color: #fff;
}

.alty-builder-header__back i,
.alty-builder-header__cart-link i {
	font-size: 1rem;
}

.alty-builder-header__back-label,
.alty-builder-header__cart-label {
	white-space: nowrap;
}

.alty-builder-header__languages {
	gap: 0.28rem;
	padding: 0.22rem;
	border-radius: 999px;
	background: rgba(255,255,255,.04);
	border: 1px solid rgba(255,255,255,.08);
}

.alty-builder-header__language-link {
	justify-content: center;
	gap: 0.38rem;
	min-width: 3rem;
	padding: 0.36rem 0.56rem;
	border-radius: 999px;
	color: rgba(255,255,255,.7);
	text-decoration: none;
	font-size: 0.72rem;
	font-weight: 700;
	letter-spacing: 0.04em;
	background: transparent;
	transition: background 0.15s, color 0.15s, box-shadow 0.15s, transform 0.15s;
}

.alty-builder-header__language-link:hover,
.alty-builder-header__language-link:focus-visible {
	background: rgba(255,255,255,.08);
	color: #fff;
}

.alty-builder-header__language-link.is-current {
	background: rgba(32,215,161,.18);
	color: #fff;
	box-shadow: inset 0 0 0 1px rgba(32,215,161,.28);
}

.alty-builder-header__language-flag {
	width: 0.95rem;
	height: 0.95rem;
	border-radius: 999px;
	object-fit: cover;
	box-shadow: 0 0 0 1px rgba(255,255,255,.08);
	flex-shrink: 0;
}

.alty-builder-header__language-name {
	line-height: 1;
}

.alty-builder-cart-badge {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 1.35rem;
	height: 1.35rem;
	padding: 0 0.3rem;
	border-radius: 999px;
	background: var(--alty-accent);
	color: #081218;
	font-size: 0.7rem;
	font-weight: 800;
	line-height: 1;
}

/* ── Header CTA (injected by JS on desktop) ── */
.alty-builder-header__cta {
	display: flex;
	align-items: center;
	gap: 0;
}

/* ════════════════════════════════════════════
   APP LAYOUT
   ════════════════════════════════════════════ */

.alty-builder-main {
	padding: 0;
	height: 100%;
	min-height: 0;
	overflow: visible;
	display: grid;
	grid-template-rows: 1fr;
}

/* The root div injected by PHP sits between .alty-builder-main and .alty-builder-app
   — it must not break the height chain */
#alty-sticker-builder-root {
	display: contents;
}

.alty-builder-app {
	min-height: 0;
	height: 100%;
	display: grid;
	grid-template-columns: 1fr var(--alty-sidebar-w);
	grid-template-rows: 1fr;
	overflow: visible;
}

/* ════════════════════════════════════════════
   STAGE / CANVAS
   ════════════════════════════════════════════ */

.alty-stage-shell {
	position: relative;
	min-height: 0;
	overflow: hidden;
	grid-column: 1;
	background:
		linear-gradient(45deg,  rgba(255,255,255,.28) 25%, transparent 25%) -20px 0 / 40px 40px,
		linear-gradient(-45deg, rgba(255,255,255,.28) 25%, transparent 25%) -20px 0 / 40px 40px,
		linear-gradient(45deg,  transparent 75%, rgba(255,255,255,.28) 75%) -20px 0 / 40px 40px,
		linear-gradient(-45deg, transparent 75%, rgba(255,255,255,.28) 75%) -20px 0 / 40px 40px,
		#d1d5db;
}

/* During live border/bleed preview the SVG viewBox grows beyond the artboard
   bounds — allow visual overflow so margin guides are not clipped. */
.alty-stage-shell.is-live-border-preview {
	overflow: visible;
}

/* The builder shell is position:fixed + overflow:hidden, which clips the stage
   when it has overflow:visible. JS toggles this class via syncLivePreviewShellClass(). */
.alty-builder-shell.is-live-border-preview {
	overflow: visible;
}

.alty-stage-workbench,
.alty-upload-empty {
	width: 100%;
	height: calc(100dvh - var(--alty-header-h));
	min-height: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 3.5rem 1rem 1rem;
}

.alty-stage-artboard {
	position: relative;
	width: min(68vw, 680px, calc((100dvh - var(--alty-header-h) - 7rem) * var(--stage-ratio, 1)));
	max-width: 680px;
	aspect-ratio: 1 / 1;
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 1;
}

/* Silent-refresh overlay: shown while kiss-cut API call is in-flight after slider release */
.alty-stage-artboard.is-refreshing::after {
	content: '';
	position: absolute;
	inset: 0;
	border-radius: inherit;
	background: rgba(255, 255, 255, 0.55);
	backdrop-filter: blur(2px);
	-webkit-backdrop-filter: blur(2px);
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 10;
	pointer-events: none;
	animation: alty-refreshing-pulse 0.9s ease-in-out infinite alternate;
}

@keyframes alty-refreshing-pulse {
	from { opacity: 0.5; }
	to   { opacity: 1; }
}

.alty-stage-artboard svg {
	width: 100%;
	height: auto;
	/* Ombre plus douce : une ombre trop foncée lisait comme un liseré noir sur les formes claires. */
	filter: drop-shadow(0 18px 36px rgba(16, 20, 24, 0.11));
	cursor: default;
}

/* Vinyle transparent : aucune ombre sur le SVG racine.
 * Sinon le navigateur projette encore la silhouette alpha complète du fichier
 * derrière le sticker découpé, ce qui fait apparaître une grande forme fantôme. */
.alty-stage-artboard svg.is-transparent-material {
	filter: none;
	/* Évite que filtres / tilt 3D du parent ne mélange l’image avec le fond en damier. */
	isolation: isolate;
}

.alty-stage-artboard svg.is-transparent-material image {
	opacity: 1;
	mix-blend-mode: normal;
}

.alty-stage-artboard svg.is-dragging {
	cursor: grabbing;
}

/* Rainbow Holographic shimmer — cursor hint when material is active */
.alty-stage-artboard svg.is-holo {
	cursor: crosshair;
}

/* Snap-to-origin indicator — subtle ring that pulses when the image
   snaps back to its initial centred position while dragging. */
.alty-stage-artboard svg.alty-snap-active {
	outline: 2px solid rgba(99, 102, 241, 0.7);
	outline-offset: -2px;
	border-radius: inherit;
	transition: outline-color 0.1s ease;
}

/* Kiss cut — rectangle limite : déplacement max du contour (marge ↔ bord du support) */
.alty-stage-artboard svg .alty-kiss-movement-bounds {
	fill: none;
	pointer-events: none;
	stroke: rgba(37, 99, 235, 0.62);
	stroke-width: 2;
	stroke-dasharray: 7 5;
}
.alty-stage-artboard svg.is-kiss-pan-limit .alty-kiss-movement-bounds {
	stroke: rgba(37, 99, 235, 0.78);
	stroke-width: 2.25;
}

/* Dimension labels */
.alty-stage-measure {
	position: absolute;
	display: inline-flex;
	align-items: center;
	gap: 0.25rem;
	padding: 0.25rem 0.6rem;
	border-radius: 999px;
	background: rgba(255,255,255,.82);
	backdrop-filter: blur(8px);
	border: 1px solid rgba(255,255,255,.6);
	font-size: 0.75rem;
	font-weight: 700;
	color: var(--alty-ink-soft);
	box-shadow: var(--alty-shadow-sm);
	pointer-events: none;
	z-index: 12;
}

.alty-stage-measure--top {
	top: -1.5rem;
	left: 50%;
	transform: translateX(-50%);
}

.alty-stage-artboard.is-contour-stage .alty-stage-measure--top {
	top: -2rem;
}

.alty-stage-measure--side {
	right: 0;
	top: 50%;
	transform: translate(50%, -50%) rotate(90deg);
	transform-origin: center center;
}

.alty-stage-artboard.is-contour-stage .alty-stage-measure--side {
	right: -2rem;
}

.alty-stage-measure--side i {
	transform: rotate(-90deg);
}

/* Toolbar (floating, horizontal, bottom-centre) */
.alty-stage-toolbar {
	position: absolute;
	bottom: 1rem;
	left: 50%;
	transform: translateX(-50%);
	z-index: 10;
	display: flex;
	flex-direction: row;
	align-items: center;
	width: auto;
	gap: 0.25rem;
	padding: 0.35rem 0.5rem;
	border-radius: var(--alty-radius-lg);
	background: rgba(255,255,255,.85);
	backdrop-filter: blur(16px);
	-webkit-backdrop-filter: blur(16px);
	border: 1px solid rgba(255,255,255,.7);
	box-shadow: var(--alty-shadow);
	overflow: visible;
}

.alty-stage-toolbar__divider {
	width: 1px;
	height: 1.4rem;
	background: var(--alty-stroke);
	margin: 0 0.1rem;
	flex-shrink: 0;
}

.alty-stage-toolbar > button,
.alty-stage-toolbar > .alty-upload-menu > .alty-upload-menu__trigger {
	width: 2.25rem;
	height: 2.25rem;
	min-width: 0;
	padding: 0;
	border: 0;
	border-radius: 0.6rem;
	background: transparent;
	color: var(--alty-ink-soft);
	font-size: 1rem;
	font-weight: 700;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	transition: background 0.12s, color 0.12s;
}

.alty-stage-toolbar > button:hover,
.alty-stage-toolbar > button:focus-visible,
.alty-stage-toolbar > .alty-upload-menu > .alty-upload-menu__trigger:hover,
.alty-stage-toolbar > .alty-upload-menu > .alty-upload-menu__trigger:focus-visible {
	background: var(--alty-ink);
	color: #fff;
}

.alty-stage-toolbar > button:disabled,
.alty-stage-toolbar > .alty-upload-menu > .alty-upload-menu__trigger:disabled {
	opacity: 0.3;
	cursor: not-allowed;
	pointer-events: none;
}

.alty-stage-toolbar > button i,
.alty-stage-toolbar > .alty-upload-menu > .alty-upload-menu__trigger i {
	font-size: 1.05rem;
	line-height: 1;
	flex-shrink: 0;
}

/* Remove background button — accent tint */
.alty-toolbar-removebg {
	color: var(--alty-accent-deep) !important;
}

.alty-toolbar-removebg:hover:not([disabled]),
.alty-toolbar-removebg:focus-visible {
	background: var(--alty-accent) !important;
	color: #051410 !important;
}

.alty-toolbar-removebg.is-loading {
	cursor: wait !important;
	color: var(--alty-accent-deep) !important;
	background: rgba(32,215,161,.08) !important;
}

.alty-toolbar-new-project {
	color: #ef4444 !important;
	opacity: 0.75;
}

.alty-toolbar-new-project:hover:not([disabled]),
.alty-toolbar-new-project:focus-visible {
	background: #ef4444 !important;
	color: #fff !important;
	opacity: 1;
}

/* Generic spin utility used by the remove-bg spinner icon */
.alty-spin {
	animation: alty-spin 0.7s linear infinite;
	display: inline-block;
}

/* Upload meta pills */
.alty-upload-meta {
	position: absolute;
	top: 0.75rem;
	bottom: auto;
	left: 50%;
	transform: translateX(-50%);
	display: flex;
	align-items: center;
	gap: 0.4rem;
	white-space: nowrap;
	z-index: 12;
	width: 100%;
	justify-content: center;
}

.alty-upload-meta span {
	padding: 0.25rem 0.6rem;
	border-radius: 999px;
	background: rgba(255,255,255,.75);
	backdrop-filter: blur(8px);
	border: 1px solid rgba(255,255,255,.55);
	font-size: 0.72rem;
	font-weight: 600;
	color: var(--alty-ink-soft);
}

/* Alert */
.alty-alert {
	position: absolute;
	bottom: 1rem;
	left: 50%;
	transform: translateX(-50%);
	max-width: min(88vw, 480px);
	padding: 0.7rem 1rem;
	border-radius: var(--alty-radius);
	background: #fff;
	border: 1px solid rgba(239,68,68,.25);
	box-shadow: var(--alty-shadow);
	color: #991b1b;
	font-size: 0.85rem;
	font-weight: 600;
	text-align: center;
	z-index: 20;
}

.alty-alert--warning {
	border-color: rgba(234,179,8,.35);
	color: #92400e;
}

.alty-marge-info {
	display: flex;
	gap: 10px;
	align-items: flex-start;
	margin: 16px 14px 0;
	padding: 12px 14px;
	background: rgba(0,100,255,0.06);
	border: 1px solid rgba(0,100,255,0.18);
	border-radius: 8px;
	color: #1e3a5f;
	font-size: 12px;
	line-height: 1.55;
}

.alty-marge-info i {
	flex-shrink: 0;
	font-size: 18px;
	color: rgba(0,100,255,0.75);
	margin-top: 1px;
}

.alty-marge-info p {
	margin: 0;
}

.alty-marge-info strong {
	font-weight: 600;
}

/* ════════════════════════════════════════════
   UPLOAD EMPTY STATE
   ════════════════════════════════════════════ */

.alty-upload-card {
	width: min(90vw, 480px);
	padding: 2.5rem 2rem;
	border-radius: var(--alty-radius-xl);
	background: rgba(255,255,255,.8);
	backdrop-filter: blur(24px);
	-webkit-backdrop-filter: blur(24px);
	border: 2px dashed rgba(32,215,161,.4);
	box-shadow: var(--alty-shadow-xl);
	text-align: center;
	transition: border-color 0.15s, transform 0.15s;
}

.alty-upload-card.is-dragover {
	border-color: var(--alty-accent);
	border-style: solid;
	transform: scale(1.015);
}

.alty-upload-card__icon {
	width: 4rem;
	height: 4rem;
	margin: 0 auto 1.25rem;
	border-radius: var(--alty-radius-lg);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	background: rgba(32,215,161,.14);
	color: var(--alty-accent-deep);
}

.alty-upload-card__icon i {
	font-size: 1.85rem;
}

.alty-upload-card h2 {
	margin: 0 0 0.6rem;
	font-size: 1.5rem;
	font-weight: 800;
	letter-spacing: -0.02em;
}

.alty-upload-card p {
	margin: 0.3rem 0;
	color: var(--alty-muted);
	font-size: 0.88rem;
	line-height: 1.55;
}

.alty-upload-card__actions {
	margin-top: 1.5rem;
}

/* ════════════════════════════════════════════
   BUTTONS
   ════════════════════════════════════════════ */

.alty-primary-button,
.alty-secondary-button,
.alty-upload-card__button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.45rem;
	padding: 0.7rem 1.2rem;
	border-radius: 999px;
	border: 0;
	font-family: var(--font-body);
	font-size: 0.88rem;
	font-weight: 700;
	cursor: pointer;
	text-decoration: none;
	transition: filter 0.15s, transform 0.1s, box-shadow 0.15s;
	white-space: nowrap;
}

.alty-primary-button,
.alty-upload-card__button {
	background: var(--alty-accent);
	color: #ffffff;
}

.alty-primary-button:hover:not([disabled]),
.alty-upload-card__button:hover {
	filter: brightness(1.08);
	box-shadow: 0 6px 20px rgba(0,0,0,.15);
	transform: translateY(-1px);
}

.alty-secondary-button {
	background: rgba(255,255,255,.9);
	border: 1px solid var(--alty-stroke-md);
	color: var(--alty-ink);
	box-shadow: var(--alty-shadow-sm);
}

.alty-secondary-button:hover:not([disabled]) {
	background: #fff;
	transform: translateY(-1px);
}

.alty-primary-button[disabled],
.alty-secondary-button[disabled] {
	opacity: 0.42;
	cursor: not-allowed;
	filter: none;
	transform: none;
	box-shadow: none;
}

.alty-primary-button i,
.alty-secondary-button i,
.alty-upload-card__button i {
	font-size: 1rem;
}

.alty-upload-menu {
	position: relative;
	display: inline-flex;
}

.alty-upload-card__actions .alty-upload-menu {
	display: inline-flex;
}

.alty-stage-toolbar > .alty-upload-menu,
.alty-mobile-toolbar > .alty-upload-menu {
	display: flex;
	flex: 0 0 auto;
}

.alty-stage-toolbar > .alty-upload-menu {
	width: 100%;
}

.alty-upload-menu__dropdown {
	position: absolute;
	top: calc(100% + 0.55rem);
	left: 50%;
	transform: translateX(-50%);
	min-width: 11rem;
	padding: 0.35rem;
	border-radius: 1rem;
	border: 1px solid rgba(15,23,42,0.08);
	background: rgba(255,255,255,0.98);
	box-shadow: 0 18px 44px rgba(15,23,42,0.16);
	backdrop-filter: blur(18px);
	-webkit-backdrop-filter: blur(18px);
	display: flex;
	flex-direction: column;
	gap: 0.2rem;
	z-index: 40;
}

.alty-stage-toolbar > .alty-upload-menu > .alty-upload-menu__dropdown {
	top: 0;
	left: calc(100% + 0.55rem);
	transform: none;
}

.alty-mobile-toolbar > .alty-upload-menu > .alty-upload-menu__dropdown {
	position: fixed;
	top: auto;
	bottom: calc(var(--alty-mobile-panel-h) - 0.4rem);
	left: 50%;
	transform: translateX(-50%);
	min-width: min(12rem, calc(100vw - 1.5rem));
	z-index: 120;
}

.alty-upload-menu__item {
	border: 0;
	border-radius: 0.75rem;
	background: transparent;
	color: var(--alty-ink);
	font: inherit;
	font-size: 0.88rem;
	font-weight: 700;
	text-align: left;
	padding: 0.72rem 0.85rem;
	cursor: pointer;
	white-space: nowrap;
	transition: background 0.12s, color 0.12s, transform 0.12s;
}

.alty-upload-menu__item:hover,
.alty-upload-menu__item:focus-visible {
	background: var(--alty-ink);
	color: #fff;
	transform: translateX(2px);
}

/* ════════════════════════════════════════════
   CONTROLS SIDEBAR — left panel (desktop)
   ════════════════════════════════════════════ */

.alty-builder-controls {
	position: relative;
	z-index: 20;
	grid-column: 2;
	grid-row: 1;
	display: grid;
	grid-template-columns: 1fr 64px;
	grid-template-rows: 1fr auto;
	width: var(--alty-sidebar-w);
	min-height: 0;
	height: 100%;
	background: rgba(255,255,255,.98);
	border-left: 1px solid var(--alty-stroke-md);
	box-shadow: -2px 0 16px rgba(16,20,24,.07);
	overflow: hidden;
}

/* Each control group */
.alty-ctrl {
	flex: 0 0 auto;
	display: flex;
	flex-direction: column;
	justify-content: center;
	gap: 0.38rem;
	padding: 0.85rem 1.1rem;
	background: rgba(255,255,255,.97);
	min-width: 0;
	position: relative;
	border-bottom: 1px solid var(--alty-stroke);
}

.alty-ctrl--grow {
	flex: 0 0 auto;
	min-width: 0;
	overflow: visible;
}

.alty-ctrl--cta {
	flex: 0 0 auto;
	padding: 0.6rem 0.75rem;
	display: flex;
	align-items: center;
	gap: 0.5rem;
	background: rgba(255,255,255,.97);
}

.alty-ctrl__label {
	font-size: 0.65rem;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--alty-muted-light);
	white-space: nowrap;
	display: flex;
	align-items: center;
	gap: 0.28rem;
}

.alty-ctrl__label i {
	font-size: 0.8rem;
}

/* Number inputs */
.alty-ctrl__input {
	width: 100%;
	min-width: 5rem;
	padding: 0.4rem 0.6rem;
	border-radius: 0.5rem;
	border: 1.5px solid var(--alty-stroke-md);
	background: #fff;
	font-family: var(--font-body);
	font-size: 0.95rem;
	font-weight: 600;
	color: var(--alty-ink);
	outline: none;
	transition: border-color 0.12s, box-shadow 0.12s;
	-moz-appearance: textfield;
}

.alty-ctrl__input::-webkit-outer-spin-button,
.alty-ctrl__input::-webkit-inner-spin-button {
	-webkit-appearance: none;
	margin: 0;
}

.alty-ctrl__input:focus {
	border-color: var(--alty-accent);
	box-shadow: 0 0 0 3px rgba(32,215,161,.18);
}

.alty-ctrl__input[disabled] {
	opacity: 0.45;
	cursor: not-allowed;
}

/* Range slider */
.alty-ctrl__range {
	width: 100%;
	min-width: 80px;
	accent-color: var(--alty-accent);
	cursor: pointer;
}

.alty-ctrl__range-value {
	font-size: 0.82rem;
	font-weight: 700;
	color: var(--alty-ink-soft);
}

/* Margin selector */
.alty-ctrl--margin-select {
	display: block;
}

.alty-margin-select__header {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	margin-bottom: 0.8rem;
}

.alty-margin-select__header .alty-ctrl__range-value {
	margin-left: auto;
	font-size: 1.08rem;
	color: var(--alty-ink);
	letter-spacing: 0;
}

.alty-margin-options {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 0.5rem;
	width: 100%;
}

.alty-margin-option {
	position: relative;
	display: inline-flex;
	align-items: baseline;
	justify-content: center;
	gap: 0.18rem;
	min-height: 2.45rem;
	padding: 0.55rem 0.45rem;
	border: 1px solid var(--alty-stroke-md);
	border-radius: 8px;
	background: #fff;
	color: var(--alty-ink-soft);
	font: inherit;
	font-weight: 800;
	letter-spacing: 0;
	cursor: pointer;
	box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
	transition: border-color 0.14s ease, background 0.14s ease, color 0.14s ease, box-shadow 0.14s ease, transform 0.14s ease;
}

.alty-margin-option small {
	font-size: 0.62rem;
	font-weight: 800;
	color: currentColor;
	opacity: 0.68;
	letter-spacing: 0;
}

.alty-margin-option:hover {
	border-color: rgba(32, 215, 161, 0.65);
	color: var(--alty-ink);
	transform: translateY(-1px);
	box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
}

.alty-margin-option.is-selected {
	border-color: var(--alty-accent);
	background: linear-gradient(180deg, rgba(32, 215, 161, 0.18), rgba(32, 215, 161, 0.08));
	color: var(--alty-ink);
	box-shadow: inset 0 0 0 1px rgba(32, 215, 161, 0.38), 0 8px 18px rgba(32, 215, 161, 0.14);
}

.alty-margin-option.is-selected::after {
	content: '';
	position: absolute;
	left: 50%;
	bottom: 0.32rem;
	width: 1.05rem;
	height: 0.16rem;
	border-radius: 999px;
	background: var(--alty-accent);
	transform: translateX(-50%);
}

/* Color swatches row */
.alty-swatch-row {
	display: flex;
	align-items: center;
	gap: 0.38rem;
}

.alty-swatch-btn {
	width: 1.6rem;
	height: 1.6rem;
	border-radius: 999px;
	border: 2px solid transparent;
	cursor: pointer;
	padding: 0;
	flex-shrink: 0;
	transition: transform 0.12s, box-shadow 0.12s;
	outline: none;
}

.alty-swatch-btn:hover {
	transform: scale(1.18);
}

.alty-swatch-btn.is-selected {
	border-color: var(--alty-accent);
	box-shadow: 0 0 0 2.5px rgba(32,215,161,.32);
	transform: scale(1.12);
}

.alty-chip-input {
	width: 1.6rem;
	height: 1.6rem;
	padding: 0;
	border: 2px solid var(--alty-stroke-md);
	border-radius: 999px;
	background: transparent;
	cursor: pointer;
	flex-shrink: 0;
}

/* ── Swatch grid (desktop style panel) ── */
.alty-swatch-grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 0.25rem;
	padding: 0.75rem 0.75rem;
	align-content: start;
}

.alty-swatch-tile {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 0.35rem;
	padding: 0.6rem 0.25rem;
	border-radius: 0.75rem;
	border: 2px solid transparent;
	background: transparent;
	cursor: pointer;
	transition: background 0.15s, border-color 0.15s;
	position: relative;
}

.alty-swatch-tile:hover {
	background: rgba(0,0,0,0.04);
}

.alty-swatch-tile.is-selected {
	background: rgba(32,215,161,0.1);
	border-color: var(--alty-accent);
}

.alty-swatch-tile__dot {
	width: 2.25rem;
	height: 2.25rem;
	border-radius: 50%;
	box-shadow: inset 0 0 0 1px rgba(0,0,0,0.12), 0 2px 6px rgba(0,0,0,0.12);
	transition: transform 0.15s;
	flex-shrink: 0;
}

.alty-swatch-tile:hover .alty-swatch-tile__dot {
	transform: scale(1.1);
}

.alty-swatch-tile.is-selected .alty-swatch-tile__dot {
	box-shadow: inset 0 0 0 1px rgba(0,0,0,0.12), 0 0 0 2px #fff, 0 0 0 4px var(--alty-accent), 0 2px 6px rgba(0,0,0,0.12);
}

.alty-swatch-tile__dot--white {
	box-shadow: inset 0 0 0 1px rgba(0,0,0,0.18), 0 2px 6px rgba(0,0,0,0.08);
}

.alty-swatch-tile__dot--custom {
	background: conic-gradient(from 0deg, #ff4d4d, #ffd93d, #6bcb77, #4d96ff, #c77dff, #ff4d4d);
}

.alty-swatch-tile__dot--none {
	background: #f3f4f6;
	box-shadow: inset 0 0 0 1px rgba(0,0,0,0.15);
	display: flex;
	align-items: center;
	justify-content: center;
	color: #9ca3af;
	font-size: 1.1rem;
}

.alty-swatch-btn--none {
	background: #f3f4f6;
	box-shadow: inset 0 0 0 1.5px rgba(0,0,0,0.15);
	display: flex;
	align-items: center;
	justify-content: center;
	color: #9ca3af;
	font-size: 0.9rem;
}

.alty-swatch-tile__name {
	font-size: 0.58rem;
	font-weight: 600;
	color: var(--alty-ink-soft);
	text-align: center;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	max-width: 100%;
	text-transform: uppercase;
	letter-spacing: 0.03em;
}

.alty-swatch-tile--custom {
	cursor: pointer;
}

.alty-swatch-tile--custom input[type="color"] {
	position: absolute;
	opacity: 0;
	width: 100%;
	height: 100%;
	top: 0;
	left: 0;
	cursor: pointer;
}

/* Shape pills */
.alty-shape-row {
	display: flex;
	align-items: center;
	gap: 0.3rem;
	flex-wrap: wrap;
}

/* Full-width list layout (used in sidebar style tab) */
.alty-ctrl--shape-full,
.alty-ctrl--material-full {
	padding: 0;
}

.alty-shape-list {
	display: flex;
	flex-direction: column;
	gap: 0;
	padding: 0;
}

.alty-shape-list .alty-pill-btn {
	justify-content: flex-start;
	width: 100%;
	min-height: 2.8rem;
	border-radius: 0;
	border-left: none;
	border-right: none;
	border-top: none;
	border-bottom: 1px solid var(--alty-stroke);
	padding: 0.7rem 1rem;
	font-size: 0.88rem;
	background: transparent;
	text-align: left;
	white-space: normal;
}

.alty-shape-list .alty-pill-btn:first-child {
	border-top: 1px solid var(--alty-stroke);
}

.alty-shape-list .alty-pill-btn:hover:not([disabled]):not(.is-selected) {
	background: var(--alty-surface);
	border-color: var(--alty-stroke);
	color: var(--alty-ink);
}

.alty-shape-list .alty-pill-btn.is-selected {
	background: rgba(59, 130, 246, 0.06);
	border-bottom-color: var(--alty-stroke);
	border-left: 3px solid var(--alty-accent);
	color: var(--alty-ink);
	font-weight: 700;
	padding-left: calc(1rem - 2px);
}

.alty-pill-btn {
	padding: 0.22rem 0.6rem;
	border-radius: 999px;
	border: 1px solid var(--alty-stroke-md);
	background: var(--alty-surface);
	font-family: var(--font-body);
	font-size: 0.76rem;
	font-weight: 600;
	color: var(--alty-ink-soft);
	cursor: pointer;
	white-space: nowrap;
	transition: background 0.1s, border-color 0.1s, color 0.1s;
	outline: none;
}

.alty-pill-btn:hover:not([disabled]):not(.is-selected) {
	background: #fff;
	border-color: var(--alty-accent);
	color: var(--alty-ink);
}

.alty-pill-btn.is-selected {
	background: var(--alty-ink);
	border-color: var(--alty-ink);
	color: #fff;
}

.alty-pill-btn[disabled] {
	opacity: 0.38;
	cursor: not-allowed;
}

.alty-shape-list .alty-pill-btn[disabled] {
	opacity: 1;
	cursor: not-allowed;
	color: var(--alty-muted-light);
	background: transparent;
	display: flex;
	align-items: center;
	gap: 4px;
}

.alty-shape-list .alty-pill-btn[disabled] i {
	color: var(--alty-muted-light);
}

/* Material pills */
.alty-material-row {
	display: flex;
	align-items: center;
	gap: 0.3rem;
	overflow-x: auto;
	overflow-y: visible;
	scrollbar-width: none;
	-webkit-overflow-scrolling: touch;
}

.alty-material-row::-webkit-scrollbar { display: none; }

.alty-material-btn {
	display: flex;
	align-items: center;
	gap: 0.35rem;
	padding: 0.25rem 0.65rem;
	border-radius: 999px;
	border: 1px solid var(--alty-stroke-md);
	background: var(--alty-surface);
	font-family: var(--font-body);
	font-size: 0.76rem;
	font-weight: 600;
	color: var(--alty-ink-soft);
	cursor: pointer;
	white-space: nowrap;
	flex-shrink: 0;
	transition: background 0.1s, border-color 0.1s, color 0.1s, box-shadow 0.1s;
	outline: none;
}

.alty-material-btn i {
	font-size: 0.88rem;
	color: var(--alty-muted);
}

.alty-material-btn:hover:not([disabled]):not(.is-selected) {
	background: #fff;
	border-color: var(--alty-ink);
	color: var(--alty-ink);
}

.alty-material-btn.is-selected {
	background: var(--alty-ink);
	border-color: var(--alty-ink);
	color: #fff;
}

.alty-material-btn.is-selected i {
	color: var(--alty-accent);
}

.alty-material-btn[disabled] {
	opacity: 0.38;
	cursor: not-allowed;
}

/* Desktop choice menus */
/* ── Picker control wrapper ── */
.alty-ctrl--picker {
	flex: 0 0 auto;
	min-width: 0;
	overflow: visible;
}

.alty-ctrl--picker-material {
	flex: 0 0 auto;
}

/* Border slider control */
.alty-ctrl--border {
	flex: 0 0 auto;
	min-width: 0;
	max-width: none;
}

/* ── Choice menu (shape / material dropdowns) ── */
.alty-choice-menu {
	position: relative;
	display: flex;
	min-width: 0;
}

/* Trigger button */
.alty-choice-menu__trigger {
	width: 100%;
	display: flex;
	align-items: center;
	gap: 0.55rem;
	padding: 0.5rem 0.7rem 0.5rem 0.6rem;
	border: 1.5px solid var(--alty-stroke-md);
	border-radius: 0.75rem;
	background: #fff;
	color: var(--alty-ink);
	font: inherit;
	cursor: pointer;
	outline: none;
	transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
	white-space: nowrap;
}

.alty-choice-menu__trigger:hover {
	border-color: rgba(32,215,161,.5);
	background: rgba(243,252,249,0.7);
}

.alty-choice-menu__trigger:focus-visible {
	border-color: var(--alty-accent);
	box-shadow: 0 0 0 3px rgba(32,215,161,.18);
}

.alty-choice-menu.is-open .alty-choice-menu__trigger {
	border-color: var(--alty-accent);
	background: rgba(243,252,249,0.8);
	box-shadow: 0 0 0 3px rgba(32,215,161,.14);
}

/* Icon badge inside trigger */
.alty-choice-menu__trigger-icon {
	width: 1.9rem;
	height: 1.9rem;
	display: grid;
	place-items: center;
	flex: 0 0 auto;
	border-radius: 0.6rem;
	background: rgba(243,244,246,0.9);
	color: var(--alty-ink-soft);
	transition: background 0.15s, color 0.15s;
}

.alty-choice-menu__trigger:hover .alty-choice-menu__trigger-icon,
.alty-choice-menu.is-open .alty-choice-menu__trigger-icon {
	background: rgba(32,215,161,.14);
	color: var(--alty-accent-deep);
}

.alty-choice-menu__trigger-icon i {
	font-size: 1rem;
}

.alty-choice-menu__trigger-icon .alty-shape-card__icon {
	width: 1.25rem;
	height: 1.25rem;
	border-width: 1px;
	border-radius: 0.4rem;
}

/* Label + caret */
.alty-choice-menu__trigger-copy {
	min-width: 0;
	flex: 1 1 auto;
}

.alty-choice-menu__trigger-label {
	display: block;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	font-size: 0.88rem;
	font-weight: 600;
	color: var(--alty-ink);
	letter-spacing: -0.01em;
}

.alty-choice-menu__caret {
	font-size: 0.72rem;
	color: var(--alty-muted-light);
	flex: 0 0 auto;
	transition: transform 0.2s, color 0.15s;
}

.alty-choice-menu.is-open .alty-choice-menu__caret {
	color: var(--alty-accent-deep);
	transform: rotate(180deg);
}

/* ── Dropdown panel ── */
.alty-choice-menu__dropdown {
	position: absolute;
	top: 0;
	left: calc(100% + 0.6rem);
	width: max(100%, 17rem);
	max-width: min(22rem, calc(100vw - var(--alty-sidebar-w) - 2rem));
	max-height: min(26rem, calc(100vh - 8rem));
	padding: 0.3rem;
	border-radius: 1.1rem;
	border: 1px solid rgba(15,23,42,0.09);
	background: rgba(255,255,255,0.99);
	box-shadow:
		4px 0 16px rgba(15,23,42,0.06),
		0 20px 48px rgba(15,23,42,0.14);
	backdrop-filter: blur(20px);
	-webkit-backdrop-filter: blur(20px);
	display: flex;
	flex-direction: column;
	gap: 0.15rem;
	overflow-y: auto;
	z-index: 110;
	/* Subtle entry animation */
	animation: alty-dropdown-in 0.16s ease;
}

@keyframes alty-dropdown-in {
	from { opacity: 0; transform: translateX(-8px) scale(0.98); }
	to   { opacity: 1; transform: translateX(0)    scale(1); }
}

.alty-choice-menu--align-end .alty-choice-menu__dropdown {
	left: calc(100% + 0.6rem);
	right: auto;
}

/* ── Option rows ── */
.alty-choice-menu__option {
	width: 100%;
	display: flex;
	align-items: center;
	gap: 0.7rem;
	padding: 0.62rem 0.7rem;
	border: 0;
	border-radius: 0.8rem;
	background: transparent;
	color: var(--alty-ink);
	font: inherit;
	text-align: left;
	cursor: pointer;
	transition: background 0.1s;
}

.alty-choice-menu__option:hover:not([disabled]),
.alty-choice-menu__option:focus-visible:not([disabled]) {
	background: rgba(243,244,246,0.9);
	outline: none;
}

.alty-choice-menu__option.is-selected {
	background: rgba(236,252,245,0.95);
	box-shadow: inset 0 0 0 1.5px rgba(32,215,161,.3);
}

.alty-choice-menu__option[disabled] {
	opacity: 0.38;
	cursor: not-allowed;
}

/* Option icon box */
.alty-choice-menu__option-icon {
	width: 2.1rem;
	height: 2.1rem;
	display: grid;
	place-items: center;
	flex: 0 0 auto;
	border-radius: 0.65rem;
	background: rgba(243,244,246,0.8);
	color: var(--alty-ink-soft);
	transition: background 0.1s, color 0.1s;
}

.alty-choice-menu__option:hover:not([disabled]) .alty-choice-menu__option-icon,
.alty-choice-menu__option.is-selected .alty-choice-menu__option-icon {
	background: rgba(32,215,161,.12);
	color: var(--alty-accent-deep);
}

.alty-choice-menu__option-icon i {
	font-size: 1rem;
}

.alty-choice-menu__option--shape .alty-choice-menu__option-icon .alty-shape-card__icon {
	width: 1.35rem;
	height: 1.35rem;
	border-width: 1px;
	border-radius: 0.45rem;
}

/* Text block */
.alty-choice-menu__option-copy {
	min-width: 0;
	flex: 1 1 auto;
	display: flex;
	flex-direction: column;
	gap: 0.1rem;
}

.alty-choice-menu__option-copy strong {
	font-size: 0.83rem;
	font-weight: 600;
	color: var(--alty-ink);
	letter-spacing: -0.01em;
}

.alty-choice-menu__option-copy span {
	font-size: 0.72rem;
	line-height: 1.35;
	color: var(--alty-muted);
}

/* Check icon */
.alty-choice-menu__option-check {
	flex: 0 0 auto;
	font-size: 1rem;
	color: var(--alty-accent-deep);
	opacity: 0;
	transition: opacity 0.12s;
}

.alty-choice-menu__option.is-selected .alty-choice-menu__option-check {
	opacity: 1;
}

/* ── Floating tooltip — JS-driven, appended to body, never clipped ── */
.alty-tooltip {
	position: fixed;
	z-index: 99999;
	background: var(--alty-ink);
	color: #fff;
	font-family: var(--font-body);
	font-size: 0.70rem;
	font-weight: 500;
	line-height: 1.35;
	white-space: nowrap;
	padding: 0.28rem 0.6rem;
	border-radius: 6px;
	pointer-events: none;
	box-shadow: 0 2px 8px rgba(13, 17, 23, 0.18);
	opacity: 0;
	transform: translateY(4px);
	transition: opacity 0.15s ease, transform 0.15s ease;
}

.alty-tooltip.is-visible {
	opacity: 1;
	transform: translateY(0);
}

/* CTA section */
.alty-ctrl--cta {
	border-left: 1px solid var(--alty-stroke-md);
}

.alty-cta-price {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	line-height: 1;
}

.alty-cta-price__label {
	font-size: 0.6rem;
	font-weight: 700;
	letter-spacing: 0.07em;
	text-transform: uppercase;
	color: var(--alty-muted-light);
	margin-bottom: 0.15rem;
}

.alty-cta-price__amount {
	font-size: 1.2rem;
	font-weight: 800;
	letter-spacing: -0.02em;
	color: var(--alty-ink);
}

.alty-cta-price__amount--loading {
	color: var(--alty-muted-light);
	font-size: 0.88rem;
}

.alty-ctrl--cta .alty-primary-button {
	padding: 0.55rem 1rem;
	font-size: 0.82rem;
}

.alty-ctrl--cta .alty-secondary-button {
	padding: 0.48rem 0.85rem;
	font-size: 0.8rem;
}

/* Divider between groups */
.alty-ctrl-divider {
	display: none;
}

/* Row-separator divider: hidden by default (single-row layout) */
.alty-ctrl-divider--row {
	display: none;
}

/* ── Control rows: default = display:contents so all children flow into
   the parent flex row (single-line layout on large screens) ── */
.alty-ctrl-row {
	display: contents;
}

/* ════════════════════════════════════════════
   SHAPE MODAL
   ════════════════════════════════════════════ */

.alty-shape-modal {
	position: absolute;
	inset: 0;
	display: grid;
	place-items: center;
	padding: 1rem;
	background: rgba(10, 13, 18, 0.28);
	backdrop-filter: blur(4px);
	-webkit-backdrop-filter: blur(4px);
	z-index: 30;
}

.alty-shape-modal__card {
	width: min(94vw, 760px);
	padding: 1.5rem;
	border-radius: var(--alty-radius-xl);
	background: rgba(255,255,255,.95);
	backdrop-filter: blur(20px);
	box-shadow: var(--alty-shadow-xl);
}

.alty-shape-modal__card h3 {
	margin: 0 0 0.3rem;
	font-size: 1.2rem;
	font-weight: 800;
	letter-spacing: -0.02em;
}

.alty-shape-modal__card p {
	margin: 0 0 1.1rem;
	color: var(--alty-muted);
	font-size: 0.85rem;
}

.alty-shape-modal__grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 0.65rem;
}

.alty-shape-modal__actions {
	display: flex;
	justify-content: flex-end;
	margin-top: 1rem;
}

.alty-shape-card {
	display: flex;
	align-items: center;
	gap: 0.85rem;
	padding: 0.85rem 1rem;
	border-radius: var(--alty-radius-lg);
	border: 1.5px solid var(--alty-stroke-md);
	background: #fff;
	cursor: pointer;
	text-align: left;
	transition: border-color 0.12s, box-shadow 0.12s, transform 0.12s;
}

.alty-shape-card:hover:not([disabled]) {
	border-color: var(--alty-accent);
	box-shadow: 0 0 0 3px rgba(32,215,161,.12);
	transform: translateY(-1px);
}

.alty-shape-card[disabled] {
	opacity: 0.38;
	cursor: not-allowed;
}

.alty-shape-card__icon {
	width: 2.6rem;
	height: 2.6rem;
	border-radius: 0.75rem;
	border: 1px solid var(--alty-stroke-md);
	background: linear-gradient(160deg, #f9fafb, #e5e7eb);
	flex-shrink: 0;
}

.alty-shape-card__icon--circle   { border-radius: 999px; }
.alty-shape-card__icon--square   { clip-path: inset(8% round 0.35rem); }
.alty-shape-card__icon--rectangle { clip-path: inset(20% 0 round 0.35rem); }
.alty-shape-card__icon--oval     { clip-path: ellipse(50% 34% at 50% 50%); }
.alty-shape-card__icon--kiss_cut {
	border-radius: 0.4rem;
	background: linear-gradient(160deg, #ffffff, #e8ebf0);
	box-shadow: inset 0 0 0 0.34rem rgba(255,255,255,.95), inset 0 0 0 1px rgba(17,24,39,.1);
}
.alty-shape-card__icon--rounded_rectangle { border-radius: 1rem; }
.alty-shape-card__icon--die_cut  {
	clip-path: polygon(16% 12%, 42% 6%, 82% 18%, 88% 48%, 70% 82%, 36% 90%, 12% 68%, 8% 30%);
}

.alty-shape-card strong {
	display: block;
	font-size: 0.88rem;
	font-weight: 700;
	margin-bottom: 0.15rem;
}

.alty-shape-card span {
	color: var(--alty-muted);
	font-size: 0.78rem;
	line-height: 1.4;
}

/* ════════════════════════════════════════════
   FLOATING CTA — hidden (replaced by header CTA on desktop)
   ════════════════════════════════════════════ */

.alty-cta-float {
	display: none;
}

.alty-cta-float__price {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	justify-content: center;
	line-height: 1;
	padding-right: 1.25rem;
	gap: 0.3rem;
}

/* Divider between price and button */
.alty-cta-float__price::after {
	content: '';
	position: absolute;
	right: 0;
	top: 0;
	bottom: 0;
	width: 1px;
	background: rgba(17, 24, 39, 0.1);
	pointer-events: none;
}

.alty-cta-float__price {
	position: relative;
}

.alty-cta-float__total-label {
	font-size: 0.65rem;
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--alty-muted-light);
}

.alty-cta-float__amount {
	font-size: 1.35rem;
	font-weight: 800;
	letter-spacing: -0.03em;
	color: var(--alty-ink);
}

.alty-cta-float__amount--loading {
	font-size: 0.82rem;
	color: var(--alty-muted-light);
}

.alty-cta-float__btn {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	padding: 0.7rem 1.25rem;
	margin-left: 0.75rem;
	border-radius: var(--alty-radius-lg);
	border: 0;
	background: var(--alty-accent);
	color: #ffffff;
	font-family: var(--font-body);
	font-size: 0.9rem;
	font-weight: 700;
	cursor: pointer;
	white-space: nowrap;
	transition: filter 0.15s, transform 0.1s, box-shadow 0.15s;
}

.alty-cta-float__btn i {
	font-size: 1.1rem;
}

.alty-cta-float__btn:hover:not([disabled]) {
	filter: brightness(1.08);
	transform: translateY(-1px);
}

.alty-cta-float__btn[disabled] {
	opacity: 0.45;
	cursor: not-allowed;
	filter: none;
	transform: none;
	box-shadow: none;
}

/* ════════════════════════════════════════════
   UPLOAD LOADING OVERLAY
   ════════════════════════════════════════════ */

.alty-upload-overlay {
	position: absolute;
	inset: 0;
	z-index: 50;
	display: grid;
	place-items: center;
	background: rgba(10, 13, 18, 0.55);
	backdrop-filter: blur(6px);
	-webkit-backdrop-filter: blur(6px);
	animation: alty-fade-in 0.18s ease;
}

.alty-upload-overlay__card {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 1.25rem;
	padding: 2.25rem 2.75rem;
	border-radius: var(--alty-radius-xl);
	background: rgba(255, 255, 255, 0.96);
	box-shadow: var(--alty-shadow-xl);
	border: 1px solid rgba(255, 255, 255, 0.7);
}

.alty-upload-overlay__spinner {
	width: 2.75rem;
	height: 2.75rem;
	border: 3px solid rgba(32, 215, 161, 0.18);
	border-top-color: var(--alty-accent);
	border-radius: 50%;
	animation: alty-spin 0.7s linear infinite;
}

.alty-upload-overlay__label {
	margin: 0;
	font-size: 0.95rem;
	font-weight: 700;
	color: var(--alty-ink-soft);
	letter-spacing: -0.01em;
}

@keyframes alty-spin {
	to { transform: rotate(360deg); }
}

@keyframes alty-fade-in {
	from { opacity: 0; }
	to   { opacity: 1; }
}

/* ════════════════════════════════════════════
   MISC
   ════════════════════════════════════════════ */

.alty-hidden-input { display: none; }

.alty-inline-help,
.alty-ctrl__help {
	font-size: 0.72rem;
	color: var(--alty-muted);
	margin-top: 0.1rem;
}

/* CTA inline (used in mobile panel) — hidden on desktop */
.alty-ctrl--cta-inline {
	display: none;
}

/* ── Controls main wrapper (shared desktop sidebar + mobile panel) ── */
.alty-controls-main {
	display: flex;
	flex-direction: column;
	flex: 1 1 auto;
	grid-column: 1;
	grid-row: 1;
	min-height: 0;
	overflow-y: auto;
	overflow-x: hidden;
}

/* ════════════════════════════════════════════
   ICON RAIL — vertical navigation (desktop)
   ════════════════════════════════════════════ */

.alty-icon-rail {
	flex-shrink: 0;
	grid-column: 2;
	grid-row: 1 / span 2;
	display: flex;
	flex-direction: column;
	align-items: stretch;
	width: 64px;
	border-left: 1px solid var(--alty-stroke-md);
	background: var(--alty-surface);
	overflow-y: auto;
	scrollbar-width: none;
}

.alty-icon-rail::-webkit-scrollbar { display: none; }

.alty-icon-rail__btn {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 0.28rem;
	padding: 0.75rem 0.25rem;
	border: 0;
	border-bottom: 1px solid var(--alty-stroke);
	background: transparent;
	color: var(--alty-muted);
	cursor: pointer;
	font-family: var(--font-body);
	transition: background 0.12s, color 0.12s;
	text-align: center;
	position: relative;
}

.alty-icon-rail__btn i {
	font-size: 1.25rem;
	line-height: 1;
}

.alty-icon-rail__label {
	font-size: 0.6rem;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	line-height: 1.2;
	white-space: normal;
	text-align: center;
}

.alty-icon-rail__btn:hover {
	background: rgba(17, 24, 39, 0.04);
	color: var(--alty-ink);
}

.alty-icon-rail__btn.is-active {
	background: rgba(32, 215, 161, 0.08);
	color: var(--alty-ink);
}

.alty-icon-rail__btn.is-active::before {
	content: '';
	position: absolute;
	left: 0;
	top: 0;
	bottom: 0;
	width: 2px;
	background: var(--alty-accent);
	border-radius: 0 2px 2px 0;
}

/* ════════════════════════════════════════════
   PANEL BODY — desktop content area
   ════════════════════════════════════════════ */

.alty-panel-body {
	display: flex;
	flex-direction: column;
	flex: 1 1 auto;
	min-height: 0;
}

.alty-panel-content {
	display: flex;
	flex-direction: column;
	gap: 0;
	padding: 0;
}

.alty-panel-section {
	padding: 0.85rem 1rem;
	border-bottom: 1px solid var(--alty-stroke);
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
}

.alty-panel-section--optional {
	background: var(--alty-surface);
}

.alty-panel-section__header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	font-size: 0.75rem;
	font-weight: 700;
	color: var(--alty-ink-soft);
}

.alty-panel-section__header i {
	color: var(--alty-muted-light);
	font-size: 0.9rem;
}

.alty-panel-hint {
	font-size: 0.75rem;
	color: var(--alty-muted);
	line-height: 1.45;
	margin: 0;
}

.alty-panel-upload-actions {
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
}

.alty-panel-import-btn {
	width: 100%;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.4rem;
	padding: 0.6rem 1rem;
	border: 1.5px dashed var(--alty-stroke-md);
	border-radius: var(--alty-radius-sm);
	background: var(--alty-surface);
	color: var(--alty-ink-soft);
	font-family: var(--font-body);
	font-size: 0.85rem;
	font-weight: 600;
	cursor: pointer;
	transition: border-color 0.12s, background 0.12s, color 0.12s;
}

.alty-panel-import-btn:hover {
	border-color: var(--alty-accent);
	background: rgba(32, 215, 161, 0.06);
	color: var(--alty-ink);
}

/* Desktop: hide mobile-only elements */
.alty-tab-bar,
.alty-mobile-tab-content {
	display: none;
}

/* ── Sticky CTA — bottom of sidebar (desktop) / bottom bar (mobile) ── */
.alty-sidebar-cta {
	grid-column: 1;
	grid-row: 2;
	flex-shrink: 0;
	display: flex;
	flex-direction: column;
	gap: 0.6rem;
	padding: 0.85rem 1rem;
	border-top: 1px solid var(--alty-stroke-md);
	box-shadow: 0 -4px 16px rgba(16,20,24,.07);
	background: rgba(255,255,255,.98);
}

.alty-cta-summary {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 0.45rem 0.8rem;
	padding-bottom: 0.2rem;
	border-bottom: 1px solid var(--alty-stroke);
}

.alty-cta-summary__row {
	display: flex;
	flex-direction: column;
	gap: 0.08rem;
	min-width: 0;
}

.alty-cta-summary__label {
	font-size: 0.62rem;
	font-weight: 700;
	letter-spacing: 0.05em;
	text-transform: uppercase;
	color: var(--alty-muted-light);
}

.alty-cta-summary__value {
	font-size: 0.83rem;
	font-weight: 700;
	color: var(--alty-ink);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.alty-sidebar-cta .alty-cta-price {
	display: flex;
	flex-direction: column;
	gap: 0.1rem;
}

.alty-sidebar-cta .alty-cta-price__label {
	font-size: 0.65rem;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--alty-muted-light);
}

.alty-sidebar-cta .alty-cta-price__amount {
	font-size: 1.15rem;
	font-weight: 800;
	color: var(--alty-ink);
}

.alty-sidebar-cta .alty-cta-price__amount--loading {
	opacity: 0.5;
	font-size: 0.9rem;
}

.alty-sidebar-cta .alty-primary-button {
	width: 100%;
}

/* ── HT/TTC tax toggle ── */

.alty-tax-toggle {
	display: flex;
	justify-content: space-between;
	gap: 0;
	margin-top: 4px;
}

.alty-tax-toggle__btn {
	padding: 2px 14px;
	font-size: 0.7rem;
	font-weight: 600;
	letter-spacing: 0.03em;
	text-transform: uppercase;
	background: transparent;
	border: 1px solid var(--alty-stroke, #e2e4e8);
	border-radius: 4px;
	color: var(--alty-text-muted, #9ca3af);
	cursor: pointer;
	transition: background 0.15s, color 0.15s, border-color 0.15s;
	line-height: 1.6;
}

.alty-tax-toggle__btn--active {
	background: var(--alty-accent, #20d7a1);
	border-color: var(--alty-accent, #20d7a1);
	color: #fff;
}

/* ── Mobile toolbar (inside the panel) ── */

.alty-mobile-toolbar {
	display: none;
	align-items: center;
	gap: 0.2rem;
	padding: 0.35rem 0.75rem;
	background: rgba(255,255,255,0.98);
	border-bottom: 1px solid var(--alty-stroke);
	overflow-y: visible;
	overflow-x: auto;
	scrollbar-width: none;
	-webkit-overflow-scrolling: touch;
	flex-shrink: 0;
	position: relative;
	z-index: 2;
}

.alty-mobile-toolbar::-webkit-scrollbar { display: none; }

.alty-mobile-toolbar > button,
.alty-mobile-toolbar > .alty-upload-menu > .alty-upload-menu__trigger {
	width: 2.2rem;
	height: 2.2rem;
	border: 0;
	border-radius: 0.55rem;
	background: transparent;
	color: var(--alty-ink-soft);
	font-size: 1rem;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	transition: background 0.12s, color 0.12s;
}

.alty-mobile-toolbar > button:hover,
.alty-mobile-toolbar > button:focus-visible,
.alty-mobile-toolbar > .alty-upload-menu > .alty-upload-menu__trigger:hover,
.alty-mobile-toolbar > .alty-upload-menu > .alty-upload-menu__trigger:focus-visible {
	background: var(--alty-ink);
	color: #fff;
}

.alty-mobile-toolbar > button:disabled,
.alty-mobile-toolbar > .alty-upload-menu > .alty-upload-menu__trigger:disabled {
	opacity: 0.3;
	cursor: not-allowed;
	pointer-events: none;
}

.alty-mobile-toolbar__divider {
	width: 1px;
	height: 1.4rem;
	background: var(--alty-stroke-md);
	flex-shrink: 0;
	margin: 0 0.15rem;
	align-self: center;
}

/* ── Tab bar ── */

.alty-tab-bar {
	display: none; /* shown only on mobile via media query */
	align-items: stretch;
	background: rgba(255,255,255,0.98);
	border-bottom: 1px solid var(--alty-stroke-md);
	flex-shrink: 0;
	overflow-x: auto;
	scrollbar-width: none;
}

.alty-tab-bar::-webkit-scrollbar { display: none; }

.alty-tab-btn {
	flex: 0 0 auto;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.35rem;
	min-width: 5.5rem;
	padding: 0.55rem 0.5rem;
	border: 0;
	border-bottom: 2px solid transparent;
	background: transparent;
	font-family: var(--font-body);
	font-size: 0.78rem;
	font-weight: 700;
	color: var(--alty-muted);
	cursor: pointer;
	transition: color 0.12s, border-color 0.12s, background 0.12s;
	white-space: nowrap;
}

.alty-tab-btn i {
	font-size: 0.95rem;
}

.alty-tab-btn:hover {
	color: var(--alty-ink);
	background: rgba(17,24,39,.03);
}

.alty-tab-btn.is-active {
	color: var(--alty-ink);
	border-bottom-color: var(--alty-accent);
}

/* ── Tab content area ── */

.alty-tab-content {
	flex: 1 1 auto;
	overflow-y: auto;
	-webkit-overflow-scrolling: touch;
	scrollbar-width: none;
	min-height: 0;
}

.alty-tab-content::-webkit-scrollbar { display: none; }

/* ── Material grid (mobile material tab) ── */

.alty-material-grid {
	display: flex;
	flex-direction: column;
	gap: 0;
	padding: 0;
}

.alty-material-grid .alty-material-btn {
	justify-content: flex-start;
	width: 100%;
	min-height: 2.8rem;
	border-radius: 0;
	border-left: none;
	border-right: none;
	border-top: none;
	border-bottom: 1px solid var(--alty-stroke);
	padding: 0.7rem 1rem;
	font-size: 0.88rem;
	background: transparent;
}

.alty-material-grid .alty-material-btn:first-child {
	border-top: 1px solid var(--alty-stroke);
}

.alty-material-grid .alty-material-btn:hover:not([disabled]):not(.is-selected) {
	background: var(--alty-surface);
	border-color: var(--alty-stroke);
	color: var(--alty-ink);
}

.alty-material-grid .alty-material-btn.is-selected {
	background: rgba(59, 130, 246, 0.06);
	border-bottom-color: var(--alty-stroke);
	border-left: 3px solid var(--alty-accent);
	color: var(--alty-ink);
	font-weight: 700;
	padding-left: calc(1rem - 2px);
}

/* ── Border row (size tab — label + value + slider) ── */

.alty-ctrl--range-row,
.alty-ctrl--border-row {
	display: flex;
	flex-direction: row;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.4rem 0.75rem;
}

.alty-ctrl--range-row .alty-ctrl__label,
.alty-ctrl--border-row .alty-ctrl__label {
	flex: 0 0 auto;
}

.alty-ctrl--range-row .alty-ctrl__range-value,
.alty-ctrl--border-row .alty-ctrl__range-value {
	flex: 0 0 auto;
	margin-left: auto;
}

.alty-ctrl--range-row .alty-ctrl__range,
.alty-ctrl--border-row .alty-ctrl__range {
	flex: 1 1 100%;
	min-width: 0;
}

.alty-ctrl--shape-corner {
	margin-top: 0.75rem;
}

/* ════════════════════════════════════════════
   RESPONSIVE
   ════════════════════════════════════════════ */

/* ── Compact desktop (820px – 1300px): tighter sidebar ── */
@media (max-width: 1300px) and (min-width: 821px) {
	:root { --alty-sidebar-w: 240px; }
	.alty-ctrl { padding: 0.7rem 0.85rem; gap: 0.28rem; }
	.alty-ctrl__input { min-width: 4.2rem; font-size: 0.9rem; }
	.alty-stage-artboard { width: min(68vw, 560px, calc((100dvh - var(--alty-header-h) - 7rem) * var(--stage-ratio, 1))); }
}

@media (max-width: 1100px) and (min-width: 821px) {
	:root { --alty-sidebar-w: 220px; }
	.alty-ctrl { padding: 0.65rem 0.75rem; gap: 0.24rem; }
	.alty-ctrl__input { min-width: 3.8rem; font-size: 0.86rem; }
	.alty-stage-artboard { width: min(72vw, 480px, calc((100dvh - var(--alty-header-h) - 7rem) * var(--stage-ratio, 1))); }
}

@media (max-width: 820px) {
	:root {
		--alty-bar-h: 112px;
		--alty-header-h: 48px;
		--alty-sidebar-w: 200px;
	}

	.alty-builder-header {
		padding: 0 0.75rem;
	}

	.alty-builder-header__brand {
		gap: 0.55rem;
	}

	.alty-builder-header__actions {
		gap: 0.4rem;
	}

	.alty-builder-header__language-link {
		min-width: 2.7rem;
		padding: 0.34rem 0.45rem;
	}

	.alty-builder-header__title {
		font-size: 0.92rem;
	}

	.alty-builder-main {
		height: calc(100vh - var(--alty-header-h));
	}

	/* Narrow sidebar on tablet */
	.alty-builder-controls {
		width: var(--alty-sidebar-w);
		overflow: hidden;
	}

	.alty-ctrl {
		padding: 0.6rem 0.65rem;
		gap: 0.2rem;
	}

	.alty-ctrl__input {
		min-width: 3.5rem;
		font-size: 0.84rem;
	}

	/* Hide floating tooltip at compact breakpoints */
	.alty-tooltip {
		display: none;
	}

	.alty-stage-artboard {
		width: min(86vw, 460px, calc((100dvh - var(--alty-header-h) - 7rem) * var(--stage-ratio, 1)));
	}

	.alty-stage-toolbar {
		top: auto;
		bottom: 1rem;
		left: 50%;
		width: auto;
		transform: translateX(-50%);
		flex-direction: row;
		padding: 0.35rem;
		overflow: visible;
		transition: none;
	}

	.alty-stage-toolbar:hover,
	.alty-stage-toolbar.is-expanded,
	.alty-stage-toolbar:focus-within {
		width: auto;
	}

	.alty-stage-toolbar__divider {
		width: 1px;
		height: auto;
		margin: 0 0.1rem;
	}

	.alty-stage-toolbar > button,
	.alty-stage-toolbar > .alty-upload-menu > .alty-upload-menu__trigger {
		width: 2.25rem;
		padding: 0;
		justify-content: center;
		gap: 0;
	}

	.alty-stage-toolbar > .alty-upload-menu > .alty-upload-menu__dropdown {
		top: auto;
		bottom: calc(100% + 0.55rem);
		left: 50%;
		transform: translateX(-50%);
	}

	.alty-stage-toolbar__label {
		display: none;
	}
}

/* ════════════════════════════════════════════
   MOBILE — full redesign of the controls bar
   ════════════════════════════════════════════ */

@media (max-width: 580px) {
	:root {
		--alty-bar-h: auto;
		--alty-header-h: 48px;
		--alty-mobile-panel-h: 260px;
	}

	/* ── Shell & layout ── */
	.alty-builder-shell {
		grid-template-rows: var(--alty-header-h) 1fr;
	}

	.alty-builder-main {
		height: calc(100dvh - var(--alty-header-h));
		overflow: visible;
	}

	.alty-builder-app {
		grid-template-columns: 1fr;
		grid-template-rows: 1fr var(--alty-mobile-panel-h);
		overflow: visible;
	}

	/* ── Header: compact ── */
	.alty-builder-header {
		padding: 0 0.65rem;
		gap: 0.5rem;
	}

	.alty-builder-header__brand {
		gap: 0.45rem;
	}

	.alty-builder-header__title {
		font-size: 0.82rem;
	}

	.alty-builder-header__actions {
		gap: 0.32rem;
	}

	.alty-builder-header__logo {
		display: none;
	}

	.alty-builder-header__back-label,
	.alty-builder-header__cart-label {
		display: none;
	}

	.alty-builder-header__back,
	.alty-builder-header__cart-link {
		padding: 0.35rem 0.45rem;
		font-size: 0.75rem;
		gap: 0.2rem;
	}

	.alty-builder-header__languages {
		padding: 0.16rem;
		gap: 0.18rem;
	}

	.alty-builder-header__language-link {
		min-width: 2.35rem;
		padding: 0.32rem 0.38rem;
		gap: 0.22rem;
		font-size: 0.66rem;
	}

	.alty-builder-header__language-flag {
		width: 0.82rem;
		height: 0.82rem;
	}

	.alty-builder-cart-badge {
		min-width: 1.25rem;
		height: 1.25rem;
		font-size: 0.66rem;
	}

	/* ── App layout: mobile switches back to single-column (stage over panel) ── */

	.alty-stage-shell {
		grid-column: 1;
		overflow: visible;
		z-index: 1;
	}

	/* ── Canvas ── */
	.alty-stage-workbench,
	.alty-upload-empty {
		height: 100%;
		padding: 1.5rem 0.75rem 0.5rem;
	}

	.alty-stage-artboard {
		width: min(90vw, 380px, calc((100dvh - var(--alty-header-h) - var(--alty-mobile-panel-h) - 4.5rem) * var(--stage-ratio, 1)));
	}

	/* Desktop toolbar: hidden on mobile (replaced by .alty-mobile-toolbar inside the panel) */
	.alty-stage-toolbar {
		display: none;
	}

	/* Mobile toolbar: shown inside the panel on mobile only */
	.alty-mobile-toolbar {
		display: flex;
	}

	/* ── Controls bar: becomes the mobile panel ── */
	.alty-builder-controls {
		grid-column: 1;
		grid-row: 2;
		width: 100%;
		height: var(--alty-mobile-panel-h);
		display: flex;
		flex-direction: column;
		flex-wrap: nowrap;
		overflow: hidden;
		background: rgba(255,255,255,0.98);
		border-left: none;
		border-top: 1px solid var(--alty-stroke-md);
		box-shadow: 0 -4px 24px rgba(16,20,24,.1);
		gap: 0;
		padding: 0;
		position: relative;
		z-index: 40;
	}

	/* Hide sidebar-specific elements on mobile (sidebar-cta is replaced by its mobile layout below) */

	/* ── Show/hide layout wrappers ── */
	.alty-controls-main {
		overflow-y: auto;
		overflow-x: hidden;
		grid-column: unset;
		grid-row: unset;
	}

	/* Hide desktop icon rail and panel body on mobile */
	.alty-icon-rail {
		display: none;
	}

	.alty-panel-body {
		display: none;
	}

	/* Show mobile tab bar and content on mobile */
	.alty-tab-bar {
		display: flex;
	}

	.alty-mobile-tab-content {
		display: block;
	}

	/* Reset sidebar-cta grid placement for mobile flex layout */
	.alty-sidebar-cta {
		grid-column: unset;
		grid-row: unset;
		flex-direction: row;
		align-items: center;
		justify-content: space-between;
		gap: 0.75rem;
		padding: 0.6rem 1rem;
		box-shadow: 0 -4px 16px rgba(16,20,24,.07);
	}

	.alty-cta-summary {
		display: none;
	}

	.alty-sidebar-cta .alty-cta-price {
		flex-direction: column;
		align-items: flex-start;
		gap: 0.05rem;
	}

	.alty-sidebar-cta .alty-primary-button {
		width: auto;
		flex-shrink: 0;
		padding: 0.6rem 1.1rem;
		font-size: 0.85rem;
	}

	/* ── Individual ctrl rows inside tab content ── */
	.alty-ctrl {
		flex: 0 0 auto;
		height: auto;
		width: 100%;
		flex-direction: row;
		align-items: center;
		justify-content: space-between;
		padding: 0.55rem 0.85rem;
		border-bottom: 1px solid var(--alty-stroke);
		gap: 0.6rem;
		background: rgba(255,255,255,0.97);
	}

	.alty-ctrl--grow {
		flex: 0 0 auto;
	}

	.alty-ctrl__label {
		font-size: 0.7rem;
		margin-bottom: 0;
		flex-shrink: 0;
		min-width: 3.5rem;
	}

	/* Number inputs */
	.alty-ctrl__input {
		width: 5rem;
		min-width: unset;
		height: 2.4rem;
		font-size: 1rem;
		text-align: center;
		padding: 0 0.4rem;
		border-radius: 0.6rem;
	}

	/* Range slider */
	.alty-ctrl__range {
		flex: 1 1 auto;
		min-width: 0;
		height: 2rem;
	}

	.alty-ctrl__range-value {
		font-size: 0.82rem;
		white-space: nowrap;
		flex-shrink: 0;
		min-width: 2.8rem;
		text-align: right;
	}

	/* Color swatches */
	.alty-swatch-row {
		gap: 0.4rem;
		flex-wrap: wrap;
	}

	.alty-swatch-btn {
		width: 1.75rem;
		height: 1.75rem;
	}

	.alty-chip-input {
		width: 1.75rem;
		height: 1.75rem;
	}

	/* Shape pills */
	.alty-shape-row {
		gap: 0.35rem;
		flex-wrap: wrap;
	}

	.alty-pill-btn {
		padding: 0.38rem 0.75rem;
		font-size: 0.8rem;
		min-height: 2rem;
	}

	/* Shape list + material grid: horizontal scrollable chips on mobile */
	.alty-ctrl--shape-full,
	.alty-ctrl--material-full {
		padding: 0.5rem 0.75rem;
	}

	.alty-shape-list,
	.alty-material-grid {
		flex-direction: row;
		flex-wrap: wrap;
		overflow-x: hidden;
		overflow-y: hidden;
		gap: 0.4rem;
		padding: 0.5rem 0.75rem;
	}


	.alty-shape-list .alty-pill-btn,
	.alty-material-grid .alty-material-btn {
		flex-shrink: 0;
		width: auto;
		min-height: 2rem;
		border-radius: 999px;
		border: 1.5px solid var(--alty-stroke-md);
		border-left: 1.5px solid var(--alty-stroke-md);
		padding: 0.35rem 0.85rem;
		font-size: 0.8rem;
		background: var(--alty-surface);
		color: var(--alty-ink-soft);
		font-weight: 600;
	}

	.alty-shape-list .alty-pill-btn:first-child,
	.alty-material-grid .alty-material-btn:first-child {
		border-top: 1.5px solid var(--alty-stroke-md);
	}

	.alty-shape-list .alty-pill-btn.is-selected,
	.alty-material-grid .alty-material-btn.is-selected {
		background: var(--alty-ink);
		border-color: var(--alty-ink);
		border-left-color: var(--alty-ink);
		color: #fff;
		font-weight: 700;
		padding-left: 0.85rem;
	}

	.alty-shape-list .alty-pill-btn[disabled] {
		opacity: 0.38;
		color: var(--alty-muted-light);
		background: transparent;
	}

	/* Dividers: hidden (rows use border-bottom) */
	.alty-ctrl-divider {
		display: none;
	}

	/* Desktop CTA: hidden */
	.alty-ctrl--cta {
		display: none;
	}

	/* Floating CTA: hidden (integrated in panel) */
	.alty-cta-float {
		display: none;
	}

	/* Upload card */
	.alty-upload-card {
		padding: 1.75rem 1.25rem;
		width: min(94vw, 380px);
	}

	/* Shape modal grid: 1 column */
	.alty-shape-modal__grid {
		grid-template-columns: 1fr;
	}

	/* Upload meta pills: wrap if needed */
	.alty-upload-meta {
		flex-wrap: wrap;
		justify-content: center;
		gap: 0.35rem;
	}
}

/* ════════════════════════════════════════════
   MATERIAL PREVIEW — 3-D CARD TILT + HUD LIGHT
   ════════════════════════════════════════════ */

/*
 * When activePanel === 'material' the stage workbench switches to this layout:
 *   .alty-stage-workbench.is-material-preview
 *     └ .alty-material-preview-scene  [data-material-scene]   ← pointer events + perspective
 *         └ .alty-material-preview-card  [data-material-card] ← rotated by JS
 *             └ .alty-material-preview-artboard               ← sticker + HUD blob
 *                 └ svg                                        ← sticker SVG
 *                 └ .alty-material-hud                        ← specular blob
 *         └ .alty-material-preview-hint                       ← "move your mouse" label
 */

/* ── Scene: perspective container ── */
.alty-stage-workbench.is-material-preview {
	/* Override default canvas alignment to centre the card nicely */
	flex-direction: column;
	gap: 1.5rem;
}

.alty-material-preview-scene {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 1.25rem;
	perspective: 680px;
	perspective-origin: center center;
	/* Marge pour que le tilt 3D (coins de la carte) ne soit pas coupé au hover */
	padding: 1rem 1.25rem;
	/* Do NOT set transform-style here — only the card node needs it */
}

/*
 * Bloc largeur + ombre sous l’aperçu.
 * IMPORTANT : pas d’overflow:hidden ici — entre .scene (perspective) et .card (rotateX/Y)
 * ça forçait transform-style: flat et cassait l’effet 3D au mouvement de souris.
 * Le rognage du visuel repose sur le SVG (overflow hidden en onglet Matériau) + .artboard.
 */
.alty-material-preview-clip {
	width: min(60vw, 580px);
	max-width: 580px;
	border-radius: var(--alty-radius-lg);
}

/* ── Card: the tilting surface ── */
.alty-material-preview-card {
	transform-style: preserve-3d;
	transform: rotateX(0deg) rotateY(0deg);
	/* Smooth spring-back when cursor leaves */
	transition: transform 0.08s linear;
	will-change: transform;
	border-radius: var(--alty-radius-lg);
	/* Keep the shadow on the tilted node so the material tab still reads as true 3D. */
	filter: drop-shadow(0 32px 56px rgba(16, 20, 24, 0.3));
}

/* ── Artboard inside material preview ── */
.alty-material-preview-artboard {
	position: relative;
	width: 100%;
	/* Override the generic artboard z-index so HUD blob sits on top */
	z-index: 1;
	/* Round corners match the card */
	border-radius: var(--alty-radius-lg);
	overflow: hidden;
	transform: translate3d(0, 0, 0);
	transition: transform 0.08s linear;
	will-change: transform;
}

.alty-material-preview-artboard.is-contour-preview {
	overflow: visible;
}

.alty-material-preview-artboard svg {
	width: 100%;
	height: auto;
	max-height: calc(100dvh - var(--alty-header-h) - 8rem);
	/* Cursor is not grab — user can't drag */
	cursor: default;
	display: block;
	border-radius: inherit;
}

/* ── Canvas HUD overlay ── */
/*
 * The <canvas data-material-hud> is painted entirely by JS (paintMaterialHud).
 * CSS only handles positioning + blend mode.
 * mix-blend-mode: screen — brightens without washing out the sticker image.
 */
.alty-material-hud {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	pointer-events: none;
	border-radius: inherit;
	z-index: 10;
	mix-blend-mode: screen;
	display: block;
}

/* ── Hint label below the card ── */
.alty-material-preview-hint {
	margin: 0;
	font-size: 0.78rem;
	color: var(--alty-muted);
	display: flex;
	align-items: center;
	gap: 0.35rem;
	letter-spacing: 0.02em;
	opacity: 0.85;
	user-select: none;
	pointer-events: none;
}
.alty-material-preview-hint i {
	font-size: 1em;
	vertical-align: -1px;
}

/* ── Disable the toolbar chevron while in material preview ── */
.alty-stage-workbench.is-material-preview .alty-stage-toolbar {
	display: none;
}

/* ── Mobile: material preview still shown but simpler (no 3D — too small) ── */
@media (max-width: 580px) {
	.alty-material-preview-scene {
		perspective: none;
	}

	.alty-material-preview-card {
		transform: none !important;
	}

	.alty-material-preview-clip {
		width: min(80vw, 320px);
	}

	.alty-material-preview-card {
		filter: drop-shadow(0 12px 24px rgba(16, 20, 24, 0.22));
	}
}
