/* Sticky Mobile Menu: анимированный таббар внизу экрана.
   По мотивам "Animated Tab Bar" (Mauricio Bucardo,
   dribbble.com/shots/5619509), цвета адаптированы под белый фон.
   Отображается при ширине экрана 280-500px.

   Важно: без CSS-переменных (--var) и @property — встроенный
   LESS-компилятор CS-Cart 4.9.x (less.php) их не поддерживает
   и файл выпадает из сборки стилей темы. */
.smm-menu {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 10px;
  margin: 0 auto;
  padding: 0 14px;
  width: calc(100% - 24px);
  max-width: 420px;
  display: none;
  align-items: center;
  justify-content: center;
  background-color: #ffffff;
  border-radius: 100px;
  filter: drop-shadow(0 2px 5px rgba(25, 25, 60, 0.14)) drop-shadow(0 8px 22px rgba(25, 25, 60, 0.18));
  z-index: 1010;
}
/* Только мобильная версия: ширина экрана от 280 до 500px */
@media (min-width: 280px) and (max-width: 500px) {
  .smm-menu {
    display: flex;
  }
  /* Чтобы меню не перекрывало контент внизу страницы */
  body {
    padding-bottom: 92px;
  }
}
/* До первого клика анимации отключены (позиционирование без прыжка) */
.smm-menu.smm-no-anim .smm-menu__item,
.smm-menu.smm-no-anim .smm-menu__border {
  transition: none !important;
}
.smm-menu .smm-menu__item {
  flex-grow: 1;
  z-index: 100;
  display: flex;
  cursor: pointer;
  position: relative;
  border-radius: 50%;
  align-items: center;
  justify-content: center;
  will-change: transform;
  padding: 10px 0 15px;
  background: none;
  border: none;
  outline: none;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.7s;
}
.smm-menu .smm-menu__item:before {
  content: "";
  z-index: -1;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  position: absolute;
  transform: scale(0);
  transition: background-color 0.7s, transform 0.7s;
}
.smm-menu .smm-menu__item.active,
.smm-menu .smm-menu__item.smm-open {
  transform: translate3d(0, -13px, 0);
}
.smm-menu .smm-menu__item.active:before,
.smm-menu .smm-menu__item.smm-open:before {
  transform: scale(1);
  /* Нейтральный цвет-страховка: круг виден, даже если классы-модификаторы
       не применились (например, из-за устаревшего кеша шаблонов) */
  background-color: #6b7280;
}
/* Цвета активных пунктов (вместо inline --bgColorItem) */
.smm-menu .smm-menu__item--1.active:before,
.smm-menu .smm-menu__item--1.smm-open:before {
  background-color: #ff8c00;
}
.smm-menu .smm-menu__item--2.active:before,
.smm-menu .smm-menu__item--2.smm-open:before {
  background-color: #f54888;
}
.smm-menu .smm-menu__item--3.active:before,
.smm-menu .smm-menu__item--3.smm-open:before {
  background-color: #4343f5;
}
.smm-menu .smm-menu__item--4.active:before,
.smm-menu .smm-menu__item--4.smm-open:before {
  background-color: #e0b115;
}
.smm-menu .smm-menu__item--5.active:before,
.smm-menu .smm-menu__item--5.smm-open:before {
  background-color: #65ddb7;
}
.smm-icon {
  width: 26px;
  height: 26px;
  stroke: #5a5f6d;
  fill: transparent;
  stroke-width: 1pt;
  stroke-miterlimit: 10;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 60;
  transition: stroke 0.7s;
}
.smm-menu__item.active .smm-icon,
.smm-menu__item.smm-open .smm-icon {
  stroke: #ffffff;
  animation: smm-strok 1.5s reverse;
}
/* Своя SVG-иконка из настроек модуля: обёртка задаёт размер и цвет,
   сама иконка должна использовать currentColor для stroke/fill */
.smm-menu .smm-icon--custom {
  display: flex;
  align-items: center;
  justify-content: center;
  stroke: none;
  fill: none;
  color: #5a5f6d;
  animation: none;
  transition: color 0.7s;
}
.smm-menu .smm-icon--custom svg {
  display: block;
  width: 100%;
  height: 100%;
}
.smm-menu .smm-menu__item.active .smm-icon--custom,
.smm-menu .smm-menu__item.smm-open .smm-icon--custom {
  color: #ffffff;
  stroke: none;
  animation: none;
}
@keyframes smm-strok {
  100% {
    stroke-dashoffset: 400;
  }
}
/* «Капля»-выступ над панелью, скользящая под активный пункт */
.smm-menu .smm-menu__border {
  left: 0;
  bottom: 99%;
  width: 100px;
  height: 22px;
  position: absolute;
  clip-path: url(#smm-menu-clip);
  -webkit-clip-path: url(#smm-menu-clip);
  will-change: transform;
  background-color: #ffffff;
  transition: transform 0.7s, opacity 0.3s;
}
/* Текущая страница не из меню: активного пункта нет, «капля» скрыта */
.smm-menu.smm-menu--no-active .smm-menu__border {
  opacity: 0;
}
.smm-svg-container {
  width: 0;
  height: 0;
  position: absolute;
  overflow: hidden;
}
/* Кнопка поиска: цвет круга в активном (открытом) состоянии */
.smm-menu .smm-menu__item--search.active:before {
  background-color: #38bdf8;
}
/* Кнопка сообщений: цвет круга активного пункта */
.smm-menu .smm-menu__item--messages.active:before,
.smm-menu .smm-menu__item--messages.smm-open:before {
  background-color: #10b981;
}
/* Красный бейдж с числом непрочитанных сообщений */
.smm-menu .smm-menu__item--messages {
  position: relative;
}
.smm-menu .smm-badge {
  position: absolute;
  top: 4px;
  left: 50%;
  margin-left: 3px;
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  box-sizing: border-box;
  border-radius: 10px;
  background: #e53935;
  color: #ffffff;
  font: 700 11px/17px system-ui, sans-serif;
  text-align: center;
  white-space: nowrap;
  box-shadow: 0 0 0 2px #ffffff;
  pointer-events: none;
  z-index: 2;
}
/* Панель внутреннего поиска: капсула чуть выше меню,
   выезжает снизу с пружинящей анимацией */
.smm-search {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 84px;
  margin: 0 auto;
  width: calc(100% - 24px);
  max-width: 420px;
  padding: 7px 8px;
  background: #ffffff;
  border-radius: 100px;
  box-shadow: 0 1px 3px rgba(25, 25, 60, 0.14), 0 6px 20px rgba(25, 25, 60, 0.22);
  display: none;
  opacity: 0;
  transform: translateY(16px) scale(0.97);
  transition: opacity 0.25s ease, transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  pointer-events: none;
  z-index: 1009;
}
@media (min-width: 280px) and (max-width: 500px) {
  .smm-search {
    display: block;
  }
}
.smm-search.smm-search--open {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}
.smm-search .smm-search__form {
  display: flex;
  align-items: center;
  margin: 0;
  padding: 0;
}
.smm-search .smm-search__input {
  flex-grow: 1;
  min-width: 0;
  border: none;
  outline: none;
  background: transparent;
  box-shadow: none;
  padding: 8px 6px 8px 16px;
  font-size: 15px;
  color: #2b2f3a;
}
.smm-search .smm-search__submit {
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 50%;
  background: #38bdf8;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}
.smm-search .smm-search__submit svg {
  width: 20px;
  height: 20px;
  stroke: #ffffff;
  fill: none;
  stroke-width: 1.5;
  stroke-linecap: round;
}
/* Выдвижная панель (bottom sheet) первых двух кнопок: 80% высоты экрана */
.smm-sheet-backdrop {
  position: fixed;
  left: 0;
  top: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 15, 35, 0.45);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  z-index: 1011;
  display: none;
}
.smm-sheet {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  height: 80vh;
  box-sizing: border-box;
  background: #ffffff;
  border-radius: 22px 22px 0 0;
  box-shadow: 0 -8px 30px rgba(25, 25, 60, 0.25);
  transform: translateY(105%);
  transition: transform 0.45s cubic-bezier(0.32, 0.72, 0.29, 1);
  z-index: 1012;
  display: none;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 8px 18px 30px;
}
@media (min-width: 280px) and (max-width: 500px) {
  .smm-sheet-backdrop,
  .smm-sheet {
    display: block;
  }
}
.smm-sheet-backdrop.smm-sheet-backdrop--open {
  opacity: 1;
  pointer-events: auto;
}
.smm-sheet.smm-sheet--open {
  transform: translateY(0);
}
/* Блокировка прокрутки страницы, пока панель открыта */
body.smm-sheet-lock {
  overflow: hidden;
}
.smm-sheet .smm-sheet__handle {
  width: 44px;
  height: 5px;
  border-radius: 3px;
  background: #d6d6dc;
  margin: 8px auto 16px;
}
.smm-sheet .smm-sheet__list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.smm-sheet .smm-sheet__list li {
  margin: 0;
  padding: 0;
}
.smm-sheet .smm-sheet__list a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 6px;
  font-size: 16px;
  color: #2b2f3a;
  text-decoration: none;
  border-bottom: 1px solid #ececf0;
}
/* Стрелка-шеврон справа, как в iOS-списках */
.smm-sheet .smm-sheet__list a:after {
  content: "";
  flex: 0 0 auto;
  width: 9px;
  height: 9px;
  margin-left: 12px;
  border-top: 2px solid #c0c0c8;
  border-right: 2px solid #c0c0c8;
  transform: rotate(45deg);
}
/* Пока панель тянут пальцем, анимация отключена (панель следует за пальцем) */
.smm-sheet.smm-sheet--dragging {
  transition: none !important;
}
/* Красный крестик справа внизу: закрывает открытую панель */
.smm-sheet-close {
  position: fixed;
  right: 16px;
  bottom: 20px;
  width: 48px;
  height: 48px;
  border: none;
  border-radius: 50%;
  background: #e53935;
  box-shadow: 0 4px 14px rgba(229, 57, 53, 0.45);
  display: none;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: scale(0.6);
  transition: opacity 0.25s ease, transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  pointer-events: none;
  z-index: 1013;
  cursor: pointer;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}
@media (min-width: 280px) and (max-width: 500px) {
  .smm-sheet-close {
    display: flex;
  }
}
/* Появляется вместе с открытой панелью (по блокировке прокрутки) */
body.smm-sheet-lock .smm-sheet-close {
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
}
.smm-sheet-close svg {
  width: 22px;
  height: 22px;
  stroke: #ffffff;
  stroke-width: 2.2;
  stroke-linecap: round;
  fill: none;
}
/* Иконка пункта выдвижной панели (из настроек, SVG с currentColor) */
.smm-sheet .smm-sheet__icon {
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  margin-right: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #5a5f6d;
}
.smm-sheet .smm-sheet__icon svg {
  display: block;
  width: 100%;
  height: 100%;
}
.smm-sheet .smm-sheet__label {
  flex-grow: 1;
  min-width: 0;
}
/* Панель авторизации/регистрации (гость) — стандартная форма CS-Cart */
.smm-sheet--login {
  padding-top: 6px;
}
.smm-sheet .smm-login {
  max-width: 360px;
  margin: 4px auto 0;
}
.smm-sheet .smm-login__title {
  margin: 4px 0 16px;
  font-size: 18px;
  font-weight: 700;
  color: #222;
  text-align: center;
}
.smm-sheet .smm-login__form {
  margin: 0;
  padding: 0;
}
.smm-sheet .smm-login__input {
  display: block;
  width: 100%;
  box-sizing: border-box;
  margin: 0 0 12px;
  padding: 12px 14px;
  font-size: 15px;
  color: #222;
  border: 1px solid #d8d8de;
  border-radius: 10px;
  background: #fff;
  outline: none;
}
.smm-sheet .smm-login__input:focus {
  border-color: #38bdf8;
}
.smm-sheet .smm-login__submit {
  display: block;
  width: 100%;
  margin: 4px 0 0;
  padding: 13px 16px;
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  background: #10b981;
  border: none;
  border-radius: 10px;
  cursor: pointer;
}
.smm-sheet .smm-login__links {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 16px;
}
.smm-sheet .smm-login__links a {
  font-size: 14px;
  color: #2f80ed;
  text-decoration: none;
}
.smm-sheet .smm-login__register {
  font-weight: 700;
}
