/* Стили сайта «Торты Светланы Артемовой». Цвета — из логотипа. */
@font-face { font-family: "Manrope"; src: url("../fonts/manrope-400.woff") format("woff"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Manrope"; src: url("../fonts/manrope-500.woff") format("woff"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Manrope"; src: url("../fonts/manrope-600.woff") format("woff"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Manrope"; src: url("../fonts/manrope-700.woff") format("woff"); font-weight: 700; font-display: swap; }

:root {
  --bg: #fbf8f4;        /* слоновая кость */
  --mist: #f1eef6;      /* сиреневая дымка */
  --navy: #37316d;      /* фирменный из логотипа */
  --navy-2: #4a4390;
  --ink: #2a2545;       /* текст */
  --muted: #77738f;
  --line: #e7e2ee;
  --berry: #c2553a;     /* акцент для цен */
  --white: #fff;
  --r: 20px;
  --shadow: 0 1px 2px rgba(42, 37, 69, .04), 0 12px 32px rgba(42, 37, 69, .07);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
/* Без горизонтальной прокрутки на телефоне. clip (в отличие от hidden) не ломает «прилипание» шапки и правой панели конструктора */
html, body { overflow-x: hidden; }
@supports (overflow: clip) { html, body { overflow-x: clip; } }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.65 "Manrope", system-ui, -apple-system, "Segoe UI", Arial, sans-serif; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; display: block; }
a { color: var(--navy); text-decoration-thickness: 1px; text-underline-offset: 3px; }
h1, h2, h3 { font-family: "Manrope", sans-serif; font-weight: 600; color: var(--navy); line-height: 1.12; letter-spacing: -.025em; margin: 0 0 .5em; }
h1 { font-size: clamp(34px, 5vw, 56px); }
h2 { font-size: clamp(28px, 3.6vw, 40px); }
h3 { font-size: 20px; font-weight: 700; letter-spacing: -.01em; }
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 820px; }
.center { text-align: center; }
.lead { font-size: 18px; color: var(--muted); max-width: 640px; margin: 0 0 32px; }
.note { color: var(--muted); font-size: 14px; }
.eyebrow { font-size: 12px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--navy-2); margin: 0 0 14px; }

/* Кнопки */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; background: var(--navy); color: #fff; border: 1.5px solid var(--navy);
  padding: 14px 30px; border-radius: 999px; font: 600 15px "Manrope", sans-serif; letter-spacing: .02em; text-decoration: none; cursor: pointer; transition: .2s; }
.btn:hover { background: var(--navy-2); border-color: var(--navy-2); transform: translateY(-1px); }
.btn--ghost { background: transparent; color: var(--navy); }
.btn--ghost:hover { background: var(--navy); color: #fff; }
.btn--sm { padding: 9px 18px; font-size: 13px; }
.btn--wide { width: 100%; }

/* Шапка */
.top { position: sticky; top: 0; z-index: 20; background: rgba(251, 248, 244, .88); backdrop-filter: saturate(1.4) blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.top__in { display: flex; align-items: center; gap: 28px; height: 76px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; min-width: 0; flex-shrink: 0; }
.brand img { flex: none; }
/* Название в две строки («Торты Светланы / Артемовой»), чтобы не наезжать на меню */
.brand span { font: 700 16.5px/1.15 "Manrope", sans-serif; letter-spacing: -.01em; color: var(--navy); max-width: 150px; }
.foot .brand span { max-width: none; font-size: 18px; }
.nav { display: flex; align-items: center; gap: 22px; margin-left: auto; }
.nav a { text-decoration: none; color: var(--ink); font-size: 14.5px; font-weight: 600; position: relative; padding: 6px 0; white-space: nowrap; }
.nav a::after { content: ""; position: absolute; left: 0; right: 100%; bottom: 0; height: 1.5px; background: var(--navy); transition: right .25s; }
.nav a:hover::after, .nav a.on::after { right: 0; }
.nav__phone { display: none; }
.top__phone { font-weight: 700; font-size: 15px; text-decoration: none; white-space: nowrap; }
.cartbtn { position: relative; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; color: var(--navy); border: 1.5px solid var(--line); transition: .2s; }
.cartbtn:hover, .cartbtn.on { border-color: var(--navy); }
.cartbtn b { position: absolute; top: -4px; right: -4px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px; background: var(--berry); color: #fff; font-size: 11px; line-height: 20px; text-align: center; }
.top__check, .burger { display: none; }

/* Всплывающее сообщение */
/* Сообщение «Добавлено в корзину» — карточка под шапкой */
.toast { position: fixed; z-index: 30; top: 88px; left: 50%; transform: translateX(-50%); width: min(440px, calc(100% - 24px));
  display: flex; align-items: center; gap: 12px; padding: 12px 12px 12px 14px; background: #fff; color: var(--ink);
  border-radius: 18px; box-shadow: 0 14px 40px rgba(42, 37, 69, .22); border: 1px solid var(--line); transition: opacity .4s, transform .4s; }
.toast__ok { flex: none; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: #e3f3dc; color: #2e7d12; font-weight: 700; }
.toast__txt { flex: 1; min-width: 0; line-height: 1.25; }
.toast__txt b { display: block; font-size: 14.5px; color: var(--navy); }
.toast__txt span { display: block; font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.toast__go { flex: none; padding: 9px 14px; border-radius: 999px; background: var(--navy); color: #fff; font-weight: 700; font-size: 13.5px; text-decoration: none; white-space: nowrap; }
.toast__x { flex: none; border: 0; background: none; color: var(--muted); font-size: 20px; line-height: 1; padding: 4px; cursor: pointer; }
.toast--hide { opacity: 0; pointer-events: none; transform: translate(-50%, -12px); }

/* Первый экран */
.hero { padding: 56px 0 80px; background: radial-gradient(1200px 500px at 85% 0%, var(--mist), transparent 70%); }
.hero__in { display: grid; grid-template-columns: 1.1fr .9fr; gap: 64px; align-items: center; }
.hero h1 { margin-bottom: 22px; }
.hero__sub { font-size: 18px; color: var(--muted); max-width: 520px; margin: 0 0 36px; }
.hero__btns { display: flex; flex-wrap: wrap; gap: 12px; }
.hero__img { position: relative; }
.hero__img > img:first-child { width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 999px 999px 28px 28px; box-shadow: var(--shadow); }
.hero__badge { position: absolute; left: -44px; bottom: 36px; width: 128px; height: 128px; border-radius: 50%; background: #fff; padding: 4px; box-shadow: var(--shadow); }

/* Секции */
.block { padding: 88px 0; }
.block--top { padding-top: 36px; }
.block--tint { background: var(--mist); }
.head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 32px; }
.head h2 { margin: 0; }
.more { font-weight: 600; font-size: 14.5px; text-decoration: none; white-space: nowrap; }
.crumbs { font-size: 13px; color: var(--muted); margin-bottom: 18px; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--navy); }
h2.group { margin: 48px 0 22px; font-size: 28px; }

/* Категории на главной: фото-арки */
.cats { display: grid; grid-template-columns: repeat(5, 1fr); gap: 20px; }
.cat { text-decoration: none; text-align: center; }
.cat__img { display: block; overflow: hidden; border-radius: 999px 999px 18px 18px; aspect-ratio: 3 / 4; background: var(--mist); }
.cat__img img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.cat:hover .cat__img img { transform: scale(1.06); }
.cat__name { display: block; margin-top: 14px; font: 600 16px "Manrope", sans-serif; color: var(--navy); line-height: 1.2; }

/* Карточки товаров */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 24px; }
.card { background: var(--white); border-radius: var(--r); overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column; transition: transform .25s, box-shadow .25s; }
.card:hover { transform: translateY(-3px); box-shadow: 0 2px 4px rgba(42, 37, 69, .05), 0 20px 44px rgba(42, 37, 69, .12); }
.card__img { display: block; aspect-ratio: 1; overflow: hidden; background: var(--mist); }
.card__img img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.card:hover .card__img img { transform: scale(1.05); }
.card__body { padding: 18px 20px 20px; display: flex; flex-direction: column; flex: 1; }
.card h3 { font-size: 17px; font-weight: 700; letter-spacing: -.01em; margin: 0 0 4px; }
.card h3 a { text-decoration: none; color: var(--navy); }
.card__meta { color: var(--muted); font-size: 13.5px; margin: 0; }
.card__foot { margin-top: auto; padding-top: 16px; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.card__price { font-weight: 700; font-size: 17px; color: var(--ink); white-space: nowrap; }
.card__price small { font-weight: 400; color: var(--muted); font-size: 13px; }

/* Вкладки категорий */
#razdely { scroll-margin-top: 92px; }   /* отступ под липкую шапку */
.tabs { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 8px; }
.tabs a { padding: 8px 16px; border-radius: 999px; border: 1.5px solid var(--line); text-decoration: none; font-size: 14px; font-weight: 600; color: var(--ink); background: #fff; transition: .2s; }
.tabs a:hover { border-color: var(--navy); }
.tabs a.on { background: var(--navy); border-color: var(--navy); color: #fff; }

/* Карточка товара */
.product { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: start; margin-bottom: 40px; }
/* Фото товара — целиком, без обрезки (фото бывают и квадратные, и вытянутые) */
.product__img img { width: 100%; aspect-ratio: 1; object-fit: contain; background: #fff; border-radius: 28px; box-shadow: var(--shadow); position: sticky; top: 100px; }
.product__price { font: 700 28px "Manrope", sans-serif; letter-spacing: -.02em; color: var(--berry); margin: 8px 0 16px; }
.buy { margin-top: 28px; }
.field { margin-bottom: 24px; }
.field > span, .qty > span { display: block; font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-bottom: 10px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip input, .fillopt input { position: absolute; opacity: 0; }
.chip span { display: block; padding: 10px 18px; border: 1.5px solid var(--line); border-radius: 999px; cursor: pointer; font-weight: 600; font-size: 14px; background: #fff; transition: .15s; }
.chip input:checked + span { border-color: var(--navy); background: var(--navy); color: #fff; }
.chip input:focus-visible + span, .fillopt input:focus-visible + span { outline: 2px solid var(--navy-2); outline-offset: 2px; }
.fills { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.fillopt span { display: block; height: 100%; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: 14px; cursor: pointer; background: #fff; transition: .15s; }
.fillopt b { display: block; font-size: 14.5px; color: var(--navy); }
.fillopt small { display: block; font-size: 12.5px; color: var(--muted); line-height: 1.45; margin-top: 2px; }
.fillopt input:checked + span { border-color: var(--navy); box-shadow: inset 0 0 0 1px var(--navy); background: #faf9fd; }
.buy__row { display: flex; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.qty input { width: 110px; }

/* Формы */
input, select, textarea { font: inherit; color: var(--ink); }
.checkout input:not([type=radio]):not([type=checkbox]), .checkout select, .checkout textarea, .qty input {
  display: block; width: 100%; margin-top: 6px; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: 12px; background: #fff; transition: border-color .15s; }
.qty input { width: 110px; margin: 0; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--navy) !important; }
.checkout label { display: block; margin-bottom: 14px; font-size: 14px; font-weight: 600; }
.checkout .check { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; font-size: 13.5px; color: var(--muted); }
.checkout .check input { margin-top: 3px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 4px; background: var(--mist); border-radius: 14px; margin-bottom: 14px; }
.seg label { margin: 0; position: relative; }
.seg input { position: absolute; opacity: 0; }
.seg label { text-align: center; padding: 10px; border-radius: 10px; cursor: pointer; }
.seg label:has(input:checked) { background: #fff; box-shadow: 0 1px 4px rgba(42, 37, 69, .1); color: var(--navy); }
.hp { position: absolute; left: -9999px; }
.msg { padding: 12px 16px; border-radius: 12px; margin-bottom: 16px; font-size: 14.5px; }
.msg--err { background: #fbe9e4; color: #9a3519; }
.msg--ok { background: #e7f4e1; color: #2e6b12; }

/* Корзина */
.cart { display: grid; grid-template-columns: 1.4fr 1fr; gap: 40px; align-items: start; }
.line { display: grid; grid-template-columns: 88px 1fr auto auto auto; gap: 18px; align-items: center; padding: 18px 0; border-bottom: 1px solid var(--line); }
.line img { width: 88px; height: 88px; object-fit: cover; border-radius: 16px; }
.line__name { font: 700 17px "Manrope", sans-serif; text-decoration: none; display: block; line-height: 1.2; }
.line__info small { display: block; color: var(--muted); font-size: 13px; }
.line__qty { display: flex; align-items: center; gap: 4px; border: 1.5px solid var(--line); border-radius: 999px; padding: 3px; }
.line__qty button { width: 30px; height: 30px; border: 0; border-radius: 50%; background: transparent; font-size: 18px; cursor: pointer; color: var(--navy); }
.line__qty button:hover { background: var(--mist); }
.line__qty span { min-width: 26px; text-align: center; font-weight: 700; }
.line__sum { font-weight: 700; white-space: nowrap; min-width: 90px; text-align: right; }
.line__del { border: 0; background: none; font-size: 24px; color: var(--muted); cursor: pointer; padding: 4px 8px; }
.line__del:hover { color: var(--berry); }
.cart__total { display: flex; justify-content: flex-end; align-items: baseline; gap: 14px; padding: 22px 0 6px; font-size: 16px; }
.cart__total b { font: 600 34px "Manrope", sans-serif; color: var(--navy); }
.checkout { background: #fff; border-radius: 24px; padding: 30px; box-shadow: var(--shadow); position: sticky; top: 100px; }
.checkout h2 { font-size: 34px; }
.empty { text-align: center; padding: 60px 0; }
.empty p { font-size: 18px; color: var(--muted); }

/* Шаги, обещания, призыв */
.steps { list-style: none; counter-reset: s; padding: 0; margin: 40px 0 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px; }
.steps li { counter-increment: s; }
.steps li::before { content: counter(s, decimal-leading-zero); display: block; font: 300 44px "Manrope", sans-serif; color: #c9c4dd; letter-spacing: -.03em; line-height: 1; margin-bottom: 10px; }
.steps b { display: block; font: 700 17px "Manrope", sans-serif; color: var(--navy); margin-bottom: 4px; }
.steps span { color: var(--muted); font-size: 15px; }
.promise { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; text-align: center; }
.promise p { color: var(--muted); margin: 0; }
.callout { display: flex; justify-content: space-between; align-items: center; gap: 40px; flex-wrap: wrap; background: var(--navy); color: #e4e1f2; border-radius: 32px; padding: 48px 56px; }
.callout h2 { color: #fff; }
.callout p { margin: 0; }
.links { display: flex; flex-wrap: wrap; gap: 10px; }
.links a { padding: 10px 18px; border-radius: 999px; border: 1.5px solid var(--line); background: #fff; text-decoration: none; font-weight: 600; font-size: 14px; transition: .2s; }
.links a:hover { border-color: var(--navy); }
.callout .links a { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .35); }
.callout .links a:hover { background: #fff; color: var(--navy); }
.links--col { flex-direction: column; align-items: flex-start; }

/* Начинки, тексты, памятка */
.fill { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; }
.fill__item { background: #fff; border-radius: var(--r); padding: 20px 22px; box-shadow: var(--shadow); }
.fill__item b { display: block; font: 700 17px "Manrope", sans-serif; color: var(--navy); margin-bottom: 4px; }
.fill__item span { color: var(--muted); font-size: 14.5px; }
.text h3 { margin-top: 1.4em; }
.text p, .text li { font-size: 16.5px; }
.memo { display: grid; gap: 10px; }
.memo details { background: #fff; border-radius: 16px; padding: 16px 22px; box-shadow: var(--shadow); }
.memo summary { cursor: pointer; font: 700 17px "Manrope", sans-serif; color: var(--navy); list-style: none; display: flex; justify-content: space-between; }
.memo summary::after { content: "+"; font-family: "Manrope", sans-serif; font-weight: 400; color: var(--muted); }
.memo details[open] summary::after { content: "−"; }
.memo p { margin: 10px 0 4px; color: var(--muted); }

/* Знакомство на главной */
.meet { display: grid; grid-template-columns: 300px 1fr; gap: 64px; align-items: center; }
.meet img { width: 100%; aspect-ratio: 2 / 3; object-fit: cover; border-radius: 999px 999px 24px 24px; box-shadow: var(--shadow); }
.block--flat { padding-top: 0; }

/* О кондитере, контакты, спасибо */
.about { display: grid; grid-template-columns: 360px 1fr; gap: 64px; align-items: start; }
.about__side { position: relative; }
.about__photo { width: 100%; aspect-ratio: 2 / 3; object-fit: cover; border-radius: 999px 999px 24px 24px; box-shadow: var(--shadow); }
.about__badge { position: absolute; right: -24px; bottom: 28px; width: 110px; height: 110px; border-radius: 50%; background: #fff; padding: 4px; box-shadow: var(--shadow); }
.contacts { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; margin: 20px 0 30px; }
.contacts .eyebrow { margin: 22px 0 6px; }
.bigphone { font: 600 36px "Manrope", sans-serif; text-decoration: none; }
.thanks { text-align: center; padding: 30px 0; }
.thanks img { margin: 0 auto 20px; }

/* Подвал */
.foot { background: #241f4a; color: #b9b5d6; padding: 64px 0 28px; margin-top: 0; font-size: 14.5px; }
.foot__in { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 40px; }
.foot h4 { color: #fff; font: 600 13px "Manrope", sans-serif; letter-spacing: .14em; text-transform: uppercase; margin: 0 0 14px; }
.foot a, .foot span { display: block; color: #d6d3ea; text-decoration: none; margin-bottom: 8px; }
.foot a:hover { color: #fff; }
.brand--light span { color: #fff; }
.brand--light img { background: #fff; border-radius: 50%; }
.foot__low { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; border-top: 1px solid rgba(255, 255, 255, .12); margin-top: 40px; padding-top: 20px; font-size: 13px; }
.foot__low a, .foot__low span { display: inline; margin: 0; color: #9a96bb; }

/* Конструктор торта */
.nav__ctor { color: #fff !important; background: var(--navy); padding: 7px 16px !important; border-radius: 999px; }
.nav__ctor::after { display: none; }
.nav__ctor:hover, .nav__ctor.on { background: var(--navy-2); }
/* «Играть» — тоже выделено, розовым */
.nav__play { color: #fff !important; background: linear-gradient(135deg, #f29bb5, #b9a3e3); padding: 7px 16px !important; border-radius: 999px; }
.nav__play::after { display: none; }
.nav__play:hover, .nav__play.on { filter: brightness(1.05); box-shadow: 0 4px 14px rgba(242, 155, 181, .45); }
.ctor { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 40px; align-items: start; margin-top: 12px; }
.step { border: 0; margin: 0 0 22px; padding: 26px 28px; background: #fff; border-radius: var(--r); box-shadow: var(--shadow); }
.step[hidden] { display: none; }
.step legend { float: left; width: 100%; display: flex; align-items: center; gap: 12px; font-size: 20px; font-weight: 700; color: var(--navy); margin-bottom: 18px; letter-spacing: -.01em; }
.step legend span { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--navy); color: #fff; font-size: 15px; }
.step legend small { font-size: 13px; font-weight: 400; color: var(--muted); }
.step > *:not(legend) { clear: both; }
.types { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.typeopt input, .chip input[type=checkbox] { position: absolute; opacity: 0; }
.typeopt span { display: grid; grid-template-columns: 72px 1fr; column-gap: 14px; align-content: center; align-items: center; padding: 12px; border: 1.5px solid var(--line); border-radius: 16px; cursor: pointer; transition: .15s; height: 100%; }
.typeopt img { width: 72px; height: 72px; border-radius: 12px; object-fit: cover; grid-row: span 2; }
.typeopt b { display: block; color: var(--navy); font-size: 17px; align-self: end; }
.typeopt small { color: var(--muted); font-size: 13px; line-height: 1.4; align-self: start; }
.typeopt input:checked + span { border-color: var(--navy); box-shadow: inset 0 0 0 1px var(--navy); background: #faf9fd; }
.chip input[type=checkbox]:checked + span { border-color: var(--navy); background: var(--navy); color: #fff; }
.chip span { display: inline-flex; align-items: center; gap: 6px; }
.shape-ico { flex: none; color: var(--navy); }
.chip input:checked + span .shape-ico { color: #fff; }
.chip em, .fillopt em { font-style: normal; font-weight: 400; opacity: .7; font-size: 12.5px; margin-left: 4px; }
.weight { display: flex; align-items: center; gap: 24px; }
.weight input[type=range] { flex: 1; accent-color: var(--navy); height: 28px; }
.weight__val { min-width: 190px; text-align: right; }
.kgbox { display: inline-flex; align-items: center; gap: 4px; border: 1.5px solid var(--navy); border-radius: 999px; padding: 4px; background: #fff; }
.kgbox label { display: flex; align-items: baseline; gap: 4px; cursor: text; }
.kgbox input { width: 64px; border: 0; padding: 4px 0; text-align: right; font: 700 26px "Manrope", sans-serif; color: var(--navy); letter-spacing: -.02em; background: transparent; }
.kgbox input:focus { outline: none; }
.kgbox span { font-weight: 700; color: var(--navy); font-size: 16px; margin-right: 6px; }
.kgbox__btn { width: 40px; height: 40px; border-radius: 50%; border: 0; background: var(--mist); color: var(--navy); font-size: 22px; cursor: pointer; flex: none; }
.kgbox__btn:hover { background: var(--navy); color: #fff; }
.weight__val #guests { display: block; margin-top: 6px; }
.weight__val b { display: block; font-size: 28px; color: var(--navy); letter-spacing: -.02em; line-height: 1.1; }
.weight__val span { color: var(--muted); font-size: 14px; }
.fills[hidden] { display: none; }
.ctor__field { display: block; font-size: 14px; font-weight: 600; margin-bottom: 14px; }
.ctor__field small { font-weight: 400; color: var(--muted); }
.ctor__field input, .ctor__field textarea { display: block; width: 100%; margin-top: 6px; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: 12px; background: #fff; }
/* Панель «Ваш торт»: прилипает к верху окна, своей прокрутки нет — страница листается всегда */
.ctor__sum { position: sticky; top: 96px; align-self: start; background: #fff; border-radius: 24px; padding: 24px 28px; box-shadow: var(--shadow); }
/* Невысокий экран компьютера: панель компактнее, чтобы помещалась целиком */
@media (min-width: 901px) and (max-height: 860px) {
  .ctor__pic { aspect-ratio: 21 / 9; }
  .ctor__pic figcaption span { display: none; }
  .ctor__sum li { padding: 6px 0; }
  .ctor__total { padding: 10px 0 4px; }
  .ctor__total b { font-size: 28px; }
  .ctor__sum > .note:not(#asknote) { display: none; }
}
@media (min-width: 901px) and (max-height: 680px) {
  .ctor__pic { display: none; }
}
.ctor__sum ul { list-style: none; padding: 0; margin: 0 0 6px; }
.ctor__sum li { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 14.5px; }
.ctor__sum li b { white-space: nowrap; }
.ctor__total { display: flex; justify-content: space-between; align-items: baseline; padding: 16px 0 6px; }
.ctor__total b { font-size: 34px; color: var(--navy); letter-spacing: -.03em; }
.ctorbanner { display: grid; grid-template-columns: 1.2fr 1fr; align-items: center; gap: 0; background: var(--navy); border-radius: 32px; overflow: hidden; color: #e4e1f2; }
.ctorbanner__text { padding: 44px 48px; }
.ctorbanner h2 { color: #fff; margin-bottom: 12px; }
.ctorbanner p { margin: 0 0 24px; }
.ctorbanner .btn { background: #fff; color: var(--navy); border-color: #fff; }
.ctorbanner .btn:hover { background: var(--mist); }
.ctorbanner img { width: 100%; height: 100%; min-height: 260px; object-fit: cover; }
.ctorbanner--sm { grid-template-columns: 1fr auto; padding: 22px 28px; border-radius: 22px; margin: 6px 0 26px; }
.ctorbanner--sm h3 { color: #fff; margin: 0 0 4px; font-size: 20px; }
.ctorbanner--sm p { margin: 0; font-size: 14.5px; }

/* Фото начинок */
.fillopt span { display: grid; grid-template-columns: auto 1fr; column-gap: 12px; align-items: center; }
.fillopt span > *:not(img) { grid-column: 2; }
.fillopt img { grid-row: span 2; width: 52px; height: 52px; border-radius: 10px; object-fit: cover; }
.ctor__pic { margin: -28px -28px 18px; position: relative; overflow: hidden; border-radius: 24px 24px 0 0; aspect-ratio: 16 / 10; background: var(--mist); }
.ctor__pic[hidden] { display: none; }
.ctor__pic img { width: 100%; height: 100%; object-fit: cover; opacity: 0; transform: scale(1.06); transition: opacity .45s ease, transform .6s ease; }
.ctor__pic--in img { opacity: 1; transform: none; }
.ctor__pic figcaption { position: absolute; left: 0; right: 0; bottom: 0; padding: 40px 18px 14px; color: #fff; background: linear-gradient(transparent, rgba(30, 26, 64, .82)); }
.ctor__pic figcaption b { display: block; font-size: 17px; }
.ctor__pic figcaption span { font-size: 12.5px; opacity: .9; line-height: 1.4; display: block; }
.fill__item--pic { display: grid; grid-template-columns: 110px 1fr; gap: 16px; align-items: center; padding: 14px; }
.fill__img { display: block; width: 110px; height: 110px; border-radius: 14px; overflow: hidden; cursor: zoom-in; }
.fill__img img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.fill__img:hover img { transform: scale(1.06); }

/* КБЖУ и аллергены */
.kbju { display: block; margin-top: 4px; font-size: 12px; font-style: normal; color: var(--navy-2); font-weight: 600; }
.allerg { display: block; margin-top: 2px; font-size: 12px; color: var(--muted); }
.ctor__pic figcaption .kbju { color: #fff; opacity: .95; }

/* Отзывы */
.reviews { display: grid; grid-template-columns: 1.6fr 1fr; gap: 28px; align-items: start; }
.reviews--one { grid-template-columns: minmax(0, 720px); }
.reviews__ya iframe { display: block; width: 100%; border: 0; border-radius: var(--r); background: #fff; box-shadow: var(--shadow); }
.reviews__src { display: inline-block; margin-top: 12px; font-weight: 600; font-size: 14.5px; text-decoration: none; }
.fwcard { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; background: #fff; border-radius: var(--r); padding: 28px; box-shadow: var(--shadow); text-decoration: none; color: var(--ink); transition: transform .25s; }
.fwcard:hover { transform: translateY(-3px); }
.fwcard .eyebrow { margin: 0; }
.fwcard__rate { font-size: 44px; font-weight: 700; color: var(--navy); letter-spacing: -.03em; line-height: 1; }
.fwcard__rate span { font-size: 18px; color: #f2b01e; letter-spacing: 2px; vertical-align: middle; }
.fwcard__count { color: var(--muted); }
.fwcard__title { font-size: 22px; font-weight: 700; color: var(--navy); letter-spacing: -.02em; line-height: 1.2; }
.fwcard .btn { margin-top: 10px; }
.reviews__custom { margin-top: 28px; }
.tabs a small { opacity: .6; font-weight: 600; margin-left: 2px; }
.fwrow { display: grid; grid-template-columns: minmax(0, 520px); margin-bottom: 24px; }
.rvs { columns: 3 280px; column-gap: 20px; }
.rv { break-inside: avoid; margin: 0 0 20px; background: #fff; border-radius: var(--r); overflow: hidden; box-shadow: var(--shadow); }
.rv__shot { display: block; background: #f3f1f7; }
.rv__shot img { width: 100%; height: auto; }
.rv__body { padding: 18px 20px; }
.rv__body p { margin: 8px 0; font-size: 15px; }
.rv__stars { color: #f2b01e; letter-spacing: 2px; }
.rv__stars span { color: #ddd9e8; }
.rv__who { font-size: 13.5px; color: var(--muted); }
.rv__who b { color: var(--ink); }
.rv__who { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.rv__ava { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; }
.head--group { margin: 48px 0 22px; }
.head--group h2 { font-size: 28px; }
.head--group { align-items: center; flex-wrap: wrap; }
.rv__src { display: inline-flex; align-items: center; margin-top: 12px; padding: 6px 14px; border-radius: 999px; font-size: 13px; font-weight: 700;
  text-decoration: none; background: var(--mist); color: var(--navy); transition: .2s; }
.rv__src:hover { background: var(--navy); color: #fff; }
.rv__src--flowwow { background: #fde7ee; color: #b0315a; }
.rv__src--flowwow:hover { background: #b0315a; color: #fff; }
.rv__shot { cursor: zoom-in; }

/* Лайтбокс: фото поверх сайта */
.lb { position: fixed; inset: 0; z-index: 100; background: rgba(20, 17, 40, .92); display: flex; align-items: center; justify-content: center;
  opacity: 0; transition: opacity .2s; }
.lb.lb--on { opacity: 1; }
.lb[hidden] { display: none; }
.lb img { max-width: min(92vw, 1000px); max-height: 88vh; border-radius: 12px; box-shadow: 0 20px 60px rgba(0, 0, 0, .4); background: #fff; }
.lb button { position: absolute; border: 0; background: rgba(255, 255, 255, .14); color: #fff; width: 48px; height: 48px; border-radius: 50%;
  font-size: 26px; line-height: 48px; cursor: pointer; transition: background .2s; }
.lb button:hover { background: rgba(255, 255, 255, .3); }
.lb__close { top: 16px; right: 16px; }
.lb__prev { left: 16px; top: 50%; transform: translateY(-50%); }
.lb__next { right: 16px; top: 50%; transform: translateY(-50%); }
.lb__count { position: absolute; bottom: 16px; left: 0; right: 0; text-align: center; color: #cfcbe6; font-size: 14px; }
@media (max-width: 560px) { .lb__prev, .lb__next { top: auto; bottom: 8px; transform: none; } .lb__count { bottom: 22px; } }
.rv__answer { margin-top: 10px; padding: 10px 12px; background: var(--mist); border-radius: 12px; font-size: 14px; }

/* Юридические ссылки и предупреждение о cookie */
.foot__legal { display: flex !important; flex-wrap: wrap; gap: 6px 18px; }
.foot__copy { font-size: 12px; color: #8783a8; margin-top: 14px; }
.legal h3 { font-size: 19px; margin-top: 1.6em; }
.legal p, .legal li { font-size: 15.5px; }
.cookie { position: fixed; z-index: 40; left: 16px; right: 16px; bottom: 16px; max-width: 760px; margin: 0 auto; display: flex; gap: 16px; align-items: center;
  background: #fff; border-radius: 18px; padding: 14px 18px; box-shadow: 0 10px 40px rgba(42, 37, 69, .2); font-size: 14px; }
.cookie[hidden] { display: none; }
.cookie p { margin: 0; }
@media (max-width: 560px) { .cookie { flex-direction: column; align-items: stretch; text-align: left; } }

/* Планшеты */
/* «Игра» в подвале — выделена, как в меню */
.foot a.foot__play { display: inline-block; margin-top: 4px; padding: 5px 14px; border-radius: 999px; color: #fff; font-weight: 700;
  background: linear-gradient(135deg, #f29bb5, #b9a3e3); }
.foot a.foot__play:hover { filter: brightness(1.06); color: #fff; }
/* Главная: «Играть» справа от «Кондитерская · Люберцы» — только когда меню свёрнуто (телефон, планшет) */
.hero__top { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.hero__top .eyebrow { margin: 0; }
.hero__play { display: none; padding: 6px 14px; border-radius: 999px; color: #fff; font-weight: 700; font-size: 13px; text-decoration: none;
  background: linear-gradient(135deg, #f29bb5, #b9a3e3); box-shadow: 0 4px 12px rgba(242, 155, 181, .4); }
@media (max-width: 1180px) { .hero__play { display: inline-block; } }

/* Телефон в шапке — только на широких экранах (он есть в меню, подвале и «Контактах») */
@media (max-width: 1440px) {
  .top__phone { display: none; }
  .nav { gap: 18px; }
}
@media (max-width: 1080px) {
  .cats { grid-template-columns: repeat(3, 1fr); }
}
/* Кнопка «Собери свой торт» внизу экрана — только на телефоне, в каталоге и карточках товаров */
.ctorfab { display: none; }
@media (max-width: 900px) {
  .ctorfab { display: flex; align-items: center; justify-content: center; gap: 8px; position: fixed; z-index: 35; left: 12px; right: 12px;
    bottom: calc(12px + env(safe-area-inset-bottom)); padding: 13px 18px; border-radius: 999px; background: var(--navy); color: #fff;
    font-weight: 700; font-size: 15px; text-decoration: none; box-shadow: 0 8px 24px rgba(42, 37, 69, .3); transition: transform .25s ease; }
  .ctorfab--hide { transform: translateY(160%); }
  .ctorfab__ico { font-size: 18px; line-height: 1; }
  body:has(.ctorfab) { padding-bottom: 76px; }
  body:has(.ctorfab) .cookie { bottom: 82px; }
  .ctorbanner--sm { display: none; }   /* верхняя плашка в каталоге на телефоне не нужна — есть кнопка внизу */
}

/* Нижняя плашка конструктора: только на телефоне и планшете */
.ctorbar { display: none; }
@media (max-width: 900px) {
  .ctorbar { display: flex; align-items: center; gap: 12px; position: fixed; z-index: 35; left: 0; right: 0; bottom: 0;
    padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); background: rgba(255, 255, 255, .97); backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px); box-shadow: 0 -6px 24px rgba(42, 37, 69, .14); transition: transform .25s ease; }
  .ctorbar--hide { transform: translateY(110%); }
  .ctorbar img { width: 44px; height: 44px; border-radius: 10px; object-fit: cover; flex: none; }
  .ctorbar__txt { flex: 1; min-width: 0; line-height: 1.2; }
  .ctorbar__txt small { display: block; font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .ctorbar__txt b { font-size: 22px; color: var(--navy); letter-spacing: -.02em; }
  .ctorbar .btn { flex: none; padding: 12px 18px; }
  body.has-ctorbar { padding-bottom: 76px; }
  body.has-ctorbar .cookie { bottom: 86px; }
}
/* Меню «гамбургер» ☰: пунктов много, поэтому включается уже на экранах уже 1180 px */
@media (max-width: 1180px) {
  .burger { display: flex; flex-direction: column; justify-content: center; gap: 5px; width: 44px; height: 44px; cursor: pointer; align-items: center; }
  .burger i { display: block; width: 22px; height: 1.5px; background: var(--navy); transition: .2s; }
  .top__check:checked ~ .burger i:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
  .top__check:checked ~ .burger i:nth-child(2) { opacity: 0; }
  .top__check:checked ~ .burger i:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }
  .top__in { gap: 10px; }
  .cartbtn { margin-left: auto; }
  /* Размытие фона шапки делает её «рамкой» для fixed-меню — на телефоне выключаем, иначе меню не видно */
  .top { background: var(--bg); backdrop-filter: none; -webkit-backdrop-filter: none; }
  .nav { position: fixed; top: 76px; left: 0; right: 0; bottom: 0; flex-direction: column; gap: 0; padding: 12px 20px; background: var(--bg);
    transform: translateX(100%); transition: transform .3s, visibility .3s; visibility: hidden; margin: 0; overflow-y: auto; }
  .top__check:checked ~ .nav { transform: none; visibility: visible; }
  .nav a { font: 600 22px "Manrope", sans-serif; letter-spacing: -.01em; color: var(--navy); padding: 14px 0; border-bottom: 1px solid var(--line); }
  .nav a::after { display: none; }
  .nav__phone { display: block; font-family: "Manrope", sans-serif !important; font-size: 18px !important; font-weight: 700 !important; border: 0 !important; margin-top: 12px; }
  .nav { align-items: stretch !important; }
  .nav__play { align-self: flex-start; margin: 6px 0; padding: 12px 22px !important; font-size: 18px !important; font-family: "Manrope", sans-serif !important; font-weight: 700 !important; border: 0 !important; }
  .nav__ctor { align-self: flex-start; margin: 14px 0 6px; padding: 12px 22px !important; font-size: 18px !important; font-family: "Manrope", sans-serif !important; font-weight: 700 !important; border: 0 !important; }
  body:has(#menu:checked) { overflow: hidden; }            /* пока меню открыто, страница под ним не листается */
  body:has(#menu:checked) .ctorfab, body:has(#menu:checked) .ctorbar { display: none; }
}
@media (max-width: 900px) {
  .hero__in, .product, .cart, .about, .contacts, .meet, .reviews, .ctor, .ctorbanner { grid-template-columns: 1fr; gap: 36px; }
  .ctor__sum { position: static; }
  .ctorbanner { gap: 0; }
  .ctorbanner img { max-height: 260px; }
  .meet img { max-width: 260px; margin: 0 auto; }
  /* Телефон и планшет: сначала заголовок и кнопки, фото ниже — целиком, без высокой арки */
  .hero { padding: 24px 0 48px; }
  .hero__in { gap: 28px; }
  .hero__img { max-width: 560px; width: 100%; margin: 0 auto; }
  .hero__img > img:first-child { aspect-ratio: 3 / 2; border-radius: 24px; object-position: 50% 50%; }
  .hero__badge { left: auto; right: 14px; bottom: -22px; width: 78px; height: 78px; }
  .about__side { max-width: 320px; margin: 0 auto; }
  .about__badge { right: -8px; width: 88px; height: 88px; }
  .steps { grid-template-columns: 1fr 1fr; }
  .promise { grid-template-columns: 1fr; gap: 24px; }
  .foot__in { grid-template-columns: 1fr 1fr; }
  .foot__in > div:first-child { grid-column: 1 / -1; }
  .checkout, .product__img img { position: static; }
  /* Телефон/планшет: фото товара меньше и в своих пропорциях — десерт виден полностью */
  .product__img { text-align: center; }
  .product__img img { width: auto; max-width: 100%; max-height: 46vh; aspect-ratio: auto; object-fit: contain; margin: 0 auto; border-radius: 20px; }
  .block { padding: 64px 0; }
}
/* Телефоны */
@media (max-width: 560px) {
  .wrap { padding: 0 16px; }
  .brand span { font-size: 15px; max-width: 140px; }
  .brand img { width: 40px; height: 40px; }
  .hero__btns .btn { flex: 1 1 100%; }
  .hero__sub { margin-bottom: 24px; font-size: 16.5px; }
  .cats { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; }
  .cat__name { font-size: 16px; }
  .grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; }
  .card__body { padding: 12px 12px 14px; }
  .card h3 { font-size: 16.5px; }
  .card__foot { flex-direction: column; align-items: stretch; gap: 8px; }
  .card__foot .btn { width: 100%; }
  .fills, .row2, .types { grid-template-columns: 1fr; }
  .step { padding: 20px 18px; }
  .weight { flex-direction: column; align-items: stretch; gap: 8px; }
  .weight__val { text-align: left; }
  .ctorbanner__text { padding: 30px 24px; }
  .ctorbanner--sm { grid-template-columns: 1fr; gap: 14px; }
  .line { grid-template-columns: 64px 1fr auto; gap: 12px; }
  .line img { width: 64px; height: 64px; }
  .line__qty { grid-column: 2; justify-self: start; }
  .line__sum { grid-column: 3; grid-row: 1; }
  .line form:last-child { grid-column: 3; grid-row: 2; justify-self: end; }
  .steps { grid-template-columns: 1fr; }
  .callout { padding: 32px 24px; border-radius: 24px; }
  .checkout { padding: 22px; }
  .foot__in { grid-template-columns: 1fr; }
  .head { flex-direction: column; gap: 4px; }
}
