@font-face {
	font-family: 'Manrope';
	font-style: normal;
	font-weight: 400 800;
	font-display: swap;
	src: url('../fonts/manrope-cyrillic.woff2') format('woff2');
	unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

@font-face {
	font-family: 'Manrope';
	font-style: normal;
	font-weight: 400 800;
	font-display: swap;
	src: url('../fonts/manrope-latin.woff2') format('woff2');
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
	font-family: 'Unbounded';
	font-style: normal;
	font-weight: 500 800;
	font-display: swap;
	src: url('../fonts/unbounded-cyrillic.woff2') format('woff2');
	unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

@font-face {
	font-family: 'Unbounded';
	font-style: normal;
	font-weight: 500 800;
	font-display: swap;
	src: url('../fonts/unbounded-latin.woff2') format('woff2');
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
	--bg: #F3EFE9;
	--card: #FFFFFF;
	--ink: #1E1915;
	--muted: #8C8379;
	--line: #ECE5DC;
	--soft: #F6F2EC;
	--accent: #E4472F;
	--accent-dark: #C9361F;
	--accent-soft: #FDECE7;
	--radius: 1.75rem;
	--radius-sm: 1.125rem;
	--shadow: 0 0.75rem 2rem rgba(70, 45, 20, 0.06);
	--ff-head: 'Unbounded', sans-serif;
	--ff: 'Manrope', sans-serif;
	--fs-body: 1rem;
	--lh-text: 1.4;
}

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

html {
	font-size: min(1vw, 1.72vh);
	scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
}

body {
	display: flex;
	flex-direction: column;
	min-height: 100vh;
	margin: 0;
	background: var(--bg);
	color: var(--ink);
	font-family: var(--ff);
	font-size: var(--fs-body);
	line-height: var(--lh-text);
	-webkit-font-smoothing: antialiased;
}

button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
a { color: inherit; text-decoration: none; }
svg { width: 1.25rem; height: 1.25rem; flex-shrink: 0; }
canvas { display: block; }
[hidden] { display: none !important; }

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.container { padding: 0 2rem; }

.header {
	position: sticky;
	top: 0;
	z-index: 20;
	padding: 0.75rem 0;
}

.header__bar {
	display: flex;
	align-items: center;
	gap: 2rem;
	padding: 0.75rem 0.875rem 0.75rem 1.75rem;
	background: var(--card);
	border-radius: 1.5rem;
	box-shadow: var(--shadow);
}

.logo { display: flex; align-items: center; gap: 0.75rem; }

.logo__mark {
	display: flex;
	align-items: center;
	gap: 0.375rem;
	font-family: var(--ff-head);
	font-size: 1.625rem;
	font-weight: 800;
	letter-spacing: -0.02em;
	color: var(--accent);
}

.logo__mark svg { width: 1.625rem; height: 1.625rem; }

.logo__sub {
	max-width: 5.5rem;
	font-size: 0.75rem;
	font-weight: 700;
	line-height: 1.15;
	color: var(--muted);
}

.header__city {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	font-weight: 700;
}

.header__city svg { color: var(--accent); }

.header__nav { display: flex; gap: 2rem; font-weight: 600; }
.header__nav a { transition: color 0.2s; }
.header__nav a:hover { color: var(--accent); }

.header__phone {
	display: flex;
	align-items: center;
	gap: 0.625rem;
	margin-left: auto;
	font-weight: 700;
}

.header__actions { display: flex; gap: 0.625rem; }

.icon-btn {
	display: grid;
	place-items: center;
	width: 3rem;
	height: 3rem;
	border-radius: 50%;
	background: var(--soft);
	transition: background 0.2s;
}

.icon-btn:hover { background: var(--line); }

.cart-btn {
	position: relative;
	display: grid;
	place-items: center;
	width: 3rem;
	height: 3rem;
	border-radius: 50%;
	background: var(--accent);
	color: #fff;
	transition: background 0.2s;
}

.cart-btn:hover { background: var(--accent-dark); }
.cart-btn.is-bump { animation: bump 0.5s cubic-bezier(0.3, 1.6, 0.5, 1); }

.cart-btn__count {
	position: absolute;
	top: -0.25rem;
	right: -0.25rem;
	display: grid;
	place-items: center;
	min-width: 1.375rem;
	height: 1.375rem;
	padding: 0 0.375rem;
	border-radius: 0.75rem;
	background: var(--ink);
	color: #fff;
	font-size: 0.75rem;
	font-weight: 800;
	border: 0.125rem solid var(--bg);
}

main,
.builder,
.builder > .container {
	display: flex;
	flex-direction: column;
	flex: 1;
	min-height: 0;
}

.builder__head {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: 2rem;
	margin: 0.75rem 0 1.25rem;
}

.builder__title {
	margin: 0;
	font-family: var(--ff-head);
	font-size: 2.75rem;
	font-weight: 800;
	line-height: 1.05;
	letter-spacing: -0.035em;
}

.builder__title span { color: var(--accent); }

.builder__lead {
	width: 100%;
	max-width: 36rem;
	margin: 0;
	font-size: 1rem;
	font-weight: 500;
	color: var(--muted);
	text-wrap: pretty;
}

.builder__grid {
	display: grid;
	grid-template-columns: 22.5rem 1fr 21.25rem;
	gap: 1.25rem;
	flex: 1;
	min-height: 34rem;
}

.panel {
	display: flex;
	flex-direction: column;
	min-height: 0;
	padding: 1.375rem;
	background: var(--card);
	border-radius: var(--radius);
	box-shadow: var(--shadow);
}

.panel--left { transition: opacity 0.4s, filter 0.4s; }

.is-locked .panel--left {
	opacity: 0.45;
	filter: saturate(0.5);
	pointer-events: none;
}

.panel__title {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin: 0 0 0.75rem;
	font-family: var(--ff-head);
	font-size: 1.125rem;
	font-weight: 700;
	letter-spacing: -0.01em;
}

.panel__note {
	display: flex;
	align-items: center;
	gap: 0.375rem;
	font-family: var(--ff);
	font-size: 0.8125rem;
	font-weight: 600;
	letter-spacing: 0;
	color: var(--muted);
}

.panel__note svg { width: 1rem; height: 1rem; }

.sauces {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 0.5rem;
	margin-bottom: 1.25rem;
}

.sauce {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 0.25rem;
	padding: 0.625rem 0.375rem 0.5rem;
	border-radius: var(--radius-sm);
	background: var(--soft);
	border: 0.125rem solid transparent;
	transition: background 0.2s, border-color 0.2s, transform 0.2s;
}

.sauce:hover { background: #fff; border-color: var(--line); transform: translateY(-0.125rem); }
.sauce.is-active { background: var(--accent-soft); border-color: var(--accent); transform: none; }

.sauce__swatch { width: 2.5rem; height: 2.5rem; border-radius: 50%; object-fit: cover; box-shadow: 0 0.25rem 0.625rem rgba(70, 30, 10, 0.18); }
.sauce__name { font-size: 0.875rem; font-weight: 700; }
.sauce__price { font-size: 0.75rem; font-weight: 600; color: var(--muted); }

.sauce__check {
	position: absolute;
	top: 0.375rem;
	right: 0.375rem;
	display: grid;
	place-items: center;
	width: 1.25rem;
	height: 1.25rem;
	border-radius: 50%;
	background: var(--accent);
	color: #fff;
	opacity: 0;
	transform: scale(0.4);
	transition: opacity 0.2s, transform 0.25s cubic-bezier(0.3, 1.6, 0.5, 1);
}

.sauce__check svg { width: 0.75rem; height: 0.75rem; stroke-width: 3; }
.sauce.is-active .sauce__check { opacity: 1; transform: none; }

.toppings {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 0.5rem;
}

.topping {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: center;
	padding: 0.5rem 0.25rem 0.5rem;
	border-radius: var(--radius-sm);
	background: var(--soft);
	border: 0.125rem solid transparent;
	cursor: grab;
	touch-action: none;
	user-select: none;
	transition: background 0.2s, border-color 0.2s, transform 0.2s, opacity 0.2s;
}

.topping:hover { background: #fff; border-color: var(--line); transform: translateY(-0.125rem); }
.topping:active { cursor: grabbing; }
.topping.is-max { opacity: 0.5; }
.topping.is-shake { animation: shake 0.4s; }

.topping__icon { width: 3.25rem; height: 3.25rem; object-fit: contain; pointer-events: none; filter: drop-shadow(0 0.125rem 0.25rem rgba(40, 15, 5, 0.25)); }
.topping__name { margin-top: 0.125rem; font-size: 0.8125rem; font-weight: 700; }
.topping__meta { font-size: 0.75rem; font-weight: 600; color: var(--muted); }

.topping__badge {
	position: absolute;
	top: 0.375rem;
	right: 0.375rem;
	display: grid;
	place-items: center;
	min-width: 1.5rem;
	height: 1.5rem;
	padding: 0 0.375rem;
	border-radius: 0.75rem;
	background: var(--accent);
	color: #fff;
	font-size: 0.6875rem;
	font-weight: 800;
	transform: scale(0);
	transition: transform 0.25s cubic-bezier(0.3, 1.6, 0.5, 1);
}

.topping.has-count .topping__badge { transform: scale(1); }

.stage {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	overflow: hidden;
	border-radius: var(--radius);
	background:
		radial-gradient(circle at 50% 46%, #FBF9F5 0, #EEE8DF 62%, #E4DCD0 100%);
	box-shadow: var(--shadow);
	transition: box-shadow 0.3s;
}

.stage::before {
	content: '';
	position: absolute;
	inset: 0;
	z-index: 0;
	background: radial-gradient(circle at 50% 62%, #3B1B0C 0, #1A0B05 55%, #0E0603 100%);
	opacity: 0;
	transition: opacity 0.3s;
}

.stage.is-oven::before { opacity: 1; }

.stage__oven {
	position: absolute;
	left: 50%;
	bottom: -8%;
	z-index: 1;
	width: 92%;
	height: 104%;
	border-radius: 50% 50% 0 0 / 44% 44% 0 0;
	background: radial-gradient(ellipse at 50% 90%, rgba(255, 150, 60, 0.5), rgba(190, 60, 10, 0.26) 40%, rgba(60, 15, 5, 0) 72%);
	box-shadow:
		inset 0 0 0 1.125rem #2A140B,
		inset 0 0 0 1.375rem rgba(255, 120, 50, 0.22),
		inset 0 2rem 5rem rgba(255, 110, 30, 0.22);
	opacity: 0;
	transform: translateX(-50%) scale(1.06);
	transition: opacity 0.3s, transform 0.4s cubic-bezier(0.3, 0.7, 0.2, 1);
}

.stage.is-oven .stage__oven { opacity: 1; transform: translateX(-50%); }

.stage__fire {
	position: absolute;
	top: 6%;
	width: 30%;
	height: 20%;
	border-radius: 50%;
	background: radial-gradient(closest-side, rgba(255, 205, 95, 0.95), rgba(255, 115, 30, 0.6) 50%, rgba(255, 60, 0, 0));
	filter: blur(0.875rem);
	animation: flicker 0.9s ease-in-out infinite alternate;
}

.stage__fire:nth-child(1) { left: 16%; animation-delay: -0.3s; }
.stage__fire:nth-child(2) { left: 35%; top: 3%; width: 32%; animation-duration: 1.2s; }
.stage__fire:nth-child(3) { left: 55%; animation-delay: -0.6s; }

.stage__pizza {
	position: relative;
	z-index: 2;
	opacity: 0;
	transition: opacity 0.5s, transform 0.4s cubic-bezier(0.3, 0.7, 0.2, 1);
}

.stage.is-ready .stage__pizza { opacity: 1; }
.stage.is-oven .stage__pizza { transform: scale(0.88) translateY(5%); }

.stage__fx {
	position: absolute;
	inset: 0;
	z-index: 3;
	pointer-events: none;
}

.stage__top {
	position: absolute;
	top: 1.25rem;
	left: 1.5rem;
	right: 1.25rem;
	z-index: 4;
	display: flex;
	align-items: center;
	justify-content: space-between;
}

.stage__label {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	font-size: 0.875rem;
	font-weight: 700;
	color: var(--muted);
	transition: color 0.3s;
}

.stage.is-oven .stage__label { color: rgba(255, 220, 190, 0.6); }

.size {
	display: flex;
	padding: 0.25rem;
	border-radius: 62.5rem;
	background: rgba(255, 255, 255, 0.8);
	box-shadow: 0 0.25rem 0.75rem rgba(70, 45, 20, 0.06);
}

.size__btn {
	padding: 0.5rem 1rem;
	border-radius: 62.5rem;
	font-size: 0.875rem;
	font-weight: 700;
	color: var(--muted);
	transition: background 0.2s, color 0.2s;
}

.size__btn.is-active { background: var(--ink); color: #fff; }
.is-locked .size { opacity: 0.5; pointer-events: none; }

.stage__timer {
	position: absolute;
	top: 1.25rem;
	left: 50%;
	z-index: 4;
	display: flex;
	align-items: center;
	gap: 0.5rem;
	padding: 0.5rem 1rem;
	border-radius: 62.5rem;
	background: rgba(255, 120, 40, 0.16);
	border: 1px solid rgba(255, 160, 90, 0.4);
	color: #FFD9B8;
	font-family: var(--ff-head);
	font-size: 0.9375rem;
	font-weight: 700;
	opacity: 0;
	transform: translate(-50%, -0.625rem);
	transition: opacity 0.4s, transform 0.4s;
}

.stage.is-oven .stage__timer { opacity: 1; transform: translate(-50%, 0); }

.stage__hint {
	position: absolute;
	bottom: 1.25rem;
	left: 50%;
	z-index: 4;
	margin: 0;
	padding: 0.6875rem 1.25rem;
	border-radius: 62.5rem;
	background: var(--ink);
	color: #fff;
	font-size: 0.875rem;
	font-weight: 600;
	white-space: nowrap;
	transform: translateX(-50%);
}

.stage__hint.is-pop { animation: pop 0.35s cubic-bezier(0.3, 1.6, 0.5, 1); }

.order__kicker {
	font-size: 0.75rem;
	font-weight: 800;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--accent);
}

.order__list {
	flex: 1;
	min-height: 0;
	overflow: auto;
	padding-top: 0.5rem;
	border-top: 1px dashed var(--line);
	scrollbar-width: none;
}

.order__list::-webkit-scrollbar { display: none; }

.order__row,
.order__item {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.625rem;
	padding: 0.3125rem 0;
	font-size: 0.9375rem;
}

.order__row b { font-weight: 700; }
.order__row--muted { color: var(--muted); }

.order__group {
	margin: 0.75rem 0 0.125rem;
	font-size: 0.6875rem;
	font-weight: 800;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--muted);
}

.order__name { flex: 1; font-weight: 600; }
.order__qty { font-size: 0.8125rem; font-weight: 700; color: var(--accent); }
.order__price { font-weight: 700; }

.order__remove {
	display: grid;
	place-items: center;
	width: 1.5rem;
	height: 1.5rem;
	border-radius: 50%;
	background: var(--soft);
	color: var(--muted);
	transition: background 0.2s, color 0.2s;
}

.order__remove:hover { background: var(--accent-soft); color: var(--accent); }
.order__remove svg { width: 0.875rem; height: 0.875rem; }
.is-locked .order__remove { display: none; }

.order__empty { margin: 0.25rem 0; font-size: 0.875rem; color: var(--muted); }

.order__totals {
	margin-top: 0.75rem;
	padding-top: 0.625rem;
	border-top: 1px dashed var(--line);
}

.order__weight { color: var(--muted); }
.order__row--total span { font-weight: 700; }
.order__row--total b { font-family: var(--ff-head); font-size: 1.625rem; font-weight: 700; letter-spacing: -0.02em; }

.order__actions { display: flex; flex-direction: column; gap: 0.625rem; margin-top: 0.875rem; }
.order__minor { display: grid; grid-template-columns: 1fr 1fr; gap: 0.625rem; }

.btn {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 0.625rem;
	height: 3.5rem;
	border-radius: var(--radius-sm);
	font-size: 1rem;
	font-weight: 800;
	transition: background 0.2s, color 0.2s, box-shadow 0.2s, transform 0.2s;
}

.btn--primary {
	background: var(--accent);
	color: #fff;
	box-shadow: 0 0.625rem 1.5rem rgba(228, 71, 47, 0.28);
}

.btn--primary:hover { background: var(--accent-dark); transform: translateY(-0.0625rem); }

.btn--primary:disabled {
	background: #ECE6DE;
	color: #A69D93;
	box-shadow: none;
	cursor: not-allowed;
	transform: none;
}

.btn--ghost { height: 3rem; background: var(--soft); font-size: 0.875rem; font-weight: 700; }
.btn--ghost:hover { background: var(--line); }
.btn--ghost:disabled { opacity: 0.45; cursor: not-allowed; background: var(--soft); }
.btn--ghost svg { width: 1.125rem; height: 1.125rem; }

.info { padding: 1.25rem 0 0.75rem; }
.info__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }

.info__card {
	display: flex;
	align-items: center;
	gap: 0.875rem;
	padding: 0.875rem 1.25rem;
	background: var(--card);
	border-radius: 1.25rem;
	box-shadow: var(--shadow);
}

.info__card b { display: block; font-size: 1.0625rem; font-weight: 800; }
.info__card span { font-size: 0.875rem; color: var(--muted); }

.info__icon {
	display: grid;
	place-items: center;
	width: 2.75rem;
	height: 2.75rem;
	border-radius: 50%;
	background: var(--accent-soft);
	color: var(--accent);
}

.info__card .info__icon { font-size: inherit; }

.ghost {
	position: fixed;
	top: 0;
	left: 0;
	z-index: 60;
	width: 7.5rem;
	height: 7.5rem;
	pointer-events: none;
	opacity: 0;
	filter: drop-shadow(0 0.75rem 1rem rgba(50, 20, 5, 0.3));
	transition: opacity 0.15s;
}

.ghost.is-active { opacity: 1; }

body.is-dragging,
body.is-dragging * { cursor: grabbing !important; user-select: none; }

.flyer {
	position: fixed;
	z-index: 50;
	pointer-events: none;
}

.toast {
	position: fixed;
	left: 50%;
	bottom: 1.75rem;
	z-index: 70;
	display: flex;
	align-items: center;
	gap: 0.625rem;
	padding: 0.875rem 1.375rem;
	border-radius: 62.5rem;
	background: var(--ink);
	color: #fff;
	font-weight: 700;
	box-shadow: 0 1rem 2.5rem rgba(30, 20, 10, 0.25);
	transform: translate(-50%, 180%);
	transition: transform 0.45s cubic-bezier(0.3, 1.4, 0.5, 1);
}

.toast svg { color: #7CD67A; }
.toast.is-visible { transform: translate(-50%, 0); }

@keyframes flicker {
	0% { opacity: 0.65; transform: scale(0.94) translateY(0.25rem); }
	100% { opacity: 1; transform: scale(1.06) translateY(-0.25rem); }
}

@keyframes bump {
	0% { transform: scale(1); }
	40% { transform: scale(1.25); }
	100% { transform: scale(1); }
}

@keyframes shake {
	0%, 100% { transform: translateX(0); }
	25% { transform: translateX(-0.375rem); }
	50% { transform: translateX(0.375rem); }
	75% { transform: translateX(-0.25rem); }
}

@keyframes pop {
	0% { transform: translateX(-50%) scale(0.92); }
	100% { transform: translateX(-50%) scale(1); }
}

.fontlab {
	position: fixed;
	left: 1rem;
	bottom: 1rem;
	z-index: 80;
	width: 100%;
	max-width: 22rem;
	padding: 0.75rem;
	border-radius: 1rem;
	background: rgba(30, 25, 21, 0.92);
	color: #fff;
	box-shadow: 0 1rem 2.5rem rgba(30, 20, 10, 0.25);
}

.fontlab__title {
	display: block;
	width: 100%;
	font-size: 0.75rem;
	font-weight: 800;
	letter-spacing: 0.08em;
	text-align: left;
	text-transform: uppercase;
	color: rgba(255, 255, 255, 0.7);
}

.fontlab__list {
	display: flex;
	flex-wrap: wrap;
	gap: 0.375rem;
	margin-top: 0.5rem;
}

.fontlab.is-closed .fontlab__list { display: none; }

.fontlab__btn {
	padding: 0.375rem 0.625rem;
	border-radius: 62.5rem;
	background: rgba(255, 255, 255, 0.1);
	font-size: 0.75rem;
	font-weight: 700;
	transition: background 0.2s;
}

.fontlab__btn:hover { background: rgba(255, 255, 255, 0.2); }
.fontlab__btn.is-active { background: var(--accent); }
