.rb-footer {
  margin-top: 56px;
  color: #eef3f9;
  background: #1f2c41;
  font-family: "Inter", system-ui, -apple-system, sans-serif;
}

.rb-footer__top {
  padding: 64px 0;
}

.rb-footer__main {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr 0.9fr;
  gap: 56px;
}

.rb-footer__logo {
  width: 150px;
  height: auto;
  display: block;
  filter: brightness(0) invert(1);
}

.rb-footer__text {
  margin: 28px 0 0;
  color: rgba(238, 243, 249, 0.92);
  line-height: 1.5;
  font-size: 15px;
  max-width: 520px;
}

.rb-footer__social {
  margin-top: 32px;
  display: flex;
  gap: 20px;
}

.rb-footer__social-link {
  width: 56px;
  height: 56px;
  border: 2px solid rgba(255, 255, 255, 0.92);
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 10px;
  transition: transform 0.2s ease, background 0.2s ease;
}

.rb-footer__social-link:hover {
  background: rgba(255, 255, 255, 0.12);
  transform: translateY(-2px);
}

.rb-footer__title {
  margin: 0 0 18px;
  font-size: 20px;
  line-height: 1.2;
  font-weight: 600;
  color: #fff;
}

.rb-footer__nav {
  display: flex;
  flex-direction: column;
}

.rb-footer__link {
  display: block;
  font-size: 17px;
  line-height: 1.3;
  color: rgba(238, 243, 249, 0.95);
  margin: 0 0 12px;
  text-decoration: none;
  /* Убираем подчеркивание, если есть */
}

.rb-footer__link:hover {
  color: #fff;
}

.rb-footer__apps {
  display: flex;
  flex-direction: column;
  gap: 24px;
  justify-content: center;
}

.rb-store-badge {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: #fff;
  border-radius: 12px;
  padding: 10px 16px;
  min-width: 140px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  transition: all 0.3s ease;
  text-decoration: none;
}

.rb-store-badge:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.8);
  transform: translateY(-2px);
}

.rb-store-badge__top {
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  opacity: 0.8;
  margin-bottom: 4px;
}

img.rb-store-badge__name {
  max-width: 110px;
  height: auto;
  object-fit: contain;
  filter: brightness(0) invert(1);
}

.rb-footer__bottom {
  background: #172235;
  padding: 32px 0;
}

.rb-footer__bottom-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  /* Позволяет блокам переноситься, если не хватает места */
}

.rb-footer__copy {
  margin: 0;
  font-size: 15px;
  color: rgba(238, 243, 249, 0.7);
}

.rb-footer__payments {
  display: flex;
  align-items: center;
  gap: 16px;
}

.rb-footer__payments img {
  height: 24px;
  width: auto;
  object-fit: contain;
}

/* ========================================= */
/* АДАПТИВ ДЛЯ ПЛАНШЕТОВ */
/* ========================================= */
@media (max-width: 1200px) {
  .rb-footer__main {
    grid-template-columns: 1fr 1fr !important;
    /* Делаем 2 колонки */
    gap: 40px;
  }

  .rb-footer__apps {
    align-items: flex-start;
  }

  /* Аккуратные шрифты для планшета */
  .rb-footer__title {
    font-size: 18px;
  }

  .rb-footer__link {
    font-size: 16px;
  }

  .rb-footer__text {
    font-size: 14px;
  }

  .rb-footer__copy,
  .rb-pay,
  .rb-store-badge__name {
    font-size: 14px;
  }
}

/* ========================================= */
/* АДАПТИВ ДЛЯ МОБИЛЬНЫХ ТЕЛЕФОНОВ */
/* ========================================= */
@media (max-width: 760px) {
  .rb-footer {
    margin-top: 40px;
  }

  .rb-footer__top {
    padding: 40px 20px;
    /* Добавили боковые отступы, чтобы текст не прилипал к экрану */
  }

  .rb-footer__main {
    grid-template-columns: 1fr !important;
    /* В одну колонку */
    gap: 32px;
  }

  .rb-footer__logo {
    width: 140px;
    /* Немного уменьшили лого для мобильных */
  }

  .rb-footer__text {
    margin-top: 16px;
    font-size: 14px;
  }

  .rb-footer__social {
    gap: 12px;
  }

  .rb-footer__social-link {
    width: 44px;
    height: 44px;
  }

  .rb-footer__title {
    font-size: 18px;
    margin-bottom: 12px;
  }

  .rb-footer__link {
    margin-bottom: 10px;
    font-size: 15px;
  }

  .rb-store-badge {
    min-width: 200px;
    /* Кнопки скачивания не на всю ширину, а аккуратные */
    min-height: auto;
  }

  .rb-store-badge__top {
    font-size: 10px;
  }

  .rb-footer__bottom {
    padding: 24px 20px;
  }

  .rb-footer__bottom-inner {
    flex-direction: column;
    align-items: center;
    /* Центрируем копирайт и платежки на мобильных */
    text-align: center;
    gap: 16px;
  }

  .rb-footer__apps {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: row;
    justify-content: center;
    flex-wrap: wrap;
    /* ВАЖНО: разрешаем перенос на новую строку, если не влезают */
    gap: 10px;
    margin-top: 10px;
    width: 100%;
    padding: 0 10px;
    box-sizing: border-box;
    /* Чтобы padding не увеличивал ширину */
  }
}

/* --- ГЛОБАЛЬНАЯ БОКОВАЯ КОРЗИНА (из footer.ejs) --- */
#globalSideCartOverlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: 2000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

#globalSideCartOverlay.is-visible {
  opacity: 1;
  pointer-events: auto;
}

#globalSideCart {
  position: fixed;
  top: 0;
  right: -420px;
  width: 100%;
  max-width: 400px;
  height: 100vh;
  height: 100dvh;
  background: #fff;
  z-index: 2001;
  display: flex;
  flex-direction: column;
  transition: right 0.3s ease;
  box-shadow: -10px 0 30px rgba(0, 0, 0, 0.1);
}

#globalSideCart.is-open {
  right: 0;
}

#globalSideCart .side-cart__header {
  padding: 20px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

#globalSideCart .side-cart__close {
  background: transparent;
  border: none;
  font-size: 20px;
  cursor: pointer;
  color: var(--muted);
}

#globalSideCart .side-cart__body {
  flex-grow: 1;
  overflow-y: auto;
  padding: 20px;
}

#globalSideCart .side-cart__footer {
  padding: 20px;
  background: #fdfdfd;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.sc-item {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
}

.sc-item__img {
  width: 64px;
  height: 64px;
  object-fit: cover;
  border-radius: 8px;
}

.sc-item__info {
  flex-grow: 1;
}

.sc-item__name {
  font-weight: 600;
  font-size: 14px;
  margin: 0 0 4px;
}

.sc-item__price {
  font-size: 14px;
  color: var(--muted);
}

@media (max-width: 768px) {
  #globalSideCart {
    max-width: 85%;
    right: -100%;
  }

  #globalSideCart.is-open {
    right: 0;
  }
}