/* ===== MODERN CATALOG STYLES (сохраняя оригинальную стилистику) ===== */

/* Обновленные переменные с оригинальными цветами */
:root {
  --color-primary: #000000;
  --color-secondary: #ffffff;
  --color-accent: #ff0000;
  --color-gray: #e6e6e6;
  --color-dark-gray: #7b899a;
  --color-light-gray: #f7f6f7;
  --color-text: #000000;
  
  /* Новые переменные для улучшений */
  --shadow-subtle: 0 2px 10px rgba(0, 0, 0, 0.08);
  --shadow-hover: 0 5px 20px rgba(0, 0, 0, 0.12);
  --transition-smooth: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --border-radius: 8px;
  --border-radius-lg: 12px;
}

/* ===== ОБНОВЛЕННЫЕ БАЗОВЫЕ СТИЛИ ===== */
.page--catalog {
  background: var(--color-secondary);
  font-family: 'Roboto', 'Segoe UI', Arial, sans-serif;
  color: var(--color-text);
  line-height: 1.6;
}
.header {
  position: relative;
  z-index: 20; /* Хедер должен быть выше крошек */
}
.main--catalog {
  padding-top: 0;
}

/* ===== ОБНОВЛЕННЫЕ ХЛЕБНЫЕ КРОШКИ ===== */
.breadcrumbs {
  padding: 30px 90px 25px;
  background: var(--color-secondary);
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  position: relative;
  z-index: 10; /* Добавляем z-index чтобы были над другими элементами */
  margin-top: 0; /* Убедимся что нет отступа сверху */
}

.breadcrumbs__container {
  max-width: 1920px;
  margin: 0 auto;
  padding: 0 40px;
}

.breadcrumbs__list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  align-items: center;
  font-family: 'Roboto', sans-serif;
  font-weight: 400;
  font-size: 14px;
}

.breadcrumbs__item {
  display: inline-flex;
  align-items: center;
  position: relative;
}

.breadcrumbs__item:not(:last-child)::after {
  content: "›";
  font-size: 16px;
  margin: 0 8px;
  color: var(--color-dark-gray);
  font-weight: 300;
}

.breadcrumbs__link {
  color: var(--color-primary);
  text-decoration: none;
  padding: 4px 8px;
  border-radius: 4px;
  transition: all var(--transition-smooth);
  font-weight: 500;
}

.breadcrumbs__link:hover {
  color: var(--color-accent);
  background: rgba(255, 0, 0, 0.05);
}

.breadcrumbs__current {
  color: var(--color-accent);
  font-weight: 600;
  padding: 4px 12px;
  background: rgba(255, 0, 0, 0.05);
  border-radius: var(--border-radius);
}

/* ===== ОБНОВЛЕННЫЙ МАКЕТ КАТАЛОГА ===== */
.catalog-page {
  background: var(--color-secondary);
  padding: 40px 0 80px;
}

.catalog-page__container {
  max-width: 1920px;
  margin: 0 auto;
  padding: 0 40px;
}

.catalog-page__layout {
  display: flex;
  gap: 60px;
  position: relative;
}

/* ===== ОБНОВЛЕННЫЙ САЙДБАР ===== */
.catalog-sidebar {
  flex: 0 0 320px;
  position: sticky;
  top: 40px;
  align-self: flex-start;
  background: #222;
  border: 1px solid var(--color-gray);
  border-radius: var(--border-radius-lg);
  padding: 0;
  box-shadow: var(--shadow-subtle);
  transition: box-shadow var(--transition-smooth);
}

.catalog-sidebar:hover {
  box-shadow: var(--shadow-hover);
}

.catalog-sidebar__mobile-toggle {
  display: none;
}

.catalog-sidebar__toggle-btn {
  display: none;
}

.catalog-sidebar__content {
  padding: 25px 0;
}

/* ===== ОБНОВЛЕННОЕ МЕНЮ КАТАЛОГА ===== */
.catalog-menu__title {
  display: none;
}

.catalog-menu__list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.catalog-menu__item {
  margin: 0;
  border-left: 3px solid transparent;
  transition: all var(--transition-smooth);
  position: relative;
  overflow: hidden;
}

.catalog-menu__item:not(:last-child) {
  border-bottom: 1px solid rgba(230, 230, 230, 0.5);
}

.catalog-menu__item:hover {
  border-left-color: var(--color-accent);
  background: rgba(255, 0, 0, 0.02);
}

.catalog-menu__item--current {
  border-left-color: var(--color-accent);
  background: linear-gradient(90deg, rgba(255, 0, 0, 0.05) 0%, rgba(255, 0, 0, 0.02) 100%);
}

.catalog-menu__item--current .catalog-menu__link {
  color: var(--color-accent);
  font-weight: 600;
}

.catalog-menu__item--current::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--color-accent);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

.catalog-menu__link {
  display: flex;
  align-items: center;
  padding: 16px 30px 16px 40px;
  color: #f7f6f7;
  font-family: 'Roboto', sans-serif;
  font-size: 14px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: all var(--transition-smooth);
  position: relative;
}

.catalog-menu__link:hover {
  color: var(--color-accent);
  transform: translateX(5px);
}

.catalog-menu__link::before {
  content: "→";
  position: absolute;
  left: 20px;
  opacity: 0;
  transition: all var(--transition-smooth);
  color: var(--color-accent);
}

.catalog-menu__item:hover .catalog-menu__link::before,
.catalog-menu__item--current .catalog-menu__link::before {
  opacity: 1;
  left: 15px;
}

/* ===== ОБНОВЛЕННЫЙ КОНТЕНТ КАТАЛОГА ===== */
.catalog-content {
  flex: 1;
  min-width: 0;
  animation: fadeInUp 0.5s ease-out;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ===== ОБНОВЛЕННЫЙ ЗАГОЛОВОК КАТАЛОГА ===== */
.catalog-header {
  margin-bottom: 40px;
  border-bottom: 1px solid var(--color-gray);
  padding-bottom: 30px;
}

.catalog-header__title {
  font-family: 'Roboto Condensed', sans-serif;
  font-size: 42px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--color-primary);
  margin: 0 0 25px 0;
  padding-bottom: 15px;
  position: relative;
  letter-spacing: 1px;
}

.catalog-header__title::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 80px;
  height: 3px;
  background: var(--color-accent);
}

/* ===== ОБНОВЛЕННОЕ ОПИСАНИЕ ===== */
.catalog-description {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 40px;
  align-items: start;
  margin-bottom: 50px;
}

.catalog-description__image {
  position: relative;
  overflow: hidden;
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-subtle);
  transition: all var(--transition-smooth);
}

.catalog-description__image:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-hover);
}

.catalog-description__image::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(45deg, transparent 40%, rgba(255, 0, 0, 0.05) 100%);
  z-index: 1;
  pointer-events: none;
}

.catalog-description__img {
  width: 100%;
  height: 210px;
  object-fit: contain;
  display: block;
  transition: transform 0.8s ease;
}

.catalog-description__image:hover .catalog-description__img {
  transform: scale(1.05);
}

.catalog-description__text {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.catalog-description__text p {
  font-family: 'Roboto', sans-serif;
  font-size: 17px;
  line-height: 1.7;
  color: var(--color-text);
  margin: 0;
  position: relative;
  padding-left: 24px;
}

.catalog-description__text p::before {
  content: "•";
  position: absolute;
  left: 0;
  top: 0;
  color: var(--color-accent);
  font-size: 24px;
  line-height: 1;
}

/* ===== ОБНОВЛЕННАЯ ГАЛЕРЕЯ ===== */
.catalog-gallery {
  margin-bottom: 60px;
  position: relative;
}

.catalog-gallery__title {
  display: none;
}

/* ===== СТИЛИ ЗАГРУЗКИ ===== */
.category-loading {
  padding: 60px 20px;
  text-align: center;
  background: var(--color-light-gray);
  border-radius: var(--border-radius-lg);
  border: 1px solid var(--color-gray);
  display: none;
}

.category-loading--active {
  display: block;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.loading-spinner {
  width: 50px;
  height: 50px;
  border: 3px solid var(--color-gray);
  border-top-color: var(--color-accent);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 20px;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.category-content--loading {
  opacity: 0.7;
  pointer-events: none;
  filter: blur(1px);
}

/* ===== УТИЛИТЫ ===== */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.text-center {
  text-align: center;
}

/* ===== СТИЛИ ДЛЯ СЛАЙДЕРА (ОСНОВНЫЕ) ===== */
.gallery-slider {
  position: relative;
  margin: 30px 0;
  min-height: 300px;
}

.gallery-slides {
  position: relative;
  width: 100%;
  overflow: hidden;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
}

.gallery-slide {
  display: none;
  width: 100%;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.gallery-slide[style*="display: block"] {
  display: block;
  opacity: 1;
  transform: translateY(0);
  animation: slideUp 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

@keyframes slideUp {
  from { 
    opacity: 0;
    transform: translateY(15px);
  }
  to { 
    opacity: 1;
    transform: translateY(0);
  }
}

.gallery-image {
  width: 100%;
  height: auto;
  max-height: 550px;
  object-fit: contain;
  border-radius: 8px;
  background: linear-gradient(45deg, #f8f9fa, #e9ecef);
  box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.05);
  display: block;
  margin: 0 auto;
}

.gallery-counter {
  position: absolute;
  bottom: 20px;
  right: 20px;
  background: rgba(255, 0, 0, 0.85);
  color: white;
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.5px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(4px);
}

.gallery-nav {
  display: flex;
  gap: 15px;
  margin-top: 20px;
  align-items: center;
}

.gallery-prev,
.gallery-next {
  background: #ff0000;
  color: white;
  border: none;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 12px rgba(255, 0, 0, 0.25);
  position: relative;
  overflow: hidden;
}

.gallery-prev::after,
.gallery-next::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  transform: scale(0);
  transition: transform 0.3s ease;
}

.gallery-prev:hover,
.gallery-next:hover {
  background: #cc0000;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(255, 0, 0, 0.35);
}

.gallery-prev:hover::after,
.gallery-next:hover::after {
  transform: scale(1);
}

.gallery-prev:active,
.gallery-next:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(255, 0, 0, 0.3);
}

.gallery-thumbs {
  display: flex;
  gap: 12px;
  margin-top: 20px;
  padding: 15px;
  overflow-x: auto;
  scrollbar-width: thin;
  scrollbar-color: #ff0000 #f1f1f1;
  background: #ffffff;
  border-radius: 10px;
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.08);
}

.gallery-thumbs::-webkit-scrollbar {
  height: 6px;
}

.gallery-thumbs::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 3px;
}

.gallery-thumbs::-webkit-scrollbar-thumb {
  background: #ff0000;
  border-radius: 3px;
}

.gallery-thumbs::-webkit-scrollbar-thumb:hover {
  background: #cc0000;
}

.gallery-thumb {
  flex: 0 0 90px;
  height: 70px;
  border: 3px solid transparent;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.3s ease;
  background: #ffffff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  position: relative;
}

.gallery-thumb::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 0, 0, 0);
  transition: background 0.3s ease;
  z-index: 1;
}

.gallery-thumb.active {
  border-color: #ff0000;
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(255, 0, 0, 0.25);
}

.gallery-thumb.active::before {
  background: rgba(255, 0, 0, 0.1);
}

.gallery-thumb:hover {
  border-color: #cc0000;
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

.gallery-thumb-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.gallery-thumb:hover .gallery-thumb-img {
  transform: scale(1.05);
}

.gallery-empty {
  text-align: center;
  padding: 60px 30px;
  color: #666;
  background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.gallery-empty__icon {
  font-size: 64px;
  margin-bottom: 25px;
  opacity: 0.7;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.1); }
  100% { transform: scale(1); }
}

.gallery-empty__text {
  font-size: 18px;
  margin-bottom: 12px;
  color: #444;
  font-weight: 500;
  line-height: 1.5;
}

.gallery-empty__hint {
  font-size: 14px;
  color: #888;
  margin-top: 10px;
}

/* ===== ОБНОВЛЕННЫЕ КНОПКИ ДЕЙСТВИЙ ===== */
.catalog-actions {
  margin-bottom: 60px;
}

.catalog-actions__grid {
  display: flex;
  gap: 25px;
  justify-content: flex-start;
  flex-wrap: wrap;
}

.catalog-actions__button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 18px 35px;
  min-width: 240px;
  font-family: 'Roboto Condensed', sans-serif;
  font-size: 18px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  text-decoration: none;
  cursor: pointer;
  border: 2px solid transparent;
  border-radius: var(--border-radius);
  transition: all var(--transition-smooth);
  position: relative;
  overflow: hidden;
}

.catalog-actions__button::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.catalog-actions__button:hover::before {
  width: 300px;
  height: 300px;
}

.catalog-actions__button--primary {
  background: var(--color-primary);
  color: var(--color-secondary);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.catalog-actions__button--primary:hover {
  background: var(--color-accent);
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(255, 0, 0, 0.3);
}

.catalog-actions__button--secondary {
  background: var(--color-secondary);
  color: var(--color-primary);
  border-color: var(--color-primary);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.catalog-actions__button--secondary:hover {
  background: var(--color-primary);
  color: var(--color-secondary);
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.catalog-actions__button--primary::after {
  content: "✉";
  font-size: 20px;
  transition: transform var(--transition-smooth);
}

.catalog-actions__button--secondary::after {
  content: "📞";
  font-size: 20px;
  transition: transform var(--transition-smooth);
}

.catalog-actions__button:hover::after {
  transform: scale(1.2) rotate(10deg);
}

/* ===== ОБНОВЛЕННОЕ СООБЩЕНИЕ "ПУСТО" ===== */
.catalog-empty {
  text-align: center;
  padding: 60px 40px;
  background: linear-gradient(135deg, var(--color-light-gray) 0%, var(--color-secondary) 100%);
  border: 2px dashed var(--color-gray);
  border-radius: var(--border-radius-lg);
  margin: 40px 0;
}

.catalog-empty__message {
  max-width: 600px;
  margin: 0 auto;
}

.catalog-empty__icon {
  font-size: 64px;
  color: var(--color-dark-gray);
  margin-bottom: 20px;
  display: block;
  animation: bounce 2s infinite;
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

.catalog-empty__text {
  font-family: 'Roboto Condensed', sans-serif;
  font-size: 24px;
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: 15px;
  line-height: 1.3;
}

.catalog-empty__hint {
  font-family: 'Roboto', sans-serif;
  font-size: 17px;
  color: var(--color-dark-gray);
  line-height: 1.6;
}

/* ===== АДАПТИВНОСТЬ ===== */

/* Большие планшеты и маленькие десктопы (992px - 1199px) */
@media (max-width: 1199px) {
  .breadcrumbs {
    padding: 25px 40px 20px;
  }
  
  .breadcrumbs__container,
  .catalog-page__container {
    padding: 0 30px;
  }
  
  .catalog-page__layout {
    gap: 40px;
  }
  
  .catalog-sidebar {
    flex: 0 0 280px;
  }
  
  .catalog-header__title {
    font-size: 36px;
  }
  
  .catalog-description {
    grid-template-columns: 280px 1fr;
    gap: 30px;
  }
}

/* Планшеты (768px - 991px) */
@media (max-width: 991px) {
  .breadcrumbs {
    padding: 20px 20px 15px;
  }
  
  .breadcrumbs__container,
  .catalog-page__container {
    padding: 0 20px;
  }
  
  .catalog-page__layout {
    flex-direction: column;
    gap: 30px;
  }
  
  .catalog-sidebar {
    flex: 0 0 auto;
    width: 100%;
    position: static;
    margin-bottom: 20px;
  }
  
   .catalog-sidebar__mobile-toggle {
    display: block;
    width: 100%;
  }
  
  .catalog-sidebar__toggle-btn {
    display: block;
    width: 100%;
    padding: 16px 20px;
    background: var(--color-primary);
    color: var(--color-secondary);
    border: 2px solid var(--color-primary);
    border-radius: var(--border-radius);
    font-family: 'Roboto Condensed', sans-serif;
    font-size: 16px;
    font-weight: 600;
    text-transform: uppercase;
    cursor: pointer;
    transition: all var(--transition-smooth);
    text-align: left;
    position: relative;
    margin-bottom: 0;
  }
  
  .catalog-sidebar__toggle-btn:hover {
    background: var(--color-accent);
    border-color: var(--color-accent);
  }
  
  .catalog-sidebar__toggle-btn::after {
    content: "▼";
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 12px;
    transition: transform var(--transition-smooth);
  }
  
  .catalog-sidebar__toggle-btn--open::after {
    transform: translateY(-50%) rotate(180deg);
  }
  
  /* ИСПРАВЛЕНО: Добавляем !important чтобы перебить другие стили */
  .catalog-sidebar__content {
    display: none !important;
    margin-top: 10px;
    border: 1px solid var(--color-gray);
    border-radius: var(--border-radius);
    padding: 15px 0;
    background: var(--color-secondary);
    animation: slideDown 0.6s ease;
    max-height: 400px;
    overflow-y: auto;
  }
  
  /* ИСПРАВЛЕНО: Добавляем класс для показа */
  .catalog-sidebar__content--open {
    display: block !important;
    color: var(--color-primary);
  }
   .catalog-sidebar__content--open a{
    color: var(--color-primary);
  }
  
  @keyframes slideDown {
    from {
      opacity: 0;
      transform: translateY(-10px);
      max-height: 0;
    }
    to {
      opacity: 1;
      transform: translateY(0);
      max-height: 400px;
    }
  }
  
  .catalog-header__title {
    font-size: 30px;
    text-align: center;
  }
  
  .catalog-header__title::after {
    left: 50%;
    transform: translateX(-50%);
  }
  
  .catalog-description {
    grid-template-columns: 1fr;
    gap: 30px;
  }
  
  .catalog-description__image {
    max-width: 400px;
    margin: 0 auto;
  }
  
  /* Мобильный слайдер */
  /* На мобильных: показываем стрелки + счетчик 1/3, прячем только превью */
  .gallery-thumbs {
    display: none;
  }

  .gallery-nav {
    display: flex;
  }

  /* Если навигация внутри слайдов (мобильная версия) */
  .gallery-nav--mobile {
    position: absolute;
    left: 10px;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    justify-content: space-between;
    pointer-events: none;
    margin: 0;
    z-index: 5;
  }

  .gallery-nav--mobile .gallery-prev,
  .gallery-nav--mobile .gallery-next {
    pointer-events: auto;
    width: 44px;
    height: 44px;
    font-size: 22px;
  }

  .gallery-counter {
    display: block;
  }

  .gallery-counter--mobile {
    position: absolute;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    right: auto;
    z-index: 6;
  }

  .gallery-image {
    max-height: 350px;
    cursor: grab;
    -webkit-tap-highlight-color: transparent;
    -webkit-user-select: none;
    user-select: none;
  }

  .gallery-slides {
    touch-action: pan-y;
    -webkit-overflow-scrolling: touch;
  }

.catalog-actions__grid {
    justify-content: center;
  }
}

/* Мобильные (576px - 767px) */
@media (max-width: 767px) {
  .breadcrumbs {
    padding: 15px 15px 10px;
  }
  
  .breadcrumbs__list {
    font-size: 12px;
    flex-wrap: wrap;
  }
  
  .catalog-page {
    padding: 20px 0 40px;
  }
  
  .catalog-header__title {
    font-size: 26px;
    margin-bottom: 20px;
  }
  
  .catalog-description__text p {
    font-size: 16px;
    padding-left: 20px;
  }
  
  .catalog-description__img {
    height: 280px;
  }
  
  .gallery-image {
    max-height: 300px;
  }
  
  .catalog-actions__button {
    min-width: 200px;
    padding: 16px 25px;
    font-size: 16px;
  }
  
  .catalog-empty {
    padding: 40px 20px;
  }
  
  .catalog-empty__text {
    font-size: 20px;
  }
}

/* Маленькие мобильные (до 575px) */
@media (max-width: 575px) {
  .breadcrumbs {
    padding: 12px 10px 8px;
  }
  
  .breadcrumbs__container,
  .catalog-page__container {
    padding: 0 15px;
  }
  
  .catalog-header__title {
    font-size: 22px;
  }
  
  .catalog-description__image {
    max-width: 100%;
  }
  
  .catalog-description__img {
    height: 250px;
  }
  
  .gallery-image {
    max-height: 250px;
  }
  
  .catalog-actions__grid {
    flex-direction: column;
    align-items: center;
  }
  
  .catalog-actions__button {
    width: 100%;
    max-width: 300px;
    min-width: auto;
  }
  
  .catalog-empty {
    padding: 30px 15px;
    margin: 20px 0;
  }
  
  .catalog-empty__icon {
    font-size: 48px;
  }
  
  .catalog-empty__text {
    font-size: 18px;
  }
  
  .catalog-empty__hint {
    font-size: 15px;
  }
}

/* ===== ПЛАВНАЯ ПРОКРУТКА ===== */
html {
  scroll-behavior: smooth;
}

/* ===== СТИЛИ ВЫДЕЛЕНИЯ ===== */
::selection {
  background-color: rgba(255, 0, 0, 0.2);
  color: var(--color-primary);
}

/* ===== СКРОЛЛБАР ===== */
::-webkit-scrollbar {
  width: 10px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--color-light-gray);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb {
  background: var(--color-dark-gray);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--color-accent);
}

/* ===== АНИМАЦИИ НАВЕДЕНИЯ ===== */
.catalog-menu__item,
.catalog-description__image,
.gallery-thumb,
.catalog-actions__button {
  will-change: transform, opacity, box-shadow;
  backface-visibility: hidden;
}


/* ===== FIX: ФИКСИРОВАННЫЙ РАЗМЕР КОНТЕЙНЕРА ГАЛЕРЕИ (чтобы не прыгали стрелки и счетчик) ===== */
/* Контейнер со слайдами имеет фиксированную высоту, фото вписываются внутрь */
.catalog-gallery .gallery-slides{
  position: relative;
  width: 100%;
  height: clamp(240px, 55vw, 550px); /* единая высота, не зависит от размера фото */
  overflow: hidden;
}

/* Каждый слайд занимает всю высоту контейнера */
.catalog-gallery .gallery-slide{
  height: 100%;
}

/* Фото всегда заполняет контейнер по высоте/ширине и масштабируется */
.catalog-gallery .gallery-image{
  width: 100%;
  height: 100%;
  max-height: none;     /* убираем зависимость от высоты изображения */
  object-fit: contain;  /* видно все фото; если нужно без полей — поменяй на cover */
  display: block;
}

/* Счетчик закрепляем внутри контейнера и делаем цифры "ровными" по ширине */
.catalog-gallery .gallery-counter{
  position: absolute;
  z-index: 6;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* На мобильных: стрелки поверх фото (а не снизу), счетчик по центру снизу */
@media (max-width: 991px){
  .catalog-gallery{
    position: relative;
  }

  .catalog-gallery .gallery-nav{
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    transform: translateY(-50%);
    margin-top: 0;
    padding: 0 10px;
    justify-content: space-between;
    pointer-events: none; /* чтобы клики проходили только на кнопки */
    gap: 0;
    z-index: 7;
  }

  .catalog-gallery .gallery-prev,
  .catalog-gallery .gallery-next{
    pointer-events: auto;
  }

  .catalog-gallery .gallery-counter{
    left: 50%;
    right: auto;
    bottom: 12px;
    transform: translateX(-50%);
  }
}

/* ===== СТИЛИ ДЛЯ КНОПКИ ЛУПЫ И ПОЛНОЭКРАННОГО ПРОСМОТРА ===== */

/* Кнопка лупы на мобильных */
.gallery-zoom-btn {
  display: none; /* По умолчанию скрыта */
  position: absolute;
  bottom: 15px;
  left: 15px;
  z-index: 10;
  background: rgba(255, 0, 0, 0.9);
  color: white;
  border: none;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 20px;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(4px);
}

.gallery-zoom-btn:hover {
  background: rgba(204, 0, 0, 0.95);
  transform: scale(1.1);
}

/* Контейнер для полноэкранного просмотра */
.fullscreen-viewer {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.95);
  z-index: 9999;
  overflow: hidden;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.fullscreen-viewer--active {
  display: block;
  opacity: 1;
}

.fullscreen-viewer__container {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
}

/* Заголовок полноэкранного просмотра */
.fullscreen-viewer__header {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  padding: 20px;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.8), transparent);
  z-index: 10;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: white;
}

.fullscreen-viewer__title {
  font-family: 'Roboto', sans-serif;
  font-size: 16px;
  font-weight: 500;
  margin: 0;
  opacity: 0.9;
}

.fullscreen-viewer__close {
  background: rgba(255, 255, 255, 0.1);
  color: white;
  border: none;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  font-size: 24px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  backdrop-filter: blur(4px);
}

.fullscreen-viewer__close:hover {
  background: rgba(255, 0, 0, 0.7);
  transform: rotate(90deg);
}

/* Область для изображения с поддержкой зума */
.fullscreen-viewer__image-container {
  flex: 1;
  position: relative;
  overflow: hidden;
  touch-action: none;
  background-color: #000;
}

.fullscreen-viewer__image {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100% !important;
  height: 100% !important;
  object-fit: contain; /* Показывает всё изображение с полями */
  margin: auto;
  transition: transform 0.1s linear;
  cursor: move;
  will-change: transform;
  background-color: #000;
}

/* Счетчик в полноэкранном режиме */
.fullscreen-viewer__counter {
  position: absolute;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(255, 0, 0, 0.8);
  color: white;
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 500;
  z-index: 10;
  backdrop-filter: blur(4px);
}

/* Панель управления полноэкранным режимом */
.fullscreen-viewer__controls {
  position: absolute;
  bottom: 20px;
  left: 0;
  right: 0;
  padding: 0 20px;
  display: flex;
  justify-content: center;
  gap: 15px;
  z-index: 10;
}

.fullscreen-viewer__control-btn {
  background: rgba(255, 255, 255, 0.1);
  color: white;
  border: none;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  font-size: 24px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  backdrop-filter: blur(4px);
}

.fullscreen-viewer__control-btn:hover {
  background: rgba(255, 0, 0, 0.7);
  transform: scale(1.1);
}

/* Индикатор зума */
.fullscreen-viewer__zoom-indicator {
  position: absolute;
  bottom: 20px;
  right: 20px;
  background: rgba(255, 255, 255, 0.1);
  color: white;
  padding: 8px 12px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 500;
  z-index: 10;
  backdrop-filter: blur(4px);
  opacity: 0.8;
}

/* Жесты для мобильных */
.fullscreen-viewer__hint {
  position: absolute;
  bottom: 140px;
  left: 0;
  right: 0;
  text-align: center;
  color: rgba(255, 255, 255, 0.7);
  font-size: 14px;
  padding: 0 20px;
  z-index: 10;
  opacity: 0;
  animation: fadeInOut 3s ease-in-out;
}

@keyframes fadeInOut {
  0%, 100% { opacity: 0; }
  20%, 80% { opacity: 1; }
}

/* Подсказка при первом открытии */
.fullscreen-viewer__gesture-hint {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: rgba(255, 255, 255, 0.9);
  font-size: 18px;
  text-align: center;
  padding: 20px;
  background: rgba(0, 0, 0, 0.6);
  border-radius: 15px;
  z-index: 11;
  opacity: 0;
  animation: showHint 4s ease-in-out forwards;
  pointer-events: none;
}

@keyframes showHint {
  0% { opacity: 0; }
  10%, 90% { opacity: 1; }
  100% { opacity: 0; }
}

.fullscreen-viewer__gesture-hint-text {
  margin: 0;
  line-height: 1.5;
}

/* Адаптивные стили */
@media (max-width: 991px) {
  .gallery-zoom-btn {
    display: flex; /* Показываем кнопку лупы только на мобильных */
  }
  
  .gallery-slides {
    cursor: pointer; /* Показываем, что можно нажать */
  }
  
  .fullscreen-viewer__controls {
    bottom: 15px;
    gap: 10px;
  }
  
  .fullscreen-viewer__control-btn {
    width: 44px;
    height: 44px;
    font-size: 20px;
  }
  
  .fullscreen-viewer__counter {
    bottom: 70px;
  }
  
  .fullscreen-viewer__zoom-indicator {
    bottom: 15px;
    right: 15px;
  }
  
  .fullscreen-viewer__hint {
    bottom: 120px;
    font-size: 12px;
  }
}

@media (max-width: 575px) {
  .gallery-zoom-btn {
    width: 40px;
    height: 40px;
    font-size: 18px;
    bottom: 10px;
    left: 10px;
  }
  
  .fullscreen-viewer__header {
    padding: 15px;
  }
  
  .fullscreen-viewer__title {
    font-size: 14px;
  }
  
  .fullscreen-viewer__close {
    width: 40px;
    height: 40px;
    font-size: 20px;
  }
  
  .fullscreen-viewer__control-btn {
    width: 40px;
    height: 40px;
    font-size: 18px;
  }
  
  .fullscreen-viewer__counter {
    bottom: 60px;
    font-size: 12px;
    padding: 6px 12px;
  }
  
  .fullscreen-viewer__zoom-indicator {
    bottom: 10px;
    right: 10px;
    font-size: 11px;
    padding: 6px 10px;
  }
  
  .fullscreen-viewer__hint {
    bottom: 100px;
    font-size: 11px;
  }
  
  .fullscreen-viewer__gesture-hint {
    font-size: 16px;
    padding: 15px;
  }
}

/* Отключаем выделение текста в области просмотра */
.fullscreen-viewer__image-container {
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

/* Анимация открытия/закрытия */
@keyframes zoomIn {
  from {
    transform: scale(0.8);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

.fullscreen-viewer__image {
  animation: zoomIn 0.3s ease-out;
}

/* Анимация для кнопки лупы */
@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(255, 0, 0, 0.7);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(255, 0, 0, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(255, 0, 0, 0);
  }
}

.gallery-zoom-btn--pulse {
  animation: pulse 2s infinite;
}

/* ===== КНОПКА ЛУПЫ ДЛЯ МОБИЛЬНЫХ ===== */
.gallery-zoom-btn {
   /* По умолчанию скрыта на десктопе */
  position: absolute;
  bottom: 20px;
  left: 20px;
  z-index: 10;
  background: rgba(255, 0, 0, 0.9);
  color: white;
  border: none;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.gallery-zoom-btn:hover {
  background: rgba(204, 0, 0, 0.95);
  transform: scale(1.1);
}

.gallery-zoom-btn:active {
  transform: scale(0.95);
}

/* Показываем кнопку только на мобильных */
@media (max-width: 991px) {
  .gallery-zoom-btn {
    display: flex !important; /* Важно перебить display: none */
    opacity: 1;
    visibility: visible;
  }
}

/* Анимация пульсации для привлечения внимания */
@keyframes pulse-glow {
  0% {
    box-shadow: 0 0 0 0 rgba(255, 0, 0, 0.7);
  }
  70% {
    box-shadow: 0 0 0 15px rgba(255, 0, 0, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(255, 0, 0, 0);
  }
}

.gallery-zoom-btn--pulse {
  animation: pulse-glow 2s infinite;
}

/* Для очень маленьких экранов */
@media (max-width: 575px) {
  .gallery-zoom-btn {
    width: 44px;
    height: 44px;
    font-size: 20px;
    bottom: 15px;
    left: 15px;
  }
}

