/*
 * Quintal Delivery — configurador de pizza
 * Todos os estilos são isolados para não interferir no tema ou no Elementor.
 */
.qd-pizza-builder {
	--qd-green: #24733f;
	--qd-green-dark: #15532b;
	--qd-green-soft: #eef8f0;
	--qd-ink: #183025;
	--qd-muted: #66756c;
	--qd-line: #dce8df;
	--qd-surface: #ffffff;
	--qd-shadow: 0 18px 50px rgba(24, 48, 37, 0.12);
	box-sizing: border-box;
	max-width: 920px;
	margin: 28px auto;
	padding: clamp(18px, 3vw, 36px);
	border: 1px solid var(--qd-line);
	border-radius: 24px;
	background: var(--qd-surface);
	box-shadow: var(--qd-shadow);
	color: var(--qd-ink);
	font-family: inherit;
}

.qd-pizza-builder *,
.qd-pizza-builder *::before,
.qd-pizza-builder *::after {
	box-sizing: border-box;
}

.qd-builder-heading {
	margin: -1px -1px 28px;
	padding: clamp(22px, 4vw, 36px);
	border-radius: 18px;
	background:
		radial-gradient(circle at 89% 14%, rgba(255, 255, 255, 0.2) 0, rgba(255, 255, 255, 0) 30%),
		linear-gradient(135deg, var(--qd-green-dark), var(--qd-green));
	color: #fff;
}

.qd-builder-eyebrow {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	margin-bottom: 8px;
	font-size: 0.75rem;
	font-weight: 800;
	letter-spacing: 0.1em;
	line-height: 1.2;
	text-transform: uppercase;
	color: rgba(255, 255, 255, 0.83);
}

.qd-builder-eyebrow::before {
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: #f9c74f;
	content: "";
}

.qd-builder-heading h2 {
	margin: 0;
	color: inherit;
	font-size: clamp(1.65rem, 3vw, 2.35rem);
	font-weight: 800;
	letter-spacing: -0.035em;
	line-height: 1.1;
}

.qd-builder-heading p {
	max-width: 620px;
	margin: 11px 0 0;
	font-size: 0.98rem;
	line-height: 1.55;
	color: rgba(255, 255, 255, 0.9);
}

.qd-builder-step {
	min-width: 0;
	margin: 0;
	padding: 23px 0;
	border: 0;
	border-bottom: 1px solid var(--qd-line);
}

.qd-builder-step legend {
	display: flex;
	align-items: center;
	gap: 9px;
	width: 100%;
	padding: 0;
	font-size: 1rem;
	font-weight: 800;
	line-height: 1.35;
	color: var(--qd-ink);
}

.qd-builder-step legend > span {
	display: inline-grid;
	place-items: center;
	flex: 0 0 25px;
	width: 25px;
	height: 25px;
	border-radius: 50%;
	background: var(--qd-green-soft);
	color: var(--qd-green-dark);
	font-size: 0.78rem;
	font-weight: 800;
}

.qd-builder-step legend small {
	font-size: 0.78rem;
	font-weight: 500;
	color: var(--qd-muted);
}

.qd-type-grid {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 10px;
	margin-top: 16px;
}

.qd-choice,
.qd-option {
	position: relative;
	display: flex;
	align-items: center;
	min-width: 0;
	cursor: pointer;
}

.qd-choice input,
.qd-option input {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	clip-path: inset(50%);
	white-space: nowrap;
}

.qd-choice > span {
	display: flex;
	flex: 1;
	flex-direction: column;
	gap: 3px;
	min-height: 90px;
	padding: 16px 13px;
	border: 1px solid var(--qd-line);
	border-radius: 14px;
	background: #fff;
	transition: border-color 160ms ease, background-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.qd-choice > span::before {
	width: 9px;
	height: 9px;
	margin-bottom: auto;
	border: 2px solid #a7b8ac;
	border-radius: 50%;
	content: "";
	transition: border-color 160ms ease, box-shadow 160ms ease;
}

.qd-choice strong,
.qd-option span {
	font-size: 0.92rem;
	font-weight: 750;
	line-height: 1.25;
	color: var(--qd-ink);
}

.qd-choice small {
	font-size: 0.78rem;
	line-height: 1.25;
	color: var(--qd-muted);
}

.qd-choice:hover > span {
	border-color: #8bb89b;
	transform: translateY(-1px);
}

.qd-choice input:checked + span {
	border-color: var(--qd-green);
	background: var(--qd-green-soft);
	box-shadow: 0 6px 16px rgba(36, 115, 63, 0.12);
}

.qd-choice input:checked + span::before {
	border-color: var(--qd-green);
	box-shadow: inset 0 0 0 2px var(--qd-green-soft), inset 0 0 0 8px var(--qd-green);
}

.qd-choice input:focus-visible + span,
.qd-option input:focus-visible + span,
.qd-flavor-select:focus-visible,
.qd-observation:focus-visible,
.qd-add-to-cart:focus-visible {
	outline: 3px solid rgba(36, 115, 63, 0.35);
	outline-offset: 3px;
}

.qd-flavor-slots {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 13px;
	margin-top: 16px;
}

.qd-flavor-slot {
	display: grid;
	gap: 7px;
	min-width: 0;
}

.qd-flavor-label {
	font-size: 0.82rem;
	font-weight: 750;
	line-height: 1.25;
	color: var(--qd-muted);
}

.qd-flavor-select,
.qd-observation {
	width: 100%;
	border: 1px solid #bfd2c4;
	border-radius: 11px;
	background: #fff;
	color: var(--qd-ink);
	font: inherit;
	line-height: 1.3;
	transition: border-color 160ms ease, box-shadow 160ms ease, background-color 160ms ease;
}

.qd-flavor-select {
	min-height: 48px;
	padding: 0 38px 0 13px;
	background-image: linear-gradient(45deg, transparent 50%, var(--qd-green) 50%), linear-gradient(135deg, var(--qd-green) 50%, transparent 50%);
	background-position: calc(100% - 17px) 20px, calc(100% - 12px) 20px;
	background-size: 5px 5px, 5px 5px;
	background-repeat: no-repeat;
	appearance: none;
}

.qd-flavor-select:hover,
.qd-observation:hover {
	border-color: #75a785;
}

.qd-flavor-select:focus,
.qd-observation:focus {
	border-color: var(--qd-green);
	box-shadow: 0 0 0 3px rgba(36, 115, 63, 0.12);
}

.qd-flavor-select[aria-invalid="true"] {
	border-color: #c64138;
	background-color: #fff8f7;
}

.qd-flavor-description {
	margin: 0;
	color: var(--qd-muted);
	font-size: 0.8rem;
	font-weight: 600;
	line-height: 1.38;
}

.qd-modifier-list {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 10px;
	margin-top: 16px;
}

.qd-option > span {
	display: flex;
	align-items: center;
	flex: 1;
	min-height: 54px;
	padding: 12px 76px 12px 43px;
	border: 1px solid var(--qd-line);
	border-radius: 12px;
	background: #fff;
	transition: border-color 160ms ease, background-color 160ms ease, box-shadow 160ms ease;
}

.qd-option > span::before {
	position: absolute;
	left: 15px;
	width: 17px;
	height: 17px;
	border: 2px solid #a7b8ac;
	border-radius: 50%;
	background: #fff;
	content: "";
	transition: border-color 160ms ease, box-shadow 160ms ease;
}

.qd-extra-list .qd-option > span::before {
	border-radius: 5px;
}

.qd-option strong {
	position: absolute;
	right: 13px;
	font-size: 0.78rem;
	font-weight: 750;
	white-space: nowrap;
	color: var(--qd-green-dark);
}

.qd-option:hover > span {
	border-color: #8bb89b;
}

.qd-option input:checked + span {
	border-color: var(--qd-green);
	background: var(--qd-green-soft);
	box-shadow: 0 5px 13px rgba(36, 115, 63, 0.09);
}

.qd-option input:checked + span::before {
	border-color: var(--qd-green);
	box-shadow: inset 0 0 0 3px var(--qd-green-soft), inset 0 0 0 8px var(--qd-green);
}

.qd-extra-list .qd-option input:checked + span::before {
	box-shadow: inset 0 0 0 3px var(--qd-green-soft), inset 0 0 0 8px var(--qd-green);
}

.qd-observation {
	display: block;
	min-height: 92px;
	margin-top: 16px;
	padding: 12px 13px;
	resize: vertical;
}

.qd-builder-summary {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 18px;
	margin-top: 23px;
	padding: 17px 19px;
	border: 1px solid #b7d8c0;
	border-radius: 14px;
	background: var(--qd-green-soft);
}

.qd-builder-summary span {
	font-size: 0.88rem;
	font-weight: 700;
	color: var(--qd-green-dark);
}

.qd-builder-summary strong {
	font-size: clamp(1.25rem, 3vw, 1.65rem);
	font-weight: 850;
	letter-spacing: -0.03em;
	line-height: 1;
	white-space: nowrap;
	color: var(--qd-green-dark);
}

.qd-summary-help {
	min-height: 1.2em;
	margin: 9px 2px 17px;
	font-size: 0.78rem;
	line-height: 1.45;
	color: var(--qd-muted);
}

.qd-add-to-cart {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	min-height: 54px;
	padding: 13px 22px;
	border: 0;
	border-radius: 12px;
	background: var(--qd-green);
	box-shadow: 0 9px 18px rgba(36, 115, 63, 0.2);
	cursor: pointer;
	color: #fff;
	font: inherit;
	font-size: 1rem;
	font-weight: 800;
	line-height: 1.25;
	transition: background-color 160ms ease, box-shadow 160ms ease, transform 160ms ease, opacity 160ms ease;
}

.qd-add-to-cart:hover:not(:disabled) {
	background: var(--qd-green-dark);
	box-shadow: 0 12px 24px rgba(21, 83, 43, 0.25);
	transform: translateY(-1px);
}

.qd-add-to-cart:disabled {
	cursor: wait;
	opacity: 0.72;
}

.qd-builder-message {
	min-height: 1.25em;
	margin: 12px 2px 0;
	font-size: 0.9rem;
	font-weight: 650;
	line-height: 1.4;
}

.qd-builder-message.is-error {
	color: #b72d25;
}

.qd-builder-message.is-success {
	color: var(--qd-green-dark);
}

.qd-builder-notice {
	margin: 24px 0;
	padding: 14px 16px;
	border-left: 4px solid var(--qd-green);
	border-radius: 8px;
	background: var(--qd-green-soft);
	color: var(--qd-ink);
}

@media (max-width: 780px) {
	.qd-type-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.qd-choice > span {
		min-height: 82px;
	}
}

@media (max-width: 560px) {
	.qd-pizza-builder {
		margin: 18px 0;
		padding: 14px;
		border-radius: 18px;
	}

	.qd-builder-heading {
		margin: 0 0 16px;
		padding: 22px 18px;
		border-radius: 13px;
	}

	.qd-builder-step {
		padding: 19px 0;
	}

	.qd-flavor-slots,
	.qd-modifier-list {
		grid-template-columns: minmax(0, 1fr);
	}

	.qd-builder-summary {
		align-items: flex-start;
		flex-direction: column;
		gap: 7px;
		padding: 15px;
	}

	.qd-option > span {
		min-height: 50px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.qd-pizza-builder *,
	.qd-pizza-builder *::before,
	.qd-pizza-builder *::after {
		transition-duration: 0.01ms !important;
		scroll-behavior: auto !important;
	}
}
