.sgpg-simulator {
	display: grid;
	grid-template-columns: minmax(280px, 0.9fr) minmax(320px, 1.1fr);
	gap: 28px;
	align-items: start;
	max-width: 1120px;
	margin: 24px auto;
}
.sgpg-product-summary {
	grid-column: 2;
	grid-row: 1;
}
.sgpg-preview-column {
	grid-column: 2;
	grid-row: 2;
	max-width: 760px;
	width: 100%;
}
.sgpg-form {
	grid-column: 1;
	grid-row: 1 / span 2;
	display: grid;
	gap: 18px;
	padding: 20px;
	border: 1px solid #e5e5e5;
	border-radius: 8px;
	background: #fff;
}
.sgpg-product-summary h2 { margin: 0 0 6px; font-size: 24px; line-height: 1.2; }
.sgpg-product-price { margin-bottom: 14px; font-weight: 700; }
.sgpg-preview-stage {
	position: relative;
	width: 100%;
	overflow: hidden;
	isolation: isolate;
	border: 1px solid #e2e2e2;
	border-radius: 8px;
	background: #f7f7f7;
}
.sgpg-preview-stage-main {
	max-width: 620px;
	width: 100%;
	margin: 0 auto;
}
.sgpg-product-image {
	position: relative;
	z-index: 1;
	display: block;
	width: 100%;
	height: auto;
}
.sgpg-product-image-main {
	width: 100%;
	max-height: 720px;
	height: auto;
	object-fit: contain;
	display: block;
}
.sgpg-preview-stage-main .sgpg-product-image {
	width: 100%;
	max-height: 720px;
	object-fit: contain;
	display: block;
}
.sgpg-secondary-preview {
	max-width: 280px;
	margin: 18px auto 0;
}
.sgpg-secondary-preview h3 {
	margin: 0 0 8px;
	font-size: 16px;
	line-height: 1.25;
}
.sgpg-secondary-preview-stage,
.sgpg-preview-stage-secondary {
	max-width: 280px;
	width: 100%;
}
.sgpg-secondary-preview .sgpg-product-image,
.sgpg-product-image-secondary {
	width: 100%;
	height: auto;
	display: block;
}
.sgpg-engraving-area {
	position: absolute;
	left: 25%;
	top: 20%;
	width: 50%;
	height: 60%;
	z-index: 20;
	display: block;
	overflow: visible;
	opacity: 1;
	visibility: visible;
	pointer-events: none;
}
.sgpg-preview-wrapper {
	position: absolute;
	left: 50%;
	top: 50%;
	z-index: 30;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	overflow: visible;
	opacity: 1;
	visibility: visible;
	pointer-events: none;
	transform: translate(-50%, -50%);
	transform-origin: center center;
}
.sgpg-preview-text {
	position: relative;
	display: block;
	color: #f2f2f2;
	font-family: 'SGPG-Fonte-01', sans-serif;
	font-size: 32px;
	line-height: 1;
	text-align: center;
	white-space: nowrap;
	overflow-wrap: normal;
	word-break: normal;
	overflow: visible;
	text-shadow: 0 1px 1px rgba(0, 0, 0, 0.28);
	opacity: 1;
	visibility: visible;
	pointer-events: none;
	transform: none;
	transform-origin: center center;
}
.sgpg-preview-text.is-two-lines {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 0.06em;
	white-space: normal;
}
.sgpg-preview-text.is-two-lines span,
.sgpg-preview-text:not(.is-two-lines) span {
	display: inline-block;
	line-height: 1.05;
	white-space: nowrap;
}
.sgpg-area-debug-label {
	display: none;
	position: absolute;
	left: 4px;
	top: 4px;
	z-index: 35;
	padding: 2px 5px;
	border-radius: 3px;
	background: rgba(0, 0, 0, 0.72);
	color: #fff;
	font-size: 10px;
	line-height: 1.2;
	pointer-events: none;
}
.sgpg-simulator.sgpg-debug-area .sgpg-engraving-area {
	outline: 1px dashed rgba(255, 0, 0, 0.75);
	background: rgba(255, 0, 0, 0.08);
}
.sgpg-simulator.sgpg-debug-area .sgpg-area-2 {
	outline-color: rgba(0, 96, 255, 0.85);
	background: rgba(0, 96, 255, 0.08);
}
.sgpg-simulator.sgpg-debug-area .sgpg-area-debug-label {
	display: block;
}
.sgpg-field { display: grid; gap: 8px; }
.sgpg-field label { font-weight: 700; }
.sgpg-field input[type="text"], .sgpg-field select {
	width: 100%;
	min-height: 42px;
	border: 1px solid #cfcfcf;
	border-radius: 6px;
	padding: 8px 10px;
	background: #fff;
}
.sgpg-char-counter { color: #686868; }
.sgpg-segmented { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.sgpg-segmented label {
	display: flex;
	align-items: center;
	gap: 8px;
	min-height: 42px;
	padding: 8px 10px;
	border: 1px solid #d2d2d2;
	border-radius: 6px;
	cursor: pointer;
}
.sgpg-position-options,
.sgpg-size-options {
	display: grid;
	gap: 6px;
}
.sgpg-position-options {
	grid-template-columns: repeat(7, minmax(34px, 1fr));
}
.sgpg-size-options {
	grid-template-columns: repeat(3, minmax(90px, 1fr));
}
.sgpg-position-options label,
.sgpg-size-options label {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 40px;
	border: 1px solid #d2d2d2;
	border-radius: 6px;
	background: #fff;
	cursor: pointer;
}
.sgpg-position-options input,
.sgpg-size-options input {
	position: absolute;
	opacity: 0;
	pointer-events: none;
}
.sgpg-position-options label:has(input:checked),
.sgpg-size-options label:has(input:checked) {
	border-color: #111;
	background: #f2f2f2;
	font-weight: 700;
}
.sgpg-field.is-disabled .sgpg-position-options label {
	cursor: default;
}
.sgpg-font-list {
	display: grid;
	gap: 8px;
	max-height: 330px;
	overflow: auto;
	padding-right: 4px;
}
.sgpg-font-option {
	display: grid;
	grid-template-columns: 38px 1fr;
	gap: 10px;
	align-items: center;
	width: 100%;
	min-height: 46px;
	border: 1px solid #d7d7d7;
	border-radius: 6px;
	padding: 8px 10px;
	background: #fff;
	color: #1d1d1d;
	text-align: left;
	cursor: pointer;
}
.sgpg-font-option.is-selected { border-color: #111; box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.1); }
.sgpg-font-number-label { font-weight: 700; }
.sgpg-font-sample { font-size: 22px; line-height: 1.15; overflow-wrap: anywhere; }
.sgpg-submit {
	min-height: 48px;
	border: 0;
	border-radius: 6px;
	padding: 12px 18px;
	background: #111;
	color: #fff;
	font-weight: 700;
	cursor: pointer;
}
.sgpg-submit:disabled { cursor: wait; opacity: 0.65; }
.sgpg-notice, .sgpg-message, .sgpg-size-warning { border-radius: 6px; padding: 10px 12px; }
.sgpg-notice:empty { display: none; }
.sgpg-size-warning:empty { display: none; }
.sgpg-notice.is-error, .sgpg-error { background: #fff3f1; color: #8b1d12; }
.sgpg-notice.is-success { background: #eef8f0; color: #185b28; }
.sgpg-size-warning { background: #fff8e8; color: #674000; }
.sgpg-field.is-disabled { opacity: 0.48; }
.sgpg-field.is-disabled select, .sgpg-field.is-disabled input { pointer-events: none; }
@media (min-width: 769px) {
	.sgpg-preview-column {
		max-width: 760px;
		width: 100%;
	}
	.sgpg-preview-stage-main {
		max-width: 620px;
		width: 100%;
		margin: 0 auto;
	}
	.sgpg-product-image-main {
		width: 100%;
		max-height: 720px;
		object-fit: contain;
		display: block;
	}
	.sgpg-preview-stage-main .sgpg-product-image {
		width: 100%;
		max-height: 720px;
		object-fit: contain;
		display: block;
	}
	.sgpg-secondary-preview {
		max-width: 260px;
		width: 100%;
		margin: 10px auto 0;
	}
	.sgpg-preview-stage-secondary {
		max-width: 260px;
		width: 100%;
	}
	.sgpg-product-image-secondary {
		width: 100%;
		max-height: 150px;
		object-fit: contain;
		display: block;
	}
}
@media (max-width: 768px) {
	.sgpg-simulator {
		display: flex;
		flex-direction: column;
		gap: 14px;
		margin: 14px auto;
	}
	.sgpg-product-summary {
		order: 0;
		width: 100%;
	}
	.sgpg-form {
		order: 1;
		width: 100%;
		padding: 16px;
	}
	.sgpg-preview-column {
		order: 2;
		max-width: 100%;
		width: 100%;
	}
	.sgpg-product-summary h2 { font-size: 20px; }
	.sgpg-preview-stage-main {
		max-width: 300px;
		width: 100%;
		margin: 12px auto;
	}
	.sgpg-product-image-main {
		width: 100%;
		max-height: 360px;
		object-fit: contain;
		display: block;
	}
	.sgpg-preview-stage-main .sgpg-product-image {
		width: 100%;
		max-height: 360px;
		object-fit: contain;
		display: block;
	}
	.sgpg-secondary-preview {
		max-width: 220px;
		width: 100%;
		margin: 12px auto 0;
	}
	.sgpg-secondary-preview-stage,
	.sgpg-preview-stage-secondary {
		max-width: 220px;
		width: 100%;
	}
	.sgpg-product-image-secondary {
		width: 100%;
		max-height: 130px;
		object-fit: contain;
		display: block;
	}
	.sgpg-font-list { max-height: 260px; overflow-y: auto; }
	.sgpg-size-options {
		grid-template-columns: repeat(3, 1fr);
		gap: 6px;
	}
	.sgpg-size-options label {
		min-height: 38px;
		padding: 8px 4px;
		font-size: 13px;
		text-align: center;
	}
	.sgpg-submit { position: sticky; bottom: 12px; z-index: 5; }
}
