/* Shared primary button (matches kiosko / Woo wp-element-button) */
.bit3d-personalize-cta__button.wp-element-button,
.bit3d-editor__submit.wp-element-button {
	display: inline-block;
	box-sizing: border-box;
	background: #000 !important;
	color: #fff !important;
	border: 0 !important;
	border-radius: 4px;
	padding: 16px 32px;
	font-size: 16px;
	font-weight: 400;
	line-height: 1.25;
	text-decoration: none !important;
	text-align: center;
	cursor: pointer;
	appearance: none;
	-webkit-appearance: none;
}

.bit3d-personalize-cta__button.wp-element-button:hover,
.bit3d-editor__submit.wp-element-button:hover {
	background: #222 !important;
	color: #fff !important;
}

/* Product-page CTA */
.bit3d-personalize-cta {
	margin: 1.25rem 0 0.5rem;
	display: grid;
	gap: 0.85rem;
	max-width: 28rem;
}

.bit3d-personalize-cta__blurb {
	margin: 0;
	font-size: 0.92rem;
	line-height: 1.45;
	color: #57534e;
}

.bit3d-personalize-cta__button {
	justify-self: start;
	width: auto;
}

/* Studio page shell — same white as storefront */
body.bit3d-studio-body {
	background: #fff;
}

.bit3d-studio {
	--bit3d-border: #e5e5e5;
	--bit3d-bg: #fff;
	--bit3d-ink: #1c1917;
	--bit3d-muted: #78716c;
	--bit3d-accent: #0f766e;
	--bit3d-accent-soft: #ccfbf1;
	background: #fff;
	color: var(--bit3d-ink);
	padding: 1.5rem 1rem 3rem;
}

.bit3d-studio__inner {
	max-width: 1100px;
	margin: 0 auto;
}

.bit3d-studio__header {
	margin-bottom: 1.35rem;
	display: grid;
	gap: 0.35rem;
}

.bit3d-studio__back {
	justify-self: start;
	font-size: 0.88rem;
	color: var(--bit3d-muted);
	text-decoration: none;
	margin-bottom: 0.35rem;
}

.bit3d-studio__back:hover {
	color: var(--bit3d-accent);
}

.bit3d-studio__eyebrow {
	margin: 0;
	font-size: 0.75rem;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--bit3d-accent);
	font-weight: 650;
}

.bit3d-studio__title {
	margin: 0;
	font-size: clamp(1.45rem, 2.5vw, 1.9rem);
	font-weight: 650;
	line-height: 1.2;
	letter-spacing: -0.02em;
}

.bit3d-studio__lead {
	margin: 0.25rem 0 0;
	max-width: 40rem;
	font-size: 0.95rem;
	line-height: 1.5;
	color: var(--bit3d-muted);
}

.bit3d-studio__form {
	margin: 0;
}

/* Editor */
.bit3d-editor {
	--bit3d-border: #ddd6cb;
	--bit3d-bg: #faf7f2;
	--bit3d-ink: #1c1917;
	--bit3d-muted: #78716c;
	--bit3d-accent: #0f766e;
	margin: 0;
	padding: 0;
	border: none;
	background: transparent;
	color: var(--bit3d-ink);
	display: grid;
	gap: 1rem;
}

.bit3d-editor--studio .bit3d-editor__layout {
	display: grid;
	gap: 1.25rem;
	align-items: start;
}

@media (min-width: 900px) {
	.bit3d-editor--studio .bit3d-editor__layout {
		grid-template-columns: minmax(0, 1.15fr) minmax(300px, 0.85fr);
	}
}

.bit3d-editor__stage {
	display: grid;
	gap: 0.55rem;
}

.bit3d-editor__canvas-wrap {
	position: relative;
	background: #f5f5f5;
	border: 1px solid var(--bit3d-border);
	aspect-ratio: 4 / 5;
	overflow: hidden;
}

.bit3d-editor__canvas-wrap canvas {
	display: block;
	width: 100%;
	height: 100%;
	cursor: grab;
	touch-action: none;
}

.bit3d-editor__canvas-wrap canvas.is-dragging {
	cursor: grabbing;
}

.bit3d-editor__hint {
	margin: 0;
	font-size: 0.8rem;
	line-height: 1.4;
	color: var(--bit3d-muted);
}

.bit3d-editor__panel {
	display: grid;
	gap: 0.85rem;
	padding: 1rem;
	background: #fff;
	border: 1px solid var(--bit3d-border);
}

.bit3d-editor__section {
	display: grid;
	gap: 0.65rem;
	padding-bottom: 0.85rem;
	border-bottom: 1px solid #ebe4da;
}

.bit3d-editor__section:last-of-type {
	border-bottom: none;
	padding-bottom: 0;
}

.bit3d-editor__section-title {
	margin: 0;
	font-size: 0.72rem;
	font-weight: 700;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--bit3d-muted);
}

.bit3d-editor__field label {
	display: block;
	margin-bottom: 0.35rem;
	font-size: 0.82rem;
	font-weight: 600;
}

.bit3d-editor__field input[type="text"],
.bit3d-editor__field select {
	width: 100%;
	max-width: 100%;
	box-sizing: border-box;
	padding: 0.6rem 0.7rem;
	border: 1px solid var(--bit3d-border);
	background: #fff;
	font: inherit;
	border-radius: 2px;
}

.bit3d-editor__field input[type="text"]:focus,
.bit3d-editor__field select:focus {
	outline: 2px solid var(--bit3d-accent-soft);
	border-color: var(--bit3d-accent);
}

.bit3d-editor__swatches {
	display: flex;
	flex-wrap: wrap;
	gap: 0.4rem;
}

.bit3d-editor__swatch {
	width: 1.75rem;
	height: 1.75rem;
	border-radius: 999px;
	border: 2px solid transparent;
	padding: 0;
	cursor: pointer;
	box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.12);
	transition: transform 0.12s ease;
}

.bit3d-editor__swatch:hover {
	transform: scale(1.08);
}

.bit3d-editor__swatch.is-active {
	border-color: var(--bit3d-ink);
	box-shadow: 0 0 0 2px #fff, 0 0 0 3px var(--bit3d-ink);
}

.bit3d-editor__ornaments {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(6.4rem, 1fr));
	gap: 0.45rem;
}

.bit3d-editor__ornament-btn {
	display: grid;
	gap: 0.15rem;
	justify-items: start;
	padding: 0.55rem 0.6rem;
	border: 1px solid var(--bit3d-border);
	background: #fff;
	cursor: pointer;
	text-align: left;
	font: inherit;
	border-radius: 2px;
	transition: border-color 0.12s ease, background 0.12s ease;
}

.bit3d-editor__ornament-btn:hover {
	border-color: var(--bit3d-accent);
	background: #f0fdfa;
}

.bit3d-editor__ornament-btn strong {
	font-size: 0.85rem;
}

.bit3d-editor__ornament-btn span {
	font-size: 0.75rem;
	color: var(--bit3d-muted);
}

.bit3d-editor__selected {
	display: grid;
	gap: 0.5rem;
}

.bit3d-editor__selected-item {
	display: grid;
	gap: 0.45rem;
	padding: 0.6rem;
	border: 1px solid var(--bit3d-border);
	background: #fff;
	font-size: 0.85rem;
	border-radius: 2px;
}

.bit3d-editor__selected-item.is-active {
	border-color: var(--bit3d-accent);
	background: #f0fdfa;
}

.bit3d-editor__selected-head {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	gap: 0.5rem;
}

.bit3d-editor__selected-head span {
	color: var(--bit3d-muted);
	font-size: 0.8rem;
}

.bit3d-editor__ornament-swatches .bit3d-editor__swatch {
	width: 1.45rem;
	height: 1.45rem;
}

.bit3d-editor__selected-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.3rem;
}

.bit3d-editor__selected-actions button {
	border: 1px solid var(--bit3d-border);
	background: #fafafa;
	padding: 0.25rem 0.5rem;
	font: inherit;
	font-size: 0.75rem;
	cursor: pointer;
	border-radius: 2px;
}

.bit3d-editor__selected-actions button:hover {
	border-color: var(--bit3d-accent);
}

.bit3d-editor__checkout-bar {
	display: grid;
	gap: 0.75rem;
	position: sticky;
	bottom: 0.75rem;
	background: #fff;
	padding-top: 1rem;
	border-top: 1px solid var(--bit3d-border);
}

.bit3d-editor__price {
	margin: 0;
	font-size: 0.85rem;
	color: var(--bit3d-muted);
	line-height: 1.35;
}

.bit3d-editor__price strong {
	color: var(--bit3d-accent);
	font-size: 1.35rem;
	font-weight: 700;
}

.bit3d-editor__submit {
	width: 100%;
	justify-content: center;
}

.bit3d-editor__empty {
	margin: 0;
	font-size: 0.85rem;
	color: var(--bit3d-muted);
}
