@import url("/css/footer.css");

:root {
  --brand: rgba(237, 28, 36, 1);
  --accent: #F39C12;
  --text: #2B2B2B;
  --muted: #6B6B6B;
  --card: #FFFFFF;
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  background: rgba(246, 245, 244, 1);
}

/* Отступ для всех страниц, КРОМЕ главной, чтобы контент не прятался под фиксированную шапку */
main:not(.page-home),
.page:not(.page-home),
.menuWrap,
.page-product,
.prodWrap {
  padding-top: 100px;
}

a {
  color: inherit;
  text-decoration: none;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Старый класс шапки (на всякий случай оставил, если где-то используется) */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 248, 242, .9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(0, 0, 0, .06);
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 0;
}

.brand {
  font-family: "Manrope", system-ui, sans-serif;
  font-weight: 800;
  letter-spacing: .2px;
}

.nav {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.nav__link {
  font-weight: 500;
  color: var(--text);
  padding: 8px 10px;
  border-radius: 12px;
}

.nav__link:hover {
  background: rgba(0, 0, 0, .04);
}

.nav__link--pill {
  border: 1px solid rgba(0, 0, 0, .12);
}

.header__actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 20px;
  border-radius: 14px;
  font-family: "Manrope", system-ui, sans-serif;
  font-weight: 600;
  font-size: 16px;
  border: 1px solid transparent;
  cursor: pointer;
}

.btn--primary {
  background: var(--brand);
  color: #fff;
}

.btn--primary:hover {
  background: var(--accent);
}

.btn--outline {
  background: transparent;
  border-color: var(--brand);
  color: var(--text);
}

.btn--small {
  padding: 10px 16px;
  font-size: 14px;
}

.btn--pill {
  background: #fff;
  color: var(--brand);
  border: 1px solid var(--brand);
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 14px;
}

/* Page titles */
.page-title {
  font-family: "Manrope", system-ui, sans-serif;
  font-weight: 800;
  font-size: 32px;
  line-height: 40px;
  margin: 24px 0 16px;
}

.muted {
  color: var(--muted);
}

/* --- СЛАЙДЕР НА ГЛАВНОЙ --- */
.hero-slider-section {
  position: relative;
  width: 100%;
  height: 100vh;
  /* Возвращаем на всю высоту экрана! */
  min-height: 600px;
  display: flex;
  align-items: center;
  overflow: hidden;
  margin-top: -100px;
  padding-top: 100px;
}

.hero-slider {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

.slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 1.5s ease-in-out;
}

.slide.active {
  opacity: 1;
}

.slide::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0.2) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  color: #fff;
  width: 100%;
  text-align: center;
  /* Центрируем текст по горизонтали для красоты */
}

.hero-title {
  font-size: 64px;
  font-family: var(--font-heading, 'Philosopher', sans-serif);
  line-height: 1.1;
  margin: 0 auto 30px;
  text-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
}

.hero-title .text-brand {
  color: #E30613;
}

.hero-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  /* Центрируем кнопки */
}

/* Адаптация под телефоны */
@media (max-width: 768px) {
  .hero-slider-section {
    height: 100vh;
    /* На мобилках тоже на весь экран */
  }

  .hero-title {
    font-size: 42px;
  }

  .slide::after {
    background: rgba(0, 0, 0, 0.5);
  }
}

/* Sections */
.section {
  padding: 56px 0;
}

.section__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}

.section__title {
  font-family: "Manrope", system-ui, sans-serif;
  font-weight: 700;
  font-size: 32px;
  line-height: 40px;
  margin: 0;
}

.section__title--center {
  text-align: center;
  margin-bottom: 28px;
}

.section__cta {
  margin-top: 22px;
  text-align: center;
}

/* Cards */
.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

.card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 18px;
  border: 1px solid rgba(0, 0, 0, .06);
}

.card__img {
  width: 140px;
  height: 140px;
  object-fit: cover;
  border-radius: 999px;
  display: block;
  margin: 0 auto 14px;
  background: rgba(0, 0, 0, .03);
}

.card__title {
  font-family: "Manrope", system-ui, sans-serif;
  font-weight: 600;
  font-size: 18px;
  line-height: 24px;
  margin: 0 0 10px;
  text-align: center;
}

.card__bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.card__price {
  font-weight: 600;
  color: var(--text);
}

/* Delivery block */
.delivery-block {
  background: #F6C6C6;
  padding: 34px 0;
}

.delivery-block__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.delivery-block__icon {
  width: 86px;
  height: 86px;
}

/* Steps */
.steps {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.step {
  flex: 1 1 180px;
  text-align: center;
  padding: 12px;
}

.step__icon {
  font-size: 40px;
  margin-bottom: 8px;
}

.step__text {
  color: var(--text);
}

/* Worktime */
.worktime {
  padding: 44px 24px;
  text-align: center;
  font-family: "Manrope", system-ui, sans-serif;
  font-weight: 800;
  letter-spacing: .3px;
}

/* Forms */
.auth {
  padding-bottom: 56px;
}

.form {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 520px;
}

.form--inline {
  flex-direction: row;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  max-width: none;
}

.label {
  font-size: 14px;
  font-weight: 600;
}

.input {
  padding: 12px 14px;
  border: 1px solid rgba(0, 0, 0, .12);
  border-radius: 14px;
  background: #fff;
  font: inherit;
}

.input:focus {
  outline: 2px solid rgba(198, 90, 30, .25);
  border-color: rgba(198, 90, 30, .35);
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.alert {
  padding: 12px 14px;
  border-radius: 14px;
  margin-bottom: 12px;
}

.alert--error {
  background: rgba(231, 76, 60, .10);
  border: 1px solid rgba(231, 76, 60, .25);
}

/* =========================================
   ===== НОВАЯ ФИКСИРОВАННАЯ ШАПКА =====
   ========================================= */

/* 1. БАЗОВАЯ ШАПКА (Для Меню, Корзины, Админки) */
.topbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background-color: #fff;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
  padding: 10px 0;
  transition: all 0.3s ease;
}

.topbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.topbar__logo {
  height: 36px;
  width: auto;
  display: block;
  transition: filter 0.3s ease;
}

.topbar__nav {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  font-family: "Manrope", sans-serif;
}

.topbar__link {
  font-weight: 600;
  font-size: 12px;
  letter-spacing: .4px;
  color: #2B2B2B;
  padding: 8px 10px;
  border-radius: 12px;
  transition: 0.3s ease;
}

.topbar__link:hover {
  background: rgba(0, 0, 0, 0.04);
}

.topbar__link--admin {
  border: 1px solid rgba(0, 0, 0, .12);
}

.addrBtn {
  display: flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  border: none;
  font-family: "Manrope", sans-serif;
  font-weight: 600;
  font-size: 12px;
  cursor: pointer;
  padding: 8px 10px;
  border-radius: 12px;
  color: #2B2B2B;
  transition: 0.3s ease;
}

.addrBtn:hover {
  background: rgba(0, 0, 0, 0.04);
}

.pin {
  width: 16px;
  height: 16px;
  display: inline-block;
  background: var(--brand);
  border-radius: 50%;
}

/* 2. ПРОЗРАЧНАЯ ШАПКА (ТОЛЬКО ДЛЯ ГЛАВНОЙ СТРАНИЦЫ НА ВЕРХУ) */
.topbar--transparent {
  background-color: transparent;
  box-shadow: none;
  padding: 24px 0;
}

.topbar--transparent .topbar__logo {
  filter: brightness(0) invert(1);
}

.topbar--transparent .topbar__link,
.topbar--transparent .addrBtn {
  color: #fff;
}

.topbar--transparent .topbar__link:hover,
.topbar--transparent .addrBtn:hover {
  background: rgba(255, 255, 255, 0.15);
}

/* 3. КОГДА ПРОЗРАЧНУЮ ШАПКУ ПРОСКРОЛЛИЛИ ВНИЗ */
.topbar--transparent.is-scrolled {
  background-color: #fff;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
  padding: 10px 0;
}

.topbar--transparent.is-scrolled .topbar__logo {
  filter: none;
}

.topbar--transparent.is-scrolled .topbar__link,
.topbar--transparent.is-scrolled .addrBtn {
  color: #2B2B2B;
}

.topbar--transparent.is-scrolled .topbar__link:hover,
.topbar--transparent.is-scrolled .addrBtn:hover {
  background: rgba(0, 0, 0, 0.04);
}

/* фото-блоки в hero (старый код, оставляем если где-то используется) */
.heroShot {
  position: absolute;
  z-index: 2;
  border-radius: 14px;
}

.heroShot img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.heroShot--1 {
  top: 12px;
  left: 92px;
  width: 260px;
  height: 140px;
}

.heroShot--2 {
  top: 120px;
  right: 18px;
  width: 250px;
  height: 140px;
}

.heroShot--3 {
  bottom: -14px;
  left: 10px;
  width: 310px;
  height: 160px;
}

/* ===== Modal ===== */
.modal {
  display: none;
}

.modal.is-open {
  display: block;
  position: fixed;
  inset: 0;
  z-index: 2000;
  /* БЫЛО 200. Ставим 2000, чтобы 100% перекрыть шапку */
}

.modal__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, .45);
}

.modal__panel {
  position: relative;
  width: min(560px, calc(100% - 24px));
  margin: 40px auto;
  max-height: 90vh;
  /* Ограничиваем высоту экрана */
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, .25);
  overflow: hidden;
  /* Скрываем то, что вылезает за скругленные углы */
  font-family: "Inter", sans-serif;
}

.modal__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px;
  border-bottom: 1px solid rgba(0, 0, 0, .06);
}

.modal__title {
  font-family: "Manrope", sans-serif;
  font-weight: 800;
  font-size: 18px;
}

.modal__close {
  border: none;
  background: transparent;
  font-size: 20px;
  cursor: pointer;
  color: #666;
  padding: 5px;
}

.modal__body {
  padding: 20px 18px;
  overflow-y: auto;
  /* Добавляем скролл внутри формы, если экран телефона маленький */
}

.modal__actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 24px;
}

/* Новая сетка на 3 колонки для Этажа/Подъезда/Домофона */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

/* Адаптив для маленьких экранов: перестраиваем 3 колонки в 1 */
@media (max-width: 480px) {
  .grid-3 {
    grid-template-columns: 1fr;
  }
}

.toggle {
  display: flex;
  gap: 10px;
  margin: 12px 0;
}

.toggle__btn {
  flex: 1;
  border: 1px solid rgba(0, 0, 0, .12);
  background: #fff;
  padding: 10px 12px;
  border-radius: 12px;
  font-family: "Manrope", sans-serif;
  font-weight: 700;
  cursor: pointer;
}

.toggle__btn.is-active {
  border-color: var(--red);
  color: var(--red);
}

.addrList {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 40vh;
  /* Ограничиваем высоту списка (40% от высоты экрана) */
  overflow-y: auto;
  /* Добавляем вертикальную прокрутку */
  padding-right: 8px;
  /* Даем место для ползунка скролла */
}

/* Красивый фирменный ползунок скролла для списка */
.addrList::-webkit-scrollbar {
  width: 6px;
}

.addrList::-webkit-scrollbar-thumb {
  background: rgba(227, 6, 19, 0.4);
  /* Полупрозрачный красный в стиле бренда */
  border-radius: 10px;
}

.addrList::-webkit-scrollbar-track {
  background: transparent;
}

.addrItem {
  text-align: left;
  border: 1px solid rgba(0, 0, 0, .12);
  background: #fff;
  padding: 12px 12px;
  border-radius: 12px;
  cursor: pointer;
  font-family: "Inter", sans-serif;
}

.addrItem.is-selected {
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(229, 21, 21, .12);
}


/* Tables (admin) */
.table {
  margin-top: 14px;
  border: 1px solid rgba(0, 0, 0, .08);
  border-radius: 14px;
  overflow: hidden;
  background: #fff;
}

.table__row {
  display: grid;
  grid-template-columns: 80px 1.4fr 1fr 120px 120px 1.8fr;
  gap: 10px;
  padding: 12px 14px;
  border-bottom: 1px solid rgba(0, 0, 0, .06);
  align-items: center;
}

.table__head {
  background: rgba(0, 0, 0, .03);
  font-weight: 700;
}

.table__row:last-child {
  border-bottom: none;
}

.admin-nav {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-top: 18px;
}

.stat {
  background: #fff;
  border: 1px solid rgba(0, 0, 0, .06);
  border-radius: 14px;
  padding: 14px;
}

.stat__n {
  font-family: "Manrope";
  font-weight: 800;
  font-size: 28px;
}

.table--products .table__row {
  grid-template-columns: 70px 90px 1.3fr 1fr 120px 260px;
  align-items: start;
}

.thumb {
  width: 70px;
  height: 70px;
  object-fit: cover;
  border-radius: 12px;
  border: 1px solid rgba(0, 0, 0, .08);
  background: #fff;
}

.inlineForm {
  display: grid;
  grid-template-columns: 1.4fr 1fr 120px 1fr auto;
  gap: 10px;
  align-items: center;
}

.input--sm {
  padding: 10px 12px;
  border-radius: 12px;
}

.btn-on {
  background: #fff;
  border: 1px solid rgba(0, 0, 0, .12);
  color: #0f9d58;
}

.btn-off {
  background: #fff;
  border: 1px solid rgba(0, 0, 0, .12);
  color: #CC0F0F;
}



/* =========================================
   АНИМАЦИЯ: БЛОК ДОСТАВКИ
   ========================================= */
#deliverySection {
  overflow: hidden;
  /* Чтобы курьер не создавал гориз. прокрутку, пока он за экраном */
}

/* Исходное состояние: текст прозрачный, курьер далеко слева за экраном */
#deliveryText {
  opacity: 0;
  transform: translateX(-50px);
  transition: all 1s ease 0.6s;
  /* Текст появится с задержкой 0.6с (пока едет курьер) */
}

#deliveryScooter {
  transform: translateX(-150vw);
  transition: transform 1.5s cubic-bezier(0.25, 1, 0.5, 1);
  /* Плавный выезд */
}

/* Состояние, когда блок попал в зону видимости (добавляется через JS) */
#deliverySection.is-animated #deliveryText {
  opacity: 1;
  transform: translateX(0);
}

#deliverySection.is-animated #deliveryScooter {
  transform: translateX(0);
}

/* =========================================
   АНИМАЦИЯ: ВЕРТИКАЛЬНЫЕ ШАГИ (SCROLL-LINKED)
   ========================================= */
.route-wrapper {
  position: relative;
  width: 100%;
  max-width: 600px;
  height: 600px;
  margin: 20px auto 0;
}

.route-svg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

/* Стили самих блоков с иконками */
.route-step {
  position: absolute;
  z-index: 2;
  text-align: center;
  width: 120px;
  /* Изначально скрыты и чуть смещены вверх для красивого появления */
  transform: translate(-50%, -40%) scale(0.9);
  opacity: 0;
  /* Оставляем легкий transition только для появления иконок */
  transition: opacity 0.3s ease, transform 0.3s ease;
  background: transparent;
}

/* Класс, который JS будет добавлять для показа шага */
.route-step.is-visible {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.route-step__icon img {
  width: 60px;
  /* Размер картинок */
  height: auto;
  margin-bottom: 10px;
  display: block;
  margin-left: auto;
  margin-right: auto;
}

.route-step__text {
  font-size: 14px;
  line-height: 1.3;
  font-weight: 500;
}

/* Координаты шагов */
.step-1 {
  top: 13.3%;
  left: 30%;
}

.step-2 {
  top: 38.3%;
  left: 70%;
}

.step-3 {
  top: 63.3%;
  left: 30%;
}

.step-4 {
  top: 88.3%;
  left: 70%;
}

@media (max-width: 480px) {
  .route-wrapper {
    transform: scale(0.9);
    transform-origin: top center;
  }
}

/* =========================================
   МОБИЛЬНОЕ НИЖНЕЕ МЕНЮ (BOTTOM NAV)
   ========================================= */
.mobile-bottom-nav {
  display: none;
}

@media (max-width: 768px) {
  .mobile-bottom-nav {
    display: flex !important;
    justify-content: space-around;
    align-items: center;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 60px;
    background-color: #ffffff;
    border-top: 1px solid #e0e0e0;
    z-index: 1000;
    padding-bottom: env(safe-area-inset-bottom);
  }

  body {
    padding-bottom: 70px;
  }

  #floatingCartBtn {
    display: none !important;
  }
}

.mobile-nav__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  color: #8c8c8c;
  flex: 1;
  height: 100%;
  transition: color 0.2s ease;
  -webkit-tap-highlight-color: transparent;
}

.mobile-nav__icon {
  position: relative;
  width: 24px;
  height: 24px;
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mobile-nav__icon svg {
  width: 100%;
  height: 100%;
  stroke: currentColor;
}

.mobile-nav__text {
  font-size: 11px;
  font-weight: 500;
  font-family: 'Montserrat', sans-serif;
}

.mobile-nav__item.is-active {
  color: #8A4F9E;
  /* Фиолетовый цвет как на твоем скриншоте. Можешь заменить на #E30613, если хочешь красный */
}

.mobile-nav__badge {
  position: absolute;
  top: -6px;
  right: -10px;
  background-color: #1a1a1a;
  color: #ffffff;
  font-size: 10px;
  font-weight: 700;
  border-radius: 50%;
  width: 16px;
  height: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #fff;
}

/* =========================================
   АДАПТИВ ШАПКИ И БУРГЕР-МЕНЮ
   ========================================= */

/* 1. Изначально (на ПК) скрываем бургер и мобильное меню */
.burger-btn {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 26px;
  height: 18px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  z-index: 1010;
}

.burger-btn span {
  display: block;
  width: 100%;
  height: 2px;
  background-color: #2B2B2B;
  border-radius: 2px;
  transition: all 0.3s ease;
}

/* Цвет бургера на прозрачной шапке главной страницы */
.topbar--transparent .burger-btn span {
  background-color: #ffffff;
}

.topbar--transparent.is-scrolled .burger-btn span {
  background-color: #2B2B2B;
}

.mobile-side-menu,
.mobile-menu-overlay {
  display: none;
}

/* ========================================= */
/* СТИЛИ ИИ-ЧАТА (OPENROUTER)                */
/* ========================================= */
.ai-chat-wrapper {
  position: fixed;
  bottom: 30px;
  right: 30px;
  z-index: 1000;
  font-family: 'Inter', sans-serif;
}

.chat-toggle-btn {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: #E30613;
  color: white;
  font-size: 24px;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(227, 6, 19, 0.4);
  transition: transform 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.chat-toggle-btn:hover {
  transform: scale(1.1);
}

.chat-window {
  width: 350px;
  height: 500px;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
  display: flex;
  flex-direction: column;
  position: absolute;
  bottom: 80px;
  right: 0;
  overflow: hidden;
  transition: opacity 0.3s;
}

.chat-window.hidden {
  display: none;
}

.chat-header {
  background: #E30613;
  color: #fff;
  padding: 15px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.chat-header h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
}

.chat-header button {
  background: none;
  border: none;
  color: white;
  font-size: 28px;
  cursor: pointer;
  line-height: 1;
}

.chat-messages {
  flex: 1;
  padding: 15px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: #f9f9f9;
}

.message {
  padding: 10px 14px;
  border-radius: 12px;
  max-width: 85%;
  font-size: 14px;
  line-height: 1.4;
}

.ai-message {
  background: #e2e8f0;
  color: #333;
  align-self: flex-start;
  border-bottom-left-radius: 2px;
}

.user-message {
  background: #E30613;
  color: white;
  align-self: flex-end;
  border-bottom-right-radius: 2px;
}

.chat-input-area {
  padding: 15px;
  background: #fff;
  border-top: 1px solid #eee;
  display: flex;
  gap: 10px;
}

.chat-input-area input {
  flex: 1;
  padding: 10px 15px;
  border: 1px solid #ddd;
  border-radius: 20px;
  outline: none;
  font-family: 'Inter', sans-serif;
}

.chat-input-area button {
  background: #E30613;
  color: white;
  border: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

@media (max-width: 768px) {
  .ai-chat-wrapper {
    bottom: calc(70px + env(safe-area-inset-bottom, 0px));
    right: 16px;
    z-index: 1001;
  }

  .chat-window {
    width: calc(100vw - 32px);
    max-width: 350px;
    height: min(500px, calc(100vh - 200px - env(safe-area-inset-bottom, 0px)));
    bottom: 72px;
  }
}

/* Ссылки от ИИ */
.ai-message a {
  color: #E30613;
  font-weight: 600;
  text-decoration: underline;
}

.ai-message a:hover {
  color: #b5050f;
}

/* Кнопка "Добавить в корзину" от ИИ */
.chat-cart-btn {
  background-color: #E30613;
  color: white;
  border: none;
  border-radius: 6px;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 600;
  margin-top: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-block;
  font-family: 'Inter', sans-serif;
  width: 100%;
}

.chat-cart-btn:hover {
  background-color: #c30510;
  transform: translateY(-1px);
}

/* 2. ПРАВИЛА ДЛЯ ТЕЛЕФОНОВ (экраны 768px и меньше) */
@media (max-width: 768px) {

  /* Прячем длинное меню ссылок */
  .desktop-nav {
    display: none !important;
  }

  /* Показываем бургер */
  .burger-btn {
    display: flex;
  }

  /* Прячем слово "Выберите адрес", оставляем только пин-иконку, чтобы сэкономить место */
  .addr-text-mobile-hide {
    display: none;
  }

  /* Затемнение фона */
  .mobile-menu-overlay {
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(0, 0, 0, 0.6);
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
  }

  .mobile-menu-overlay.is-visible {
    opacity: 1;
    visibility: visible;
  }

  /* Белая панель справа */
  .mobile-side-menu {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    right: -100%;
    /* Спрятано за экраном */
    width: 85%;
    max-width: 320px;
    height: 100vh;
    background: #ffffff;
    z-index: 2010;
    box-shadow: -10px 0 25px rgba(0, 0, 0, 0.15);
    transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 24px;
  }

  .mobile-side-menu.is-open {
    right: 0;
  }

  /* Внутренности выезжающего меню */
  .mobile-side-menu__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
  }

  .close-menu-btn {
    background: none;
    border: none;
    font-size: 28px;
    color: #666;
    cursor: pointer;
    line-height: 1;
  }

  .mobile-side-menu__nav {
    display: flex;
    flex-direction: column;
    gap: 24px;
    flex-grow: 1;
  }

  .mobile-side-menu__link {
    font-family: 'Manrope', sans-serif;
    font-size: 18px;
    font-weight: 600;
    color: #2B2B2B;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 12px;
  }

  .mobile-side-menu__footer {
    border-top: 1px solid #eee;
    padding-top: 20px;
    margin-bottom: env(safe-area-inset-bottom);
  }
}

/* =========================================
   ОБЩИЙ АДАПТИВ ГЛАВНОЙ СТРАНИЦЫ
   ========================================= */

@media (max-width: 768px) {

  /* 1. Уменьшаем глобальные переменные и отступы */
  :root {
    --radius: 12px;
    /* Меньше скругление на мобилках */
  }

  .container {
    padding: 0 16px;
    /* Сужаем боковые поля */
  }

  .section {
    padding: 32px 0;
    /* Уменьшаем вертикальные отступы между секциями */
  }

  /* 2. Шрифты и заголовки */
  .section__title {
    font-size: 24px;
    /* Было 32px */
    line-height: 1.2;
  }

  .section__title--center {
    margin-bottom: 20px;
  }

  /* 3. Карточки товаров на главной */
  .cards {
    grid-template-columns: 1fr;
    gap: 16px;
    justify-items: center;
  }

  .card {
    width: 100%;
    max-width: 400px;
    padding: 12px;
    display: flex;
    align-items: center;
    gap: 15px;
    margin: 0 auto;
  }

  .card__img {
    width: 80px;
    /* Сильно уменьшаем картинку */
    height: 80px;
    margin: 0;
    /* Убираем центрирование */
  }

  .card__body {
    flex: 1;
  }

  .card__title {
    text-align: left;
    font-size: 16px;
    margin-bottom: 5px;
  }

  .card__bottom {
    justify-content: space-between;
  }

  /* 4. Блок доставки (красная полоса) */
  .delivery-block {
    padding: 24px 0;
  }

  .delivery-block__inner {
    flex-direction: column;
    /* Иконка и текст друг под другом */
    text-align: center;
    gap: 12px;
  }

  .delivery-block__text .section__title {
    font-size: 20px;
  }

  .delivery-block__icon {
    width: 60px;
    height: 60px;
  }

  /* 5. Блок "Как сделать заказ" (если не используется S-кривая) */
  .steps {
    display: grid;
    grid-template-columns: 1fr 1fr;
    /* По два в ряд */
    gap: 10px;
  }

  .step {
    padding: 8px;
    flex: none;
  }

  .step__icon {
    font-size: 28px;
  }

  .step__text {
    font-size: 13px;
  }
}

/* =========================================
   ИСПРАВЛЕНИЕ ЗАГОЛОВКОВ НА ГЛАВНОЙ
   ========================================= */
@media (max-width: 768px) {
  .section__head {
    justify-content: center;
    /* Ставит заголовок "Новинки" по центру экрана */
    text-align: center;
    padding: 0 10px;
    /* На всякий случай даем безопасные отступы по бокам */
  }
}

/* =========================================
   АДАПТИВ ФУТЕРА (Улучшенная версия)
   ========================================= */
@media (max-width: 768px) {
  .rb-footer__top {
    padding: 40px 0 20px;
  }

  /* Используем Grid, чтобы разбить меню на 2 колонки */
  .rb-footer__main {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px 15px;
    text-align: left;
    /* Выравниваем списки по левому краю для читаемости */
  }

  /* Логотип, описание и соцсети растягиваем на всю ширину и центрируем */

  .rb-footer__brand {
    grid-column: 1 / -1;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .rb-footer__logo {
    max-width: 160px;
    /* Сужаем саму картинку логотипа */
    height: auto;
    margin-bottom: 10px;
  }

  .rb-footer__text {
    font-size: 11px;
    /* Делаем текст мельче */
    line-height: 1.3;
    padding: 0 15px;
    /* Защита от прилипания к краям экрана */
  }

  .rb-footer__social {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-top: 15px;
  }

  /* Ссылки в двух колонках */
  .rb-footer__nav {
    display: flex;
    flex-direction: column;
    gap: 12px;
  }

  .rb-footer__title {
    font-size: 16px;
    margin-bottom: 8px;
    text-transform: uppercase;
    font-weight: 700;
    opacity: 0.6;
    /* Делаем заголовки колонок чуть приглушенными */
  }

  .rb-footer__link {
    font-size: 14px;
    line-height: 1.4;
  }

  /* Кнопки Google Play и App Store */
  .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 не увеличивал ширину */
  }

  .rb-store-badge {
    flex: 1 1 130px;
    /* Гибкая ширина, но не меньше 130px */
    max-width: 150px;
    /* Ограничиваем максимальную ширину */
    padding: 8px 10px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow: hidden;
    /* Защита от вылезания текста */
  }

  /* Самый низ футера (копирайт и карты) */
  .rb-footer__bottom-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    padding: 24px 0 30px;
    /* Отступ снизу, чтобы не перекрывалось нижним мобильным меню */
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    /* Изящная полупрозрачная линия-разделитель */
    text-align: center;
  }

  .rb-footer__copy {
    font-size: 12px;
    /* Уменьшили текст (c) 2026 */
    color: #999;
    /* Сделали его чуть менее ярким */
  }

  .rb-footer__payments {
    display: flex;
    justify-content: center;
    gap: 14px;
    /* Карты стоят ближе друг к другу */
    font-size: 14px;
    /* Уменьшили размер самих названий карт */
    font-weight: 700;
  }
}

/* =========================================
   АДАПТИВ ДЛЯ ПЛАНШЕТОВ (до 1024px)
   ========================================= */
@media (max-width: 1024px) {

  /* 1. Шапка: Прячем ссылки, показываем бургер */
  .desktop-nav {
    display: none !important;
  }

  .burger-btn {
    display: flex;
  }

  .addr-text-mobile-hide {
    display: none;
  }

  /* 2. БОКОВОЕ ВЫЕЗЖАЮЩЕЕ МЕНЮ (Теперь работает и на планшетах, и на телефонах) */
  .mobile-menu-overlay {
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(0, 0, 0, 0.6);
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
  }

  .mobile-menu-overlay.is-visible {
    opacity: 1;
    visibility: visible;
  }

  .mobile-side-menu {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    right: -100%;
    width: 85%;
    max-width: 320px;
    height: 100vh;
    background: #ffffff;
    z-index: 2010;
    box-shadow: -10px 0 25px rgba(0, 0, 0, 0.15);
    transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 24px;
  }

  .mobile-side-menu.is-open {
    right: 0;
  }

  .mobile-side-menu__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
  }

  .close-menu-btn {
    background: none;
    border: none;
    font-size: 28px;
    color: #666;
    cursor: pointer;
    line-height: 1;
  }

  .mobile-side-menu__nav {
    display: flex;
    flex-direction: column;
    gap: 24px;
    flex-grow: 1;
  }

  .mobile-side-menu__link {
    font-family: 'Manrope', sans-serif;
    font-size: 18px;
    font-weight: 600;
    color: #2B2B2B;
    display: flex;
    align-items: center;
    gap: 12px;
  }

  .mobile-side-menu__footer {
    border-top: 1px solid #eee;
    padding-top: 20px;
    margin-bottom: env(safe-area-inset-bottom);
  }

  /* 3. Центрируем заголовки */
  .section__head {
    justify-content: center;
    text-align: center;
  }

  /* 4. Шаги */
  .steps {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
  }

  /* 5. ФУТЕР ДЛЯ ПЛАНШЕТА */
  .rb-footer__top {
    padding: 50px 0 30px;
  }

  .rb-footer__main {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px 20px;
    text-align: left;
  }

  .rb-footer__brand {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .rb-footer__logo {
    max-width: 200px;
    height: auto;
    margin-bottom: 15px;
  }

  .rb-footer__text {
    font-size: 13px;
    line-height: 1.4;
    max-width: 500px;
  }

  .rb-footer__social {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 20px;
  }

  .rb-footer__nav {
    display: flex;
    flex-direction: column;
    gap: 14px;
  }

  .rb-footer__title {
    font-size: 18px;
    margin-bottom: 10px;
    text-transform: uppercase;
    font-weight: 700;
    opacity: 0.6;
  }

  .rb-footer__link {
    font-size: 15px;
  }

  .rb-footer__apps {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: row;
    justify-content: center;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 20px;
    width: 100%;
  }

  .rb-store-badge {
    flex: 1 1 150px;
    max-width: 180px;
    padding: 10px 14px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }

  .rb-store-badge__top {
    font-size: 10px;
    white-space: nowrap;
  }

  .rb-store-badge__name {
    font-size: 15px;
    white-space: nowrap;
  }

  .rb-footer__bottom-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    padding: 24px 0 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
  }

  .rb-footer__copy {
    font-size: 14px;
    color: #999;
  }

  .rb-footer__payments {
    display: flex;
    justify-content: center;
    gap: 20px;
    font-size: 16px;
    font-weight: 700;
  }

  /* Админка на планшетах */
  .stats {
    grid-template-columns: 1fr;
  }

  .grid-2 {
    grid-template-columns: 1fr;
  }

  .table__row {
    grid-template-columns: 70px 1fr;
  }
}

@media (min-width: 769px) and (max-width: 1024px) {
  .cards {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }
}

/* =========================================
   ИКОНКИ СОЦСЕТЕЙ В ФУТЕРЕ
   ========================================= */

/* Стили для самой ссылки (делаем красивый кружочек) */
.rb-footer__social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  /* Общий размер кружка */
  height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.5);
  /* Полупрозрачная белая обводка */
  border-radius: 50%;
  /* Скругляем до идеального круга */
  transition: all 0.3s ease;
  text-decoration: none;
}

/* Эффект при наведении курсора */
.rb-footer__social-link:hover {
  border-color: #ffffff;
  background-color: rgba(255, 255, 255, 0.1);
  /* Легкая подсветка фона */
  transform: translateY(-2px);
  /* Легкое "подпрыгивание" при наведении */
}

/* Стили для картинки внутри ссылки (ограничиваем размер) */
.rb-footer__social-link img {
  width: 24px;
  /* Размер самой иконки ВК внутри кружка */
  height: 24px;
  object-fit: contain;
  /* Защита от сплющивания или растягивания */
  display: block;
}



html,
body {
  overflow-x: hidden;
}