.rbb-builder {
	--rbb-green: #5b8e28;
	--rbb-green-dark: #3f6f17;
	--rbb-red: #e52b2f;
	--rbb-ink: #2d2a28;
	--rbb-border: #e9e4dc;
	--rbb-soft: #fbfaf7;
	margin: 32px auto;
	max-width: 1440px;
	color: var(--rbb-ink);
	font-family: inherit;
}

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

.rbb-builder__header {
	margin-bottom: 20px;
	text-align: center;
}

.rbb-builder__header h2 {
	margin: 0;
	font-size: clamp(28px, 3vw, 44px);
	color: var(--rbb-green-dark);
}

.rbb-eyebrow {
	margin: 0 0 6px;
	font-size: 14px;
}

.rbb-builder__grid {
	display: grid;
	grid-template-columns: 1.05fr 1.25fr 1.35fr 1.45fr 1.15fr 1.15fr;
	align-items: stretch;
	gap: 8px;
}

.rbb-step,
.rbb-summary {
	min-width: 0;
	margin: 0;
	padding: 14px 12px;
	border: 1px solid var(--rbb-border);
	border-radius: 14px;
	background: #fff;
	box-shadow: 0 8px 28px rgba(67, 48, 25, .06);
}

.rbb-step legend {
	display: flex;
	align-items: center;
	gap: 7px;
	max-width: 100%;
	padding: 0 4px;
	font-size: 12px;
	font-weight: 800;
	text-transform: uppercase;
	letter-spacing: .02em;
}

.rbb-step legend span {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 22px;
	height: 22px;
	border-radius: 50%;
	background: var(--rbb-green);
	color: #fff;
	font-size: 12px;
}

.rbb-step__limit {
	min-height: 30px;
	margin: 6px 0;
	font-size: 12px;
	line-height: 1.35;
	color: #777;
}

.rbb-options {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 7px;
}

.rbb-options--sizes {
	grid-template-columns: repeat(3, minmax(0, 1fr));
}

.rbb-step[data-rbb-group="toppings"] .rbb-options {
	grid-template-columns: repeat(4, minmax(0, 1fr));
}

.rbb-option {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 4px;
	min-width: 0;
	padding: 7px 3px;
	border: 1px solid transparent;
	border-radius: 11px;
	cursor: pointer;
	touch-action: manipulation;
	text-align: center;
	transition: border-color .18s ease, background-color .18s ease, opacity .18s ease, transform .18s ease;
}

.rbb-option:hover {
	transform: translateY(-1px);
	background: var(--rbb-soft);
}

.rbb-option:has(input:checked) {
	border-color: var(--rbb-green);
	background: #f5faef;
}

.rbb-option:has(input:focus-visible) {
	outline: 3px solid rgba(91, 142, 40, .3);
	outline-offset: 2px;
}

.rbb-option.is-disabled {
	opacity: .35;
	cursor: not-allowed;
}

.rbb-option input {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	opacity: 0;
}

.rbb-option__visual {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 58px;
	height: 58px;
	border-radius: 50%;
	background: #fff;
	overflow: hidden;
}

.rbb-option__visual img {
	width: 100%;
	height: 100%;
	object-fit: contain;
}

.rbb-placeholder {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
	border-radius: inherit;
	background: linear-gradient(145deg, #fff6ef, #f1ded2);
	color: #7e4933;
	font-size: 23px;
	font-weight: 800;
}

.rbb-placeholder--box {
	border-radius: 10px;
	background: linear-gradient(145deg, #edd2b2, #c59257);
	color: #fff;
}

.rbb-option strong {
	max-width: 100%;
	font-size: 12px;
	line-height: 1.2;
	word-wrap: break-word;
}

.rbb-option small {
	font-size: 11px;
	color: #777;
}

.rbb-step--message textarea {
	width: 100%;
	min-height: 150px;
	padding: 12px;
	border: 1px solid var(--rbb-border);
	border-radius: 10px;
	resize: vertical;
	font: inherit;
}

.rbb-message-counter {
	display: block;
	margin-top: 5px;
	font-size: 12px;
	color: #777;
}

.rbb-summary {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	background: linear-gradient(150deg, #f63d40, var(--rbb-red));
	color: #fff;
	text-align: center;
}

.rbb-summary__image {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 110px;
	height: 90px;
	margin-bottom: 8px;
	font-size: 36px;
	font-weight: 800;
}

.rbb-summary__image img {
	max-width: 100%;
	max-height: 100%;
	object-fit: contain;
}

.rbb-summary p {
	margin: 5px 0;
}

.rbb-summary__price {
	display: block;
	margin: 5px 0;
	font-size: 25px;
	font-variant-numeric: tabular-nums;
}

.rbb-summary__status {
	min-height: 34px;
	font-size: 12px;
	line-height: 1.35;
}

.rbb-summary__status.is-ready {
	font-weight: 700;
}

.rbb-builder .rbb-add-to-cart {
	width: 100%;
	min-height: 46px;
	padding: 10px 12px;
	border: 0;
	border-radius: 9px;
	background: #fff;
	color: var(--rbb-red);
	font-weight: 800;
	cursor: pointer;
	touch-action: manipulation;
}

.rbb-builder .rbb-add-to-cart:focus-visible {
	outline: 3px solid rgba(255, 255, 255, .85);
	outline-offset: 3px;
}

.rbb-builder .rbb-add-to-cart:disabled {
	opacity: .55;
	cursor: not-allowed;
}

.rbb-builder .rbb-add-to-cart.is-loading {
	filter: saturate(.5);
}

.rbb-builder .rbb-add-to-cart.is-loading::before {
	display: inline-block;
	width: 14px;
	height: 14px;
	margin-right: 7px;
	border: 2px solid currentColor;
	border-right-color: transparent;
	border-radius: 50%;
	content: "";
	vertical-align: -2px;
	animation: rbb-spin .7s linear infinite;
}

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

@media (max-width: 1180px) {
	.rbb-builder__grid {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}

@media (max-width: 900px) {
	.rbb-step[data-rbb-group="toppings"] .rbb-options {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 767px) {
	.rbb-builder {
		margin: 22px auto 92px;
	}

	.rbb-builder__grid {
		display: flex;
		flex-direction: column;
		gap: 12px;
	}

	.rbb-step,
	.rbb-summary {
		width: 100%;
	}

	.rbb-options {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}

	.rbb-step[data-rbb-group="toppings"] .rbb-options {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.rbb-summary {
		position: sticky;
		z-index: 20;
		bottom: max(8px, env(safe-area-inset-bottom));
		display: grid;
		grid-template-columns: 1fr auto;
		gap: 4px 12px;
		padding: 11px 14px;
		box-shadow: 0 12px 38px rgba(65, 20, 20, .28);
	}

	.rbb-summary__image,
	.rbb-summary > p:first-of-type {
		display: none;
	}

	.rbb-summary__price {
		grid-column: 1;
		grid-row: 1;
		margin: 0;
		text-align: left;
	}

	.rbb-summary__status {
		grid-column: 1;
		grid-row: 2;
		min-height: 0;
		margin: 0;
		text-align: left;
	}

	.rbb-builder .rbb-add-to-cart {
		grid-column: 2;
		grid-row: 1 / span 2;
		width: auto;
	}
}

@media (max-width: 420px) {
	.rbb-options {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.rbb-options--sizes {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}

@media (prefers-reduced-motion: reduce) {
	.rbb-option {
		transition: none;
	}

	.rbb-builder .rbb-add-to-cart.is-loading::before {
		animation: none;
	}
}
