/* ============================================================
   Aero Gamak — main.css (v7)
   Источник правды: aero-gamak-final.html (раздел <style>),
   плюс мобильные правила из aero-gamak-mobile-reference.html.
   ============================================================ */

:root {
  --bg-main: #F7F2EA;
  --bg-secondary: #EDE4D3;
  --accent: #B89968;
  --accent-dark: #9C7E50;
  --text-main: #2B2620;
  --text-muted: #8A8278;
  --line: #D9CFBE;
  --white: #FFFFFF;

  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-xl: 28px;

  --shadow-soft: 0 4px 20px rgba(43, 38, 32, 0.06);
  --shadow-medium: 0 12px 40px rgba(43, 38, 32, 0.08);
  --shadow-strong: 0 20px 60px rgba(43, 38, 32, 0.12);

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { scroll-behavior: smooth; background: var(--bg-main); }
/* overflow-x: clip (а не hidden) — обрезает горизонтальный вылет,
   но НЕ создаёт scroll-контейнер, поэтому fixed-шапка и её backdrop-filter
   работают корректно и контент не «проплывает» поверх шапки */
html, body { overflow-x: clip; }

body {
  font-family: 'Inter', sans-serif;
  background: transparent;
  color: var(--text-main);
  font-weight: 300;
  line-height: 1.6;
  width: 100%;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

/* ─── Header (правки #1, #10, #13) ─────────────────────────────────────── */

#site-header {
  position: fixed; top: 0; left: 0; right: 0;
  padding: 22px 60px;
  display: flex; justify-content: space-between; align-items: center;
  z-index: 240;
  background: rgba(247, 242, 234, 0.45);
  backdrop-filter: blur(22px) saturate(180%);
  -webkit-backdrop-filter: blur(22px) saturate(180%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.35);
  /* стеклянные блики: светлая грань сверху-слева, мягкая снизу */
  box-shadow:
    inset 0 1px 1px rgba(255, 255, 255, 0.55),
    inset 0 -1px 1px rgba(255, 255, 255, 0.18),
    0 6px 24px rgba(43, 38, 32, 0.06);
  transition: all 0.5s var(--ease);
}
body.menu-open #site-header {
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border-bottom-color: transparent;
  box-shadow: none;
  z-index: 1001;
}
/* бургер (он же крестик) держим выше панели меню, чтобы закрыть по тапу */
body.menu-open .burger {
  position: relative;
  z-index: 1002;
}
body.menu-open #site-header .logo,
body.menu-open #site-header .nav-desktop,
body.menu-open #site-header .lang-switch {
  visibility: hidden;
}
#site-header.scrolled {
  background: rgba(247, 242, 234, 0.72);
  backdrop-filter: blur(26px) saturate(190%);
  -webkit-backdrop-filter: blur(26px) saturate(190%);
  border-bottom-color: rgba(255, 255, 255, 0.45);
  box-shadow:
    inset 0 1px 1px rgba(255, 255, 255, 0.6),
    inset 0 -1px 1px rgba(255, 255, 255, 0.2),
    0 8px 30px rgba(43, 38, 32, 0.10);
  padding: 14px 60px;
}

.logo { display: inline-flex; flex-direction: column; line-height: 1; align-items: center; }
.logo-main {
  font-family: 'Cormorant Garamond', serif;
  font-size: 26px;
  font-weight: 500;
  letter-spacing: 0.22em;
  color: var(--text-main);
}
.logo-sub {
  font-size: 9px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-top: 6px;
  white-space: nowrap;
  text-align: center;
}

.nav-desktop ul { display: flex; gap: 56px; list-style: none; }     /* правка #1: gap 42→56 */
.nav-desktop a {
  color: var(--text-main);
  font-size: 14px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 400;
  position: relative;
  display: inline-block;                /* нужно для translateY при наведении */
  line-height: 1;                        /* бокс плотно к буквам → линия как в эталоне */
  padding-bottom: 10px;
  transition: color 0.4s var(--ease), transform 0.4s var(--ease);
}
/* волна-подчёркивание (SVG вставляется в шаблоне) */
.nav-desktop a .ag-uline {
  position: absolute;
  left: 0; bottom: -6px;
  width: 100%; height: 16px;
  overflow: visible;
  pointer-events: none;
}
.nav-desktop a .ag-uline path {
  fill: none;
  stroke: var(--accent);
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 400;
  stroke-dashoffset: 400;
  transition: stroke-dashoffset 0.3s ease-out;   /* снятие — быстро */
}
.nav-desktop a:hover {
  color: var(--accent-dark);
  transform: translateY(-3px);
}
.nav-desktop a:hover .ag-uline path {
  stroke-dashoffset: 0;
  transition: stroke-dashoffset 1s linear;        /* появление — плавно */
}

/* ───── Общая волна-подчёркивание для текстовых ссылок без обводки ─────
   («Подробнее →», «← На главную», «Весь каталог →» и т.п.)
   Применять: класс .ag-underline на ссылке + вложенный <i class="ag-uline">
   с тем же SVG-путём. */
.ag-underline {
  position: relative;
  display: inline-block;
  padding-bottom: 10px;
  transition: color 0.4s var(--ease), transform 0.4s var(--ease);
}
.ag-underline .ag-uline {
  position: absolute;
  left: 0; bottom: -10px;
  width: 100%; height: 16px;
  overflow: visible;
  pointer-events: none;
}
.ag-underline .ag-uline path {
  fill: none;
  stroke: var(--accent);
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 400;
  stroke-dashoffset: 400;
  transition: stroke-dashoffset 0.3s ease-out;
}
.ag-underline:hover {
  color: var(--accent-dark);
  transform: translateY(-3px);
}
.ag-underline:hover .ag-uline path {
  stroke-dashoffset: 0;
  transition: stroke-dashoffset 1s linear;
}

/* Lang switch — пока скрыт целиком (правка #14: EN-локаль откладываем в Ф8) */
.lang-switch { display: none; }

/* Burger button (правка #15: крестик из тех же полосок) */
.burger {
  display: none;
  background: transparent; border: none; cursor: pointer;
  width: 44px; height: 44px;
  position: relative;
  z-index: 210;
  padding: 0;
}
.burger span {
  display: block;
  position: absolute;
  left: 50%;
  width: 26px; height: 1.5px;
  background: var(--text-main);
  transform: translateX(-50%);
  transition: all 0.45s var(--ease);
}
.burger span:nth-child(1) { top: 14px; }
.burger span:nth-child(2) { top: 21px; }
.burger span:nth-child(3) { top: 28px; }

body.menu-open .burger span:nth-child(1) {
  top: 21px;
  transform: translateX(-50%) rotate(45deg);
}
body.menu-open .burger span:nth-child(2) {
  opacity: 0;
}
body.menu-open .burger span:nth-child(3) {
  top: 21px;
  transform: translateX(-50%) rotate(-45deg);
}

/* ─── Mobile menu drawer (правка #15: справа, плавно) ──────────────────── */

.mobile-menu {
  position: fixed; top: 0; right: 0; bottom: 0;
  width: 86%; max-width: 420px;
  /* тонкое матовое стекло: светлое (почти белое), более прозрачное */
  background: rgba(252, 250, 246, 0.55);
  -webkit-backdrop-filter: blur(28px) saturate(140%);
  backdrop-filter: blur(28px) saturate(140%);
  border-left: 1px solid rgba(255, 255, 255, 0.5);
  box-shadow:
    -20px 0 60px rgba(43, 38, 32, 0.10),
    inset 1px 0 1px rgba(255, 255, 255, 0.6);
  display: flex; flex-direction: column;
  padding: 100px 32px 32px;
  z-index: 1000;
  transform: translateX(100%);
  transition: transform 0.5s var(--ease);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
body.menu-open .mobile-menu {
  transform: translateX(0);
}
.mobile-menu-close { display: none; }   /* закрытие через бургер — он же крестик */

.mobile-menu-logo { display: none; }    /* в drawer не нужен — лого видно в шапке */

.mobile-menu-nav ul {
  list-style: none;
  display: flex; flex-direction: column;
  gap: 28px;
  padding-left: 70px;       /* освобождаем место под жгут слева */
}
.mobile-menu-nav li {
  opacity: 0;
  transform: translateX(20px);
  transition: opacity 0.5s var(--ease), transform 0.5s var(--ease);
}
body.menu-open .mobile-menu-nav li { opacity: 1; transform: translateX(0); }
body.menu-open .mobile-menu-nav li:nth-child(1) { transition-delay: 0.12s; }
body.menu-open .mobile-menu-nav li:nth-child(2) { transition-delay: 0.18s; }
body.menu-open .mobile-menu-nav li:nth-child(3) { transition-delay: 0.24s; }
body.menu-open .mobile-menu-nav li:nth-child(4) { transition-delay: 0.30s; }
body.menu-open .mobile-menu-nav li:nth-child(5) { transition-delay: 0.36s; }
body.menu-open .mobile-menu-nav li:nth-child(6) { transition-delay: 0.42s; }

.mobile-menu-nav a {
  font-family: 'Cormorant Garamond', serif;
  font-size: 30px;
  font-weight: 400;
  color: var(--text-main);
  display: inline-flex;
  align-items: center;
  text-shadow: 0 1px 3px rgba(43, 38, 32, 0.12);
  will-change: transform;
}

/* ── Плетёный жгут вдоль левой кромки меню (физика — menu_rope.js) ── */
.menu-rope {
  position: absolute;
  left: 14px;
  top: 0;
  bottom: 0;
  width: 74px;
  pointer-events: none;
  color: var(--accent);
  z-index: 1;
}
.menu-rope svg { display: block; width: 100%; height: 100%; overflow: visible; }
.menu-rope__thread {
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.menu-rope__wrap { stroke: var(--accent-dark); fill: none; stroke-linecap: round; }
.menu-rope__bead { fill: var(--accent-dark); }
.mobile-menu-footer { display: none; }

/* затемнение фона при открытом меню */
.mobile-menu-backdrop {
  display: none;
  position: fixed; inset: 0;
  background: rgba(43, 38, 32, 0);
  z-index: 999;
  transition: background 0.5s var(--ease);
}
body.menu-open .mobile-menu-backdrop {
  display: block;
  background: rgba(43, 38, 32, 0.35);
}
/* при открытом меню сайт под ним не скроллится */
html.menu-open-lock,
html.menu-open-lock body {
  overflow: hidden;
  touch-action: none;
  overscroll-behavior: none;
}

/* ─── Hero ──────────────────────────────────────────────────────────────── */

.hero {
  min-height: 100vh;
  min-height: 100svh;
  position: relative;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
  padding: 100px 24px 120px;   /* запас снизу под scroll-hint, чтобы не налезал */
  box-sizing: border-box;
}
.hero-bg, .hero-bg-video {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  background-size: cover; background-position: center;
  object-fit: cover;
  transform: scale(1.05);
  animation: slowZoom 24s ease-in-out infinite alternate;
}
.hero-bg-fallback {
  background: linear-gradient(135deg, #B89968 0%, #5A4A38 100%);
}
/* v40 (E6=A): мобильное hero-фото. На десктопе скрыто, на мобиле показывается
   поверх десктопного, если загружено. */
.hero-bg-mobile {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  background-size: cover; background-position: center;
  transform: scale(1.05);
  animation: slowZoom 24s ease-in-out infinite alternate;
  display: none;
}
@keyframes slowZoom {
  from { transform: scale(1.0); }
  to { transform: scale(1.14); }
}
.hero-overlay {
  position: absolute; inset: 0;
  z-index: 1;
  background: linear-gradient(180deg, rgba(43,38,32,0.18) 0%, rgba(43,38,32,0.55) 100%);
}
.hero-content {
  position: relative; z-index: 2;
  text-align: center;
  color: var(--white);
  padding: 0 20px;
  max-width: 900px;
}
.hero-tag {
  display: inline-block;
  font-size: 11px; letter-spacing: 0.4em; text-transform: uppercase;
  padding: 9px 22px;
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 100px;
  margin-bottom: 32px;
  opacity: 0;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  animation: heroFade 1.4s var(--ease) 0.3s forwards;
}
@media (max-width: 640px) {
  .hero-tag { border: none; padding: 0; backdrop-filter: none; }
}
.hero h1 {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(48px, 7vw, 110px);
  font-weight: 300;
  line-height: 1.05;
  letter-spacing: -0.01em;
  margin-bottom: 28px;
  opacity: 0;
  animation: heroFade 1.6s var(--ease) 0.5s forwards;
}
.hero h1 em { font-style: italic; font-weight: 400; }

/* v217: матовое «стекло» + мягкое золотое свечение на hero-заголовке.
   Заворачиваем в @supports — где background-clip:text не поддержан,
   остаётся обычный белый заголовок (без «исчезнувшего» текста). */
@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  .hero h1 {
    background: linear-gradient(180deg, #ffffff 0%, #fbf6ee 46%, #efe1c8 100%);
    -webkit-background-clip: text; background-clip: text;
    -webkit-text-fill-color: transparent; color: transparent;
    filter:
      drop-shadow(0 0 22px rgba(232, 196, 128, 0.50))
      drop-shadow(0 1px 0 rgba(255, 255, 255, 0.30))
      drop-shadow(0 9px 10px rgba(0, 0, 0, 0.55))
      drop-shadow(0 18px 24px rgba(0, 0, 0, 0.34));
  }
  .hero h1 em { -webkit-text-fill-color: transparent; }
}
/* В режиме редактирования возвращаем сплошной белый — чтобы текст было видно при правке */
body.edit-mode .hero h1,
body.edit-mode .hero h1 em {
  background: none;
  -webkit-text-fill-color: var(--white);
  color: var(--white);
  filter: none;
}
.hero p {
  font-size: 17px;
  font-weight: 300;
  max-width: 540px;
  margin: 0 auto 48px;
  color: #efe3cf;           /* лёгкий бежевый — в тон слова «вручную» */
  opacity: 0;
  animation: heroFade 1.6s var(--ease) 0.8s forwards;
}
.hero-cta {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 16px 44px;
  border: none;
  color: var(--text-main);
  font-size: 12px;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  line-height: 1;
  transition: transform 0.5s var(--ease), box-shadow 0.5s var(--ease);
  border-radius: 100px;
  overflow: hidden;                 /* обрезает углы вращающегося conic-фона */
  isolation: isolate;
  --agr: 0deg;
  background: conic-gradient(from var(--agr),
    var(--accent) 0deg, #fff4d6 30deg, var(--accent) 60deg,
    var(--accent) 180deg, #fff4d6 210deg, var(--accent) 240deg,
    var(--accent) 360deg);
  animation: heroFade 1.6s var(--ease) 1.1s forwards, agGlassRot 5s linear infinite;
  opacity: 0;
}
/* матовый золотой корпус поверх центра, оставляет тонкую кромку 1.5px */
.hero-cta::after {
  content: "";
  position: absolute;
  inset: 1.5px;
  border-radius: 99px;
  z-index: 0;
  background-color: var(--accent);
  box-shadow:
    inset 0 1.5px 1px rgba(255, 255, 255, 0.35),
    inset 0 -2px 4px rgba(120, 95, 55, 0.30),
    inset 0 0 12px rgba(247, 227, 173, 0.10);
  transition: background-color 0.5s var(--ease);
}
.hero-cta > span { position: relative; z-index: 2; }
.hero-cta .ag-glass__glass {
  position: absolute;
  inset: 1.5px;
  border-radius: 99px;
  overflow: hidden;
  z-index: 1;
  pointer-events: none;
}
.hero-cta .ag-glass__fill {
  position: absolute;
  width: 200%;
  height: 0;
  padding-bottom: 200%;
  left: 50%;
  top: 50%;
  border-radius: 50%;
  mix-blend-mode: screen;
  transform: translate(-50%, -50%);
  opacity: 0;
  transition: opacity 0.5s var(--ease);
  background: conic-gradient(from 0deg,
    rgba(255, 250, 235, 0) 0deg, #fff6e0 45deg, rgba(255, 250, 235, 0) 90deg,
    rgba(255, 250, 235, 0) 180deg, #fff1cf 225deg, rgba(255, 250, 235, 0) 270deg,
    rgba(255, 250, 235, 0) 360deg);
  animation: agGlassSpin 9s linear infinite;
  will-change: transform;
}
.hero-cta:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 24px rgba(184, 153, 104, 0.22);
}
.hero-cta:hover::after { background-color: #e0cda6; }
.hero-cta:hover .ag-glass__fill { opacity: 0.28; }
@media (prefers-reduced-motion: reduce) {
  .hero-cta { animation: heroFade 1.6s var(--ease) 1.1s forwards; }
  .hero-cta .ag-glass__fill { animation: none; }
}
@supports not (background: conic-gradient(from 0deg, red, blue)) {
  .hero-cta { background: var(--accent); }
}
@keyframes heroFade {
  from { opacity: 0; transform: translateY(30px); filter: blur(6px); }
  to { opacity: 1; transform: translateY(0); filter: blur(0); }
}
.scroll-hint {
  position: absolute; bottom: 40px; left: 0; right: 0;
  z-index: 3;
  display: flex; flex-direction: column; align-items: center;
  color: var(--white);
  font-size: 11px; letter-spacing: 0.4em; text-transform: uppercase;
  opacity: 0;
  animation: heroFade 1.6s var(--ease) 1.6s forwards;
}
.scroll-hint::after {
  content: '';
  width: 1px; height: 40px;
  background: var(--white);
  margin-top: 12px;
  animation: scrollPulse 2s ease-in-out infinite;
}
@keyframes scrollPulse {
  0%, 100% { opacity: 0.3; transform: scaleY(0.5); }
  50% { opacity: 1; transform: scaleY(1); }
}

/* ─── Section base (правка #4: крупнее заголовки) ───────────────────────── */

section { padding: 110px 60px; }

.section-label {
  display: inline-block;
  font-size: 11px;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 22px;
  font-weight: 400;
}
.section-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(42px, 5vw, 68px);   /* правка #4: было clamp(36px, 4.2vw, 56px), укрупнили */
  font-weight: 300;
  line-height: 1.08;
  margin-bottom: 24px;
  letter-spacing: -0.01em;
}
.section-title em { font-style: italic; font-weight: 400; }
.section-label-light { color: rgba(255,255,255,0.6); }
.section-title-light { color: var(--white); }

/* Кнопка-аутлайн */
.btn-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 34px;
  border: 1px solid var(--line);
  background: var(--bg-main);
  color: var(--text-main);
  font-size: 12px;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  line-height: 1;
  border-radius: 100px;
  transition: border-color 0.3s var(--ease), background 0.3s var(--ease), transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.btn-outline:hover {
  border-color: var(--accent);
  background: var(--bg-secondary);
  color: var(--text-main);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(184, 153, 104, 0.16);
}
.btn-outline-light { border-color: var(--white); color: var(--white); }
.btn-outline-light:hover { background: var(--white); color: var(--text-main); }

/* v170: «Читать дальше» в about-секции главной — тёмная, светлеет при наведении
   (белая выбивалась на светлом фоне секции). Не затрагивает кнопки «назад». */
.about .btn-outline.ag-glass-soft {
  border-color: var(--accent);
  background: #f3ece0;
  color: var(--text-main);
}
.about .btn-outline.ag-glass-soft:hover {
  border-color: var(--accent);
  background: #f6f0e6;
  color: var(--text-main);
}
.about .btn-outline {
  border-color: var(--text-main);
  background: var(--text-main);
  color: var(--bg-main);
}
.about .btn-outline:hover {
  border-color: var(--text-main);
  background: var(--bg-secondary);
  color: var(--text-main);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(43, 38, 32, 0.18);
}

/* ─── Манифест ──────────────────────────────────────────────────────────── */

.manifesto {
  padding: 60px 60px;
  text-align: center;
}
/* Ф3.4: карусель — слайды наложены друг на друга, активный виден.
   Фиксированная высота (под ~3 строки) + центрирование, чтобы фразы
   с разным числом строк не сдвигали вёрстку и стояли по центру. */
.manifesto-carousel {
  position: relative;
  max-width: 900px;
  margin: 0 auto;
  display: grid;
  min-height: clamp(150px, 16vw, 210px);
  align-items: center;
}
/* мягкая подложка под фразами: гасит нити фона под текстом, к краям
   растворяется (как вуаль у отзывов), чтобы буквы читались спокойно */
.manifesto-carousel::before {
  content: "";
  position: absolute;
  left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  width: 115%; height: 150%;
  background: radial-gradient(ellipse 60% 55% at 50% 50%,
    rgba(247, 242, 234, 0.78) 0%,
    rgba(247, 242, 234, 0.55) 45%,
    rgba(247, 242, 234, 0.22) 72%,
    rgba(247, 242, 234, 0) 100%);
  pointer-events: none;
  z-index: 0;
}
.manifesto-quote { z-index: 1; }
.manifesto-quote {
  grid-area: 1 / 1;
  align-self: center;
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(22px, 2.4vw, 34px);
  font-weight: 300;
  font-style: italic;
  color: var(--text-main);
  line-height: 1.4;
  margin: 0 auto;
  position: relative;
  padding: 24px 0;
  opacity: 0;
  transition: opacity 0.9s var(--ease);
  pointer-events: none;
}
.manifesto-quote.is-active {
  opacity: 1;
  pointer-events: auto;
}
/* В режиме редактирования листание мгновенное — чтобы навигация была отзывчивой */
body.edit-mode .manifesto-quote { transition: opacity 0.25s ease; }
.manifesto-quote::before, .manifesto-quote::after {
  content: '';
  display: block;
  width: 50px; height: 1px;
  background: var(--accent);
  margin: 0 auto 24px;
}
.manifesto-quote::after { margin: 24px auto 0; }
.manifesto-empty { color: var(--text-muted); font-style: italic; }

/* Управление каруселью (только в режиме редактирования) */
.manifesto-controls { display: none; }
body.edit-mode .manifesto[data-admin] .manifesto-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 24px;
}
.manifesto-ctl {
  border: 1px solid var(--line);
  background: var(--bg-main);
  color: var(--text-main);
  width: 40px; height: 40px;
  border-radius: 50%;
  font-size: 20px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.2s var(--ease);
}
.manifesto-ctl:hover { border-color: var(--accent); background: var(--bg-secondary); }
.manifesto-ctl--del:hover { border-color: #b04040; background: rgba(176,64,64,0.1); }
.manifesto-counter {
  display: flex; align-items: center; gap: 6px;
  font-size: 13px; color: var(--text-muted);
  min-width: 48px; justify-content: center;
}
.manifesto-quote--add {
  display: flex; align-items: center; justify-content: center;
  min-height: 100px;
  cursor: pointer;
  color: var(--accent);
  font-size: 40px;
  font-style: normal;
}
.manifesto-quote--add:hover { color: var(--accent-dark); }
/* Поле редактирования фразы */
.manifesto-edit {
  grid-area: 1 / 1;
  width: 100%;
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(22px, 2.4vw, 34px);
  font-style: italic;
  text-align: center;
  color: var(--text-main);
  background: var(--bg-main);
  border: 1px solid var(--accent);
  border-radius: var(--radius-md);
  padding: 24px;
  resize: vertical;
  line-height: 1.4;
  box-sizing: border-box;
}

/* ─── Категории (правки #3a, #4, #9: горизонтальные карточки 5/4 в карточной обёртке) ─── */

.categories {
  background: var(--bg-secondary);
  padding: 60px 60px;
  margin-top: 24px;
  border-radius: var(--radius-xl);
  margin-left: 12px;
  margin-right: 12px;
}
.cat-header {
  margin-bottom: 36px;
}
.categories .section-title {
  font-size: clamp(32px, 3.6vw, 48px);
}
.cat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.cat-card {
  position: relative;
  aspect-ratio: 5/4;                    /* правка #3a: было 4/5 (вертикально), теперь 5/4 (горизонтально) */
  overflow: hidden;
  cursor: pointer;
  background: var(--bg-main);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  transition: box-shadow 0.6s var(--ease), transform 0.6s var(--ease);
  display: block;
}
/* Ф5: обёртка вокруг ссылки — чтобы кнопки редактирования лежали поверх,
   но ВНЕ <a> (иначе file-input не открывается). */
.cat-card-wrap {
  position: relative;
  border-radius: var(--radius-lg);
}
.cat-card-wrap .cat-card { width: 100%; height: 100%; }
.cat-card:hover {
  box-shadow: var(--shadow-strong);
  transform: translateY(-4px);
}
.cat-card-bg {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  background-size: cover; background-position: center;
  transition: transform 1.4s var(--ease);
}
.cat-card-bg-fallback {
  background: linear-gradient(135deg, var(--bg-main) 0%, var(--line) 100%);
}
.cat-card:hover .cat-card-bg { transform: scale(1.07); }
.cat-card-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(43,38,32,0.75) 100%);
  display: flex; flex-direction: column; justify-content: end;
  padding: 28px;
  color: var(--white);
  z-index: 4;
}
.cat-card-num {
  font-size: 11px; letter-spacing: 0.3em; opacity: 0.85;
  margin-bottom: 10px;
}
.cat-card-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 24px;
  font-weight: 400;
  margin-bottom: 0;
}
.cat-card-arrow {
  position: absolute; top: 22px; right: 22px;
  z-index: 4;
  width: 40px; height: 40px;
  border: 1px solid rgba(255,255,255,0.55);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: var(--white);
  transition: all 0.5s var(--ease);
  backdrop-filter: blur(4px);
  font-family: 'Inter', sans-serif;
  font-size: 16px;
  line-height: 1;
  padding-bottom: 1px;            /* визуальная коррекция: стрелка ровно по центру */
}
.cat-card:hover .cat-card-arrow {
  background: var(--white); color: var(--text-main); border-color: var(--white);
  transform: rotate(-45deg);
}

/* ─── Свежие работы ─────────────────────────────────────────────────────── */

.products-header {
  display: flex; justify-content: space-between; align-items: end;
  margin-bottom: 50px; flex-wrap: wrap; gap: 30px;
}
.view-all {
  font-size: 12px; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--text-main);
  padding-bottom: 6px;
  transition: color 0.4s var(--ease), transform 0.4s var(--ease);
}
.view-all:hover { color: var(--accent-dark); }
.view-all--mobile { display: none; }
.view-all-wrap { text-align: center; margin-top: 40px; }

.products-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
}
.product-card { display: block; transition: transform 0.5s var(--ease); }
.product-card:hover { transform: translateY(-8px); }
.product-img-wrap {
  position: relative;
  aspect-ratio: 4/5;
  overflow: hidden;
  margin-bottom: 18px;
  background: var(--bg-secondary);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(184, 153, 104, 0.30);
  box-shadow: 0 8px 24px rgba(43, 38, 32, 0.08);
  transition: box-shadow 0.5s var(--ease), transform 0.5s var(--ease), border-color 0.5s var(--ease);
}
/* на главной («Свежие работы») рамка чуть заметнее */
.products .product-img-wrap {
  border-color: rgba(184, 153, 104, 0.45);
  box-shadow: 0 12px 32px rgba(43, 38, 32, 0.10), 0 0 0 1px rgba(184, 153, 104, 0.10);
}
.product-card:hover .product-img-wrap { border-color: var(--accent); }
.product-card:hover .product-img-wrap {
  box-shadow: 0 24px 48px rgba(43, 38, 32, 0.18);
}
.product-img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 1.4s var(--ease);
}
.product-card:hover .product-img { transform: scale(1.04); }
.product-img-placeholder {
  width: 100%; height: 100%;
  background: var(--bg-secondary);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 6px;
}
.product-img-placeholder__brand {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: 26px;
  color: var(--text-muted);
  opacity: 0.55;
}
.product-img-placeholder__sub {
  font-family: 'Cormorant Garamond', serif;
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-muted);
  opacity: 0.6;
}
.product-badge {
  position: absolute; top: 14px; left: 14px;
  padding: 7px 14px;
  background: rgba(247, 242, 234, 0.92);
  backdrop-filter: blur(8px);
  border-radius: 100px;
  font-size: 10px; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--text-main);
  z-index: 2;
  box-shadow:
    inset 0 1px 1px rgba(255, 255, 255, 0.6),
    inset 0 -1px 2px rgba(0, 0, 0, 0.05);
}
.product-badge--in_stock { background: #E3EAD9; color: #5C6E47; }
.product-badge--on_order { background: #EDE0CE; color: #8A6D3B; }
.product-badge--sale { background: #F0DAD3; color: #A65A47; }
.product-name {
  font-family: 'Cormorant Garamond', serif;
  font-size: 22px; font-weight: 400;
  margin-bottom: 6px;
}
.product-meta { font-size: 13px; color: var(--text-muted); margin-bottom: 8px; }
.product-price { font-size: 15px; font-weight: 500; color: var(--text-main); }
/* Цена в карточке каталога: компактнее и выше, ровные отступы (v36, П3) */
.product-card .product-name { margin-bottom: 4px; }
.product-card .product-meta { margin-bottom: 4px; }
.product-card .product-price {
  font-family: 'Cormorant Garamond', serif;
  font-size: 26px;
  font-weight: 400;
  margin-bottom: 0;
  margin-top: 2px;
}
.product-card .product-price--request {
  font-size: 16px;
  font-style: italic;
  color: var(--text-muted);
}

/* ─── Empty-state (правка по тематике заглушек) ─────────────────────────── */

.empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 80px 20px;
  background: var(--bg-secondary);
  border-radius: var(--radius-lg);
  color: var(--text-muted);
}
.empty-state-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 26px; font-weight: 400;
  color: var(--text-main);
  margin-bottom: 12px;
  font-style: italic;
}
.empty-state-text { font-size: 14px; max-width: 460px; margin: 0 auto; }

/* ─── О мастерской (правки #4, #9) ───────────────────────────────────────── */

.about {
  background: var(--bg-secondary);
  border-radius: var(--radius-xl);
  margin: 32px 12px 0;
  padding: 80px 60px;
}
.about-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 60px;
  align-items: start;            /* верх текста вровень с верхом фото */
}
.about-img {
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-medium);
  border: 1px solid var(--line);     /* тонкая обводка как везде */
  overflow: hidden;                  /* зум обрезается рамкой → чистые углы */
  aspect-ratio: 4 / 3;               /* дефолт до определения ориентации */
}
.about-img.is-portrait {
  aspect-ratio: 3 / 4;
  max-height: 500px;             /* вертикальное фото на главной */
  width: auto;                   /* ширина от высоты, чтобы 3:4 сохранялось */
  margin: 0 auto;                /* центр по горизонтали в колонке */
}
.about-img.is-landscape { aspect-ratio: 4 / 3; }
.about-img__link { display: block; width: 100%; height: 100%; }
.about-img img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;                 /* фото заполняет рамку с обрезкой */
}
.about-img-placeholder {
  width: 100%; height: 100%;
  background: linear-gradient(135deg, var(--line) 0%, var(--accent) 100%);
}
.about-text-block {
  padding: 0;
}
.about-text {
  font-size: 15.5px;
  color: var(--text-main);
  margin-bottom: 16px;
  line-height: 1.75;
}
.about-text p { margin-bottom: 16px; }
.about-signature {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: 20px;
  color: var(--accent-dark);
  margin: 24px 0;
}

/* ─── Отзывы (заготовка для Ф4, сейчас скрыт если 0) ────────────────────── */

.testimonials { padding: 110px 0; overflow: hidden; }
.testimonials-header {
  position: relative;
  z-index: 2;                  /* над cream-подложкой галереи и нитями — чёткость */
  padding: 0 60px;
  margin-bottom: 50px;
  text-align: center;
}

/* ── Cover-flow галерея отзывов (v121, по образцу venue-gallery) ──────────── */
.testimonials-gallery {
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow-x: clip;
}
.testimonials-gallery__stage {
  position: relative;
  width: 100%;
  max-width: 1180px;
  height: 460px;
  margin: 0 auto;
  perspective: 1400px;
  overflow: visible;
}
.testimonials-gallery__card {
  position: absolute;
  top: 50%; left: 50%;
  height: 420px;
  z-index: 1;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-medium);
  background: var(--bg-secondary);
  border: 1px solid rgba(255, 255, 255, 0.55);
  transition: transform 0.5s var(--ease), opacity 0.5s var(--ease), box-shadow 0.5s var(--ease), border-color 0.5s var(--ease);
  will-change: transform, opacity;
  cursor: pointer;
}
/* ширина по ориентации (высота общая 420px) */
.testimonials-gallery__card.is-portrait { width: 315px; }   /* 3:4 */
.testimonials-gallery__card.is-landscape { width: 560px; }  /* 4:3 */
.testimonials-gallery__card.is-square { width: 420px; }     /* 1:1 */
.testimonials-gallery__card.is-center {
  cursor: zoom-in;
  border-color: rgba(255, 255, 255, 0.9);
  box-shadow: 0 18px 50px rgba(43, 38, 32, 0.32), 0 4px 14px rgba(43, 38, 32, 0.22);
}
.testimonials-gallery__img {
  width: 100%; height: 100%;
  object-fit: cover; display: block;
  user-select: none; -webkit-user-drag: none;
}
.testimonials-gallery__video {
  width: 100%; height: 100%;
  object-fit: cover; display: block;
  user-select: none; background: var(--bg-secondary);
}
.testimonials-gallery__play {
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 72px; height: 72px; border-radius: 50%;
  border: none; cursor: pointer; z-index: 20;
  background: rgba(43, 38, 32, 0.55); color: #fff;
  display: flex; align-items: center; justify-content: center;
  padding-left: 4px;
  transition: background 0.25s var(--ease), transform 0.25s var(--ease);
}
.testimonials-gallery__play:hover { background: var(--accent-dark); transform: translate(-50%, -50%) scale(1.06); }
.testimonials-gallery__card.is-playing .testimonials-gallery__play { display: none; }
.testimonials-gallery__placeholder {
  width: 100%; height: 100%;
  background: var(--bg-secondary);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 6px;
}
.testimonials-gallery__placeholder-brand {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: 26px;
  color: var(--text-muted);
  opacity: 0.55;
}
.testimonials-gallery__placeholder-sub {
  font-family: 'Cormorant Garamond', serif;
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-muted);
  opacity: 0.6;
}
.testimonials-gallery__card.is-placeholder.is-center { cursor: default; }
.testimonials-gallery__del {
  display: none;
  position: absolute; top: 10px; right: 10px;
  width: 26px; height: 26px;
  border: none; border-radius: 50%;
  background: #b04040; color: #fff;
  font-size: 17px; line-height: 1; cursor: pointer;
  z-index: 50; box-shadow: var(--shadow-soft);
}
body.edit-mode .testimonials-gallery__card.is-center .testimonials-gallery__del { display: inline-flex; align-items: center; justify-content: center; }
.testimonials-gallery__empty {
  color: var(--text-muted); font-style: italic;
  padding: 48px 0; text-align: center;
}
.testimonials-gallery__edit { margin-top: 24px; text-align: center; }
.testimonials-gallery__add {
  display: none;
  padding: 11px 24px;
  border-radius: 100px;
  border: 1px dashed var(--accent);
  background: transparent;
  color: var(--accent-dark);
  font-size: 14px; cursor: pointer;
  transition: background 0.2s;
}
body.edit-mode .testimonials-gallery__add { display: inline-block; }
.testimonials-gallery__add:hover { background: var(--bg-secondary); }
.testimonials-gallery__nav {
  display: flex; gap: 18px; margin-top: 28px;
  position: relative; z-index: 20;
}
.testimonials-gallery__arrow {
  width: 48px; height: 48px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--bg-main);
  color: var(--text-main);
  font-size: 24px; line-height: 1; cursor: pointer;
  touch-action: manipulation;
  user-select: none; -webkit-user-select: none;
  transition: background 0.2s, color 0.2s;
}
@media (hover: hover) {
  .testimonials-gallery__arrow:hover { background: var(--accent-dark); color: var(--bg-main); border-color: var(--accent-dark); }
}
.testimonials-gallery__arrow:focus { outline: none; }

@media (max-width: 768px) {
  .testimonials-gallery__stage { height: 320px; }
  .testimonials-gallery__card.is-portrait { width: 210px; height: 285px; }
  .testimonials-gallery__card.is-landscape { width: 78vw; max-width: 360px; height: auto; aspect-ratio: 4 / 3; }
  .testimonials-gallery__card.is-square { width: 62vw; max-width: 285px; height: auto; aspect-ratio: 1 / 1; }
}

/* ─── Workshop / Обучение (правка #9: карточная обёртка) ────────────────── */

.workshop {
  background: var(--text-main);
  color: var(--bg-main);
  text-align: center;
  padding: 90px 60px;
  border-radius: var(--radius-xl);
  margin: 32px 12px 0;
  position: relative;
  overflow: hidden;
}
.workshop::before {
  content: '';
  position: absolute;
  top: -50%; right: -20%;
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(184,153,104,0.18) 0%, transparent 60%);
  border-radius: 50%;
}
.workshop > * { position: relative; z-index: 1; }
.workshop .section-label { color: var(--accent); }
.workshop h2 { color: var(--bg-main); margin-bottom: 24px; }
.workshop-text {
  color: rgba(247, 242, 234, 0.78);
  max-width: 620px; margin: 0 auto 14px; font-size: 15.5px;
}
.workshop-note {
  font-size: 13px;
  color: rgba(247, 242, 234, 0.55);
  margin-bottom: 36px;
  font-style: italic;
}
.workshop-cta {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 16px 44px;
  color: var(--text-main);
  font-size: 12px; letter-spacing: 0.25em; text-transform: uppercase;
  line-height: 1;
  border: none;
  border-radius: 100px;
  overflow: hidden;                 /* обрезает углы вращающегося conic-фона */
  isolation: isolate;
  --agr: 0deg;
  background: conic-gradient(from var(--agr),
    var(--accent) 0deg, #fff4d6 30deg, var(--accent) 60deg,
    var(--accent) 180deg, #fff4d6 210deg, var(--accent) 240deg,
    var(--accent) 360deg);
  animation: agGlassRot 5s linear infinite;
  transition: transform 0.5s var(--ease), box-shadow 0.5s var(--ease);
}
.workshop-cta::after {
  content: "";
  position: absolute;
  inset: 1.5px;
  border-radius: 99px;
  z-index: 0;
  background-color: var(--accent);
  box-shadow:
    inset 0 1.5px 1px rgba(255, 255, 255, 0.35),
    inset 0 -2px 4px rgba(120, 95, 55, 0.30),
    inset 0 0 12px rgba(247, 227, 173, 0.10);
  transition: background-color 0.5s var(--ease);
}
.workshop-cta > span { position: relative; z-index: 2; }
.workshop-cta .ag-glass__glass {
  position: absolute;
  inset: 1.5px;
  border-radius: 99px;
  overflow: hidden;
  z-index: 1;
  pointer-events: none;
}
.workshop-cta .ag-glass__fill {
  position: absolute;
  width: 200%;
  height: 0;
  padding-bottom: 200%;
  left: 50%;
  top: 50%;
  border-radius: 50%;
  mix-blend-mode: screen;
  transform: translate(-50%, -50%);
  opacity: 0;
  transition: opacity 0.5s var(--ease);
  background: conic-gradient(from 0deg,
    rgba(255, 250, 235, 0) 0deg, #fff6e0 45deg, rgba(255, 250, 235, 0) 90deg,
    rgba(255, 250, 235, 0) 180deg, #fff1cf 225deg, rgba(255, 250, 235, 0) 270deg,
    rgba(255, 250, 235, 0) 360deg);
  animation: agGlassSpin 9s linear infinite;
  will-change: transform;
}
.workshop-cta:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 24px rgba(184, 153, 104, 0.22);
}
.workshop-cta:hover::after { background-color: #e0cda6; }
.workshop-cta:hover .ag-glass__fill { opacity: 0.28; }
@media (prefers-reduced-motion: reduce) {
  .workshop-cta { animation: none; }
  .workshop-cta .ag-glass__fill { animation: none; }
}
@supports not (background: conic-gradient(from 0deg, red, blue)) {
  .workshop-cta { background: var(--accent); }
}

/* ─── Footer ────────────────────────────────────────────────────────────── */

footer {
  background: var(--bg-secondary);
  padding: 80px 60px 32px;
  margin: 32px 0 0;
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
}
.footer-inner {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 60px;
  margin-bottom: 50px;
}
.footer-brand p { font-size: 14px; color: var(--text-muted); margin-top: 16px; max-width: 320px; line-height: 1.6; }
.footer-col h4 {
  font-family: 'Inter', sans-serif;
  font-size: 11px; font-weight: 500;
  text-transform: uppercase; letter-spacing: 0.3em;
  margin-bottom: 22px;
  color: var(--text-main);
}
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 10px; }
.footer-col a { font-size: 14px; color: var(--text-muted); transition: color 0.3s; }
.footer-col a:hover { color: var(--accent-dark); }
.footer-bottom {
  border-top: 1px solid var(--line);
  padding-top: 24px;
  font-size: 12px;
  color: var(--text-muted);
  text-align: center;
}

/* ─── Reveal & Stagger (правка #12: усиленные анимации) ─────────────────── */

.reveal {
  opacity: 0;
  transform: translateY(70px);
  filter: blur(10px);
  transition:
    opacity 1.4s var(--ease),
    transform 1.4s var(--ease),
    filter 1.4s var(--ease);
}
.reveal.in-view {
  opacity: 1;
  transform: translateY(0);
  filter: blur(0);
}

.stagger-child {
  opacity: 0;
  transform: translateY(50px) scale(0.97);
  filter: blur(8px);
  transition:
    opacity 1.1s var(--ease),
    transform 1.1s var(--ease),
    filter 1.1s var(--ease);
}
.stagger-child.in-view {
  opacity: 1;
  transform: translateY(0) scale(1);
  filter: blur(0);
}
.stagger-child:nth-child(1).in-view { transition-delay: 0s; }
.stagger-child:nth-child(2).in-view { transition-delay: 0.14s; }
.stagger-child:nth-child(3).in-view { transition-delay: 0.28s; }
.stagger-child:nth-child(4).in-view { transition-delay: 0.42s; }
.stagger-child:nth-child(5).in-view { transition-delay: 0.56s; }
.stagger-child:nth-child(6).in-view { transition-delay: 0.7s; }

/* Mobile: чуть быстрее десктопа, без blur (дорогой эффект для мобильного GPU) */
@media (max-width: 768px) {
  /* v41: на мобиле показываем вертикальное hero-фото, если оно загружено,
     и полностью прячем десктопное/видео/градиент под ним. Прячем двумя
     независимыми способами — по атрибуту секции data-has-mobile и по классу
     hero-bg--has-mobile — чтобы сработало при любом порядке рендера. */
  .hero-bg-mobile { display: block; z-index: 0; }
  .hero-bg-mobile--empty { display: none; }
  .hero[data-has-mobile="1"] .hero-bg,
  .hero[data-has-mobile="1"] .hero-bg-video,
  .hero-bg--has-mobile { display: none !important; }
  .reveal {
    transform: translateY(45px);
    filter: none;
    transition:
      opacity 0.9s var(--ease),
      transform 0.9s var(--ease);
  }
  .stagger-child {
    transform: translateY(36px) scale(1);
    filter: none;
    transition:
      opacity 0.8s var(--ease),
      transform 0.8s var(--ease);
  }
  .stagger-child:nth-child(1).in-view { transition-delay: 0s; }
  .stagger-child:nth-child(2).in-view { transition-delay: 0.08s; }
  .stagger-child:nth-child(3).in-view { transition-delay: 0.16s; }
  .stagger-child:nth-child(4).in-view { transition-delay: 0.24s; }
  .stagger-child:nth-child(5).in-view { transition-delay: 0.32s; }
  .stagger-child:nth-child(6).in-view { transition-delay: 0.4s; }
}

/* Уважаем системную настройку «уменьшить движение» */
@media (prefers-reduced-motion: reduce) {
  .reveal, .stagger-child {
    transform: none !important;
    filter: none !important;
    transition: opacity 0.3s ease !important;
  }
}

/* ─── 404 ───────────────────────────────────────────────────────────────── */

.error-page {
  min-height: 70vh;
  display: flex; flex-direction: column; justify-content: center; align-items: center;
  text-align: center;
  padding: 200px 20px 100px;
}
.error-code {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(120px, 20vw, 240px);
  font-weight: 300;
  line-height: 1;
  margin-bottom: 24px;
  color: var(--accent);
}
.error-text {
  font-size: 18px;
  margin-bottom: 40px;
  color: var(--text-muted);
}

/* ─── Адаптивность ─────────────────────────────────────────────────────── */

@media (max-width: 1280px) and (min-width: 1025px) {
  /* Промежуточная ширина окна (ноутбуки/неполноэкранное окно): мягко ужимаем
     навигацию, чтобы пункты меню не выглядели слишком крупными и помещались. */
  .nav-desktop ul { gap: 32px; }
  .nav-desktop a { font-size: 13px; }
  #site-header { padding: 18px 32px; }
}

@media (max-width: 1024px) {
  footer { padding: 60px 32px 32px; margin: 24px 0 0; }
  .footer-inner { grid-template-columns: 1fr 1fr; gap: 40px; }
  .categories { padding: 60px 40px; margin: 40px 8px 0; }
  .cat-grid { grid-template-columns: repeat(2, 1fr); }
  .products-grid { grid-template-columns: repeat(2, 1fr); }
  .about-grid { grid-template-columns: 1fr; gap: 40px; }
  .about { margin: 24px 8px 0; padding: 60px 32px; }
  .workshop { margin: 24px 8px 0; padding: 60px 32px; }
  .nav-desktop ul { gap: 36px; }
  .nav-desktop a { font-size: 13px; }
}

@media (max-width: 640px) {
  #site-header { padding: 14px 20px; }
  #site-header.scrolled { padding: 10px 20px; }
  .nav-desktop { display: none; }
  .lang-switch { display: none; }
  .burger { display: block; }
  .logo-sub { display: none; }                    /* FR-W-MOB2 */

  section { padding: 60px 20px; }
  .footer-inner { grid-template-columns: 1fr; gap: 32px; }

  .hero { min-height: 100vh; min-height: 100svh; padding: 90px 20px 100px; }
  .hero h1 { font-size: clamp(36px, 11vw, 56px); }
  .hero p { font-size: 15px; }
  .hero-cta { padding: 16px 32px; }

  .categories { padding: 50px 20px; margin: 24px 6px 0; }
  .cat-grid { grid-template-columns: 1fr; gap: 16px; }
  .cat-card { aspect-ratio: 16/10; }
  .cat-card-title { font-size: 22px; }

  .products-grid { grid-template-columns: repeat(2, 1fr); gap: 16px; }
  .product-name { font-size: 18px; }
  .products-header {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 12px;
    margin-bottom: 32px;
  }
  .view-all--desktop { display: none; }
  .view-all--mobile { display: inline-block; }

  .about { margin: 16px 6px 0; padding: 50px 24px; }
  .workshop { margin: 16px 6px 0; padding: 50px 24px; }
  .manifesto { padding: 40px 24px; }
  footer { padding: 48px 20px 24px; margin: 16px 0 0; }

  .testimonials { padding: 60px 0; }
  .testimonials-header { padding: 0 20px; }
  .testimonials-track { padding: 12px 20px; gap: 16px; }
  .testimonial-card { height: 360px; }
  .testimonial-vertical { width: 240px; }
  .testimonial-horizontal { width: 320px; }
  .testimonial-square { width: 280px; }

  /* Страница товара на телефоне: уменьшаем боковые поля и гарантируем,
     что фото и лента не выходят за ширину экрана */
  .product-page { padding: 90px 16px 50px; }
  .product-layout { gap: 20px; }
  .gallery { gap: 10px; max-width: 100%; }
  .main-image { height: 46vh; max-height: 440px; min-height: 200px; }
  .thumb { width: 56px; height: 56px; }
}

/* ============================================================
   Phase 2: catalog + product page styles
   ============================================================ */

/* ─── Breadcrumbs (общие) ──────────────────────────────────────────── */
.breadcrumbs {
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 24px;
}
.breadcrumbs a { color: var(--text-muted); transition: color 0.3s; }
.breadcrumbs a:hover { color: var(--accent-dark); }
.breadcrumbs .sep { margin: 0 8px; opacity: 0.5; }
.breadcrumbs .current { color: var(--text-main); }

/* ─── Catalog hero ─────────────────────────────────────────────────── */
.catalog-hero {
  padding: 130px 60px 30px;
  max-width: 1400px;
  margin: 0 auto;
}
.catalog-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(42px, 5vw, 68px);
  font-weight: 300;
  line-height: 1.08;
  margin-bottom: 14px;
  letter-spacing: -0.01em;
}
.catalog-title em { font-style: italic; font-weight: 400; }
.catalog-subtitle {
  color: var(--text-muted);
  font-size: 15px;
  max-width: 620px;
}

/* ─── Category tabs ────────────────────────────────────────────────── */
.category-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 0 60px 30px;
  max-width: 1400px;
  margin: 0 auto;
}
.cat-tab {
  display: inline-block;
  padding: 8px 18px;
  border: 1px solid var(--line);
  border-radius: 100px;
  font-size: 13px;
  letter-spacing: 0.05em;
  color: var(--text-main);
  cursor: pointer;
  transition: all 0.3s var(--ease);
  background: var(--bg-main);
}
.cat-tab:hover {
  border-color: var(--accent);
  color: var(--accent-dark);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(184, 153, 104, 0.14);
}
.cat-tab.active {
  position: relative;
  border-color: var(--accent);
  color: var(--text-main);
  /* плоское золотистое стекло: светлый верх + тень + лёгкое свечение */
  background: #f3ece0;
  box-shadow:
    inset 0 1.5px 1px rgba(255, 255, 255, 0.7),
    inset 0 -2px 4px rgba(156, 126, 80, 0.14),
    0 4px 14px rgba(184, 153, 104, 0.22),
    0 0 10px rgba(247, 227, 173, 0.25);
}
.cat-tab.active:hover {
  transform: translateY(-2px);
  box-shadow:
    inset 0 1.5px 1px rgba(255, 255, 255, 0.7),
    inset 0 -2px 4px rgba(156, 126, 80, 0.14),
    0 6px 16px rgba(184, 153, 104, 0.26),
    0 0 12px rgba(247, 227, 173, 0.3);
}

/* ─── Catalog body: sidebar + grid ─────────────────────────────────── */
.catalog-body {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 40px;
  padding: 0 60px 80px;
  max-width: 1400px;
  margin: 0 auto;
  align-items: start;
}

.filters-sidebar {
  position: sticky;
  top: 110px;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.filter-section { border-bottom: 1px solid var(--line); padding-bottom: 18px; }
.filter-title {
  font-size: 11px;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--text-main);
  margin-bottom: 12px;
  font-weight: 500;
}
.filter-content { display: flex; flex-direction: column; gap: 8px; }
.filter-checkbox {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: var(--text-main);
  cursor: pointer;
  padding: 4px 0;
}
.filter-checkbox input { display: none; }
.filter-checkbox .box {
  width: 16px; height: 16px;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: var(--bg-main);
  display: inline-block;
  position: relative;
  flex-shrink: 0;
}
.filter-checkbox input:checked + .box {
  /* золотистое стеклышко: светлый верх + тень + лёгкое свечение */
  background: var(--accent);
  border-color: var(--accent-dark);
  box-shadow:
    inset 0 1px 1px rgba(255, 255, 255, 0.55),
    inset 0 -1px 2px rgba(120, 95, 55, 0.25),
    0 2px 6px rgba(184, 153, 104, 0.3),
    0 0 6px rgba(247, 227, 173, 0.35);
}
.filter-checkbox input:checked + .box::after {
  content: '✓';
  position: absolute;
  top: -2px; left: 2px;
  color: #fff;
  font-size: 12px;
}
.price-range { display: flex; gap: 8px; }
.price-range input {
  flex: 1;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--bg-main);
  font-size: 13px;
  color: var(--text-main);
  width: 100%;
  min-width: 0;
}
.filter-actions { display: flex; gap: 8px; }
.filter-apply {
  position: relative;
  flex: 1;
  padding: 13px;
  border: 1px solid var(--accent);
  background: #f3ece0;
  color: var(--text-main);
  border-radius: 100px;
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  cursor: pointer;
  overflow: hidden;
  isolation: isolate;
  transition: transform 0.45s var(--ease), box-shadow 0.45s var(--ease), background 0.45s var(--ease), opacity 0.3s var(--ease), border-color 0.3s var(--ease);
}
.filter-apply::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  z-index: -1;
  box-shadow:
    inset 0 1.5px 1px rgba(255, 255, 255, 0.7),
    inset 0 -2px 4px rgba(156, 126, 80, 0.12);
}
.filter-apply::after {
  content: "";
  position: absolute;
  left: 50%; top: 50%;
  width: 140%; padding-bottom: 140%;
  transform: translate(-50%, -50%) scale(0.4);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 252, 245, 0.9) 0%, rgba(255, 252, 245, 0) 65%);
  opacity: 0;
  z-index: -1;
  transition: opacity 0.45s var(--ease), transform 0.6s var(--ease);
}
.filter-apply:hover:not(:disabled) {
  transform: translateY(-3px);
  box-shadow: 0 10px 24px rgba(184, 153, 104, 0.18);
  background: #f6f0e6;
}
.filter-apply:hover:not(:disabled)::after {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}
/* неактивна, пока ничего не выбрано в фильтрах */
.filter-apply:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  border-color: var(--line);
  background: var(--bg-secondary);
}
.filter-apply:hover { opacity: 0.85; }
.filter-clear {
  width: 44px; height: 44px;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 50%;
  cursor: pointer;
  font-size: 16px;
  color: var(--text-muted);
}

/* ─── Catalog content controls ─────────────────────────────────────── */
.catalog-content { min-width: 0; }
.catalog-controls {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}
.results-count { font-size: 13px; color: var(--text-muted); flex: 1; }
.results-count strong { color: var(--text-main); font-weight: 500; }
.filters-trigger {
  display: none;
  padding: 8px 16px;
  background: var(--bg-secondary);
  border: 1px solid var(--line);
  border-radius: 100px;
  font-size: 12px;
  letter-spacing: 0.1em;
  color: var(--text-main);
  cursor: pointer;
}
.sort-select select {
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 100px;
  background: var(--bg-main);
  font-size: 13px;
  color: var(--text-main);
  font-family: inherit;
  cursor: pointer;
}

/* ─── Pagination ───────────────────────────────────────────────────── */
.pagination {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-top: 60px;
  flex-wrap: wrap;
}
.page-btn {
  display: inline-block;
  min-width: 40px;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--bg-main);
  color: var(--text-main);
  font-size: 13px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s;
}
.page-btn:hover:not(.active):not(.disabled) {
  border-color: var(--accent);
  color: var(--accent-dark);
}
.page-btn.active {
  background: var(--text-main);
  color: var(--bg-main);
  border-color: var(--text-main);
}
.page-btn.disabled { opacity: 0.4; cursor: default; }

/* ─── Bottom-sheet (mobile фильтры) ────────────────────────────────── */
.sheet-overlay {
  position: fixed; inset: 0;
  background: rgba(43, 38, 32, 0);
  z-index: 199;
  pointer-events: none;
  transition: background 0.3s;
}
.sheet-overlay.open { background: rgba(43, 38, 32, 0.45); pointer-events: auto; }

.bottom-sheet {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  height: 70vh;
  background: var(--bg-main);
  border-radius: 24px 24px 0 0;
  z-index: 200;
  transform: translateY(100%);
  transition: transform 0.4s var(--ease);
  display: flex;
  flex-direction: column;
  box-shadow: 0 -20px 60px rgba(43,38,32,0.12);
}
.bottom-sheet.open { transform: translateY(0); }
.sheet-handle {
  width: 40px; height: 4px;
  background: var(--line);
  border-radius: 2px;
  margin: 12px auto 8px;
}
.sheet-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 24px;
  border-bottom: 1px solid var(--line);
}
.sheet-header h3 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 22px;
  font-weight: 400;
}
.sheet-reset { color: var(--text-muted); font-size: 12px; cursor: pointer; }
.sheet-content { flex: 1; overflow-y: auto; padding: 20px 24px; }
.sheet-footer {
  display: flex;
  gap: 12px;
  padding: 16px 24px 24px;
  border-top: 1px solid var(--line);
}
.sheet-btn {
  flex: 1;
  padding: 14px;
  border-radius: 100px;
  font-size: 12px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  cursor: pointer;
  border: none;
}
.sheet-btn.outline {
  background: transparent;
  border: 1px solid var(--text-main);
  color: var(--text-main);
}
.sheet-btn.primary {
  background: var(--text-main);
  color: var(--bg-main);
}

/* ─── Product page ─────────────────────────────────────────────────── */
.product-page {
  max-width: 1400px;
  margin: 0 auto;
  padding: 130px 60px 60px;
  overflow-x: hidden;
}
.product-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: 50px;
  align-items: start;
}
.product-layout .info { max-width: 520px; }

/* Gallery */
.gallery {
  display: grid;
  grid-template-columns: 88px 1fr;
  gap: 16px;
  align-items: start;
  min-width: 0;
}
.gallery > * { min-width: 0; }
.thumbs-wrap {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
  /* Высота колонки миниатюр привязана к высоте основного фото */
  height: min(70vh, 640px);
}
.thumbs {
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow-y: auto;
  scrollbar-width: none;
  flex: 1 1 auto;
  min-height: 0;
  scroll-behavior: smooth;
}
.thumbs::-webkit-scrollbar { display: none; }
/* В режиме редактирования лента разворачивается полностью */
body.edit-mode .thumbs-wrap { height: auto; }
body.edit-mode .thumbs { max-height: none; overflow: visible; }
/* Кнопка прокрутки — широкая, с пульсирующей стрелкой, прибита к низу фото */
.thumbs-arrow {
  flex-shrink: 0;
  width: 80px;
  height: 26px;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--bg-main);
  color: var(--text-main);
  cursor: pointer;
  transition: background 0.2s var(--ease), opacity 0.2s var(--ease);
}
.thumbs-arrow:hover { background: var(--bg-secondary); }
.thumbs-arrow__chevron {
  font-size: 18px; line-height: 1;
  animation: thumb-chevron-pulse 1.5s var(--ease) infinite;
}
.thumbs-arrow.is-disabled {
  cursor: default;
  opacity: 0.35;
}
.thumbs-arrow.is-disabled:hover { background: var(--bg-main); }
.thumbs-arrow.is-disabled .thumbs-arrow__chevron { animation: none; }
@keyframes thumb-chevron-pulse {
  0%, 100% { transform: translateY(0); opacity: 0.5; }
  50% { transform: translateY(3px); opacity: 1; }
}
body.edit-mode .thumbs-arrow { display: none; }
.thumb {
  position: relative;
  width: 80px; height: 80px;
  border-radius: var(--radius-md);
  overflow: hidden;
  cursor: pointer;
  border: 2px solid transparent;
  transition: border-color 0.3s, transform 0.3s;
  flex-shrink: 0;
}
.thumb img { width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.thumb:hover { transform: scale(1.04); }
.thumb.active { border-color: var(--accent); }
.main-image {
  position: relative;
  height: min(70vh, 640px);
  max-width: 100%;
  min-width: 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  touch-action: pan-y;
  background: var(--bg-main);
  box-shadow: 0 12px 32px rgba(43,38,32,0.10);
  cursor: zoom-in;
  display: flex; align-items: center; justify-content: center;
}
.main-image img {
  max-width: 100%; max-height: 100%;
  width: auto; height: auto;
  object-fit: contain;
  border-radius: var(--radius-md);
  transition: opacity 0.18s, transform 0.12s var(--ease);
}
/* Заглушка «фото готовится» заполняет область целиком, без полос */
.main-image--empty { background: var(--bg-secondary); }
.main-image--empty .no-photo-img {
  width: 100%; height: 100%;
  max-width: none; max-height: none;
  object-fit: cover;
}
.zoom-hint {
  position: absolute; bottom: 16px; right: 16px;
  background: rgba(247, 242, 234, 0.92);
  backdrop-filter: blur(4px);
  padding: 6px 14px;
  border-radius: 100px;
  font-size: 11px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-main);
  pointer-events: none;
}

/* Info column */
.info { padding-top: 12px; }
.product-mastership {
  font-size: 12px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 12px;
}
.product-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(32px, 3.6vw, 48px);
  font-weight: 300;
  line-height: 1.1;
  margin-bottom: 10px;
}
.product-title em { font-style: italic; font-weight: 400; }
.product-sku {
  font-size: 12px;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 18px;
}
.product-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 500;
  margin-bottom: 22px;
  padding: 6px 14px;
  border-radius: 100px;
  /* лёгкое стеклышко: светлый верх + тонкая нижняя грань */
  box-shadow:
    inset 0 1px 1px rgba(255, 255, 255, 0.55),
    inset 0 -1px 2px rgba(0, 0, 0, 0.05);
}
.product-status::before {
  content: '';
  width: 7px; height: 7px;
  border-radius: 50%;
  background: currentColor;
  flex-shrink: 0;
}
.product-status.status-in_stock {
  color: #5d7c41;
  background: rgba(107, 142, 78, 0.14);
}
.product-status.status-on_order {
  color: var(--accent-dark);
  background: rgba(168, 137, 96, 0.14);
}
.product-status.status-sale {
  color: #b04040;
  background: rgba(196, 77, 77, 0.12);
}

.product-price {
  font-family: 'Cormorant Garamond', serif;
  font-size: 36px;
  font-weight: 400;
  margin-bottom: 28px;
}
.product-price .old {
  font-size: 22px;
  color: var(--text-muted);
  text-decoration: line-through;
  margin-right: 12px;
  font-weight: 300;
}
/* Компактная «Цена по запросу» — в размер обычного текста, не как крупная цена */
.product-price--request {
  font-size: 16px;
  color: var(--text-muted);
  font-style: italic;
}
/* Поле цены в режиме редактирования: плейсхолдер/старое значение серым */
.product-price.is-editing-empty { color: var(--text-muted); }

.cta-row {
  display: flex;
  gap: 10px;
  margin-bottom: 28px;
  flex-wrap: wrap;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  cursor: pointer;
  font-family: inherit;
  text-decoration: none;
  transition: all 0.3s var(--ease);
}
.btn-primary {
  flex: 1;
  min-width: 200px;
  padding: 16px 32px;
  background: var(--text-main);
  color: var(--bg-main);
  font-size: 12px;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  border-radius: 100px;
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(43,38,32,0.25);
}
/* btn-primary с золотой рамкой: тёмный центр, при наведении — золото */
.btn-primary.ag-gold-border {
  background: transparent;
  --agb-bg: var(--accent);
  --agb-bg-hover: var(--bg-main);
  --agb-fg: var(--text-main);
  --agb-fg-hover: var(--text-main);
}
/* .btn-icon — стеклянный стиль определён ниже (соц-кнопки tg/wa) */

.product-description {
  margin-top: 32px;
  margin-bottom: 24px;
  font-size: 15px;
  line-height: 1.7;
  color: var(--text-main);
  position: relative;
  background: var(--bg-secondary);
  border-radius: var(--radius-lg);
  padding: 22px 24px;
  box-shadow: 0 2px 10px rgba(43, 38, 32, 0.05);
}
.product-description p { margin-bottom: 14px; }
.product-description p:last-child { margin-bottom: 0; }
.product-description.is-collapsed .product-description-inner {
  max-height: calc(1.7em * 4);
  overflow: hidden;
  -webkit-mask-image: linear-gradient(to bottom, #000 60%, transparent 100%);
  mask-image: linear-gradient(to bottom, #000 60%, transparent 100%);
}
.description-toggle {
  margin-top: 10px;
  background: transparent;
  border: none;
  padding: 4px 0;
  font-family: inherit;
  font-size: 12px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent-dark);
  cursor: pointer;
}
.description-toggle .dt-label { position: relative; z-index: 2; }
.description-toggle:hover { color: var(--accent-dark); }
.description-toggle[hidden] { display: none; }
/* совмещение с ag-underline: оставляем место под рисующуюся SVG-линию */
.description-toggle.ag-underline { padding-bottom: 10px; margin-top: 14px; }

.specs {
  padding-top: 4px;
}
.spec-row {
  display: grid;
  grid-template-columns: 180px 1fr;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
}
.spec-row:last-child { border-bottom: none; }
.spec-label { color: var(--text-muted); }
.spec-value { color: var(--text-main); }

/* Related */
.related {
  max-width: 1400px;
  margin: 60px auto 80px;
  padding: 0 60px;
}
.related .section-title {
  font-size: clamp(32px, 3.6vw, 48px);
  margin-bottom: 30px;
  text-align: center;
}

/* Modal */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(43, 38, 32, 0);
  z-index: 300;
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  transition: background 0.3s;
}
.modal-overlay.open { background: rgba(43, 38, 32, 0.55); pointer-events: auto; }
.modal {
  width: 100%;
  max-width: 460px;
  max-height: 90vh;
  overflow-y: auto;
  background: var(--bg-main);
  border-radius: var(--radius-xl);
  padding: 32px 28px 24px;
  position: relative;
  transform: scale(0.96);
  opacity: 0;
  transition: transform 0.3s, opacity 0.3s;
  box-shadow: 0 30px 80px rgba(43,38,32,0.25);
}
.modal-overlay.open .modal { transform: scale(1); opacity: 1; }
.modal-close {
  position: absolute; top: 12px; right: 12px;
  width: 36px; height: 36px;
  background: transparent;
  border: none;
  font-size: 24px;
  color: var(--text-muted);
  cursor: pointer;
  border-radius: 50%;
  transition: background 0.3s;
}
.modal-close:hover { background: var(--bg-secondary); }
.modal-product {
  display: flex;
  gap: 14px;
  align-items: center;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 18px;
}
.modal-product-img { width: 60px; height: 60px; border-radius: 12px; overflow: hidden; }
.modal-product-img img { width: 100%; height: 100%; object-fit: cover; }
.modal-product-name {
  font-family: 'Cormorant Garamond', serif;
  font-size: 18px;
  margin-bottom: 4px;
}
.modal-product-price { font-size: 12px; color: var(--text-muted); }
.modal-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 26px;
  margin-bottom: 6px;
}
.modal-subtitle { font-size: 13px; color: var(--text-muted); margin-bottom: 18px; }

.quick-channels {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 14px;
}
.channel-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
  border-radius: 100px;
  border: 1px solid var(--accent);
  background: #f3ece0;
  color: var(--text-main);
  font-size: 12px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  font-weight: 500;
  text-decoration: none;
  overflow: hidden;
  isolation: isolate;
  transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease), background 0.4s var(--ease), color 0.4s var(--ease), border-color 0.4s var(--ease);
}
.channel-btn::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  z-index: -1;
  box-shadow:
    inset 0 1.5px 1px rgba(255, 255, 255, 0.7),
    inset 0 -2px 4px rgba(156, 126, 80, 0.12);
}
.channel-btn.tg { color: #2AABEE; }
.channel-btn.wa { color: #25D366; }
.channel-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(184, 153, 104, 0.16);
}
.channel-btn.tg:hover { background: #2AABEE; color: #fff; border-color: #2AABEE; }
.channel-btn.wa:hover { background: #25D366; color: #fff; border-color: #25D366; }
.channel-btn.tg:hover::before,
.channel-btn.wa:hover::before {
  box-shadow:
    inset 0 1px 2px rgba(255, 255, 255, 0.3),
    inset 0 -1px 2px rgba(0, 0, 0, 0.10);
}
.modal-divider {
  text-align: center;
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin: 14px 0;
  position: relative;
}
.modal-divider::before, .modal-divider::after {
  content: '';
  position: absolute;
  top: 50%;
  width: 30%;
  height: 1px;
  background: var(--line);
}
.modal-divider::before { left: 0; }
.modal-divider::after { right: 0; }

.form-honeypot {
  position: absolute;
  left: -9999px;
  width: 1px; height: 1px;
  opacity: 0;
}
.form-group { margin-bottom: 12px; }
.form-input, .form-textarea {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid var(--accent);
  border-radius: 12px;
  background: var(--bg-main);
  font-family: inherit;
  font-size: 15px;
  color: var(--text-main);
  transition: border-color 0.25s, box-shadow 0.25s;
}
.form-input:focus, .form-textarea:focus {
  outline: none;
  border-color: var(--accent-dark);
  box-shadow: 0 0 0 3px rgba(184, 153, 104, 0.22);
}
.form-textarea { resize: vertical; min-height: 90px; }
.form-submit {
  position: relative;
  width: 100%;
  padding: 18px;
  border: none;
  border-radius: 100px;
  color: var(--text-main);
  font-size: 12px;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  font-family: inherit;
  cursor: pointer;
  --agr: 0deg;
  background: conic-gradient(from var(--agr),
    var(--accent) 0deg, #fff4d6 30deg, var(--accent) 60deg,
    var(--accent) 180deg, #fff4d6 210deg, var(--accent) 240deg,
    var(--accent) 360deg);
  animation: agGlassRot 5s linear infinite;
  transition: transform 0.45s var(--ease), box-shadow 0.45s var(--ease);
}
.form-submit::after {
  content: "";
  position: absolute;
  inset: 1.5px;
  border-radius: 98px;
  z-index: 0;
  background: #f6efe2;
  box-shadow:
    inset 0 2px 2px rgba(255, 255, 255, 0.95),
    inset 0 -3px 5px rgba(156, 126, 80, 0.16),
    inset 2px 0 3px -1px rgba(184, 153, 104, 0.12),
    inset -2px 0 3px -1px rgba(184, 153, 104, 0.12),
    inset 0 0 0 1px rgba(255, 255, 255, 0.5);
  transition: box-shadow 0.45s var(--ease);
}
.form-submit > span { position: relative; z-index: 3; }
.form-submit .ag-glass__glass {
  position: absolute;
  inset: 1.5px;
  border-radius: 98px;
  overflow: hidden;
  z-index: 1;
  pointer-events: none;
}
.form-submit .ag-glass__fill {
  position: absolute;
  width: 200%;
  height: 0;
  padding-bottom: 200%;
  left: 50%;
  top: 50%;
  border-radius: 50%;
  mix-blend-mode: screen;
  transform: translate(-50%, -50%);
  opacity: 0;
  transition: opacity 0.5s var(--ease);
  background: conic-gradient(from 0deg,
    rgba(255, 255, 255, 0) 0deg, #ffffff 45deg, rgba(255, 255, 255, 0) 90deg,
    rgba(255, 255, 255, 0) 180deg, #fffdf9 225deg, rgba(255, 255, 255, 0) 270deg,
    rgba(255, 255, 255, 0) 360deg);
  animation: agGlassSpin 9s linear infinite;
  will-change: transform;
}
.form-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(184, 153, 104, 0.22);
}
.form-submit:hover .ag-glass__fill { opacity: 0.7; }
@media (prefers-reduced-motion: reduce) {
  .form-submit { animation: none; }
  .form-submit .ag-glass__fill { animation: none; }
}
@supports not (background: conic-gradient(from 0deg, red, blue)) {
  .form-submit { background: var(--accent); }
}
.form-result {
  margin-top: 12px;
  font-size: 14px;
  text-align: center;
  min-height: 1.4em;
}
.form-result.success { color: #6b8e4e; }
.form-result.error { color: #c44d4d; }
.form-policy {
  margin-top: 12px;
  font-size: 11px;
  color: var(--text-muted);
  text-align: center;
  line-height: 1.6;
}
.form-policy a { color: var(--text-muted); text-decoration: underline; }

/* Sticky CTA (mobile only) */
.sticky-cta {
  display: none;
  position: fixed; left: 0; right: 0; bottom: 0;
  padding: 10px 14px;
  background: var(--bg-main);
  border-top: 1px solid var(--line);
  box-shadow: 0 -8px 24px rgba(43,38,32,0.08);
  gap: 8px;
  z-index: 90;
  align-items: center;
}
.sticky-cta .btn-primary {
  flex: 1;
  height: 48px;
  padding: 0 18px;
  min-width: 0;
  font-size: 11px;
  letter-spacing: 0.2em;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.sticky-cta .channel-btn {
  width: 48px; height: 48px;
  flex-shrink: 0;
  padding: 0;
  border-radius: 50%;
}
.sticky-cta .channel-btn.tg { background: #2AABEE; color: #fff; }
.sticky-cta .channel-btn.wa { background: #25D366; color: #fff; }
.sticky-cta .channel-btn:hover { transform: translateY(-2px); }
.sticky-cta .channel-btn svg { display: block; }

/* ─── Lightbox ─────────────────────────────────────────────────────── */
.lightbox {
  position: fixed; inset: 0;
  background: rgba(20, 18, 14, 0);
  z-index: 400;
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.3s;
  visibility: hidden;
  opacity: 0;
}
.lightbox.open {
  background: rgba(20, 18, 14, 0.96);
  pointer-events: auto;
  visibility: visible;
  opacity: 1;
}
.lightbox-img {
  max-width: 90vw;
  max-height: 88vh;
  object-fit: contain;
  border-radius: 6px;
  opacity: 0;
  transform: scale(0.96);
  transition: opacity 0.3s, transform 0.3s;
}
.lightbox.open .lightbox-img { opacity: 1; transform: scale(1); }
.lightbox-close, .lightbox-prev, .lightbox-next {
  position: absolute;
  background: rgba(255,255,255,0.1);
  color: white;
  border: 1px solid rgba(255,255,255,0.25);
  width: 48px; height: 48px;
  border-radius: 50%;
  font-size: 24px;
  cursor: pointer;
  transition: background 0.3s;
}
.lightbox-close:hover, .lightbox-prev:hover, .lightbox-next:hover {
  background: rgba(255,255,255,0.2);
}
.lightbox-close { top: 24px; right: 24px; }
.lightbox-prev { left: 24px; top: 50%; transform: translateY(-50%); }
.lightbox-next { right: 24px; top: 50%; transform: translateY(-50%); }

/* ─── Адаптив caталога/карточки ────────────────────────────────────── */
@media (max-width: 1024px) {
  .catalog-hero { padding: 110px 40px 24px; }
  .category-tabs { padding: 0 40px 24px; }
  .catalog-body { grid-template-columns: 1fr; padding: 0 40px 60px; }
  .filters-sidebar { display: none; }
  .filters-trigger { display: inline-flex; align-items: center; gap: 6px; }

  .product-page { padding: 110px 40px 60px; }
  .product-layout { grid-template-columns: 1fr; gap: 24px; }
  .gallery { grid-template-columns: 1fr; gap: 12px; }
  .thumbs-wrap {
    height: auto;
    display: block;
    width: 100%;
    min-width: 0;
  }
  .thumbs {
    flex-direction: row;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    max-height: none;
    width: 100%;
    min-width: 0;
    gap: 8px;
    padding-bottom: 4px;
  }
  .thumb { width: 64px; height: 64px; }
  .thumbs-arrow { display: none; }  /* на мобиле лента листается свайпом */
  /* Поле фото — по ширине экрана, фото вписывается по высоте/ширине */
  .main-image {
    width: 100%;
    height: 44vh;
    max-height: 420px;
    min-height: 220px;
  }
  .main-image img {
    max-width: 100%; max-height: 100%;
    transition: none;              /* без opacity-перехода — нет «призраков» на мобильных */
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
  }
  .related { padding: 0 40px; margin: 40px auto 60px; }
}

@media (max-width: 640px) {
  .catalog-hero { padding: 90px 20px 20px; }
  .category-tabs { padding: 0 20px 20px; gap: 6px; }
  .cat-tab { padding: 6px 14px; font-size: 12px; }
  .catalog-body { padding: 0 20px 40px; }
  .catalog-controls { gap: 8px; }
  .results-count { font-size: 12px; }
  .pagination { margin-top: 40px; }
  .page-btn { min-width: 36px; padding: 6px 10px; font-size: 12px; }

  .product-page { padding: 90px 20px 100px; }
  .product-title { font-size: 28px; }
  .product-price { font-size: 28px; }
  .cta-row { display: none; }       /* на mobile показываем sticky-cta */
  .sticky-cta { display: flex; }
  .specs { font-size: 13px; }
  .spec-row { grid-template-columns: 130px 1fr; }
  .related { padding: 0 20px; }
  .related .section-title { font-size: 28px; }

  .modal { padding: 24px 20px 18px; max-height: 96vh; border-radius: 20px; }
  .quick-channels { grid-template-columns: 1fr; }
}

/* ============================================================
   Cookie-banner (152-ФЗ)
   ============================================================ */
.cookie-banner {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: 16px;
  z-index: 250;
  pointer-events: none;
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}
.cookie-banner.is-visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.cookie-banner.is-hiding {
  opacity: 0;
  transform: translateY(24px);
}
.cookie-banner__inner {
  max-width: 1080px;
  margin: 0 auto;
  background: rgba(247, 242, 234, 0.96);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 16px 22px;
  display: flex;
  align-items: center;
  gap: 20px;
  box-shadow: 0 20px 50px rgba(43, 38, 32, 0.18);
}
.cookie-banner__text {
  flex: 1;
  font-size: 13px;
  line-height: 1.55;
  color: var(--text-main);
  margin: 0;
}
.cookie-banner__link {
  color: var(--accent-dark);
  border-bottom: 1px solid rgba(168, 137, 96, 0.45);
  transition: color 0.3s, border-color 0.3s;
}
.cookie-banner__link:hover {
  color: var(--text-main);
  border-bottom-color: var(--text-main);
}
.cookie-banner__btn {
  flex-shrink: 0;
  cursor: pointer;
  /* визуал — .btn-outline.ag-glass-soft (матовое стекло как «Читать дальше») */
}

@media (max-width: 640px) {
  .cookie-banner {
    left: 10px;
    right: 10px;
    bottom: 10px;
  }
  .cookie-banner__inner {
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
    padding: 16px 18px;
    border-radius: 14px;
  }
  .cookie-banner__text { font-size: 12px; }
  .cookie-banner__btn { padding: 12px 18px; width: 100%; }
}

/* ============================================================
   Static page (Политика конфиденциальности и т.п.)
   ============================================================ */
.static-page {
  max-width: 820px;
  margin: 0 auto;
  padding: 140px 24px 80px;
}
.static-page .page-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(36px, 4vw, 56px);
  font-weight: 300;
  margin-bottom: 12px;
  line-height: 1.1;
}
.static-page .page-meta {
  font-size: 12px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 40px;
}
.static-page h2 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 26px;
  font-weight: 400;
  margin: 36px 0 14px;
  color: var(--text-main);
}
.static-page p { margin-bottom: 14px; font-size: 15px; line-height: 1.7; color: var(--text-main); }
.static-page ul { padding-left: 22px; margin-bottom: 16px; }
.static-page li { margin-bottom: 6px; line-height: 1.7; }
.static-page a { color: var(--accent-dark); border-bottom: 1px solid var(--accent); }
.static-page a:hover { color: var(--text-main); border-bottom-color: var(--text-main); }

/* ============================================================
   Field-level validation (форма заявки)
   ============================================================ */
.form-group { position: relative; }
.form-group.has-error .form-input,
.form-group.has-error .form-textarea {
  border-color: #c44d4d;
  background: rgba(196, 77, 77, 0.04);
  box-shadow: 0 0 0 3px rgba(196, 77, 77, 0.08);
}
.field-error {
  margin-top: 6px;
  padding: 0 4px;
  font-size: 12px;
  line-height: 1.4;
  color: #b04040;
}
.form-group.has-error .form-input:focus,
.form-group.has-error .form-textarea:focus {
  border-color: #c44d4d;
  box-shadow: 0 0 0 3px rgba(196, 77, 77, 0.12);
}

/* ============================================================
   Phase 3.1: admin-bar + auth pages
   ============================================================ */

/* Admin-bar — тонкая полоса сверху для залогиненных */
.admin-bar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 250;
  background: var(--text-main);
  color: var(--bg-main);
  font-size: 12px;
  letter-spacing: 0.04em;
}
.admin-bar__inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 8px 24px;
  display: flex;
  align-items: center;
  gap: 18px;
}
.admin-bar__brand {
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  font-size: 11px;
}
.admin-bar__user {
  color: rgba(247, 242, 234, 0.7);
  flex: 1;
}
.admin-bar__user strong { color: var(--bg-main); font-weight: 500; }
.admin-bar__edit-btn,
.admin-bar__logout {
  background: transparent;
  border: 1px solid rgba(247, 242, 234, 0.25);
  color: var(--bg-main);
  font-family: inherit;
  font-size: 11px;
  letter-spacing: 0.12em;
  padding: 6px 14px;
  border-radius: 100px;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, opacity 0.2s;
}
.admin-bar__edit-btn:hover:not(:disabled),
.admin-bar__logout:hover {
  background: rgba(247, 242, 234, 0.12);
  border-color: rgba(247, 242, 234, 0.5);
}
.admin-bar__edit-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.admin-bar__logout-form { margin: 0; }
.admin-bar__mobile-notice {
  display: none;
  padding: 8px 16px;
  background: rgba(168, 137, 96, 0.18);
  color: var(--bg-main);
  text-align: center;
  font-size: 12px;
  line-height: 1.4;
  border-top: 1px solid rgba(247, 242, 234, 0.12);
}

/* При admin-bar добавляем отступ сверху для остального контента */
body:has(.admin-bar) #site-header { top: 40px; }
body:has(.admin-bar) .cookie-banner { z-index: 240; }

/* Mobile (телефоны): edit-btn скрыта, показывается notice. Планшеты (≥768px)
   редактирование поддерживают. */
@media (max-width: 768px) {
  .admin-bar__inner { flex-wrap: wrap; gap: 10px; padding: 6px 14px; }
  .admin-bar__edit-btn { display: none; }
  .admin-bar__mobile-notice { display: block; }
  body:has(.admin-bar) #site-header { top: 68px; }
}

/* ── Auth pages (/studio/login) ────────────────────────────────────── */
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 80px 20px;
}
.auth-card {
  width: 100%;
  max-width: 420px;
  background: var(--bg-main);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 44px 36px 32px;
  box-shadow: 0 30px 80px rgba(43, 38, 32, 0.10);
}
.auth-brand {
  font-family: 'Cormorant Garamond', serif;
  font-size: 18px;
  letter-spacing: 0.32em;
  color: var(--text-muted);
  margin-bottom: 28px;
  text-align: center;
}
.auth-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 38px;
  font-weight: 300;
  margin-bottom: 6px;
  text-align: center;
}
.auth-subtitle {
  text-align: center;
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 28px;
}
.auth-error {
  background: rgba(196, 77, 77, 0.08);
  border: 1px solid rgba(196, 77, 77, 0.3);
  color: #b04040;
  font-size: 13px;
  padding: 10px 14px;
  border-radius: 12px;
  margin-bottom: 18px;
  text-align: center;
}
.auth-ok {
  background: rgba(95, 140, 95, 0.10);
  border: 1px solid rgba(95, 140, 95, 0.35);
  color: #4f7a4f;
  font-size: 13px;
  padding: 10px 14px;
  border-radius: 12px;
  margin-bottom: 18px;
  text-align: center;
}
.auth-form { display: flex; flex-direction: column; gap: 14px; }
.auth-field { display: flex; flex-direction: column; gap: 6px; }
.auth-label {
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.auth-input {
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--bg-main);
  font-family: inherit;
  font-size: 15px;
  color: var(--text-main);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.auth-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(168, 137, 96, 0.15);
}
/* Поле пароля с кнопкой «показать» */
.auth-password-wrap { position: relative; display: flex; }
.auth-password-wrap .auth-input { flex: 1; padding-right: 48px; }
.auth-eye {
  position: absolute;
  right: 6px; top: 50%;
  transform: translateY(-50%);
  width: 36px; height: 36px;
  border: none; background: transparent;
  font-size: 18px; line-height: 1;
  cursor: pointer; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-muted);
  transition: background 0.15s;
}
.auth-eye:hover { background: rgba(168, 137, 96, 0.1); color: var(--text-main); }
.auth-submit {
  margin-top: 8px;
  padding: 14px 18px;
  background: var(--text-main);
  color: var(--bg-main);
  border: none;
  border-radius: 100px;
  font-family: inherit;
  font-size: 12px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.2s, box-shadow 0.2s;
}
.auth-submit:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(43, 38, 32, 0.18);
}
.auth-note {
  margin-top: 22px;
  font-size: 12px;
  text-align: center;
  color: var(--text-muted);
  line-height: 1.6;
}
.auth-note a { color: var(--accent-dark); border-bottom: 1px solid var(--accent); }
.auth-note a:hover { color: var(--text-main); border-bottom-color: var(--text-main); }

/* ============================================================
   Phase 3.2: Inline editor
   ============================================================ */

/* В режиме редактирования — лёгкая подсветка редактируемых полей */
body.edit-mode [data-field-key] {
  position: relative;
  outline: 1px dashed rgba(168, 137, 96, 0.45);
  outline-offset: 4px;
  border-radius: 4px;
  cursor: text;
  transition: outline-color 0.2s, background-color 0.2s;
}
body.edit-mode [data-field-key]:hover {
  outline-color: var(--accent);
  background-color: rgba(168, 137, 96, 0.04);
}
body.edit-mode [data-field-key].is-focused {
  outline: 2px solid var(--accent);
  outline-offset: 6px;
  background-color: rgba(168, 137, 96, 0.08);
}
body.edit-mode [data-field-key][data-field-long] {
  cursor: pointer;
}
body.edit-mode [data-field-key].is-saving {
  opacity: 0.6;
  pointer-events: none;
}
body.edit-mode [data-field-key].saved-flash {
  background-color: rgba(140, 196, 140, 0.18) !important;
  outline-color: rgba(80, 160, 80, 0.6) !important;
  transition: background-color 0.4s, outline-color 0.4s;
}

/* Активная кнопка в admin-bar */
.admin-bar__edit-btn.is-active {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--text-main);
}

/* ── Toast ─────────────────────────────────────────────────────────── */
.editor-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translate(-50%, 16px);
  background: var(--text-main);
  color: var(--bg-main);
  padding: 12px 22px;
  border-radius: 100px;
  font-size: 13px;
  letter-spacing: 0.04em;
  box-shadow: 0 12px 28px rgba(43, 38, 32, 0.22);
  opacity: 0;
  pointer-events: none;
  z-index: 300;
  transition: opacity 0.3s, transform 0.3s var(--ease);
}
.editor-toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}
.editor-toast.is-error {
  background: #b04040;
}

/* ── Editor modal ──────────────────────────────────────────────────── */
.editor-modal {
  position: fixed;
  inset: 0;
  z-index: 280;
  display: none;
  align-items: center;
  justify-content: center;
}
.editor-modal.is-open { display: flex; }
.editor-modal__overlay {
  position: absolute;
  inset: 0;
  background: rgba(43, 38, 32, 0.4);
  backdrop-filter: blur(4px);
}
.editor-modal__inner {
  position: relative;
  width: min(680px, 92vw);
  max-height: 86vh;
  background: var(--bg-main);
  border-radius: 18px;
  box-shadow: 0 30px 80px rgba(43, 38, 32, 0.22);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.editor-modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 22px;
  border-bottom: 1px solid var(--line);
}
.editor-modal__title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 20px;
  font-weight: 400;
}
.editor-modal__close {
  background: transparent;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: var(--text-muted);
  line-height: 1;
  padding: 4px 8px;
}
.editor-modal__close:hover { color: var(--text-main); }
.editor-modal__textarea {
  flex: 1;
  margin: 18px 22px 8px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  font-family: inherit;
  font-size: 15px;
  line-height: 1.65;
  color: var(--text-main);
  background: var(--bg-main);
  resize: vertical;
  min-height: 220px;
}
.editor-modal__textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(168, 137, 96, 0.15);
}
/* Ф3.4 (C): rich-редактор внутри модалки */
.editor-modal__toolbar {
  display: flex;
  gap: 4px;
  margin: 14px 22px 0;
}
.editor-modal__fmt {
  width: 38px; height: 38px;
  border: 1px solid var(--line);
  background: var(--bg-main);
  color: var(--text-main);
  border-radius: 8px;
  cursor: pointer;
  font-size: 16px;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.15s var(--ease);
}
.editor-modal__fmt:hover { border-color: var(--accent); }
.editor-modal__fmt.is-active { background: var(--accent); color: #fff; border-color: var(--accent); }
.editor-modal__fmt i { font-family: 'Cormorant Garamond', serif; font-style: italic; font-size: 18px; }
.editor-modal__editor {
  flex: 1;
  margin: 10px 22px 8px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  font-family: inherit;
  font-size: 15px;
  line-height: 1.65;
  color: var(--text-main);
  background: var(--bg-main);
  min-height: 200px;
  max-height: 50vh;
  overflow-y: auto;
}
.editor-modal__editor:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(168, 137, 96, 0.15);
}
.editor-modal__editor strong { font-weight: 700; }
.editor-modal__editor em { font-style: italic; }
.editor-modal__footer {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 22px 18px;
  border-top: 1px solid var(--line);
}
.editor-modal__hint {
  flex: 1;
  font-size: 12px;
  color: var(--text-muted);
}
.editor-modal__cancel,
.editor-modal__save {
  padding: 10px 22px;
  border: none;
  border-radius: 100px;
  font-family: inherit;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s, opacity 0.2s;
}
.editor-modal__cancel {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--text-main);
}
.editor-modal__cancel:hover { background: rgba(168, 137, 96, 0.08); }
.editor-modal__save {
  background: var(--text-main);
  color: var(--bg-main);
}
.editor-modal__save:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(43, 38, 32, 0.18);
}

/* ============================================================
   Phase 3.2: cookie-banner над sticky-CTA (П5)
   На странице товара sticky-CTA (Заказать/TG/WA) фиксирован снизу.
   Cookie-banner должен быть НАД ним, а не перекрывать кнопки.
   ============================================================ */
@media (max-width: 768px) {
  /* Если на странице есть sticky-cta — поднимаем баннер выше неё */
  body:has(.sticky-cta) .cookie-banner {
    bottom: 84px;  /* высота sticky-cta (~68px) + отступ */
  }
  /* sticky-cta всегда выше баннера по z-index, чтобы кнопки были кликабельны */
  .sticky-cta { z-index: 260; }
  .cookie-banner { z-index: 250; }
}

/* ============================================================
   Phase 3.2.1: about-page (страница «О мастерской»)
   ============================================================ */
.about-page {
  max-width: 1200px;
  margin: 0 auto;
  padding: 140px 24px 80px;
}
.about-page__hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 72px;
  align-items: start;
}
.about-page__photo {
  position: sticky;
  top: 24px;
  border-radius: 18px;
  box-shadow: var(--shadow-medium);
  border: 1px solid var(--line);
  overflow: hidden;
  aspect-ratio: 4 / 3;
  background-color: var(--bg-secondary);
  isolation: isolate;
  transform: translateZ(0);     /* свой слой → фон/фото поверх фоновых нитей */
}
.about-page__photo.is-portrait { aspect-ratio: 3 / 4; max-width: 440px; margin-right: auto; }
.about-page__photo.is-landscape { aspect-ratio: 4 / 3; }
.about-page__photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.about-page__photo-placeholder { width: 100%; height: 100%; }
.about-page__text { padding-top: 0; }
.about-page__title {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(32px, 4vw, 52px);
  font-weight: 300;
  line-height: 1.1;
  margin: 12px 0 28px;
}
.about-page__title em { font-style: italic; }
.about-page__body {
  font-size: 16px;
  line-height: 1.8;
  color: var(--text-main);
}
.about-page__body p { margin-bottom: 18px; }
.about-gallery {
  margin-top: 80px;
}
.about-gallery__title {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(28px, 3vw, 42px);
  font-weight: 300;
  text-align: center;
  margin-bottom: 36px;
}
.about-gallery__placeholder {
  padding: 60px 24px;
  text-align: center;
  color: var(--text-muted);
  border: 1px dashed var(--line);
  border-radius: 16px;
}

/* ── Ф3.5: галерея (JS-masonry) ───────────────────────────────────────── */
.about-gallery__controls {
  display: none;            /* видно только в режиме редактирования */
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
}
body.edit-mode .about-gallery__controls { display: flex; }
.about-gallery__progress { font-size: 13px; color: var(--text-muted); }

.about-gallery__grid {
  display: flex;
  gap: 20px;                /* расстояние между колонками */
  align-items: flex-start;
}
.about-gallery__col {
  flex: 1 1 0;
  display: flex;
  flex-direction: column;
  gap: 20px;                /* расстояние между фото в колонке */
  min-width: 0;
}
.about-gallery__item {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  cursor: zoom-in;
  border: 1px solid var(--line);          /* тонкая рамка */
  box-shadow: 0 2px 10px rgba(43, 38, 32, 0.06);
}
.about-gallery__item img {
  display: block;
  width: 100%;
  height: auto;
  transition: transform 0.45s ease;
}
.about-gallery__item:hover img { transform: scale(1.05); }
.about-gallery__item.is-video video {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}
.about-gallery__play {
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 56px; height: 56px; border-radius: 50%;
  background: rgba(43, 38, 32, 0.55); color: #fff;
  display: flex; align-items: center; justify-content: center;
  padding-left: 3px; pointer-events: none;
  transition: background 0.25s var(--ease);
}
.about-gallery__item.is-video:hover .about-gallery__play { background: var(--accent-dark); }

.about-gallery__del {
  display: none;            /* видно только в режиме редактирования */
  position: absolute;
  top: 8px;
  right: 8px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: none;
  background: rgba(43, 38, 32, 0.6);
  color: #fff;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  transition: background 0.2s;
}
body.edit-mode .about-gallery__item .about-gallery__del { display: block; }
.about-gallery__del:hover { background: #b04040; }

.about-gallery__add {
  border: 1px dashed var(--accent);
  background: var(--bg-secondary);
  border-radius: var(--radius-md);
  padding: 18px 28px;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  color: var(--accent-dark);
  transition: background 0.2s, border-color 0.2s;
}
.about-gallery__add:hover { background: #e8ddc8; border-color: var(--accent-dark); }
.about-gallery__add:disabled { opacity: 0.6; cursor: default; }
.about-gallery__add-plus { font-size: 32px; line-height: 1; font-weight: 200; }
.about-gallery__add-label { font-size: 13px; letter-spacing: 0.04em; }

/* ── Lightbox ── */
.ag-lightbox {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(28, 24, 20, 0.92);
  backdrop-filter: blur(4px);
  align-items: center;
  justify-content: center;
  display: flex;
  opacity: 0; visibility: hidden;
  transition: opacity 0.32s ease, visibility 0.32s ease;
}
.ag-lightbox.is-open { opacity: 1; visibility: visible; }
/* видео-режим: не засвечиваем всё, только лёгкое затемнение — окно выделено тенью */
.ag-lightbox.ag-lightbox--video {
  background: rgba(28, 24, 20, 0.45);
  backdrop-filter: blur(2px);
}
.ag-lightbox--video .ag-lightbox__nav { display: none; }
.ag-lightbox__img {
  max-width: 90vw;
  max-height: 88vh;
  object-fit: contain;
  border-radius: var(--radius-lg);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.6);
}
/* видео в лайтбоксе about — компактное окно (увеличенная миниатюра, не на весь экран) */
.ag-lightbox__video {
  max-width: 46vw;
  max-height: 60vh;
  width: auto;
  border-radius: var(--radius-lg);
  background: #000;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.7);
}
@media (max-width: 768px) {
  .ag-lightbox__video { max-width: 82vw; max-height: 58vh; }
}
.ag-lightbox__close {
  position: absolute;
  top: 22px;
  right: 26px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
}
.ag-lightbox__close:hover { background: rgba(255, 255, 255, 0.25); }
.ag-lightbox__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 54px;
  height: 54px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 36px;
  line-height: 1;
  cursor: pointer;
}
.ag-lightbox__nav:hover { background: rgba(255, 255, 255, 0.25); }
.ag-lightbox__nav--prev { left: 24px; }
.ag-lightbox__nav--next { right: 24px; }

@media (max-width: 700px) {
  .ag-lightbox__nav { width: 44px; height: 44px; font-size: 28px; }
  .ag-lightbox__nav--prev { left: 10px; }
  .ag-lightbox__nav--next { right: 10px; }
}
.about-page__back {
  margin-top: 56px;
  text-align: center;
}
@media (max-width: 768px) {
  .about-page { padding: 100px 18px 60px; }
  .about-page__hero { grid-template-columns: 1fr; gap: 28px; }
  .about-page__photo { position: relative; top: 0; }
  .about-page__photo.is-portrait { max-width: 100%; }
}

/* about-text превью на главной — обрезаем визуально */
.about-text--preview {
  display: -webkit-box;
  -webkit-line-clamp: 5;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ============================================================
   Phase 3.3a: catalog editor + archive
   ============================================================ */

/* Кнопка Архив в admin-bar */
.admin-bar__archive-link {
  color: var(--bg-main);
  background: transparent;
  border: 1px solid rgba(247, 242, 234, 0.25);
  border-radius: 100px;
  padding: 6px 14px;
  font-family: inherit;
  font-size: 11px;
  letter-spacing: 0.12em;
  line-height: 1.4;
  text-decoration: none;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  transition: background 0.2s, border-color 0.2s;
}
.admin-bar__archive-link:hover {
  background: rgba(247, 242, 234, 0.12);
  border-color: rgba(247, 242, 234, 0.5);
}

/* Карточка «+ Добавить товар» */
.add-product-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  aspect-ratio: 4/5;
  align-self: start;
  width: 100%;
  border: 2px dashed var(--accent);
  border-radius: 14px;
  background: rgba(168, 137, 96, 0.04);
  color: var(--accent-dark);
  font-family: inherit;
  font-size: 14px;
  letter-spacing: 0.08em;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, transform 0.2s;
}
.add-product-card:hover {
  background: rgba(168, 137, 96, 0.1);
  transform: translateY(-2px);
}
.add-product-card__plus {
  font-size: 42px;
  line-height: 1;
  font-weight: 200;
}

/* Крестик архивации на карточке */
.product-card { position: relative; }
.product-archive-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: none;
  background: rgba(43, 38, 32, 0.7);
  color: #fff;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, transform 0.2s;
}
.product-archive-btn:hover {
  background: #b04040;
  transform: scale(1.1);
}

/* Inline-поля карточки в режиме редактирования */
body.edit-mode [data-product-field] {
  outline: 1px dashed rgba(168, 137, 96, 0.45);
  outline-offset: 2px;
  border-radius: 3px;
  cursor: text;
}
body.edit-mode [data-product-field]:hover {
  outline-color: var(--accent);
  background: rgba(168, 137, 96, 0.05);
}
body.edit-mode .product-card[data-product-id] {
  cursor: default;
}
/* В каталоге в режиме редактирования разводим поля, чтобы пунктирные рамки
   не наезжали друг на друга, и фиксируем размер поля цены. */
body.edit-mode .product-card .product-name[data-product-field] {
  display: block;
  margin-bottom: 12px;
}
body.edit-mode .product-card .product-price[data-product-field] {
  display: inline-block;
  min-width: 110px;
  min-height: 1.4em;
  margin-top: 4px;
}
body.edit-mode .product-card .product-meta {
  margin-bottom: 8px;
}

/* Форма создания товара в модалке */
.product-form {
  padding: 20px 22px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  overflow-y: auto;
}
.product-form__field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.product-form__field span {
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.product-form__field input,
.product-form__field select {
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  font-family: inherit;
  font-size: 15px;
  color: var(--text-main);
  background: var(--bg-main);
}
.product-form__field input:focus,
.product-form__field select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(168, 137, 96, 0.15);
}
.product-form__hint {
  font-size: 12px;
  color: var(--text-muted);
}

/* ── Архив ─────────────────────────────────────────────────────────── */
.archive-page {
  max-width: 1400px;
  margin: 0 auto;
  padding: 168px 24px 80px;
}
.archive-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  background: rgba(168, 137, 96, 0.12);
  border: 1px solid var(--accent);
  border-radius: 14px;
  padding: 18px 24px;
  margin-bottom: 36px;
}
.archive-banner__text { display: flex; flex-direction: column; gap: 4px; }
.archive-banner__text strong { font-size: 16px; letter-spacing: 0.04em; }
.archive-banner__text span { font-size: 13px; color: var(--text-muted); }
.archive-banner__back {
  flex-shrink: 0;
  padding: 10px 20px;
  border: 1px solid var(--text-main);
  border-radius: 100px;
  font-size: 12px;
  letter-spacing: 0.1em;
  text-decoration: none;
  color: var(--text-main);
  transition: background 0.2s, color 0.2s;
}
.archive-banner__back:hover { background: var(--text-main); color: var(--bg-main); }

/* Архивные карточки — приглушённые */
.archive-card .product-img-wrap { filter: grayscale(0.4) opacity(0.7); }
.archive-grid {
  grid-template-columns: repeat(5, 1fr);
  gap: 24px;
}
.archive-card { align-self: start; }
@media (max-width: 1200px) {
  .archive-grid { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 1024px) {
  .archive-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 768px) {
  .archive-grid { grid-template-columns: repeat(2, 1fr); gap: 16px; }
}
.archive-card { opacity: 0.92; }
.archive-card__actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}
.archive-restore-btn,
.archive-delete-btn {
  flex: 1;
  padding: 9px 12px;
  border-radius: 100px;
  font-family: inherit;
  font-size: 11px;
  letter-spacing: 0.08em;
  cursor: pointer;
  border: 1px solid var(--line);
  transition: all 0.2s;
}
.archive-restore-btn {
  background: var(--text-main);
  color: var(--bg-main);
  border-color: var(--text-main);
}
.archive-restore-btn:hover { transform: translateY(-1px); }
.archive-delete-btn {
  background: transparent;
  color: #b04040;
  border-color: rgba(176, 64, 64, 0.4);
}
.archive-delete-btn:hover { background: rgba(176, 64, 64, 0.08); border-color: #b04040; }
.archive-empty {
  padding: 80px 24px;
  text-align: center;
  color: var(--text-muted);
  border: 1px dashed var(--line);
  border-radius: 16px;
}

/* ============================================================
   Phase 3.3b: photo manager, hero photo, archive filters
   ============================================================ */

/* Редактируемая лента миниатюр (v32): крестик, бейдж «главное», плитка «+».
   Контролы видны только в режиме редактирования. */
.thumb__placeholder { display: none; }
.photo-item__del {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: none;
  background: rgba(43, 38, 32, 0.75);
  color: #fff;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  display: none;
  z-index: 3;
}
.photo-item__del:hover { background: #b04040; }
.photo-item__main-badge {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  background: rgba(168, 137, 96, 0.9);
  color: #fff;
  font-size: 9px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-align: center;
  padding: 2px 0;
  display: none;
}
/* В edit-режиме миниатюры «оживают» */
body.edit-mode .thumbs--editable .thumb { cursor: grab; }
body.edit-mode .thumbs--editable .thumb.is-dragging { opacity: 0.4; }
body.edit-mode .thumbs--editable .photo-item__del { display: flex; align-items: center; justify-content: center; }
body.edit-mode .thumbs--editable .thumb:first-child .photo-item__main-badge { display: block; }
.thumbs.is-dragover { outline: 2px dashed var(--accent); outline-offset: 3px; border-radius: var(--radius-md); }

/* Плитка «+» (добавить фото) — только в режиме редактирования */
.thumb--add { display: none; }
body.edit-mode .thumb--add {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  border: 2px dashed var(--line);
  background: rgba(168, 137, 96, 0.05);
  cursor: pointer;
  transition: border-color 0.2s var(--ease), background 0.2s var(--ease);
}
.thumb--add:hover { border-color: var(--accent); background: rgba(168, 137, 96, 0.1); }
.thumb--add__plus { font-size: 28px; color: var(--accent-dark); line-height: 1; }
.thumb--add__tip {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  white-space: nowrap;
  background: var(--text-main);
  color: #fff;
  font-size: 11px;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s var(--ease), transform 0.2s var(--ease);
  z-index: 60;
  box-shadow: var(--shadow-soft);
}
.thumb--add:hover .thumb--add__tip { opacity: 1; transform: translateX(-50%) translateY(0); }

/* Кнопки перемещения ↑/↓ на миниатюре (v37) — видны только в edit-режиме */
.photo-item__move { display: none; }
body.edit-mode .thumbs--editable .thumb:not(.thumb--add) .photo-item__move {
  display: flex;
  flex-direction: column;
  position: absolute;
  left: 3px; top: 50%;
  transform: translateY(-50%);
  gap: 3px;
  z-index: 4;
}
.photo-item__move-btn {
  width: 22px; height: 22px;
  border: none;
  border-radius: 50%;
  background: rgba(43, 38, 32, 0.72);
  color: #fff;
  font-size: 12px; line-height: 1;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.15s var(--ease);
}
.photo-item__move-btn:hover { background: var(--accent-dark); }
/* В режиме редактирования сдвигаем ленту чуть левее, чтобы кнопки вписались */
body.edit-mode .gallery--admin { grid-template-columns: 104px 1fr; }
body.edit-mode .thumbs--editable .thumb { margin-left: 0; }


/* Hero-фото управление (П7) */
.hero-photo-controls {
  position: absolute;
  top: 132px;
  right: 24px;
  z-index: 20;
  display: none;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
  max-width: 300px;
}
body.edit-mode .hero-photo-controls { display: flex; }
.hero-photo-btn {
  padding: 8px 14px;
  border-radius: 100px;
  border: 1px solid rgba(247, 242, 234, 0.6);
  background: rgba(43, 38, 32, 0.55);
  backdrop-filter: blur(6px);
  color: #fff;
  font-family: inherit;
  font-size: 12px;
  letter-spacing: 0.06em;
  cursor: pointer;
  transition: background 0.2s, transform 0.2s;
}
.hero-photo-btn:hover { background: rgba(43, 38, 32, 0.8); transform: translateY(-1px); }
.hero-photo-btn--del:hover { background: #b04040; }

/* v40: панель превью мобильного hero (видна в режиме редактирования) */
.hero-mobile-panel {
  position: absolute;
  top: 188px;
  right: 24px;
  z-index: 20;
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 14px;
  border-radius: 16px;
  background: rgba(43, 38, 32, 0.62);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(247, 242, 234, 0.35);
  width: 150px;
}
body.edit-mode .hero-mobile-panel { display: flex; }
.hero-mobile-panel__label {
  color: #fff;
  font-size: 12px;
  letter-spacing: 0.06em;
  text-align: center;
}
.hero-mobile-panel__preview {
  position: relative;
  width: 92px;
  height: 164px;            /* ~9:16 портретное превью телефона */
  border-radius: 12px;
  background-size: cover;
  background-position: center;
  border: 2px solid rgba(247, 242, 234, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.hero-mobile-panel__preview.is-empty {
  background: linear-gradient(135deg, #B89968 0%, #5A4A38 100%);
}
.hero-mobile-panel__placeholder {
  display: none;
  color: #fff;
  font-size: 11px;
  letter-spacing: 0.05em;
  text-align: center;
  padding: 0 6px;
  line-height: 1.3;
}
.hero-mobile-panel__preview.is-empty .hero-mobile-panel__placeholder { display: block; }
.hero-mobile-panel__badge {
  display: none;
  position: absolute;
  bottom: 6px; left: 6px; right: 6px;
  background: rgba(43, 38, 32, 0.78);
  color: #fff;
  font-size: 9px;
  letter-spacing: 0.04em;
  text-align: center;
  padding: 3px 4px;
  border-radius: 6px;
  line-height: 1.2;
}
.hero-mobile-panel__preview.is-desktop { position: relative; }
.hero-mobile-panel__preview.is-desktop .hero-mobile-panel__badge { display: block; }
.hero-mobile-panel__actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: center;
}
.hero-mobile-panel__actions .hero-photo-btn { padding: 7px 11px; font-size: 11px; }

/* Фильтры архива */
.archive-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 32px;
}
.archive-filter {
  padding: 8px 18px;
  border-radius: 100px;
  border: 1px solid var(--line);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-decoration: none;
  color: var(--text-main);
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}
.archive-filter:hover { border-color: var(--accent); }
.archive-filter.is-active {
  background: var(--text-main);
  color: var(--bg-main);
  border-color: var(--text-main);
}

/* ─── Фирменная модалка подтверждения (v30) ─────────────────────────── */
.confirm-modal__overlay {
  position: fixed; inset: 0; z-index: 9000;
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
  background: rgba(43, 38, 32, 0);
  opacity: 0; visibility: hidden;
  transition: opacity 0.2s var(--ease), visibility 0.2s var(--ease), background 0.2s var(--ease);
}
.confirm-modal__overlay.is-open {
  opacity: 1; visibility: visible;
  background: rgba(43, 38, 32, 0.45);
  backdrop-filter: blur(3px);
}
.confirm-modal__dialog {
  width: 100%; max-width: 420px;
  background: var(--bg-main);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-strong);
  padding: 28px 28px 22px;
  transform: translateY(12px) scale(0.97);
  opacity: 0;
  transition: transform 0.24s var(--ease), opacity 0.24s var(--ease);
}
.confirm-modal__overlay.is-open .confirm-modal__dialog {
  transform: translateY(0) scale(1);
  opacity: 1;
}
.confirm-modal__title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 26px; font-weight: 600;
  color: var(--text-main);
  margin-bottom: 10px;
}
.confirm-modal__message {
  font-size: 15px; line-height: 1.5;
  color: var(--text-muted);
  margin-bottom: 24px;
  white-space: pre-line;
}
.confirm-modal__actions {
  display: flex; gap: 12px; justify-content: flex-end;
}
.confirm-modal__btn {
  padding: 11px 22px;
  border-radius: 100px;
  font-family: inherit; font-size: 13px;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: background 0.2s var(--ease), transform 0.2s var(--ease), border-color 0.2s var(--ease);
}
.confirm-modal__btn--cancel {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--text-main);
}
.confirm-modal__btn--cancel:hover { border-color: var(--accent); transform: translateY(-1px); }
.confirm-modal__btn--ok {
  background: var(--text-main);
  border: 1px solid var(--text-main);
  color: var(--white);
}
.confirm-modal__btn--ok:hover { background: #1f1b16; transform: translateY(-1px); }
.confirm-modal__btn--danger {
  background: #b04040; border-color: #b04040;
}
.confirm-modal__btn--danger:hover { background: #983636; }

/* ─── Стрелки навигации по фото в карточке (v31) ────────────────────── */
.gallery-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 5;
  width: 44px; height: 44px;
  display: flex; align-items: center; justify-content: center;
  border: none;
  border-radius: 50%;
  background: rgba(43, 38, 32, 0.18);
  color: rgba(255, 255, 255, 0.85);
  font-size: 26px; line-height: 1;
  cursor: pointer;
  opacity: 0.45;
  transition: opacity 0.25s var(--ease), background 0.25s var(--ease);
  -webkit-tap-highlight-color: transparent;
}
.gallery-nav:hover { opacity: 0.95; background: rgba(43, 38, 32, 0.4); }
.gallery-nav--prev { left: 10px; }
.gallery-nav--next { right: 10px; }
.main-image:hover .gallery-nav { opacity: 0.75; }
@media (max-width: 768px) {
  /* На тач-устройствах стрелки — лишь едва заметный намёк (свайп — основной жест) */
  .gallery-nav { opacity: 0.32; width: 40px; height: 40px; font-size: 23px; background: transparent; color: rgba(255,255,255,0.9); text-shadow: 0 1px 4px rgba(0,0,0,0.4); }
  .gallery-nav:hover { background: transparent; opacity: 0.5; }
}

/* ─── Подменю смены статуса в каталоге (v32) ────────────────────────── */
.product-badge--editable { cursor: pointer; }
.product-badge--editable:hover { box-shadow: 0 0 0 2px var(--accent); }
.status-menu {
  position: absolute;
  z-index: 30;
  min-width: 150px;
  background: var(--bg-main);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-medium);
  padding: 6px;
  display: flex; flex-direction: column; gap: 2px;
  animation: status-menu-in 0.16s var(--ease);
}
@keyframes status-menu-in {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}
.status-menu__item {
  text-align: left;
  padding: 9px 12px;
  border: none; background: transparent;
  border-radius: var(--radius-sm);
  font-family: inherit; font-size: 13px;
  color: var(--text-main);
  cursor: pointer;
  transition: background 0.15s var(--ease);
}
.status-menu__item:hover { background: var(--bg-secondary); }
.status-menu__item.is-current { color: var(--accent-dark); font-weight: 600; }

/* ─── Ф3.3c: редактирование полей на странице товара ──────────────────── */
.spec-placeholder { color: var(--text-muted); font-style: italic; opacity: 0.8; }

/* Подсветка редактируемых полей в режиме редактирования */
body.edit-mode .product-title[data-product-field],
body.edit-mode .product-price[data-product-field],
body.edit-mode .spec-value[data-product-field],
body.edit-mode .product-description-inner[data-product-field] {
  outline: 1px dashed var(--line);
  outline-offset: 4px;
  border-radius: var(--radius-sm);
  transition: outline-color 0.15s var(--ease), background 0.15s var(--ease);
  cursor: text;
}
/* Цена в режиме редактирования — поле фиксированного размера на своём месте,
   обведённое пунктиром как остальные поля. Whitespace в разметке убран, поэтому
   inline-block больше не «раздувает» поле. */
body.edit-mode .product-price[data-product-field] {
  display: inline-block;
  box-sizing: border-box;
  min-width: 180px;
  margin-bottom: 28px;
  vertical-align: top;
}
body.edit-mode .product-title[data-product-field] {
  display: inline-block;
  width: fit-content;
  max-width: 100%;
}
body.edit-mode .spec-value[data-product-field] {
  display: inline-block;
}
body.edit-mode .product-title[data-product-field]:hover,
body.edit-mode .product-price[data-product-field]:hover,
body.edit-mode .spec-value[data-product-field]:hover,
body.edit-mode .product-description-inner[data-product-field]:hover {
  outline-color: var(--accent);
  background: rgba(184, 153, 104, 0.06);
}
body.edit-mode [data-product-field]:focus {
  outline: 2px solid var(--accent);
  background: rgba(184, 153, 104, 0.08);
}

/* Материал и статус — кликабельны (меню), курсор-указатель */
body.edit-mode .spec-value--editable,
body.edit-mode .product-status--editable {
  cursor: pointer;
  outline: 1px dashed var(--line);
  outline-offset: 4px;
  border-radius: var(--radius-sm);
}
body.edit-mode .spec-value--editable:hover,
body.edit-mode .product-status--editable:hover {
  outline-color: var(--accent);
}
body.edit-mode .product-status--editable::after {
  content: ' ▾';
  opacity: 0.6;
  font-size: 0.85em;
}

/* Текстовое поле редактирования описания */
.product-desc-edit {
  width: 100%;
  font-family: inherit;
  font-size: 15px;
  line-height: 1.7;
  color: var(--text-main);
  background: var(--bg-main);
  border: 1px solid var(--accent);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  resize: vertical;
  box-sizing: border-box;
}
.product-description-inner--empty .spec-placeholder { font-size: 15px; }

/* Ф3.3c: «предпросмотр» — пустые поля с заглушками (—добавить—, Добавить
   описание…) видны только в режиме редактирования. При «Готово» они скрыты,
   и карточка выглядит как для покупателя. */
body:not(.edit-mode) [data-empty-admin] { display: none !important; }

/* Ф3.3c: статус — ряд из 3 кнопок в режиме редактирования */
.status-hidden-in-edit { display: none !important; }
.status-edit-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 22px;
}
.status-edit-btn {
  font-family: inherit;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 500;
  padding: 8px 16px;
  border-radius: 100px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s var(--ease);
}
.status-edit-btn:hover { border-color: var(--accent); color: var(--text-main); }
.status-edit-btn.is-current {
  border-color: transparent;
  font-weight: 600;
}
.status-edit-btn.is-current.status-in_stock { background: #E3EAD9; color: #5C6E47; }
.status-edit-btn.is-current.status-on_order { background: #EDE0CE; color: #8A6D3B; }
.status-edit-btn.is-current.status-sale { background: #F0DAD3; color: #A65A47; }

/* ─── Ф3.3c Шаг 2: редактор материалов в фильтре каталога ─────────────── */
.material-editor-section { display: none; }
body.edit-mode .material-editor-section { display: block; }
.material-editor { display: block; }
.material-editor__title {
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 10px;
}
.material-editor__list { display: flex; flex-direction: column; gap: 4px; }
.material-row {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 8px;
  border-radius: var(--radius-sm);
  transition: background 0.15s var(--ease);
}
.material-row:hover { background: rgba(184, 153, 104, 0.08); }
.material-row__name {
  flex: 1;
  font-size: 14px;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 6px;
}
.material-row__count {
  font-size: 10px;
  background: var(--accent);
  color: #fff;
  border-radius: 100px;
  padding: 1px 7px;
  line-height: 1.4;
}
.material-row__btn {
  border: none;
  background: transparent;
  cursor: pointer;
  font-size: 13px;
  padding: 3px 5px;
  border-radius: 6px;
  opacity: 0.7;
  transition: all 0.15s var(--ease);
}
.material-row__btn:hover { opacity: 1; background: rgba(184, 153, 104, 0.15); }
.material-row__btn--del:hover { background: rgba(176, 64, 64, 0.15); }
.material-row__input {
  flex: 1;
  font-family: inherit;
  font-size: 14px;
  padding: 4px 8px;
  border: 1px solid var(--accent);
  border-radius: var(--radius-sm);
  background: var(--bg-main);
  color: var(--text-main);
}
.material-editor__add {
  display: flex;
  gap: 6px;
  margin-top: 10px;
}
.material-editor__add input {
  flex: 1;
  font-family: inherit;
  font-size: 14px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--bg-main);
  color: var(--text-main);
}
.material-editor__add input:focus { outline: none; border-color: var(--accent); }
.material-editor__add-btn {
  border: none;
  background: var(--accent);
  color: #fff;
  font-size: 18px;
  width: 38px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background 0.15s var(--ease);
}
.material-editor__add-btn:hover { background: var(--accent-dark); }

/* ─── Ф3.4: плавающая панель rich-text (жирный/курсив) ───────────────── */
.rt-toolbar {
  position: absolute;
  z-index: 500;
  display: none;
  gap: 2px;
  background: var(--text-main);
  border-radius: 8px;
  padding: 4px;
  box-shadow: 0 4px 16px rgba(43, 38, 32, 0.25);
}
/* Ф3.4 (B): панель Ж/К крепится над активным полем */
.rt-toolbar--anchored {
  position: absolute;
  z-index: 1100;
  padding: 6px;
  gap: 4px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s var(--ease);
}
.rt-toolbar--anchored.is-visible {
  opacity: 1;
  pointer-events: auto;
}
.rt-toolbar.is-visible { display: flex; }
.rt-toolbar button {
  border: none;
  background: transparent;
  color: #fff;
  width: 36px; height: 36px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 16px;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.15s var(--ease);
}
.rt-toolbar button:hover { background: rgba(255, 255, 255, 0.18); }
.rt-toolbar button.is-active {
  background: var(--accent);
  color: #fff;
}
.rt-toolbar button b { font-weight: 700; }
.rt-toolbar button i { font-style: italic; font-family: 'Cormorant Garamond', serif; font-size: 18px; }

/* Ф3.4: миниатюра мобильного hero — видео внутри превью */
.hero-mobile-panel__preview.is-video { background: #000; }
.hero-mobile-panel__video {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  border-radius: inherit;
}
.hero-mobile-panel__badge--video {
  position: absolute;
  bottom: 8px; left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.7);
  color: #fff;
  padding: 4px 10px;
  border-radius: 100px;
  font-size: 11px;
  letter-spacing: 0.04em;
  z-index: 2;
}

/* ── Ф v68: загрузка .docx политики + предпросмотр ─────────────────────── */
.policy-docx {
  display: none;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin: 0 0 24px;
  padding: 14px 16px;
  background: var(--bg-secondary);
  border: 1px dashed var(--accent);
  border-radius: 14px;
}
body.edit-mode .policy-docx { display: flex; }
.policy-docx__btn {
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 9px 18px;
  font-size: 14px;
  cursor: pointer;
  transition: background 0.15s;
}
.policy-docx__btn:hover { background: var(--accent-dark); }
.policy-docx__btn:disabled { opacity: 0.6; cursor: default; }
.policy-docx__hint { font-size: 13px; color: var(--text-muted); }

.policy-preview-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(43, 38, 32, 0.45);
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.policy-preview-modal.is-open { display: flex; }
.policy-preview-modal__box {
  background: var(--bg-main);
  border-radius: 18px;
  max-width: 760px;
  width: 100%;
  max-height: 86vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.25);
}
.policy-preview-modal__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 22px;
  border-bottom: 1px solid var(--bg-secondary);
  font-size: 16px;
}
.policy-preview-modal__close {
  background: none;
  border: none;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  color: var(--text-muted);
}
.policy-preview-modal__body {
  padding: 22px;
  overflow-y: auto;
}
.policy-preview-modal__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  padding: 16px 22px;
  border-top: 1px solid var(--bg-secondary);
}
.policy-preview-modal__note { font-size: 13px; color: var(--text-muted); }
.policy-preview-modal__actions { display: flex; gap: 10px; }
.policy-preview-modal__cancel,
.policy-preview-modal__apply {
  border-radius: 10px;
  padding: 9px 20px;
  font-size: 14px;
  cursor: pointer;
  border: 1px solid var(--accent);
}
.policy-preview-modal__cancel { background: transparent; color: var(--accent-dark); }
.policy-preview-modal__apply { background: var(--accent); color: #fff; border-color: var(--accent); }
.policy-preview-modal__apply:hover { background: var(--accent-dark); }
.policy-preview-modal__apply:disabled { opacity: 0.6; cursor: default; }

/* ── Ф3.5: редактируемые фото about (главная + раздел) ────────────────── */
.about-editimg { position: relative; }
.about-img img,
.about-page__photo img {
  transition: transform 0.5s ease;
}
/* hover-zoom (обрезается рамкой → углы чистые, как в каталоге) */
.about-img:hover img,
.about-page__photo:hover img { transform: scale(1.05); }

.about-editimg__btn {
  display: none;            /* видно только в режиме редактирования */
  position: absolute;
  left: 50%;
  bottom: 16px;
  transform: translateX(-50%);
  z-index: 3;
  background: rgba(43, 38, 32, 0.78);
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 9px 18px;
  font-size: 13px;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: background 0.2s;
}
body.edit-mode .about-editimg__btn { display: inline-block; }
.about-editimg__btn:hover { background: var(--accent-dark); }
.about-editimg__btn:disabled { opacity: 0.7; cursor: default; }

/* Ф3.5 (v74): когда фото about не задано — компактная зона только для админа */
.about-editimg[data-has="0"] .about-page__photo-placeholder,
.about-editimg[data-has="0"] .about-img-placeholder {
  display: none;
}
body.edit-mode .about-editimg[data-has="0"] {
  min-height: 160px;
  border: 1px dashed var(--accent);
  border-radius: var(--radius-md);
  background: var(--bg-secondary);
}

/* Ф3.5 (v78): заголовок пустой галереи — только в режиме редактирования */
.about-gallery__title--empty { display: none; }
body.edit-mode .about-gallery__title--empty { display: block; }

/* ── Ф5: редактирование направлений (категорий) ───────────────────────── */
/* Фирменная заглушка (как у товаров) */
.cat-card-bg-placeholder {
  background: var(--bg-secondary);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.cat-card-placeholder__brand {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: 30px;
  color: var(--text-muted);
  opacity: 0.55;
}
.cat-card-placeholder__sub {
  font-family: 'Cormorant Garamond', serif;
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-muted);
  opacity: 0.6;
}

/* Кнопки редактирования фото — только в режиме редактирования */
.cat-card-edit {
  display: none;
  position: absolute;
  top: 14px; left: 14px;
  z-index: 4;
  gap: 8px;
}
body.edit-mode .cat-card-edit { display: flex; }
.cat-card-edit__btn {
  background: rgba(43, 38, 32, 0.78);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 6px 12px;
  font-size: 12px;
  letter-spacing: 0.03em;
  cursor: pointer;
  transition: background 0.2s;
}
.cat-card-edit__btn:hover { background: var(--accent-dark); }
.cat-card-edit__btn--del:hover { background: #b04040; }

/* Редактируемое название */
body.edit-mode .cat-card--editable .cat-card-title { cursor: text; }
.cat-card-title--editing {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
  background: rgba(43, 38, 32, 0.35);
}
/* В режиме редактирования курсор на карточке — обычный (не «ссылка») */
body.edit-mode .cat-card--editable { cursor: default; }

/* ── Ф5: сердечко «избранное» на карточке товара (только edit-mode) ────── */
.product-fav {
  display: none;
  position: absolute;
  top: 48px; right: 10px;          /* под крестиком архива (он top:10, 30px) */
  z-index: 6;
  width: 30px; height: 30px;
  border-radius: 50%;
  border: none;
  background: rgba(247, 242, 234, 0.92);
  color: #c9c2b6;
  font-size: 16px;
  line-height: 30px;
  text-align: center;
  cursor: pointer;
  backdrop-filter: blur(8px);
  transition: color 0.2s, background 0.2s, transform 0.15s;
}
body.edit-mode .product-fav { display: block; }
.product-fav:hover { transform: scale(1.1); }
.product-fav.is-active { color: #c0392b; background: rgba(247, 242, 234, 0.96); }
.product-fav:disabled { opacity: 0.6; cursor: default; }

/* ── Ф5: кнопка-переключатель «Избранное» в тулбаре каталога ──────────── */
.fav-filter-toggle {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 16px;
  border-radius: 100px;
  border: 1px solid var(--line);
  background: var(--bg-main);
  color: var(--text-main);
  font-size: 13px;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.fav-filter-toggle__heart { color: #c0392b; font-size: 15px; line-height: 1; }
.fav-filter-toggle:hover { border-color: var(--accent); }
.fav-filter-toggle.is-active {
  background: var(--accent-dark);
  color: var(--bg-main);
  border-color: var(--accent-dark);
}
.fav-filter-toggle.is-active .fav-filter-toggle__heart { color: #fff; }

/* ════════════════════════════════════════════════════════════════════════
   Ф5: блок «Нам доверяют» (заведения-партнёры) на главной
   ════════════════════════════════════════════════════════════════════════ */
.trust {
  position: relative;
  margin: 32px 12px 0;                /* как about-секция, не узкий */
  padding: 80px 60px 120px;
  overflow: hidden;
  border-radius: var(--radius-xl);
}
/* isolation добавляем только без фото (там был репэйнт-баг непрозрачных
   секций над fixed-canvas). С фото изоляция мешает нитям просвечивать снизу. */
.trust--no-bg { isolation: isolate; }
/* верхнее разделение — мягкая тень ТОЛЬКО сверху, к низу исчезает (без линии внизу) */
.trust::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 120px;
  z-index: 0;
  pointer-events: none;
  background: linear-gradient(to bottom, rgba(43, 38, 32, 0.10) 0%, rgba(43, 38, 32, 0) 100%);
}
/* Слой фона. position:fixed ставится через JS (parallax «фото стоит на месте»);
   по умолчанию (без JS / reduced-motion) — absolute, чтобы фон всё равно был. */
.trust-bg-layer {
  position: absolute;
  inset: 0;
  z-index: -2;
  overflow: hidden;
  border-radius: var(--radius-xl);
}
.trust-bg-layer.is-fixed .trust-bg {
  position: fixed;
  background-attachment: scroll;      /* fixed-позицию даёт JS через clip, не CSS */
}
.trust-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  filter: blur(8px);
  transform: scale(1.1);              /* скрыть края от blur */
}
/* Фото-фон еле виден и только в самом верху блока, дальше быстро уходит
   в чистый фон (проступают нити). Низкая базовая непрозрачность + маска,
   гаснущая уже к середине. */
.trust--has-bg .trust-bg--desktop,
.trust--has-bg .trust-bg--mobile {
  opacity: 0.5;
  -webkit-mask-image: linear-gradient(to bottom,
    #000 0%, rgba(0,0,0,0.85) 25%, rgba(0,0,0,0.5) 48%, rgba(0,0,0,0.18) 68%, rgba(0,0,0,0) 85%);
  mask-image: linear-gradient(to bottom,
    #000 0%, rgba(0,0,0,0.85) 25%, rgba(0,0,0,0.5) 48%, rgba(0,0,0,0.18) 68%, rgba(0,0,0,0) 85%);
}
/* desktop/mobile фоны блока */
.trust-bg--mobile { display: none; }
@media (max-width: 768px) {
  .trust-bg--desktop { display: none; }
  .trust-bg--mobile { display: block; }
}
.trust-bg--gradient {
  background-image: linear-gradient(135deg, var(--bg-secondary) 0%, var(--line) 55%, var(--accent) 135%);
  filter: blur(0);
  transform: none;
}
/* Когда нет фото (no-bg): вертикальный градиент — ВВЕРХУ плотный cream
   (нити скрыты), К НИЗУ прозрачный → плетение проступает и плавно
   переходит в фон страницы. (Смысл блока — просвет книзу.) */
.trust--no-bg .trust-bg--gradient {
  background-image:
    /* еле заметный белый блик сверху — ощущение чистого стекла */
    linear-gradient(to bottom, rgba(255,255,255,0.35) 0%, rgba(255,255,255,0.08) 12%, rgba(255,255,255,0) 26%),
    /* золотистый тёплый градиент, на пару % легче */
    linear-gradient(to bottom,
      rgba(201, 173, 122, 0.48) 0%,
      rgba(214, 192, 150, 0.36) 35%,
      rgba(230, 216, 190, 0.22) 70%,
      rgba(237, 228, 211, 0) 100%);
}
.trust-veil {
  position: absolute;
  inset: 0;
  /* вуаль плотнее вверху, прозрачная к низу — согласовано с просветом */
  background: linear-gradient(to bottom,
    rgba(247, 242, 234, 0.70) 0%,
    rgba(247, 242, 234, 0.45) 55%,
    rgba(247, 242, 234, 0) 100%);
  pointer-events: none;
}
/* над фото вуаль слабее — иначе фото совсем не видно */
.trust--has-bg .trust-veil {
  background: linear-gradient(to bottom,
    rgba(247, 242, 234, 0.30) 0%,
    rgba(247, 242, 234, 0.20) 55%,
    rgba(247, 242, 234, 0) 100%);
}
.trust--no-bg .trust-veil {
  background: linear-gradient(to bottom,
    rgba(247, 242, 234, 0.55) 0%,
    rgba(247, 242, 234, 0.28) 55%,
    rgba(247, 242, 234, 0) 100%);
}
/* нижний градиент — растворение с середины блока в основной фон (для фото) */
.trust-fade-bottom {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 55%;
  z-index: -1;
  background: linear-gradient(to bottom,
    rgba(247, 242, 234, 0) 0%,
    rgba(247, 242, 234, 0.6) 45%,
    var(--bg-main) 88%);
}
/* в no-bg низ блока оставляем прозрачным — плетение продолжается в фон
   (раньше непрозрачный bg-main внизу перекрывал нити). */
.trust--no-bg .trust-fade-bottom,
.trust--has-bg .trust-fade-bottom {
  background: linear-gradient(to bottom,
    rgba(247, 242, 234, 0) 0%,
    rgba(247, 242, 234, 0) 100%);
}
.trust-grid {
  position: relative;
  z-index: 1;
  max-width: 1180px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 72px;
  align-items: start;
}
.trust-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(32px, 4vw, 52px);
  font-weight: 300;
  line-height: 1.1;
  margin: 12px 0 24px;
}
.trust-title em { font-style: italic; }
.trust-text {
  color: var(--text-main);
  opacity: 0.78;
  font-size: 16px;
  line-height: 1.7;
  max-width: 460px;
  margin-bottom: 32px;
}
/* Чипы заведений */
.trust-chips { display: flex; flex-wrap: wrap; gap: 12px; }
.trust-chip {
  display: inline-flex;
  align-items: center;
  padding: 11px 22px;
  border-radius: 100px;
  border: 1px solid var(--line);
  background: var(--bg-main);
  color: var(--text-main);
  font-size: 14px;
  text-decoration: none;
  transition: border-color 0.25s, background 0.25s, transform 0.25s;
}
.trust-chip:hover {
  border-color: var(--accent);
  background: var(--bg-secondary);
  transform: translateY(-2px);
}
/* Фото справа (фикс. рамка 4:3, как about-горизонталь) */
.trust-img {
  position: relative;
  aspect-ratio: 4 / 3;
  border-radius: var(--radius-lg);
  box-shadow: 0 6px 20px rgba(156, 126, 80, 0.10);
  border: 1px solid var(--line);
  overflow: hidden;
  transition: box-shadow 0.4s var(--ease);
}
.trust-img:hover { box-shadow: var(--shadow-strong); }
.trust-img__photo {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.6s var(--ease), opacity 0.3s ease;
}
/* плавная смена фото: гаснет с лёгким зумом, проявляется обратно */
.trust-img.is-fading .trust-img__photo { opacity: 0; transform: scale(1.04); }
.trust-img.is-fading .trust-img-placeholder { opacity: 0; }
.trust-img-placeholder { transition: opacity 0.3s ease; }
/* зум при наведении на сам блок ИЛИ при подсветке от чипа */
.trust-img:hover .trust-img__photo,
.trust-img.is-hovering .trust-img__photo { transform: scale(1.05); }
.trust-img-placeholder {
  width: 100%; height: 100%;
  background: var(--bg-secondary);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 6px;
}
.trust-img-placeholder__brand {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic; font-size: 30px;
  color: var(--text-muted); opacity: 0.55;
}
.trust-img-placeholder__sub {
  font-family: 'Cormorant Garamond', serif;
  font-size: 12px; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--text-muted); opacity: 0.6;
}
@media (max-width: 768px) {
  .trust-grid { grid-template-columns: 1fr; gap: 32px; }
  .trust { padding: 56px 24px 80px; margin: 24px 8px 0; }
  .trust-bg { background-attachment: scroll; }
}

/* Кнопки загрузки фона блока — только в режиме редактирования */
.trust-bg-edit {
  display: none;
  position: absolute;
  top: 18px; right: 18px;
  z-index: 3;
  gap: 8px;
}
body.edit-mode .trust-bg-edit { display: flex; }
.trust-bg-edit__btn {
  background: rgba(43, 38, 32, 0.78);
  color: #fff;
  border: none;
  border-radius: 100px;
  padding: 9px 16px;
  font-size: 13px;
  cursor: pointer;
  backdrop-filter: blur(6px);
  transition: background 0.2s;
}
.trust-bg-edit__btn:hover { background: var(--accent-dark); }
.trust-bg-edit__btn--del:hover { background: #b04040; }


/* Ф5 (v90): превью мобильного фона блока «Нам доверяют» */
.trust-bg-edit { flex-wrap: wrap; max-width: 280px; align-items: center; }
.trust-bg-edit__mob-preview {
  width: 38px; height: 64px;
  border-radius: 8px;
  background-size: cover;
  background-position: center;
  border: 1px solid rgba(255,255,255,0.5);
  display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.trust-bg-edit__mob-preview.is-empty {
  background: linear-gradient(135deg, var(--bg-secondary), var(--accent));
}
.trust-bg-edit__mob-ph { font-size: 8px; color: #fff; text-align: center; line-height: 1.1; }

/* ── Ф5 (v92): редактирование блока «Нам доверяют» ──────────────────────── */
/* обёртка чипа (чип + крестик вне ссылки, как у направлений) */
.trust-chip-wrap { position: relative; display: inline-flex; }
.trust-chip__name[data-venue-name-edit] { outline: none; }
body.edit-mode .trust-chip__name[data-venue-name-edit] {
  border-bottom: 1px dashed transparent; cursor: text;
}
body.edit-mode .trust-chip__name[data-venue-name-edit]:hover,
body.edit-mode .trust-chip__name[data-venue-name-edit]:focus {
  border-bottom-color: var(--accent);
}
body.edit-mode .trust-more__item-name[data-venue-name-edit] {
  border-bottom: 1px dashed transparent; cursor: text; outline: none;
}
body.edit-mode .trust-more__item-name[data-venue-name-edit]:hover,
body.edit-mode .trust-more__item-name[data-venue-name-edit]:focus {
  border-bottom-color: var(--accent);
}
/* крестик удаления чипа */
.trust-chip__del {
  display: none;
  position: absolute; top: -7px; right: -7px;
  width: 22px; height: 22px;
  border-radius: 50%;
  border: none;
  background: #b04040; color: #fff;
  font-size: 15px; line-height: 1;
  cursor: pointer; z-index: 3;
  box-shadow: var(--shadow-soft);
}
body.edit-mode .trust-chip__del { display: inline-flex; align-items: center; justify-content: center; }
/* кнопка добавления заведения */
.trust-chip-add {
  display: none;
  align-items: center;
  padding: 11px 20px;
  border-radius: 100px;
  border: 1px dashed var(--accent);
  background: transparent;
  color: var(--accent-dark);
  font-size: 14px; cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}
body.edit-mode .trust-chip-add { display: inline-flex; }
.trust-chip-add:hover { background: var(--bg-secondary); border-color: var(--accent-dark); }
/* выпадающее подменю «+N» — стиль отличный от чипов (без рамки, тёмная пилюля) */
.trust-more { position: relative; display: inline-flex; }
.trust-more__btn {
  display: inline-flex; align-items: center;
  padding: 11px 20px;
  border-radius: 100px;
  border: none;
  background: var(--accent-dark);
  color: var(--bg-main);
  font-size: 14px; cursor: pointer;
  touch-action: manipulation;
  transition: background 0.2s;
}
.trust-more__btn:hover { background: var(--text-main); }
.trust-more__btn.is-active { background: var(--text-main); }
.trust-more__btn:focus { outline: none; }
/* на тач-устройствах не «залипает» тёмный hover/active, но открытое меню — держит */
@media (hover: none) {
  .trust-more__btn:hover { background: var(--accent-dark); }
  .trust-more__btn.is-active { background: var(--text-main); }
}
.trust-more__list {
  position: fixed;
  top: 0; left: 0;
  min-width: 230px; max-width: 300px;   /* не растягивается на длинных названиях */
  max-height: 320px; overflow-y: auto;
  background: var(--bg-main);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-strong);
  padding: 8px;
  z-index: 1200;
  display: none;
  flex-direction: column; gap: 2px;
}
.trust-more__list.is-open { display: flex; }
/* замер размеров перед позиционированием — в потоке, но невидим (нет мелькания) */
.trust-more__list.is-measuring { visibility: hidden; }
/* мобильное подменю — не уходит за край экрана */
@media (max-width: 768px) {
  .trust-more { position: static; }
  .trust-more__list {
    max-width: 80vw;
  }
  .trust-more__item { white-space: normal; word-break: break-word; }
}
.trust-more__item-wrap { position: relative; display: flex; }
.trust-more__item {
  flex: 1;
  display: block;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  color: var(--text-main);
  text-decoration: none;
  font-size: 14px;
  white-space: normal; word-break: break-word;
  transition: background 0.15s;
}
.trust-more__item:hover { background: var(--bg-secondary); }
.trust-more__del { top: 50%; right: 8px; transform: translateY(-50%); }
body.edit-mode .trust-more__del { transform: translateY(-50%); }
/* в режиме редактирования освобождаем место справа под крестик */
body.edit-mode .trust-more__item { padding-right: 40px; }
/* кнопки фото справа */
.trust-img-edit {
  display: none;
  position: absolute; bottom: 14px; right: 14px;
  gap: 8px; z-index: 3;
}
body.edit-mode .trust-img-edit { display: flex; }
.trust-img-edit__btn {
  background: rgba(43, 38, 32, 0.78); color: #fff;
  border: none; border-radius: 100px;
  padding: 9px 16px; font-size: 13px; cursor: pointer;
  backdrop-filter: blur(6px); transition: background 0.2s;
}
.trust-img-edit__btn:hover { background: var(--accent-dark); }
.trust-img-edit__btn--del:hover { background: #b04040; }

/* ── Ф5 (v105): страница заведения /venue/{slug} ────────────────────────── */
.venue-page {
  max-width: 1180px;
  margin: 0 auto;
  padding: 140px 32px 96px;
}
.venue-back {
  display: inline-block;
  margin-bottom: 32px;
  color: var(--accent-dark);
  text-decoration: none;
  font-size: 15px;
  transition: color 0.2s;
}
.venue-back:hover { color: var(--accent-dark); text-shadow: 0 2px 6px rgba(156,126,80,0.25); }
.venue-hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: start;
}
.venue-hero__photo {
  position: relative;
  aspect-ratio: 4 / 3;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-medium);
  border: 1px solid var(--line);
  background: var(--bg-secondary);
}
.venue-hero__img {
  width: 100%; height: 100%;
  object-fit: cover; display: block;
  cursor: zoom-in;
  transition: transform 0.6s var(--ease);
}
.venue-hero__img:hover { transform: scale(1.03); }
.venue-hero__placeholder {
  width: 100%; height: 100%;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 8px;
  background: linear-gradient(135deg, var(--bg-secondary), var(--bg-main));
}
.venue-hero__brand {
  font-family: var(--font-display, serif);
  font-style: italic; font-size: 28px;
  color: var(--accent);
  opacity: 0.7;
}
.venue-hero__sub {
  font-size: 12px; letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.venue-hero__edit {
  position: absolute; bottom: 14px; right: 14px;
  display: none; gap: 8px; z-index: 3;
}
body.edit-mode .venue-hero__edit { display: flex; }
.venue-hero__btn {
  background: rgba(43, 38, 32, 0.78); color: #fff;
  border: none; border-radius: 100px;
  padding: 9px 16px; font-size: 13px; cursor: pointer;
  backdrop-filter: blur(6px); transition: background 0.2s;
}
.venue-hero__btn:hover { background: var(--accent-dark); }
.venue-hero__btn--del:hover { background: #b04040; }
.venue-hero__text { padding-top: 8px; }
.venue-title {
  font-family: var(--font-display, serif);
  font-size: clamp(34px, 4vw, 52px);
  line-height: 1.1;
  margin: 14px 0 24px;
  color: var(--text-main);
}
body.edit-mode .venue-title[data-venue-field] {
  outline: 1px dashed transparent; cursor: text; border-radius: 6px;
}
body.edit-mode .venue-title[data-venue-field]:hover { outline-color: var(--accent); }
.venue-desc {
  font-size: 17px; line-height: 1.7;
  color: var(--text-main);
}
.venue-desc p { margin: 0 0 14px; }
.venue-contacts { margin-top: 36px; }
.venue-contacts__title {
  font-size: 13px; letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin: 0 0 12px;
  font-weight: 600;
}
.venue-contacts__body {
  font-size: 16px; line-height: 1.7;
  color: var(--text-main);
}
.venue-contacts__body a {
  color: var(--accent-dark);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.venue-contacts__body a:hover { color: var(--text-main); }
body.edit-mode [data-venue-long] {
  outline: 1px dashed transparent; cursor: pointer;
  border-radius: 8px; padding: 6px; margin-left: -6px;
}
body.edit-mode [data-venue-long]:hover { outline-color: var(--accent); }
.venue-placeholder { color: var(--text-muted); font-style: italic; display: none; }
body.edit-mode .venue-placeholder { display: inline; }
.venue-delete {
  display: none;
  margin-top: 40px;
  background: transparent;
  border: 1px solid #c08080;
  color: #b04040;
  border-radius: 100px;
  padding: 11px 24px;
  font-size: 14px; cursor: pointer;
  transition: background 0.2s, color 0.2s;
}
.venue-delete:hover { background: #b04040; color: #fff; }
body.edit-mode .venue-delete { display: inline-block; }

/* лайтбокс hero */
.venue-lightbox {
  position: fixed; inset: 0;
  background: rgba(20, 17, 13, 0.92);
  backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  z-index: 2000; padding: 32px;
  opacity: 0; visibility: hidden;
  transition: opacity 0.32s ease, visibility 0.32s ease;
  cursor: zoom-out;
}
.venue-lightbox.is-open { opacity: 1; visibility: visible; }
.venue-lightbox__img {
  max-width: 92vw; max-height: 88vh;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-strong);
  transform-origin: center center;
  will-change: transform;
}
.venue-lightbox__close {
  position: absolute; top: 22px; right: 28px;
  width: 44px; height: 44px;
  border: none; border-radius: 50%;
  background: rgba(255,255,255,0.14); color: #fff;
  font-size: 26px; cursor: pointer;
  transition: background 0.2s;
}
.venue-lightbox__close:hover { background: rgba(255,255,255,0.28); }

@media (max-width: 768px) {
  .venue-page { padding: 100px 18px 64px; margin: 0 auto; }
  .venue-hero { grid-template-columns: 1fr; gap: 28px; }
  .venue-title { font-size: clamp(28px, 8vw, 40px); }
}

/* ── promptModal: фирменный ввод текста (Ф5 v106) ───────────────────────── */
.confirm-modal__dialog--prompt { max-width: 520px; }
.confirm-modal__textarea {
  width: 100%;
  box-sizing: border-box;
  margin: 6px 0 22px;
  padding: 14px 16px;
  font-family: inherit;
  font-size: 15px;
  line-height: 1.6;
  color: var(--text-main);
  background: var(--bg-secondary);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  resize: vertical;
  min-height: 110px;
  outline: none;
  transition: border-color 0.2s;
}
.confirm-modal__textarea:focus { border-color: var(--accent); }
.confirm-modal__textarea::placeholder { color: var(--text-muted); }

/* ── Ф5 (v109): сетка «Другие места» на странице заведения ──────────────── */
.venue-others {
  margin-top: 100px;
  padding-top: 64px;
  border-top: 1px solid var(--line);
}
.venue-others__title {
  font-family: var(--font-display, serif);
  font-size: clamp(26px, 3vw, 38px);
  color: var(--text-main);
  text-align: center;
  margin: 0 0 48px;
}
body.edit-mode .venue-others__title[data-field-key] {
  outline: 1px dashed transparent; cursor: text; border-radius: 6px;
}
body.edit-mode .venue-others__title[data-field-key]:hover { outline-color: var(--accent); }
/* центрирование по количеству: flex-wrap + center, до 5 в ряд */
.venue-others__grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 28px;
  max-width: 1180px;
  margin: 0 auto;
}
.venue-card {
  flex: 0 0 auto;
  width: calc((100% - 4 * 28px) / 5);   /* до 5 в ряд */
  min-width: 180px;
  max-width: 210px;
  text-decoration: none;
  display: block;
  transition: transform 0.35s var(--ease);
}
.venue-card:hover { transform: translateY(-6px); }
.venue-card__photo {
  position: relative;
  aspect-ratio: 4 / 3;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  border: 1px solid var(--line);
  background: var(--bg-secondary);
  transition: box-shadow 0.35s var(--ease);
}
.venue-card:hover .venue-card__photo { box-shadow: var(--shadow-medium); }
.venue-card__img {
  width: 100%; height: 100%;
  object-fit: cover; display: block;
  transition: transform 0.6s var(--ease);
}
.venue-card:hover .venue-card__img { transform: scale(1.06); }
.venue-card__placeholder {
  width: 100%; height: 100%;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 5px;
  background: linear-gradient(135deg, var(--bg-secondary), var(--bg-main));
}
.venue-card__brand {
  font-family: var(--font-display, serif);
  font-style: italic; font-size: 18px;
  color: var(--accent); opacity: 0.7;
}
.venue-card__sub {
  font-size: 10px; letter-spacing: 0.2em;
  text-transform: uppercase; color: var(--text-muted);
}
.venue-card__name {
  display: block;
  margin-top: 14px;
  text-align: center;
  font-size: 15px;
  color: var(--text-main);
  transition: color 0.25s;
}
.venue-card:hover .venue-card__name { color: var(--accent-dark); }

@media (max-width: 1024px) {
  .venue-card { width: calc((100% - 3 * 28px) / 4); }
}
@media (max-width: 768px) {
  .venue-others { margin-top: 64px; padding-top: 44px; }
  .venue-others__grid { gap: 18px; }
  .venue-card { width: calc((100% - 18px) / 2); min-width: 0; max-width: none; }
}

/* ── Ф5 (v110): cover-flow галерея заведения ────────────────────────────── */
.venue-gallery {
  margin-top: 88px;
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow-x: clip;          /* боковые карточки не дают горизонтальный скролл */
}
.venue-gallery__stage {
  position: relative;
  width: 100%;
  max-width: 1180px;
  height: 460px;
  margin: 0 auto;
  perspective: 1400px;
  overflow: visible;
}
.venue-gallery__card {
  position: absolute;
  top: 50%; left: 50%;
  height: 420px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-medium);
  background: var(--bg-secondary);
  border: 1px solid rgba(255, 255, 255, 0.55);
  transition: transform 0.5s var(--ease), opacity 0.5s var(--ease), box-shadow 0.5s var(--ease), border-color 0.5s var(--ease);
  will-change: transform, opacity;
}
/* ширина по ориентации (высота общая 420px) */
.venue-gallery__card.is-portrait { width: 315px; }   /* 3:4 */
.venue-gallery__card.is-landscape { width: 560px; }  /* 4:3 */
.venue-gallery__card.is-center {
  cursor: zoom-in;
  border-color: rgba(255, 255, 255, 0.9);
  box-shadow: 0 18px 50px rgba(43, 38, 32, 0.32), 0 4px 14px rgba(43, 38, 32, 0.22);
}
.venue-gallery__img {
  width: 100%; height: 100%;
  object-fit: cover; display: block;
  user-select: none; -webkit-user-drag: none;
}
.venue-gallery__del {
  display: none;
  position: absolute; top: 10px; right: 10px;
  width: 26px; height: 26px;
  border: none; border-radius: 50%;
  background: #b04040; color: #fff;
  font-size: 17px; line-height: 1; cursor: pointer;
  z-index: 50; box-shadow: var(--shadow-soft);
}
body.edit-mode .venue-gallery__card.is-center .venue-gallery__del { display: inline-flex; align-items: center; justify-content: center; }
.venue-gallery__nav {
  display: flex; gap: 18px; margin-top: 28px;
  position: relative; z-index: 20;
}
.venue-gallery__arrow {
  width: 48px; height: 48px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--bg-main);
  color: var(--text-main);
  font-size: 24px; line-height: 1; cursor: pointer;
  touch-action: manipulation;
  user-select: none; -webkit-user-select: none;
  transition: background 0.2s, color 0.2s;
}
@media (hover: hover) {
  .venue-gallery__arrow:hover { background: var(--accent-dark); color: var(--bg-main); border-color: var(--accent-dark); }
}
.venue-gallery__arrow:focus { outline: none; }
.venue-gallery__empty {
  color: var(--text-muted); font-style: italic;
  padding: 48px 0; text-align: center;
}
.venue-gallery__edit { margin-top: 24px; }
.venue-gallery__add {
  display: none;
  padding: 11px 24px;
  border-radius: 100px;
  border: 1px dashed var(--accent);
  background: transparent;
  color: var(--accent-dark);
  font-size: 14px; cursor: pointer;
  transition: background 0.2s;
}
body.edit-mode .venue-gallery__add { display: inline-block; }
.venue-gallery__add:hover { background: var(--bg-secondary); }

@media (max-width: 768px) {
  .venue-gallery { margin-top: 56px; }
  .venue-gallery__stage { height: 320px; }
  /* вертикальное: фикс высота, как было */
  .venue-gallery__card.is-portrait { width: 210px; height: 285px; }
  /* горизонтальное: ограничено шириной экрана (центрируется по ширине,
     становится ниже вертикального, но целиком влезает) */
  .venue-gallery__card.is-landscape { width: 78vw; max-width: 360px; height: auto; aspect-ratio: 4 / 3; }
}

/* ── Ф5 (v117): страница раздела «Нам доверяют» /trust ───────────────────── */
.trust-page {
  max-width: 1180px;
  margin: 0 auto;
  padding: 110px 32px 96px;
}
.trust-page__header {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 72px;
  position: relative;
  z-index: auto;
  display: block;
}
.trust-page__header .section-label {
  display: block;
  position: static;
  margin: 0 auto 14px;
}
.trust-page__title {
  display: block;
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(32px, 4vw, 52px);
  font-weight: 300;
  line-height: 1.1;
  color: var(--text-main);
  margin: 0;
}
.trust-page__title em { font-style: italic; }
/* изящная линия-акцент под заголовком */
.trust-page__title::after {
  content: "";
  display: block;
  width: 64px;
  height: 1px;
  margin: 26px auto 0;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
}
.trust-page__lead {
  font-size: 17px; line-height: 1.7;
  color: var(--text-muted);
  margin: 22px 0 0;
}
.trust-page__empty {
  text-align: center; color: var(--text-muted);
  font-style: italic; padding: 60px 0;
}

.trust-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.trust-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: center;
  padding: 64px 0;
  position: relative;
}
/* интерактивная разделительная линия между блоками */
.trust-row + .trust-row::before {
  content: "";
  position: absolute;
  top: 0; left: 12%; right: 12%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--line) 20%, var(--line) 80%, transparent);
}
.trust-row--right .trust-row__photo { order: 2; }
.trust-row--right .trust-row__text { order: 1; }

.trust-row__photo {
  display: block;
  aspect-ratio: 4 / 3;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-medium);
  border: 1px solid var(--line);
  background: var(--bg-secondary);
  cursor: pointer;
  transition: box-shadow 0.4s var(--ease), transform 0.4s var(--ease);
}
.trust-row__photo:hover {
  box-shadow: var(--shadow-strong);
  transform: translateY(-4px);
}
.trust-row__img {
  width: 100%; height: 100%;
  object-fit: cover; display: block;
  transition: transform 0.7s var(--ease);
}
.trust-row__photo:hover .trust-row__img { transform: scale(1.04); }
.trust-row__placeholder {
  width: 100%; height: 100%;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 8px;
  background: linear-gradient(135deg, var(--bg-secondary), var(--bg-main));
}
.trust-row__brand {
  font-family: var(--font-display, serif);
  font-style: italic; font-size: 26px;
  color: var(--accent); opacity: 0.7;
}
.trust-row__sub {
  font-size: 12px; letter-spacing: 0.25em;
  text-transform: uppercase; color: var(--text-muted);
}
.trust-row__text { cursor: pointer; }
.trust-row__name {
  font-family: var(--font-display, serif);
  font-size: clamp(26px, 3vw, 40px);
  line-height: 1.12;
  color: var(--text-main);
  margin: 0 0 18px;
}
.trust-row__name-link {
  color: inherit;
  text-decoration: none;
  transition: color 0.25s;
}
.trust-row__text:hover .trust-row__name-link { color: var(--accent-dark); }
.trust-row__desc {
  font-size: 16px; line-height: 1.7;
  color: var(--text-muted);
  margin: 0 0 26px;
}
.trust-row__more {
  display: inline-block;
  font-size: 15px;
  color: var(--accent-dark);
  text-decoration: none;
  transition: color 0.4s var(--ease), transform 0.4s var(--ease);
}
.trust-row__more:hover { color: var(--accent-dark); text-shadow: 0 2px 6px rgba(156,126,80,0.25); }
.trust-row__edit-hint {
  display: none;
  margin-top: 18px;
  font-size: 13px;
  color: var(--text-muted);
  text-decoration: none;
  padding: 8px 14px;
  border: 1px dashed var(--line);
  border-radius: 100px;
  transition: border-color 0.2s, color 0.2s;
}
.trust-row__edit-hint:hover { border-color: var(--accent); color: var(--accent-dark); }
body.edit-mode .trust-row__edit-hint { display: inline-block; }

/* ── Раздел «Обучение» (Ф7) ─────────────────────────────────────────────── */
.training-row__photo-col { display: flex; flex-direction: column; gap: 14px; }
.training-row__photo-col.order-2 { order: 2; }
.training-row--right .training-row__text { order: 1; }
.training-row__photo-actions {
  display: none;
  gap: 10px; flex-wrap: wrap; justify-content: center;
}
body.edit-mode .training-row__photo-actions { display: flex; }
.training-img-btn {
  padding: 8px 16px;
  border-radius: 100px;
  border: 1px dashed var(--accent);
  background: transparent;
  color: var(--accent-dark);
  font-size: 13px; cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}
.training-img-btn:hover { background: var(--bg-secondary); }
.training-img-btn--del { border-style: solid; border-color: #c98a8a; color: #b04040; }
.training-name-edit { outline: none; }
body.edit-mode .training-name-edit { cursor: text; border-bottom: 1px dashed var(--accent); }
body.edit-mode [data-training-long] { cursor: pointer; }

@media (max-width: 768px) {
  .training-row__photo-col.order-2 { order: 0; }
  .training-row--right .training-row__text { order: 0; }
}

/* ── Онлайн-курсы: витрина (Ф7) ─────────────────────────────────────────── */
.course-showcase__header { margin-bottom: 64px; }
.course-grid { gap: 32px; padding-top: 8px; }

/* Кнопка «назад» — интерактивная, как навигация в шапке */
.nav-back {
  display: inline-block;
  margin-bottom: 28px;
  font-size: 14px;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  text-decoration: none;
  position: relative;
  padding-bottom: 3px;
  transition: color 0.25s var(--ease);
}
.nav-back::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 0; height: 1px;
  background: var(--accent-dark);
  transition: width 0.3s var(--ease);
}
.nav-back:hover { color: var(--accent-dark); }
.nav-back:hover::after { width: 100%; }
.course-card { position: relative; z-index: 1; transition: transform 0.4s var(--ease); }
.course-card:hover { z-index: 5; transform: translateY(-6px); }
.course-card__link { display: block; text-decoration: none; color: inherit; }
.course-card__img-wrap {
  aspect-ratio: 4 / 3;
  border-radius: 14px;
  overflow: hidden;
  background: var(--bg-secondary);
  margin-bottom: 0;
  border: 1px solid var(--line);
  box-shadow: 0 12px 32px rgba(43, 38, 32, 0.10);
  transition: box-shadow 0.4s var(--ease);
}
.course-card__img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.6s var(--ease); }
.course-card:hover .product-img-wrap { box-shadow: 0 24px 48px rgba(43, 38, 32, 0.18); }
.course-card:hover .course-card__img { transform: scale(1.04); }
.course-card__body { padding: 14px 4px 0; text-align: center; }
.course-card__name {
  font-family: 'Cormorant Garamond', serif;
  font-size: 22px; font-weight: 400; line-height: 1.2;
  color: var(--text-main); margin: 0 0 6px;
}
.course-card__more {
  font-size: 13px; letter-spacing: 0.04em;
  color: var(--accent-dark);
}
.course-card.is-unpublished { opacity: 0.55; }
.course-card__del {
  position: absolute; top: 10px; right: 10px;
  width: 30px; height: 30px; border-radius: 50%;
  border: none; background: rgba(43,38,32,0.7); color: #fff;
  font-size: 18px; line-height: 1; cursor: pointer; z-index: 5;
  display: none; align-items: center; justify-content: center;
}
body.edit-mode .course-card__del { display: flex; }
.course-add { align-self: start; display: none; }
body.edit-mode .course-add { display: flex; }
.course-showcase__hint {
  text-align: center; color: var(--text-muted); font-style: italic;
  padding: 32px 0 8px;
}
body.edit-mode .course-showcase__hint { display: none; }

/* ── Карточка курса (Ф7) ────────────────────────────────────────────────── */
.course-detail { max-width: 1100px; margin: 0 auto; padding: 140px 40px 80px; }
.course-detail__top {
  display: grid; grid-template-columns: 1fr 1fr; gap: 48px;
  align-items: start; margin-top: 16px;
}
.course-detail__cover {
  aspect-ratio: 4 / 3; border-radius: var(--radius-lg);
  overflow: hidden; box-shadow: var(--shadow-medium);
  background: var(--bg-secondary);
  border: 1px solid var(--line);
  transition: box-shadow 0.4s var(--ease);
}
.course-detail__cover:hover { box-shadow: 0 24px 48px rgba(43, 38, 32, 0.18); }
.course-detail__cover-img { width: 100%; height: 100%; object-fit: cover; display: block; }
.course-zoomable { cursor: zoom-in; transition: transform 0.5s var(--ease), filter 0.3s var(--ease); }
.course-detail__cover:hover .course-zoomable { transform: scale(1.03); }
.course-detail__cover-actions { margin-top: 14px; text-align: center; display: none; }
body.edit-mode .course-detail__cover-actions { display: block; }
.course-detail__title {
  font-family: 'Cormorant Garamond', serif; font-weight: 300;
  font-size: clamp(28px, 3.4vw, 44px); line-height: 1.1; margin: 0 0 20px;
}
.course-detail__desc {
  font-size: 16px; line-height: 1.75; color: var(--text-muted);
  margin-bottom: 28px;
}
.course-detail__desc-inner p { margin: 0 0 14px; }
.course-detail__desc-inner p:last-child { margin-bottom: 0; }
.course-detail__desc-inner strong { color: var(--text-main); font-weight: 600; }
/* v224: единый жирный во ВСЕХ контентных блоках (about был тоньше — нет правила) */
.about-page__body strong, .about-page__body b,
.about-text strong, .about-text b,
.product-description-inner strong, .product-description-inner b,
.training-row__text strong, .training-row__text b,
.contacts-page__desc-inner strong, .contacts-page__desc-inner b,
.manifesto-quote strong, .manifesto-quote b {
  font-weight: 600;
  color: var(--text-main);
}
body.edit-mode .course-detail__desc-inner { cursor: pointer; border-radius: 8px; transition: background 0.2s; }
body.edit-mode .course-detail__desc-inner:hover { background: rgba(168,137,96,0.06); }
.course-showcase__lead p { margin: 0 0 8px; }
.course-showcase__lead p:last-child { margin-bottom: 0; }
body.edit-mode .course-showcase__lead { cursor: pointer; }
.course-detail__cta { font-size: 15px; }
.course-detail__back-row { text-align: center; margin-top: 64px; }

.course-gallery {
  margin-top: 64px;
  /* выходим за паддинги .venue-page (max-width 1180 + padding 32),
     чтобы боковые карточки cover-flow не обрезались, как в отзывах */
  width: 100vw;
  position: relative;
  left: 50%;
  right: 50%;
  margin-left: -50vw;
  margin-right: -50vw;
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow-x: clip;
}
.course-gallery__title {
  font-family: 'Cormorant Garamond', serif; font-weight: 300;
  font-size: 28px; text-align: center; margin: 0 0 28px;
}
.course-gallery__stage {
  position: relative;
  width: 100%;
  max-width: 1180px;
  height: 460px;
  margin: 0 auto;
  perspective: 1400px;
  overflow: visible;
}
.course-gallery__card {
  position: absolute;
  top: 50%; left: 50%;
  height: 420px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-medium);
  background: var(--bg-secondary);
  border: 1px solid rgba(255, 255, 255, 0.55);
  transition: transform 0.5s var(--ease), opacity 0.5s var(--ease), box-shadow 0.5s var(--ease), border-color 0.5s var(--ease);
  will-change: transform, opacity;
  cursor: pointer;
}
.course-gallery__card.is-portrait { width: 315px; }   /* 3:4 */
.course-gallery__card.is-landscape { width: 560px; }  /* 4:3 */
.course-gallery__card.is-center {
  cursor: zoom-in;
  border-color: rgba(255, 255, 255, 0.9);
  box-shadow: 0 18px 50px rgba(43, 38, 32, 0.32), 0 4px 14px rgba(43, 38, 32, 0.22);
}
.course-gallery__img,
.course-gallery__video {
  width: 100%; height: 100%;
  object-fit: cover; display: block;
  user-select: none; -webkit-user-drag: none;
  background: var(--bg-secondary);
}
/* кнопка play по центру видео-карточки */
.course-gallery__play {
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 72px; height: 72px; border-radius: 50%;
  border: none; cursor: pointer; z-index: 20;
  background: rgba(43, 38, 32, 0.55);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  padding-left: 4px;
  transition: background 0.25s var(--ease), transform 0.25s var(--ease);
}
.course-gallery__play:hover { background: var(--accent-dark); transform: translate(-50%, -50%) scale(1.06); }
.course-gallery__card.is-playing .course-gallery__play { display: none; }
.course-gallery__del {
  display: none;
  position: absolute; top: 10px; right: 10px;
  width: 26px; height: 26px;
  border: none; border-radius: 50%;
  background: #b04040; color: #fff;
  font-size: 17px; line-height: 1; cursor: pointer;
  z-index: 50; box-shadow: var(--shadow-soft);
}
body.edit-mode .course-gallery__card.is-center .course-gallery__del { display: inline-flex; align-items: center; justify-content: center; }
.course-gallery__empty {
  color: var(--text-muted); font-style: italic;
  padding: 48px 0; text-align: center;
}
.course-gallery__nav { display: flex; gap: 16px; margin-top: 28px; position: relative; z-index: 20; }
.course-gallery__arrow {
  width: 48px; height: 48px; border-radius: 50%;
  border: 1px solid var(--line); background: var(--bg-main);
  color: var(--text-main); font-size: 24px; line-height: 1; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-soft);
  transition: background 0.2s, color 0.2s;
}
@media (hover: hover) {
  .course-gallery__arrow:hover { background: var(--accent-dark); color: var(--bg-main); border-color: var(--accent-dark); }
}
.course-gallery__edit { margin-top: 24px; text-align: center; }
.course-gallery__add {
  display: none;
  padding: 11px 24px; border-radius: 100px;
  border: 1px dashed var(--accent); background: transparent;
  color: var(--accent-dark); font-size: 14px; cursor: pointer;
  transition: background 0.2s;
}
body.edit-mode .course-gallery__add { display: inline-block; }
.course-gallery__add:hover { background: var(--bg-secondary); }
/* видео в лайтбоксе */
.venue-lightbox__video {
  max-width: 90vw; max-height: 86vh;
  border-radius: var(--radius-lg);
  background: #000;
}
/* оверлей прогресса загрузки медиа (общий, AeroUpload) */
.aero-upload {
  position: fixed; inset: 0; z-index: 9999;
  background: rgba(43, 38, 32, 0.55);
  display: none; align-items: center; justify-content: center;
  backdrop-filter: blur(2px);
}
.aero-upload.is-open { display: flex; }
.aero-upload__box {
  width: min(420px, 86vw);
  background: var(--bg-main);
  border-radius: var(--radius-lg);
  padding: 28px 28px 24px;
  box-shadow: var(--shadow-medium);
  text-align: center;
}
.aero-upload__label {
  font-family: 'Cormorant Garamond', serif;
  font-size: 22px; color: var(--text-main); margin-bottom: 18px;
}
.aero-upload__track {
  height: 8px; border-radius: 100px;
  background: var(--bg-secondary); overflow: hidden;
}
.aero-upload__bar {
  height: 100%; width: 0;
  background: var(--accent-dark);
  border-radius: 100px;
  transition: width 0.2s var(--ease);
}
.aero-upload__pct {
  margin-top: 12px; font-size: 14px; color: var(--text-muted);
  letter-spacing: 0.04em;
}

@media (max-width: 900px) {
  .course-detail__top { grid-template-columns: 1fr; gap: 28px; }
}
@media (max-width: 768px) {
  .course-grid { grid-template-columns: repeat(2, 1fr); gap: 18px; }
  .course-gallery__stage { height: 320px; }
  .course-gallery__card { height: 285px; }
  .course-gallery__card.is-portrait { width: 210px; height: 285px; }
  .course-gallery__card.is-landscape { width: 78vw; max-width: 360px; height: auto; aspect-ratio: 4 / 3; }
  .course-detail { padding: 120px 18px 60px; }
  /* кнопки заказа: растягиваем по ширине поля, WhatsApp у правого края */
  .course-detail .cta-row { display: flex; align-items: center; gap: 10px; width: 100%; }
  .course-detail__cta { flex: 1 1 auto; padding: 16px 20px; font-size: 14px; }
  .course-detail .btn-icon { width: 52px; height: 52px; flex: 0 0 auto; }
  /* модалка курса помещается на экран */
  #orderModalOverlay .modal { max-height: 88vh; overflow-y: auto; padding: 22px 18px 18px; }
  #orderModalOverlay .modal-title { font-size: 24px; }
  #orderModalOverlay .channel-btn { padding: 13px; font-size: 14px; }
}

@media (max-width: 768px) {
  .trust-page { padding: 100px 18px 64px; }
  .trust-page__header { margin-bottom: 48px; }
  .trust-row {
    grid-template-columns: 1fr;
    gap: 24px;
    padding: 44px 0;
  }
  /* на мобиле всегда фото сверху, текст снизу — порядок сбрасываем */
  .trust-row--right .trust-row__photo,
  .trust-row--right .trust-row__text { order: 0; }
  .trust-row + .trust-row::before { left: 0; right: 0; }
}

/* ─── v145: раздел «Контакты» ──────────────────────────────────────────── */
.contacts-page { padding-top: 140px; }
.contacts-page__title { margin-bottom: 8px; }
.contacts-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 56px;
  align-items: start;
  margin-top: 48px;
}
.contacts-photo {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-medium);
  background: var(--bg-secondary);
  aspect-ratio: 4 / 3;
  transition: box-shadow 0.45s var(--ease), transform 0.45s var(--ease);
}
.contacts-photo:hover {
  box-shadow: var(--shadow-strong);
  transform: translateY(-4px);
}
.contacts-photo__img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  transition: transform 0.55s var(--ease);
}
.contacts-photo:hover .contacts-photo__img { transform: scale(1.05); }
.contacts-photo-actions { display: none; }
body.edit-mode .contacts-photo-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.training-img-btn--danger { color: #b4453a; border-color: rgba(180, 69, 58, 0.4); }
.training-img-btn--danger:hover { background: rgba(180, 69, 58, 0.08); }

/* верхние края фото и контента — в одну линию */
.contacts-info { padding-top: 0; }
.contacts-info > :first-child { margin-top: 0; }
.contacts-page__desc { margin-top: 0; margin-bottom: 36px; }
.contacts-page__desc-inner { font-size: 17px; line-height: 1.7; color: var(--text-muted); }

/* карточки контактов */
.contact-cards { display: flex; flex-direction: column; gap: 14px; }
.contact-card {
  display: flex; align-items: center;
  background: var(--bg-secondary);
  border: 1px solid rgba(168, 155, 133, 0.22);
  border-radius: var(--radius-md);
  transition: border-color 0.3s var(--ease), box-shadow 0.3s var(--ease), transform 0.3s var(--ease);
}
.contact-card:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-soft);
  transform: translateY(-1px);
}
.contact-card__main {
  flex: 1; min-width: 0;
  display: flex; align-items: center; gap: 16px;
  padding: 16px 18px;
  color: inherit; text-decoration: none;
}
.contact-card__icon {
  flex-shrink: 0;
  width: 44px; height: 44px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background: var(--bg-main);
  color: var(--accent-dark);
  border: 1px solid rgba(168, 155, 133, 0.3);
}
.contact-card__body { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.contact-card__label {
  font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--text-muted);
}
.contact-card__value {
  font-size: 16px; color: var(--text-main);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.contact-card__copy {
  flex-shrink: 0;
  width: 44px; height: 44px; margin-right: 8px;
  background: transparent; border: none; cursor: pointer;
  color: var(--text-muted);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.25s var(--ease), color 0.25s var(--ease);
}
.contact-card__copy:hover { background: var(--bg-main); color: var(--accent-dark); }
.contact-card__copy.is-copied { color: #4a9d5b; }

/* соцкнопки */
.contact-socials { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 32px; }
.contact-social-btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 12px 22px;
  border: 1px solid var(--text-main);
  border-radius: 999px;
  color: var(--text-main); text-decoration: none;
  font-size: 14px; letter-spacing: 0.02em;
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease), border-color 0.35s var(--ease), background 0.35s var(--ease);
}
.contact-social-btn:hover {
  transform: translateY(-3px) scale(1.03);
  box-shadow: var(--shadow-medium);
  border-color: var(--accent);
  background: var(--bg-secondary);
}
.contacts-page__back { margin-top: 64px; text-align: center; }

/* в edit-режиме показываем пустые соцкнопки приглушённо */
.contact-social-btn.is-empty-admin { display: none; }
body.edit-mode .contact-social-btn.is-empty-admin { display: inline-flex; opacity: 0.55; }

@media (max-width: 900px) {
  .contacts-grid { grid-template-columns: 1fr; gap: 32px; }
  .contacts-photo { aspect-ratio: 4 / 3; max-width: 560px; margin: 0 auto; width: 100%; }
}
@media (max-width: 768px) {
  .contacts-page { padding-top: 120px; }
  .contact-card__value { font-size: 15px; }
  .contact-social-btn { padding: 11px 18px; }
}

/* ─── v148: видео-превью миниатюры онлайн-курса (автоплей по hover) ───────── */
.course-card__img-wrap { position: relative; }
.course-card__preview {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.45s var(--ease);
  pointer-events: none;
  border-radius: inherit;
}
.course-card__img-wrap.has-preview.is-previewing .course-card__preview { opacity: 1; }
.course-detail__cover-hint {
  display: block; width: 100%;
  font-size: 12px; color: var(--text-muted); margin-top: 8px; text-align: center;
}

/* ─── v151: универсальная золотая вращающаяся рамка для кнопок ───────────────
   Применение: добавить класс .ag-gold-border к кнопке/ссылке.
   Настройка фона центра через переменные --agb-bg / --agb-bg-hover,
   цвета текста через --agb-fg / --agb-fg-hover. */
.ag-gold-border {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border: none !important;
  --agb-bg: var(--text-main);
  --agb-bg-hover: var(--accent);
  --agb-fg: var(--bg-main);
  --agb-fg-hover: var(--bg-main);
  color: var(--agb-fg);
  background-color: transparent;
  transition: color 0.5s var(--ease), transform 0.5s var(--ease), box-shadow 0.5s var(--ease);
}
.ag-gold-border::before {
  content: "";
  position: absolute;
  /* Слой заведомо больше диагонали кнопки во ВСЕ стороны (по большей
     стороне), круглый — поэтому при вращении под маской всегда плавная
     середина конуса, без пульсации яркости вдоль длинной стороны
     (раньше квадрат 250% от ширины давал «волну» на широких кнопках). */
  width: 300%;
  height: 0;
  padding-bottom: 300%;          /* круг (height через padding, % от ширины) */
  left: 50%;
  top: 50%;
  border-radius: 50%;
  background: conic-gradient(
    from 0deg,
    var(--accent-dark) 0%,
    var(--accent) 20%,
    #f7e3ad 27%,
    var(--accent) 34%,
    var(--accent-dark) 50%,
    var(--accent) 70%,
    #f7e3ad 77%,
    var(--accent) 84%,
    var(--accent-dark) 100%
  );
  transform: translate(-50%, -50%) rotate(0deg);
  animation: agBorderSpin 5s linear infinite;
  will-change: transform;
  z-index: -2;
}
.ag-gold-border::after {
  content: "";
  position: absolute;
  inset: 1.5px;
  border-radius: inherit;
  background-color: var(--agb-bg);
  transition: background-color 0.5s var(--ease);
  z-index: -1;
}
.ag-gold-border:hover {
  color: var(--agb-fg-hover);
  transform: translateY(-3px);
  box-shadow: 0 14px 34px rgba(43,38,32,0.28);
}
.ag-gold-border:hover::after { background-color: var(--agb-bg-hover); }
@media (prefers-reduced-motion: reduce) {
  .ag-gold-border::before { animation: none; }
}
@supports not (background: conic-gradient(from 0deg, red, blue)) {
  .ag-gold-border { border: 1px solid var(--accent) !important; }
  .ag-gold-border::before, .ag-gold-border::after { display: none; }
  .ag-gold-border { background-color: var(--agb-bg); }
}

/* ─── v152: тонкая светящаяся золотая рамка для блоков-секций ───────────────── */
.ag-frame {
  position: relative;
  /* статичная тонкая золотая обводка (всегда видна) */
  box-shadow:
    inset 0 0 0 1px rgba(184, 153, 104, 0.45),
    0 6px 18px rgba(184, 153, 104, 0.05);
}
/* мягкое «дыхание» свечения — через opacity слоя (GPU, без перерисовки тени).
   Внешний разлёт тени уменьшен: широкая мягкая тень над движущимся фоном
   плетения давала муар/«рябь» по краю блока. Перелив самой рамки (inset) — жив. */
.ag-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow:
    inset 0 0 0 1px rgba(184, 153, 104, 0.55),
    0 4px 16px rgba(184, 153, 104, 0.09);
  opacity: 0;
  animation: agFrameBreathe 6s ease-in-out infinite;
  pointer-events: none;
  z-index: 0;
}
@keyframes agFrameBreathe {
  0%, 100% { opacity: 0; }
  50% { opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .ag-frame::after { animation: none; }
}
/* тонкая статичная золотая рамка для карточек (без «дыхания») */
.ag-frame--thin {
  box-shadow:
    inset 0 0 0 1px rgba(184, 153, 104, 0.55),
    0 4px 22px rgba(184, 153, 104, 0.14);
}

/* ─── v155: лёгкое статичное усиление рамки при наведении (без анимаций) ──────
   Рамка рисуется overlay-псевдоэлементом ПОВЕРХ фото (иначе плотный фон
   .cat-card-bg перекрывает inset box-shadow и рамка видна только на заглушках). */
.cat-card.ag-frame--thin {
  transition: box-shadow 0.45s var(--ease), transform 0.6s var(--ease);
}
.cat-card.ag-frame--thin::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow:
    inset 0 0 0 1px rgba(184, 153, 104, 0.65),
    0 4px 22px rgba(184, 153, 104, 0.14);
  pointer-events: none;
  z-index: 3;                 /* выше .cat-card-bg, не мешает кликам/тексту */
  transition: box-shadow 0.45s var(--ease);
}
.cat-card-wrap:hover .cat-card.ag-frame--thin::before,
.cat-card.ag-frame--thin:hover::before {
  box-shadow:
    inset 0 0 0 1.5px rgba(184, 153, 104, 0.95),
    0 0 14px rgba(184, 153, 104, 0.25);
}
.cat-card-wrap:hover .cat-card.ag-frame--thin,
.cat-card.ag-frame--thin:hover {
  box-shadow: 0 12px 38px rgba(184, 153, 104, 0.20);
}

/* ── Фоновое «плетение по скроллу» (главная) ─────────────────────
   Canvas за всем контентом. Не перехватывает события, не печатается. */
#weaveBg {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: -1;
  pointer-events: none;
  display: block;
}
@media print { #weaveBg { display: none; } }

/* Мягкая подложка под галереей отзывов: cream-вуаль вокруг фото,
   чтобы скролл-эффект картинок ложился поверх плетения без резкого
   наложения. Карточки (position:absolute) лежат выше этого слоя. */
.testimonials-gallery__stage::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 128%;
  height: 118%;
  background: radial-gradient(
    ellipse at center,
    rgba(247, 242, 234, 0.92) 0%,
    rgba(247, 242, 234, 0.80) 42%,
    rgba(247, 242, 234, 0.42) 68%,
    rgba(247, 242, 234, 0) 100%
  );
  z-index: 0;
  pointer-events: none;
}

/* ── v166: стабилизация непрозрачных секций над fixed-canvas плетения ──
   Баг: непрозрачный фон .about/.categories местами не композился поверх
   fixed-canvas (z-index:-1), пока ховер кнопки не триггерил repaint
   (скрин «фон дорисовывается при наведении»). Решение — поднять секции
   в собственный композитный слой: фон рисуется стабильно, без зависимости
   от перерисовок. isolation создаёт свой stacking-контекст. */
.categories,
.about {
  position: relative;
  isolation: isolate;
  transform: translateZ(0);     /* собственный GPU-слой → стабильный композитинг */
  background-color: var(--bg-secondary);
}

/* ─── v170: гибрид-кнопка для заказа/записи ──────────────────────────────────
   База: светлая (бежевая). Контур: статичная тонкая золотая рамка — без
   движения, поэтому БЕЗ «волны» (волну давал вращающийся conic на узком
   контуре широкой кнопки). При наведении ВНУТРИ проступает вращающийся
   золотисто-серебристый перелив как в шапке — на широкой внутренней площади
   проекция вращения почти линейна, рывков не видно. */
/* ═══════════ AG-GLASS-BTN · финальная кнопка заказа/записи ═══════════
   Белое глянцевое стекло + золотая рамка с бегущим бликом (две дуги,
   вращающийся conic через @property --r, по форме пилюли, без mask) +
   светлый блик-преломление при наведении + небольшая золотистая тень.
   Разметка: <button class="btn ag-glass-btn"><span>Текст</span>
              <i class="ag-glass__glass"><i class="ag-glass__fill"></i></i></button> */
@property --agr { syntax: '<angle>'; inherits: false; initial-value: 0deg; }

.ag-glass-btn {
  position: relative;
  border: none !important;
  background: conic-gradient(from var(--agr),
    var(--accent) 0deg, #fff4d6 30deg, var(--accent) 60deg,
    var(--accent) 180deg, #fff4d6 210deg, var(--accent) 240deg,
    var(--accent) 360deg);
  --agr: 0deg;
  animation: agGlassRot 5s linear infinite;
  color: var(--text-main);
  overflow: visible;
  transition: transform 0.45s var(--ease), box-shadow 0.45s var(--ease);
}
/* белое глянцевое стекло поверх центра, оставляет золотую кромку */
.ag-glass-btn::after {
  content: "";
  position: absolute;
  inset: 1.5px;
  border-radius: 98px;
  z-index: 0;
  background: #f6efe2;    /* flat1: равномерный тёплый тон, плоское стекло */
  box-shadow:
    inset 0 2px 2px rgba(255, 255, 255, 0.95),
    inset 0 -3px 5px rgba(156, 126, 80, 0.16),
    inset 2px 0 3px -1px rgba(184, 153, 104, 0.12),
    inset -2px 0 3px -1px rgba(184, 153, 104, 0.12),
    inset 0 0 0 1px rgba(255, 255, 255, 0.5);
  transition: box-shadow 0.45s var(--ease);
}
.ag-glass-btn > span { position: relative; z-index: 3; }
/* обрезающий слой — блик крутится внутри */
.ag-glass-btn .ag-glass__glass {
  position: absolute;
  inset: 1.5px;
  border-radius: 98px;
  overflow: hidden;
  z-index: 1;
  pointer-events: none;
}
.ag-glass-btn .ag-glass__fill {
  position: absolute;
  width: 200%;
  height: 0;
  padding-bottom: 200%;
  left: 50%;
  top: 50%;
  border-radius: 50%;
  mix-blend-mode: screen;
  transform: translate(-50%, -50%);
  opacity: 0;
  transition: opacity 0.5s var(--ease);
  background: conic-gradient(from 0deg,
    rgba(255, 255, 255, 0) 0deg, #ffffff 45deg, rgba(255, 255, 255, 0) 90deg,
    rgba(255, 255, 255, 0) 180deg, #fffdf9 225deg, rgba(255, 255, 255, 0) 270deg,
    rgba(255, 255, 255, 0) 360deg);
  animation: agGlassSpin 9s linear infinite;
  will-change: transform;
}
.ag-glass-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 24px rgba(184, 153, 104, 0.22);
}
.ag-glass-btn:hover .ag-glass__fill { opacity: 0.7; }
@keyframes agGlassRot { to { --agr: 360deg; } }
@keyframes agGlassSpin { to { transform: translate(-50%, -50%) rotate(360deg); } }
@keyframes agBorderSpin { to { transform: translate(-50%, -50%) rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  .ag-glass-btn { animation: none; }
  .ag-glass-btn .ag-glass__fill { animation: none; }
}
/* fallback: если @property/conic не поддерживается — простая золотая рамка */
@supports not (background: conic-gradient(from 0deg, red, blue)) {
  .ag-glass-btn { background: var(--accent); }
}

/* ═══════════ Производительность: на мобильных срезаем дорогой backdrop-blur
   у второстепенных мелких элементов (бейджи, подсказки, иконки-кнопки).
   Шапку и основные кнопки не трогаем — там эффект важен. ═══════════ */
@media (max-width: 768px) {
  .product-badge,
  .zoom-hint,
  .hero-photo-btn,
  .hero-tag {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }
}

/* ═══════════ Матовое стекло «soft» (без бегущего засвета рамки) ═══════════
   Кнопка «Читать дальше» в О мастерской: стекло в цвет фона, статичная
   тонкая золотая рамка. При наведении — лёгкое просвечивание изнутри,
   приподнимание, мягкая тень. */
.ag-glass-soft {
  position: relative;
  border: 1px solid var(--accent) !important;
  background: #f3ece0;                      /* матовое стекло в цвет фона секции */
  color: var(--text-main);
  border-radius: 100px;
  overflow: hidden;
  isolation: isolate;
  transition: transform 0.45s var(--ease), box-shadow 0.45s var(--ease), background 0.45s var(--ease);
}
/* объём матового стекла: мягкий светлый верх, лёгкая тень снизу */
.ag-glass-soft::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  z-index: -1;
  box-shadow:
    inset 0 1.5px 1px rgba(255, 255, 255, 0.7),
    inset 0 -2px 4px rgba(156, 126, 80, 0.12);
}
/* просвечивание изнутри при наведении */
.ag-glass-soft::after {
  content: "";
  position: absolute;
  left: 50%; top: 50%;
  width: 140%; padding-bottom: 140%;
  transform: translate(-50%, -50%) scale(0.4);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 252, 245, 0.9) 0%, rgba(255, 252, 245, 0) 65%);
  opacity: 0;
  z-index: -1;
  transition: opacity 0.45s var(--ease), transform 0.6s var(--ease);
}
.ag-glass-soft:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 24px rgba(184, 153, 104, 0.18);
  background: #f6f0e6;
}
.ag-glass-soft:hover::after {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

/* ───── Соц-кнопки (Telegram/WhatsApp) в стиле стекла, статичная рамка ─────
   Объёмное матовое стекло, тонкая золотая рамка (без бегущего засвета).
   При наведении — тематический цвет (tg-синий / wa-зелёный) тоже стеклом. */
.btn-icon {
  position: relative;
  width: 56px; height: 56px;
  border-radius: 50%;
  border: 1px solid var(--accent);
  background: #f3ece0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  text-decoration: none;
  overflow: hidden;
  isolation: isolate;
  transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease), border-color 0.4s var(--ease), background 0.4s var(--ease), color 0.4s var(--ease);
}
.btn-icon::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  z-index: -1;
  box-shadow:
    inset 0 1.5px 1px rgba(255, 255, 255, 0.7),
    inset 0 -2px 4px rgba(156, 126, 80, 0.14);
}
.btn-icon svg { transition: transform 0.3s var(--ease); position: relative; z-index: 1; }
.btn-icon.tg { color: #2AABEE; }
.btn-icon.wa { color: #25D366; }
.btn-icon:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(184, 153, 104, 0.16);
}
/* при наведении — тематический цвет матовым стеклом (мягкий, без сильной выпуклости) */
.btn-icon.tg:hover { background: #2AABEE; color: #fff; border-color: #2AABEE; }
.btn-icon.wa:hover { background: #25D366; color: #fff; border-color: #25D366; }
.btn-icon.tg:hover::before,
.btn-icon.wa:hover::before {
  box-shadow:
    inset 0 1px 2px rgba(255, 255, 255, 0.3),
    inset 0 -1px 2px rgba(0, 0, 0, 0.10);
}

/* ───── Поиск по каталогу (название/артикул) ───── */
.catalog-search { display: flex; gap: 8px; }
.catalog-search input {
  flex: 1;
  min-width: 0;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--bg-main);
  font-size: 13px;
  color: var(--text-main);
  font-family: inherit;
  transition: border-color 0.3s var(--ease);
}
.catalog-search input:focus {
  outline: none;
  border-color: var(--accent);
}
.catalog-search__btn {
  flex-shrink: 0;
  width: 40px;
  border: 1px solid var(--accent);
  border-radius: 6px;
  background: #f3ece0;
  color: var(--accent-dark);
  font-size: 16px;
  cursor: pointer;
  transition: background 0.3s var(--ease), transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.catalog-search__btn:hover {
  background: var(--accent);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(184, 153, 104, 0.2);
}

/* ───── Стрелки переключения в лайтбоксе (отзывы/заведения/курсы) ───── */
.venue-lightbox__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 52px; height: 52px;
  border: none; border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  font-size: 30px; line-height: 1;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  z-index: 2;
  transition: background 0.2s, transform 0.2s;
  -webkit-tap-highlight-color: transparent;
}
.venue-lightbox__nav:hover { background: rgba(255, 255, 255, 0.26); }
.venue-lightbox__nav--prev { left: 20px; }
.venue-lightbox__nav--next { right: 20px; }
.venue-lightbox__nav--prev:active { transform: translateY(-50%) translateX(-2px); }
.venue-lightbox__nav--next:active { transform: translateY(-50%) translateX(2px); }
/* если переключать некуда — прячем (ставится из JS) */
.venue-lightbox__nav.is-hidden { display: none; }
@media (max-width: 768px) {
  .venue-lightbox__nav { width: 44px; height: 44px; font-size: 26px; }
  .venue-lightbox__nav--prev { left: 8px; }
  .venue-lightbox__nav--next { right: 8px; }
}

/* ═══════════════════════════════════════════════════════════════════
   Страница «Реставрация» (v195) — компоновка на базе .course-detail
   ═══════════════════════════════════════════════════════════════════ */
.restoration-label {
  display: block; font-size: 12px; letter-spacing: 0.25em; text-transform: uppercase;
  color: var(--accent-dark); margin-bottom: 14px;
}
.restoration-price {
  font-family: 'Cormorant Garamond', serif; font-size: 26px; color: var(--accent-dark);
  margin: 18px 0 24px;
}

/* ── Интерактив до/после ── */
.ba-compare {
  position: relative; width: 100%; aspect-ratio: 4 / 3;
  border-radius: 18px; overflow: hidden; user-select: none;
  cursor: ew-resize; background: var(--bg-secondary);
  /* мягкая объёмная тень */
  box-shadow:
    0 2px 6px rgba(43, 38, 32, 0.08),
    0 22px 50px rgba(43, 38, 32, 0.20);
}
/* золотистая обводка поверх фото (inset-тень перекрывалась бы картинкой) */
.ba-compare::after {
  content: "";
  position: absolute; inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 0 0 1px rgba(184, 153, 104, 0.6);
  pointer-events: none; z-index: 4;
}
.ba-compare__after, .ba-compare__before { position: absolute; inset: 0; }
.ba-compare__after img, .ba-compare__before img {
  width: 100%; height: 100%; object-fit: cover; object-position: center; display: block;
  pointer-events: none;
}
.ba-compare__before { will-change: clip-path; }
.ba-compare__ph {
  width: 100%; height: 100%; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 6px;
  background: linear-gradient(135deg, #efe7d8, #d9cdb8);
}
.ba-compare__after .ba-compare__ph { background: linear-gradient(135deg, #e3d8c4, #c9b99c); }
.ba-compare__ph-brand { font-family: 'Cormorant Garamond', serif; font-style: italic; font-size: 26px; color: rgba(43,38,32,0.32); }
.ba-compare__ph-sub { font-size: 11px; letter-spacing: 0.25em; text-transform: uppercase; color: rgba(43,38,32,0.3); }
.ba-compare__handle {
  position: absolute; top: 0; bottom: 0; left: calc(50% - 1px); width: 2px;
  background: rgba(255,255,255,0.9); cursor: ew-resize; z-index: 3;
  display: flex; align-items: center; justify-content: center;
}
.ba-compare__grip {
  position: absolute; width: 42px; height: 42px; border-radius: 50%;
  background: #fff; box-shadow: 0 4px 14px rgba(0,0,0,0.25);
  display: flex; align-items: center; justify-content: center; color: var(--text-main);
}
.ba-compare__tag {
  position: absolute; bottom: 12px; font-size: 11px; letter-spacing: 0.15em;
  text-transform: uppercase; color: #fff; background: rgba(43,38,32,0.55);
  padding: 4px 10px; border-radius: 100px; z-index: 2; pointer-events: none;
}
.ba-compare__tag--before { left: 12px; }
.ba-compare__tag--after { right: 12px; }
.restoration-edit-row { display: none; gap: 10px; margin-top: 14px; flex-wrap: wrap; }
body.edit-mode .restoration-edit-row { display: flex; }

/* ── Галерея работ (карусель как отзывы — стили из .testimonials-gallery) ── */
/* выводим на всю ширину вьюпорта (контейнер .restoration-page ограничен) */
.restoration-works {
  margin-top: 56px;
  width: 100vw;
  position: relative;
  left: 50%;
  right: 50%;
  margin-left: -50vw;
  margin-right: -50vw;
  padding: 0 0 20px;
  overflow: hidden;
}

/* ─── Бэкап-модалка (studio, v205) ──────────────────────────────────── */
.backup-modal { max-width: 440px; }
.backup-section {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 16px;
  margin-top: 14px;
}
.backup-section--soon { opacity: 0.6; }
.backup-section__head { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 12px; }
.backup-section__icon { font-size: 22px; line-height: 1.2; }
.backup-section__title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 19px;
  color: var(--text-main);
}
.backup-section__hint { font-size: 12.5px; color: var(--text-muted); margin-top: 2px; }
.backup-btn {
  display: inline-block;
  width: 100%;
  text-align: center;
  padding: 11px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--bg-secondary);
  color: var(--text-main);
  font-size: 14px;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.25s, border-color 0.25s, transform 0.1s;
}
.backup-btn:hover { background: var(--bg-main); }
.backup-btn:active { transform: scale(0.99); }
.backup-btn[disabled] { cursor: not-allowed; }
.backup-btn--primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.backup-btn--primary:hover { background: var(--accent-dark); }
.backup-note { font-size: 12.5px; color: var(--text-muted); margin-top: 10px; text-align: center; }

/* ─── Восстановление из архива (studio, v207) ───────────────────────── */
#restore-file { display: none; }
.restore-progress { margin-top: 12px; }
.restore-progress__track {
  height: 8px;
  background: var(--bg-secondary);
  border: 1px solid var(--line);
  border-radius: 100px;
  overflow: hidden;
}
.restore-progress__fill {
  height: 100%;
  width: 0;
  background: var(--accent);
  transition: width 0.2s ease;
}
.restore-progress__label { font-size: 12px; color: var(--text-muted); margin-top: 6px; text-align: center; }
.restore-steps { list-style: none; margin: 12px 0 0; padding: 0; }
.restore-step { font-size: 13.5px; padding: 4px 0; }
.restore-step--ok { color: #2e7d52; }
.restore-step--fail { color: #b3402f; }
.restore-preview {
  margin-top: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  background: var(--bg-secondary);
}
.restore-preview__title { font-size: 12px; color: var(--text-muted); margin-bottom: 8px; text-transform: uppercase; letter-spacing: 0.08em; }
.restore-preview__row { display: flex; justify-content: space-between; font-size: 14px; padding: 2px 0; }
.restore-preview__row span { color: var(--text-muted); }
.restore-preview__meta { font-size: 12px; color: var(--text-muted); margin-top: 10px; padding-top: 8px; border-top: 1px solid var(--line); }
.restore-preview__warn { font-size: 12.5px; color: #9a7b2e; margin-top: 8px; }
.restore-error {
  margin-top: 12px;
  font-size: 13.5px;
  color: #b3402f;
  background: rgba(179, 64, 47, 0.07);
  border: 1px solid rgba(179, 64, 47, 0.25);
  border-radius: var(--radius-md);
  padding: 10px 14px;
}
.restore-error ul { margin: 6px 0 0; padding-left: 18px; }

/* ─── Бэкап-модалка: высота и опасная кнопка (v208) ─────────────────── */
.backup-modal {
  max-height: 86vh;
  overflow-y: auto;
  margin: 7vh auto;          /* отступ от верхнего/нижнего края экрана */
  -webkit-overflow-scrolling: touch;
}
.backup-btn--danger {
  background: #b3402f;
  border-color: #b3402f;
  color: #fff;
  margin-top: 12px;
}
.backup-btn--danger:hover { background: #97331f; }

/* ─── Кнопки-шаги, зелёная финальная, плашка подтверждения (v209) ───── */
.backup-btn:disabled { opacity: 0.45; cursor: not-allowed; }
.backup-btn--go {
  background: #2e7d52;
  border-color: #2e7d52;
  color: #fff;
  margin-top: 12px;
}
.backup-btn--go:hover:not(:disabled) { background: #25623f; }
.backup-btn--go:disabled { background: var(--bg-secondary); border-color: var(--line); color: var(--text-muted); opacity: 1; }

.confirm-overlay {
  position: fixed;
  inset: 0;
  z-index: 400;                 /* выше backup-модалки (300) */
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(20, 16, 12, 0.55);
}
.confirm-overlay[hidden] { display: none; }   /* hidden должен побеждать display:flex */
.confirm-box {
  background: var(--bg-main);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  max-width: 420px;
  width: 100%;
  padding: 26px 26px 22px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}
.confirm-box__title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 24px;
  color: var(--text-main);
  margin-bottom: 12px;
}
.confirm-box__text { font-size: 14px; line-height: 1.6; color: var(--text-main); }
.confirm-box__actions { display: flex; gap: 10px; margin-top: 22px; }
.confirm-box__actions .backup-btn { margin-top: 0; }

/* ─── Тусклые примеры-плейсхолдеры в формах заявок (v212) ───────────── */
.form-input::placeholder,
.form-textarea::placeholder {
  color: var(--text-muted);
  opacity: 0.5;
}

/* ─── Кикер «Онлайн-курс» над названием курса (v215) ────────────────── */
.course-detail__kicker {
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent-dark);
  margin-bottom: 10px;
}
