
 
.main-wrapper {
  max-width: 1300px; /* не растягиваемся на больших экранах */
  width: 100%; /* адаптивно */
  margin: 0 auto; /* центрируем */
  padding: 20px 15px; /* отступы сверху/снизу и по бокам */
}
/* Градиент фона первого экрана на всю ширину */
body {
  margin: 0;
  padding-top: 70px;
  background-color: #ffffff;
  overflow-x: hidden; /* убираем горизонтальный скролл */
  overflow-y: auto; /* вертикальный скролл работает по умолчанию */
  font-display: swap;
}

#hero-section {
  width: 100%;
  background: linear-gradient(to bottom, #aaffaa, #ffffff);
}

.modal {
  pointer-events: auto;
  z-index: 1050; /* Делаем модалку самой верхней */
}
modal-body {
  border-radius: 20px !important;
}
.modal-backdrop {
  z-index: 1040; /* Делаем фон модалки выше любого контента, но ниже окна */
}
.modal-body.text-center {
  text-align: center; /* центрируем контент по горизонтали */
  padding: 1rem;
  overflow: auto; /* если фото большое — появляется прокрутка */
  max-height: 90vh; /* ограничение по высоте окна */
}
.text-center .mb-1 span,
.text-center span[style*="font-weight"],
span[style*="057718"] {
  font-weight: normal !important;
  font-weight: 400 !important;
}
/* Большое фото */

/* Миниатюры */
.modal-body.text-center .thumbnails {
  display: flex;
  justify-content: center; /* центрируем миниатюры */
  flex-wrap: wrap; /* если их много, переход на новую строку */
}

img {
  /* Позволяет браузеру заранее зарезервировать место под фото */
  aspect-ratio: attr(width) / attr(height); 
  height: auto;
  max-width: 100%;
  /* Пока картинка грузится, показываем серый фон */
  background: transparent; 
}
#products-container, .product-grid {
  min-height: 80vh; 
  display: grid;
  align-content: start;
}
.product-card .img-wrapper {
  aspect-ratio: 1 / 1; /* Если фото квадратные */
  background: #f8f8f8;
  overflow: hidden;
}
/* Обертка строки: фиксирует положение под навбаром, фон прозрачный */
.running-line-wrapper {
  background-color: transparent;
  padding: 5px 0;
  position: fixed;
  top: 60px;
  left: 0;
  right: 0;
  z-index: 1020;
  overflow: hidden;
  white-space: nowrap;
}

.marquee-content {
  display: inline-block;
  position: relative;
  white-space: nowrap;
  /* Увеличено с 25s до 50s для уменьшения скорости */
  animation: marquee 50s linear infinite;
}

.marquee-content span {
  color: #333;
  font-weight: bold;
  text-transform: uppercase;
}

@keyframes marquee {
  0% {
    transform: translateX(100vw);
  }
  100% {
    transform: translateX(calc(-100% - 100vw));
  }
}

/* 1. Кнопка в админке — желтый ! */


 /* Отступ для заголовка, чтобы он не залез под фиксированное меню */
.product-header {
    margin-top: 90px; /* Высота вашего меню + небольшой запас */
    padding: 20px 15px;
    text-align: center;
    background: #f8f9fa; /* Легкий фон, чтобы выделить заголовок */
    border-radius: 8px;
    margin-bottom: 20px;
}

.main-product-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: #212529;
    margin-bottom: 5px;
}

.product-subtitle {
    color: #6c757d;
    font-size: 1rem;
}


.second-screen {
  background: #ffffff;
  position: relative;
  /* ИСПРАВЛЕНИЕ: Сбрасываем z-index, чтобы модалка была сверху */
  z-index: auto;
  margin-top: 0;
  margin-bottom: 0;
  padding: 10px 0;
}
.second-screen::before {
  content: "";
  position: absolute;
  top: -250px; /* Высота градиента */
  left: 0;
  width: 100%;
  height: 250px;
  /* Градиент от прозрачного к белому цвету второй секции */
  background: linear-gradient(to bottom, transparent, #ffffff);
  pointer-events: none;
}

.content-wrapper {
  position: relative;
  /* ИСПРАВЛЕНИЕ: Сбрасываем z-index, чтобы модалка была сверху */
  z-index: auto;
  min-height: 100vh; /* Растягивает блок на всю высоту экрана */
  display: flex;
  flex-direction: column;
  justify-content: flex-start; /* Контент прижат к верху */
}
/* levitate-section */
/* Категории */
.categories-wrapper {
  margin-top: 50px;
  margin-bottom: 40px;
}
/* Fancybox (галерея внутри модалки) */
/* Галерея поверх модалки */
.fancybox__container {
  z-index: 2000;
  padding-top: 50px;
  padding-bottom: 50px;
  box-sizing: border-box; /* важно для отступов */
}

/* Контент галереи */
.fancybox__content {
  /* Убираем transition на transform, чтобы он не мешал animation */
  transition: opacity 0.3s ease; /* или transition: none, если нужна только анимация */
  /* Оставляем анимацию, но можно сделать её короче и плавнее */
  animation: f-zoomInUp 0.4s ease-out;
  /* Остальные стили — без изменений */
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 20px !important;
  border-radius: 12px !important;
}

.fancybox__image {
  max-height: 90vh;
  object-fit: contain;
  border-radius: 15px;
  border-radius: 10px !important;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3) !important;
}

.fancybox__container {
  padding-top: 50px !important;
  padding-left: 20px !important;
  padding-right: 20px !important;
  z-index: 2000 !important;
}


/* Шрифты и заголовки */
#temp {
  font-family: "Comfortaa", sans-serif !important;
}
h1, .main-title {
  /* Центрирование */
  text-align: center !important;
  display: block !important;
  width: 100%;

  /* Отступ сверху, чтобы вылезти из-под навбара */
  margin-top: 40px !important; 
  margin-bottom: 20px !important;

  /* Твои стили оформления */
  color: rgb(0, 248, 8);
  font-family: Cambria, Cochin, Georgia, Times, "Times New Roman", serif;
  text-shadow: 0 5px 10px rgba(0, 0, 0, 0.3);
  line-height: 1.3;
  font-weight: 500;
  
  /* Адаптивный размер шрифта */
  font-size: clamp(1.1rem, 2vw, 1.8rem) !important;
}
@media (max-width: 767px) {
  h1, .main-title {
    color: #FFD700 !important;        /* Чистый жёлтый для мобильных */
    text-shadow: 0 3px 6px rgba(0, 0, 0, 0.5); /* Сильнее тень */
    margin-top: 30px !important;      /* Меньше отступ сверху */
    font-size: clamp(1.2rem, 5vw, 1.6rem) !important; /* Больше на моб */
  }
}

/* Убираем лишние отступы, которые могут мешать центрированию */
.h1, h1 {
  margin-left: 0;
  margin-right: 0;
}
/* Базовый стиль (для мобильных) — используем системные шрифты */
.custom-title {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: rgba(20, 139, 2, 0.545);
  text-shadow: 2px 2px 2px rgba(0, 0, 0, 0.3);
  text-transform: uppercase;
  letter-spacing: 2px;
  font-weight: 900;
  font-size: 3rem; /* Чуть меньше для мобилок */
}

/* Для планшетов и ПК — подключаем Nunito */
@media (min-width: 768px) {
  .custom-title {
    font-family: "Nunito", sans-serif;
    font-size: 3.3rem;
    letter-spacing: 5px;
  }
}

.about-title {
  text-transform: uppercase;
  font-size: clamp(1.5rem, 3vw, 1.7rem);
  font-weight: bold;
  /* Сначала скругленные системные, затем стандартные без засечек */
  font-family: ui-rounded, "Segoe UI Rounded", "Quicksand", "Nunito", sans-serif;
  color: #076398;
  line-height: 1.4;
}

/* Карточки преимуществ (Advantages) */
.advantage-card {
  aspect-ratio: 1 / 1;
  height: 100%;
  border-radius: 25px;
  background: linear-gradient(45deg, #edfdfc, #ccefff);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 1.5rem;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.advantage-card:hover {
  transform: translateY(-3px) scale(1.01);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.5);
}
.advantage-icon {
  font-size: 4rem;
  margin-bottom: 0.75rem;
}
.advantage-text {
  font-family: "Comfortaa", sans-serif;
  font-weight: 700;
  font-size: 1.1rem;
  text-transform: uppercase;
}
/* Секция About */
#about {
  margin-top: 80px; /* или больше, чтобы отступ был от логотипов */
}
/* При наведении каждая картинка взлетает отдельно */
/* ========== Навбар ========== */
/* === Navbar родитель === */
.navbar {
  margin-bottom: 20px;
}

/* Фон navbar */
.navbar.bg-dark {
  background: linear-gradient(180deg, #f8ed10 0%, #86ff6e 100%);
}

/* =========================
   Базовое состояние пунктов меню
   ========================= */
.navbar-nav .nav-link {
  display: inline-flex;
  align-items: center;
  color: #fa061f;
  padding: 2px 15px;
  font-family: "Comfortaa", sans-serif;
  font-size: 1.3rem;
  text-shadow: 0 2px 4px rgb(176, 134, 8);
  transition: color 0.25s ease, text-shadow 0.25s ease;
}

/* Hover для пунктов меню */
.navbar-nav .nav-link:hover {
  color: #f7ff03;
  text-shadow: 0 4px 8px rgba(0, 0, 0, 0.45);
}

/* =========================
   БРЕНД (СІЛЬГОСПЦЕНТР)
   ========================= */
/* ===== ГЛЯНЦЕВЫЙ ЛОГОТИП В NAVBAR (СТАБИЛЬНЫЙ) ===== */

.navbar .navbar-brand.custom-brand {
  font-family: "Mulish", sans-serif;
  font-size: 1.5rem;
  font-weight: 900;
  letter-spacing: 2px;
  text-transform: uppercase;
  position: relative;
  display: inline-block;
  margin: 0;
  padding: 0;
  text-decoration: none;

  /* 1. ГЕОМЕТРИЯ ВЫПУКЛОСТИ */
  background: linear-gradient(
    to bottom,
    #00ff40 0%,
    #00ab2b 45%,
    #00ab2b 55%,
    #006419 100%
  );
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;

  /* 2. ЧЕТКИЙ КОНТУР (ФАСКА) */
  filter: drop-shadow(0px -1px 0px rgba(255, 255, 255, 0.4))
    drop-shadow(0px 1px 0px rgba(0, 0, 0, 0.8));
}

/* ===== НЕПРЕРЫВНЫЙ СТЕКЛЯННЫЙ БЛИК ===== */
.navbar .navbar-brand.custom-brand::before {
  content: attr(data-text);
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;

  /* ШИРОКИЙ И ЯРКИЙ БЛИК */
  background: linear-gradient(
    135deg,
    transparent 30%,
    /* Увеличили разлет (было 40%) */ rgba(255, 255, 255, 1) 50%,
    /* Яркость на максимум (1) */ transparent 70%
      /* Увеличили разлет (было 60%) */
  );

  /* background-size 200% достаточно для непрерывности */
  background-size: 200% 100%;
  background-repeat: no-repeat;

  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;

  filter: none;

  /* Непрерывная анимация */
  animation: continuousShine 15s linear infinite;
  opacity: 1; /* Полная непрозрачность для максимальной яркости */
}

@keyframes continuousShine {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

/* ✅ ТОЛЬКО SCALE */
.navbar .navbar-brand.custom-brand:hover {
  transform: scale(1.05);
}

/* =========================
   Flex только для nav-items
   ========================= */
.navbar-nav {
  display: flex;
  flex-direction: column; /* мобилка */
  gap: 10px;
}

@media (min-width: 992px) {
  .navbar-nav {
    flex-direction: row; /* десктоп */
  }
}

/* Модалки и рамки */
.navbar-modal {
  border: 20px solid #7cfc00;
  border-radius: 2px !important;
  overflow: hidden;
  background-color: #f8f9fa;
}

.navbar-modal-header {
  background-color: transparent !important;
  border-bottom: 2px solid #7cfc00 !important;
  padding: 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.navbar-modal-header .modal-title {
  font-weight: 700;
  color: #000;
}

/* 1. БАЗОВЫЕ СТИЛИ (ОБЩИЕ) */
/* Используем двойной селектор, чтобы точно перекрыть системные стили */
.modal-header .btn-close, 
.navbar-modal-header .btn-close {
position: absolute !important;
  /* Увеличиваем общий размер кнопки для удобства нажатия */
  width: 2rem !important;  
  height: 2rem !important;
  /* Увеличиваем размер самого значка крестика */
  background-size: 1.2rem !important;
  
  z-index: 2000 !important;
  margin: 0 !important;
  opacity: 0.7 !important; /* Сделал чуть ярче, 0.5 было слишком бледно */
  filter: brightness(0) !important;
  transition: opacity 0.15s ease !important;
  background-color: transparent !important;
  border: none !important;
  
  /* Центрируем иконку, если она сместится */
  background-position: center !important;
  background-repeat: no-repeat !important;
}

/* Эффект при наведении (только для устройств с мышкой) */
@media (hover: hover) {
  .btn-close:hover {
    opacity: 1 !important;
    background-color: rgba(0, 0, 0, 0.1) !important;
    border-radius: 0.375rem !important;
  }
}

/* 2. ДЕСКТОП (ПК) */
@media (min-width: 769px) {
  .modal-header .btn-close,
  .navbar-modal-header .btn-close {
    top: 95% !important;        /* Опускаем низко */
    right: 0.8rem !important;
    transform: translateY(-75%) !important;
  }
}

/* 3. МОБИЛЬНЫЕ */
@media (max-width: 768px) {
  .modal-header .btn-close,
  .navbar-modal-header .btn-close {
    top: 40% !important;        /* На мобилке лучше по центру строки */
    right: 0.2rem !important;
    transform: translateY(-50%) !important;
    scale: 0.95;                /* Делаем чуть меньше */
  }

  /* Твои настройки шапки */
  .modal-header {
    position: relative !important;
    padding: 1rem 0.5rem !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
  }

  .modal-title {
    font-size: 0.80rem !important;
    max-width: 55% !important;
    margin: 0 auto !important;
    text-align: center;
  }
}


.navbar-modal-header .btn-close:hover {
  opacity: 0.7 !important;
}

#mainModal .modal-header {
  display: flex;
  align-items: center;
  position: relative; /* Важно для позиционирования меню */
}

/* 2. Отталкиваем заголовок влево */
#mainModal .modal-title {
  margin-right: auto;
}
/* Только сдвиг влево и прозрачность для навбара */
#mainModal #PubBox {
  position: absolute !important;
  top: 100% !important;
  
  /* СДВИГ ВЛЕВО (2 см ≈ 80px) */
  right: 80px !important; 
  left: auto !important;
  
  background: transparent !important;
  box-shadow: none !important;
  border: none !important;
  width: max-content !important;
  margin-top: 10px !important;
}

/* Разрешаем вылет за пределы обертки */
#mainModal .pub-wrapper {
  overflow: visible !important;
}

@media (max-width: 480px) {
  /* Селектор уточняем, чтобы увеличить именно в навбаре */
  .navbar-modal-header .modal-title, 
  #mainModal .modal-title {
    font-size: 1.7rem !important; /* УВЕЛИЧЬ ЭТО ЗНАЧЕНИЕ (было 1rem) */
    max-width: 80% !important;   /* РАСШИРЬ (было 60%), чтобы влезло крупным шрифтом */
    top: 50% !important;
    line-height: 1.1 !important;
  }
}

/* 1. ПАНЕЛЬ ИКОНОК В МОДАЛКЕ (Та, что у стрелки Share) */
#PubBox {
  position: absolute !important;
  display: none; /* JS управляет (flex) */
  
  /* ПОЗИЦИЯ ПОД КНОПКОЙ */
  top: 100% !important;
  margin-top: 15px !important;

  /* СДВИГ ВЛЕВО (твои 2 см) */
  right: 20px !important; 
  left: auto !important;

  /* ОФОРМЛЕНИЕ */
  background: transparent !important; /* Сделал прозрачным, как просил */
  box-shadow: none !important;
  border: none !important;
  width: max-content !important;
  padding: 0 !important;
  z-index: 2000 !important;
}

/* 4. КНОПКА SHARE */
#productPubBtn, #mainModalPubBtn {
  display: flex !important;
  position: relative !important;
  order: -1 !important;
  /* Базовое оформление */
  width: 2rem !important;   /* Размер как у крестика */
  height: 2rem !important;
  align-items: center;
  justify-content: center;
}

/* 2. ТОЛЬКО ДЛЯ ДЕСКТОПА (ПК) */
@media (min-width: 769px) {
  #productPubBtn, #mainModalPubBtn {
    margin-right: 60px !important;  
    transform: translateY(3px) !important; 
  }
}

/* 5. ФИКС СКРОЛЛА */
.modal-content {
  overflow-x: hidden !important; 
}

/* ХОВЕР */
#productPubBtn:hover, #mainModalPubBtn:hover {
  transform: scale(1.15) !important; 
  filter: brightness(0.6) drop-shadow(0 4px 6px rgba(0,0,0,0.3)) !important;
}

/* МОБИЛКА */
@media (max-width: 768px) {
  #PubBox {
    top: 100% !important;
    margin-top: 10px !important;
    right: 5px !important;
    left: auto !important;
    width: max-content !important;
  }

  #productPubBtn, #mainModalPubBtn {
    display: flex !important;
    position: relative !important;
    /* Уменьшил с 2.25rem до 1.3rem — кнопка ушла ПРАВЕЕ к крестику */
    right: 2.7rem !important;  
    transform: translateY(-1px) !important; 
    order: 1 !important;           
    padding: 0.25rem !important;
  }

  /* Увеличиваем саму иконку внутри кнопки */
  #productPubBtn img, #mainModalPubBtn img {
    width: 26px !important;
    height: 26px !important;
  }
}


/* 5. ФИКС СКРОЛЛА */
.modal-content {
  overflow-x: hidden !important; 
}

/* ХОВЕР ДЕСКТОП */
#productPubBtn:hover, #mainModalPubBtn:hover {
  transform: scale(1.15) !important; 
  filter: brightness(0.6) drop-shadow(0 4px 6px rgba(0,0,0,0.3)) !important;
}

/* ХОВЕР МОБІЛЬНІ */
@media (max-width: 768px) {
  #productPubBtn:hover, #mainModalPubBtn:hover {
    transform: scale(1.1) !important;
    filter: brightness(0.7) drop-shadow(0 2px 4px rgba(0,0,0,0.2)) !important;
  }
}


/* 4. СТИЛИ ИКОНОК */
div#PubBox img, 
div#contactsPubBox img, 
.pub-item img {
  display: block !important;
  width: 32px !important;  
  height: 32px !important; 
  background: transparent !important;
  flex-shrink: 0 !important;
  transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1), filter 0.2s ease;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

/* Специфичный размер для контактов */
div#contactsPubBox img { 
  width: 28px !important; 
  height: 28px !important; 
}


/* Ховер для мессенджеров */
#PubBox img:hover, #contactsPubBox img:hover, .pub-item:hover img {
  transform: scale(1.2) !important;
  filter: brightness(0.9) drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3)) !important;
  cursor: pointer;
}

/* Вспомогательный класс */




/* заголовок КАТАЛОГ */
.catalog-header-container {
  background-color: #ffffff;
  padding-top: 40px;    /* Было 100px — теперь заголовок выше */
  padding-bottom: 20px;
}

/* Убираем лишние отступы у колонок Bootstrap внутри этой секции */
.catalog-header-container .col-12 {
  margin: 0;
  padding: 0;
}

/* ===== график работи в контактах ===== */
/* График работы - точно как .contact-row */

.status-text {
  font-weight: 600;
  color: #000 !important;
  margin-right: 0.5rem;
}

/* ===== КНОПКИ БРЕНДА ===== */
/* Контейнер для центрирования и отступа вниз */
.category-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  /* Оптимальный зазор для масштаба 1.10 */
  gap: 25px;
  margin-top: 20px !important;
  margin-bottom: 120px;
  width: 100%;
  padding: 20px;
}

/* 2. Стили для КАТЕГОРИЙ техники (Тракторы, Мотоблоки и т.д.) */
.type-btn {
  display: inline-flex !important; /* Вместо inline-block, как ты хотел в HTML */
  text-decoration: none !important; /* Убирает подчеркивание ссылки */
  align-items: center;
  justify-content: center;
  text-align: center;
  font-family: "Comfortaa", sans-serif;

  /* ТВОЯ МАКСИМАЛЬНАЯ ЖИРНОСТЬ */
  font-weight: 900 !important; /* 1000 — редкость, 900 — стандартный максимум */
  padding: 18px 35px !important;
  font-size: 1.15rem !important;
  min-width: 220px;
  text-transform: uppercase;
  letter-spacing: 1.5px;

  color: #198754;
  background-color: #ffffff;
  border: 3px solid #00b51e; /* Сделал 3px, раз шрифт супер-жирный */
  border-radius: 10px;

  transform: scale(1);
  transform-origin: center;
   box-shadow: 0 8px 22px rgba(0, 0, 0, 0.30), 0 0 10px rgba(6, 221, 41, 0.18);
  transition: all 0.3s ease;
  cursor: pointer;
  margin: 5px;
}

/* Наведение и АКТИВНОЕ состояние */
.type-btn:hover,
.type-btn.active {
  transform: scale(1.1) !important;
  background-color: #198754 !important;
  color: #ffffff !important;
  border-color: #198754 !important;
  box-shadow: 
    0 12px 25px rgba(125, 255, 120, 0.6),
    0 0 25px rgba(125, 255, 120, 0.5),
    0 0 50px rgba(125, 255, 120, 0.3) !important; /* ТОЛЩЕ по всему периметру */
  z-index: 2;
  text-decoration: none !important;
}


/* 3. Стили для БРЕНДОВ (Shifeng, Lovol и т.д.) */
.category-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 16px 35px !important;
  font-family: "Comfortaa", sans-serif;
  font-weight: 1000 !important; /* Максимальная жирность */
  font-size: 1.1rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #ffffff;
  background-color: #057718;
  border: 3px solid #006a12;
  border-radius: 10px;
  cursor: pointer;

  transform: scale(1);
  transform-origin: center;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.18), 0 0 12px rgb(9, 255, 0);
  transition: all 0.3s ease;
  margin: 5px;
}

.category-btn:hover,
.category-btn.active {
  transform: scale(1.1) !important; /* Привел к единому масштабу 1.10 */
  background-color: #198754 !important;
  color: #ffffff !important;
  box-shadow: 0 14px 35px rgba(0, 0, 0, 0.35),
    0 0 18px rgba(125, 255, 120, 0.35);
  z-index: 2;
}

/* 4. АДАПТИВНОСТЬ: Планшеты */
@media (max-width: 992px) {
  .category-buttons {
    gap: 20px;
  }
  .type-btn,
  .category-btn {
    min-width: 180px;
    font-size: 1rem !important;
  }
}

/* 5. АДАПТИВНОСТЬ: Мобильные */
@media (max-width: 576px) {
  .category-buttons {
    gap: 15px;
    flex-direction: column !important;
    margin-top: 60px !important;
  }

  .type-btn {
    width: 100% !important;
    min-width: 0 !important;
    margin: 0;
    font-size: 1.2rem !important;
    font-weight: 900 !important; /* Чуть меньше жирность для узких экранов */
  }

  .type-btn:hover,
  .type-btn.active {
    transform: scale(1.03) !important; /* Минимальный масштаб для мобил */
  }

  /* Бренды на мобильных остаются в ряд, если их много */
  .brand-block .category-btn {
    width: auto !important;
    display: inline-flex !important;
    padding: 12px 20px !important;
  }
}

/* Бренды на мобильных остаются как были (не в столбик) */
.brand-block .category-btn {
  width: auto !important;
  display: inline-flex !important;
  padding-left: 15px !important;
  padding-right: 15px !important;
}

.brand-block h1.brand-title {
  font-family: "Nunito", sans-serif;
  color: #2bc006;
  font-weight: 800;
  font-size: 2rem;
  text-transform: uppercase;
  margin-top: 50px;
  margin-bottom: 20px;
  text-align: center;
  position: relative;
  display: block; /* Гарантируем, что он блочный для центровки */
}

/* Тонкая полоска под заголовком */
.brand-block .brand-title::after {
  content: "";
  display: block;
  width: 100%; /* длина линии, можно подстраивать */
  max-width: 90vw;
  height: 2px; /* толщина линии */
  margin: 10px auto 0; /* сверху отступ 10px, центрируем по горизонтали */
  border-radius: 2px; /* скругление концов */
  background: linear-gradient(
    to left,
    rgba(255, 255, 255, 0.8),
    #2bc006,
    rgba(255, 255, 255, 0.8)
  );
}

.brand-title {
  display: block !important;
  width: 100%;
  margin-top: 40px !important;
  margin-bottom: 20px !important;
  color: rgb(0, 248, 8);
  font-family: Cambria, Cochin, Georgia, Times, "Times New Roman", serif;
  text-shadow: 0 5px 10px rgba(0, 0, 0, 0.3);
  line-height: 1.3;
  font-weight: 500;
  font-size: clamp(1.1rem, 2vw, 1.8rem) !important;
  text-align: center !important; /* Добавил, перебивает Bootstrap text-center */
}

/* Карточки категорий */
.category-image-wrapper {
  position: relative;
  overflow: hidden;
  background-color: transparent;
  border-radius: 15px;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2); /* Изначально приподнята */
  transition: all 0.4s ease;
  aspect-ratio: 1 / 1; /* Делает карточки квадратными */
}
/* Текст поверх картинки */
.category-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(0, 0, 0, 0.6); /* Полупрозрачный фон для текста */
  color: rgb(244, 248, 6);
  text-align: center;
  padding: 10px;
  font-family: "Arial Black", sans-serif;
  font-size: 0.9rem;
  text-transform: uppercase;
}
/* Эффект при наведении на всю карточку */
.category-card:hover .category-image-wrapper {
  transform: scale(1.05); /* Увеличение всей карточки */
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4); /* Усиление тени */
  z-index: 10;
}
.category-card:hover .category-img {
  transform: scale(1.1); /* Дополнительное увеличение самой картинки внутри */
}
.category-card:hover .category-overlay {
  background: rgba(241, 196, 15, 0.9); /* Желтый фон при наведении */
  color: rgb(0, 12, 13);
}
.category-img {
  width: 100%;
  aspect-ratio: 1 / 1; /* Создаем квадратный контейнер */
  /* ИЗМЕНЕНИЕ ЗДЕСЬ: */
  object-fit: contain; /* Картинка уменьшается, чтобы вписаться целиком */
  background-color: transparent; /* Добавляем светлый фон, если картинка не на весь 
квадрат */
  padding: 10px;
  border-radius: 15px;
  transition: transform 0.3s ease;
}
/* Кнопки каталога */
.catalog-title {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  padding: 14px 34px;
  font-family: "Baloo 2", cursive;
  font-weight: 800;
  font-size: 2rem;
  letter-spacing: 2px;
  text-transform: uppercase;

  color: #057718;
  background: linear-gradient(135deg, #e5ffca, #a6fb8e);
  border: 2px solid #06dd29;
  border-radius: 5px;

  /* Лёгкий подъём и ореол */
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.30), 0 0 10px rgba(6, 221, 41, 0.18);

  /* Поднять выше */
  margin-top: 10px; /* уменьшаем для подъёма */
  text-align: center;
}

/* Адаптивность для мобильных */
@media (max-width: 576px) {
  .catalog-title {
    font-size: 1rem;
    padding: 12px 20px;
    margin-top: 5px;
  }
}

/* 1. Общий контейнер (описание и контейнер характеристик) */
/* 1. Загальний контейнер */
.product-description {
  /* Возвращаем широкое состояние */
  width: 100% !important;
  max-width: 680px !important;
  margin: 1.5rem auto !important;
  padding: 1.5rem 1.8rem !important;
  background: linear-gradient(
    135deg,
    rgba(248, 249, 250, 0.95),
    rgba(236, 254, 194, 0.85)
  ) !important;
  box-sizing: border-box !important;

  /* Границы */
  border-radius: 20px !important;
  border-top: 2px solid #ffd103 !important;
  border-bottom: 2px solid #ffd103 !important;
  border-left: 3px solid #00df25 !important;
  border-right: 3px solid #00df25 !important;

  /* Маска затухания */
  -webkit-mask-image: linear-gradient(
    to bottom,
    transparent 0%,
    black 5%,
    black 95%,
    transparent 100%
  );
  mask-image: linear-gradient(
    to bottom,
    transparent 0%,
    black 5%,
    black 95%,
    transparent 100%
  );

  font-size: 1.1rem !important;
  line-height: 1.6 !important;
  color: #2d5016 !important;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05) !important;
  text-align: left !important;

  /* Убираем внутренний скролл, как договорились */
  overflow: visible !important;
}

/* 2. Список характеристик */
/* 1. Общие настройки списка */
/* 1. КОНТЕЙНЕР СПИСКА */
/* 1. КОНТЕЙНЕР СПИСКА */
#productModal .product-specs {
  list-style: none !important;
  padding: 0 !important;
  margin: 1.5rem 0 !important;
  display: block !important;
  width: 100% !important;
}

/* 2. ЗАГОЛОВОК (header) - По центру с фиксированной линией */
#productModal .product-specs li.header {
  display: block !important;
  width: 100% !important;
  text-align: center !important;
  font-weight: 900 !important;
  color: #2c5a1a !important;
  text-transform: uppercase !important;
  font-size: 1.1rem !important;
  margin-top: 25px !important;
  margin-bottom: 15px !important;
  padding: 0 0 10px 0 !important;
  position: relative !important;
}

/* ФИКСИРОВАННАЯ ЛИНИЯ под заголовком */
#productModal .product-specs li.header::after {
  content: "" !important;
  position: absolute !important;
  bottom: 0 !important;
  left: 50% !important;
  transform: translateX(-50%) !important;
  width: 650px !important;
  height: 3px !important;
  background-color: #73ff27 !important;
}

/* Убираем точку у заголовка */
#productModal .product-specs li.header::before {
  content: none !important;
}

/* 3. ОБЫЧНЫЕ СТРОКИ (normal) - Смещение вправо на 1 см */
#productModal .product-specs li.normal {
  display: block !important;
  position: relative !important;
  padding-left: 55px !important;
  margin: 10px 0 !important;
  color: #3e6b1f !important;
  font-size: 1rem !important;
  text-align: left !important;
  line-height: 1.4 !important;
}

/* 4. ТОЧКИ В НАЧАЛЕ СТРОКИ (Фикс выравнивания через translateY) */
/* 4. ТОЧКИ В НАЧАЛЕ СТРОКИ (Идеальное выравнивание по первой строке) */
#productModal .product-specs li.normal::before {
  content: "•" !important;
  position: absolute !important;
  left: 38px !important;
  color: #73ff27 !important;
  font-weight: bold !important;
  font-size: 1.8rem !important; /* Сделали чуть крупнее для наглядности */

  /* ФИКС ВЫРАВНИВАНИЯ */
  top: 0 !important; /* Прижимаем к самому верху первой строки */
  margin-top: -6px !important; /* ПОДНИМАЕМ ВЫШЕ НУЛЯ: подберите от -4px до -8px */

  line-height: 1 !important;
  display: inline-block !important;
}

/* --- ПЛАНШЕТЫ (ширина до 1024px) --- */
@media (max-width: 1024px) {
  #productModal .product-specs li.header::after {
    width: 400px !important;
  }
  #productModal .product-specs li.normal {
    padding-left: 50px !important;
  }
  #productModal .product-specs li.normal::before {
    left: 32px !important;
  }
}

/* --- СМАРТФОНЫ (ширина до 480px) --- */
@media (max-width: 480px) {
  #productModal .modal-body {
    padding: 10px !important;
  }
  #productModal .product-specs li.header::after {
    width: 85% !important; /* Чтобы линия не вылезала за края экрана */
    height: 2px !important;
  }
  #productModal .product-specs li.header {
    font-size: 1rem !important;
  }
  #productModal .product-specs li.normal {
    padding-left: 35px !important;
    font-size: 0.95rem !important;
  }
  #productModal .product-specs li.normal::before {
    left: 15px !important;
    font-size: 1.5rem !important;
    top: 0 !important;

    /* БЫЛО -4px, ставим меньше, чтобы точка опустилась ниже */
    margin-top: -1px !important;

    line-height: 1 !important;
    display: inline-block !important;
  }
}

/* --- МАЛЕНЬКИЕ ТЕЛЕФОНЫ (ширина до 360px) --- */
@media (max-width: 360px) {
  #productModal .product-specs li.normal {
    padding-left: 28px !important;
  }
  #productModal .product-specs li.normal::before {
    left: 10px !important;
  }
  #productModal .product-specs li.header::after {
    width: 130px !important;
  }
}
* {
  scroll-behavior: smooth !important;  /* ГЛАВНЫЙ ФИКС */
}
/* Плавная прокрутка к карточкам после нажатия на бренд */


/* --- 1. ОБЩИЕ КОНТЕЙНЕРЫ (Центрирование) --- */

@media (min-width: 992px) {
    .category-buttons.d-flex,
    .brand-container .row { 
        display: flex !important; 
        flex-wrap: wrap !important; 
        justify-content: center !important; 
        gap: 15px !important;
        padding: 10px !important;
        
        margin-bottom: 100px;
    }

     
    .brand-container .row > * {
        flex: 0 1 calc(16.66% - 15px) !important;
        min-width: 120px !important; 
        max-width: 180px !important;
        display: flex;
        justify-content: center;
    }

    .category-buttons.d-flex > * {
        flex: 0 1 auto !important; 
        min-width: 0 !important; 
        max-width: none !important;
    }
}



/* --- 4. КНОПКИ БРЕНДОВ (Зеленые овалы) --- */
.brand-link {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    height: 48px;
    padding: 0 12px !important;
    width: auto !important;
    min-width: fit-content !important;
    white-space: nowrap;
    font-family: "Comfortaa", sans-serif;
    font-weight: 600;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #057718;
    border: 2.5px solid #1ff543;
    border-radius: 25px;
    background: #d5ffbe;
    text-decoration: none;
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.15);
    transition: all 0.25s ease;
    margin: 5px !important;
}

.brand-link:hover {
    transform: scale(1.1);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.329);
    background-color: #81ed75;
    color: #03480d !important;
}

.brand-link.active {
    background-color: #83ff75;
    color: #0f9500;
    border-color: #00ff55;
    box-shadow: 0 12px 30px rgba(6, 210, 40, 0.5);
    transform: scale(1.12);
}

.brand-link.active:hover {
    background-color: #07e62c;
    color: #fff;
    box-shadow: 0 15px 35px rgba(6, 210, 40, 0.6);
    transform: scale(1.15);
}

/* --- 5. ЛОГОТИПЫ БРЕНДОВ (Картинки) --- */
/* --- СТИЛИ ДЛЯ ДЕСКТОПА --- */
.brand-logo-link {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    margin: 0 !important;
    width: 100% !important;
    height: 120px; /* Фиксированная высота ячейки-контейнера */
    transition: transform 0.25s ease;
    overflow: hidden;
}

.brand-logo-link img {
    /* Умный баланс размеров */
    height: auto !important;
    min-height: 60px !important; /* Маленькие лого не будут крошечными */
    max-height: 100px !important; /* Длинные лого не будут огромными */
    
    width: auto !important;
    max-width: 90% !important; /* Запас по бокам */
    object-fit: contain;
    
    /* Убирает мыло при масштабировании */
    image-rendering: -webkit-optimize-contrast; 
}

.brand-logo-link:hover {
    transform: scale(1.1);
}


/* --- 6. АДАПТИВНОСТЬ --- */

/* Мобильные: кнопки и лого в сетку 2 колонки */
/* 1. ПЛАНШЕТЫ (от 577px до 992px) — 6 в ряд */
@media (min-width: 577px) and (max-width: 992px) {
    .brand-container .row {
        display: grid !important;
        grid-template-columns: repeat(6, 1fr) !important;
        grid-auto-flow: row !important;
        gap: 15px !important;
        padding: 0 20px !important;
        margin: 0 !important;
        width: 100% !important;
        align-items: center;
    }

    .brand-logo-link img {
        height: 60px !important; /* Оптимально для планшета */
        width: auto !important;
        object-fit: contain !important;
    }
}

/* 2. МОБИЛЬНЫЕ (до 576px) — 2 в ряд */
@media (max-width: 576px) {
    .brand-container {
        padding-left: 15px !important;
        padding-right: 15px !important;
        display: block !important;
        overflow: hidden !important;
        
    }

    .brand-container .row {
        display: grid !important;
        grid-template-columns: 1fr 1fr !important; /* Ровно 2 колонки */
        grid-auto-flow: row !important;
        gap: 20px 15px !important;
        margin: 0 !important;
        width: 100% !important;
        justify-items: center;
        align-items: center;
    }

    /* Ячейки: увеличиваем область для попадания пальцем */
    .brand-container .row > * {
        flex: none !important;
        min-width: 0 !important;
        width: 100% !important;
        min-height: 70px !important; 
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
        padding: 0 !important;
        margin: 0 !important;
    }

    .brand-logo-link {
        width: 100% !important;
        height: 100% !important;
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
    }

    .brand-logo-link img {
        /* Убираем жесткие 50px, даем свободу в пределах диапазона */
        height: auto !important; 
        min-height: 25px !important; /* Не дает маленьким лого быть "пылью" */
        max-height: 65px !important; /* Ограничивает гигантов */
        
        /* Ширина подстраивается сама */
        width: auto !important;
        max-width: 95% !important; /* Используем почти всю ширину ячейки */
        
        object-fit: contain !important;
        display: block;
        margin: 0 auto;
        
        /* Добавляем легкую четкость (опционально) */
        image-rendering: -webkit-optimize-contrast;
    }


    /* Кнопки категорий */
    .category-buttons.d-flex {
        display: grid !important;
        grid-template-columns: 1fr 1fr !important;
        gap: 10px !important;
    }

    .brand-link {
    width: 100% !important;
    /* Центрируем текст внутри кнопки */
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    text-align: center !important;
    
    padding: 10px 8px !important; /* Увеличил высоту для удобства нажатия */
    font-size: 0.85rem !important;
    min-height: 44px; /* Стандарт для мобильных кнопок */
    }

    /* СПЕЦИАЛЬНОЕ ПРАВИЛО: если кнопка одна в ряду (последняя нечетная) */
  .brand-link:last-child:nth-child(odd) {
    grid-column: span 2;         /* Занимает всю строку */
    width: calc(50% - 5px) !important; /* Ровно половина ширины (минус половина gap) */
    justify-self: center;        /* Центрирует саму кнопку в сетке */
    min-width: 150px;            /* Подберите под ваш дизайн */
    text-align: center !important;
  }

}


/* 3. ОБЩИЙ СБРОС (для всех мобильных до 992px) */
@media (max-width: 992px) {
    .brand-container .col-6, 
    .brand-container .col-md-2 {
        width: auto !important;
        flex: none !important;
        max-width: none !important;
        padding: 0 !important;
        margin: 0 !important;
    }
}


/* Разрешаем кнопкам в модалке сохранять вид Bootstrap, даже если у них есть класс brand-link */
.category-buttons .brand-link.btn {
    all: revert; /* Сбрасываем специфичные стили бренда */
    display: inline-block;
    font-weight: 400;
    line-height: 1.5;
    text-align: center;
    text-decoration: none;
    vertical-align: middle;
    cursor: pointer;
    user-select: none;
    background-color: transparent;
    border: 1px solid #198754; /* Цвет btn-outline-success */
    color: #198754;
    border-radius: .25rem;
    transition: color .15s ease-in-out,background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out;
}

.category-buttons .brand-link.btn:hover {
    color: #fff;
    background-color: #198754;
    border-color: #198754;
}






/* Главные кнопки навигации */

/* 1. ОСНОВНАЯ КАРТОЧКА (База + Переопределение Bootstrap) */
div.product-card.product-card {
  background: #ecfec2 !important;
  border-radius: 25px !important;
  padding: 12px !important;
  border: 2px solid rgb(112, 255, 60) !important;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1) !important;
  display: flex !important;
  flex-direction: column !important;
  width: 100% !important;
  box-sizing: border-box !important;
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s !important;
  position: relative !important;
  overflow: hidden;
}

/* 2. ДЕСКТОП (4 в ряд) */
@media (min-width: 768px) {
  div.product-card.product-card {
    max-width: 320px !important;
    min-height: 460px !important; /* Минимальная высота, чтобы карточки были ровные */
    height: auto !important;
    display: flex !important;
    flex-direction: column !important; /* Элементы в ряд сверху вниз */
    padding-bottom: 70px !important; /* Место для кнопки внизу */
    position: relative !important;
  }

  div.product-card .mt-1.d-flex {
    align-items: center !important;  /* ← ЦЕНТРИРУЕТ p */
    justify-content: flex-start !important;
    width: 100% !important;
  }

  div.product-card.product-card .product-short.text-success {
    width: 85% !important;  /* РАСШИРЕН до 95% */

margin: 0 0 15px 0 !important;  /* ЦЕНТРИРОВАНИЕ */

/* УБИРАЕМ flex-конфликты полностью */
flex-basis: auto !important;
flex-grow: 0 !important;
flex-shrink: 1 !important;

display: -webkit-box !important;
-webkit-line-clamp: 4 !important;
-webkit-box-orient: vertical !important;
overflow: hidden !important;

font-size: 1.1rem;
font-weight: 600 !important;
line-height: 1.3em !important;

height: auto !important;
max-height: none !important;
white-space: normal !important; 
text-align: center !important;

  }



/* 4. ХОВЕР КАРТОЧКИ */
div.product-card.product-card:hover {
  transform: scale(1.03) !important;
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.2) !important;
  border-color: #00b81f !important;
  z-index: 5 !important;
}

/* 5. ИЗОБРАЖЕНИЕ */
div.product-card.product-card .img-wrapper {
  width: 85% !important;
  margin: 15px auto 0 !important;
  aspect-ratio: 4/3 !important;
  overflow: hidden !important;
  flex-shrink: 0 !important;
  border: 3px solid rgb(43, 255, 0) !important;
  border-radius: 20px !important;
  background: #fff !important;
  transition: border-color 0.2s ease !important;
}

div.product-card.product-card .img-wrapper:hover {
  border-color: #fff203 !important;
}

div.product-card.product-card .img-wrapper img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  display: block !important;
}

/* 6. НАЗВАНИЕ (1 строка, без line-clamp) */
div.product-card.product-card h1 {
  color: #005e13;
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.3;
  margin: 10px 0 2px 0 !important; 
  
  /* ← ОГРАНИЧЕНИЕ ШИРИНЫ */
  max-width: 220px !important;
  width: 100% !important;
  margin-left: auto !important;
  margin-right: auto !important;
  
  padding: 0 0 10px 0;
  display: -webkit-box !important;
  -webkit-line-clamp: 2 !important;
  -webkit-box-orient: vertical !important;
  overflow: hidden !important; 
  height: 2.6rem !important; 
  min-height: 2.6rem !important; 
}

.product-card-h1 {
  font-size: 1.1rem !important;
  color: #005e13 !important;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin: 0; 
  
  /* ← ТАЖЕ ОГРАНИЧЕНИЕ */
  max-width: 220px !important;
  width: 100% !important;
  margin-left: auto !important;
  margin-right: auto !important;
}



/* 8. ЦЕНА И КНОПКА */
div.product-card.product-card .product-price {
  position: absolute !important;
  bottom: 65px !important;
  left: 0;
  right: 0;
  font-weight: 700 !important;
  text-align: center !important;
  color: #2d5016 !important;
}

div.product-card.product-card .product-price::before {
  content: "" !important;
  position: absolute !important;
  top: -8px !important;
  left: 10%;
  width: 80%;
  height: 2px !important;
  background: linear-gradient(to right, transparent, #35f500, transparent) !important;
  transition: background-color 0.2s ease;
}

div.product-card.product-card .btn.open-product-modal {
  position: absolute !important;
  bottom: 15px !important;
  left: 50% !important;
  transform: translateX(-50%) !important;
  width: 70% !important;
  height: 36px !important;
  border-radius: 20px !important;
  background: linear-gradient(45deg, #06d228, #00ff41) !important;
  border: none !important;
  color: #fff !important;
  font-weight: 600 !important;
  transition: all 0.2s ease !important;
}

div.product-card.product-card .btn.open-product-modal:hover {
  background: linear-gradient(45deg, #e9f502, #e2cd11) !important;
  box-shadow: 0 4px 12px rgba(255, 215, 0, 0.4) !important;
}
}
/* 9. АДАПТИВНОСТЬ (Мобильные) */
@media (max-width: 767px) {
  div.product-card.product-card {
    max-width: none !important; /* Убираем ограничение */
    
    /* Расширяем блок: теперь он шире контейнера на 4мм */
    width: calc(100% + 4mm) !important; 
    
    /* Сдвигаем влево на 2мм, чтобы расширение ушло равномерно в обе стороны */
    margin-left: -2mm !important; 
    
    /* Все остальные ваши стили */
    height: auto !important;
    min-height: 400px !important;
    padding: 10px !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
  }
  div.product-card.product-card:hover {
  transform: scale(1.05) !important; /* Увеличение от центра */
  box-shadow: 0 10px 20px rgba(0,0,0,0.15) !important; 
  border-color: #35f500 !important; 
}
  div.product-card.product-card .img-wrapper {
    width: 100% !important;
    border: 2px solid rgb(112, 255, 60) !important;
    border-radius: 15px !important;
    margin: 0 auto 8px auto !important;
  }
  div.product-card .product-title {
    font-size: 0.92rem !important; 
    line-height: 1.2 !important; /* Увеличили с 1.1, чтобы буквы не слипались */
    height: 3.5rem !important;   /* Увеличили с 3.2, чтобы влезла 3-я строка */
    color: #3c880ada !important; /* Твой зеленый */
    margin-top: 5px !important;
    margin-bottom: 0 !important;
    padding-bottom: 4px !important; /* ЗАПАС СНИЗУ: чтобы не резало буквы */
    display: -webkit-box !important;
    -webkit-line-clamp: 3 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
  }

  div.product-card.product-card .product-short.text-success {
    font-size: 0.9rem !important;
    font-weight: 600 !important;
    line-height: 1.25 !important; 
    margin-top: 5px !important;
    margin-bottom: 5px !important;
    padding-bottom: 5px !important; /* ЗАПАС СНИЗУ */
    display: block !important; 
    overflow: visible !important;
    height: auto !important;
    max-height: none !important;
    width: 100% !important; 
    min-height: 6.2rem !important; /* Увеличили с 5.8, чтобы дать тексту "дышать" */
 }

  div.product-card.product-card .product-price {
    position: relative !important;
    bottom: 0 !important;
    margin-top: auto !important;
    width: 100% !important;
    text-align: center !important;
    font-size: 1rem !important;
  }

  div.product-card.product-card .btn.open-product-modal {
  /* Позиционирование (оставляем мобильное) */
  position: relative !important;
  bottom: 0 !important;
  left: 0 !important;
  transform: none !important;
  margin: 12px auto 0 auto !important; /* Увеличил отступ сверху, чтобы не липла к цене */
  width: 100% !important;
  height: 36px !important;
  
  /* Стили (копируем с десктопа) */
  border-radius: 20px !important;
  background: linear-gradient(45deg, #06d228, #00ff41) !important;
  border: none !important;
  color: #fff !important;
  font-weight: 600 !important;
  font-size: 0.85rem !important;
  transition: all 0.2s ease !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

/* Эффект при наведении (для мобилок тоже актуально) */
div.product-card.product-card .btn.open-product-modal:hover {
  background: linear-gradient(45deg, #e9f502, #e2cd11) !important;
  box-shadow: 0 4px 12px rgba(255, 215, 0, 0.4) !important;
}

  div.product-card.product-card .product-price::before {
    left: 10% !important;
    width: 80% !important;
    content: "" !important;
    position: absolute !important;
    top: -8px !important;         /* Дистанция над ценой */
    left: 5% !important;         /* Центрирование (10% слева + 80% ширина + 10% справа) */
    width: 90% !important;
    height: 2px !important;
    background: linear-gradient(to right, transparent, #35f500, transparent) !important;
    transition: background-color 0.2s ease;
    
  }
}

/* устраняет прыжки при открытии карточек */
 
.product-grid img {
    aspect-ratio: 4 / 3; /* Замените на 1 / 1, если фото квадратные */
    width: 100%;
    height: auto;
    object-fit: contain; /* Чтобы фото не обрезалось */
    background: #fdfdfd; /* Легкий фон, чтобы не было дырок */
}


/* Стилизация самой модалки */
.modal-content {
  border-radius: 30px !important; /* Больше скругление */
  border: 2px solid #00b01d !important; /* Толще зелёная рамка */
  background: linear-gradient(135deg, #bbfc92 0%, #fff674 50%, #ecfec2 100%);
  box-shadow: 0 25px 60px rgba(0, 176, 29, 0.4);
  transform: translateY(-20px);
  transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  overflow: hidden;
}
/* При появлении модалки — поднимаем эффект */
.modal.show .modal-content {
  transform: translateY(0);
  box-shadow: 0 35px 80px rgba(0, 176, 29, 0.6);
}
/* Для мобильных: только центрируем диалог, не трогая основной контейнер модалки */



/* Миниатюры внутри модалки */
#productModalThumbnails {
  /* Форсируем градиент и отключаем стандартный цвет */
  background: linear-gradient(135deg, #ffffff 0%, #c6feb0be 100%) !important;
  background-color: transparent !important; /* Убираем подложку, если она есть */
  
  width: 90% !important;
  max-width: 750px;
  margin: 0 auto 2rem !important;
  padding: 18px 20px !important;
  display: flex !important;
  flex-wrap: nowrap !important;
  gap: 15px !important;
  justify-content: safe center !important;
  overflow-x: auto !important;
  overflow-y: visible !important;
  
  border-radius: 15px !important;
  border: 1px solid #d4f7c5 !important;
  align-items: center;
  box-sizing: border-box !important;

  /* Скролл */
  scrollbar-width: thin !important;
  scrollbar-color: #00b01d #f8f9fa !important;
  scroll-snap-type: x proximity;
}


/* ОСТАЛЬНОЙ КОД (img, hover, scrollbar) ПРОСТО КОПИРУЙТЕ НИЖЕ БЕЗ ИЗМЕНЕНИЙ */


/* Удаляем лишние зоны, так как теперь работаем через padding контейнера */
#productModalThumbnails::before,
#productModalThumbnails::after {
  content: none !important;
}

/* Миниатюры */
#productModalThumbnails img {
  /* УБИРАЕМ БЕЛЫЙ ФОН БУТСТРАПА */
  background-color: transparent !important; 
  padding: 0 !important; 
  
  /* ВАШИ ГАБАРИТЫ */
  width: 110px !important;
  height: auto !important;
  aspect-ratio: 4 / 3 !important;
  object-fit: cover !important;
  
  /* РАМКА И СКРУГЛЕНИЕ */
  border: 3px solid #ffd103 !important;
  border-radius: 12px !important;
  
  /* ЭФФЕКТЫ */
  flex-shrink: 0 !important;
  cursor: pointer !important;
  transition: all 0.3s ease !important;
  scroll-snap-align: center !important;
}

/* Состояние при наведении и активная миниатюра */
#productModalThumbnails img:hover,
#productModalThumbnails img.active-thumb {
  border-color: #17e500 !important;
  box-shadow: 0 0 10px 12px rgba(23, 229, 0, 0.3) !important;
  transform: scale(1.09) !important; /* Масштаб, чтобы не вылезать за границы высокого контейнера */
  z-index: 10 !important;
}

/* Скроллбар (Chrome, Safari, Edge) */
#productModalThumbnails::-webkit-scrollbar {
  height: 8px;
}
#productModalThumbnails::-webkit-scrollbar-track {
  background: #f8f9fa;
  border-radius: 4px;
}
#productModalThumbnails::-webkit-scrollbar-thumb {
  background: linear-gradient(90deg, #00b01d, #3bff5c);
  border-radius: 4px;
}

/* МЕДИА-ЗАПРОСЫ (Адаптивность 2026) */
@media (max-width: 768px) {
  #productModalThumbnails {
    width: 92% !important;
    padding: 12px 15px !important;
  }
  #productModalTitle {
    font-size: 1.2rem !important; /* Немного уменьшили, чтобы в 3 строки влезло больше смысла */
    
    /* ШИРИНА: 72-75% — это максимум, чтобы не задеть кнопку Share */
    max-width: 72% !important; 
    margin: 0 auto !important;
    
    /* ТРИ РЯДА: */
    display: -webkit-box !important;
    -webkit-line-clamp: 3 !important; /* Теперь разрешено 3 строки */
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
    
    line-height: 1.1 !important;
    font-weight: 700 !important;
    text-align: center !important;
  }

  /* Сдвигаем кнопки Share и Close максимально вправо, чтобы освободить центр */
  .modal-header > div.d-flex {
    right: 8px !important;
    gap: 10px !important;
  }
  }

@media (max-width: 480px) {
  #productModalThumbnails {
    width: 94% !important;
    /* Увеличенная высота для мобильных, чтобы миниатюры дышали */
    padding: 10px 12px !important;
    gap: 10px !important;
    min-height: 95px !important;
  }

  #productModalThumbnails img {
    width: 85px !important;
    border-width: 2px !important;
    border-radius: 8px !important;
  }

  #productModalThumbnails img.active-thumb {
    transform: scale(1.05) !important;
  }
}

.modal-header {
  background: linear-gradient(180deg, #f8f9fa, #ecfec2) !important;
  border-bottom: 2px solid #3bff5c !important;
  border-radius: 0 !important;
  /* УБИРАЕМ ОТСТУПЫ СВЕРХУ/СНИЗУ (0.3rem - это минимум) */
  padding: 1.0rem 1rem !important; 
  position: relative !important;  
  /* УБИРАЕМ ФИКСИРОВАННУЮ ВЫСОТУ ПОЛНОСТЬЮ */
  min-height: 0 !important; 
  height: auto !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important; /* Центрируем контент */
}

.modal-title {
  /* УБИРАЕМ АБСОЛЮТНОЕ ПОЗИЦИОНИРОВАНИЕ, ЧТОБЫ HEADER СХЛОПНУЛСЯ ПО ТЕКСТУ */
  position: relative !important;
  transform: none !important;
  left: 0 !important;
  top: 0 !important;
  
  text-align: center !important;
  max-width: 75% !important; /* Оставляем место для кнопок по бокам */
  font-size: 1.20rem !important;
  font-weight: 700 !important; 
  color: #3c880ada !important; 
  
  /* ПЛОТНЫЙ ИНТЕРВАЛ, ЧТОБЫ НЕ РЕЗАЛО БУКВЫ */
  line-height: 1.2 !important; 
  margin: 0 auto !important;
  word-wrap: break-word;
}

.modal-header > div.d-flex {
  position: absolute !important; 
  top: 50% !important;
  right: 0.5rem !important;
  transform: translateY(-50%) !important;
  gap: 0.5rem !important;
}





/* 🔥 КРЕСТИК — Bootstrap стиль + позиция */




#modalImg {
  /* Базовые настройки пропорций */
  width: 100% !important;
  max-width: 560px; /* Ограничение, чтобы клик не выходил за рамки фото на широких экранах */
  aspect-ratio: 4 / 3 !important;
  height: auto !important;

  /* Заполнение рамки без искажений */
  object-fit: cover !important;
  object-position: center !important;

  /* Центрирование и декор */
  display: block !important;
  margin: 15px auto 1.5rem !important;
  border-radius: 20px !important;
  border: 3px solid #ffd103 !important; /* Базовый желтый */
  box-shadow: 0 15px 40px rgba(255, 209, 3, 0.3) !important;

  /* Эффекты и анимация */
  cursor: zoom-in !important;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1) !important;
  will-change: transform, border-color, box-shadow;
}
#modalImgLink {
  pointer-events: none; /* Отключаем события на ссылке целиком */
}

#modalImgLink img {
  pointer-events: auto; /* Включаем только на картинке */
}

/* Твой новый ЗЕЛЕНЫЙ ХОВЕР */
#modalImg:hover {
  border-color: #17e500 !important;
  transform: scale(1.05) !important;
  box-shadow: 0 20px 50px rgba(23, 229, 0, 0.5) !important;
  z-index: 10; /* Чтобы тень не перекрывалась соседними элементами */
}

/* Чтобы клик по "пустоте" не срабатывал, родителю даем: */
.main-photo-container {
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
  overflow: visible; /* Чтобы тень и scale при ховере не обрезались */
}

/* ✅ ДЕСКТОП И ПЛАНШЕТ (769px+) */
@media (min-width: 769px) {
  #modalImg {
    width: auto !important; /* Убираем 100%, чтобы не кликалась пустота */
    max-width: 340px !important; 
    margin: 20px auto 2.5rem !important;
    position: static !important;
    aspect-ratio: 4 / 3 !important; /* Гарантируем пропорции */
  }
}

/* ✅ МОБАЙЛ СРЕДНИЙ (481-768px) */
@media (min-width: 481px) and (max-width: 768px) {
  #modalImg {
    width: auto !important; /* Чтобы кликалась только сама картинка */
    max-width: 300px !important; /* Реальный размер на планшете */
    margin: 10px auto !important;
    aspect-ratio: 4 / 3 !important;
  }
}

/* 📱 Маленькие телефоны (до 480px) */
@media (max-width: 767px) {
  /* Применяем ко всем модалкам (.modal) */
  .modal.show {
    display: flex !important;
    align-items: center !important; /* Центр по вертикали */
    justify-content: center !important; /* Центр по горизонтали */
  }

  .modal-dialog {
    margin: 0 auto !important;
    width: 94vw !important;
    max-width: none !important;
    /* Убираем фиксированное позиционирование, flex сделает всё сам */
    display: flex !important;
    align-items: center !important;
  }

  .modal-content {
    max-height: 92vh !important; /* Оставляем зазоры сверху/снизу */
    overflow-y: auto !important; /* Если контент большой — появится внутренний скролл */
    border-radius: 20px !important;
  }

  /* Твои специфические правки для карточки товара оставляем */
  #modalImg {
    width: 280px !important;
    height: auto !important; /* Пусть высота подстроится под ширину */
    aspect-ratio: 4/3;
    margin-top: 8px !important;
    margin-bottom: 1rem !important;
  }
}


/* 📱 Все мобильные общие */
@media (max-width: 768px) {
  #modalImg {
    /* Наследуем десктопные стили рамки и тени */
    width: 100% !important; 
    max-width: 100% !important; /* На мобилках на всю ширину контента */
    height: auto !important;
    aspect-ratio: 4/3 !important;
    object-fit: cover !important;
    
    /* Копируем декор с десктопа */
    border-radius: 20px !important;
    border: 3px solid #ffd103 !important; 
    box-shadow: 0 15px 40px rgba(255, 209, 3, 0.3) !important;
    
    /* Отступы */
    margin: 10px auto 1rem !important;
    display: block !important;
  }
}

/* ✅ Миниатюры — улучшенный скролл */
#productModalThumbnails {
  scrollbar-width: thin !important;
  scrollbar-color: #ffd103 transparent !important;
}

#productModalThumbnails::-webkit-scrollbar {
  height: 4px !important;
}

#productModalThumbnails::-webkit-scrollbar-track {
  background: #f8f9fa !important;
}

#productModalThumbnails::-webkit-scrollbar-thumb {
  background: #ffd103 !important;
  border-radius: 2px !important;
}

/* Контейнер инфо-строки */
/* Контейнер инфо-блока */
.shop-nano-info {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 6px 10px 4px 10px !important; /* Чуть увеличили верхний отступ */
  background-color: #f8f9fa !important;
  border-top: 1px solid #dee2e6 !important;
  border-bottom: none !important; /* УБРАЛИ НИЖНЮЮ ЛИНИЮ, чтобы не было двойной полосы */
  color: #198754 !important;
  margin-bottom: 0 !important; /* Вплотную к футеру */
}

/* Контейнер футера */
.custom-modal-footer {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-height: 24px !important;
  padding: 4px 10px !important;
  background-color: #f8f9fa !important; /* Такой же фон, как у инфо-блока */
  border-top: 1px solid #dee2e6 !important; /* Оставляем одну разделительную линию */
  margin: 0 !important;
  margin-top: -1px !important; /* Плотная стыковка "пиксель в пиксель" */
  
  /* Прилегание к самому низу модалки */
  border-bottom-left-radius: calc(0.5rem - 1px) !important;
  border-bottom-right-radius: calc(0.5rem - 1px) !important;
}

/* Первый ряд текста */
.nano-row.fw-bold {
  font-size: 0.75rem !important;
  margin-bottom: 2px !important;
  line-height: 1 !important;
}

/* Второй ряд текста */
.shop-features {
  font-size: 0.65rem !important;
  gap: 8px !important;
  line-height: 1 !important;
}

/* Текст примечания */
.footer-note {
  font-size: 0.65rem !important;
  line-height: 1 !important;
  color: #6c757d !important;
  margin: 0 !important;
  text-align: center !important;
}

/* Фикс для родителя: убираем белую полосу в самом низу */
.modal-content {
  overflow: hidden !important; 
  padding-bottom: 0 !important;
}

.modal-body {
  padding-bottom: 0 !important;
}



/* Иконки мессенджеров */
/* ====================== Контакты ====================== */
.contacts address {
  display: flex;
  flex-direction: column; /* строки сверху вниз */
  align-items: center; /* центр по горизонтали */
  text-align: center; /* текст внутри ссылок */
  font-style: normal; /* убрать курсив по умолчанию */
  line-height: 1.6;
  color: #222;
}
.contact-row {
  display: flex;
  align-items: center;
  justify-content: center; /* выравнивание содержимого по центру */
  flex-wrap: wrap;
  margin-bottom: 5px;
}
.contact-row img.icon-contact {
  width: 20px;
  height: 20px;
  margin-right: 8px;
  vertical-align: middle;
}
.contact-link {
  color: #222;
  text-decoration: none;
  font-weight: 500;
  margin-right: 10px;
}
.contact-link:hover {
  color: #007bff; /* синий при наведении */
}
/* ====================== Мессенджеры ====================== */
.messenger-link {
  margin-left: 5px;
}
.icon-messenger {
  width: 25px;
  height: 25px;
  vertical-align: middle;
  cursor: pointer;
  transition: transform 0.3s;
}
.icon-messenger:hover {
  transform: scale(1.4);
}
/* ====================== Соцсети ====================== */
.social-icons {
  margin-top: 8px;
}
.icon-social {
  width: 30px;
  height: 30px;
  margin-right: 10px;
  vertical-align: middle;
  transition: transform 0.3s;
}
.icon-social:hover {
  transform: scale(1.2);
}
/* ====================== Карта ====================== */
.map-container {
  margin-top: 20px;
  text-align: center;
}
.map-container .map-preview {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s;
  cursor: pointer;
}
.map-container .map-preview:hover {
  transform: scale(1.05);
}
.d-flex.gap-2 {
  font-size: 0.9rem;
  color: #665f42; /* меняем цвет текста и цифр */
  font-weight: 500;
}
.status-bar {
  font-size: 0.9rem; /* размер текста */
  color: #5f5c4e; /* любой цвет для всего блока, например золотой */
  align-items: center;
}
.d-flex.gap-2 b {
  font-size: 0.9rem;
  font-weight: 400;
}
#weather img {
  margin-left: 5px; /* отступ иконки погоды */
}
.modal.fade .modal-dialog {
  transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94) !important;
}
.modal-backdrop.fade {
  transition: none !important;
}
.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
#productPreview {
  padding: 30px 25px 25px !important; /* ✅ 30px сверху */
  max-height: 80vh;
  overflow-y: auto;
}

#productPreview h5 {
  margin-top: 0 !important;
  margin-bottom: 15px;
}

#productPreview img {
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}
/* Отступ от верха экрана для Fancybox при клике на фото карточки */

/* Анимация для самой кнопки "Поделиться" */
#productShareBtn {
  margin-right: 15px;
  transition: transform 0.2s ease-in-out !important;
  display: flex;
  align-items: center;
  justify-content: center;
  transform-origin: center; /* Гарантирует рост из центра */
  
  /* ✅ КРИТИЧЕСКИЕ ИСПРАВЛЕНИЯ ДЛЯ ПРЕДОТВРАЩЕНИЯ 0x0 */
  width: 24px !important;       /* Задаем явную ширину */
  height: 24px !important;      /* Задаем явную высоту */
  flex-shrink: 0 !important;    /* Запрещаем Flexbox сжимать кнопку */
}

#productShareBtn:hover {
  /* Только увеличение в 1.07 раза */
  transform: scale(1.3);
}

#productShareBtn:hover img {
  filter: brightness(1.25); /* Легкий блеск при наведении */
}

/* Обновим стили меню (для иконок мессенджеров), чтобы всё было в едином стиле */

/* ==== Меню мессенджеров ==== */

/* ===== БЛОК ГРАФИКА РАБОТЫ ===== */
/* Общий контейнер */
#workScheduleBlock {
  margin-top: 1rem;
  text-align: center;
  font-size: 1rem;
  line-height: 1.2;
}

.workScheduleDay,
.workScheduleTitle {
  color: #000;
}

#workStatus {
  display: flex;
  /* Центрирование по вертикали всех детей */
  align-items: center;
  /* Центрирование по горизонтали */
  justify-content: center;
  gap: 0.5rem;
  font-weight: 600;
  font-size: 1rem;
  margin-top: 0.5rem;
  /* Важно: обнуляем line-height, чтобы он не создавал лишнее пространство сверху/снизу */
  line-height: 1;
}

.status-dot {
  width: 0.6em;
  height: 0.6em;
  border-radius: 50%;
  /* Убираем возможные смещения */
  display: inline-block;
  flex-shrink: 0;
}

.status-text {
  /* Убеждаемся, что текст не имеет своих отступов */
  margin: 0;
  display: inline-block;
}

.status-time {
  font-weight: normal;
  font-size: 1rem;
  color: #313131;
  /* Убеждаемся, что время тоже в линии */
  display: inline-block;
}

/* ЦВЕТА С ПРИОРИТЕТОМ */
#workStatus.opened .status-text {
  color: #28a745 !important;
}
#workStatus.opened .status-dot {
  background-color: #28a745;
}

#workStatus.closed .status-text {
  color: #ff0019 !important;
}
#workStatus.closed .status-dot {
  background-color: #ff0019;
}
/* Современный бейдж SALE 2026 */
.badge-sale {
  position: absolute !important;
  top: 6px !important; /* Прижали ближе к углу */
  left: 6px !important;
  background: linear-gradient(135deg, #ff0f7b 0%, #f8931f 100%) !important;
  color: #fff !important;
  padding: 1px 7px !important; /* Минимальные отступы */
  font-size: 0.55rem !important; /* Микро-шрифт */
  font-weight: 900 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.3px !important;
  border-radius: 50px !important;
  z-index: 20 !important;
  box-shadow: 0 2px 8px rgba(255, 15, 123, 0.3) !important;
  pointer-events: none !important;
  animation: badge-pulse 2s infinite !important;
}

/* Эффект легкого пульсирования для привлечения внимания */
@keyframes badge-pulse {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.1);
  }
  100% {
    transform: scale(1);
  }
}

@media (max-width: 480px) {
  .badge-sale {
    top: 5px !important; /* Еще ближе к углу */
    left: 5px !important;
    padding: 1px 6px !important; /* Минимальные отступы */
    font-size: 0.5rem !important; /* Очень маленький шрифт для телефона */
    box-shadow: 0 2px 6px rgba(255, 15, 123, 0.2) !important;
    letter-spacing: 0.2px !important;
  }
}

/* Общие стили для ссылок внутри блока */
#path-box-fixed {
    position: fixed !important;
    left: 20px !important;        /* Отступ на десктопе */
    top: 200px !important;         /* 10px под навбаром */
    display: flex !important;
    flex-direction: row !important; /* В ОДНУ ЛИНИЮ */
    align-items: center;
    gap: 0;                       /* Убираем зазоры */
    margin: 0 !important;
    padding: 15px 5px !important;
    background: rgba(255, 255, 255, 0.9) !important;
    border-radius: 8px;
    box-shadow: 2px 0 10px rgba(0,0,0,0.1) !important;
    z-index: 2000 !important;
    width: min-content;
}

#path-box-fixed a {
    color: #626161 !important;       /* ТЕМНО-СЕРЫЙ */
    text-decoration: none !important;
    font-weight: 600;
    font-size: 13px;
    writing-mode: vertical-rl !important; /* Текст боком */
    text-orientation: upright !important;  /* БУКВА ПОД БУКВОЙ */
    text-transform: uppercase;
    line-height: 1;
    display: inline-block;
    padding: 5px 0;  
    letter-spacing: -2px !important;              /* Отступ между словами в строке */
}

/* Скрываем слеши, они в вертикали только мешают */
#path-box-fixed span {
    display: none !important;
}

@media (max-width: 768px) {
    #path-box-fixed {
        color: #626161 !important;
        left: 5px !important;
        top: 50% !important; /* НА МОБИЛКЕ ОСТАВЛЯЕМ СБОКУ ЦЕНТРАЛЬНО */
        transform: translateY(-50%) !important;
        flex-direction: column !important;
        width: min-content !important;
        padding: 10px 5px !important;
    }
    #path-box-fixed a {
        writing-mode: vertical-rl !important;
        text-orientation: upright !important;
        text-transform: uppercase;
    }
    #path-box-fixed span {
        display: none !important;
    }
}

/* 1. Убираем второй скролл и конфликт с gutter страницы */
/* 1. Убираем конфликт с gutter (второй скролл у края экрана) */
html.modal-open {
  scrollbar-gutter: auto !important;
  overflow: hidden !important;
}

/* 2. Уменьшаем высоту карты, чтобы модалка стала короткой */
.map-container, #googleMap {
  height: 250px !important; /* Уменьшили с 300/400 до 250 */
  min-height: 250px !important;
  margin-top: 10px !important;
  margin-bottom: 25px !important; /* Отступ снизу */
}

/* 3. Для мобильных (самый жесткий фикс высоты) */
@media (max-width: 767px) {
  .map-container, #googleMap {
    height: 220px !important;
    min-height: 220px !important;
  }
  #mainModalBody {
    padding-bottom: 35px !important;
  }
}

/* Прозрачный кружок AI */
#ai-circle {
    position: fixed;
    bottom: 25px;
    right: 25px; /* Перенесено направо */
    width: 70px;
    height: 70px;
    background: rgba(255, 255, 255, 0.2); /* Прозрачность */
    backdrop-filter: blur(10px); /* Эффект стекла */
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 9999;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

#ai-circle:hover {
    transform: scale(1.1);
    background: rgba(255, 255, 255, 0.3);
}

#ai-circle span {
    color: #fff;
    font-size: 11px;
    font-weight: bold;
    text-align: center;
    line-height: 1.2;
    text-shadow: 0 1px 2px rgba(0,0,0,0.2);
    pointer-events: none; /* Чтобы текст не мешал клику */
}

/* Окно чата */
#ai-chat-box {
    display: none; /* Скрыто по умолчанию */
    position: fixed;
    bottom: 105px;
    right: 25px; /* Перенесено направо */
    width: 320px;
    height: 450px;
    background: #fff;
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    z-index: 10000;
    flex-direction: column;
    overflow: hidden;
    font-family: 'Segoe UI', Roboto, sans-serif;
}

#ai-chat-header {
    background: #2c3e50;
    color: #fff;
    padding: 15px;
    font-weight: bold;
    display: flex;
    justify-content: space-between;
}

#ai-chat-messages {
    flex: 1;
    padding: 15px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: #f9f9f9;
}

/* Стили сообщений */
.msg {
    padding: 10px 14px;
    border-radius: 15px;
    max-width: 85%;
    font-size: 14px;
    line-height: 1.4;
}

.msg.user {
    align-self: flex-end;
    background: #27ae60;
    color: white;
    border-bottom-right-radius: 2px;
}

.msg.ai {
    align-self: flex-start;
    background: #ecf0f1;
    color: #2c3e50;
    border-bottom-left-radius: 2px;
}

/* Поле ввода */
#ai-chat-input-area {
    border-top: 1px solid #eee;
    display: flex;
    padding: 12px;
    background: #fff;
}

#ai-chat-input {
    flex: 1;
    border: 1px solid #ddd;
    border-radius: 20px;
    outline: none;
    padding: 8px 15px;
    font-size: 14px;
}

#ai-send-btn {
    background: #27ae60;
    border: none;
    color: #fff;
    margin-left: 8px;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

#ai-send-btn:hover { background: #219150; }






