/* ===================== НАСТРОЙКИ / ТОКЕНЫ ===================== */
:root{
  --transition-speed: .35s;
  --ease: .25s ease;

  /* Header */
  --header-height-open: 200px;
  --header-height-closed: 56px;
  --gap-after-header: 50px;

  --logo-font-open: 150px;
  --logo-font-closed: 20px;

  /* Меню */
  --menu-gap: 18px;
  --menu-item-font: 16px;
  --menu-item-pad-v: 8px;
  --menu-item-pad-h: 12px;
  --separator-color: rgba(0,0,0,.25);

  /* Контейнер */
  --container-pad: 24px;

  /* Футер */
  --footer-height: 200px;
  --footer-left-size: 150px;
  --footer-right-size: 18px;
  --footer-pad-x: 40px;
  --footer-align-y: center;

  /* Контент (общие отступы) */
  --btn-pad-bottom: 15px;
  --title-mt: 0px;
  --title-mb: 6px;
  --line-mt: 0px;
  --line-mb: 10px;
  --desc-max: 60ch;

  /* Брендовые цвета по умолчанию (чтобы страницы без своих :root не ломались) */
  --ink: #111;
  --muted: #6b7280;
  --line: #e5e7eb;
  --accent: #23483e;
}

/* ===================== БАЗА ===================== */
html,
body{
  margin:0;
  padding:0;
  background:#fff;
  color:#000;
  font-family:"Open Sans", Arial, Helvetica, sans-serif;
  line-height:1.5;
}

.container{
  width:100%;
  max-width:none;
  padding:0 var(--container-pad);
  box-sizing:border-box;
}

/* высота шапки в зависимости от состояния */
body{ --header-height-current: var(--header-height-open); }
body.is-shrink{ --header-height-current: var(--header-height-closed); }

/* ===================== ШАПКА ===================== */

.site-header{
  position:fixed;
  inset:0 0 auto 0;
  height:var(--header-height-current, 200px);
  background:#fff;
  border-bottom:1px solid #eaeaea;
  z-index:1000;
  transition:height var(--transition-speed);
  overflow:hidden;
}

.header-inner{
  height:100%;
  display:flex;
  justify-content:space-between;
  align-items:center;
}

.site-logo{
  font-weight:800;
  letter-spacing:.06em;
  text-transform:uppercase;
  font-size:var(--logo-font-open);
  transition:font-size var(--transition-speed);
  white-space:nowrap;
}

/* «скукоженная» шапка */
body.is-shrink .site-logo{
  font-size:var(--logo-font-closed);
  line-height:1.05;
}

.right-block{
  display:flex;
  flex-direction:column;
  align-items:flex-end;
  gap:12px;
  padding-right:40px;
}

.tagline{
  margin:0;
  color:#111;
  font-size:18px;
  font-weight:700;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
  transform:translate(0,30px);
}

body.is-shrink .tagline{ display:none; }

/* Меню */
.nav{
  display:flex;
  flex-wrap:wrap;
  gap:var(--menu-gap);
  margin-top:80px;
}

.nav a{
  position:relative;
  text-decoration:none;
  color:#000;
  font-size:var(--menu-item-font);
  font-weight:700;
  padding:var(--menu-item-pad-v) var(--menu-item-pad-h);
}

/* Кнопка-бургер + надпись «Меню» */
.menu-toggle{
  display:none;            /* по умолчанию спрятан (десктоп) */
  border:none;
  background:transparent;
  padding:4px 8px;
  margin:0;
  cursor:pointer;
  align-items:center;
  gap:8px;
}

.menu-toggle-icon{
  position:relative;
  width:22px;
  height:14px;
}

.menu-toggle-icon::before,
.menu-toggle-icon::after{
  content:"";
  position:absolute;
  left:0;
  right:0;
  height:2px;
  background:#000;
  transition:transform .2s ease, top .2s ease, bottom .2s ease, opacity .2s ease;
}

.menu-toggle-icon::before{
  top:0;
}
.menu-toggle-icon::after{
  bottom:0;
}

.menu-toggle-label{
  font-size:14px;
  font-weight:700;
  color:#111827;
}


/* Состояние, когда меню открыто: крестик вместо трёх полос */
body.menu-open .menu-toggle-icon::before{
  top:6px;
  transform:rotate(45deg);
}
body.menu-open .menu-toggle-icon::after{
  bottom:6px;
  transform:rotate(-45deg);
}

/* underline-хелпер, если надо использовать вне меню */
.u-underline{ position:relative; }

/* подчёркивание по центру, на всю ширину текста */
.nav a::after,
.u-underline::after{
  content:"";
  position:absolute;
  bottom:0;
  left:50%;
  transform:translateX(-50%) scaleX(0);
  width:100%;
  height:2px;
  background:currentColor;
  transition:transform var(--ease);
  transform-origin:center;
}

/* при ховере и для активной страницы — полная линия */
.nav a:hover::after,
.nav a[aria-current="page"]::after,
.u-underline:hover::after{
  transform:translateX(-50%) scaleX(1);
}

/* вертикальные разделители между пунктами */
.nav a + a::before{
  content:"";
  position:absolute;
  left:-9px;
  top:50%;
  transform:translateY(-50%);
  width:1px;
  height:1.2em;
  background:var(--separator-color);
}

/* Прокладка под шапкой, чтобы контент не прятался */
.header-spacer{
  height:calc(var(--header-height-current, 200px) + var(--gap-after-header, 50px));
  transition:height var(--transition-speed);
}

/* Сжатое состояние — чуть компактнее всё справа */
body.is-shrink .right-block{
  gap:4px;
  padding-right:16px;
}
body.is-shrink .nav{
  margin-top:0;
}
body.is-shrink .nav a{
  padding:6px 10px;
  font-size:15px;
}
body.is-shrink .nav a + a::before{
  height:1em;
  left:-8px;
}

/* Лого-ссылка без любых hover/visited-состояний */
.site-logo.no-hover{
  color:#000 !important;
  text-decoration:none !important;
  cursor:pointer;
}
.site-logo.no-hover:visited,
.site-logo.no-hover:focus,
.site-logo.no-hover:hover,
.site-logo.no-hover:active{
  color:#000 !important;
  text-decoration:none !important;
  opacity:1 !important;
  text-shadow:none !important;
}

/* ===================== ХЕДЛАЙН-ПОЛОСА ===================== */

.headline-bar{
  width:100%;
  background:#013220;
  color:#fff;
  height:30px;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:18px;
  font-weight:600;
  margin:0;
  padding:0;
}
.headline-bar p{ margin:0; }

/* ===================== ОБЩИЕ КОНТЕНТНЫЕ БЛОКИ ===================== */

.content-block{
  position:relative;
  display:flex;
  flex-direction:row;
  align-items:center;
  gap:24px;
  margin-bottom:40px;
  flex-wrap:nowrap;
}

.block{
  border:1px solid #eaeaea;
  border-radius:16px;
  padding:16px;
  margin-bottom:16px;
}

.block-img,
.article-img{
  display:block;
  max-width:min(400px,100%);
  width:100%;
  height:auto;
  aspect-ratio:1/1;
  object-fit:contain;
  border-radius:12px;
  background:transparent;
}

.article-img{
  margin:0 auto 12px;
}

.block-text{
  flex:1 1 auto;
  min-width:0;
  display:flex;
  flex-direction:column;
  padding-bottom:var(--btn-pad-bottom);
}

.block-title{
  margin:var(--title-mt) 0 var(--title-mb) 0;
  font-size:24px;
}

.block-line{
  border:0;
  border-top:3px solid #000;
  margin:var(--line-mt) 0 var(--line-mb) 0;
}

.block-desc{
  margin:0;
  font-size:16px;
  color:#333;
  max-width:var(--desc-max);
  text-align:justify;
  text-justify:inter-word;
  hyphens:auto;
}

/* порядок лево/право для картинок и текста */
.content-block > img.left,
.content-block > .block-text.left{ order:0; }

.content-block > img.right,
.content-block > .block-text.right{ order:1; }

/* кнопка / действия внизу блока */
.block-actions{
  margin-top:auto;
  display:flex;
}
.align-bottom-right{ justify-content:flex-end; }
.align-bottom-left{ justify-content:flex-start; }

.btn{
  display:inline-block;
  padding:10px 16px;
  font-size:15px;
  font-weight:700;
  color:#fff;
  background:#111;
  text-decoration:none;
  border-radius:10px;
  transition:background .2s ease, transform .15s ease;
}
.btn:hover{
  background:#013220;
  transform:translateY(-1px);
}

/* ===================== ФУТЕР ===================== */

.site-footer{
  background:#f9f9f9;
  border-top:1px solid #ddd;
  margin-left:calc(50% - 50vw);
  margin-right:calc(50% - 50vw);
  width:100vw;
}


.footer-inner{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  width:100%;
  padding:20px var(--footer-pad-x);
  box-sizing:border-box;
  min-height:var(--footer-height);
  height:auto;
  gap:20px;
}

.footer-left{
  font-size:var(--footer-left-size);
  font-weight:800;
  color:#000;
  display:flex;
  align-items:var(--footer-align-y);
}

.footer-right{
  display:flex;
  flex-direction:column;
  gap:8px;
  text-align:right;
  justify-content:center;
}
.footer-right p{
  margin:0;
  font-size:var(--footer-right-size);
  color:#333;
}

/* ===================== АРТИКЛИ (общая версия, если нужно) ===================== */

.articles{
  display:flex;
  gap:24px;
  justify-content:center;
  margin:40px 0;
  flex-wrap:wrap;
}

.article-item{
  flex:0 1 400px;
  text-align:center;
}

.article-title{
  margin:0 0 8px;
  font-size:20px;
  font-weight:700;
}

.article-desc{
  margin:0;
  font-size:16px;
  color:#333;
}

/* ===================== ОПИСАНИЕ 2 КОЛОНКИ ===================== */

.desc-split{
  display:grid;
  grid-template-columns:minmax(0,1fr) minmax(0,1fr);
  gap:20px;
  margin-top:6px;
}

.desc-col{ min-width:0; }

.desc-col h4{
  margin:0 0 8px 0;
  font-size:14px;
  font-weight:800;
  letter-spacing:.02em;
}

.desc-col p{
  margin:0;
  hyphens:auto;
  overflow-wrap:break-word;
  word-break:normal;
}

/* материалы в строку через точку */
.kv-inline{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  list-style:none;
  padding:0;
  margin:0;
}
.kv-inline li{
  margin:0;
  padding:0;
  position:relative;
}
.kv-inline li + li::before{
  content:"·";
  margin:0 6px;
  color:#000;
}

/* ===================== CTA-СЫЛКА ===================== */

.link-cta{
  position:absolute;
  bottom:0;
  text-decoration:none;
  color:#000;
  font-weight:700;
  padding:6px 0;
}

.link-cta::after{
  content:"";
  position:absolute;
  left:50%;
  bottom:0;
  transform:translateX(-50%) scaleX(0);
  transform-origin:center;
  width:100%;
  height:2px;
  background:currentColor;
  transition:transform .2s ease;
}

.link-cta:hover::after{
  transform:translateX(-50%) scaleX(1);
}

.pin-br{ right:0; }
.pin-bl{ left:0; }

/* ===================== УТИЛИТЫ ===================== */

.title-right{ text-align:right; }
.title-left { text-align:left; }

.sr-only{
  position:absolute;
  width:1px;
  height:1px;
  padding:0;
  margin:-1px;
  overflow:hidden;
  clip:rect(0,0,0,0);
  white-space:nowrap;
  border:0;
}

/* ======================================================================= */
/* ========================== СЕРИИ 1–3 (СТАБИЛЬНО) ====================== */
/* ======================================================================= */

/* Секция серии: высота 500px, внутри — картинка + текст */
.content-block.series{
  position:relative;
  width:100%;
  height:500px;
  overflow:hidden;

  display:flex;
  align-items:center;
  gap:0;

  /* важное: горизонтальные отступы даём контейнером, а не самой секцией */
  padding-left:0;
  padding-right:0;
  box-sizing:border-box;
}

/* Картинка ~60% ширины, без искажений */
.content-block.series .block-img{
  flex:0 0 60%;
  width:60%;
  height:100%;
  object-fit:contain;
  object-position:left;
  max-width:none;
  border-radius:0;
}

/* если картинка справа */
.content-block.series img.right{
  object-position:right;
}

/* Текст ~40%, по центру по вертикали */
.content-block.series .block-text{
  flex:0 0 40%;
  width:40%;
  min-width:0;
  height:100%;

  display:flex;
  flex-direction:column;
  justify-content:center;

  /* небольшой зазор от картинки и ровный край по правому краю контейнера */
  padding-left:24px;
  padding-right:0;
  box-sizing:border-box;
}

/* аккуратный прямоугольник текста */
.content-block.series .block-desc,
.content-block.series .desc-col p{
  max-width:none;
  text-align:justify;
  text-justify:inter-word;
  hyphens:auto;
  overflow-wrap:anywhere;
  line-height:1.55;
  margin:0;
}

/* описание в сериях — одной колонкой */
.content-block.series .desc-split{
  grid-template-columns:1fr;
  gap:10px;
}

/* кнопка — правый нижний угол секции, по правому краю контейнера */
.content-block.series .link-cta.pin-br{
  right:0;
  bottom:12px;
}

/* подчёркивание у кнопки — от правого края */
.content-block.series .link-cta.pin-br::after{
  left:auto;
  right:0;
  width:100%;
  transform:scaleX(0);
  transform-origin:right;
}
.content-block.series .link-cta.pin-br:hover::after{
  transform:scaleX(1);
}

/* Центрированная подпись в специальных сериях (yawaraka) */
.series-wrapper--yawaraka .series-center{
  display:flex;
  flex-direction:column;
  align-items:center;
  text-align:center;
  background:transparent;
  border:none;
  border-radius:0;
  box-shadow:none;
}

.series-wrapper--yawaraka .series-title{
  text-align:center;
}

.series-wrapper--yawaraka .series-underline{
  margin:8px auto 16px auto;
}

.series-wrapper--yawaraka .series-desc{
  max-width:720px;
  margin:0 auto;
  text-align:justify;
  hyphens:auto;
  line-height:1.55;
}

@supports (text-align-last:center){
  .series-wrapper--yawaraka .series-desc{
    text-align-last:center;
  }
}

/* ===================== АДАПТИВ ===================== */

@media (max-width:900px){
  /* обычные блоки — в колонку */
  .content-block{
    flex-direction:column;
    text-align:center;
    gap:16px;
  }

  .block-text.stretch-right,
  .block-text.stretch-left{
    margin:0;
    text-align:center;
  }

  .align-bottom-right,
  .align-bottom-left{
    justify-content:center;
  }

  .link-cta.pin-br,
  .link-cta.pin-bl{
    position:static;
    display:inline-block;
    margin-top:12px;
  }

  .desc-split{
    grid-template-columns:1fr;
    gap:12px;
  }

  .article-img,
  .block-img{
    max-width:100%;
    aspect-ratio:1/1;
  }

  /* серии: складываем в столбик */
  .content-block.series{
    height:auto;
    flex-direction:column;
    align-items:stretch;
    padding:12px 0 60px;
  }

  .content-block.series .block-img{
    width:100%;
    height:auto;
    aspect-ratio:2/1;
    object-position:center;
  }

  .content-block.series .block-text{
    width:100%;
    padding:0;
    height:auto;
    margin-top:12px;
  }

  .content-block.series .link-cta.pin-br{
    position:static;
    align-self:center;
    margin-top:12px;
  }
}

/* ===================== MOBILE: HEADER ===================== */

@media (max-width: 768px) {
  /* Чуть уменьшаем базовые размеры через переменные */
  :root {
    --container-pad: 16px;
    --header-height-open: 140px;
    --header-height-closed: 64px;
    --logo-font-open: 32px;
    --logo-font-closed: 18px;
    --gap-after-header: 30px;

    --footer-height: auto;
    --footer-left-size: 32px;
    --footer-right-size: 14px;
    --footer-pad-x: 16px;
  }

  /* показываем бургер только на мобильных */
  .menu-toggle{
    display:flex;
  }

  /* по умолчанию меню скрыто на узких экранах */
  .nav{
    display:none;
    flex-direction:column;
    align-items:flex-start;
    gap:8px;
    margin-top:8px;
    background:#fff;
    padding:4px 0;
  }

  /* когда body.menu-open — показываем меню */
  body.menu-open .nav{
    display:flex;
  }

  /* можно чуть упростить разделители в меню на мобильных */
  .nav a + a::before{
    display:none;
  }

  .site-header {
    border-bottom: 1px solid #e5e5e5;
    height:auto;
    overflow:visible;
  }

  .header-inner {
    align-items: flex-start;
    padding-top: 10px;
  }

  .site-logo {
    font-size: 32px;
  }

  body.is-shrink .site-logo {
    font-size: 18px;
  }

  .right-block {
    padding-right: 0;
    align-items: flex-start;
    gap: 8px;
  }

  .tagline {
    font-size: 14px;
    max-width: 220px;
    transform:none;
  }

  .nav {
    margin-top: 8px;
    gap: 12px;
    flex-wrap: wrap;
  }

  .nav a {
    font-size: 14px;
    padding: 4px 8px;
  }

  .nav a + a::before {
    height: 0.9em;
    left: -6px;
  }

  /* Спейсер даёт отступ под фиксированной шапкой */
  .header-spacer {
    height: 84px;
  }
}

/* ===================== MOBILE: FOOTER ===================== */

@media (max-width: 768px) {
  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    padding: 16px var(--footer-pad-x);
    height: auto;
    gap: 8px;
  }

  .footer-left {
    font-size: 32px;
    margin-bottom: 4px;
  }

  .footer-right {
    text-align: left;
    align-items: flex-start;
  }

  .footer-right p {
    font-size: 14px;
  }
}

/* ===================== КОРЗИНА / ОФОРМЛЕНИЕ ===================== */

.cart-line-main{
  flex:1 1 auto;
  min-width:0;
}
.cart-line-options{
  margin:4px 0 0;
  padding:0;
  list-style:none;
  font-size:12px;
  color:#6b7280;
}
.cart-line-options li{
  margin:0;
}
.cart-line-options li span{
  font-weight:600;
  color:#4b5563;
}

/* Шаг оформления заказа */
.cart-checkout{
  padding:10px 0 0;
  border-top:1px solid #e5e7eb;
  margin-top:8px;
}
.cart-checkout-title{
  font-weight:700;
  margin:0 0 8px;
  font-size:15px;
}
.cart-checkout-form{
  display:flex;
  flex-direction:column;
  gap:8px;
}
.cart-checkout-form label{
  display:flex;
  flex-direction:column;
  font-size:13px;
  gap:4px;
}
.cart-checkout-form input,
.cart-checkout-form textarea{
  border-radius:8px;
  border:1px solid #e5e7eb;
  padding:6px 8px;
  font-size:14px;
  font-family:inherit;
  resize:vertical;
}
.cart-checkout-actions{
  display:flex;
  justify-content:space-between;
  align-items:center;
  margin-top:4px;
  gap:8px;
}

/* Аккуратные текстовые кнопки с подчёркиванием и зелёным при ховере */
.btn-link{
  border:none;
  background:transparent;
  padding:0;
  font-size:14px;
  font-weight:600;
  color:#111827;
  cursor:pointer;
  text-decoration:none;
  border-bottom:1px solid transparent;
}
.btn-link.primary{
  color:#111827;
}
.btn-link:hover{
  color:var(--r-green);
  border-bottom-color:var(--r-green);
}

.cart-thankyou{
  font-size:14px;
  font-weight:600;
  color:var(--r-green);
  padding:8px 0;
}
/* === unify filter button / link colors === */

/* обычное состояние — черный */
.filter-bar button,
.filter-bar a,
.filter-item button,
.filter-item a,
.inline-control button,
.inline-control a,
.option button,
.option a {
  color: #111 !important;
  text-decoration: none !important;
}

/* наведение — чуть темнее */
.filter-bar button:hover,
.filter-bar a:hover,
.filter-item button:hover,
.filter-item a:hover,
.inline-control button:hover,
.inline-control a:hover,
.option button:hover,
.option a:hover {
  color: #000 !important;
}

/* активная (выбранная) кнопка фильтра — фирменный зеленый фон, белый текст */
.filter-bar button.is-active,
.filter-item button.is-active,
.inline-control button.is-active,
.option button.is-active {
  background-color: var(--accent) !important;
  color: #fff !important;
}
/* === Чёткое поведение таблеток выбора (pill) === */

/* обычное состояние: светло-серое, чёрный текст */
.pill[aria-pressed="false"],
.pill:not([aria-pressed]) {
  color: #111;
}

/* активная (выбранная): зелёный фон, белый текст */
.pill[aria-pressed="true"] {
  background-color: var(--accent) !important;
  border-color: var(--accent) !important;
  color: #fff !important;
}
/* === Центрирование футера (исправление выравнивания) === */
.site-footer {
  background: #f9f9f9;
  border-top: 1px solid #ddd;
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;       /* 👈 вместо flex-start */
  width: 100%;
  padding: 30px var(--footer-pad-x);
  box-sizing: border-box;
  min-height: var(--footer-height);
  gap: 20px;
}

.footer-left {
  font-size: var(--footer-left-size);
  font-weight: 800;
  color: #000;
  display: flex;
  align-items: center;        /* 👈 теперь центр по вертикали */
}

.footer-right {
  display: flex;
  flex-direction: column;
  gap: 8px;
  text-align: right;
  justify-content: center;    /* 👈 центрирование по вертикали */
}

.footer-right p {
  margin: 0;
  font-size: var(--footer-right-size);
  color: #333;
}

/* адаптив на мобильном */
@media (max-width: 768px) {
  .footer-inner {
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 24px var(--footer-pad-x);
    gap: 10px;
  }
  .footer-right {
    text-align: center;
    align-items: center;
  }
}
/* ==== Контактный виджет с Сантой — финальная версия ==== */

/* Кнопка остаётся кругом, как задано в injectWidgetStyles,
   только убираем зелёную рамку и тень */
.call-fab {
  border: none !important;
  box-shadow: none !important;
}

/* Картинка Санты в кружке */
.call-fab-icon {
  width: 180%;
  height: 180%;
  display: block;
  object-fit: contain;
  pointer-events: none;
  transform: translate(-0%, -8%);
}
/* Іконки в кнопках чату/дзвінка */
.contact-subfab img.subfab-icon {
  width: 140%;
  height: 140%;
  object-fit: contain;
  display: block;
  pointer-events: none;
  transform: translate(-0%, -10%);
}
