/* ===================== Торты на заказ ===================== */
.tort { padding-top: calc(var(--header-h) + 24px); overflow-x: clip; }

/* ---------- Первый экран: слева коротко, справа лента тортов ---------- */
.tort-hero { display: grid; grid-template-columns: .9fr 1.1fr; align-items: center; gap: 28px; margin: 0 0 22px; padding: 0 0 0 44px; min-height: 400px; border-radius: 36px; overflow: hidden; border: 1px solid var(--border); background: linear-gradient(120deg, #f6efd9 0%, #e6f0dc 50%, #d6e9d6 100%); position: relative; }
.tort-hero::before { display: none; }
.tort-hero > * { position: relative; z-index: 1; }
.tort-hero__text { padding: 30px 0; }
.tort-hero__eyebrow { display: inline-block; padding: 6px 14px; border-radius: 100px; background: rgba(46,159,107,.14); color: var(--green-dark); font-size: 12.5px; font-weight: 500; letter-spacing: .02em; }
.tort-hero h1 { margin: 0; font-size: clamp(2.1rem, 4.2vw, 3.2rem); line-height: 1.04; font-weight: 600; letter-spacing: -.01em; }
.tort-lead { margin: 0 0 16px; text-align: center; color: var(--green-dark); font-size: clamp(1.05rem, 1.8vw, 1.35rem); line-height: 1.4; font-weight: 500; }
.tort-hero__cta { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin-top: 26px; }
.hcall { display: inline-flex; align-items: center; gap: 12px; padding: 7px 22px 7px 7px; border-radius: 100px; background: #fff; border: 1px solid var(--border); transition: border-color .2s, box-shadow .2s; }
.hcall__ico { flex: 0 0 auto; width: 41px; height: 41px; display: flex; align-items: center; justify-content: center; border-radius: 50%; background: rgba(46,159,107,.14); color: var(--green-dark); font-size: 18px; }
.hcall__ico i { display: flex; }
.hcall__txt { display: flex; flex-direction: column; gap: 1px; text-align: left; }
.hcall__txt b { font-size: 15px; font-weight: 600; line-height: 1.2; white-space: nowrap; }
.hcall__txt small { color: var(--ink-soft); font-size: 12px; line-height: 1.25; }
@media (hover: hover) { .hcall:hover { border-color: var(--green); box-shadow: 0 8px 22px rgba(10,60,35,.08); } }

/* лента тортов: три колонки медленно едут в разные стороны */
.tort-hero__art { position: relative; align-self: center; height: 400px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; padding: 0 22px 0 36px; margin-left: -36px; overflow: hidden;
  contain: layout paint;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 14%, #000 86%, transparent 100%); mask-image: linear-gradient(to bottom, transparent 0, #000 14%, #000 86%, transparent 100%); }
.reel__col { overflow: visible; }
.reel__track { display: flow-root; will-change: transform; backface-visibility: hidden; animation: reelUp 40s linear infinite; animation-play-state: paused; }   /* пока фото не готовы, лента стоит (запускает tort.js) */
.reel__col--1 .reel__track { animation-duration: 36s; }
.reel__col--2 .reel__track { animation-duration: 46s; animation-direction: reverse; }
.reel__col--3 .reel__track { animation-duration: 41s; }
.reel__col--2 { margin-top: -60px; }
.reel__item { display: block; margin-bottom: 14px; aspect-ratio: 1 / 1; border-radius: 26px; background: #fff; box-shadow: 0 8px 22px rgba(10,60,35,.08); overflow: hidden; }
.reel__item img { width: 100%; height: 100%; object-fit: contain; display: block; padding: 5%; }
/* отступ между фото сделан margin-bottom у каждого фото (а не gap), поэтому высота набора ровно вдвое больше высоты одного круга и сдвиг на -50% бесшовный на любой ширине */
@keyframes reelUp { from { transform: translate3d(0, 0, 0); } to { transform: translate3d(0, -50%, 0); } }
.tort-hero__art.is-run .reel__track { animation-play-state: running; }
@media (prefers-reduced-motion: reduce) { .reel__track { animation: none; } }

/* ---------- Шаги: карточки в стиле «Мы предлагаем» с главной ---------- */
.tort-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; margin: 0 0 28px; padding: 0; list-style: none; }
.tstep { position: relative; display: flex; align-items: center; gap: 16px; padding: 22px 24px; border-radius: 24px; background: #fff; border: 1px solid var(--border); box-shadow: 0 12px 28px rgba(10,60,35,.06); animation: tUp .6s cubic-bezier(.2,.7,.2,1) both; }
.tstep:nth-child(1) { animation-delay: .35s; } .tstep:nth-child(2) { animation-delay: .5s; } .tstep:nth-child(3) { animation-delay: .65s; }
.tstep__icon { flex: 0 0 auto; width: 60px; height: 60px; border-radius: 20px; background: linear-gradient(150deg, rgba(46,159,107,.18), rgba(46,159,107,.06)); color: var(--green-dark); font-size: 26px; display: flex; align-items: center; justify-content: center; transition: background .3s ease, color .3s ease; }
.tstep__icon i { display: flex; }
.tstep__title { margin: 0; font-size: 1rem; font-weight: 700; line-height: 1.25; }
.tstep__text { margin: 3px 0 0; font-size: 13px; line-height: 1.35; color: var(--ink-soft); transition: color .3s ease; }
.tstep__body { flex: 1 1 auto; min-width: 0; }
/* стрелка-связка между карточками */
.tstep + .tstep::before { content: '\2192'; position: absolute; left: -28px; top: 50%; width: 28px; height: 28px; margin-left: -0px; transform: translate(-0%, -50%); display: flex; align-items: center; justify-content: center; font-size: 15px; color: var(--green-dark); }

/* ---------- Поиск и фильтры (липкая панель) ---------- */
.tort-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin: 0 0 22px; padding: 0; }
.tort-search { flex: 1 1 240px; display: flex; align-items: center; gap: 10px; padding: 0 18px; height: 46px; border-radius: 100px; background: #fff; border: 1px solid var(--border); }
.tort-search i { display: flex; color: var(--green); font-size: 16px; }
.tort-search input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font: inherit; color: var(--ink); }
.tort-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.tort-chip { padding: 11px 18px; border-radius: 100px; background: #fff; border: 1px solid var(--border); font-size: 13.5px; font-weight: 500; transition: background .2s, color .2s, border-color .2s, transform .15s; }
.tort-chip.is-on { background: var(--green-dark); border-color: var(--green-dark); color: #fff; }
.tort-chip:active { transform: scale(.97); }
@media (hover: hover) { .tort-chip:not(.is-on):hover { border-color: var(--green); } }
.tort-empty { text-align: center; color: var(--ink-soft); padding: 28px 10px; }

/* ---------- Карточки: торт целиком в кадре, без увеличения ---------- */
.tort-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.tcard { display: flex; flex-direction: column; text-align: left; background: #fff; border-radius: 28px; overflow: hidden; border: 1px solid rgba(10,99,45,.06); box-shadow: 0 1px 2px rgba(10,60,35,.03), 0 14px 34px rgba(10,60,35,.07); transition: transform .25s ease, box-shadow .3s ease; }
.tcard__img { position: relative; aspect-ratio: 1 / 1; overflow: hidden; background: #fff; }
.tcard__img img { width: 100%; height: 100%; object-fit: contain; display: block; padding: 6%; }
.tcard__badges { position: absolute; top: 12px; left: 12px; display: flex; gap: 6px; }
.tbadge { padding: 5px 11px; border-radius: 100px; font-size: 11px; font-weight: 600; letter-spacing: .03em; background: var(--green-dark); color: #fff; }
.tbadge--new { background: #f0b429; color: #2b1d00; }
.tbadge--pro { background: var(--green); }
.tcard__body { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 6px 14px 18px 20px; flex: 1; }
.tcard__name { flex: 1 1 auto; min-width: 0; font-weight: 500; font-size: 1rem; line-height: 1.25; overflow-wrap: break-word; hyphens: manual; }
.tcard__go { flex: 0 0 auto; width: 38px; height: 38px; display: flex; align-items: center; justify-content: center; border-radius: 50%; background: rgba(46,159,107,.14); color: var(--green-dark); font-size: 15px; transition: background .2s, color .2s; }
.tcard__go i { display: flex; }
@media (hover: hover) {
  .tcard:hover { transform: translateY(-4px); box-shadow: 0 2px 4px rgba(10,60,35,.05), 0 20px 40px rgba(10,60,35,.12); }
  .tcard:hover .tcard__go { background: var(--green); color: #fff; }
}
.tcard:active { transform: scale(.985); }

/* ---------- PRO Десерты ---------- */
.tort-pro { position: relative; margin: 46px 0 0; padding: 32px 30px 34px; border-radius: 34px; color: #fff; overflow: hidden; background:
    radial-gradient(700px 320px at 100% 0%, rgba(120,200,90,.3), transparent 60%),
    linear-gradient(160deg, #0a632d, #07421d); }
.tort-pro__head { position: relative; margin: 0 0 22px; }
.tort-pro .tort-hero__eyebrow { background: rgba(255,255,255,.16); color: #d8f5c2; }
.tort-pro__head h2 { margin: 12px 0 12px; font-size: clamp(1.5rem, 3.4vw, 2.2rem); font-weight: 600; }
.tort-pro .tort-grid { position: relative; grid-template-columns: repeat(5, 1fr); gap: 14px; }
.tort-pro .tcard__go { background: rgba(46,159,107,.14); }
.tort-pro[hidden], .tort-grid[hidden] { display: none; }

/* ---------- «Свой дизайн» ---------- */
.tort-custom { display: flex; align-items: center; justify-content: space-between; gap: 22px; margin: 40px 0 0; padding: 24px 30px; border-radius: 28px; background: linear-gradient(120deg, #fff4d6, #ffe9b8); border: 1px solid rgba(240,180,41,.45); }
.tort-custom h3 { margin: 0 0 4px; font-size: 1.2rem; font-weight: 600; color: #3a2a00; }
.tort-custom p { margin: 0; color: #5b4a1c; font-size: .95rem; }
.tort-custom__btns { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; flex: 0 0 auto; }

/* ---------- Окно торта: компактно, всё помещается ---------- */
.shop-modal__panel--cake { width: min(800px, 100%); padding: 0; overflow: hidden; border-radius: 30px; }
.cakeform { display: grid; grid-template-columns: 300px 1fr; align-items: center; max-height: calc(100dvh - 40px); }
.cakeform__left { position: relative; margin: 18px 0 18px 18px; }
.cakeform__photo { margin: 0; aspect-ratio: 1 / 1; border-radius: 24px; background: #fff; box-shadow: inset 0 0 0 1px rgba(10,99,45,.07); display: flex; align-items: center; justify-content: center; overflow: hidden; }
.cakeform__photo img { width: 100%; height: 100%; object-fit: contain; display: block; padding: 4%; }
.cakeform__photo--none { background: linear-gradient(135deg, rgba(46,159,107,.16), rgba(46,159,107,.04)); color: var(--green); font-size: 64px; }
.cakeform__body { padding: 26px 28px 22px; max-height: calc(100dvh - 40px); overflow-y: auto; }
.cakeform__body h2 { margin: 0 40px 12px 0; font-size: 1.3rem; font-weight: 600; line-height: 1.2; }

.cakeinfo { margin: 0 0 14px; }
.cakeinfo__tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 10px; }
.cakeinfo__tags span { padding: 4px 10px; border-radius: 100px; background: rgba(46,159,107,.14); color: var(--green-dark); font-size: 11.5px; font-weight: 500; }
.cakeinfo__chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { padding: 5px 10px; border-radius: 10px; background: #fff; border: 1px solid var(--border); font-size: 12px; color: var(--ink-soft); }
.chip--k { background: var(--green-dark); border-color: var(--green-dark); color: #fff; font-weight: 600; }
.chip--t { background: rgba(46,159,107,.1); border-color: transparent; color: var(--green-dark); }
.cakeinfo__per { margin: 5px 0 0; color: var(--ink-soft); font-size: 11px; }
.cakeinfo__d { margin: 10px 0 0; font-size: 13.2px; line-height: 1.5; color: var(--ink); }
.cakeinfo__comp { margin-top: 8px; font-size: 12px; color: var(--ink-soft); line-height: 1.45; }
.cakeinfo__comp summary { cursor: pointer; color: var(--green-dark); font-weight: 500; }

/* форма: ровные поля одной высоты, календарь в рамке */
.cform { display: flex; flex-direction: column; gap: 10px; }
.cform__row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.cform__f { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.cform__f span { font-size: 11.5px; color: var(--ink-soft); }
.cform__f input, .cform__f select, .cform__f textarea { width: 100%; min-width: 0; box-sizing: border-box; padding: 0 12px; height: 44px; border-radius: 12px; border: 1px solid var(--border); background: #fff; font: inherit; font-size: 14px; color: var(--ink); outline: 0; transition: border-color .2s; }
.cform__f textarea { height: auto; padding: 10px 12px; resize: none; line-height: 1.4; }
.cform__f input[type="date"] { -webkit-appearance: none; appearance: none; display: block; text-align: left; line-height: 42px; }
.cform__f input[type="date"]::-webkit-date-and-time-value { text-align: left; min-height: 0; }
.cform__f input[type="date"]::-webkit-calendar-picker-indicator { opacity: .6; cursor: pointer; }
.cform__f input:focus, .cform__f select:focus, .cform__f textarea:focus { border-color: var(--green); }
.btn--wa { background: #1faa59; justify-content: center; }
.btn--wa i { background: rgba(255,255,255,.2); }
.btn--wa:disabled { opacity: .65; }

/* ---------- Витрина на главной ---------- */
.cakes-teaser { padding: 56px 0 80px; background: linear-gradient(180deg, var(--cream) 0%, #eaf3e1 24%, #e4efd9 55%, #eaf3e1 80%, #fff 100%); }
.cakes-teaser .section__head { margin-bottom: 32px; }
#delivery.section { padding-bottom: 72px; }
.cakes-teaser__row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 8px; }
.cakes-teaser__item { display: block; aspect-ratio: 1 / 1; border-radius: 26px; overflow: hidden; background: #fff; border: 1px solid rgba(10,99,45,.07); box-shadow: 0 10px 26px rgba(10,60,35,.07); transition: transform .25s ease, box-shadow .25s ease; }
.cakes-teaser__item img { width: 100%; height: 100%; object-fit: contain; display: block; padding: 6%; }
@media (hover: hover) { .cakes-teaser__item:hover { transform: translateY(-4px); box-shadow: 0 20px 40px rgba(10,60,35,.13); } }
.cakes-teaser__cta { display: flex; justify-content: center; margin-top: 28px; }

/* ---------- Баннер «Торт на заказ» в магазине ---------- */
.shop-cake { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 18px; min-height: 176px; margin: 34px 0 0; padding: 22px 36px; border-radius: 32px; overflow: hidden; color: var(--ink); border: 1px solid var(--border); background: radial-gradient(260px 200px at 8% 100%, rgba(255,214,140,.38), rgba(255,214,140,0) 70%), radial-gradient(420px 260px at 78% 50%, rgba(255,255,255,.55), rgba(255,255,255,0) 70%), linear-gradient(120deg, #f6efd9 0%, #e6f0dc 50%, #d6e9d6 100%); }
.shop-cake__txt { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: flex-start; gap: 4px; min-width: 0; }
.shop-cake__txt b { font-size: clamp(1.5rem, 3vw, 2.1rem); font-weight: 600; line-height: 1.08; }
.shop-cake__btn { display: inline-flex; align-items: center; gap: 12px; margin-top: 18px; padding: 10px 10px 10px 22px; border-radius: 100px; background: var(--green-dark); color: #fff; font-size: 14.5px; font-weight: 500; box-shadow: 0 10px 20px rgba(10,99,45,.22); transition: transform .25s ease, background .25s ease; }
.shop-cake__btn i { display: flex; align-items: center; justify-content: center; width: 30px; height: 30px; border-radius: 50%; background: rgba(255,255,255,.18); color: #fff; font-size: 13px; }
.shop-cake__pics { position: relative; z-index: 1; flex: 0 0 auto; align-self: center; width: 468px; height: 148px; margin-right: 6px; }
.shop-cake__pics img { position: absolute; width: 136px; height: 136px; object-fit: contain; padding: 8px; border-radius: 28px; background: #fff; box-shadow: 0 14px 30px rgba(10,60,35,.16); }
/* волна: одинаковая длительность и равный сдвиг фазы у соседних тортов — волна бежит слева направо и повторяется без швов, фазы не «расходятся» со временем */
.shop-cake__pics img { --r: 0deg; --wave: 5.2s; animation: cakeFloat var(--wave) linear infinite; }
.shop-cake__pics img:nth-child(1) { left: 0; top: 10px; --r: -7deg; animation-delay: calc(var(--wave) * -0); }
.shop-cake__pics img:nth-child(2) { left: 110px; top: 2px; z-index: 2; --r: 3deg; animation-delay: calc(var(--wave) * -0.12); }
.shop-cake__pics img:nth-child(3) { left: 224px; top: 12px; z-index: 3; --r: -3deg; animation-delay: calc(var(--wave) * -0.24); }
.shop-cake__pics img:nth-child(4) { left: 332px; top: 4px; z-index: 4; --r: 7deg; animation-delay: calc(var(--wave) * -0.36); }
@keyframes cakeFloat {
  0%, 100% { transform: translateY(0) rotate(var(--r)) scale(1); box-shadow: 0 12px 26px rgba(10,60,35,.18); animation-timing-function: cubic-bezier(.37,0,.63,1); }
  50% { transform: translateY(-10px) rotate(calc(var(--r) * .55)) scale(1.04); box-shadow: 0 26px 38px rgba(10,60,35,.11); animation-timing-function: cubic-bezier(.37,0,.63,1); }
}
@media (hover: hover) { .shop-cake:hover .shop-cake__btn { transform: translateX(3px); background: #084d24; }  }
@media (max-width: 1000px) { .shop-cake__pics { width: 352px; } .shop-cake__pics img:nth-child(4) { display: none; } }
@media (max-width: 800px) {
  .shop-cake { min-height: 150px; padding: 18px 14px 18px 20px; border-radius: 26px; gap: 4px; }
  .shop-cake__txt { flex: 1 1 auto; }
  .shop-cake__txt b { font-size: 1.2rem; white-space: nowrap; }
  .shop-cake__btn { margin-top: 12px; padding: 7px 7px 7px 16px; font-size: 13.5px; white-space: nowrap; }
  .shop-cake__btn i { width: 26px; height: 26px; font-size: 12px; }
  .shop-cake__pics { flex: 0 0 112px; width: 112px; height: 108px; margin-right: -2px; }
  .shop-cake__pics img { width: 80px; height: 80px; padding: 5px; border-radius: 18px; box-shadow: 0 8px 18px rgba(10,60,35,.18); }
  .shop-cake__pics img:nth-child(1) { left: 0; top: 2px; }
  .shop-cake__pics img:nth-child(2) { left: 32px; top: 24px; }
  .shop-cake__pics img:nth-child(3), .shop-cake__pics img:nth-child(4) { display: none; }
}
@media (prefers-reduced-motion: reduce) { .shop-cake__pics img { animation: none; transform: rotate(var(--r)); } .shop-cake__btn { transition: none; } }

/* ---------- Планшет и телефон ---------- */
@media (max-width: 1100px) { .tort-pro .tort-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 980px) {
  .tort-grid { grid-template-columns: repeat(3, 1fr); }
  .tort-hero { grid-template-columns: 1fr; padding: 0; min-height: 0; gap: 0; }
  .tort-hero__art { order: -1; height: 250px; padding: 14px 14px 0; margin-left: 0; align-self: auto; }
  .tort-hero__text { padding: 8px 24px 28px; }
}
@media (max-width: 720px) {
  .tort { padding-top: calc(var(--header-h) + 12px); }
  .tort-hero { border-radius: 28px; margin-bottom: 16px; }
  .tort-hero__art { height: 220px; gap: 10px; }
  .reel__item { border-radius: 20px; margin-bottom: 10px; }
  .tort-hero__text { padding: 6px 18px 24px; }
  .tort-hero__cta .btn, .tort-hero__cta .hcall { flex: 1 1 100%; justify-content: center; }
  .tort-steps { grid-template-columns: 1fr; gap: 12px; margin-bottom: 18px; }
  .tstep { padding: 14px 16px; gap: 14px; border-radius: 20px; }
  .tstep__icon { width: 52px; height: 52px; border-radius: 17px; font-size: 22px; }
  .tstep + .tstep::before { content: '\2193'; left: 50%; top: -22px; transform: translateX(-50%); }
  .tort-bar { margin: 0 -2px 14px; }
  .tort-chips { flex-wrap: nowrap; overflow-x: auto; margin: 0 -16px; padding: 2px 16px 4px; scrollbar-width: none; width: calc(100% + 32px); }
  .tort-chips::-webkit-scrollbar { display: none; }
  .tort-chip { flex: 0 0 auto; }
  .tort-grid, .tort-pro .tort-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .tcard { border-radius: 22px; }
  .tcard__body { padding: 2px 10px 12px 14px; }
  .tcard__name { font-size: .88rem; }
  .tcard__go { width: 32px; height: 32px; }
  .tort-pro { padding: 24px 12px 22px; border-radius: 28px; margin-top: 36px; }
  .tort-pro__head { padding: 0 6px; }
  .tort-custom { flex-direction: column; align-items: flex-start; padding: 22px 20px; border-radius: 26px; }
  .cakeform { grid-template-columns: 1fr; align-items: start; overflow-y: auto; }
  .cakeform__photo { margin: 14px 14px 0; aspect-ratio: auto; height: 210px; }
  .cakeform__body { padding: 18px 18px 22px; max-height: none; overflow: visible; }
  .cakes-teaser__row { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .cakes-teaser { padding: 44px 0 48px; }
  .cakes-teaser .section__head { margin-bottom: 22px; }
  #delivery.section { padding-bottom: 48px; }
}
@media (max-width: 420px) { .cform__row { grid-template-columns: 1fr 1fr; } }

/* ---------- исправления по аудиту ---------- */
/* у сайта overflow-x: hidden на html/body — из-за него «липкие» элементы не липнут; на этой странице заменяем на clip (прокрутки не создаёт) */
html:has(body.tort-page), body.tort-page { overflow-x: clip; }
#tortBar { scroll-margin-top: 100px; }
.tort-hero__art.is-run.is-paused .reel__track { animation-play-state: paused; }
.cakeform__late { margin: 0 0 12px; padding: 8px 12px; border-radius: 12px; background: #fff4dd; color: #6b4a00; font-size: 12.5px; }
.cakeform__late[hidden] { display: none; }
.cakeinfo__per { line-height: 1.4; }
/* телефоны (≤430 px): стрелка отнимает место у названия — вся карточка и так нажимается */
@media (max-width: 430px) { .tcard__go { display: none; } .tcard__body { padding: 2px 12px 14px; } .tcard__name { font-size: .86rem; } }

/* в тёмной секции текст карточек не должен наследовать белый цвет */
.tort-pro .tcard { color: var(--ink); }
.tort-pro .tcard__name { font-size: .92rem; }
/* на телефоне панель поиска не липнет — иначе она закрывает пол-экрана */

/* ---------- Оживление ---------- */
/* текст шапки появляется по очереди */
@keyframes tUp { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
.tort-hero__text > * { animation: tUp .7s cubic-bezier(.2,.7,.2,1) both; }
.tort-hero h1 { animation-delay: .05s; }
.tort-lead { animation: tUp .7s cubic-bezier(.2,.7,.2,1) .2s both; }
.tort-hero__cta { animation-delay: .3s; }
.tort-hero__art { animation: tUp .9s cubic-bezier(.2,.7,.2,1) .15s both; }



/* лента: при наведении замирает, торт под курсором приподнимается */

/* карточки торжественно выезжают при прокрутке */
.rv .tcard { opacity: 0; transform: translateY(26px) scale(.97); transition: opacity .6s ease, transform .6s cubic-bezier(.2,.7,.2,1), box-shadow .3s ease; }
.rv .tcard.is-in { opacity: 1; transform: none; }
@media (hover: hover) { .rv .tcard.is-in:hover { transform: translateY(-4px); transition-delay: 0s !important; } }

@media (prefers-reduced-motion: reduce) {
  .tort-hero__text > *, .tort-hero__art, .tstep, .tort-lead { animation: none !important; }
}

/* ---------- ещё штрихи ---------- */
/* заголовок: живой подчёркивающий штрих */
.tort-hero h1 { position: relative; padding-bottom: 0; }


/* окно торта: листание */
.cnav { position: absolute; top: 50%; width: 40px; height: 40px; margin-top: -20px; display: flex; align-items: center; justify-content: center; border-radius: 50%; background: rgba(255,255,255,.95); box-shadow: 0 6px 18px rgba(10,60,35,.2); color: var(--green-dark); font-size: 22px; transition: transform .2s, background .2s, color .2s; z-index: 2; }
.cnav i { display: flex; }
.cnav[hidden] { display: none; }
.cnav--prev { left: 12px; } .cnav--next { right: 12px; }
@media (hover: hover) { .cnav:hover { background: var(--green); color: #fff; transform: scale(1.08); } }
.cnav:active { transform: scale(.94); }
.cnav__count { position: absolute; left: 50%; bottom: 10px; transform: translateX(-50%); padding: 3px 10px; border-radius: 100px; background: rgba(10,60,35,.7); color: #fff; font-size: 11.5px; z-index: 2; }
.cnav__count[hidden] { display: none; }
@keyframes cSwap { from { opacity: .2; transform: scale(.96); } to { opacity: 1; transform: none; } }
.cakeform__photo.is-swap { animation: cSwap .3s ease; }

@media (max-width: 720px) {
  .cnav--prev { left: 10px; } .cnav--next { right: 10px; }
}

/* ---------- экран «Заявка принята» ---------- */
.cform[hidden], .cakeform__done[hidden] { display: none; }   /* display:flex у формы перебивал атрибут hidden — форма не пряталась */
.cakeform__done { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; padding: 14px 4px 6px; }
.done__mark { width: 76px; height: 76px; display: flex; align-items: center; justify-content: center; border-radius: 50%; background: linear-gradient(150deg, rgba(46,159,107,.22), rgba(46,159,107,.08)); color: var(--green-dark); font-size: 34px; animation: doneIn .55s cubic-bezier(.2,.8,.3,1.25) both; }
.done__mark i { display: flex; }
@keyframes doneIn { from { opacity: 0; transform: scale(.4) rotate(-20deg); } to { opacity: 1; transform: none; } }
.cakeform__done h3 { margin: 6px 0 0; font-size: 1.35rem; font-weight: 700; }
.cakeform__done .cakeform__late { margin: 0; }
.done__more { margin-top: 2px; padding: 8px 12px; border-radius: 100px; color: var(--green-dark); font-size: 13.5px; font-weight: 500; text-decoration: underline; text-underline-offset: 3px; }
@media (hover: hover) { .done__more:hover { background: rgba(46,159,107,.1); } }
@media (prefers-reduced-motion: reduce) { .done__mark { animation: none; } }

/* ---------- окно торта: чище и воздушнее ---------- */
.cakeinfo { margin: 0 0 16px; }
.cakeinfo__d { margin: 0 0 12px; }
.nutr { margin: 0 0 12px; padding: 12px; border-radius: 18px; background: #fff; border: 1px solid var(--border); }
.nutr__cap { margin: 0 0 8px; font-size: 11.5px; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-soft); }
.nutr__row { display: grid; grid-template-columns: 1.15fr 1fr 1fr 1.1fr; gap: 8px; }
.nutr__i { padding: 8px 6px; border-radius: 12px; background: rgba(46,159,107,.07); text-align: center; }
.nutr__i b { display: block; font-size: .98rem; font-weight: 700; line-height: 1.15; white-space: nowrap; }
.nutr__i span { display: block; margin-top: 2px; font-size: 11.5px; color: var(--ink-soft); }
.nutr__i--k { background: var(--green-dark); }
.nutr__i--k b, .nutr__i--k span { color: #fff; }
.nutr__i--k span { opacity: .85; }
.cakeinfo__meta { margin: 0 0 12px; }
.cakeinfo__comp { margin: 0 0 4px; }
.cform { gap: 12px; margin-top: 4px; padding-top: 14px; border-top: 1px solid var(--border); }
.cakeform__body h2 { margin-bottom: 12px; }

/* ---------- поля заявки ---------- */
.cform__f { position: relative; }
.cform__f > span { font-size: 12px; font-weight: 500; color: var(--ink); }
.cform__f > span small { color: var(--ink-soft); font-weight: 400; }
.cform__f input, .cform__f select, .cform__f textarea { border: 1.5px solid var(--border); transition: border-color .2s, box-shadow .2s; }
.cform__f input:focus, .cform__f select:focus, .cform__f textarea:focus { border-color: var(--green); box-shadow: 0 0 0 4px rgba(46,159,107,.14); }
.cform__f.is-bad input, .cform__f.is-bad select { border-color: #d84a3a; box-shadow: 0 0 0 4px rgba(216,74,58,.1); }
.cform__err { font-style: normal; font-size: 12px; line-height: 1.3; color: #c23a2c; }
.cform__err[hidden] { display: none; }
.cform__hint { font-style: normal; font-size: 11.5px; line-height: 1.3; color: var(--ink-soft); }
.cform__hint:empty { display: none; }
.cform__f.is-bad .cform__hint { display: none; }
.cform__count { position: absolute; right: 10px; bottom: 8px; font-style: normal; font-size: 11px; color: var(--ink-soft); pointer-events: none; }
.cform__count.is-near { color: #c23a2c; }
.cform__f--wish textarea { min-height: 62px; padding-right: 56px; }
@media (max-width: 420px) { .nutr__row { grid-template-columns: 1fr 1fr; } }

/* срок годности и хранение: спокойный список с точками */
.cakeinfo__meta { padding: 0; list-style: none; display: grid; gap: 5px; color: var(--ink-soft); font-size: 13px; line-height: 1.35; }
.cakeinfo__meta li { position: relative; padding-left: 16px; }
.cakeinfo__meta li::before { content: ''; position: absolute; left: 2px; top: .5em; width: 6px; height: 6px; border-radius: 50%; background: var(--green); }
/* узкий телефон: поля заявки в один столбец, чтобы текст не обрезался */
@media (max-width: 430px) { .cform__row { grid-template-columns: 1fr; } }

/* ---------- окно торта: меньше шума ---------- */
.cform { border-top: 0; padding-top: 0; margin-top: 2px; gap: 10px; }
.cakeinfo { margin: 0 0 14px; }
.cakeinfo__d { margin: 0 0 10px; }
.cakeinfo__sum { margin: 0 0 8px; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; font-size: 13px; color: var(--ink-soft); }
.cakeinfo__sum b { color: var(--green-dark); font-weight: 700; }
.cakeinfo__sum i { width: 4px; height: 4px; border-radius: 50%; background: rgba(10,99,45,.35); }
.cakeinfo__more { margin: 0; }
.cakeinfo__more > summary { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; list-style: none; font-size: 13px; font-weight: 500; color: var(--green-dark); }
.cakeinfo__more > summary::-webkit-details-marker { display: none; }
.cakeinfo__more > summary::after { content: ''; width: 7px; height: 7px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg) translateY(-2px); transition: transform .25s ease; }
.cakeinfo__more[open] > summary::after { transform: rotate(-135deg) translateY(-1px); }
.cakeinfo__more[open] { padding: 12px; border-radius: 18px; background: #fff; border: 1px solid var(--border); }
.cakeinfo__more[open] > summary { margin-bottom: 10px; }
.cakeinfo__more .nutr__row { margin: 0; }
.cakeinfo__more .nutr__cap { margin: 8px 0 10px; font-size: 11.5px; text-transform: none; letter-spacing: 0; }
.cakeinfo__more .cakeinfo__meta { margin: 0; }
.cakeinfo__compt { margin: 10px 0 0; font-size: 12px; line-height: 1.45; color: var(--ink-soft); }
.cakeinfo__compt b { color: var(--ink); font-weight: 500; }
.cform__add { display: inline-flex; align-items: center; gap: 6px; align-self: flex-start; padding: 2px 0; font-size: 13px; font-weight: 500; color: var(--green-dark); text-align: left; }
.cform__add i { display: flex; font-size: 18px; }
.cform__add[hidden], .cform__f--wish[hidden] { display: none; }
@media (hover: hover) { .cform__add:hover span { text-decoration: underline; text-underline-offset: 3px; } }
.cform__f > span { font-size: 12px; font-weight: 500; color: var(--ink-soft); }

/* ---------- окно торта: левая колонка с фото на мягкой подложке ---------- */
.cakeform { align-items: stretch; }
.cakeform__left { margin: 0; padding: 26px; display: flex; align-items: center; background: linear-gradient(160deg, rgba(46,159,107,.12), rgba(46,159,107,.03) 70%); }
.cakeform__photo { width: 100%; box-shadow: 0 14px 34px rgba(10,60,35,.12); }
.cakeform__body { align-self: center; }
.cnav { z-index: 3; }
.cnav--prev { left: 8px; } .cnav--next { right: 8px; }
.cnav__count { bottom: 8px; }
/* итог заявки */
@media (max-width: 720px) {
  .cakeform__left { margin: 14px 14px 0; padding: 0; background: none; align-items: stretch; }
  .cakeform__photo { box-shadow: none; }
  .cakeform__body { align-self: auto; }
}

.nutr__row--3 { grid-template-columns: repeat(3, 1fr); }

/* ---------- переключатель тортов под фото ---------- */
.cakeform__left { flex-direction: column; justify-content: center; gap: 14px; }
.cnav__bar { display: flex; align-items: center; justify-content: center; gap: 14px; }
.cnav__bar[hidden] { display: none; }
.cnav { position: static; margin: 0; width: 38px; height: 38px; }
.cnav--prev, .cnav--next { left: auto; right: auto; }
.cnav__count { position: static; transform: none; min-width: 64px; text-align: center; padding: 5px 12px; background: rgba(10,60,35,.08); color: var(--green-dark); font-size: 12.5px; font-weight: 600; }

/* ---------- белки/жиры/углеводы: одна компактная строка ---------- */
.bju { display: flex; align-items: stretch; margin: 0 0 10px; border-radius: 14px; background: rgba(46,159,107,.08); overflow: hidden; }
.bju span { flex: 1 1 0; padding: 8px 6px; text-align: center; font-size: 11.5px; line-height: 1.25; color: var(--ink-soft); }
.bju span + span { border-left: 1px solid rgba(10,99,45,.12); }
.bju b { display: block; font-size: .95rem; font-weight: 700; color: var(--ink); white-space: nowrap; }
.cakeinfo__more[open] { padding: 12px 14px; }
.cakeinfo__more[open] > summary { margin-bottom: 10px; }
.cakeinfo__compt { margin: 0 0 8px; }

.cakeinfo__note { margin: 0 0 8px; font-size: 11.5px; line-height: 1.4; color: var(--ink-soft); opacity: .85; }
.cakeinfo__compt { font-size: 12.5px; }

/* ---------- плитки: калорийность и срок годности отдельно ---------- */
.stats { display: grid; gap: 8px; margin: 0 0 10px; }
.stats--1 { grid-template-columns: 1fr; } .stats--2 { grid-template-columns: 1fr 1fr; } .stats--3 { grid-template-columns: repeat(3, 1fr); }
.stat { padding: 9px 12px; border-radius: 14px; background: #fff; border: 1px solid var(--border); min-width: 0; }
.stat b { display: block; font-size: 1.05rem; font-weight: 700; line-height: 1.15; color: var(--ink); }
.stat span { display: block; margin-top: 2px; font-size: 11.5px; line-height: 1.25; color: var(--ink-soft); }
.stat--k { background: var(--green-dark); border-color: var(--green-dark); }
.stat--k b { color: #fff; } .stat--k span { color: rgba(255,255,255,.82); }
@media (max-width: 420px) { .stats--3 { grid-template-columns: 1fr 1fr; } .stats--3 .stat:last-child { grid-column: 1 / -1; } }
.stats--1 { grid-template-columns: max-content; }

/* шапка: подпись и кнопки ровно по ширине заголовка «Торт на заказ» */
@media (min-width: 981px) {
  .tort-hero__text { --hfs: clamp(2.1rem, 4.2vw, 3.2rem); width: fit-content; }
  .tort-hero h1 { font-size: var(--hfs); }
  .tort-hero__cta { width: 0; min-width: 100%; gap: 10px; }
  .tort-hero__cta .btn { flex: 0 0 auto; padding-left: 18px; }
  .tort-hero__cta .hcall { flex: 1 1 236px; min-width: 0; justify-content: center; gap: 10px; padding-right: 12px; }
  .tort-hero__cta .hcall__txt small { white-space: nowrap; font-size: 11.5px; }
}
@media (min-width: 981px) and (max-width: 1180px) {
  .tort-hero__cta .btn { flex: 1 1 100%; justify-content: center; }
}

/* связаться: WhatsApp + круглая кнопка звонка; по наведению раскрывается в номер, кнопка WhatsApp ужимается, но текст целый */
.cform__act { display: flex; align-items: stretch; gap: 8px; }
.cform__act .btn--wa { flex: 1 1 0; min-width: 0; overflow: hidden; padding: 10px 14px 10px 10px; gap: 9px; }
.cform__act .btn--wa span { overflow: hidden; text-overflow: ellipsis; }
.callfab { flex: 0 0 auto; display: inline-flex; align-items: center; width: 52px; height: 52px; overflow: hidden; border-radius: 100px; background: var(--green-dark); color: #fff; box-shadow: 0 8px 16px rgba(10,99,45,.22); white-space: nowrap; transition: width .35s cubic-bezier(.2,.7,.2,1), background .25s; }
.callfab i { flex: 0 0 52px; display: flex; align-items: center; justify-content: center; font-size: 18px; }
.callfab span { padding-right: 14px; font-size: 13px; font-weight: 600; opacity: 0; transition: opacity .2s; }
@media (hover: hover) { .callfab:hover, .callfab:focus-visible { width: min(212px, calc(100% - 173px)); background: #084d24; } .callfab:hover span, .callfab:focus-visible span { opacity: 1; transition-delay: .12s; } }
@media (hover: none) { .callfab span { display: none; } }
.done__act { align-self: stretch; margin-top: 8px; }
.cakeform__body:focus { outline: none; }

/* календарь выбора даты */
:where(.cal) button { -webkit-appearance: none; appearance: none; margin: 0; padding: 0; border: 0; background: none; font: inherit; color: inherit; cursor: pointer; }
.cform__f--date { position: relative; }
.datebtn { display: flex; align-items: center; gap: 10px; width: 100%; height: 44px; padding: 0 12px; border-radius: 12px; border: 1.5px solid var(--border); background: #fff; font: inherit; font-size: 14px; color: var(--ink-soft); text-align: left; transition: border-color .2s, box-shadow .2s; }
.datebtn i { display: flex; color: var(--green-dark); font-size: 16px; }
.datebtn span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.datebtn.is-set { color: var(--ink); }
.datebtn:focus-visible, .datebtn[aria-expanded="true"] { border-color: var(--green); box-shadow: 0 0 0 4px rgba(46,159,107,.14); outline: none; }
.cform__f--date.is-bad .datebtn { border-color: #d84a3a; box-shadow: 0 0 0 4px rgba(216,74,58,.1); }
.cform__f--date > span { font-size: 12px; font-weight: 500; color: var(--ink-soft); }
.cal { position: fixed; z-index: 3000; left: 0; top: 0; width: 292px; padding: 14px 12px 10px; border-radius: 22px; background: #fff; border: 1px solid var(--border); box-shadow: 0 22px 50px rgba(10,60,35,.2), 0 2px 8px rgba(10,60,35,.06); animation: calIn .18s cubic-bezier(.2,.7,.2,1) both; }
@keyframes calIn { from { opacity: 0; transform: translateY(6px) scale(.98); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .cal { animation: none; } }
.cal[hidden] { display: none; }
.cal__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.cal__title { font-size: 14.5px; font-weight: 600; text-transform: capitalize; letter-spacing: -.005em; }
.cal__nav { width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; border-radius: 50%; background: rgba(46,159,107,.1); color: var(--green-dark); font-size: 18px; transition: background .2s, color .2s; }
.cal__nav i { display: flex; }
.cal__nav:disabled { opacity: .3; pointer-events: none; }
@media (hover: hover) { .cal__nav:hover { background: var(--green); color: #fff; } }
.cal__wd, .cal__grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; text-align: center; }
.cal__grid { grid-auto-rows: 36px; }
.cal__wd span { padding: 6px 0 4px; font-size: 11px; font-weight: 500; color: var(--ink-soft); text-transform: capitalize; }
.cal__wd span:nth-child(n+6) { color: var(--green-dark); }
.cal__d { position: relative; height: 36px; border-radius: 12px; font-size: 13.5px; font-weight: 500; color: var(--ink); transition: background .15s, color .15s, transform .15s; }
.cal__d:nth-child(7n), .cal__d:nth-child(7n+6) { color: var(--green-dark); }
.cal__d:disabled { color: rgba(77,92,83,.28); text-decoration: none; cursor: default; }
.cal__d.is-today::after { content: ''; position: absolute; left: 50%; bottom: 4px; width: 4px; height: 4px; margin-left: -2px; border-radius: 50%; background: var(--green); }
.cal__d.is-today.is-sel::after { background: #fff; }
.cal__d.is-sel { background: var(--green-dark); color: #fff !important; box-shadow: 0 6px 14px rgba(10,99,45,.28); }
.cal__d:focus-visible { outline: 2px solid var(--green); outline-offset: 1px; }
@media (hover: hover) { .cal__d:not(:disabled):not(.is-sel):hover { background: rgba(46,159,107,.14); } }
.cal__clear { display: block; margin: 8px auto 0; padding: 6px 12px; border-radius: 100px; font-size: 12.5px; color: var(--ink-soft); text-decoration: underline; text-underline-offset: 3px; }
.cal__clear[hidden] { display: block; visibility: hidden; }   /* место под кнопку остаётся — высота календаря не прыгает */

/* телефон: три шага в ряд, по центру, одной высоты; между ними стрелки */
.t-short { display: none; }
@media (max-width: 720px) {
  .tort-lead { text-wrap: balance; margin-bottom: 14px; font-size: 1.05rem; }
  .tort-steps { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-bottom: 16px; }
  .tstep { flex-direction: column; align-items: center; justify-content: flex-start; gap: 10px; padding: 14px 6px 12px; border-radius: 18px; text-align: center; }
  .tstep__icon { width: 42px; height: 42px; border-radius: 14px; font-size: 19px; }
  .tstep__body { flex: 0 0 auto; width: 100%; }
  .tstep__title { font-size: .76rem; line-height: 1.3; text-wrap: balance; }
  .tstep__text { display: none; }
  .t-full + .t-short { display: inline; }
  .t-full:has(+ .t-short) { display: none; }
  .tstep + .tstep::before { content: '\203A'; display: flex; left: -16px; top: 28px; width: 16px; height: 16px; transform: none; font-size: 18px; line-height: 1; color: var(--green); }
  .tcard__body { align-items: flex-start; padding-top: 10px; }
}
@media (max-width: 360px) { .tstep { padding: 12px 4px 10px; } .tstep__title { font-size: .68rem; } .tort-steps { gap: 14px; } }

@media (max-width: 720px) { .cakeform__photo { margin: 0; } }

#tortBar { scroll-margin-top: 92px; }

/* без пустых мест в последнем ряду: PRO на планшете по центру, на телефоне последняя «нечётная» карточка во всю ширину */
@media (min-width: 721px) and (max-width: 1100px) {
  .tort-pro .tort-grid { grid-template-columns: repeat(6, 1fr); }
  .tort-pro .tcard { grid-column: span 2; }
  .tort-pro .tcard:last-child:nth-child(3n+1) { grid-column: 3 / 5; }
  .tort-pro .tcard:nth-last-child(2):nth-child(3n+1) { grid-column: 2 / 4; }
  .tort-pro .tcard:last-child:nth-child(3n+2) { grid-column: 4 / 6; }
}

/* телефон: в пустую клетку PRO-сетки встаёт плитка «Торт по вашей идее» */
.tcard-idea { display: none; }
@media (max-width: 720px) {
  .tort-pro .tcard-idea:nth-child(even) { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 18px 12px; border-radius: 22px; border: 1.5px dashed rgba(255,255,255,.42); background: rgba(255,255,255,.1); color: #fff; text-align: center; transition: background .2s; }
  .tcard-idea__ico { width: 54px; height: 54px; display: flex; align-items: center; justify-content: center; border-radius: 18px; background: rgba(255,255,255,.18); color: #d8f5c2; font-size: 24px; }
  .tcard-idea__ico i { display: flex; }
  .tcard-idea b { font-size: .92rem; font-weight: 600; line-height: 1.25; }
  .tcard-idea small { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: #d8f5c2; }
  .tcard-idea:active { background: rgba(255,255,255,.18); }
}
@media (max-width: 720px) { .tort-custom.is-covered { display: none; } }
@media (max-width: 720px) { .tort-hero__text { text-align: center; } .tort-hero h1 { text-wrap: balance; } .tort-hero__cta { justify-content: center; } }
@media (max-width: 380px) { .shop-cake__txt b { font-size: 1.05rem; } .shop-cake__pics { flex-basis: 100px; width: 100px; } .shop-cake__pics img { width: 72px; height: 72px; } .shop-cake__pics img:nth-child(2) { left: 28px; } }
@media (max-width: 350px) {
  .shop-cake { padding-left: 16px; padding-right: 10px; }
  .shop-cake__txt b { font-size: .98rem; }
  .shop-cake__btn { padding: 5px 5px 5px 12px; font-size: 12.5px; gap: 8px; }
  .shop-cake__btn i { width: 24px; height: 24px; }
  .shop-cake__pics { flex-basis: 78px; width: 78px; }
  .shop-cake__pics img { width: 66px; height: 66px; }
  .shop-cake__pics img:nth-child(1) { left: 0; top: 4px; }
  .shop-cake__pics img:nth-child(2) { left: 14px; top: 28px; }
}
@media (max-width: 350px) { :lang(kk) .shop-cake__txt b { font-size: .88rem; } }
