.color-wheel {
	background: conic-gradient(#ef4444, #f59e0b, #84cc16, #22c55e, #06b6d4, #2563eb, #9333ea, #ef4444);
}

:root {
	--shell-header-h: 64px;
	--keyboard-height: 0px;
	--visual-viewport-height: 100dvh;
	--visual-viewport-offset-top: 0px;
}

@media (min-width: 640px) {
	:root {
		--shell-header-h: 72px;
	}
}

@media (min-width: 1024px) {
	:root {
		--shell-header-h: 80px;
	}
}

.shell-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	min-height: var(--shell-header-h);
	padding: 0.5rem 1rem;
	background: #000;
	color: #fff;
}

.shell-app {
	position: relative;
}

@media (min-width: 640px) {
	.shell-header {
		padding: 0.5rem 2rem;
	}
}

@media (min-width: 1024px) {
	.shell-header {
		padding: 0.5rem 3rem;
	}
}

.shell-header-logo {
	display: flex;
	align-items: center;
	flex-shrink: 0;
	min-width: 0;
}

.shell-header-logo img {
	display: block;
	height: 38px;
	width: auto;
	max-width: min(200px, 52vw);
	object-fit: contain;
}

@media (min-width: 640px) {
	.shell-header-logo img {
		height: 46px;
		max-width: 220px;
	}
}

@media (min-width: 1024px) {
	.shell-header-logo img {
		height: 52px;
		max-width: 240px;
	}
}

.shell-header-actions {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	flex-shrink: 0;
}

@media (min-width: 640px) {
	.shell-header-actions {
		gap: 1.25rem;
	}
}

.shell-header-classic {
	font-size: 0.75rem;
	color: rgba(255, 255, 255, 0.6);
	text-decoration: none;
	white-space: nowrap;
}

.shell-header-classic:hover {
	color: #fff;
	text-decoration: underline;
	text-underline-offset: 2px;
}

.shell-header-cart {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2.35rem;
	height: 2.35rem;
	border: 1px solid rgba(255, 255, 255, 0.22);
	border-radius: 9999px;
	color: #fff;
	text-decoration: none;
	transition: background 0.15s ease, border-color 0.15s ease;
}

.shell-header-cart:hover {
	background: rgba(255, 255, 255, 0.08);
	border-color: rgba(255, 255, 255, 0.35);
}

.shell-header-cart svg {
	width: 1.05rem;
	height: 1.05rem;
}

.shell-header-cart span {
	position: absolute;
	top: -0.3rem;
	right: -0.3rem;
	min-width: 1.15rem;
	height: 1.15rem;
	padding: 0 0.25rem;
	border-radius: 9999px;
	background: #edae17;
	color: #000;
	font-size: 0.68rem;
	font-weight: 900;
	line-height: 1.15rem;
	text-align: center;
}

.shell-header-user {
	position: relative;
}

.shell-header-user summary {
	display: inline-flex;
	align-items: center;
	gap: 0.45rem;
	height: 2.35rem;
	max-width: 9.5rem;
	padding: 0 0.7rem;
	border: 1px solid rgba(255, 255, 255, 0.22);
	border-radius: 9999px;
	color: #fff;
	font-size: 0.78rem;
	font-weight: 800;
	cursor: pointer;
	list-style: none;
}

.shell-header-user summary::-webkit-details-marker {
	display: none;
}

.shell-header-user summary svg {
	width: 1rem;
	height: 1rem;
	flex-shrink: 0;
}

.shell-header-user summary span {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.shell-header-user-menu {
	position: absolute;
	top: calc(100% + 0.55rem);
	right: 0;
	z-index: 130;
	min-width: 10.5rem;
	padding: 0.35rem;
	border: 1px solid rgba(255, 255, 255, 0.12);
	border-radius: 10px;
	background: #1a1f24;
	box-shadow: 0 16px 34px rgba(0, 0, 0, 0.42);
}

.shell-header-user-menu a,
.shell-header-user-menu button {
	display: block;
	width: 100%;
	padding: 0.65rem 0.75rem;
	border: 0;
	border-radius: 7px;
	background: transparent;
	color: rgba(255, 255, 255, 0.86);
	font: inherit;
	font-size: 0.82rem;
	font-weight: 700;
	text-align: left;
	text-decoration: none;
	white-space: nowrap;
	cursor: pointer;
}

.shell-header-user-menu a:hover,
.shell-header-user-menu a:focus-visible,
.shell-header-user-menu button:hover,
.shell-header-user-menu button:focus-visible {
	background: rgba(255, 255, 255, 0.08);
	color: #fff;
	outline: none;
}

@media (max-width: 639px) {
	.shell-header-actions {
		gap: 0.55rem;
	}

	.shell-header-user summary {
		justify-content: center;
		width: 2.35rem;
		padding: 0;
	}

	.shell-header-user summary span {
		display: none;
	}
}

.shell-lang-wrap {
	position: relative;
}

.shell-lang {
	display: inline-flex;
	align-items: center;
	gap: 0.35rem;
	padding: 0;
	border: 0;
	background: transparent;
	color: #fff;
	font-size: 0.95rem;
	font-weight: 600;
	cursor: pointer;
}

.shell-lang-icon {
	width: 1.15rem;
	height: 1.15rem;
	opacity: 0.95;
}

.shell-lang-chevron {
	width: 0.65rem;
	height: 0.65rem;
	opacity: 0.85;
	transition: transform 0.15s ease;
}

.shell-lang-wrap.is-open .shell-lang-chevron {
	transform: rotate(180deg);
}

.shell-lang-dropdown {
	position: absolute;
	top: calc(100% + 0.55rem);
	right: 0;
	z-index: 120;
	min-width: 11.5rem;
	padding: 0.35rem;
	border-radius: 12px;
	background: #1a1f24;
	border: 1px solid rgba(255, 255, 255, 0.12);
	box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
}

.shell-lang-dropdown[hidden] {
	display: none;
}

.shell-lang-option {
	display: flex;
	align-items: center;
	gap: 0.65rem;
	width: 100%;
	padding: 0.55rem 0.65rem;
	border: 0;
	border-radius: 8px;
	background: transparent;
	color: rgba(255, 255, 255, 0.88);
	font-size: 0.875rem;
	font-weight: 500;
	text-align: left;
	cursor: pointer;
}

.shell-lang-option:hover,
.shell-lang-option:focus-visible {
	background: rgba(255, 255, 255, 0.08);
	outline: none;
}

.shell-lang-option[aria-selected="true"] {
	background: rgba(216, 154, 19, 0.14);
	color: #f3c86a;
}

.shell-lang-flag {
	flex: 0 0 auto;
	width: 1.65rem;
	height: 1.1rem;
	border-radius: 2px;
	overflow: hidden;
	box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.12);
}

.shell-lang-flag svg {
	display: block;
	width: 100%;
	height: 100%;
}

.shell-lang-option-label {
	flex: 1 1 auto;
	white-space: nowrap;
}

.shell-header-divider {
	width: 1px;
	height: 1.75rem;
	background: rgba(255, 255, 255, 0.22);
}

.shell-menu-btn {
	display: flex;
	flex-direction: column;
	justify-content: center;
	gap: 0.35rem;
	width: 2.25rem;
	height: 2.25rem;
	padding: 0;
	border: 0;
	background: transparent;
	cursor: pointer;
}

.shell-menu-btn span {
	display: block;
	height: 2px;
	width: 1.75rem;
	border-radius: 9999px;
	background: #fff;
}

.shell-quick-actions {
	position: absolute;
	/* cola logo abaixo do botão Cores (top 92px + 74px de altura) para não
	   descer sobre Enquadrar/Orçamento no canto inferior direito */
	top: calc(var(--shell-header-h) + 11rem);
	right: 1rem;
	width: max-content;
	z-index: 30;
	pointer-events: none;
	padding: 0;
	border: 0;
	background: transparent;
	backdrop-filter: none;
}

.shell-quick-actions__inner {
	position: static;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 0.25rem;
	width: max-content;
	pointer-events: none;
	padding: 0.45rem 0.35rem;
	border-radius: 9999px;
	background: rgba(255, 255, 255, 0.92);
	box-shadow: 0 18px 42px rgba(0, 0, 0, 0.14);
	backdrop-filter: blur(8px);
}

.shell-quick-action {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0;
	min-width: 2.75rem;
	min-height: 2.75rem;
	width: 2.75rem;
	height: 2.75rem;
	padding: 0.45rem;
	border: 1px solid transparent;
	border-radius: 9999px;
	font-size: 0.8rem;
	font-weight: 700;
	line-height: 1;
	white-space: nowrap;
	cursor: pointer;
	pointer-events: auto;
	transition: transform 0.15s ease, background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease, opacity 0.15s ease;
}

.shell-quick-action:hover {
	transform: translateY(-1px);
}

.shell-quick-action:disabled {
	opacity: 0.45;
	cursor: not-allowed;
	transform: none;
}

.shell-quick-action--secondary {
	background: #eef0f2;
	color: #11161a;
	border-color: rgba(17, 22, 26, 0.08);
}

.shell-quick-action--secondary:hover {
	background: #e2e6ea;
}

.shell-quick-action--primary {
	background: #edae17;
	color: #11161a;
	border-color: rgba(17, 22, 26, 0.08);
}

.shell-quick-action--primary:hover {
	background: #d69c11;
}

.shell-icon--quick {
	width: 1rem;
	height: 1rem;
	flex: 0 0 auto;
}

#btn-undo,
#btn-redo,
#btn-save {
	box-shadow: none;
}

#btn-simulations {
	box-shadow: none;
}

#btn-simulations .shell-sr-only {
	white-space: nowrap;
}

.shell-quick-action > span:not(.shell-sr-only) {
	display: none;
}

.shell-color-btn {
	/* Mesma largura do pill de Ações: 2.75rem (botão de 44px) + 0.35rem de padding de cada lado */
	width: 3.45rem;
	height: 74px;
	border-radius: 9999px;
	gap: 0.2rem;
	padding: 0.5rem 0;
}

.shell-color-btn__wheel {
	width: 2rem;
	height: 2rem;
	border-radius: 9999px;
	flex: 0 0 auto;
}

.shell-color-btn__label {
	font-size: 0.65rem;
	font-weight: 500;
	line-height: 1;
}

/* Alternador frente/verso compacto — só no mobile, empilhado acima do "Cores";
   em ecrãs maiores mantém-se o pill central FRENTE/VERSO. */
.shell-flip-btn {
	display: none;
}

@media (max-width: 639px) {
	#shell-view-toggle {
		display: none;
	}

	.shell-flip-btn {
		display: flex;
		flex-direction: column;
		width: 3.45rem;
		height: 60px;
		border-radius: 9999px;
		gap: 0.2rem;
		padding: 0.4rem 0;
	}

	.shell-flip-btn__icon {
		width: 1.5rem;
		height: 1.5rem;
		flex: 0 0 auto;
	}

	.shell-flip-btn__label {
		font-size: 0.65rem;
		font-weight: 500;
		line-height: 1;
	}

	/* Abre espaço para o alternador acima (92px + 60px + 12px de intervalo) */
	#btn-cores {
		top: 164px;
	}
}

@media (min-width: 640px) {
	.shell-color-btn {
		height: 96px;
	}

	.shell-color-btn__wheel {
		width: 2.25rem;
		height: 2.25rem;
	}

	.shell-color-btn__label {
		font-size: 0.72rem;
	}
}

@media (min-width: 640px) {
	.shell-menu-btn {
		width: 2.75rem;
		height: 2.75rem;
		gap: 0.4rem;
	}

	.shell-menu-btn span {
		width: 2.25rem;
		height: 3px;
	}

	.shell-quick-action {
		min-height: 2.75rem;
		padding-inline: 0.55rem;
		font-size: 0.85rem;
	}

	.shell-quick-actions {
		/* Cores: top 130px + 96px de altura + folga */
		top: calc(var(--shell-header-h) + 14.9rem);
		right: 2rem;
	}
}

@media (min-width: 1024px) {
	.shell-quick-actions {
		/* Cores: top 135px + 96px de altura + folga */
		top: calc(var(--shell-header-h) + 15.2rem);
		right: 2.5rem;
	}

	.shell-app > main {
		grid-template-columns: 390px 1fr;
	}

	.shell-stage {
		order: 2;
	}

	#bottomSheet.sheet {
		order: 1;
	}

	#sheetHandle {
		display: none;
	}
}

.shell-stage {
	height: calc(100vh - var(--shell-header-h));
	height: calc(100dvh - var(--shell-header-h));
}

#shell-view-toggle {
	top: 1.25rem;
}

@media (min-width: 640px) {
	#shell-view-toggle {
		top: 2rem;
	}
}

.shell-model-thumb-card {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 2.15rem;
	height: 2.15rem;
	flex: 0 0 auto;
	overflow: hidden;
	border-radius: 0.45rem;
	background: #f2f3f5;
	color: #111;
}

.shell-model-thumb-card img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.shell-model-thumb-card.has-image .shell-model-thumb-fallback-icon {
	display: none;
}

.shell-model-summary {
	display: flex;
	flex-direction: column;
	gap: 0.08rem;
}

.shell-model-title {
	order: 1;
	font-size: 0.82rem;
	font-weight: 500;
	color: #111;
}

#label-modelo {
	order: 2;
}

#label-modelo-inferior {
	order: 3;
}

#label-modelo[hidden],
#label-modelo-inferior[hidden] {
	display: none !important;
}

.shell-model-line {
	display: block;
	max-width: 6.6rem;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	font-size: 0.74rem;
	font-weight: 800;
	color: #000;
}

@media (min-width: 640px) {
	.shell-model-thumb-card {
		width: 2.75rem;
		height: 2.75rem;
		border-radius: 0.55rem;
	}

	.shell-model-title {
		font-size: 1rem;
	}

	.shell-model-line {
		max-width: 9.2rem;
		font-size: 0.92rem;
	}
}

@media (max-width: 639px) {
	#shell-view-toggle {
		top: 3.35rem;
	}

	.shell-model-card-btn {
		left: 1rem !important;
		right: auto !important;
		top: auto !important;
		bottom: 12.75rem !important;
		width: 10.75rem !important;
		height: 3.75rem !important;
		padding: 0 0.7rem !important;
		border-radius: 9999px !important;
	}

	.shell-model-card-btn > div:first-child {
		gap: 0.5rem !important;
	}

	.shell-model-card-btn .shell-model-thumb-card {
		width: 2rem;
		height: 2rem;
		border-radius: 0.45rem;
	}

	.shell-model-card-btn .shell-model-summary {
		gap: 0;
	}

	.shell-model-card-btn .shell-model-title {
		display: none;
	}

	.shell-model-card-btn .shell-model-line {
		max-width: 7.1rem;
		font-size: 0.7rem;
		line-height: 1.05;
	}

	.shell-model-card-btn #label-modelo {
		font-size: 0.85rem !important;
		line-height: 1.05;
	}

	.shell-model-card-btn > div:last-child {
		font-size: 1.35rem;
	}
}

.sheet {
	transform: translateY(var(--sheet-y));
	transition: transform .28s ease;
}

.sheet.closed {
	--sheet-y: calc(100% - 142px);
}

.sheet.open {
	--sheet-y: 0px;
}

@media (min-width: 1024px) {
	.sheet.closed,
	.sheet.open {
		--sheet-y: 0px;
	}
}

.legacy-engine-wrap {
	transition: bottom 0.28s ease;
	overflow: hidden;
	cursor: default;
	touch-action: none;
	user-select: none;
}

.legacy-engine-wrap #lista_lados div[class^="manequim"].ativo .fundos {
	cursor: grab;
}

.legacy-engine-wrap.is-panning #lista_lados div[class^="manequim"].ativo .fundos {
	cursor: grabbing;
}

@media (max-width: 1023px) {
	/* iOS Safari dá zoom automático em inputs com font-size < 16px */
	.shell-texto-input,
	.shell-select,
	.shell-texto-size-input {
		font-size: 16px;
	}

	#bottomSheet.sheet {
		bottom: var(--sheet-keyboard-bottom, var(--keyboard-height, 0px));
		max-height: min(75vh, calc(var(--visual-viewport-height, 100dvh) - 12px));
		transition: bottom 0.2s ease, transform 0.28s ease, max-height 0.2s ease;
	}

	body.shell-keyboard-open #btn-3d,
	body.shell-keyboard-open #btn-reset-zoom {
		bottom: calc(155px + var(--keyboard-height, 0px)) !important;
	}

	body.shell-keyboard-open #btn-orcamento-float {
		bottom: calc(215px + var(--keyboard-height, 0px)) !important;
	}

	@media (min-width: 640px) {
		body.shell-keyboard-open #btn-orcamento-float {
			bottom: calc(227px + var(--keyboard-height, 0px)) !important;
		}
	}

	body.shell-keyboard-open .shell-model-card-btn {
		bottom: calc(12.75rem + var(--keyboard-height, 0px)) !important;
	}

	/* Ao editar texto com teclado aberto: esconder controles, mantendo a peça visível. */
	body.shell-keyboard-open.shell-sheet-input-focused .shell-quick-actions,
	body.shell-keyboard-open.shell-sheet-input-focused #btn-3d,
	body.shell-keyboard-open.shell-sheet-input-focused #btn-orcamento-float,
	body.shell-keyboard-open.shell-sheet-input-focused #btn-reset-zoom,
	body.shell-keyboard-open.shell-sheet-input-focused .shell-model-card-btn,
	body.shell-keyboard-open.shell-sheet-input-focused #btn-cores,
	body.shell-keyboard-open.shell-sheet-input-focused #shell-view-toggle {
		visibility: hidden;
		pointer-events: none;
	}

	.shell-stage.sheet-open .legacy-engine-wrap {
		bottom: var(--engine-inset-bottom, 50vh);
	}
}

.shell-tab[hidden] {
	display: none !important;
}

.shell-tab[aria-selected="true"] {
	border-color: #d89a13;
	color: #d89a13;
}

.shell-tab {
	min-height: 4.35rem;
	padding: 0.55rem 0.45rem 0.5rem;
	gap: 0.4rem !important;
	border-radius: 0.75rem !important;
	aspect-ratio: auto !important;
}

.shell-tab span {
	display: block;
	max-width: 100%;
	line-height: 1;
	text-align: center;
	white-space: nowrap;
}

.shell-tabs-carousel {
	width: 100%;
}

.shell-tabs-scroll-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2.15rem;
	height: 2.15rem;
	padding: 0;
	border: 1px solid rgba(255, 255, 255, 0.14);
	border-radius: 9999px;
	background: #151a1f;
	color: #fff;
	box-shadow: 0 8px 18px rgba(0, 0, 0, 0.22);
	flex: 0 0 auto;
	cursor: pointer;
}

.shell-tabs-scroll-btn:disabled {
	opacity: 0.35;
	cursor: default;
	box-shadow: none;
}

.shell-icon {
	display: block;
	flex-shrink: 0;
}

.shell-icon--tab {
	width: 1.75rem;
	height: 1.75rem;
}

.shell-icon--float {
	width: 1.65rem;
	height: 1.65rem;
	color: #111;
}

.shell-icon--cart {
	width: 1.35rem;
	height: 1.35rem;
}

.shell-icon--arrow {
	width: 1.5rem;
	height: 1.5rem;
}

@media (min-width: 640px) {
	.shell-tab {
		min-height: 4.6rem;
		padding: 0.65rem 0.5rem 0.55rem;
	}

	.shell-icon--tab {
		width: 2rem;
		height: 2rem;
	}

	.shell-icon--float {
		width: 2rem;
		height: 2rem;
	}

	.shell-icon--cart {
		width: 1.5rem;
		height: 1.5rem;
	}

	.shell-icon--arrow {
		width: 1.75rem;
		height: 1.75rem;
	}
}

@media (max-width: 1023px) {
	.shell-tabs-carousel {
		padding-top: 0.25rem;
		padding-bottom: 0.7rem;
	}

	.shell-tabs-carousel .shell-tablist {
		display: flex !important;
		flex-wrap: nowrap;
		overflow-x: auto;
		overflow-y: hidden;
		scroll-snap-type: x mandatory;
		scroll-behavior: smooth;
		-webkit-overflow-scrolling: touch;
		scrollbar-width: none;
		padding-right: 0.15rem;
		padding-bottom: 0.25rem;
	}

	.shell-tabs-carousel .shell-tablist::-webkit-scrollbar {
		display: none;
	}

	.shell-tabs-carousel .shell-tab {
		flex: 0 0 4.35rem;
		min-height: 4.35rem;
		padding: 0.5rem 0.35rem 0.45rem;
		scroll-snap-align: center;
	}

	.shell-tabs-carousel .shell-tab span {
		font-size: 0.62rem !important;
	}

	.shell-tabs-carousel .shell-icon--tab {
		width: 1.55rem;
		height: 1.55rem;
	}

	.shell-tabs-carousel .shell-tabs-scroll-btn {
		align-self: center;
	}
}

@media (min-width: 1024px) {
	.shell-tabs-carousel {
		width: 100%;
		flex-shrink: 0;
	}

	.shell-tabs-carousel:not(.has-overflow) .shell-tabs-scroll-btn {
		display: none;
	}

	.shell-tabs-carousel .shell-tablist {
		display: flex !important;
		flex-wrap: nowrap;
		overflow-x: auto;
		overflow-y: hidden;
		scroll-behavior: smooth;
		scrollbar-width: none;
		border-bottom: 1px solid rgba(255, 255, 255, 0.1);
		padding-bottom: 0.75rem;
	}

	.shell-tabs-carousel .shell-tablist::-webkit-scrollbar {
		display: none;
	}

	.shell-tabs-carousel .shell-tab {
		flex: 1 1 0;
		min-width: 4.15rem;
		min-height: 4.15rem;
		padding: 0.5rem 0.4rem 0.45rem;
	}

	.shell-tabs-carousel.has-overflow .shell-tab {
		flex: 0 0 4.15rem;
	}

	.shell-tabs-carousel .shell-tabs-scroll-btn {
		align-self: center;
	}

	.shell-tab span {
		font-size: 0.625rem !important;
	}

	.shell-icon--tab {
		width: 1.85rem;
		height: 1.85rem;
	}
}

.shell-icon--fit {
	width: 1.15rem;
	height: 1.15rem;
	flex-shrink: 0;
	color: #111;
}

@media (min-width: 640px) {
	.shell-icon--fit {
		width: 1.35rem;
		height: 1.35rem;
	}
}

.shell-btn-orcamento .shell-icon {
	color: #111;
}

.shell-btn-orcamento-float {
	right: 1rem;
	bottom: 215px;
	transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
}

.shell-btn-orcamento-float.is-suppressed {
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	transform: translateY(6px);
}

.shell-icon--cart-compact {
	width: 1.15rem;
	height: 1.15rem;
	flex-shrink: 0;
	color: #111;
}

@media (min-width: 640px) {
	.shell-btn-orcamento-float {
		right: 2rem;
		bottom: 227px;
	}

	.shell-icon--cart-compact {
		width: 1.35rem;
		height: 1.35rem;
	}
}

@media (min-width: 1024px) {
	.shell-btn-orcamento-float {
		right: 2.5rem;
		bottom: 2.5rem;
	}

	#btn-orcamento-float {
		display: flex;
	}

	#btn-reset-zoom {
		bottom: 7.25rem;
	}
}

.shell-panel-main {
	flex: 1 1 auto;
	min-height: 0;
}

.shell-panel-scroll {
	flex: 1 1 auto;
	min-height: 0;
	-webkit-overflow-scrolling: touch;
}

.shell-panel-footer {
	flex-shrink: 0;
}

@media (min-width: 1024px) {
	.shell-panel-footer {
		padding-top: 1rem;
		border-top: 1px solid rgba(255, 255, 255, 0.08);
		background: #11161a;
	}
}

.shell-piece-tabs {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	margin-bottom: 0.85rem;
}

.shell-piece-tab {
	padding: 0.3rem 0.75rem;
	border-radius: 9999px;
	font-size: 0.7rem;
	font-weight: 600;
	border: 1px solid rgba(255, 255, 255, 0.18);
	color: rgba(255, 255, 255, 0.55);
	background: rgba(255, 255, 255, 0.04);
	cursor: pointer;
}

.shell-piece-tab.ativo {
	border-color: #d89a13;
	color: #d89a13;
	background: rgba(216, 154, 19, 0.08);
}

.shell-model-sync {
	display: inline-flex;
	align-items: center;
	gap: 0.45rem;
	margin: -0.1rem 0 0.85rem;
	padding: 0.42rem 0.75rem;
	border: 1px solid rgba(255, 255, 255, 0.18);
	border-radius: 9999px;
	background: rgba(255, 255, 255, 0.04);
	color: rgba(255, 255, 255, 0.68);
	font-size: 0.7rem;
	font-weight: 700;
	cursor: pointer;
}

.shell-model-sync.ativo {
	border-color: #d89a13;
	background: rgba(216, 154, 19, 0.1);
	color: #d89a13;
}

.shell-model-sync-mark {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 0.85rem;
	height: 0.85rem;
	border: 1px solid currentColor;
	border-radius: 9999px;
}

.shell-model-sync.ativo .shell-model-sync-mark::after {
	content: "";
	width: 0.42rem;
	height: 0.42rem;
	border-radius: 9999px;
	background: currentColor;
}

.shell-model-scope {
	margin: 0 0 0.8rem;
}

.shell-panel-loading,
.shell-panel-empty,
.shell-panel-hint {
	font-size: 0.875rem;
	color: rgba(255, 255, 255, 0.55);
	line-height: 1.45;
}

.shell-panel-hint {
	margin-bottom: 0.75rem;
}

.shell-upload-tip {
	width: 100%;
	margin: 0 0 1.25rem;
	padding: 1.25rem 1rem;
	box-sizing: border-box;
	background: var(--cor-destaque, #0a0a0a);
	color: #fff;
	font-size: 0.875rem;
	font-weight: 600;
	line-height: 1.45;
	text-align: center;
	border-radius: 8px;
}

.shell-upload-tip strong {
	color: #fff;
	font-weight: 700;
}

.shell-upload-action {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 0.35rem;
	padding: 1rem 0 0.5rem;
}

.shell-upload-label {
	font-size: 0.875rem;
	color: rgba(255, 255, 255, 0.55);
}

.shell-btn-upload {
	display: inline-block;
	padding: 0.45rem 1.25rem;
	border: none;
	border-radius: 6px;
	background: var(--cor-destaque, #0a0a0a);
	color: #fff;
	font-size: 0.8rem;
	font-weight: 700;
	cursor: pointer;
}

.shell-btn-upload:hover {
	opacity: 0.9;
}

.shell-color-group {
	margin-bottom: 1rem;
}

.shell-color-group-title {
	font-size: 0.68rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	color: rgba(255, 255, 255, 0.55);
	margin-bottom: 0.5rem;
}

.shell-color-layers {
	display: flex;
	flex-wrap: wrap;
	gap: 0.4rem;
	margin-bottom: 0.55rem;
}

.shell-color-layer {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	padding: 0.35rem 0.7rem;
	border-radius: 9999px;
	font-size: 0.72rem;
	font-weight: 600;
	border: 1px solid rgba(255, 255, 255, 0.18);
	color: rgba(255, 255, 255, 0.7);
	background: rgba(255, 255, 255, 0.04);
	cursor: pointer;
}

.shell-color-layer-chevron {
	font-size: 0.62rem;
	opacity: 0.55;
	line-height: 1;
	margin-left: 0.1rem;
}

.shell-color-layer.ativo {
	border-color: #d89a13;
	color: #d89a13;
}

.shell-color-layer-dot {
	width: 1rem;
	height: 1rem;
	border-radius: 9999px;
	border: 1px solid rgba(255, 255, 255, 0.25);
	flex-shrink: 0;
}

.shell-color-picker-wrap {
	position: fixed;
	z-index: 120;
	pointer-events: none;
}

.shell-color-picker {
	pointer-events: auto;
	background: #fff;
	border-radius: 12px;
	box-shadow: 0 10px 36px rgba(0, 0, 0, 0.38);
	padding: 12px 10px 10px;
	width: min(251px, calc(100vw - 24px));
	box-sizing: border-box;
}

.shell-color-picker-grid {
	display: flex;
	flex-wrap: wrap;
	gap: 4px;
}

.shell-color-picker-grid .shell-color-swatch {
	width: 2rem;
	height: 2rem;
	min-width: 2rem;
	min-height: 2rem;
	max-width: 2rem;
	aspect-ratio: auto;
	justify-self: auto;
	border-radius: 9999px;
	border: 2px solid rgba(0, 0, 0, 0.12);
}

.shell-color-picker-grid .shell-color-swatch.ativo {
	border-color: #d89a13;
	box-shadow: 0 0 0 2px rgba(216, 154, 19, 0.35);
}

.shell-color-swatches {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(2.35rem, 1fr));
	gap: 0.55rem;
	max-width: 100%;
}

.shell-color-swatch {
	width: 100%;
	aspect-ratio: 1;
	min-width: 2.35rem;
	min-height: 2.35rem;
	max-width: 2.75rem;
	justify-self: center;
	border-radius: 9999px;
	border: 2px solid rgba(255, 255, 255, 0.2);
	cursor: pointer;
	padding: 0;
	-webkit-tap-highlight-color: transparent;
}

@media (min-width: 640px) {
	.shell-color-swatches {
		grid-template-columns: repeat(auto-fill, minmax(2rem, 1fr));
		gap: 0.5rem;
	}

	.shell-color-swatch {
		min-width: 2rem;
		min-height: 2rem;
		max-width: 2.35rem;
	}
}

.shell-color-swatch.ativo {
	border-color: #d89a13;
	box-shadow: 0 0 0 2px rgba(216, 154, 19, 0.35);
}

.shell-logo-block {
	margin-bottom: 1rem;
}

.shell-logo-block-title {
	font-size: 0.68rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	color: rgba(255, 255, 255, 0.55);
	margin-bottom: 0.45rem;
}

.shell-logo-options {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(5.25rem, 1fr));
	gap: 0.5rem;
}

.shell-logo-option {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: flex-start;
	gap: 0.35rem;
	min-height: 6.4rem;
	padding: 0.55rem 0.45rem 0.5rem;
	border-radius: 12px;
	border: 1px solid rgba(255, 255, 255, 0.15);
	background: #2a2f36;
	color: rgba(255, 255, 255, 0.85);
	font-weight: 600;
	cursor: pointer;
	max-width: 100%;
}

.shell-logo-option.ativo {
	border-color: #d89a13;
	color: #d89a13;
}

.shell-logo-thumb {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 3.4rem;
	height: 3.4rem;
	padding: 0.25rem;
	border-radius: 0.55rem;
	/* Chip claro: os SVGs de miniatura do legado têm traço escuro
	   (desenhados para fundo branco) e desapareciam no painel escuro */
	background: #eef0f3;
	overflow: hidden;
	flex-shrink: 0;
}

.shell-logo-thumb-img,
.shell-logo-thumb-markup svg {
	display: block;
	max-width: 100%;
	max-height: 100%;
}

.shell-logo-thumb-markup {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
}

.shell-logo-thumb-fallback {
	display: block;
	width: 1rem;
	height: 1rem;
	border-radius: 999px;
	background: linear-gradient(135deg, rgba(255,255,255,0.2), rgba(255,255,255,0.05));
}

.shell-logo-label {
	font-size: 0.62rem;
	line-height: 1.05;
	text-align: center;
	text-wrap: balance;
}

.shell-toggle {
	display: inline-flex;
	align-items: center;
	gap: 0.6rem;
	font-size: 0.78rem;
	color: rgba(255, 255, 255, 0.88);
	margin-bottom: 0.5rem;
	padding: 0.35rem 0.55rem;
	border-radius: 0.6rem;
	background: rgba(255, 255, 255, 0.03);
	cursor: pointer;
	user-select: none;
	position: relative;
	line-height: 1.1;
}

.shell-toggle-input {
	appearance: none;
	-webkit-appearance: none;
	width: 1.05rem;
	height: 1.05rem;
	margin: 0;
	border-radius: 0.25rem;
	border: 2px solid rgba(255, 255, 255, 0.55);
	background: #20252b;
	box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.18);
	flex: 0 0 auto;
	display: inline-grid;
	place-content: center;
	cursor: pointer;
}

.shell-toggle-input::before {
	content: '';
	width: 0.5rem;
	height: 0.28rem;
	border-right: 2px solid #111;
	border-bottom: 2px solid #111;
	transform: rotate(45deg) scale(0);
	transform-origin: center;
	transition: transform 0.12s ease-out;
}

.shell-toggle-input:checked {
	border-color: #d89a13;
	background: #d89a13;
}

.shell-toggle-input:checked::before {
	transform: rotate(45deg) scale(1);
}

.shell-toggle-input:focus-visible {
	outline: 2px solid rgba(216, 154, 19, 0.75);
	outline-offset: 2px;
}

.shell-toggle-text {
	line-height: 1.1;
}

.shell-texto-fields {
	display: flex;
	flex-direction: column;
	gap: 0.55rem;
}

.shell-texto-row {
	margin-bottom: 0;
}

.shell-texto-input,
.shell-select {
	width: 100%;
	padding: 0.65rem 0.75rem;
	border-radius: 10px;
	border: 1px solid rgba(255, 255, 255, 0.15);
	background: #2a2f36;
	color: #fff;
	font-size: 0.85rem;
}

.shell-texto-input:focus,
.shell-select:focus,
.shell-texto-size-input:focus {
	outline: none;
	border-color: #d89a13;
}

.shell-sub-tabs {
	display: flex;
	flex-wrap: wrap;
	gap: 0.4rem;
	margin-bottom: 0.75rem;
}

.shell-sub-tab {
	padding: 0.4rem 0.75rem;
	border-radius: 9999px;
	border: 1px solid rgba(255, 255, 255, 0.15);
	background: #2a2f36;
	color: rgba(255, 255, 255, 0.75);
	font-size: 0.72rem;
	font-weight: 600;
	cursor: pointer;
}

.shell-sub-tab.ativo {
	border-color: #d89a13;
	color: #d89a13;
	background: rgba(216, 154, 19, 0.12);
}

.shell-texto-section {
	margin-top: 1rem;
	padding-top: 0.85rem;
	border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.shell-texto-section-title {
	font-size: 0.68rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	color: rgba(255, 255, 255, 0.55);
	margin-bottom: 0.5rem;
}

.shell-texto-label {
	display: block;
	font-size: 0.72rem;
	color: rgba(255, 255, 255, 0.65);
	margin: 0.35rem 0 0.25rem;
}

.shell-font-options {
	display: grid;
	gap: 0.45rem;
}

.shell-font-option {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	align-items: center;
	gap: 0.75rem;
	width: 100%;
	min-height: 2.75rem;
	padding: 0.45rem 0.65rem;
	border-radius: 8px;
	border: 1px solid rgba(255, 255, 255, 0.15);
	background: #2a2f36;
	color: rgba(255, 255, 255, 0.9);
	cursor: pointer;
	text-align: left;
}

.shell-font-option.ativo {
	border-color: #d89a13;
	background: rgba(216, 154, 19, 0.1);
}

.shell-font-name {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	font-size: 0.78rem;
	font-weight: 650;
}

.shell-font-sample {
	font-size: 1.45rem;
	line-height: 1;
	color: #fff;
	white-space: nowrap;
}

.shell-texto-positions,
.shell-texto-radios {
	display: flex;
	flex-wrap: wrap;
	gap: 0.4rem;
}

.shell-texto-positions {
	align-items: stretch;
}

.shell-texto-position {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: flex-start;
	gap: 0.35rem;
	padding: 0.55rem 0.45rem 0.5rem;
	border-radius: 10px;
	border: 1px solid rgba(255, 255, 255, 0.15);
	background: #2a2f36;
	color: rgba(255, 255, 255, 0.85);
	font-size: 0.7rem;
	font-weight: 600;
	cursor: pointer;
	width: 7.1rem;
	min-height: 5.5rem;
	text-align: center;
}

.shell-texto-position.ativo {
	border-color: #d89a13;
	color: #d89a13;
	background: rgba(216, 154, 19, 0.12);
}

.shell-texto-position-thumb {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 3rem;
	height: 3rem;
	border-radius: 10px;
	background: rgba(255, 255, 255, 0.08);
	overflow: hidden;
	flex-shrink: 0;
}

.shell-texto-position-thumb-img,
.shell-texto-position-thumb-markup svg {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: contain;
}

.shell-texto-position-thumb-markup {
	display: block;
	width: 100%;
	height: 100%;
}

.shell-texto-position-thumb-fallback {
	width: 1.1rem;
	height: 1.1rem;
	border-radius: 9999px;
	border: 2px solid currentColor;
	opacity: 0.7;
}

.shell-texto-position-label {
	display: block;
	width: 100%;
	line-height: 1.08;
	white-space: normal;
	word-break: break-word;
}

.shell-acabamento-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(4.5rem, 1fr));
	gap: 0.5rem;
}

.shell-acabamento-option {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 0.4rem;
	padding: 0.5rem 0.35rem 0.45rem;
	border-radius: 12px;
	border: 1px solid rgba(255, 255, 255, 0.14);
	background: #2a2f36;
	color: rgba(255, 255, 255, 0.85);
	font-size: 0.68rem;
	font-weight: 600;
	cursor: pointer;
	text-align: center;
	min-height: 5.2rem;
}

.shell-acabamento-option.ativo {
	border-color: #d89a13;
	color: #d89a13;
	background: rgba(216, 154, 19, 0.12);
}

.shell-acabamento-thumb {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 3.4rem;
	height: 3.4rem;
	padding: 0.25rem;
	border-radius: 10px;
	/* Chip claro — ver .shell-logo-thumb */
	background: #eef0f3;
	overflow: hidden;
	flex-shrink: 0;
}

.shell-acabamento-thumb-img,
.shell-acabamento-thumb-markup svg {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: contain;
}

.shell-acabamento-thumb-markup {
	display: block;
	width: 100%;
	height: 100%;
}

.shell-acabamento-thumb-fallback {
	width: 1.1rem;
	height: 1.1rem;
	border-radius: 9999px;
	border: 2px solid currentColor;
	opacity: 0.7;
}

.shell-acabamento-label {
	display: block;
	width: 100%;
	line-height: 1.1;
	white-space: normal;
	word-break: break-word;
}

.shell-texto-radio {
	display: inline-flex;
	align-items: center;
	gap: 0.35rem;
	font-size: 0.78rem;
	color: rgba(255, 255, 255, 0.85);
	cursor: pointer;
}

.shell-texto-size {
	display: flex;
	align-items: center;
	gap: 0.35rem;
	margin-top: 0.25rem;
}

.shell-texto-size-btn {
	width: 2.25rem;
	height: 2.25rem;
	border-radius: 8px;
	border: 1px solid rgba(255, 255, 255, 0.15);
	background: #2a2f36;
	color: #fff;
	font-size: 1.1rem;
	line-height: 1;
	cursor: pointer;
}

.shell-texto-size-input {
	width: 4.5rem;
	text-align: center;
	padding: 0.5rem;
	border-radius: 8px;
	border: 1px solid rgba(255, 255, 255, 0.15);
	background: #2a2f36;
	color: #fff;
	font-size: 0.85rem;
}

.shell-texto-alignments {
	display: flex;
	gap: 0.4rem;
}

.shell-texto-align {
	flex: 1;
	padding: 0.45rem 0.5rem;
	border-radius: 8px;
	border: 1px solid rgba(255, 255, 255, 0.15);
	background: #2a2f36;
	color: rgba(255, 255, 255, 0.75);
	font-size: 0.72rem;
	font-weight: 600;
	cursor: pointer;
}

.shell-texto-align.ativo {
	border-color: #d89a13;
	color: #d89a13;
	background: rgba(216, 154, 19, 0.12);
}

.shell-texto-list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 0.45rem;
	max-height: 180px;
	overflow-y: auto;
}

.shell-texto-list-item {
	display: grid;
	grid-template-columns: auto 1fr auto;
	align-items: center;
	gap: 0.5rem;
	padding: 0.45rem 0.55rem;
	border-radius: 10px;
	border: 1px solid rgba(255, 255, 255, 0.12);
	background: #2a2f36;
}

.shell-texto-list-item--selected {
	border-color: rgba(216, 154, 19, 0.55);
}

.shell-texto-list-select {
	padding: 0.3rem 0.55rem;
	border-radius: 9999px;
	border: 1px solid rgba(255, 255, 255, 0.15);
	background: #1f242a;
	color: rgba(255, 255, 255, 0.8);
	font-size: 0.68rem;
	font-weight: 600;
	cursor: pointer;
	white-space: nowrap;
}

.shell-texto-list-item--selected .shell-texto-list-select {
	border-color: #d89a13;
	color: #d89a13;
}

.shell-texto-list-label {
	font-size: 0.8rem;
	color: #fff;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.shell-texto-list-remove {
	width: 1.75rem;
	height: 1.75rem;
	border-radius: 9999px;
	border: 1px solid rgba(255, 255, 255, 0.15);
	background: #1f242a;
	color: rgba(255, 255, 255, 0.75);
	font-size: 1rem;
	line-height: 1;
	cursor: pointer;
}

.shell-texto-list-remove:hover {
	border-color: #e35d5d;
	color: #e35d5d;
}

.shell-gallery {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 0.5rem;
	margin-top: 0.65rem;
	max-height: 220px;
	overflow-y: auto;
}

.shell-gallery-item {
	border: 2px solid transparent;
	border-radius: 10px;
	background: #2a2f36;
	padding: 0.25rem;
	cursor: pointer;
	aspect-ratio: 1;
	overflow: hidden;
}

.shell-gallery-item img {
	width: 100%;
	height: 100%;
	object-fit: contain;
	display: block;
}

.shell-gallery-fallback {
	display: block;
	width: 100%;
	height: 100%;
	background: rgba(255, 255, 255, 0.08);
}

.shell-btn-primary,
.shell-btn-secondary {
	width: 100%;
	padding: 0.7rem 1rem;
	border-radius: 10px;
	font-size: 0.8rem;
	font-weight: 700;
	cursor: pointer;
	margin-top: 0.65rem;
}

.shell-btn-primary {
	background: #edae17;
	color: #111;
	border: none;
}

.shell-btn-secondary {
	background: transparent;
	color: rgba(255, 255, 255, 0.75);
	border: 1px solid rgba(255, 255, 255, 0.2);
}

.shell-modelos {
	display: flex;
	gap: 0.65rem;
	overflow-x: auto;
	padding: 0.15rem 0.1rem 0.65rem;
	-webkit-overflow-scrolling: touch;
	scroll-snap-type: x proximity;
	scrollbar-width: none;
}

.shell-modelos-sentinel {
	flex: 0 0 1px;
	width: 1px;
	height: 1px;
	pointer-events: none;
	visibility: hidden;
}

.shell-modelos::-webkit-scrollbar {
	display: none;
}

@media (min-width: 1024px) {
	.shell-modelos {
		display: grid;
		grid-template-columns: repeat(auto-fit, minmax(90px, 1fr));
		overflow-x: visible;
		scroll-snap-type: none;
	}

	.shell-modelos .shell-modelo-card {
		width: 100%;
	}
}

#panel-body button,
#panel-body [data-shell-model],
#panel-body [data-shell-color],
#panel-body [data-shell-color-layer] {
	touch-action: manipulation;
	-webkit-tap-highlight-color: transparent;
}

.shell-modelo-card {
	flex: 0 0 auto;
	width: 92px;
	border: 2px solid transparent;
	border-radius: 14px;
	background: #2a2f36;
	padding: 0.45rem 0.4rem 0.5rem;
	cursor: pointer;
	text-align: center;
	scroll-snap-align: start;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
	touch-action: manipulation;
	-webkit-tap-highlight-color: transparent;
	user-select: none;
}

.shell-modelo-card:hover {
	border-color: rgba(216, 154, 19, 0.45);
}

.shell-modelo-card.ativo {
	border-color: #d89a13;
	box-shadow: 0 0 0 1px rgba(216, 154, 19, 0.25);
}

.shell-modelo-thumb {
	display: flex;
	align-items: center;
	justify-content: center;
	height: 78px;
	margin-bottom: 0.45rem;
	border-radius: 10px;
	background: #343a42;
	overflow: hidden;
}

.shell-modelo-thumb img {
	display: block;
	max-width: 100%;
	max-height: 100%;
	width: auto;
	height: auto;
	object-fit: contain;
}

/* Skeleton enquanto a miniatura lazy ainda não carregou */
.shell-modelo-thumb.is-loading {
	position: relative;
}

.shell-modelo-thumb.is-loading::after {
	content: '';
	position: absolute;
	inset: 0;
	background: linear-gradient(100deg,
		rgba(255, 255, 255, 0) 32%,
		rgba(255, 255, 255, 0.09) 50%,
		rgba(255, 255, 255, 0) 68%);
	background-size: 220% 100%;
	animation: shell-thumb-shimmer 1.2s ease-in-out infinite;
}

@keyframes shell-thumb-shimmer {
	from { background-position: 130% 0; }
	to { background-position: -90% 0; }
}

.shell-modelo-thumb-fallback {
	display: block;
	width: 2.5rem;
	height: 2.5rem;
	border-radius: 9999px;
	background: rgba(255, 255, 255, 0.08);
}

.shell-modelo-label {
	display: block;
	font-size: 0.68rem;
	font-weight: 600;
	color: rgba(255, 255, 255, 0.92);
	line-height: 1.25;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

@media (min-width: 640px) {
	.shell-modelo-card {
		width: 104px;
	}

	.shell-modelo-thumb {
		height: 88px;
	}

	.shell-modelo-label {
		font-size: 0.72rem;
	}
}

/* ── Visualização 3D: loading + viewer fullscreen ── */

.shell-sr-only {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

body.shell-3d-busy-open,
body.shell-viewer-open {
	overflow: hidden;
}

.shell-3d-busy {
	position: fixed;
	inset: 0;
	z-index: 80;
	display: none;
	align-items: center;
	justify-content: center;
	padding: 1.5rem;
	background: rgba(8, 10, 12, 0.72);
	backdrop-filter: blur(6px);
	-webkit-backdrop-filter: blur(6px);
}

.shell-3d-busy.is-open {
	display: flex;
}

.shell-3d-busy-card {
	width: min(100%, 320px);
	padding: 1.75rem 1.5rem 1.5rem;
	border-radius: 1.25rem;
	background: linear-gradient(160deg, #1a1f24 0%, #11161a 100%);
	border: 1px solid rgba(216, 154, 19, 0.35);
	box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
	text-align: center;
	color: #fff;
}

.shell-3d-spinner {
	width: 3rem;
	height: 3rem;
	margin: 0 auto 1.1rem;
	border-radius: 9999px;
	border: 3px solid rgba(255, 255, 255, 0.12);
	border-top-color: #edae17;
	animation: shell-3d-spin 0.85s linear infinite;
}

.shell-3d-busy-title {
	font-size: 1.05rem;
	font-weight: 700;
	letter-spacing: 0.02em;
	margin: 0 0 0.35rem;
}

.shell-3d-busy-sub {
	margin: 0;
	font-size: 0.82rem;
	line-height: 1.45;
	color: rgba(255, 255, 255, 0.62);
}

#btn-3d.is-loading {
	opacity: 0.72;
	cursor: wait;
	pointer-events: none;
}

#btn-orcamento.is-loading,
#btn-orcamento-float.is-loading {
	opacity: 0.72;
	cursor: wait;
	pointer-events: none;
}

#btn-3d.is-loading > span:first-child {
	display: inline-block;
	width: 1.15rem;
	height: 1.15rem;
	border-radius: 9999px;
	border: 2px solid rgba(255, 255, 255, 0.25);
	border-top-color: #edae17;
	animation: shell-3d-spin 0.75s linear infinite;
	font-size: 0;
	line-height: 0;
}

.shell-viewer-3d {
	position: fixed;
	inset: 0;
	z-index: 90;
	display: none;
	flex-direction: column;
	background: #e6e6e5;
	overflow: auto;
	-webkit-overflow-scrolling: touch;
}

.shell-viewer-3d.is-open {
	display: flex;
}

.shell-viewer-3d-close {
	position: fixed;
	top: max(0.85rem, env(safe-area-inset-top));
	right: max(0.85rem, env(safe-area-inset-right));
	z-index: 2;
	width: 2.5rem;
	height: 2.5rem;
	border: 0;
	border-radius: 9999px;
	background: #d89a13;
	color: #fff;
	font-size: 1.5rem;
	line-height: 1;
	font-weight: 700;
	cursor: pointer;
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
}

.shell-viewer-3d-content {
	flex: 1 1 auto;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: flex-start;
	gap: 1.25rem;
	padding: 4.5rem 1rem 2rem;
	width: 100%;
	box-sizing: border-box;
}

.shell-viewer-3d-content .simulacao {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 1.25rem;
	width: 100%;
}

.shell-viewer-3d-content .frente_verso,
.shell-viewer-3d-content .lateral {
	display: flex;
	flex-direction: row;
	flex-wrap: nowrap;
	justify-content: center;
	align-items: flex-start;
	gap: 0.75rem;
	width: 100%;
}

.shell-viewer-3d-content .simulacao--preview-jpg {
	display: flex;
	justify-content: center;
	width: 100%;
}

.shell-viewer-3d-content .shell-viewer-3d-preview {
	display: block;
	width: 100%;
	max-width: min(96vw, 900px);
	height: auto;
}

.shell-viewer-3d-content img {
	display: block;
	flex: 0 1 auto;
	width: auto;
	max-width: min(44vw, 260px);
	height: auto;
}

@media (max-width: 1023px) {
	.shell-viewer-3d-content .frente_verso,
	.shell-viewer-3d-content .lateral {
		flex-direction: column;
		align-items: center;
	}

	.shell-viewer-3d-content img {
		max-width: min(88vw, 360px);
	}
}

.shell-viewer-3d-empty {
	color: #333;
	font-size: 0.95rem;
}

@keyframes shell-3d-spin {
	to { transform: rotate(360deg); }
}

/* ── Drawer de seleção de desporto ── */

.shell-drawer {
	position: fixed;
	inset: 0;
	z-index: 100;
	pointer-events: none;
}

.shell-drawer.is-open {
	pointer-events: auto;
}

.shell-drawer-backdrop {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0);
	transition: background 0.28s ease;
}

.shell-drawer.is-open .shell-drawer-backdrop {
	background: rgba(0, 0, 0, 0.55);
}

.shell-drawer-panel {
	position: absolute;
	top: 0;
	right: 0;
	bottom: 0;
	width: min(88vw, 320px);
	background: #11161a;
	display: flex;
	flex-direction: column;
	transform: translateX(100%);
	transition: transform 0.28s ease;
	box-shadow: -8px 0 40px rgba(0, 0, 0, 0.45);
}

.shell-drawer.is-open .shell-drawer-panel {
	transform: translateX(0);
}

.shell-drawer-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 1.25rem 1.25rem 1rem;
	border-bottom: 1px solid rgba(255, 255, 255, 0.08);
	flex-shrink: 0;
}

.shell-drawer-title {
	font-size: 0.7rem;
	font-weight: 700;
	letter-spacing: 0.15em;
	color: rgba(255, 255, 255, 0.55);
}

.shell-drawer-close {
	width: 2rem;
	height: 2rem;
	border: 0;
	border-radius: 8px;
	background: rgba(255, 255, 255, 0.06);
	color: rgba(255, 255, 255, 0.65);
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
}

.shell-drawer-close svg {
	width: 1rem;
	height: 1rem;
}

.shell-drawer-close:hover {
	background: rgba(255, 255, 255, 0.12);
	color: #fff;
}

.shell-drawer-list {
	flex: 1;
	overflow-y: auto;
	padding: 0.65rem 0.75rem;
	list-style: none;
	margin: 0;
	scrollbar-width: none;
}

.shell-drawer-list::-webkit-scrollbar {
	display: none;
}

.shell-drawer-item {
	margin-bottom: 0.25rem;
}

.shell-drawer-link {
	display: flex;
	align-items: center;
	gap: 0.85rem;
	padding: 0.65rem 0.75rem;
	border-radius: 12px;
	text-decoration: none;
	color: rgba(255, 255, 255, 0.8);
	transition: background 0.15s ease;
}

.shell-drawer-link:hover {
	background: rgba(255, 255, 255, 0.06);
	color: #fff;
}

.shell-drawer-item.ativo .shell-drawer-link {
	background: rgba(216, 154, 19, 0.12);
	color: #d89a13;
}

.shell-drawer-icon {
	width: 2.5rem;
	height: 2.5rem;
	border-radius: 10px;
	background: #2a2f36;
	flex-shrink: 0;
	overflow: hidden;
	display: flex;
	align-items: center;
	justify-content: center;
}

.shell-drawer-icon img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.shell-drawer-icon-placeholder {
	width: 1.1rem;
	height: 1.1rem;
	border-radius: 9999px;
	background: rgba(255, 255, 255, 0.1);
}

.shell-drawer-name {
	flex: 1;
	font-size: 0.88rem;
	font-weight: 600;
	line-height: 1.3;
}

.shell-drawer-check {
	width: 1.1rem;
	height: 1.1rem;
	flex-shrink: 0;
	color: #d89a13;
}

.shell-drawer-footer {
	padding: 1rem 1.25rem;
	border-top: 1px solid rgba(255, 255, 255, 0.08);
	flex-shrink: 0;
}

.shell-drawer-classic {
	display: block;
	font-size: 0.78rem;
	color: rgba(255, 255, 255, 0.45);
	text-decoration: none;
	text-align: center;
}

.shell-drawer-classic:hover {
	color: rgba(255, 255, 255, 0.75);
	text-decoration: underline;
	text-underline-offset: 2px;
}

@media (min-width: 640px) {
	.shell-drawer-panel {
		width: min(75vw, 340px);
	}
}

@media (min-width: 1024px) {
	.shell-drawer-panel {
		width: 320px;
	}
}
