/* Фон шапки при прокрутке — всегда непрозрачный на главной */
.header.header--index.fixed {
  background: #3c2cb7 !important;
}

@media (max-width: 1200px) {
  .header.header--index.fixed {
    background: #3c2cb7 !important;
  }
}

/* Мобильное меню: гость не видит пункты личного кабинета */
@media (max-width: 1200px) {
  .header--guest .menu__ah-menu {
    display: none !important;
  }

  .header--auth .menu__enter {
    display: none !important;
  }
}

/* Язык временно скрыт на всём сайте */
.header__language,
.menu__language,
.language .s-language,
select.s-language {
  display: none !important;
}

/* Без языка баланс и никнейм рядом, чуть левее правого края */
.header--admin .header__right-side {
  gap: 24px !important;
  justify-content: flex-end !important;
  padding-right: 130px !important;
}

/* Крупный баланс в шапке: вся сумма + ₽ в одну строку */
.header-balance {
  flex-wrap: nowrap !important;
  align-items: center !important;
  max-width: none !important;
}

.header-balance__val {
  max-width: none !important;
  overflow: visible !important;
  text-overflow: clip !important;
  white-space: nowrap !important;
  flex-shrink: 0 !important;
}

.ah-menu__list .header-balance {
  flex-wrap: wrap !important;
  align-items: baseline !important;
  gap: 2px 6px !important;
  max-width: 100% !important;
}

.ah-menu__list .header-balance__tit {
  padding-right: 0 !important;
}

.ah-menu__list .header-balance__val {
  max-width: 100% !important;
  white-space: nowrap !important;
  margin-right: 0 !important;
  color: inherit;
}

/* Мобильное меню: не дёргать вёрстку при открытии */
html {
  scrollbar-gutter: stable;
}

@media (max-width: 1200px) {
  /* На узком экране desktop-выпадашка не нужна — иначе на таче «дёргает» */
  .header .ah-menu:hover .ah-menu__content,
  .header .ah-menu.active .ah-menu__content {
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
  }

  .menu__container {
    transition: right 0.35s cubic-bezier(0.42, 0, 0.36, 0.69) !important;
  }

  .menu.open .menu__item,
  .menu__item {
    -webkit-transform: none !important;
        -ms-transform: none !important;
            transform: none !important;
    opacity: 1 !important;
  }

  /* На заказы поиск не прячем (в общем CSS он скрыт) */
  .my-order .search {
    display: -webkit-box !important;
    display: -ms-flexbox !important;
    display: flex !important;
    -webkit-box-flex: 1;
        -ms-flex: 1 1 200px;
            flex: 1 1 200px;
    min-width: 180px;
  }

  .my-order .search__input {
    width: 100% !important;
  }

  .my-order .order-status {
    width: 160px;
  }
}

/* Оформление поиска и статуса на /account/orders */
.my-order .search {
  margin: 0;
}

.my-order .search__input {
  height: 42px;
  background: #fff;
}

.my-order .order-status .bootstrap-select {
  width: 174px !important;
}

.my-order__header > .order-status {
  width: 174px;
  flex-shrink: 0;
}

.my-order .order-status .bootstrap-select > .dropdown-toggle {
  height: 42px;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-align: center;
      -ms-flex-align: center;
          align-items: center;
}

/* Пагинация заказов */
.orders-pager {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-pack: center;
      -ms-flex-pack: center;
          justify-content: center;
  -webkit-box-align: center;
      -ms-flex-align: center;
          align-items: center;
  -ms-flex-wrap: wrap;
      flex-wrap: wrap;
  gap: 8px;
  margin-top: 28px;
}

.orders-pager__btn {
  min-width: 40px;
  height: 40px;
  padding: 0 12px;
  border: 1px solid #E1E1E1;
  border-radius: 49px;
  display: -webkit-inline-box;
  display: -ms-inline-flexbox;
  display: inline-flex;
  -webkit-box-align: center;
      -ms-flex-align: center;
          align-items: center;
  -webkit-box-pack: center;
      -ms-flex-pack: center;
          justify-content: center;
  text-decoration: none;
  color: #000;
  font-size: 16px;
  line-height: 1;
  background: #fff;
}

.orders-pager__btn:hover {
  border-color: #394AE8;
  color: #394AE8;
}

.orders-pager__btn.is-active {
  background: #394AE8;
  border-color: #394AE8;
  color: #fff;
}

.orders-pager__btn.is-disabled {
  opacity: 0.4;
  pointer-events: none;
}

.orders-pager__dots {
  padding: 0 4px;
  color: #9aa0b5;
}

/* Методы оплаты на /account/balance */
.add-balance__radio label {
  align-items: center;
}

.add-balance__radio label .img {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: visible;
  flex-shrink: 0;
}

.add-balance__radio label .img.img--wide {
  width: 96px;
  height: 40px;
}

.add-balance__radio label .img img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
}

/* История пополнений: способ оплаты с иконкой */
.balance-pay-method {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  max-width: 100%;
}

.balance-pay-method__ico {
  flex: 0 0 24px;
  width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.balance-pay-method__ico--wide {
  flex-basis: 72px;
  width: 72px;
  height: 28px;
}

.balance-pay-method__ico img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
}

.balance-pay-method__tit {
  line-height: 1.3;
}

/* Статус «Отменён» в таблице заказов */
.my-order .order-status .canceled,
.table .order-status .canceled {
  color: #e74c3c;
}

/* Футер: меньше email, реквизиты ИП вместо иконок оплаты */
.footer__item--info > nav > ul > li:first-child > a[href^="mailto:"] {
  font-size: 13px !important;
  line-height: 1.3 !important;
  word-break: break-all;
}

.footer-legal {
  font-size: 10px !important;
  line-height: 1.35;
  color: #fff !important;
  text-align: right;
  max-width: 58%;
}

@media (max-width: 991px) {
  .footer-legal {
    text-align: center;
    max-width: 100%;
  }

  .footer__item--info > nav > ul > li:first-child > a[href^="mailto:"] {
    font-size: 12px !important;
  }
}

/* Плавный переход к блоку «Быстрый заказ» с главной */
html {
  scroll-behavior: smooth;
}

#quick-order {
  scroll-margin-top: 110px;
}


/* Блок CrowdStore: иконка Telegram без растягивания */
.about__el-3 {
  width: 96px !important;
  line-height: 0;
}
.about__el-3 img {
  width: 100% !important;
  height: auto !important;
  display: block;
  object-fit: contain !important;
}
@media (max-width: 991px) {
  .about__el-3 { width: 72px !important; }
}
@media (max-width: 575px) {
  .about__el-3 { width: 64px !important; }
}