:root {
  --yellow: #FFD23F;
  --yellow-2: #FFB703;
  --orange: #FF6B35;
  --orange-d: #E8551F;
  --orange-soft: #FFEDE4;
  --dark: #2E2E2E;
  --cream: #F7F2E9;
  --green: #B8E986;
  --bg: #FFFCF7;
  --card: #FFFFFF;
  --text: #2E2E2E;
  --muted: #7A746C;
  --line: #EDE6DA;
  --shadow: 0 4px 24px rgba(46, 46, 46, .08);
  --shadow-lg: 0 20px 60px rgba(46, 46, 46, .25);
  --r: 24px;
  --ease: cubic-bezier(.2, .9, .3, 1.15);
  --smooth: cubic-bezier(.25, .8, .25, 1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 90px; }
body {
  margin: 0;
  font-family: "Rubik", system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
body.lock { overflow: hidden; }
img { display: block; max-width: 100%; }
button { font: inherit; cursor: pointer; color: inherit; -webkit-tap-highlight-color: transparent; }
a, .card { -webkit-tap-highlight-color: transparent; }
:focus { outline: none; }
:focus-visible { outline: 3px solid var(--yellow-2); outline-offset: 2px; border-radius: 999px; }
a { color: inherit; text-decoration: none; }
[hidden] { display: none !important; }

.wrap { max-width: 1280px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 768px) { .wrap { padding: 0 32px; } }

.h2 { font-size: 34px; font-weight: 800; margin: 0 0 20px; letter-spacing: -.5px; }
@media (max-width: 640px) { .h2 { font-size: 24px; margin-bottom: 14px; } }

/* ---------- кнопки ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 0; border-radius: 999px; padding: 12px 24px;
  font-weight: 600; font-size: 16px; line-height: 1.2;
  transition: background .2s, transform .15s, box-shadow .2s;
}
.btn:active { transform: scale(.97); }
.btn--primary { background: var(--orange); color: #fff; }
.btn--primary:disabled { background: #d9d3c9; cursor: not-allowed; }
.btn--soft { background: var(--orange-soft); color: var(--orange-d); }
.btn--ghost { background: transparent; color: var(--muted); padding: 12px 8px; }
.btn--wide { width: 100%; padding: 16px 24px; font-size: 17px; }

/* ---------- шапка ---------- */
.top { padding: 18px 0 8px; }
.top__row { display: flex; align-items: center; gap: 24px; }
.top__logo img { height: 64px; width: auto; }
.top__title { font-weight: 800; font-size: 20px; }
.top__sub { color: var(--muted); font-size: 14px; margin-top: 4px; display: flex; align-items: center; gap: 6px; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: #3BC46A; box-shadow: 0 0 0 4px rgba(59, 196, 106, .18); animation: pulse 2s infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 7px rgba(59, 196, 106, 0); } }
@media (max-width: 640px) { .top__logo img { height: 46px; } .top__title { font-size: 16px; } .top__sub { font-size: 12px; } }

/* ---------- липкое меню ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 252, 247, .92);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  transition: box-shadow .25s;
}
.nav.is-stuck { box-shadow: 0 6px 20px rgba(46, 46, 46, .07); }
.nav__row { display: flex; align-items: center; gap: 16px; height: 72px; }
.nav__logo { width: 0; opacity: 0; overflow: hidden; transition: width .35s var(--ease), opacity .25s; flex-shrink: 0; }
.nav__logo img { height: 40px; width: auto; max-width: none; }
.nav.is-stuck .nav__logo { width: 60px; opacity: 1; }
.nav__cats {
  position: relative; list-style: none; margin: 0; padding: 0; display: flex; gap: 4px;
  overflow-x: auto; scrollbar-width: none; flex: 1; min-width: 0;
}
.nav__cats::-webkit-scrollbar { display: none; }
.nav__cats a {
  display: block; white-space: nowrap; padding: 10px 16px; border-radius: 999px;
  font-weight: 500; font-size: 15px; transition: color .2s, background .2s;
}
.nav__cats a.is-active { background: var(--yellow); color: var(--dark); }

.cart-btn {
  flex-shrink: 0; display: flex; align-items: center; gap: 10px;
  background: var(--orange); color: #fff; border: 0; border-radius: 999px;
  padding: 12px 22px; font-weight: 600; font-size: 16px;
  transition: background .2s, transform .2s;
  position: relative; overflow: hidden;
}
.cart-btn__sep { width: 1px; height: 22px; background: rgba(255, 255, 255, .4); }
.cart-btn__sum { display: none; }
.cart-btn__arrow { display: none; }
.cart-btn.bump { animation: bump .45s var(--ease); }
@keyframes bump { 30% { transform: scale(1.12); } 60% { transform: scale(.95); } }
@media (max-width: 640px) {
  .nav { backdrop-filter: none; -webkit-backdrop-filter: none; background: var(--bg); }
  .nav__row { height: 60px; gap: 8px; }
  .nav__cats a { padding: 8px 12px; font-size: 14px; }
  .cart-btn {
    position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 60;
    justify-content: center; padding: 16px; box-shadow: 0 10px 30px rgba(255, 107, 53, .45);
    transform: translateY(140%);
  }
  .cart-btn.has-items { transform: none; }
  .cart-btn.bump { animation: bump-m .45s var(--ease); }
  .cart-btn__label::after { content: " · "; }
  .cart-btn__sep, .cart-btn__count { display: none; }
  .cart-btn__sum { display: inline; }
  .nav.is-stuck .nav__logo { width: 0; opacity: 0; }
  body { padding-bottom: 80px; }
}
@keyframes bump-m { 30% { transform: scale(1.04); } }

/* ---------- истории ---------- */
.stories { display: flex; gap: 14px; overflow-x: auto; padding: 16px 0 8px; scrollbar-width: none; }
.stories::-webkit-scrollbar { display: none; }
.story {
  flex: 0 0 auto; width: 132px; height: 168px; border-radius: 18px; padding: 3px;
  background: linear-gradient(135deg, var(--yellow), var(--orange));
  border: 0; transition: transform .3s var(--ease);
}
.story.is-seen { background: var(--line); }
.story__in {
  position: relative; display: block; width: 100%; height: 100%; border-radius: 15px; overflow: hidden;
  border: 3px solid var(--bg); background: var(--dark);
}
.story__in img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s; }
.story__in span {
  position: absolute; left: 8px; right: 8px; bottom: 8px; color: #fff; font-weight: 700; font-size: 13px; line-height: 1.15;
  text-align: left; text-shadow: 0 1px 6px rgba(0, 0, 0, .6);
}
.story__in::after { content: ""; position: absolute; inset: 40% 0 0; background: linear-gradient(transparent, rgba(0, 0, 0, .6)); }
.story__in span { z-index: 1; }
@media (max-width: 640px) { .story { width: 104px; height: 132px; } }

/* ---------- герой ---------- */
.hero {
  margin: 20px 0 48px; border-radius: 32px; overflow: hidden; position: relative;
  background: var(--dark); color: #fff; display: grid; grid-template-columns: 1fr 1.15fr; min-height: 340px;
}
.hero__text { padding: 48px; display: flex; flex-direction: column; justify-content: center; align-items: flex-start; position: relative; z-index: 1; }
.hero h1 { font-size: 52px; line-height: 1; margin: 0 0 18px; font-weight: 900; text-transform: uppercase; letter-spacing: -1px; }
.hero h1 span { color: var(--yellow); }
.hero p { margin: 0 0 26px; color: rgba(255, 255, 255, .75); max-width: 420px; line-height: 1.5; }
.hero__img { position: relative; overflow: hidden; }
.hero__img img { width: 100%; height: 100%; object-fit: cover; }
.hero__img::before { content: ""; position: absolute; inset: 0; z-index: 1; background: linear-gradient(90deg, var(--dark), transparent 35%); }
@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; }
  .hero__img { order: -1; height: 200px; }
  .hero__img::before { background: linear-gradient(0deg, var(--dark), transparent 50%); }
  .hero__text { padding: 8px 24px 28px; }
  .hero h1 { font-size: 34px; }
}

/* ---------- популярное ---------- */
.popular { margin-bottom: 40px; }
.popular__track {
  display: flex; gap: 14px; overflow-x: auto; padding: 6px 4px 18px; margin: 0 -4px; scrollbar-width: none;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 40px, #000 calc(100% - 40px), transparent);
  mask-image: linear-gradient(90deg, transparent, #000 40px, #000 calc(100% - 40px), transparent);
}
.popular__track::-webkit-scrollbar { display: none; }
.pop {
  flex: 0 0 auto; scroll-snap-align: start; display: flex; align-items: center; gap: 12px;
  width: 250px; padding: 12px 18px 12px 12px; background: var(--card); border-radius: 18px; border: 0; text-align: left;
  box-shadow: var(--shadow); transition: transform .25s var(--ease), box-shadow .25s;
}
.pop img { width: 64px; height: 64px; object-fit: contain; transition: transform .7s var(--smooth); flex-shrink: 0; will-change: transform; }
.pop b { display: block; font-weight: 600; font-size: 15px; }
.pop small { color: var(--muted); font-size: 14px; }

/* ---------- каталог ---------- */
.cat { margin-bottom: 56px; }
.grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 48px 30px; }
@media (max-width: 1100px) { .grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 820px) { .grid { grid-template-columns: repeat(2, 1fr); gap: 32px 18px; } }

.card { display: flex; flex-direction: column; cursor: pointer; position: relative; }
.card__img {
  position: relative; aspect-ratio: 1; display: flex; align-items: center; justify-content: center;
  margin-bottom: 12px;
}
.card__img::before {
  content: ""; position: absolute; inset: 8%; border-radius: 50%;
  background: radial-gradient(circle, #FFF3D1 0%, rgba(255, 243, 209, 0) 70%);
  opacity: 0; transform: scale(.8); transition: opacity .35s, transform .45s var(--ease);
}
.card__img > img {
  position: relative; width: 92%; height: 92%; object-fit: contain;
  filter: drop-shadow(0 10px 18px rgba(80, 40, 0, .16));
  transition: transform .7s var(--smooth);
  will-change: transform; backface-visibility: hidden;
}

/* пицца собирается: основа, падающие ингредиенты, потом настоящее фото */
.pz {
  position: relative; width: 88%; aspect-ratio: 1;
  filter: drop-shadow(0 10px 18px rgba(80, 40, 0, .16));
  transition: transform .7s var(--smooth); will-change: transform;
}
.pz > img, .pz__tops { position: absolute; inset: 0; width: 100%; height: 100%; }
.pz__base { opacity: 0; }
.pz__tops { pointer-events: none; }
.pz__top { position: absolute; height: auto; aspect-ratio: 1; overflow: visible; opacity: 0; transform: translate(-50%, -50%) rotate(var(--r)); }
.pz.is-building .pz__photo { animation: pzPhoto 1.3s ease both; }
.pz.is-building .pz__base { animation: pzBase 1.3s ease both; }
.pz.is-building .pz__top { animation: pzDrop .38s cubic-bezier(.3, .6, .4, 1) var(--d) both, pzOut .3s ease 1s forwards; }
@keyframes pzPhoto { 0% { opacity: 1; } 12% { opacity: 0; } 78% { opacity: 0; } 100% { opacity: 1; } }
@keyframes pzBase { 0% { opacity: 0; transform: scale(.94); } 14% { opacity: 1; transform: scale(1); } 92% { opacity: 1; } 100% { opacity: 0; } }
@keyframes pzDrop {
  0% { opacity: 0; transform: translate(-50%, -50%) translateY(-260%) rotate(calc(var(--r) - 140deg)) scale(1.9); }
  45% { opacity: 1; }
  72% { transform: translate(-50%, -50%) translateY(6%) rotate(var(--r)) scale(.9); }
  100% { opacity: 1; transform: translate(-50%, -50%) rotate(var(--r)) scale(1); }
}
@keyframes pzOut { to { opacity: 0; } }
.stage__img .pz { width: 100%; filter: none; }
/* как в додо: пицца чуть съезжает и проворачивается при наведении */
.card__img .tile { width: 92%; height: auto; aspect-ratio: 4/3; object-fit: cover; border-radius: 20px; }
.badge {
  position: absolute; top: 4px; left: 4px; z-index: 1; background: var(--yellow); color: var(--dark);
  font-size: 12px; font-weight: 800; padding: 5px 10px; border-radius: 999px; text-transform: uppercase; letter-spacing: .5px;
}
.card__name { font-size: 20px; font-weight: 600; margin: 0 0 8px; display: flex; align-items: center; gap: 6px; }
.tag { font-size: 15px; }
.card__desc { color: var(--muted); font-size: 14px; line-height: 1.45; margin: 0 0 16px; flex: 1; }
.card__foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.card__price { font-weight: 700; font-size: 18px; white-space: nowrap; }
.card__weight { color: var(--muted); font-weight: 400; font-size: 13px; margin-left: 4px; }
.card__qty { display: none; }

@media (max-width: 560px) {
  .grid { grid-template-columns: 1fr; gap: 0; }
  .card { display: grid; grid-template-columns: 124px 1fr; gap: 0 14px; padding: 14px 0; border-bottom: 1px solid var(--line); }
  .card__img { grid-row: span 3; margin: 0; align-self: start; }
  .card__name { font-size: 17px; margin: 4px 0 6px; }
  .card__desc { font-size: 13px; margin-bottom: 10px; }
  .card__foot .btn { padding: 8px 16px; font-size: 14px; }
  .badge { font-size: 10px; padding: 3px 7px; }
}

/* ---------- плюсы ---------- */
.perks { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin: 0 0 56px; }
.perk { background: var(--cream); border-radius: var(--r); padding: 24px; display: flex; flex-direction: column; gap: 6px; }
.perk__ico { font-size: 28px; margin-bottom: 6px; color: var(--orange); }
.perk span:last-child { color: var(--muted); font-size: 14px; }
@media (max-width: 820px) { .perks { grid-template-columns: repeat(2, 1fr); } }

.foot { background: var(--dark); color: rgba(255, 255, 255, .7); padding: 32px 0; }
.foot__row { display: flex; align-items: center; gap: 24px; }
.foot__logo { height: 56px; width: auto; filter: brightness(0) invert(1) sepia(1) saturate(6) hue-rotate(5deg); }
.foot p { margin: 0; line-height: 1.6; }
.foot__row { flex-wrap: wrap; }
.foot__credits { flex-basis: 100%; opacity: .6; }
.foot__credits a { text-decoration: underline; }

/* ---------- оверлеи ---------- */
.overlay {
  position: fixed; inset: 0; z-index: 100; background: rgba(20, 16, 10, .6);
  display: flex; align-items: center; justify-content: center; padding: 24px;
  animation: fadeIn .25s ease;
}
.overlay.is-closing { animation: fadeOut .22s ease forwards; }
@keyframes fadeIn { from { opacity: 0; } }
@keyframes fadeOut { to { opacity: 0; } }

.close {
  position: absolute; top: 14px; right: 14px; z-index: 3; width: 40px; height: 40px; border-radius: 50%;
  border: 0; background: transparent; font-size: 34px; line-height: 1; color: var(--dark);
  transition: transform .3s var(--ease);
}
.close--out { top: 18px; right: auto; left: -56px; color: #fff; font-size: 44px; }
.close--light { color: #fff; top: 22px; }

/* ---------- модалка товара ---------- */
.pmodal {
  position: relative; background: var(--card); border-radius: 30px; width: min(940px, 100%); height: min(610px, calc(100vh - 48px));
  display: grid; grid-template-columns: 1.1fr 1fr; overflow: hidden; box-shadow: var(--shadow-lg);
  animation: popIn .4s var(--ease);
}
.overlay.is-closing .pmodal { animation: popOut .22s ease forwards; }
@keyframes popIn { from { opacity: 0; transform: scale(.88) translateY(20px); } }
@keyframes popOut { to { opacity: 0; transform: scale(.94) translateY(10px); } }

.pmodal__stage { position: relative; display: flex; align-items: center; justify-content: center; padding: 30px; background: #fff; }
.stage { position: relative; width: 100%; max-width: 380px; aspect-ratio: 1; }
/* пунктирные круги размеров, как в додо */
.stage__ring {
  position: absolute; top: 50%; left: 50%; border-radius: 50%; border: 2px dashed #E3DCCF;
  transform: translate(-50%, -50%); transition: opacity .3s;
}
.stage__ring--l { width: 100%; height: 100%; }
.stage__ring--m { width: 86%; height: 86%; border-color: #EAE4D9; }
.stage__img {
  position: absolute; top: 50%; left: 50%; width: 100%; aspect-ratio: 1;
  transform: translate(-50%, -50%) scale(var(--s, 1)) rotate(var(--rot, 0deg));
  transition: transform .7s var(--smooth);
  will-change: transform; backface-visibility: hidden;
  filter: drop-shadow(0 14px 26px rgba(80, 40, 0, .2));
}
.stage[data-size="0"] .stage__img { --s: .72; }
.stage[data-size="1"] .stage__img { --s: .86; }
.stage[data-size="2"] .stage__img { --s: 1; }
.stage[data-size="2"] .stage__ring--m { opacity: 0; }
.stage--plain .stage__img { width: 86%; aspect-ratio: auto; }
.stage--plain .stage__img.tile { border-radius: 24px; filter: none; box-shadow: var(--shadow); }
.stage__crust {
  position: absolute; top: 50%; left: 50%; width: 100%; aspect-ratio: 1; border-radius: 50%;
  transform: translate(-50%, -50%) scale(calc(var(--s, 1) * 1.02));
  box-shadow: inset 0 0 0 0 rgba(255, 210, 63, 0);
  transition: transform .7s var(--smooth), box-shadow .4s;
  pointer-events: none;
}
.stage.has-crust .stage__crust { box-shadow: inset 0 0 0 14px rgba(255, 196, 30, .55), 0 0 0 4px rgba(255, 210, 63, .5); }
.stage[data-size="0"] .stage__crust { --s: .72; }
.stage[data-size="1"] .stage__crust { --s: .86; }

.pmodal__body { background: #FBF8F3; display: flex; flex-direction: column; min-height: 0; }
.pmodal__scroll { flex: 1; overflow-y: auto; padding: 36px 30px 16px; }
.pmodal h3 { font-size: 26px; font-weight: 700; margin: 0 40px 6px 0; }
.pmodal__meta { color: var(--muted); font-size: 14px; margin-bottom: 8px; }
.pmodal__desc { margin: 0 0 18px; font-size: 15px; line-height: 1.5; }
.pmodal__body > .btn { margin: 0 30px 30px; width: auto; }

.seg {
  position: relative; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr;
  background: #EEE9E0; border-radius: 999px; padding: 3px; margin-bottom: 8px;
}
.seg__pill {
  position: absolute; top: 3px; bottom: 3px; left: 3px; border-radius: 999px; background: #fff;
  box-shadow: 0 3px 10px rgba(46, 46, 46, .12); transition: transform .35s var(--ease), width .35s var(--ease);
}
.seg button {
  position: relative; z-index: 1; border: 0; background: transparent; padding: 9px 6px; border-radius: 999px;
  font-size: 14px; font-weight: 500; color: var(--muted); transition: color .2s;
}
.seg button[aria-pressed="true"] { color: var(--dark); font-weight: 600; }
.seg button:disabled { color: #B9B2A6; cursor: not-allowed; }

.addon {
  display: flex; align-items: center; gap: 14px; width: 100%; margin-top: 18px; padding: 12px 14px;
  background: #fff; border: 2px solid transparent; border-radius: 18px; text-align: left;
  box-shadow: 0 2px 12px rgba(46, 46, 46, .06); transition: border-color .2s, transform .2s;
}
.addon img { width: 56px; height: 56px; }
.addon b { display: block; font-weight: 600; font-size: 15px; }
.addon small { color: var(--muted); }
.addon__check {
  margin-left: auto; width: 24px; height: 24px; border-radius: 50%; border: 2px solid #DCD5C9; flex-shrink: 0;
  display: grid; place-items: center; transition: background .2s, border-color .2s, transform .3s var(--ease);
}
.addon.is-on { border-color: var(--orange); }
.addon.is-on .addon__check { background: var(--orange); border-color: var(--orange); transform: scale(1.1); }
.addon.is-on .addon__check::after { content: ""; width: 10px; height: 5px; border: solid #fff; border-width: 0 0 2.5px 2.5px; transform: rotate(-45deg) translate(1px, -1px); }
.label { font-size: 13px; color: var(--muted); margin: 14px 0 8px; }

@media (max-width: 760px) {
  .overlay { padding: 0; align-items: flex-end; }
  .pmodal {
    grid-template-columns: 1fr; grid-template-rows: auto 1fr; height: auto; max-height: 94vh; border-radius: 26px 26px 0 0;
    animation: sheetIn .4s var(--ease);
  }
  .overlay.is-closing .pmodal { animation: sheetOut .22s ease forwards; }
  .pmodal__stage { padding: 20px 20px 0; }
  .stage { max-width: 260px; }
  .pmodal__body { background: #fff; overflow: hidden; }
  .pmodal__scroll { padding: 14px 20px 10px; }
  .pmodal__body > .btn { margin: 0 20px 20px; }
}
@keyframes sheetIn { from { transform: translateY(100%); } }
@keyframes sheetOut { to { transform: translateY(100%); } }

/* ---------- корзина ---------- */
.overlay--side { justify-content: flex-end; padding: 0; align-items: stretch; }
.drawer {
  position: relative; width: min(460px, 100%); background: #F4F1EC; height: 100%;
  animation: slideIn .4s cubic-bezier(.2, .8, .2, 1);
}
.overlay.is-closing .drawer { animation: slideOut .25s ease forwards; }
@keyframes slideIn { from { transform: translateX(100%); } }
@keyframes slideOut { to { transform: translateX(100%); } }
.drawer__view { height: 100%; display: flex; flex-direction: column; }
.drawer__head { padding: 28px 24px 12px; font-size: 22px; font-weight: 700; display: flex; align-items: center; gap: 10px; }
.drawer__head .back { border: 0; background: #fff; width: 36px; height: 36px; border-radius: 50%; font-size: 20px; }
.drawer__list { flex: 1; overflow-y: auto; padding: 8px 16px; }
.drawer__foot { background: #fff; padding: 20px 24px 24px; box-shadow: 0 -6px 20px rgba(46, 46, 46, .06); }
.drawer__row { display: flex; justify-content: space-between; margin-bottom: 8px; color: var(--muted); font-size: 15px; }
.drawer__row--total { color: var(--text); font-weight: 700; font-size: 20px; margin: 12px 0 18px; }
@media (max-width: 560px) { .close--out { left: auto; right: 10px; top: 18px; color: var(--dark); } }

.line {
  display: grid; grid-template-columns: 72px 1fr; gap: 6px 14px; background: #fff; border-radius: 18px; padding: 14px;
  margin-bottom: 10px; animation: lineIn .35s var(--ease);
}
.line.is-removing { animation: lineOut .3s ease forwards; }
@keyframes lineIn { from { opacity: 0; transform: translateX(30px); } }
@keyframes lineOut { to { opacity: 0; transform: translateX(60px); height: 0; padding: 0; margin: 0; } }
.line img { width: 72px; height: 72px; object-fit: contain; grid-row: span 2; }
.line img.tile { object-fit: cover; border-radius: 12px; }
.line__name { font-weight: 600; font-size: 15px; }
.line__opts { color: var(--muted); font-size: 13px; margin-top: 3px; }
.line__foot { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; border-top: 1px solid var(--line); padding-top: 10px; margin-top: 6px; }
.line__price { font-weight: 700; }
.qty { display: flex; align-items: center; background: #F3EFE8; border-radius: 999px; }
.qty button { border: 0; background: transparent; width: 32px; height: 32px; border-radius: 50%; font-size: 18px; color: var(--orange); font-weight: 600; }
.qty span { min-width: 22px; text-align: center; font-weight: 600; font-size: 15px; }

.empty { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 24px; }
.empty img { width: 180px; margin-bottom: 18px; animation: float 3s ease-in-out infinite; }
.empty h3 { font-size: 24px; margin: 0 0 8px; }
.empty p { color: var(--muted); margin: 0 0 24px; }
@keyframes float { 50% { transform: translateY(-10px) rotate(8deg); } }

/* форма */
.form { padding: 4px 24px 16px; flex: 1; overflow-y: auto; }
.field { display: block; margin-bottom: 12px; }
.field span { display: block; font-size: 13px; color: var(--muted); margin: 0 0 6px 4px; }
.field input, .field textarea {
  width: 100%; border: 2px solid transparent; background: #fff; border-radius: 14px; padding: 13px 14px;
  font: inherit; font-size: 16px; outline: none; transition: border-color .2s;
}
.field textarea { resize: vertical; min-height: 70px; }
.field input:focus, .field textarea:focus { border-color: var(--yellow-2); }
.field.is-error input { border-color: #E5484D; }
.form .seg { margin-bottom: 14px; }
.form__err { color: #E5484D; font-size: 14px; margin: 4px 0 0; min-height: 18px; }

.done { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 32px; }
.done__icon { font-size: 90px; animation: dropIn .8s var(--ease); }
@keyframes dropIn { from { transform: translateY(-60px) scale(.4); opacity: 0; } }
.done h3 { font-size: 28px; margin: 12px 0 8px; }
.done p { color: var(--muted); margin: 0 0 24px; line-height: 1.5; }

/* ---------- полёт в корзину ---------- */
.fly {
  position: fixed; z-index: 300; pointer-events: none; border-radius: 50%;
  transition: transform .75s cubic-bezier(.5, -0.3, .7, .4), opacity .75s ease-in;
}

/* ---------- тосты ---------- */
.toasts { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 400; display: flex; flex-direction: column; gap: 8px; align-items: center; }
.toast {
  background: var(--dark); color: #fff; padding: 12px 20px; border-radius: 14px; font-size: 15px; box-shadow: var(--shadow-lg);
  animation: toastIn .35s var(--ease); white-space: nowrap;
}
.toast.is-out { animation: toastOut .3s ease forwards; }
@keyframes toastIn { from { opacity: 0; transform: translateY(20px) scale(.9); } }
@keyframes toastOut { to { opacity: 0; transform: translateY(10px); } }
@media (max-width: 640px) { .toasts { bottom: 90px; } }

/* ---------- просмотр историй ---------- */
.story-view { position: fixed; inset: 0; z-index: 200; background: rgba(10, 8, 5, .92); display: flex; align-items: center; justify-content: center; animation: fadeIn .25s; }
.story-view__box { position: relative; width: min(420px, 100vw); height: min(740px, 100vh); height: min(740px, 100dvh); border-radius: 20px; overflow: hidden; background: var(--dark); }
@media (max-width: 480px) { .story-view__box { border-radius: 0; } }
.story-view__bars { position: absolute; top: 12px; left: 12px; right: 12px; z-index: 3; display: flex; gap: 4px; }
.story-view__bars i { flex: 1; height: 3px; border-radius: 2px; background: rgba(255, 255, 255, .35); overflow: hidden; }
.story-view__bars i b { display: block; height: 100%; width: 0; background: #fff; }
.story-view__bars i.is-done b { width: 100%; }
.story-view__bars i.is-run b { animation: bar 5s linear forwards; }
@keyframes bar { to { width: 100%; } }
.story-view__slide { position: absolute; inset: 0; }
.story-view__slide img { width: 100%; height: 100%; object-fit: cover; animation: kenburns 5s ease-out forwards; }
@keyframes kenburns { from { transform: scale(1.15); } to { transform: scale(1); } }
.story-view__slide::after { content: ""; position: absolute; inset: 0; background: linear-gradient(transparent 40%, rgba(0, 0, 0, .85)); }
.story-view__txt { position: absolute; left: 24px; right: 24px; bottom: 32px; z-index: 1; color: #fff; animation: txtUp .6s var(--ease) .1s both; }
.story-view__txt h4 { font-size: 34px; line-height: 1.05; margin: 0 0 10px; font-weight: 900; text-transform: uppercase; }
.story-view__txt h4 em { font-style: normal; color: var(--yellow); }
.story-view__txt p { margin: 0 0 18px; opacity: .85; line-height: 1.45; }
@keyframes txtUp { from { opacity: 0; transform: translateY(30px); } }
.story-view__nav { position: absolute; top: 0; bottom: 0; width: 35%; z-index: 2; border: 0; background: transparent; }
.story-view__nav--prev { left: 0; }
.story-view__nav--next { right: 0; width: 65%; }
.story-view__txt { z-index: 4; pointer-events: none; }
.story-view__txt .btn { pointer-events: auto; }


/* наведение — только там, где есть мышь */
@media (hover: hover) {
  .btn--primary:hover { background: var(--orange-d); }
  .btn--soft:hover { background: var(--orange); color: #fff; }
  .nav__cats a:hover { color: var(--orange); }
  .cart-btn:hover { background: var(--orange-d); }
  .story:hover { transform: scale(1.05) rotate(-1.5deg); }
  .story:hover .story__in img { transform: scale(1.12); }
  .pop:hover { transform: translateY(-3px); box-shadow: 0 10px 30px rgba(46, 46, 46, .12); }
  .pop:hover img { transform: rotate(20deg); }
  .card:hover .card__img::before { opacity: 1; transform: scale(1.05); }
  .card--pizza:hover .pz { transform: translateY(4px) rotate(10deg); }
  .card:not(.card--pizza):hover .card__img > img { transform: translateY(4px); }
  .close:hover { transform: rotate(90deg); }
  .addon:hover { transform: translateY(-1px); }
  .qty button:hover { background: var(--orange-soft); }
}

/* ---------- рецепт от AI ---------- */
.ai {
  display: grid; grid-template-columns: 1fr 1.6fr; gap: 32px; align-items: center; margin-bottom: 56px;
  padding: 32px; border-radius: 32px; background: linear-gradient(135deg, #FFF3D1, #FFE1D2);
}
.ai__intro p { color: var(--muted); line-height: 1.5; margin: 0; }
.ai__badge {
  display: inline-block; margin-bottom: 12px; padding: 5px 12px; border-radius: 999px;
  background: var(--dark); color: var(--yellow); font-size: 13px; font-weight: 700; letter-spacing: .5px;
}
.ai__box { background: var(--card); border-radius: 24px; box-shadow: var(--shadow); padding: 16px; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.ai__chat { height: 420px; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; padding: 4px; overscroll-behavior: contain; }
.msg { max-width: 88%; padding: 10px 14px; border-radius: 18px; line-height: 1.45; font-size: 15px; animation: msgIn .35s var(--ease) both; }
.msg p { margin: 0 0 6px; } .msg p:last-child { margin: 0; }
.msg--bot { align-self: flex-start; background: var(--cream); border-bottom-left-radius: 6px; }
.msg--me { align-self: flex-end; background: var(--orange); color: #fff; border-bottom-right-radius: 6px; }
@keyframes msgIn { from { opacity: 0; transform: translateY(12px) scale(.96); } }
.dots { display: inline-flex; gap: 4px; padding: 4px 2px; }
.dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); animation: dot 1s infinite; }
.dots i:nth-child(2) { animation-delay: .15s; } .dots i:nth-child(3) { animation-delay: .3s; }
@keyframes dot { 30% { transform: translateY(-5px); opacity: .5; } }
.recipe { display: flex; gap: 14px; align-items: center; margin-top: 8px; background: #fff; border-radius: 16px; padding: 12px; }
.recipe .pz { width: 150px; flex-shrink: 0; }
.recipe__txt { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.recipe__txt small { color: var(--orange-d); font-weight: 700; font-size: 12px; text-transform: uppercase; letter-spacing: .5px; }
.recipe__txt b { font-size: 18px; line-height: 1.25; }
.recipe__txt span { color: var(--muted); font-size: 14px; }
.recipe__btns { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.recipe__btns .btn { padding: 10px 16px; font-size: 14px; }
/* подсказки — одна лента: крутится колесом мыши, перетаскиванием или пальцем */
.ai__chips {
  display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; overscroll-behavior-x: contain;
  margin: 0 -16px; padding: 2px 16px; cursor: grab; user-select: none; -webkit-user-select: none;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 16px, #000 calc(100% - 28px), transparent);
  mask-image: linear-gradient(90deg, transparent, #000 16px, #000 calc(100% - 28px), transparent);
}
.ai__chips.is-drag { cursor: grabbing; }
.ai__chips.is-drag .chip { pointer-events: none; }
@media (max-width: 900px) { .ai__chips { margin: 0 -12px; padding: 2px 12px; } }
.ai__chips::-webkit-scrollbar { display: none; }
.chip {
  flex: 0 0 auto; border: 1.5px solid var(--line); background: #fff; border-radius: 999px; padding: 8px 14px; font-size: 14px;
  transition: border-color .2s, background .2s, transform .15s; animation: msgIn .35s var(--ease) both;
}
.chip:active { transform: scale(.95); }
.chip[data-taste="again"] { background: var(--orange-soft); border-color: transparent; color: var(--orange-d); font-weight: 600; }
.ai__form { display: flex; gap: 8px; }
.ai__form input {
  flex: 1; min-width: 0; border: 1.5px solid var(--line); border-radius: 999px; padding: 12px 18px; font: inherit; font-size: 16px; background: var(--bg);
}
.ai__form input:focus { border-color: var(--orange); outline: none; }
.ai__form button { width: 48px; height: 48px; flex-shrink: 0; border: 0; border-radius: 50%; background: var(--orange); color: #fff; display: grid; place-items: center; }
/* у пиццы от AI нет фото: основа и начинка видны всегда */
.pz--ai .pz__base, .pz--ai .pz__top { opacity: 1; }
.pz--ai.is-building .pz__base { animation: pzBaseIn .3s ease both; }
.pz--ai.is-building .pz__top { animation: pzDrop .38s cubic-bezier(.3, .6, .4, 1) var(--d) both; }
@keyframes pzBaseIn { from { opacity: 0; transform: scale(.94); } }
@media (max-width: 900px) {
  .ai { grid-template-columns: 1fr; padding: 20px 14px; gap: 16px; border-radius: 24px; }
  .ai__box { padding: 12px; }
  .ai__chat { height: 380px; }
  .recipe { flex-direction: column; align-items: stretch; text-align: center; }
  .recipe .pz { width: 160px; align-self: center; }
  .recipe__btns { justify-content: center; }
  .msg { max-width: 94%; }
}
@media (hover: hover) {
  .chip:hover { border-color: var(--orange); background: var(--orange-soft); }
  .ai__form button:hover { background: var(--orange-d); }
}
