/* ==========================================================================
   Ди Сладос Ди — основные стили
   Палитра построена от логотипа: мятно-розовый градиент, антиква,
   кремовый фон и шоколадный подвал.
   ========================================================================== */

/* ---------- 1. Переменные ---------- */
:root {
  --ds-cream: #fbf6ef;
  --ds-milk: #fffdf9;
  --ds-mint: #a9d9cc;
  --ds-mint-soft: #e3f3ee;
  --ds-mint-dark: #3f8f7c;
  --ds-rose: #f4c9d6;
  --ds-rose-soft: #fbe9ef;
  --ds-raspberry: #c8285f;
  --ds-raspberry-dark: #a61d4e;
  --ds-caramel: #c98c4f;
  --ds-caramel-soft: #f6e6d3;
  --ds-choco: #3b2a24;
  --ds-choco-deep: #2a1d18;
  --ds-text: #3b2a24;
  --ds-muted: #7a6760;
  --ds-line: #eadfd5;

  --ds-grad: linear-gradient(120deg, #cfe9e2 0%, #ede3e6 50%, #f6d6e1 100%);
  --ds-radius: 22px;
  --ds-radius-sm: 14px;
  --ds-shadow: 0 10px 30px -12px rgba(30, 30, 36, .18);
  --ds-shadow-lg: 0 24px 50px -20px rgba(30, 30, 36, .28);
  --ds-ease: cubic-bezier(.22, .8, .3, 1);

  --font-head: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --font-body: 'Nunito', 'Segoe UI', Arial, sans-serif;

  /* Bootstrap overrides */
  --bs-body-font-family: var(--font-body);
  --bs-body-color: var(--ds-text);
  --bs-body-bg: var(--ds-cream);
  --bs-link-color: var(--ds-raspberry);
  --bs-link-color-rgb: 200, 40, 95;
  --bs-link-hover-color: var(--ds-raspberry-dark);
  --bs-border-radius: var(--ds-radius-sm);
  --bs-focus-ring-color: rgba(200, 40, 95, .25);
}

/* ---------- 2. База ---------- */
html { scroll-behavior: smooth; }
[id] { scroll-margin-top: 96px; }
body {
  animation: pageIn .5s ease both;
  font-family: var(--font-body);
  background: var(--ds-cream);
  color: var(--ds-text);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4, .h1, .h2, .h3, .h4, .font-head {
  font-family: var(--font-head);
  font-weight: 600;
  color: var(--ds-choco);
  letter-spacing: -.01em;
}
.text-muted, .ds-muted { color: var(--ds-muted) !important; }
a { text-decoration: none; }
img { max-width: 100%; }
::selection { background: var(--ds-rose); color: var(--ds-choco); }

.ds-script { /* надзаголовок секции */
  display: inline-flex; align-items: center; gap: .7rem;
  font-family: var(--font-body); font-size: .76rem; font-weight: 800; letter-spacing: .22em; text-transform: uppercase;
  color: var(--ds-raspberry); line-height: 1.2;
}
.ds-script::before { content: ''; width: 28px; height: 1.5px; background: currentColor; opacity: .55; flex-shrink: 0; }
.section-head .ds-script::after { content: ''; width: 28px; height: 1.5px; background: currentColor; opacity: .55; }
.section { padding: 80px 0; }
.section-sm { padding: 48px 0; }
.section-head { max-width: 640px; margin: 0 auto 40px; text-align: center; }
.section-head h2, .section-row h2 { font-size: clamp(1.85rem, 3.6vw, 2.75rem); margin: .55rem 0 .5rem; }
.section-row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 1rem; margin-bottom: 1.2rem; }
.section-row h2 { margin-bottom: 0; }
.section-head p { color: var(--ds-muted); margin: 0; }
.bg-milk { background: var(--ds-milk); }
.bg-grad { background: var(--ds-grad); }

/* Изображения с ленивой загрузкой проявляются плавно */
img[loading="lazy"] { opacity: 0; transition: opacity .5s ease; }
img[loading="lazy"].is-loaded { opacity: 1; }

@keyframes pageIn { from { opacity: 0; } to { opacity: 1; } }
/* место под шапку, пока она не отрисована скриптом (без «прыжка» страницы) */
#site-header { display: block; min-height: 134px; }

/* Статичные ссылки до загрузки скрипта (для поисковиков и при выключенном JavaScript) */
.seo-nav { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: .4rem 1.4rem; min-height: 100%; padding: 1rem; font-weight: 700; }
.seo-nav a { color: var(--ds-choco); }
.seo-nav a:first-child { font-family: var(--font-head); font-size: 1.3rem; }
.seo-footer { background: var(--ds-choco-deep); color: #d9cbc2; padding: 2rem 1rem; text-align: center; font-size: .9rem; }
.seo-footer a { color: #fff; }
.noscript-note { background: var(--ds-rose-soft); color: var(--ds-choco); text-align: center; padding: .8rem 1rem; font-weight: 700; }
/* Ловушка для спам-ботов: поле вне экрана */
.hp-field { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }

/* ---------- 3. Кнопки ---------- */
.btn { border-radius: 999px; font-weight: 700; padding: .7rem 1.5rem; transition: all .25s var(--ds-ease); }
.btn-ds {
  --bs-btn-color: #fff;
  --bs-btn-bg: var(--ds-raspberry);
  --bs-btn-border-color: var(--ds-raspberry);
  --bs-btn-hover-color: #fff;
  --bs-btn-hover-bg: var(--ds-raspberry-dark);
  --bs-btn-hover-border-color: var(--ds-raspberry-dark);
  --bs-btn-active-bg: var(--ds-raspberry-dark);
  --bs-btn-active-color: #fff;
  --bs-btn-disabled-bg: #d98aa6;
  --bs-btn-disabled-border-color: #d98aa6;
  box-shadow: 0 8px 20px -8px rgba(200, 40, 95, .55);
}
.btn-ds:hover { transform: translateY(-2px); box-shadow: 0 12px 26px -10px rgba(200, 40, 95, .6); }
.btn-ds-outline {
  --bs-btn-color: var(--ds-choco);
  --bs-btn-border-color: var(--ds-choco);
  --bs-btn-hover-color: #fff;
  --bs-btn-hover-bg: var(--ds-choco);
  --bs-btn-hover-border-color: var(--ds-choco);
  --bs-btn-active-bg: var(--ds-choco);
  --bs-btn-active-color: #fff;
  border-width: 1.5px;
}
.btn-ds-light {
  --bs-btn-color: var(--ds-choco);
  --bs-btn-bg: #fff;
  --bs-btn-border-color: #fff;
  --bs-btn-hover-bg: var(--ds-rose-soft);
  --bs-btn-hover-border-color: var(--ds-rose-soft);
  --bs-btn-hover-color: var(--ds-choco);
}
.btn-ghost-light {
  --bs-btn-color: #fff; --bs-btn-border-color: rgba(255, 255, 255, .45);
  --bs-btn-hover-color: var(--ds-choco); --bs-btn-hover-bg: #fff; --bs-btn-hover-border-color: #fff;
  --bs-btn-active-bg: #fff; --bs-btn-active-color: var(--ds-choco); border-width: 1.5px;
}
.btn-mint {
  --bs-btn-color: #fff;
  --bs-btn-bg: var(--ds-mint-dark);
  --bs-btn-border-color: var(--ds-mint-dark);
  --bs-btn-hover-color: #fff;
  --bs-btn-hover-bg: #327665;
  --bs-btn-hover-border-color: #327665;
}
.btn-icon {
  width: 44px; height: 44px; padding: 0; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 1.15rem;
}
.btn-sm { padding: .45rem 1rem; }

/* ---------- 4. Шапка ---------- */
.topbar {
  background: var(--ds-choco);
  color: #f3e7dd;
  font-size: .85rem;
  padding: 6px 0;
}
.topbar a { color: #f3e7dd; }
.topbar a:hover { color: #fff; }
.topbar .sep { opacity: .35; margin: 0 .6rem; }

.open-status { display: inline-flex; align-items: center; gap: .45rem; font-weight: 700; }
.open-status .dot { width: 8px; height: 8px; border-radius: 50%; background: #9aa; }
.open-status.is-open .dot { background: #57d18f; box-shadow: 0 0 0 0 rgba(87, 209, 143, .7); animation: pulse 2s infinite; }
.open-status.is-closed .dot { background: #ff7a8a; }
@keyframes pulse { 70% { box-shadow: 0 0 0 8px rgba(87, 209, 143, 0); } 100% { box-shadow: 0 0 0 0 rgba(87, 209, 143, 0); } }

.site-header {
  position: sticky; top: 0; z-index: 1030;
  background: rgba(255, 253, 249, .88);
  backdrop-filter: saturate(1.4) blur(14px);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid transparent;
  transition: box-shadow .3s, border-color .3s;
}
.site-header.is-scrolled { box-shadow: 0 6px 24px -14px rgba(30, 30, 36, .35); border-color: var(--ds-line); }
.site-header .navbar { padding: 10px 0; }
.brand { display: flex; align-items: center; gap: .65rem; color: var(--ds-choco); }
.brand img { width: 68px; height: 68px; border-radius: 50%; box-shadow: 0 4px 14px -6px rgba(0, 0, 0, .3); }
.brand-name { font-family: var(--font-head); font-size: 1.35rem; font-weight: 700; line-height: 1; white-space: nowrap; }
.brand-sub { display: block; font-size: .72rem; font-family: var(--font-body); color: var(--ds-muted); letter-spacing: .08em; text-transform: uppercase; margin-top: 4px; }
.site-header .nav-link {
  color: var(--ds-choco); font-weight: 700; font-size: .95rem;
  padding: .5rem .85rem !important; border-radius: 999px; position: relative;
}
.site-header .nav-link:hover { color: var(--ds-raspberry); }
.site-header .nav-link.active { color: var(--ds-raspberry); background: var(--ds-rose-soft); }

.header-search { position: relative; }
.header-search .form-control {
  border-radius: 999px; padding-left: 2.4rem; border-color: var(--ds-line);
  background: #fff; min-width: 210px; font-size: .92rem;
}
.header-search .bi-search { position: absolute; left: .95rem; top: 50%; transform: translateY(-50%); color: var(--ds-muted); pointer-events: none; }
.search-suggest {
  position: absolute; top: calc(100% + 6px); left: 0; right: 0; z-index: 50;
  background: #fff; border-radius: var(--ds-radius-sm); box-shadow: var(--ds-shadow-lg);
  overflow: hidden; display: none; min-width: 280px;
}
.search-suggest.show { display: block; }
.search-suggest a { display: flex; align-items: center; gap: .7rem; padding: .55rem .8rem; color: var(--ds-text); }
.search-suggest a:hover, .search-suggest a.active { background: var(--ds-rose-soft); }
.search-suggest img { width: 40px; height: 40px; border-radius: 10px; object-fit: cover; }
.search-suggest .empty { padding: .8rem; color: var(--ds-muted); font-size: .9rem; }

.header-icon {
  position: relative; width: 44px; height: 44px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--ds-choco); font-size: 1.25rem; background: transparent; border: 0;
  transition: background .2s;
}
.header-icon:hover { background: var(--ds-rose-soft); color: var(--ds-raspberry); }
.badge-count {
  position: absolute; top: 2px; right: 0;
  min-width: 19px; height: 19px; padding: 0 5px; border-radius: 10px;
  background: var(--ds-raspberry); color: #fff; font-size: .7rem; font-weight: 800;
  display: inline-flex; align-items: center; justify-content: center;
  transform: scale(0); transition: transform .3s var(--ds-ease);
}
.badge-count.has { transform: scale(1); }
.badge-count.bump { animation: bump .45s var(--ds-ease); }
@keyframes bump { 40% { transform: scale(1.4); } 100% { transform: scale(1); } }
.navbar-toggler { border: 0; font-size: 1.6rem; padding: .25rem .5rem; color: var(--ds-choco); }
.navbar-toggler:focus { box-shadow: none; }

/* ---------- 5. Первый экран ---------- */
.hero {
  position: relative; overflow: hidden;
  background: var(--ds-grad);
  padding: 70px 0 90px;
}
.hero::before, .hero::after {
  content: ''; position: absolute; border-radius: 50%; filter: blur(10px); opacity: .55; pointer-events: none;
}
.hero::before { width: 420px; height: 420px; background: #fff; top: -160px; left: -120px; }
.hero::after { width: 300px; height: 300px; background: var(--ds-rose); bottom: -140px; right: 30%; }
.hero h1 { font-size: clamp(2.3rem, 5.4vw, 4.2rem); line-height: 1.08; margin: .6rem 0 1.2rem; }
.hero h1 em { font-style: italic; color: var(--ds-raspberry); }
.hero .lead { font-size: 1.12rem; color: #4a4a50; max-width: 520px; }
.hero .ds-script { margin-bottom: .4rem; }
.hero-stats { display: flex; flex-wrap: wrap; gap: 0; margin: 2.6rem 0 0; }
.hero-stats > div { padding: 0 1.6rem; border-left: 1px solid rgba(30, 30, 36, .15); }
.hero-stats > div:first-child { padding-left: 0; border-left: 0; }
.hero-stats dt { font-family: var(--font-head); font-size: 1.7rem; font-weight: 600; color: var(--ds-choco); line-height: 1.1; }
.hero-stats dd { margin: .3rem 0 0; font-size: .82rem; color: var(--ds-muted); line-height: 1.35; }
.hero-ring { /* тонкое декоративное кольцо за фото */
  position: absolute; inset: -5% -8% 8% 3%; border: 1.5px dashed rgba(200, 40, 95, .28); border-radius: 260px 260px 40px 40px;
  transform: rotate(-4deg); pointer-events: none;
}
.hero-visual { position: relative; max-width: 470px; margin: 0 auto; }
.hero-main {
  border-radius: 240px 240px 32px 32px; overflow: hidden; aspect-ratio: 3 / 4;
  box-shadow: var(--ds-shadow-lg); border: 8px solid #fff; background: #fff;
}
.hero-main img { width: 100%; height: 100%; object-fit: cover; }
.hero-float {
  position: absolute; border-radius: 50%; overflow: hidden; border: 6px solid #fff;
  box-shadow: var(--ds-shadow-lg); animation: floaty 6s ease-in-out infinite;
}
.hero-float img { width: 100%; height: 100%; object-fit: cover; }
.hero-float.f1 { width: 34%; aspect-ratio: 1; left: -12%; bottom: 14%; }
.hero-float.f2 { width: 28%; aspect-ratio: 1; right: -8%; top: 10%; animation-delay: -3s; }
.hero-tag {
  position: absolute; right: -6%; bottom: 7%; background: rgba(255, 255, 255, .96); border-radius: 18px;
  padding: .7rem 1.1rem .7rem .7rem; box-shadow: var(--ds-shadow-lg); display: flex; align-items: center; gap: .7rem;
  font-size: .9rem; line-height: 1.2; animation: floaty 7s ease-in-out infinite; animation-delay: -1.5s;
}
.hero-tag b { display: block; color: var(--ds-choco); }
.hero-tag small { color: var(--ds-muted); }
.hero-tag-icon { width: 40px; height: 40px; border-radius: 12px; background: var(--ds-rose-soft); color: var(--ds-raspberry); display: inline-flex; align-items: center; justify-content: center; font-size: 1.1rem; }

/* Бегущая строка */
.marquee { background: var(--ds-choco); color: #f6e9e1; overflow: hidden; padding: 16px 0; }
.marquee-track { display: flex; width: max-content; gap: 2rem; animation: marquee 40s linear infinite; align-items: center; }
.marquee span { font-family: var(--font-head); font-style: italic; font-size: 1.25rem; white-space: nowrap; }
.marquee i { font-style: normal; color: var(--ds-rose); font-size: .9rem; }
@keyframes marquee { to { transform: translateX(-50%); } }
@keyframes floaty { 50% { transform: translateY(-12px); } }

/* ---------- 6. Преимущества ---------- */
.feature {
  background: #fff; border-radius: var(--ds-radius); padding: 28px 24px; height: 100%;
  box-shadow: var(--ds-shadow); transition: transform .35s var(--ds-ease), box-shadow .35s;
}
.feature:hover { transform: translateY(-6px); box-shadow: var(--ds-shadow-lg); }
.feature-icon {
  width: 60px; height: 60px; border-radius: 18px; display: flex; align-items: center; justify-content: center;
  font-size: 1.6rem; margin-bottom: 1rem;
}
.feature h3 { font-size: 1.2rem; margin-bottom: .4rem; }
.feature p { color: var(--ds-muted); margin: 0; font-size: .95rem; }
.fi-rose { background: var(--ds-rose-soft); color: var(--ds-raspberry); }
.fi-mint { background: var(--ds-mint-soft); color: var(--ds-mint-dark); }
.fi-caramel { background: var(--ds-caramel-soft); color: var(--ds-caramel); }
.fi-choco { background: #ececef; color: var(--ds-choco); }

/* ---------- 7. Карточка товара ---------- */
.product-card {
  --accent: var(--ds-raspberry);
  position: relative; background: #fff; border-radius: var(--ds-radius);
  box-shadow: var(--ds-shadow); overflow: hidden; height: 100%;
  display: flex; flex-direction: column;
  transition: transform .4s var(--ds-ease), box-shadow .4s;
}
.product-card::after { /* цветная полоса-акцент снизу */
  content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 5px; background: var(--accent);
}
.product-card::before { /* мягкое свечение акцентного цвета */
  content: ''; position: absolute; left: 10%; right: 10%; bottom: -40px; height: 80px;
  background: var(--accent); filter: blur(40px); opacity: .22; transition: opacity .4s; pointer-events: none;
}
.product-card:hover { transform: translateY(-6px); box-shadow: 0 26px 50px -22px color-mix(in srgb, var(--accent) 55%, transparent); }
.product-card:hover::before { opacity: .38; }
.pc-media { position: relative; aspect-ratio: 4 / 5; overflow: hidden; background: color-mix(in srgb, var(--accent) 12%, #fff); }
.pc-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .7s var(--ds-ease), opacity .5s; }
.product-card:hover .pc-media img { transform: scale(1.07); }
.pc-badges { position: absolute; top: 12px; left: 12px; display: flex; flex-direction: column; gap: 6px; z-index: 2; }
.pc-badge {
  background: #fff; color: var(--ds-choco); font-size: .74rem; font-weight: 800;
  padding: .25rem .65rem; border-radius: 999px; box-shadow: 0 4px 12px -6px rgba(0, 0, 0, .3);
}
.pc-badge.hit { background: var(--accent-strong); color: #fff; }
.pc-fav {
  position: absolute; top: 10px; right: 10px; z-index: 2;
  width: 40px; height: 40px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .92);
  color: var(--ds-choco); display: flex; align-items: center; justify-content: center; font-size: 1.1rem;
  transition: transform .25s, color .25s;
}
.pc-fav:hover { transform: scale(1.1); color: var(--ds-raspberry); }
.pc-fav.is-active { color: var(--ds-raspberry); }
.pc-quick {
  position: absolute; left: 50%; bottom: 14px; transform: translate(-50%, 12px); opacity: 0; z-index: 2;
  background: rgba(255, 255, 255, .94); color: var(--ds-choco); border: 0; border-radius: 999px;
  padding: .45rem 1rem; font-weight: 700; font-size: .85rem; white-space: nowrap;
  transition: all .3s var(--ds-ease);
}
.product-card:hover .pc-quick, .pc-quick:focus { opacity: 1; transform: translate(-50%, 0); }
.pc-body { padding: 18px 18px 22px; display: flex; flex-direction: column; flex: 1; position: relative; z-index: 1; }
.pc-cat { font-size: .76rem; text-transform: uppercase; letter-spacing: .08em; color: var(--accent-strong, var(--accent)); font-weight: 800; }
.pc-title { font-family: var(--font-head); font-size: 1.15rem; font-weight: 600; margin: .3rem 0 .4rem; line-height: 1.25; }
.pc-title a { color: var(--ds-choco); }
.pc-title a:hover { color: var(--accent); }
.pc-short { color: var(--ds-muted); font-size: .88rem; margin-bottom: .9rem; }
.pc-price { margin-top: auto; display: flex; align-items: baseline; gap: .5rem; flex-wrap: wrap; }
.pc-price strong { font-size: 1.25rem; font-weight: 800; }
.pc-price small { color: var(--ds-muted); font-size: .8rem; }
.pc-actions { display: flex; gap: .5rem; margin-top: .9rem; }
.pc-actions .btn { flex: 1; padding: .55rem .5rem; font-size: .84rem; white-space: nowrap; }
/* затемнённый акцент — чтобы белый текст читался на любом цвете */
.product-card { --accent-strong: color-mix(in srgb, var(--accent) 72%, #2a1d18); }
.pc-actions .btn-cart { background: var(--accent-strong); border-color: var(--accent-strong); color: #fff; }
.pc-actions .btn-cart:hover { filter: brightness(.92); color: #fff; }

/* ---------- 8. Карусель хитов ---------- */
.ds-carousel { position: relative; }
.ds-track {
  display: grid; grid-auto-flow: column; grid-auto-columns: calc((100% - 3 * 24px) / 4);
  gap: 24px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth;
  padding: 10px 4px 34px; scrollbar-width: none;
}
.ds-track::-webkit-scrollbar { display: none; }
.ds-track > * { scroll-snap-align: start; }
.ds-nav { display: flex; gap: .5rem; justify-content: center; }
.ds-nav button {
  width: 48px; height: 48px; border-radius: 50%; border: 1.5px solid var(--ds-choco); background: transparent;
  color: var(--ds-choco); font-size: 1.1rem; transition: all .2s;
}
.ds-nav button:hover { background: var(--ds-choco); color: #fff; }

/* ---------- 9. Категории ---------- */
.cat-tile {
  position: relative; display: block; border-radius: var(--ds-radius); overflow: hidden; aspect-ratio: 3 / 4;
  box-shadow: var(--ds-shadow); color: #fff;
}
.cat-tile img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ds-ease); }
.cat-tile::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(20, 20, 24, 0) 45%, rgba(20, 20, 24, .78) 100%);
}
.cat-tile span {
  position: absolute; left: 18px; right: 18px; bottom: 16px; z-index: 1;
  font-family: var(--font-head); font-size: 1.25rem; font-weight: 600; display: flex; justify-content: space-between; align-items: center;
}
.cat-tile span i { width: 34px; height: 34px; border-radius: 50%; background: rgba(255, 255, 255, .25); display: inline-flex; align-items: center; justify-content: center; font-size: .95rem; transition: background .3s; }
.cat-tile:hover img { transform: scale(1.08); }
.cat-tile:hover span i { background: var(--ds-raspberry); }
.cat-tile.wide { aspect-ratio: auto; height: 100%; min-height: 260px; }

/* ---------- 10. Конструктор торта ---------- */
.builder { background: #fff; border-radius: 30px; box-shadow: var(--ds-shadow-lg); overflow: hidden; }
.builder-steps { display: flex; gap: 6px; padding: 22px 22px 0; overflow-x: auto; scrollbar-width: none; }
.builder-steps::-webkit-scrollbar { display: none; }
.builder-step-dot {
  flex: 1 0 auto; border: 0; background: var(--ds-cream); color: var(--ds-muted);
  border-radius: 999px; padding: .45rem .9rem; font-size: .82rem; font-weight: 800; white-space: nowrap;
  transition: all .25s;
}
.builder-step-dot .n { display: inline-flex; width: 20px; height: 20px; border-radius: 50%; background: #fff; align-items: center; justify-content: center; margin-right: .35rem; font-size: .72rem; }
.builder-step-dot.done { background: var(--ds-mint-soft); color: var(--ds-mint-dark); }
.builder-step-dot.active { background: var(--ds-raspberry); color: #fff; }
.builder-step-dot.active .n { color: var(--ds-raspberry); }
.builder-body { padding: 26px; min-height: 330px; }
.builder-pane { display: none; animation: fadeUp .45s var(--ds-ease); }
.builder-pane.active { display: block; }
.builder-pane h3 { font-size: 1.5rem; margin-bottom: .3rem; }
.builder-summary { background: var(--ds-grad); padding: 26px; height: 100%; display: flex; flex-direction: column; }
.builder-summary dl { margin: 0 0 1rem; font-size: .93rem; }
.builder-summary dt { font-weight: 600; color: var(--ds-muted); font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; }
.builder-summary dd { font-weight: 700; margin-bottom: .55rem; }
.builder-total { margin-top: auto; background: rgba(255, 255, 255, .8); border-radius: 18px; padding: 16px 18px; }
.builder-total strong { font-size: 1.8rem; font-family: var(--font-head); color: var(--ds-raspberry); }
@keyframes fadeUp { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* Плитки-варианты (используются в конструкторе и на странице товара) */
.choice-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.choice { position: relative; margin: 0; }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice > span {
  display: flex; flex-direction: column; gap: 2px; justify-content: center; height: 100%;
  border: 1.5px solid var(--ds-line); border-radius: var(--ds-radius-sm); padding: .7rem .9rem;
  cursor: pointer; font-weight: 700; background: #fff; transition: all .2s; line-height: 1.25;
}
.choice > span > i { font-size: 1.4rem; color: var(--ds-raspberry); margin-bottom: .2rem; }
.choice > span > small, .choice .pay-text small { font-weight: 600; color: var(--ds-muted); font-size: .78rem; }
.choice > span:hover { border-color: var(--ds-rose); background: var(--ds-rose-soft); }
.choice input:checked + span { border-color: var(--ds-raspberry); background: var(--ds-rose-soft); box-shadow: 0 0 0 3px rgba(200, 40, 95, .12); }
.choice input:focus-visible + span { outline: 2px solid var(--ds-raspberry); outline-offset: 2px; }
.choice-pills { display: flex; flex-wrap: wrap; gap: 8px; }
.choice-pills .choice > span { flex-direction: row; align-items: center; gap: .4rem; padding: .5rem .95rem; border-radius: 999px; font-size: .9rem; }

/* Ползунок веса */
.weight-box { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.weight-box .form-range { flex: 1 1 220px; }
.form-range::-webkit-slider-thumb { background: var(--ds-raspberry); width: 22px; height: 22px; margin-top: -7px; }
.form-range::-moz-range-thumb { background: var(--ds-raspberry); width: 22px; height: 22px; }
.form-range::-webkit-slider-runnable-track { background: var(--ds-rose); height: 8px; }
.form-range::-moz-range-track { background: var(--ds-rose); height: 8px; }
.qty, .weight-input {
  display: inline-flex; align-items: center; border: 1.5px solid var(--ds-line); border-radius: 999px; background: #fff; overflow: hidden;
}
.qty button, .weight-input button { border: 0; background: transparent; width: 38px; height: 40px; font-size: 1.1rem; color: var(--ds-choco); }
.qty button:hover, .weight-input button:hover { background: var(--ds-rose-soft); }
.qty input, .weight-input input { width: 54px; border: 0; text-align: center; font-weight: 800; background: transparent; -moz-appearance: textfield; appearance: textfield; }
.qty input::-webkit-inner-spin-button, .weight-input input::-webkit-inner-spin-button { -webkit-appearance: none; }

/* ---------- 11. Отзывы ---------- */
.review {
  background: #fff; border-radius: var(--ds-radius); padding: 26px; box-shadow: var(--ds-shadow); height: 100%;
  position: relative;
}
.review::before { content: '“'; position: absolute; top: -6px; right: 22px; font-family: var(--font-head); font-size: 6rem; color: var(--ds-rose); line-height: 1; }
.review .stars { color: #f5b301; letter-spacing: 2px; }
.review p { margin: .8rem 0 1.2rem; }
.review-author { display: flex; align-items: center; gap: .7rem; }
.review-avatar { width: 44px; height: 44px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 800; color: #fff; background: var(--ds-mint-dark); }
.review-author small { display: block; color: var(--ds-muted); }
.reviews-track { grid-auto-columns: calc((100% - 2 * 24px) / 3); }

/* ---------- 12. Баннер «Торт по фото», шаги, FAQ ---------- */
.cta-banner {
  display: grid; grid-template-columns: 1.25fr 1fr; border-radius: 32px; overflow: hidden; position: relative;
  background: linear-gradient(120deg, #2f2320 0%, #4a2f2b 55%, #6d3346 100%); color: #fff; box-shadow: var(--ds-shadow-lg);
}
.cta-text { padding: clamp(28px, 5vw, 60px); align-self: center; position: relative; z-index: 2; }
.cta-text h2 { color: #fff; font-size: clamp(1.9rem, 3.6vw, 2.8rem); margin: .7rem 0 1rem; }
.cta-text p { color: #e6d6cf; margin-bottom: 1.8rem; max-width: 520px; }
.cta-text .ds-script { color: var(--ds-rose); }
.cta-media { position: relative; min-height: 340px; }
.cta-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cta-media::before { content: ''; position: absolute; inset: 0; z-index: 1; background: linear-gradient(90deg, #4f312d 0%, rgba(79, 49, 45, 0) 40%); }

.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.steps li { position: relative; background: #fff; border-radius: var(--ds-radius); padding: 30px 24px 26px; box-shadow: var(--ds-shadow); overflow: hidden; transition: transform .35s var(--ds-ease); }
.steps li:hover { transform: translateY(-5px); }
.steps li > i { font-size: 1.7rem; color: var(--ds-raspberry); display: block; margin-bottom: .9rem; position: relative; }
.steps h3 { font-size: 1.25rem; margin-bottom: .35rem; position: relative; }
.steps p { color: var(--ds-muted); font-size: .93rem; margin: 0; position: relative; }
.steps-n { position: absolute; top: 10px; right: 18px; font-family: var(--font-head); font-size: 3.4rem; font-weight: 700; color: var(--ds-rose-soft); line-height: 1; }

.faq .accordion-item { border: 0; background: #fff; border-radius: var(--ds-radius-sm) !important; margin-bottom: 12px; box-shadow: var(--ds-shadow); overflow: hidden; }
.faq .accordion-button { font-family: var(--font-head); font-weight: 600; font-size: 1.08rem; color: var(--ds-choco); background: #fff; padding: 1.15rem 1.4rem; box-shadow: none; }
.faq .accordion-button:not(.collapsed) { color: var(--ds-raspberry); background: #fff; }
.faq .accordion-button:focus { box-shadow: 0 0 0 .2rem rgba(200, 40, 95, .15); }
.faq .accordion-button::after { background-image: none; content: '\F64D'; font-family: 'bootstrap-icons'; width: auto; height: auto; transition: transform .3s; color: var(--ds-raspberry); }
.faq .accordion-button:not(.collapsed)::after { background-image: none; transform: rotate(45deg); }
.faq .accordion-body { padding: 0 1.4rem 1.3rem; color: #4a4a50; }

/* ---------- 13. Галерея ---------- */
.gallery { columns: 4 220px; column-gap: 16px; }
.gallery a { display: block; margin-bottom: 16px; border-radius: var(--ds-radius-sm); overflow: hidden; position: relative; break-inside: avoid; }
.gallery img { width: 100%; display: block; transition: transform .7s var(--ds-ease); }
.gallery a::after {
  content: '\F52A'; font-family: 'bootstrap-icons'; position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 1.8rem; background: rgba(30, 30, 36, .35); opacity: 0; transition: opacity .3s;
}
.gallery a:hover img { transform: scale(1.06); }
.gallery a:hover::after { opacity: 1; }

/* ---------- 14. Заголовок внутренних страниц ---------- */
.page-hero { background: var(--ds-grad); padding: 46px 0 40px; position: relative; overflow: hidden; }
.page-hero h1 { font-size: clamp(2rem, 4.5vw, 3rem); margin: .3rem 0 0; }
.page-hero p { color: #4a4a50; margin: .6rem 0 0; max-width: 640px; }
.breadcrumb { font-size: .88rem; margin: 0; }
.breadcrumb a { color: var(--ds-muted); }
.breadcrumb-item.active { color: var(--ds-choco); }

/* ---------- 15. Каталог ---------- */
.filters { background: #fff; border-radius: var(--ds-radius); padding: 22px; box-shadow: var(--ds-shadow); position: sticky; top: 96px; }
.filters h6 { font-family: var(--font-body); font-weight: 800; font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; color: var(--ds-muted); margin: 1.2rem 0 .6rem; }
.filters h6:first-child { margin-top: 0; }
.filter-cats .choice > span { padding: .45rem .8rem; font-size: .88rem; }
.form-control, .form-select { border-radius: var(--ds-radius-sm); border-color: var(--ds-line); padding: .65rem .95rem; }
.form-select { padding-right: 2.4rem; }
.form-control:focus, .form-select:focus { border-color: var(--ds-raspberry); box-shadow: 0 0 0 .2rem rgba(200, 40, 95, .15); }
.form-check-input:checked { background-color: var(--ds-raspberry); border-color: var(--ds-raspberry); }
.form-check-input:focus { box-shadow: 0 0 0 .2rem rgba(200, 40, 95, .15); border-color: var(--ds-raspberry); }
.form-label { font-weight: 700; font-size: .9rem; margin-bottom: .35rem; }
.catalog-toolbar { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; margin-bottom: 22px; }
.catalog-empty { text-align: center; padding: 60px 20px; background: #fff; border-radius: var(--ds-radius); }
.catalog-empty i { font-size: 3rem; color: var(--ds-rose); }
.cat-chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; scrollbar-width: none; }
.cat-chips::-webkit-scrollbar { display: none; }
.cat-chips .choice > span { white-space: nowrap; }

/* ---------- 16. Страница товара ---------- */
.pp-gallery { position: sticky; top: 100px; }
.pp-main { position: relative; border-radius: var(--ds-radius); overflow: hidden; aspect-ratio: 4 / 5; background: #fff; box-shadow: var(--ds-shadow); cursor: zoom-in; }
.pp-main img { width: 100%; height: 100%; object-fit: cover; }
.pp-main::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 6px; background: var(--accent, var(--ds-raspberry)); }
.pp-thumbs { display: flex; gap: 10px; margin-top: 12px; flex-wrap: wrap; }
.pp-thumbs button { width: 76px; height: 76px; border-radius: 14px; overflow: hidden; border: 2px solid transparent; padding: 0; background: #fff; opacity: .7; transition: all .2s; }
.pp-thumbs button.active, .pp-thumbs button:hover { border-color: var(--accent, var(--ds-raspberry)); opacity: 1; }
.pp-thumbs img { width: 100%; height: 100%; object-fit: cover; }
.pp-info { background: #fff; border-radius: var(--ds-radius); padding: 30px; box-shadow: var(--ds-shadow); }
.pp-info h1 { font-size: clamp(1.7rem, 3vw, 2.4rem); }
.pp-price { font-size: 2rem; font-weight: 800; color: var(--ds-choco); font-family: var(--font-head); }
.pp-block { border-top: 1px dashed var(--ds-line); padding-top: 18px; margin-top: 18px; }
.pp-block > label, .pp-block > .form-label { font-size: 1rem; }
.pp-facts { display: flex; flex-wrap: wrap; gap: .6rem; }
.pp-facts span { background: var(--ds-cream); border-radius: 999px; padding: .35rem .8rem; font-size: .85rem; font-weight: 700; }
.pp-facts i { color: var(--ds-raspberry); margin-right: .3rem; }
.sticky-buy { background: #fff; }

/* ---------- 17. Корзина ---------- */
.cart-item { display: grid; grid-template-columns: 110px 1fr auto; gap: 18px; padding: 18px; background: #fff; border-radius: var(--ds-radius); box-shadow: var(--ds-shadow); align-items: start; position: relative; overflow: hidden; }
.cart-item::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 5px; background: var(--accent, var(--ds-raspberry)); }
.cart-item img { width: 110px; height: 120px; object-fit: cover; border-radius: 14px; }
.cart-item h3 { font-size: 1.1rem; margin: 0 0 .3rem; }
.cart-params { font-size: .85rem; color: var(--ds-muted); margin: 0; padding: 0; list-style: none; }
.cart-params li { margin-bottom: 2px; }
.cart-params b { color: var(--ds-text); font-weight: 700; }
.cart-item-side { text-align: right; display: flex; flex-direction: column; align-items: flex-end; gap: 10px; height: 100%; }
.cart-item-price { font-weight: 800; font-size: 1.15rem; }
.btn-remove { border: 0; background: transparent; color: var(--ds-muted); font-size: 1.15rem; }
.btn-remove:hover { color: var(--ds-raspberry); }
.summary { background: #fff; border-radius: var(--ds-radius); padding: 26px; box-shadow: var(--ds-shadow); position: sticky; top: 100px; }
.summary-row { display: flex; justify-content: space-between; margin-bottom: .5rem; }
.summary-total { border-top: 1px dashed var(--ds-line); padding-top: .8rem; margin-top: .8rem; font-size: 1.3rem; font-weight: 800; }
.checkout-card { background: #fff; border-radius: var(--ds-radius); padding: 28px; box-shadow: var(--ds-shadow); }
.checkout-card h2 { font-size: 1.45rem; margin-bottom: 1.2rem; display: flex; align-items: center; gap: .6rem; }
.checkout-card h2 .num { width: 32px; height: 32px; border-radius: 50%; background: var(--ds-rose-soft); color: var(--ds-raspberry); font-size: 1rem; display: inline-flex; align-items: center; justify-content: center; font-family: var(--font-body); font-weight: 800; }
.pay-option > span { flex-direction: row !important; align-items: center; gap: .8rem !important; }
.pay-option input:disabled + span { opacity: .45; cursor: not-allowed; }
.pay-option .pay-logos { display: flex; gap: 4px; margin-left: auto; flex-wrap: wrap; justify-content: flex-end; }
.pay-option .pay-logos img { height: 18px; width: auto; background: #2c2c30; border-radius: 4px; padding: 3px 5px; box-sizing: content-box; }
.pay-option .pay-text { display: flex; flex-direction: column; }
.pay-note { background: var(--ds-mint-soft); border-radius: var(--ds-radius-sm); padding: .8rem 1rem; font-size: .9rem; color: #2f6b5c; }
.empty-cart { text-align: center; padding: 70px 20px; background: #fff; border-radius: var(--ds-radius); box-shadow: var(--ds-shadow); }
.empty-cart i { font-size: 4rem; color: var(--ds-rose); }

/* ---------- 18. Контентные страницы ---------- */
.content-card { background: #fff; border-radius: var(--ds-radius); padding: clamp(22px, 4vw, 44px); box-shadow: var(--ds-shadow); }
.legal h2 { font-size: 1.35rem; margin-top: 2rem; }
.legal h2:first-of-type { margin-top: 0; }
.legal p, .legal li { color: #3d3d42; }
.info-tile { background: #fff; border-radius: var(--ds-radius); padding: 26px; box-shadow: var(--ds-shadow); height: 100%; }
.info-tile .feature-icon { margin-bottom: .8rem; }
.info-tile h3 { font-size: 1.2rem; }
.price-table { width: 100%; border-collapse: collapse; }
.price-table td { padding: .7rem 0; border-bottom: 1px dashed var(--ds-line); }
.price-table td:last-child { text-align: right; font-weight: 800; white-space: nowrap; padding-left: 1rem; }
.timeline { position: relative; padding-left: 28px; }
.timeline::before { content: ''; position: absolute; left: 7px; top: 6px; bottom: 6px; width: 2px; background: var(--ds-rose); }
.timeline-item { position: relative; margin-bottom: 1.4rem; }
.timeline-item::before { content: ''; position: absolute; left: -28px; top: 6px; width: 16px; height: 16px; border-radius: 50%; background: #fff; border: 3px solid var(--ds-raspberry); }
.about-photo { border-radius: var(--ds-radius); overflow: hidden; box-shadow: var(--ds-shadow-lg); }
.about-photo img, .about-photo video { width: 100%; display: block; object-fit: cover; }
.video-tile { border-radius: var(--ds-radius); overflow: hidden; background: #000; box-shadow: var(--ds-shadow); aspect-ratio: 9 / 16; }
.video-tile video { width: 100%; height: 100%; object-fit: cover; display: block; }
.map-wrap { border-radius: var(--ds-radius); overflow: hidden; box-shadow: var(--ds-shadow); min-height: 420px; height: 100%; background: #eee; }
.map-wrap iframe { width: 100%; height: 100%; min-height: 420px; border: 0; display: block; }
.contact-line { display: flex; gap: 1rem; align-items: flex-start; padding: 1rem 0; border-bottom: 1px dashed var(--ds-line); }
.contact-line:last-child { border-bottom: 0; }
.contact-line .feature-icon { width: 48px; height: 48px; font-size: 1.25rem; margin: 0; flex-shrink: 0; border-radius: 14px; }
.contact-line small { display: block; color: var(--ds-muted); font-weight: 700; text-transform: uppercase; font-size: .72rem; letter-spacing: .08em; }
.contact-line a, .contact-line span { color: var(--ds-choco); font-weight: 700; word-break: break-word; }
.messenger-btn { display: inline-flex; align-items: center; gap: .5rem; }
.btn-wa { --bs-btn-color: #fff; --bs-btn-bg: #25d366; --bs-btn-border-color: #25d366; --bs-btn-hover-bg: #1eb257; --bs-btn-hover-border-color: #1eb257; --bs-btn-hover-color: #fff; }
.btn-tg { --bs-btn-color: #fff; --bs-btn-bg: #2aabee; --bs-btn-border-color: #2aabee; --bs-btn-hover-bg: #1a93d1; --bs-btn-hover-border-color: #1a93d1; --bs-btn-hover-color: #fff; }

/* ---------- 19. Подвал ---------- */
.site-footer { background: var(--ds-choco-deep); color: #d9cbc2; padding: 64px 0 0; margin-top: 0; }
.site-footer h5 { color: #fff; font-family: var(--font-body); font-size: .85rem; text-transform: uppercase; letter-spacing: .1em; font-weight: 800; margin-bottom: 1rem; }
.site-footer a { color: #d9cbc2; transition: color .2s; }
.site-footer a:hover { color: #fff; }
.site-footer .btn-ds-light, .site-footer .btn-ds-light:hover { color: var(--ds-choco); }
.footer-brand { display: flex; align-items: center; gap: .8rem; margin-bottom: 1rem; }
.footer-brand img { width: 64px; height: 64px; border-radius: 50%; }
.footer-brand span { font-family: var(--font-head); font-size: 1.5rem; color: #fff; }
.footer-links { list-style: none; padding: 0; margin: 0; }
.footer-links li { margin-bottom: .45rem; }
.footer-contacts li { display: flex; gap: .6rem; }
.footer-contacts i { color: var(--ds-rose); }
.footer-social { display: flex; gap: .5rem; margin-top: 1rem; }
.footer-social a { width: 40px; height: 40px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .2); display: inline-flex; align-items: center; justify-content: center; }
.footer-social a:hover { background: rgba(255, 255, 255, .1); border-color: rgba(255, 255, 255, .5); }

/* Блок «Принимаем к оплате» (п. 7.2 ТЗ) */
.payments { margin-top: 40px; padding: 26px 0; border-top: 1px solid rgba(255, 255, 255, .1); }
.payments-title { font-size: .9rem; font-weight: 700; color: #fff; margin-bottom: .3rem; }
.payments-note { font-size: .8rem; color: #b4a39a; margin-bottom: .9rem; }
.payments-list { display: flex; flex-wrap: wrap; gap: 10px; list-style: none; padding: 0; margin: 0; }
.payments-list li {
  width: 88px; height: 54px; border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, .22);
  background: rgba(255, 255, 255, .06);
  display: flex; align-items: center; justify-content: center; padding: 10px 12px;
  transition: border-color .25s, background .25s, box-shadow .25s;
}
.payments-list li:hover { border-color: rgba(255, 255, 255, .6); background: rgba(255, 255, 255, .1); box-shadow: 0 0 0 3px rgba(255, 255, 255, .06); }
.payments-list img { max-width: 100%; max-height: 26px; width: auto; height: auto; display: block; }
.payments-list li.pm-mastercard img, .payments-list li.pm-maestro img { max-height: 30px; }
.payments-list li.pm-sberpay img { max-height: 24px; }
.payments-list li.pm-sbp img { max-height: 32px; }

.payments-list.on-light li { background: var(--ds-choco-deep); border-color: transparent; }
.payments-list.on-light li:hover { box-shadow: 0 0 0 3px var(--ds-rose); }

.footer-bottom { border-top: 1px solid rgba(255, 255, 255, .1); padding: 20px 0 24px; font-size: .85rem; color: #a99890; }
.footer-bottom a { color: #a99890; text-decoration: underline; text-underline-offset: 3px; }

/* ---------- 20. Плавающие элементы ---------- */
.fab { position: fixed; right: 20px; bottom: 22px; z-index: 1040; display: flex; flex-direction: column; align-items: flex-end; gap: 10px; }
.fab-toggle {
  width: 58px; height: 58px; border-radius: 50%; border: 0; background: var(--ds-raspberry); color: #fff; font-size: 1.45rem;
  box-shadow: 0 14px 30px -10px rgba(200, 40, 95, .7); position: relative; transition: transform .3s var(--ds-ease), background .3s;
}
.fab-toggle:hover { transform: scale(1.06); }
.fab-toggle::before { content: ''; position: absolute; inset: 0; border-radius: 50%; border: 2px solid var(--ds-raspberry); animation: ring 2.6s ease-out infinite; }
.fab.open .fab-toggle::before { animation: none; opacity: 0; }
.fab-toggle .i-close, .fab.open .fab-toggle .i-open { display: none; }
.fab.open .fab-toggle .i-close { display: inline; }
.fab.open .fab-toggle { background: var(--ds-choco); box-shadow: var(--ds-shadow-lg); }
@keyframes ring { 0% { transform: scale(1); opacity: .7; } 100% { transform: scale(1.6); opacity: 0; } }
.fab-menu { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.fab-menu a {
  display: inline-flex; align-items: center; gap: .55rem; padding: .5rem 1rem .5rem .5rem; border-radius: 999px;
  background: #fff; color: var(--ds-choco); font-weight: 700; font-size: .92rem; box-shadow: var(--ds-shadow-lg);
  opacity: 0; transform: translateY(12px) scale(.95); pointer-events: none; transition: all .3s var(--ds-ease); visibility: hidden;
}
.fab-menu a i { width: 34px; height: 34px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; color: #fff; font-size: 1.05rem; }
.fab-menu .wa i { background: #25d366; }
.fab-menu .tg i { background: #2aabee; }
.fab-menu .ph i { background: var(--ds-choco); }
.fab-menu a:hover { color: var(--ds-raspberry); }
.fab.open .fab-menu a { opacity: 1; transform: none; pointer-events: auto; visibility: visible; }
.fab.open .fab-menu a:nth-child(2) { transition-delay: .04s; }
.fab.open .fab-menu a:nth-child(3) { transition-delay: .08s; }
.to-top {
  position: fixed; left: 18px; bottom: 22px; z-index: 1040; width: 48px; height: 48px; border-radius: 50%;
  border: 0; background: var(--ds-choco); color: #fff; font-size: 1.2rem; box-shadow: var(--ds-shadow-lg);
  opacity: 0; visibility: hidden; transform: translateY(16px); transition: all .3s var(--ds-ease);
}
.to-top.show { opacity: 1; visibility: visible; transform: none; }
.to-top:hover { background: var(--ds-raspberry); }

/* Нижняя панель на телефоне */
.mobile-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 1045; display: none;
  background: rgba(255, 253, 249, .96); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid var(--ds-line); box-shadow: 0 -8px 24px -16px rgba(0, 0, 0, .3);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
.mobile-bar nav { display: grid; grid-template-columns: repeat(4, 1fr); }
.mobile-bar a, .mobile-bar button {
  display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 0 7px;
  color: var(--ds-choco); font-size: .72rem; font-weight: 700; border: 0; background: transparent; position: relative;
}
.mobile-bar i { font-size: 1.3rem; }
.mobile-bar .active { color: var(--ds-raspberry); }
.mobile-bar .badge-count { top: 2px; right: calc(50% - 22px); }

/* Избранное (боковая панель) */
.fav-item { display: flex; gap: .8rem; align-items: center; padding: .7rem 0; border-bottom: 1px dashed var(--ds-line); }
.fav-item img { width: 64px; height: 64px; border-radius: 12px; object-fit: cover; }
.fav-item a.name { color: var(--ds-choco); font-weight: 700; line-height: 1.25; display: block; }
.offcanvas { background: var(--ds-milk); }
.offcanvas-title { font-family: var(--font-head); }

/* ---------- 21. Модальные окна ---------- */
.modal-content { border: 0; border-radius: 26px; overflow: hidden; }
.modal-header { border-bottom: 0; padding: 22px 26px 0; }
.modal-title { font-family: var(--font-head); }
.modal-body { padding: 18px 26px 26px; }
.qv-img { border-radius: 18px; overflow: hidden; aspect-ratio: 4 / 5; }
.qv-img img { width: 100%; height: 100%; object-fit: cover; }
.lightbox .modal-content { background: transparent; box-shadow: none; }
.lightbox .modal-body { padding: 0; position: relative; text-align: center; }
.lightbox img { max-height: 86vh; max-width: 100%; border-radius: 18px; }
.lightbox .lb-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 48px; height: 48px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .9); font-size: 1.3rem; color: var(--ds-choco); }
.lightbox .lb-prev { left: 8px; }
.lightbox .lb-next { right: 8px; }
.lightbox .lb-close { position: absolute; top: 8px; right: 8px; z-index: 2; background-color: rgba(255, 255, 255, .9); border-radius: 50%; padding: .7rem; opacity: 1; }
.lightbox .lb-counter { color: #fff; margin-top: .6rem; font-weight: 700; }
.modal-backdrop.show { opacity: .7; }
.photo-preview { display: none; margin-top: .6rem; }
.photo-preview img { max-height: 160px; border-radius: 12px; }

/* ---------- 22. SweetAlert2 в фирменном стиле ---------- */
.ds-swal.swal2-popup { border-radius: 26px; font-family: var(--font-body); color: var(--ds-text); padding: 1.6rem 1.4rem 1.4rem; background: var(--ds-milk); }
.ds-swal .swal2-title { font-family: var(--font-head); color: var(--ds-choco); font-weight: 600; }
.ds-swal .swal2-html-container { color: #4a4a50; }
.ds-swal .swal2-actions { gap: .5rem; flex-wrap: wrap; }
.ds-swal .swal2-icon.swal2-success { border-color: var(--ds-mint-dark); color: var(--ds-mint-dark); }
.ds-swal .swal2-icon.swal2-success [class^='swal2-success-line'] { background-color: var(--ds-mint-dark); }
.ds-swal .swal2-icon.swal2-success .swal2-success-ring { border-color: rgba(63, 143, 124, .3); }
.ds-swal .swal2-icon.swal2-warning { border-color: var(--ds-caramel); color: var(--ds-caramel); }
.ds-swal .swal2-icon.swal2-error { border-color: var(--ds-raspberry); }
.ds-swal .swal2-icon.swal2-error [class^='swal2-x-mark-line'] { background-color: var(--ds-raspberry); }
.ds-swal .swal2-timer-progress-bar { background: var(--ds-raspberry); }
.ds-toast.swal2-popup { border-radius: 18px !important; box-shadow: var(--ds-shadow-lg) !important; font-family: var(--font-body); background: #fff; }
.ds-toast .swal2-title { font-size: 1rem !important; font-weight: 700; color: var(--ds-choco); }
.swal-product { display: flex; gap: .9rem; align-items: center; text-align: left; background: #fff; border-radius: 16px; padding: .7rem; margin-top: .4rem; }
.swal-product img { width: 64px; height: 72px; object-fit: cover; border-radius: 12px; }
.swal-errors { text-align: left; margin: .5rem 0 0; padding-left: 1.2rem; }
.swal-send { display: grid; gap: .5rem; margin-top: 1rem; }

/* ---------- 23. Анимации при прокрутке ---------- */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .8s var(--ds-ease), transform .8s var(--ds-ease); }
.reveal.is-visible { opacity: 1; transform: none; }
.reveal-d1 { transition-delay: .1s; }
.reveal-d2 { transition-delay: .2s; }
.reveal-d3 { transition-delay: .3s; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  body, .marquee-track, .hero-tag, .fab-toggle::before { animation: none !important; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .hero-float, .open-status .dot { animation: none; }
  * { transition-duration: .01ms !important; }
}

/* ---------- 24. Адаптивность ---------- */
@media (max-width: 1199.98px) {
  .ds-track { grid-auto-columns: calc((100% - 2 * 24px) / 3); }
  .header-search .form-control { min-width: 170px; }
}
@media (max-width: 991.98px) {
  .section { padding: 60px 0; }
  .site-header .navbar-collapse { padding: 12px 0 8px; }
  .site-header .nav-link { padding: .6rem 1rem !important; }
  .header-search { margin: 10px 0; }
  .header-search .form-control { width: 100%; }
  .ds-track, .reviews-track { grid-auto-columns: calc((100% - 24px) / 2); }
  .steps { grid-template-columns: repeat(2, 1fr); gap: 16px; }
  .filters { position: static; }
  .pp-gallery, .summary { position: static; }
  .hero { padding: 40px 0 70px; }
  .hero-visual { max-width: 380px; margin-top: 30px; }
}
@media (max-width: 767.98px) {
  body { padding-bottom: 66px; }
  .mobile-bar { display: block; }
  .fab { bottom: 80px; right: 14px; }
  .fab-toggle { width: 50px; height: 50px; font-size: 1.25rem; }
  .sticky-buy { position: sticky; bottom: 66px; z-index: 5; margin: 18px -22px -22px; padding: 12px 22px; box-shadow: 0 -10px 24px -18px rgba(0, 0, 0, .35); border-top: 1px solid var(--ds-line); }
  #site-header { min-height: 118px; }
  .hero-stats > div { padding: 0 .9rem; }
  .hero-stats dt { font-size: 1.3rem; }
  .hero-tag { right: 0; }
  .cta-banner { grid-template-columns: 1fr; }
  .cta-media { min-height: 260px; order: -1; }
  .cta-media::before { background: linear-gradient(0deg, #4a2f2b 0%, rgba(74, 47, 43, 0) 45%); }
  .marquee span { font-size: 1.05rem; }
  .to-top { bottom: 82px; left: 12px; width: 44px; height: 44px; }
  .topbar .hide-sm { display: none; }
  .topbar { font-size: .8rem; white-space: nowrap; }
  .to-top { display: none; }
  .sticky-buy .fav-text { display: none; }
  .sticky-buy { flex-wrap: nowrap !important; }
  .sticky-buy .btn-ds { white-space: nowrap; padding-inline: 1rem; }
  body[data-page="product"] .fab { display: none; }
  .brand img { width: 54px; height: 54px; }
  .brand-name { font-size: 1.15rem; }
  .brand-sub { display: none; }
  .builder-body, .builder-summary { padding: 20px; }
  .pp-info { padding: 22px; }
  .cart-item { grid-template-columns: 84px 1fr; gap: 14px; }
  .cart-item img { width: 84px; height: 96px; }
  .cart-item-side { grid-column: 1 / -1; flex-direction: row; justify-content: space-between; align-items: center; }
  .checkout-card { padding: 22px; }
  .payments-list { gap: 8px; }
  .payments-list li { width: calc((100% - 2 * 8px) / 3); max-width: 96px; height: 50px; padding: 8px 10px; }
}
@media (max-width: 575.98px) {
  .section { padding: 48px 0; }
  .ds-track { grid-auto-columns: 78%; gap: 16px; }
  .reviews-track { grid-auto-columns: 88%; gap: 16px; }
  .hero-tag { right: 0; font-size: .8rem; }
  .hero-float.f1 { left: -4%; }
  .hero-float.f2 { right: -2%; }
  .pc-body { padding: 14px 14px 18px; }
  .pc-title { font-size: 1.02rem; }
  .pc-actions { flex-direction: column; }
  .catalog-grid .pc-short { display: none; }
  .gallery { columns: 2; column-gap: 10px; }
  .gallery a { margin-bottom: 10px; }
  .choice-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ==========================================================================
   25. Удобная мобильная версия
   На телефоне и планшете всё листается только вертикально:
   карусели превращаются в сетку, фильтры — в выдвижную панель снизу.
   ========================================================================== */
.builder-progress { display: none; }
.filters-sheet-footer { display: none; }
.catalog-search { flex: 1 1 260px; max-width: 380px; }
.catalog-controls { display: flex; align-items: center; gap: 10px; }
.catalog-controls .form-select { width: auto; }
.catalog-count-mobile { color: var(--ds-muted); font-weight: 700; font-size: .9rem; margin: 0 0 12px; }
.btn-filter {
  display: inline-flex; align-items: center; justify-content: center; gap: .45rem;
  background: #fff; border: 1.5px solid var(--ds-line); color: var(--ds-choco); border-radius: 999px; padding: .6rem 1rem; font-weight: 800;
}
.btn-filter:hover, .btn-filter:focus { border-color: var(--ds-choco); }
.filters-badge:not(:empty) {
  display: inline-flex; min-width: 22px; height: 22px; border-radius: 11px; padding: 0 6px;
  align-items: center; justify-content: center; background: var(--ds-raspberry); color: #fff; font-size: .75rem;
}

/* Панель «Связаться» (кнопка в нижнем меню телефона) */
.contact-sheet { --bs-offcanvas-height: auto; border-radius: 24px 24px 0 0; padding-bottom: env(safe-area-inset-bottom, 0px); }
.contact-sheet-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.cs-item {
  display: flex; flex-direction: column; align-items: center; gap: .45rem; padding: 16px 10px; border-radius: 18px;
  background: #fff; border: 1px solid var(--ds-line); color: var(--ds-choco); font-weight: 800; font-size: .92rem; text-align: center;
}
.cs-item:active { transform: scale(.97); }
.cs-item i { width: 48px; height: 48px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; color: #fff; font-size: 1.35rem; }
.cs-wa { background: #25d366; }
.cs-tg { background: #2aabee; }
.cs-ph { background: var(--ds-choco); }
.cs-cb { background: var(--ds-raspberry); }

/* Точки-индикатор фото на странице товара */
.pp-dots { position: absolute; left: 0; right: 0; bottom: 16px; display: flex; justify-content: center; gap: 6px; z-index: 2; pointer-events: none; }
.pp-dots span { width: 7px; height: 7px; border-radius: 50%; background: rgba(255, 255, 255, .6); box-shadow: 0 1px 3px rgba(0, 0, 0, .3); transition: all .25s; }
.pp-dots span.active { width: 20px; border-radius: 4px; background: #fff; }

@media (max-width: 991.98px) {
  /* Карусели → обычная сетка, без горизонтальной прокрутки */
  .ds-track {
    display: grid; grid-auto-flow: row; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-auto-columns: auto;
    overflow: visible; scroll-snap-type: none; gap: 16px; padding: 4px 0 24px;
  }
  .reviews-track { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #hitsTrack > :nth-child(n+7), #relatedTrack > :nth-child(n+7) { display: none; }
  .reviews-track:not(.show-all) > :nth-child(n+5) { display: none; }
  .ds-nav { display: none; }
  .ds-track > * { scroll-snap-align: none; }

  /* Фильтры каталога — выдвижная панель снизу */
  .filters-sheet.offcanvas-lg { --bs-offcanvas-height: auto; max-height: 88vh; border-radius: 24px 24px 0 0; }
  .filters-sheet .offcanvas-header { padding: 18px 20px 6px; }
  .filters-sheet .offcanvas-title { font-family: var(--font-head); font-size: 1.35rem; }
  .filters-sheet .offcanvas-body { padding: 6px 20px 12px; }
  .filters-sheet .filters { box-shadow: none; padding: 0; position: static; border-radius: 0; background: transparent; }
  .filters-sheet-footer { display: block; padding: 12px 20px calc(12px + env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--ds-line); background: var(--ds-milk); }
  .filters-sheet-footer .btn { padding: .85rem; font-size: 1rem; }
  .filter-cats { display: flex !important; flex-wrap: wrap; gap: 8px !important; }
  .filter-cats .choice > span { flex-direction: row; align-items: center; gap: .35rem; border-radius: 999px; padding: .5rem .9rem; }
  .filters .form-check { padding-top: .35rem; padding-bottom: .35rem; }
  .filters .form-check-input { width: 1.25em; height: 1.25em; }

  /* Поиск, «Фильтры» и сортировка закреплены над товарами */
  .catalog-toolbar {
    position: sticky; top: var(--header-h, 99px); z-index: 20; flex-direction: column; align-items: stretch; gap: 10px;
    margin: -8px -12px 10px; padding: 10px 12px; background: rgba(251, 246, 239, .96);
    backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid var(--ds-line);
  }
  .catalog-search { max-width: none; flex: none; }
  .catalog-controls .btn-filter, .catalog-controls .form-select { flex: 1 1 0; min-height: 46px; }
  .catalog-controls .form-select { border-radius: 999px; font-weight: 700; }
}

@media (max-width: 767.98px) {
  .ds-track { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .reviews-track { grid-template-columns: 1fr; gap: 12px; }
  #relatedTrack > :nth-child(n+5) { display: none; }
  .reviews-track:not(.show-all) > :nth-child(n+4) { display: none; }

  /* Компактная карточка товара: фото, название, цена и одна крупная кнопка */
  .product-card:hover { transform: none; }
  .pc-body { padding: 10px 12px 12px; }
  .pc-cat { font-size: .64rem; letter-spacing: .06em; }
  .pc-title { font-size: .96rem; margin: .2rem 0 .35rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .pc-short { display: none; }
  .pc-price { gap: 0 .4rem; }
  .pc-price strong { font-size: 1.05rem; }
  .pc-price small { font-size: .7rem; width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .pc-actions { flex-direction: row !important; margin-top: .6rem; }
  .pc-actions .btn-ds-outline { display: none; }
  .pc-actions .btn-cart { min-height: 42px; font-size: .88rem; border-radius: 14px; }
  .pc-fav { width: 38px; height: 38px; top: 8px; right: 8px; }
  .pc-badges { top: 8px; left: 8px; }
  .pc-badge { font-size: .66rem; padding: .2rem .55rem; }

  /* Связь — через кнопку «Связаться» в нижнем меню, плавающая кнопка не нужна */
  .fab { display: none !important; }

  /* Конструктор: прогресс «Шаг 2 из 8» вместо вкладок */
  .builder-steps { display: none; }
  .builder-progress { display: block; padding: 18px 20px 0; font-weight: 700; font-size: .9rem; color: var(--ds-muted); }
  .bp-bar { height: 6px; background: var(--ds-rose-soft); border-radius: 6px; margin-top: 8px; overflow: hidden; }
  .bp-bar span { display: block; height: 100%; width: 0; background: var(--ds-raspberry); border-radius: 6px; transition: width .4s var(--ds-ease); }
  #bMiniTotal { color: var(--ds-raspberry); font-family: var(--font-head); font-size: 1.15rem; }
  .builder-body { min-height: 0; padding-top: 14px; }
  .builder-body h3 { font-size: 1.3rem; }
  .builder:not(.is-last) .builder-summary { display: none; }
  .builder .d-flex.px-4.pb-4 { padding: 0 20px 20px !important; }
  .builder #bPrev, .builder #bNext { flex: 1; }
  .choice-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .choice > span { min-height: 52px; }

  /* Первый экран, плитки и шаги */
  .hero-visual { max-width: 300px; }
  .cat-tile span { font-size: 1.02rem; left: 12px; right: 12px; bottom: 12px; }
  .cat-tile span i { width: 28px; height: 28px; font-size: .8rem; }
  .steps li { padding: 22px 16px 18px; }
  .steps h3 { font-size: 1.08rem; }
  .steps p { font-size: .85rem; }

  /* Поля ввода 16px — iPhone не увеличивает страницу при вводе */
  .form-control, .form-select { font-size: 16px; }
  .btn { min-height: 44px; }
}

/* Выдвижные панели и окна — поверх нижнего меню телефона */
.offcanvas, .offcanvas-lg.offcanvas-bottom.showing, .offcanvas-lg.offcanvas-bottom.show { z-index: 1060; }
.offcanvas-backdrop { z-index: 1055; }
.modal { z-index: 1070; }
.modal-backdrop { z-index: 1065; }
.filter-cats .choice > span { flex-direction: row; align-items: center; justify-content: space-between; gap: .5rem; }
.filter-cats .choice > span > small { font-weight: 800; }

/* ==========================================================================
   26. Упрощённый путь покупателя
   ========================================================================== */

/* Преимущества — одна строка значков */
.perks { padding: 28px 0; background: #fff; border-top: 1px solid var(--ds-line); border-bottom: 1px solid var(--ds-line); }
.perks-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.perks-list li { display: flex; align-items: center; gap: .75rem; }
.perks-list i { flex-shrink: 0; width: 46px; height: 46px; border-radius: 14px; display: inline-flex; align-items: center; justify-content: center; font-size: 1.25rem; background: var(--ds-rose-soft); color: var(--ds-raspberry); }
.perks-list b { display: block; font-size: .95rem; line-height: 1.25; }
.perks-list small { display: block; color: var(--ds-muted); font-size: .8rem; line-height: 1.3; }

/* Страница товара: состав и надпись — в раскрывающемся блоке */
.pp-custom-toggle {
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 1rem; text-align: left;
  background: var(--ds-cream); border: 1.5px solid var(--ds-line); border-radius: var(--ds-radius-sm); padding: .85rem 1rem; color: var(--ds-choco);
}
.pp-custom-toggle:hover { border-color: var(--ds-rose); }
.pp-custom-toggle b { display: block; }
.pp-custom-toggle small { display: block; color: var(--ds-muted); font-size: .82rem; margin-top: .15rem; }
.pp-custom-toggle i { transition: transform .3s var(--ds-ease); color: var(--ds-raspberry); }
.pp-custom-toggle:not(.collapsed) i { transform: rotate(180deg); }
.pp-custom-body { padding-top: 6px; }
.pp-opt { padding-top: 16px; }

/* Корзина: оплата — одной строкой */
.pay-simple { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; background: var(--ds-mint-soft); border-radius: var(--ds-radius-sm); padding: 1rem 1.1rem; }
.pay-simple-text b { display: block; color: var(--ds-choco); }
.pay-simple-text small { display: block; color: #2f6b5c; margin-top: .2rem; }
.pay-simple .pay-logos { display: flex; gap: 4px; flex-wrap: wrap; }
.pay-simple .pay-logos img { height: 18px; width: auto; background: #2c2c30; border-radius: 4px; padding: 3px 5px; box-sizing: content-box; }

/* Корзина: закреплённая строка «Итого · Оформить заказ» */
.cart-bar { display: none; }
@media (max-width: 991.98px) {
  .cart-bar:not([hidden]) {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 1044; align-items: center; justify-content: space-between; gap: 12px;
    padding: 10px 16px calc(10px + env(safe-area-inset-bottom, 0px)); background: rgba(255, 253, 249, .97);
    backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-top: 1px solid var(--ds-line); box-shadow: 0 -10px 26px -18px rgba(0, 0, 0, .4);
  }
  .cart-bar-total small { display: block; color: var(--ds-muted); font-size: .75rem; line-height: 1; }
  .cart-bar-total b { font-size: 1.25rem; font-family: var(--font-head); color: var(--ds-choco); }
  .cart-bar .btn { flex: 1; max-width: 260px; }
  body[data-page="cart"] { padding-bottom: 80px; }
  .perks-list { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 767.98px) {
  .cart-bar:not([hidden]) { bottom: 66px; padding-bottom: 10px; }
  body[data-page="cart"] { padding-bottom: 146px; }
  body[data-page="cart"] .summary .btn-ds { display: none; } /* кнопка уже есть в строке внизу */

  /* Главная короче: 4 хита, 2 отзыва, 6 фото, плитки категорий ниже */
  #hitsTrack > :nth-child(n+5) { display: none; }
  .reviews-track:not(.show-all) > :nth-child(n+3) { display: none; }
  #galleryGrid > :nth-child(n+7) { display: none; }
  .cat-tile { aspect-ratio: 4 / 3; }
  .perks { padding: 20px 0; }
  .perks-list { gap: 14px 10px; }
  .perks-list li { gap: .55rem; align-items: flex-start; }
  .perks-list i { width: 38px; height: 38px; font-size: 1.05rem; border-radius: 12px; }
  .perks-list b { font-size: .84rem; }
  .perks-list small { font-size: .72rem; }
}

/* Главная на телефоне — ещё компактнее */
@media (max-width: 767.98px) {
  .section { padding: 40px 0; }
  .section-head { margin-bottom: 24px; }
  .hero { padding: 28px 0 40px; }
  .hero .row { --bs-gutter-y: 1.5rem; }
  .hero-visual { max-width: 230px; margin-top: 4px; }
  .hero-float, .hero-ring { display: none; }
  .hero-tag { right: -18%; bottom: 10%; padding: .5rem .8rem .5rem .5rem; font-size: .8rem; }
  .hero-tag-icon { width: 32px; height: 32px; font-size: .95rem; }
  .hero-stats { margin-top: 1.8rem; }
  #galleryGrid > :nth-child(n+5) { display: none; }
  .cta-media { min-height: 170px; }
  .cta-text { padding: 24px 22px 28px; }
  .cta-text p { margin-bottom: 1.2rem; }
}

/* ==========================================================================
   27. Финальная полировка дизайна
   ========================================================================== */

/* Фирменный цвет значков (вместо стандартного красного Bootstrap) */
.text-accent { color: var(--ds-raspberry) !important; }

/* Галерея — ровная сетка квадратов вместо «лесенки» */
.gallery { columns: auto; display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.gallery a { margin: 0; aspect-ratio: 1 / 1; border-radius: var(--ds-radius); box-shadow: var(--ds-shadow); }
.gallery img { width: 100%; height: 100%; object-fit: cover; }
#galleryGrid > :nth-child(n+9) { display: none; }

/* Карточка товара: цена «за кг» всегда отдельной строкой — карточки ровные */
.pc-price strong { line-height: 1.2; }
.pc-price small { flex-basis: 100%; margin-top: 2px; }

/* Плитка «Торт по вашему фото» — в фирменном тёмном стиле */
.cat-tile-cta {
  display: flex; flex-direction: column; justify-content: center; align-items: flex-start; gap: .35rem; padding: 22px;
  background: linear-gradient(150deg, #3b2a24 0%, #5a2f3a 60%, #8a2a50 100%); color: #fff;
}
.cat-tile-cta::after { display: none; }
.cat-tile-cta > i { width: 52px; height: 52px; border-radius: 16px; display: inline-flex; align-items: center; justify-content: center; background: rgba(255, 255, 255, .12); color: var(--ds-rose); font-size: 1.5rem; margin-bottom: .4rem; }
.cat-tile-cta b { font-family: var(--font-head); font-size: 1.3rem; font-weight: 600; line-height: 1.2; }
.cat-tile-cta small { color: #e8d6d0; font-size: .85rem; line-height: 1.35; }
.cat-tile-cta em { font-style: normal; font-weight: 800; font-size: .88rem; color: var(--ds-rose); margin-top: auto; padding-top: .6rem; }
.cat-tile-cta:hover { color: #fff; }
.cat-tile-cta:hover em i { transform: translateX(4px); }
.cat-tile-cta em i { display: inline-block; transition: transform .3s var(--ds-ease); }

/* Конструктор: все 8 шагов помещаются, без пустой области */
.builder-steps { gap: 4px; padding: 20px 20px 0; }
.builder-step-dot { flex: 1 1 0; display: inline-flex; align-items: center; justify-content: center; padding: .45rem .4rem; font-size: .76rem; min-width: 0; }
.builder-step-dot .n { margin-right: .3rem; flex-shrink: 0; }
.builder-body { min-height: 0; }
#builder .choice-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
#builder .choice > span { min-height: 86px; padding: .85rem 1rem; }
#builder .choice > span > i { font-size: 1.6rem; }

/* «О нас»: аккуратное фото с кадрированием */
.about-photo img { aspect-ratio: 4 / 5; object-fit: cover; object-position: 50% 30%; }

/* «Доставка»: строка про МКАД переносится и не обрезает цены */
.price-table tr.price-note td { white-space: normal; text-align: left; font-weight: 400; padding-left: 0; }

/* «Контакты»: карта растягивается на высоту колонки */
.map-wrap.flex-grow-1 { min-height: 380px; }

@media (max-width: 1199.98px) {
  .builder-step-dot .n { display: none; }
}
@media (max-width: 767.98px) {
  .gallery { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .gallery a { border-radius: var(--ds-radius-sm); }
  #galleryGrid > :nth-child(n+5) { display: none; }
  .about-photo img { aspect-ratio: 1 / 1; }
  .cat-tile-cta { padding: 14px; }
  .cat-tile-cta > i { width: 40px; height: 40px; font-size: 1.15rem; border-radius: 12px; margin-bottom: .2rem; }
  .cat-tile-cta b { font-size: 1.02rem; }
  .cat-tile-cta small { display: none; }
  .cat-tile-cta em { font-size: .78rem; padding-top: .3rem; }
  #builder .choice > span { min-height: 64px; }
}

/* ==========================================================================
   28. Полировка окон, форм и мелочей
   ========================================================================== */

/* Проверка форм в фирменных цветах: без зелёных галочек Bootstrap */
.was-validated .form-control:valid, .was-validated .form-select:valid {
  border-color: var(--ds-line); background-image: none; padding-right: .95rem;
}
.was-validated .form-select:valid { padding-right: 2.4rem; background-image: var(--bs-form-select-bg-img); }
.was-validated .form-control:valid:focus, .was-validated .form-select:valid:focus { border-color: var(--ds-raspberry); box-shadow: 0 0 0 .2rem rgba(200, 40, 95, .15); }
.was-validated .form-control:invalid, .was-validated .form-select:invalid {
  border-color: var(--ds-raspberry); background-color: #fff7fa;
  background-image: none; padding-right: .95rem;
}
.was-validated .form-select:invalid { padding-right: 2.4rem; background-image: var(--bs-form-select-bg-img); }
.was-validated .form-check-input:valid ~ .form-check-label { color: inherit; }
.was-validated .form-check-input:valid { border-color: var(--bs-border-color); }
.was-validated .form-check-input:valid:checked { background-color: var(--ds-raspberry); border-color: var(--ds-raspberry); }
.was-validated .form-check-input:invalid { border-color: var(--ds-raspberry); }
.was-validated .form-check-input:invalid ~ .form-check-label { color: var(--ds-raspberry); }
.invalid-feedback { color: var(--ds-raspberry); }

/* Загрузка фото — аккуратная зона вместо системной кнопки */
.upload-zone {
  position: relative; display: block; cursor: pointer; border: 1.5px dashed #dcc9bf; border-radius: var(--ds-radius-sm);
  background: var(--ds-cream); padding: 18px; text-align: center; transition: border-color .2s, background .2s;
}
.upload-zone:hover, .upload-zone:focus-within { border-color: var(--ds-raspberry); background: var(--ds-rose-soft); }
.upload-zone input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
.upload-empty { display: flex; flex-direction: column; align-items: center; gap: 2px; pointer-events: none; }
.upload-empty i { font-size: 1.8rem; color: var(--ds-raspberry); }
.upload-empty small { color: var(--ds-muted); }
.upload-zone .photo-preview { display: none; flex-direction: column; align-items: center; gap: 6px; margin: 0; pointer-events: none; }
.upload-zone .photo-preview img { max-height: 160px; border-radius: 12px; box-shadow: var(--ds-shadow); }
.upload-zone .photo-preview small { color: var(--ds-muted); }

/* Уведомления: фирменные цвета значков */
.ds-toast .swal2-icon { border-color: var(--ds-rose) !important; }

/* Мобильное меню: контакты под ссылками */
.menu-contacts { display: flex; flex-direction: column; gap: 4px; padding: 14px 4px 6px; border-top: 1px dashed var(--ds-line); margin-top: 10px; }
.menu-phone { font-weight: 800; font-size: 1.1rem; color: var(--ds-choco); }
.menu-phone i { color: var(--ds-raspberry); margin-right: .3rem; }

/* Политика и оферта: оглавление */
.legal-toc { background: #fff; border-radius: var(--ds-radius); box-shadow: var(--ds-shadow); padding: 22px 26px; margin-bottom: 20px; }
.legal-toc-title { display: block; font-size: .76rem; font-weight: 800; letter-spacing: .2em; text-transform: uppercase; color: var(--ds-raspberry); margin-bottom: .6rem; }
.legal-toc ol { columns: 2 260px; column-gap: 32px; margin: 0; padding-left: 1.2rem; }
.legal-toc li { margin-bottom: .3rem; break-inside: avoid; }
.legal-toc a { color: var(--ds-choco); }
.legal-toc a:hover { color: var(--ds-raspberry); }
.legal { line-height: 1.75; }
.legal h2 { padding-top: .4rem; }

/* Видимый фокус при управлении с клавиатуры — в фирменном цвете */
a:focus-visible, button:focus-visible, .btn:focus-visible, summary:focus-visible {
  outline: 2px solid var(--ds-raspberry); outline-offset: 3px; box-shadow: none;
}
.btn:focus { box-shadow: none; }

/* Полноэкранное окно на телефоне — со скруглением только у шапки отключаем лишнее */
@media (max-width: 575.98px) {
  .modal-fullscreen-sm-down .modal-content { border-radius: 0; }
}

/* ==========================================================================
   29. Защита от «выползающего» текста
   Любой длинный текст (адрес, почта, надпись на торте) переносится внутри своей карточки.
   ========================================================================== */
.info-tile, .content-card, .checkout-card, .summary, .cart-item, .pp-info, .feature, .review,
.product-card, .filters, .builder, .steps li, .contact-line, .modal-content, .offcanvas-body, .legal-toc {
  overflow-wrap: break-word; min-width: 0;
}
.cart-item > div, .contact-line > div { min-width: 0; }
.price-table { table-layout: auto; }
.price-table td:first-child { white-space: normal; overflow-wrap: break-word; }
@media (max-width: 767.98px) {
  .pc-price small { white-space: normal; overflow: visible; text-overflow: clip; }
}

/* ==========================================================================
   30. Современные возможности браузера (работают там, где поддерживаются)
   ========================================================================== */

/* Плавный переход между страницами (View Transitions):
   шапка и нижнее меню остаются на месте, меняется только содержимое */
@view-transition { navigation: auto; }
.topbar { view-transition-name: ds-topbar; }
.site-header { view-transition-name: ds-header; }
.mobile-bar { view-transition-name: ds-mobilebar; }
::view-transition-old(root) { animation: dsPageOut .22s ease both; }
::view-transition-new(root) { animation: dsPageIn .38s cubic-bezier(.22, .8, .3, 1) both; }
@keyframes dsPageOut { to { opacity: 0; transform: translateY(-6px); } }
@keyframes dsPageIn { from { opacity: 0; transform: translateY(10px); } }
/* при поддержке переходов старое «проявление» страницы не нужно */
@supports (view-transition-name: none) { body { animation: none; } }

/* Быстрая отрисовка: браузер не рисует нижние блоки главной, пока до них не долистали */
#galleryGrid, .faq, #reviewsTrack { content-visibility: auto; contain-intrinsic-size: auto 600px; }

/* Полёт товара в корзину */
.fly-ghost {
  position: fixed; z-index: 2000; object-fit: cover; border-radius: 50%; pointer-events: none;
  box-shadow: 0 12px 30px -8px rgba(30, 30, 36, .5); border: 3px solid #fff;
}

/* Поиск: подсветка совпадения и ссылка на все результаты */
.search-suggest mark { background: var(--ds-rose-soft); color: var(--ds-raspberry); padding: 0 1px; border-radius: 3px; }
.search-suggest .suggest-all { justify-content: center; font-weight: 800; font-size: .88rem; color: var(--ds-raspberry); border-top: 1px solid var(--ds-line); }

/* Кнопка «Поделиться» */
.btn-share { flex-shrink: 0; }

/* «Вы недавно смотрели» — компактные плитки */
.recent-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.recent-item {
  display: flex; align-items: center; gap: .8rem; padding: 10px; background: #fff; border-radius: var(--ds-radius-sm);
  box-shadow: var(--ds-shadow); color: var(--ds-choco); border-left: 4px solid var(--accent); transition: transform .25s var(--ds-ease);
}
.recent-item:hover { transform: translateY(-3px); color: var(--ds-choco); }
.recent-item img { width: 56px; height: 56px; border-radius: 12px; object-fit: cover; flex-shrink: 0; }
.recent-item b { display: block; font-size: .92rem; line-height: 1.25; }
.recent-item small { color: var(--ds-muted); }

@media (max-width: 767.98px) {
  .recent-list { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  ::view-transition-old(root), ::view-transition-new(root) { animation: none; }
}

/* ==========================================================================
   31. Светлая графитовая тема
   Коричневые фоны заменены на светло-серые, текст — графитовый.
   Переменные переопределены здесь, поэтому меняются все места, где они
   используются (текст, заголовки, обводки кнопок, тени, админка).
   Чтобы вернуть прежнюю шоколадную гамму — удалите этот раздел.
   ========================================================================== */
:root {
  --ds-choco: #2c2c30;          /* графит: заголовки, обводки кнопок */
  --ds-choco-deep: #1f1f23;
  --ds-text: #2c2c30;           /* основной текст */
  --ds-muted: #6b6b72;          /* второстепенный текст */
  --ds-line: #e5e2df;           /* линии и рамки */
  --ds-gray-bg: #f1f0ee;        /* светло-серый фон вместо коричневого */
  --ds-gray-line: #e0deda;
  --bs-body-color: var(--ds-text);
  --ds-shadow: 0 10px 30px -12px rgba(30, 30, 36, .16);
  --ds-shadow-lg: 0 24px 50px -20px rgba(30, 30, 36, .24);
}

/* Главный заголовок — тонкая антиква Cormorant Garamond */
.hero h1 {
  font-family: 'Cormorant Garamond', 'Playfair Display', Georgia, serif;
  font-weight: 300; font-size: clamp(2.7rem, 6.2vw, 5rem); line-height: 1.02; letter-spacing: -.005em;
  color: var(--ds-text);
}
.hero h1 em { font-family: 'Cormorant Garamond', Georgia, serif; font-weight: 400; font-style: italic; }

/* Верхняя полоса */
.topbar { background: var(--ds-gray-bg); color: var(--ds-text); border-bottom: 1px solid var(--ds-gray-line); }
.topbar a { color: var(--ds-text); }
.topbar a:hover { color: var(--ds-raspberry); }

/* Бегущая строка */
.marquee { background: var(--ds-gray-bg); color: var(--ds-text); border-top: 1px solid var(--ds-gray-line); border-bottom: 1px solid var(--ds-gray-line); }
.marquee i { color: var(--ds-raspberry); }

/* Подвал */
.site-footer { background: var(--ds-gray-bg); color: #4a4a50; border-top: 1px solid var(--ds-gray-line); }
.site-footer h5, .footer-brand span { color: var(--ds-text); }
.site-footer a { color: #4a4a50; }
.site-footer a:hover { color: var(--ds-raspberry); }
.footer-contacts i { color: var(--ds-raspberry); }
.footer-social a { border-color: var(--ds-gray-line); color: var(--ds-text); background: #fff; }
.footer-social a:hover { background: #fff; border-color: var(--ds-raspberry); color: var(--ds-raspberry); }
.payments { border-top-color: var(--ds-gray-line); }
.payments-title { color: var(--ds-text); }
.payments-note { color: var(--ds-muted); }
/* логотипы платёжных систем — белые, поэтому плашки графитовые */
.payments-list li { background: var(--ds-choco); border-color: var(--ds-choco); }
.payments-list li:hover { background: var(--ds-choco); border-color: var(--ds-raspberry); box-shadow: 0 0 0 3px rgba(200, 40, 95, .15); }
.payments-list.on-light li { background: var(--ds-choco); }
.footer-bottom { border-top-color: var(--ds-gray-line); color: var(--ds-muted); }
.footer-bottom a { color: var(--ds-muted); }
.footer-bottom a:hover { color: var(--ds-raspberry); }
.seo-footer { background: var(--ds-gray-bg); color: #4a4a50; }
.seo-footer a { color: var(--ds-raspberry); }

/* Баннер «Торт по фото» */
.cta-banner { background: linear-gradient(120deg, #f4f3f1 0%, #ecebe8 100%); color: var(--ds-text); border: 1px solid var(--ds-gray-line); box-shadow: var(--ds-shadow); }
.cta-text h2 { color: var(--ds-text); }
.cta-text p { color: #4a4a50; }
.cta-text .ds-script { color: var(--ds-raspberry); }
.cta-media::before { background: linear-gradient(90deg, #f0efec 0%, rgba(240, 239, 236, 0) 40%); }

/* Плитка «Торт по вашему фото» в категориях */
.cat-tile-cta { background: linear-gradient(150deg, #f4f3f1 0%, #e9e7e4 100%); color: var(--ds-text); border: 1px solid var(--ds-gray-line); }
.cat-tile-cta:hover { color: var(--ds-text); }
.cat-tile-cta > i { background: #fff; color: var(--ds-raspberry); }
.cat-tile-cta small { color: var(--ds-muted); }
.cat-tile-cta em { color: var(--ds-raspberry); }

/* Мелкие плашки логотипов (корзина) */
.pay-option .pay-logos img, .pay-simple .pay-logos img { background: var(--ds-choco); }

@media (max-width: 767.98px) {
  .hero h1 { font-size: clamp(2.5rem, 11vw, 3.1rem); }
  .cta-media::before { background: linear-gradient(0deg, #f0efec 0%, rgba(240, 239, 236, 0) 45%); }
}

/* Кнопка товара: на узких телефонах короткая надпись и компактный счётчик */
.label-short { display: none; }
@media (max-width: 420px) {
  .sticky-buy { gap: 6px !important; }
  .sticky-buy .label-full { display: none; }
  .sticky-buy .label-short { display: inline; }
  .sticky-buy .qty { flex-shrink: 0; }
  .sticky-buy .qty button { width: 32px; }
  .sticky-buy .qty input { width: 34px; }
  .sticky-buy .btn-ds { min-width: 0; padding-inline: .7rem; }
  .sticky-buy .btn-ds-outline:not(.btn-icon) { width: 44px; padding: 0; flex-shrink: 0; }
  .sticky-buy .btn-icon { flex-shrink: 0; }
}
@media (max-width: 420px) {
  .sticky-buy .btn-share { display: none; } /* на узком экране — только главное: количество, «В корзину», избранное */
}

/* ==========================================================================
   32. Корпоративным клиентам (corporate.html) и скидка за объём
   ========================================================================== */
.corp-hero { background: var(--ds-grad); padding: 34px 0 56px; }
.corp-hero h1 {
  font-family: 'Cormorant Garamond', 'Playfair Display', Georgia, serif; font-weight: 300;
  font-size: clamp(2.4rem, 5vw, 4rem); line-height: 1.05; margin: .7rem 0 1rem; color: var(--ds-text);
}
.corp-hero .lead { color: #4a4a50; max-width: 540px; }
.corp-hero .breadcrumb { margin-bottom: 1.4rem; }
.corp-hero-img { border-radius: 32px; overflow: hidden; box-shadow: var(--ds-shadow-lg); border: 8px solid #fff; aspect-ratio: 1; max-width: 560px; margin-left: auto; background: #fff; }
.corp-hero-img img { width: 100%; height: 100%; object-fit: cover; }

.corp-occasions { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; }
.corp-occasions li {
  display: flex; flex-direction: column; align-items: center; gap: .5rem; text-align: center; padding: 18px 10px;
  background: #fff; border-radius: var(--ds-radius-sm); box-shadow: var(--ds-shadow); font-weight: 700; font-size: .88rem; line-height: 1.3;
}
.corp-occasions i { font-size: 1.5rem; color: var(--ds-raspberry); }

.corp-brand { background: #fff; border-radius: var(--ds-radius); overflow: hidden; box-shadow: var(--ds-shadow); height: 100%; display: flex; flex-direction: column; }
.corp-brand-img { display: block; aspect-ratio: 4 / 3; overflow: hidden; }
.corp-brand-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ds-ease); }
.corp-brand:hover .corp-brand-img img { transform: scale(1.05); }
.corp-brand-body { padding: 18px 20px 22px; display: flex; flex-direction: column; flex: 1; }
.corp-brand-body h3 { font-size: 1.2rem; margin-bottom: .3rem; }
.corp-brand-body p { color: var(--ds-muted); font-size: .92rem; margin-bottom: .8rem; }
.corp-price { margin-top: auto; font-size: 1.3rem; color: var(--ds-raspberry); font-family: var(--font-head); }

#corpCalc .choice > span b { font-size: .95rem; }
.steps.steps-5 { grid-template-columns: repeat(5, 1fr); }

.corp-cases { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.corp-case { margin: 0; }
.corp-case a { display: block; aspect-ratio: 1; border-radius: var(--ds-radius); overflow: hidden; box-shadow: var(--ds-shadow); }
.corp-case img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ds-ease); }
.corp-case a:hover img { transform: scale(1.05); }
.corp-case figcaption { font-size: .86rem; color: var(--ds-muted); margin-top: .6rem; line-height: 1.4; }

/* Баннер «Компаниям» на главной */
.corp-promo {
  display: flex; align-items: center; gap: 22px; padding: 14px 22px 14px 14px; border-radius: var(--ds-radius);
  background: #fff; box-shadow: var(--ds-shadow); color: var(--ds-text); border: 1px solid var(--ds-line); transition: transform .3s var(--ds-ease), box-shadow .3s;
}
.corp-promo:hover { color: var(--ds-text); transform: translateY(-3px); box-shadow: var(--ds-shadow-lg); }
.corp-promo-img { width: 110px; height: 110px; border-radius: 18px; overflow: hidden; flex-shrink: 0; }
.corp-promo-img img { width: 100%; height: 100%; object-fit: cover; }
.corp-promo-text { flex: 1; min-width: 0; }
.corp-promo-text b { display: block; font-family: var(--font-head); font-weight: 600; font-size: 1.35rem; margin: .3rem 0 .2rem; }
.corp-promo-text small { color: var(--ds-muted); }
.corp-promo-btn { flex-shrink: 0; }

/* Скидка за объём на странице товара */
.pp-discount { font-size: .82rem; font-weight: 800; color: var(--ds-mint-dark); background: var(--ds-mint-soft); padding: .2rem .6rem; border-radius: 999px; }
.pp-discount-info { margin-top: .6rem; font-size: .86rem; color: var(--ds-mint-dark); font-weight: 700; }
.pp-corp-link { display: inline-block; margin-top: .6rem; font-weight: 700; font-size: .9rem; }

@media (max-width: 1199.98px) {
  .corp-occasions { grid-template-columns: repeat(3, 1fr); }
  .steps.steps-5 { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 991.98px) {
  .corp-cases { grid-template-columns: repeat(2, 1fr); }
  .corp-hero-img { margin: 0 auto; max-width: 420px; }
}
@media (max-width: 767.98px) {
  .corp-hero { padding: 22px 0 40px; }
  .corp-occasions { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .corp-occasions li { padding: 14px 8px; font-size: .82rem; }
  .steps.steps-5 { grid-template-columns: repeat(2, 1fr); }
  .corp-cases { gap: 10px; }
  .corp-promo { flex-wrap: wrap; gap: 14px; padding: 14px; }
  .corp-promo-img { width: 72px; height: 72px; border-radius: 14px; }
  .corp-promo-text { flex-basis: calc(100% - 90px); }
  .corp-promo-text b { font-size: 1.1rem; }
  .corp-promo-btn { width: 100%; }
}

/* Фото с топпером: кадрируем выше, чтобы надпись над тортом была видна */
.corp-case img[src*="corporate-topper"], .corp-brand img[src*="corporate-topper"] { object-position: 50% 0; }

/* Высота шапки (без верхней полосы) — для закреплённых панелей под ней */
@media (max-width: 767.98px) { :root { --header-h: 85px; } }

/* ==========================================================================
   33. Онлайн-чат на сайте
   ========================================================================== */
.ds-chat {
  position: fixed; right: 20px; bottom: 20px; z-index: 1080; width: 380px; height: min(600px, calc(100vh - 40px));
  display: flex; flex-direction: column; background: var(--ds-milk); border-radius: 24px; overflow: hidden;
  box-shadow: 0 30px 70px -20px rgba(30, 30, 36, .45); border: 1px solid var(--ds-line);
  opacity: 0; transform: translateY(16px) scale(.98); transform-origin: bottom right; transition: opacity .25s, transform .25s var(--ds-ease);
}
.ds-chat.show { opacity: 1; transform: none; }
body.ds-chat-open .fab { display: none; }
.ds-chat-head { display: flex; align-items: center; gap: .7rem; padding: 14px 14px 14px 16px; background: var(--ds-grad); border-bottom: 1px solid var(--ds-line); }
.ds-chat-head img { width: 40px; height: 40px; border-radius: 50%; box-shadow: 0 3px 10px -4px rgba(0, 0, 0, .3); flex-shrink: 0; }
.ds-chat-head b { display: block; font-family: var(--font-head); font-size: 1.05rem; line-height: 1.2; }
.ds-chat-status { display: flex; align-items: center; gap: .35rem; color: #4a4a50; font-size: .76rem; line-height: 1.3; }
.ds-chat-status .dot { width: 7px; height: 7px; border-radius: 50%; background: #b8b8be; flex-shrink: 0; }
.ds-chat-status .dot.on { background: #3cbf7a; box-shadow: 0 0 0 3px rgba(60, 191, 122, .2); }
.ds-chat-x { width: 38px; height: 38px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .7); color: var(--ds-text); font-size: 1.1rem; flex-shrink: 0; }
.ds-chat-x:hover { background: #fff; color: var(--ds-raspberry); }

.ds-chat-body { flex: 1; overflow-y: auto; padding: 16px; overscroll-behavior: contain; }
.ds-chat-list { display: flex; flex-direction: column; gap: 8px; }
.ds-chat-msg { display: flex; flex-direction: column; max-width: 84%; }
.ds-chat-msg span { padding: .6rem .85rem; border-radius: 16px; font-size: .93rem; line-height: 1.45; overflow-wrap: anywhere; }
.ds-chat-msg time { font-size: .68rem; color: var(--ds-muted); margin: 3px 6px 0; }
.ds-chat-msg.op { align-self: flex-start; }
.ds-chat-msg.op span { background: #fff; border: 1px solid var(--ds-line); border-bottom-left-radius: 6px; }
.ds-chat-msg.me { align-self: flex-end; align-items: flex-end; }
.ds-chat-msg.me span { background: var(--ds-raspberry); color: #fff; border-bottom-right-radius: 6px; }
.ds-chat-msg.pending span { opacity: .6; }
.ds-chat-msg.failed { cursor: pointer; }
.ds-chat-msg.failed span { background: #fff1f4; color: var(--ds-raspberry); border: 1px dashed var(--ds-raspberry); }
.ds-chat-msg.failed time { color: var(--ds-raspberry); font-weight: 700; }

.ds-chat-intro { display: flex; flex-direction: column; gap: 10px; }
.ds-chat-intro .ds-chat-msg { max-width: 100%; margin-bottom: 4px; }
.ds-chat-hint { font-size: .82rem; color: var(--ds-muted); margin: 0; }
.ds-chat-intro .form-control { padding: .6rem .85rem; }
.ds-chat-intro .form-check-label { font-size: .8rem; }
.ds-chat-intro .form-check-input.is-invalid { border-color: var(--ds-raspberry); }
.ds-chat-error { background: #fff1f4; color: var(--ds-raspberry-dark); border-radius: 12px; padding: .55rem .8rem; font-size: .84rem; font-weight: 700; }

.ds-chat-compose { display: flex; align-items: flex-end; gap: 8px; padding: 10px 12px calc(10px + env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--ds-line); background: #fff; }
.ds-chat-compose textarea {
  flex: 1; resize: none; border: 1px solid var(--ds-line); border-radius: 18px; padding: .6rem .9rem; font-size: .95rem;
  max-height: 120px; outline: none; background: var(--ds-cream); color: var(--ds-text); line-height: 1.4;
}
.ds-chat-compose textarea:focus { border-color: var(--ds-raspberry); box-shadow: 0 0 0 .2rem rgba(200, 40, 95, .12); }
.ds-chat-compose button { width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--ds-raspberry); color: #fff; font-size: 1.05rem; flex-shrink: 0; }
.ds-chat-compose button:hover { background: var(--ds-raspberry-dark); }

/* Пункт «Чат на сайте» в меню и метки новых ответов */
.fab-menu button { border: 0; }
.fab-menu .chat i { background: var(--ds-raspberry); }
.fab-menu .chat { position: relative; }
.chat-dot { position: absolute; top: 4px; left: 34px; width: 10px; height: 10px; border-radius: 50%; background: #3cbf7a; border: 2px solid #fff; }
.fab-badge { position: absolute; top: 2px; right: 2px; width: 14px; height: 14px; border-radius: 50%; background: #3cbf7a; border: 2px solid #fff; z-index: 1; }
.cs-wide { grid-column: 1 / -1; flex-direction: row; justify-content: flex-start; gap: .8rem; text-align: left; padding: 12px 14px; }
.cs-wide small { display: block; font-weight: 600; color: var(--ds-muted); font-size: .76rem; }
.cs-chat { background: var(--ds-raspberry); }

@media (max-width: 575.98px) {
  .ds-chat { left: 0; right: 0; bottom: 0; top: 0; width: auto; height: auto; border-radius: 0; border: 0; }
  body.ds-chat-open { overflow: hidden; }
  .ds-chat-msg { max-width: 88%; }
}
@media (prefers-reduced-motion: reduce) { .ds-chat { transition: none; } }
.ds-chat-head .flex-grow-1 { min-width: 0; }
