/* ==================== ЭКО-КАТАЛОГ - ОСНОВНЫЕ ПЕРЕМЕННЫЕ ==================== */
:root {
  /* Эко-палитра цветов */
  --primary-green: #4a7c59;
  --light-green: #7fb069;
  --accent-green: #90c695;
  --soft-beige: #f8f6f0;
  --cream-white: #fefefe;
  --warm-grey: #e8e6e0;
  --text-dark: #2c3e2d;
  --text-light: #6b7c6e;
  --shadow-light: rgba(74, 124, 89, 0.1);
  --shadow-medium: rgba(74, 124, 89, 0.2);
  --gradient-primary: linear-gradient(135deg, #4a7c59 0%, #7fb069 100%);
  --gradient-soft: linear-gradient(135deg, #f8f6f0 0%, #fefefe 100%);
  --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-bounce: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Alegreya', serif;
  background: linear-gradient(135deg, #f8f6f0 0%, #fefefe 50%, #e8e6e0 100%);
  color: var(--text-dark);
  line-height: 1.6;
  overflow-x: hidden;
  min-height: 100vh;
}

/* ==================== BOOTSTRAP НАВИГАЦИЯ ==================== */

/* Основной navbar */
.navbar.ecodom-navbar {
  background: rgba(248, 246, 240, 0.95) !important;
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--warm-grey);
  box-shadow: 0 2px 20px var(--shadow-light);
  padding: 0.5rem 0;
  position: sticky;
  top: 0;
  z-index: 1030;
  transition: var(--transition-smooth);
}

.navbar.ecodom-navbar.scrolled {
  box-shadow: 0 8px 32px var(--shadow-medium);
}

/* Container настройки */
.navbar .container-fluid {
  padding: 0 1rem;
  max-width: 1400px;
  margin: 0 auto;
}

/* Простой логотип EcoDom */
.navbar-brand {
  display: flex;
  align-items: center;
  text-decoration: none !important;
  padding: 0;
  margin-right: 2rem;
}

.navbar-brand:hover {
  text-decoration: none !important;
}

.logo-container {
  display: flex;
  align-items: center;
  gap: 10px;
}



.logo-svg .svg-elem-1,
.logo-svg .svg-elem-2 {
  transition: all 0.3s ease;
}

.navbar-brand:hover .logo-svg .svg-elem-1 {
  fill: #4a7c59;
}

.navbar-brand:hover .logo-svg .svg-elem-2 {
  fill: #7fb069;
}

.company-name {
  font-size: 1.5rem;
  font-weight: 700;
  color: #4a7c59;
  text-decoration: none;
  transition: all 0.3s ease;
}

.navbar-brand:hover .company-name {
  color: #7fb069;
  text-shadow: 0 0 10px rgba(127, 176, 105, 0.3);
}

/* Navbar Toggle Button */
.navbar-toggler {
  border: none;
  padding: 0.25rem 0.5rem;
  background: var(--gradient-primary);
  border-radius: 8px;
  box-shadow: 0 2px 8px var(--shadow-light);
}

.navbar-toggler:focus {
  box-shadow: 0 2px 8px var(--shadow-light);
}

.navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 255, 255, 1%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
  width: 20px;
  height: 20px;
}

/* Navbar Collapse */
.navbar-collapse {
  flex-grow: 1;
  justify-content: center;
}

/* Navbar Nav */
.navbar-nav {
  align-items: center;
  gap: 0.25rem;
}

.navbar-nav .nav-item {
  margin: 0;
}

/* Стеклянные кнопки навигации Apple Style (как в index.html) */
.navbar-nav .nav-link {
  color: rgba(0, 0, 0, 0.8) !important;
  font-weight: 600;
  font-size: 0.85rem;
  padding: 0.6rem 1rem !important;
  border-radius: 12px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration: none !important;
  display: flex;
  align-items: center;
  white-space: nowrap;
  position: relative;
  background: rgba(255, 255, 255, 0.35);
  border: 1px solid rgba(0, 0, 0, 0.2);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

/* Стеклянный эффект при наведении (как в index.html) */
.navbar-nav .nav-link:hover,
.navbar-nav .nav-link:focus {
  color: rgba(74, 124, 89, 0.9) !important;
  transform: translateY(-2px);
  text-decoration: none !important;
  background: rgba(255, 255, 255, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.4);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Анимация иконок (как в index.html) */
.navbar-nav .nav-link i {
  margin-right: 0.4rem;
  font-size: 0.75rem;
  transition: all 0.3s ease;
  display: inline-block !important;
  vertical-align: middle;
}

.navbar-nav .nav-link:hover i {
  transform: scale(1.1);
  color: var(--light-green);
}

/* Тонкая пульсация для каталога */
.navbar-nav .nav-link[href*="catalog"] {
  animation: subtlePulse 4s ease-in-out infinite;
}

@keyframes subtlePulse {
  0%, 100% {
    background: transparent;
  }
  50% {
    background: rgba(127, 176, 105, 0.05);
  }
}

/* Адаптивные стили для навигационных кнопок (как в index.html) */
@media (max-width: 991.98px) {
  .navbar-nav .nav-link {
    font-size: 0.8rem;
    padding: 0.5rem 0.8rem !important;
    margin: 0 0.15rem;
  }
}

@media (max-width: 767.98px) {
  .navbar-nav .nav-link {
    font-size: 0.75rem;
    padding: 0.4rem 0.6rem !important;
    margin: 0 0.1rem;
    border-radius: 10px;
  }
}

@media (max-width: 575.98px) {
  .navbar-nav .nav-link {
    font-size: 0.7rem;
    padding: 0.3rem 0.5rem !important;
    margin: 0 0.05rem;
    border-radius: 8px;
  }
  
  .navbar-nav .nav-link i {
    font-size: 0.65rem;
    margin-right: 0.2rem;
  }
}

/* Right side items */
.navbar-nav.ms-auto {
  flex-direction: row;
  gap: 1rem;
}

/* Google Translate Стили */
.google-translate-wrapper {
  background: var(--soft-beige);
  border-radius: 8px;
  padding: 0.25rem 0.5rem;
  border: 1px solid var(--warm-grey);
  margin-right: 0.5rem;
}

#google_translate_element {
  font-size: 0;
}

#google_translate_element .goog-te-gadget {
  font-size: 0;
  color: transparent;
}

#google_translate_element .goog-te-gadget .goog-te-combo {
  margin: 0;
  padding: 0.25rem;
  border: none;
  background: transparent;
  color: var(--text-dark);
  font-size: 0.8rem;
  outline: none;
}

/* Скрытие ненужных элементов Google Translate */
.goog-te-banner-frame {
  display: none !important;
}

.goog-te-gadget-icon {
  display: none !important;
}

body {
  top: 0 !important;
}

/* Дополнительные Bootstrap переопределения */
.navbar-expand-lg .navbar-nav .nav-link {
  padding-right: 0.8rem;
  padding-left: 0.8rem;
}

.navbar-light .navbar-nav .nav-link {
  color: var(--text-dark);
}

.navbar-light .navbar-nav .nav-link:hover,
.navbar-light .navbar-nav .nav-link:focus {
  color: var(--primary-green);
}

.navbar-light .navbar-toggler {
  border-color: transparent;
}

/* Фиксация z-index для корректной работы */
.navbar {
  z-index: 1030;
}
/* ==================== ФИЛЬТРЫ ==================== */
.filter-toggle-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 20px;
  margin-top: 30px; /* отступ между навигацией и фильтром */
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  justify-content: center; /* центрируем фильтр, PDF и поиск */
}

.filter-toggle-btn {
  background: rgba(74,124,89,0.14); /* матовое зеленое стекло */
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  color: #111;
  border: 1px solid #000; /* тонкая черная окантовка */
  padding: 12px 18px;
  border-radius: 12px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  position: relative;
}

.filter-toggle-btn:hover,
.filter-toggle-btn:focus {
  background: rgba(74,124,89,0.2);
}

/* Кнопка PDF каталоги рядом с фильтром */
.pdf-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 10px;
  background: rgba(74,124,89,0.14); /* матовое зеленое стекло */
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border: 1px solid #000; /* черная окантовка */
  color: #111;
  text-decoration: none;
  transition: background-color 0.2s ease;
}

.pdf-button:hover,
.pdf-button:focus {
  text-decoration: none;
  background: rgba(74,124,89,0.2);
  color: #111;
}

.filter-toggle-btn.has-active-filters {
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { box-shadow: 0 4px 15px var(--shadow-light); }
  50% { box-shadow: 0 8px 30px var(--shadow-medium); }
}

.active-filters-count {
  background: white;
  color: var(--primary-green);
  padding: 4px 8px;
  border-radius: 50%;
  font-size: 0.8rem;
  font-weight: 700;
  min-width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.toggle-icon {
  transition: transform 0.3s ease;
}

.toggle-icon.rotate {
  transform: rotate(180deg);
}

.filters {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 20px;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease-out;
}

.filters.active {
  max-height: 2000px;
  padding: 20px;
}

.filter-options {
  background: rgba(74,124,89,0.06); /* матовое зеленое стекло */
  border-radius: 20px;
  padding: 30px;
  box-shadow: 0 10px 30px var(--shadow-light);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border: 1px solid #000; /* тонкая черная окантовка */
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

/* Поиск */
.search-container {
  margin-bottom: 30px;
}

.search-input-container {
  position: relative;
  max-width: 500px;
  margin: 0 auto;
}

.search-input {
  width: 100%;
  padding: 14px 48px 14px 16px;
  border: 1px solid #000; /* черная окантовка */
  border-radius: 12px;
  font-size: 0.95rem;
  background: rgba(255,255,255,0.85);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  transition: var(--transition-smooth);
}

.search-input:focus {
  outline: none;
  border-color: #000; /* без зеленого */
  box-shadow: 0 0 0 2px rgba(0,0,0,0.08);
}

.filter-toggle-container .search-container {
  margin: 0; /* убираем отступы у инлайн-поиска */
  flex: 0 1 520px;
}

.filter-toggle-container .search-input-container {
  margin: 0;
  max-width: 680px;
}

/* Кнопка поиска - специальные стили */
.search-button {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(74,124,89,0.14); /* матовое зеленое стекло */
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border: 1px solid #000; /* черная окантовка */
  padding: 8px 12px; /* чуть меньше */
  border-radius: 10px;
  color: #111;
  cursor: pointer;
  min-width: 44px; /* уменьшили */
  min-height: 40px; /* уменьшили */
  transition: background-color 0.2s ease;
}

.search-button:hover,
.search-button:focus {
  transform: translateY(-50%);
  background: rgba(74,124,89,0.2);
}

/* Активные фильтры */
.active-filters-block {
  background: rgba(74, 124, 89, 0.1);
  padding: 15px 20px;
  border-radius: 12px;
  margin: 20px auto;
  max-width: 1400px;
  display: flex;
  align-items: center;
  gap: 15px;
  flex-wrap: wrap;
  border: 1px solid rgba(74, 124, 89, 0.2);
}

.active-filter {
  background: var(--primary-green);
  color: white;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 0.9rem;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.remove-filter {
  color: white;
  text-decoration: none;
  font-weight: bold;
  padding: 2px 6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  transition: var(--transition-smooth);
}

.remove-filter:hover {
  background: rgba(255, 255, 255, 0.3);
  text-decoration: none;
  color: white;
}

.clear-all-filters {
  background: var(--light-green);
  color: white;
  padding: 8px 16px;
  border-radius: 20px;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
  transition: var(--transition-smooth);
}

.clear-all-filters:hover {
  background: var(--primary-green);
  text-decoration: none;
  color: white;
}

/* Группы фильтров */
.filter-group {
  margin-bottom: 25px;
}

.custom-category-block {
  background: rgba(74,124,89,0.08);
  padding: 25px;
  border-radius: 15px;
  border: none; /* убрать рамку */
  margin-bottom: 30px;
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}

.category-header h3 {
  color: var(--primary-green);
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
}

.category-subcategory-flex {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.category-select-label,
.subcategory-title {
  font-weight: 600;
  margin-bottom: 10px;
  color: var(--text-dark);
}

.custom-select {
  padding: 12px 15px;
  border: 2px solid var(--warm-grey);
  border-radius: 10px;
  background: white;
  font-size: 1rem;
  transition: var(--transition-smooth);
  width: 100%;
}

.custom-select:focus {
  outline: none;
  border-color: var(--primary-green);
  box-shadow: 0 0 0 3px rgba(74, 124, 89, 0.1);
}

.category-placeholder,
.subcategory-placeholder {
  padding: 12px 15px;
  background: rgba(74, 124, 89, 0.05);
  border-radius: 10px;
  color: var(--text-light);
  font-style: italic;
}

/* Дополнительные фильтры */
.filter-attributes h3 {
  color: var(--primary-green);
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 20px;
}

.collapsible-group {
  border: 1px solid #000; /* тонкая черная окантовка */
  border-radius: 12px;
  margin-bottom: 15px;
  overflow: hidden;
  background: rgba(74,124,89,0.06);
}

.collapsible-header {
  background: rgba(74,124,89,0.1);
  padding: 15px 20px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background-color 0.2s ease;
}

.collapsible-header:hover { background: rgba(74,124,89,0.14); }

.collapsible-header h4 {
  margin: 0;
  color: var(--primary-green);
  font-weight: 600;
}

.selected-count {
  color: var(--light-green);
  font-size: 0.9rem;
  font-weight: 500;
}

.arrow {
  color: var(--primary-green);
  font-size: 1.2rem;
  transition: transform 0.3s ease;
}

.collapsible-content {
  padding: 20px;
  background: rgba(255,255,255,0.85);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}

/* Цветовые фильтры */
.color-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(40px, 1fr));
  gap: 15px;
  max-width: 600px;
}

.color-item {
  text-align: center;
}

.color-item input[type="checkbox"] {
  display: none;
}

.color-circle {
  display: block;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 3px solid transparent;
  cursor: pointer;
  transition: var(--transition-bounce);
  position: relative;
}

.color-item input[type="checkbox"]:checked + label .color-circle {
  border-color: var(--primary-green);
  transform: scale(1.1);
  box-shadow: 0 4px 15px var(--shadow-medium);
}

/* Цвета для кружочков */
.color-circle[data-color="Белый"] { background: #ffffff; border: 2px solid #ddd; }
.color-circle[data-color="Черный"] { background: #000000; }
.color-circle[data-color="Серый"] { background: #808080; }
.color-circle[data-color="Коричневый"] { background: #8B4513; }
.color-circle[data-color="Бежевый"] { background: #F5F5DC; border: 2px solid #ddd; }
.color-circle[data-color="Кремовый"] { background: #FFFDD0; border: 2px solid #ddd; }
.color-circle[data-color="Зеленый"] { background: #4a7c59; }
.color-circle[data-color="Синий"] { background: #0066CC; }
.color-circle[data-color="Голубой"] { background: #87CEEB; }
.color-circle[data-color="Бирюзовый"] { background: #40E0D0; }
.color-circle[data-color="Аквамариновый"] { background: #7FFFD4; }
.color-circle[data-color="Фиолетовый"] { background: #8A2BE2; }
.color-circle[data-color="Лиловый"] { background: #DDA0DD; }
.color-circle[data-color="Розовый"] { background: #FFC0CB; }
.color-circle[data-color="Оранжевый"] { background: #FFA500; }
.color-circle[data-color="Желтый"] { background: #FFD700; }
.color-circle[data-color="Золотой"] { background: linear-gradient(45deg, #FFD700, #FFA500); }
.color-circle[data-color="Золотистый"] { background: linear-gradient(45deg, #DAA520, #FFD700); }
.color-circle[data-color="Серебристый"] { background: linear-gradient(45deg, #C0C0C0, #E5E5E5); }
.color-circle[data-color="Перламутровый"] { background: linear-gradient(45deg, #E6E6FA, #F0F8FF); }
.color-circle[data-color="Ониксовый"] { background: #353839; }
.color-circle[data-color="Изурудный"] { background: #50C878; }
.color-circle[data-color="Коралловый"] { background: #FF7F50; }
.color-circle[data-color="Терракотовый"] { background: #E2725B; }
.color-circle[data-color="Ржаво-красный"] { background: #B22222; }

/* Текстуры и применение */
.texture-grid,
.usage-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 10px;
}

.texture-item,
.usage-item {
  display: flex;
  align-items: center;
}

.texture-item input[type="checkbox"],
.usage-item input[type="checkbox"] {
  margin-right: 10px;
  width: 18px;
  height: 18px;
  accent-color: var(--primary-green);
}

.texture-item label,
.usage-item label {
  cursor: pointer;
  font-size: 0.9rem;
  color: var(--text-dark);
  transition: var(--transition-smooth);
}

.texture-item:hover label,
.usage-item:hover label {
  color: var(--primary-green);
}

/* ==================== ЕДИНАЯ СИСТЕМА КНОПОК - ИСПРАВЛЕННАЯ ==================== */

/* Базовые стили кнопок */
.btn,
button,
input[type="button"],
input[type="submit"],
.button {
  --btn-transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  --btn-shadow: 0 8px 25px rgba(74, 124, 89, 0.15);
  --btn-shadow-hover: 0 15px 35px rgba(74, 124, 89, 0.25);
  
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px; /* Увеличены размеры */
  border: none;
  border-radius: 12px;
  font-family: inherit;
  font-weight: 600;
  font-size: 1rem; /* Увеличен шрифт */
  text-decoration: none;
  cursor: pointer;
  overflow: hidden;
  transition: var(--btn-transition);
  user-select: none;
  box-shadow: var(--btn-shadow);
  backdrop-filter: blur(10px);
  transform-origin: center;
  min-height: 48px; /* Минимальная высота */
  min-width: 120px; /* Минимальная ширина */
}

/* Анимированный фон кнопок */
.btn::before,
button::before,
input[type="button"]::before,
input[type="submit"]::before,
.button::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  transition: left 0.6s ease;
  z-index: 1;
}

.btn:hover::before,
button:hover::before,
input[type="button"]:hover::before,
input[type="submit"]:hover::before,
.button:hover::before {
  left: 100%;
}

/* Основной текст кнопки */
.btn > *,
button > *,
input[type="button"] > *,
input[type="submit"] > * {
  position: relative;
  z-index: 2;
}

/* Основная кнопка (Primary) */
.btn-primary,
.btn.primary,
button.primary,
.apply-filters {
  background: linear-gradient(135deg, #4a7c59 0%, #7fb069 100%);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 16px 32px; /* Больше для важных кнопок */
  font-size: 1.1rem;
  min-width: 140px;
}

.btn-primary:hover,
.btn.primary:hover,
button.primary:hover,
.apply-filters:hover {
  background: linear-gradient(135deg, #7fb069 0%, #90c695 100%);
  color: white;
  text-decoration: none;
  transform: translateY(-3px) scale(1.05);
  box-shadow: var(--btn-shadow-hover);
}

/* Переопределение для кнопок фильтров — матовое зеленое стекло */
.filter-actions .apply-filters,
.filter-actions .btn.btn-secondary {
  background: rgba(74,124,89,0.14) !important; /* матовое зеленое стекло */
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  color: #111 !important;
  border: none !important; /* убрать рамку */
  border-radius: 12px;
  padding: 12px 20px;
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.filter-actions .apply-filters:hover,
.filter-actions .apply-filters:focus,
.filter-actions .btn.btn-secondary:hover,
.filter-actions .btn.btn-secondary:focus {
  background: rgba(74,124,89,0.2) !important;
  color: #111 !important;
  text-decoration: none;
  transform: none;
  box-shadow: none;
}

/* Убрать рамку у селектов категорий/подкатегорий и придать стекло-вид */
.category-select,
.subcategory-select {
  border: none !important;
  background: rgba(255,255,255,0.85);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}

.category-select:focus,
.subcategory-select:focus {
  outline: none;
  box-shadow: 0 0 0 2px rgba(0,0,0,0.08);
}

/* Вторичная кнопка (Secondary) */
.btn-secondary,
.btn.secondary,
button.secondary {
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.9), rgba(248, 246, 240, 0.8));
  color: var(--primary-green);
  border: 2px solid rgba(74, 124, 89, 0.2);
  padding: 14px 28px;
  font-size: 1rem;
}

.btn-secondary:hover,
.btn.secondary:hover,
button.secondary:hover {
  background: linear-gradient(145deg, rgba(74, 124, 89, 0.1), rgba(127, 176, 105, 0.05));
  color: var(--primary-green);
  text-decoration: none;
  border-color: var(--primary-green);
  transform: translateY(-3px) scale(1.05);
  box-shadow: var(--btn-shadow-hover);
}

/* Кнопка применения фильтров */
.apply-filters {
  background: var(--gradient-primary);
  color: white;
  border: none;
  padding: 16px 40px;
  border-radius: 15px;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--btn-transition);
  margin-top: 30px;
  min-width: 180px;
  min-height: 56px;
}

.apply-filters:hover {
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 15px 40px rgba(74, 124, 89, 0.3);
  background: linear-gradient(135deg, #7fb069 0%, #90c695 100%);
}

/* Блок действий с фильтрами */
.filter-actions {
  display: flex;
  gap: 15px;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 30px;
  padding: 20px;
  background: rgba(74, 124, 89, 0.05);
  border-radius: 15px;
  border: none; /* убрать рамку */
}

.filter-actions .apply-filters {
  margin-top: 0;
  min-width: 160px;
}

.filter-actions .btn {
  padding: 16px 24px;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 600;
  min-height: 56px;
  min-width: 160px;
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: center;
}

.filter-actions .btn-secondary {
  background: rgba(74,124,89,0.14);
  color: #111;
  border: none; /* без рамки */
}

.filter-actions .btn-secondary:hover {
  background: rgba(74,124,89,0.2);
  color: #111;
  transform: none;
}

.filter-actions .btn-outline {
  background: rgba(255, 255, 255, 0.9);
  color: var(--light-green);
  border: 2px solid var(--light-green);
  text-decoration: none;
}

.filter-actions .btn-outline:hover {
  background: var(--light-green);
  color: white;
  text-decoration: none;
  transform: translateY(-2px);
}

/* ==================== КАТАЛОГ ТОВАРОВ ==================== */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 40px;
  max-width: 1400px;
  margin: 0 auto;
  padding: 30px 20px; /* отступ сверху 30px */
  min-height: 400px;
}

.product-card {
  transition: all 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  opacity: 1;
  transform: translateY(0);
  display: block;
  perspective: 1000px;
  position: relative;
}

.product-card .card {
  position: relative;
  /* Стеклянный стиль как у навигации */
  background: rgba(255, 255, 255, 0.75);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border: 1px solid #000; /* тонкая черная окантовка */
  border-radius: 25px;
  overflow: hidden;
  box-shadow: 
    20px 20px 40px rgba(74, 124, 89, 0.08),
    -20px -20px 40px rgba(255, 255, 255, 0.7);
  transition: all 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  position: relative;
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  transform-style: preserve-3d;
  /* Фиксированная высота карточки для единообразия */
  height: 448px; /* -20% от прежней высоты */
  display: flex;
  flex-direction: column;
}

/* Динамичный эффект при наведении на карточку */
.product-card:hover .card {
  /* Убираем все анимации при наведении на карточку */
  transform: none;
  box-shadow: 
    20px 20px 40px rgba(74, 124, 89, 0.1),
    -20px -20px 40px rgba(255, 255, 255, 0.8),
    inset 0 0 0 1px rgba(74, 124, 89, 0.1);
}

/* Убираем анимированную рамку при наведении */
.product-card:hover .card::before {
  display: none;
}

@keyframes borderGlow {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

/* Фото-счетчики и стрелки на карточках отключены */

/* Исправляем отображение изображений */
.product-card .carousel-item img {
  height: 280px;
  object-fit: cover;
  object-position: center;
  width: 100%;
  /* Убираем transition для изображений */
}

/* Убираем hover эффект для изображений */
.product-card:hover .carousel-item img {
  /* Убираем масштабирование изображений */
  transform: none;
}

/* Убираем hover эффект для заглушек */
.product-card:hover .placeholder-content {
  /* Убираем анимацию заглушки */
  opacity: 0.7;
  transform: none;
}



/* ==================== МОДАЛЬНОЕ ОКНО - СОВРЕМЕННЫЙ КОМПАКТНЫЙ ДИЗАЙН ==================== */

.modal {
  display: none;
  position: fixed;
  z-index: 2000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  align-items: center;
  justify-content: center;
  animation: modalOverlayFadeIn 0.25s ease;
  padding: 20px;
}

.modal.show {
  display: flex !important;
}

@keyframes modalOverlayFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Компактное модальное окно 900-960px */
.product-modal {
  background: #FFFFFF;
  border-radius: 16px;
  width: 100%;
  max-width: 1300px;
  max-height: 90vh;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.2);
  overflow: hidden;
  position: relative;
  animation: modalSlideUp 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  display: flex;
  flex-direction: column;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

@keyframes modalSlideUp {
  from {
    transform: translateY(40px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* Компактный хедер с крестиком */
.modal-header {
  padding: 20px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #E5E7EB;
  background: #FFFFFF;
}

.modal-header h3 {
  margin: 0;
  color: #111827;
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.3;
  font-family: 'Inter', sans-serif;
}

/* Минималистичная кнопка закрытия */
.modal .close {
  background: transparent;
  border: none;
  font-size: 1.5rem;
  color: #6B7280;
  cursor: pointer;
  padding: 8px;
  border-radius: 8px;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.modal .close:hover { 
  background: #F3F4F6;
  color: #111827;
}

/* Основное тело модального окна */
.modal-body {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
}

/* Двухколоночная сетка - равные секции */
.modal-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  padding: 0;
  min-height: 480px;
}

/* Левая колонка - изображение */
.modal-gallery { 
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 32px;
  background: #FAFAFA;
  border-right: 1px solid #E5E7EB;
}

.modal-image-stage { 
  position: relative;
  width: 100%;
  max-width: 500px;
  height: auto;
  aspect-ratio: 1 / 1;
  margin: 0 auto;
  border-radius: 12px;
  overflow: hidden;
  background: #F9FAFB;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  transition: box-shadow 0.3s ease;
  flex-shrink: 0;
}

.modal-image-stage:hover {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.modal-image-stage img { 
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  cursor: zoom-in;
  transition: transform 0.3s ease;
}

.modal-image-stage:hover img {
  transform: scale(1.05);
}

/* Миниатюры */
.modal-thumbs { 
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.modal-thumbs::-webkit-scrollbar {
  height: 4px;
}

.modal-thumbs::-webkit-scrollbar-track {
  background: #F3F4F6;
  border-radius: 2px;
}

.modal-thumbs::-webkit-scrollbar-thumb {
  background: #D1D5DB;
  border-radius: 2px;
}

.modal-thumbs::-webkit-scrollbar-thumb:hover {
  background: #9CA3AF;
}

.modal-thumbs img { 
  width: 64px;
  height: 64px;
  object-fit: cover;
  border: 2px solid #E5E7EB;
  border-radius: 8px;
  cursor: pointer;
  opacity: 0.6;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.modal-thumbs img:hover { 
  opacity: 1;
  border-color: #9CA3AF;
}

.modal-thumbs img.active { 
  border-color: #2F6F4E;
  opacity: 1;
}

/* Навигационные стрелки - скрыты */
.modal-nav-btn { 
  display: none;
}

/* Правая колонка - контент */
.modal-info {
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 32px;
  background: #FFFFFF;
}

/* Заголовок и подзаголовок */
.modal-info h3 {
  margin: 0;
  color: #111827;
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.3;
}

.modal-info .subtitle {
  margin: 0;
  color: #6B7280;
  font-size: 0.95rem;
  line-height: 1.5;
  max-width: 70ch;
}

/* Список характеристик */
.modal-specs {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.modal-spec-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 0.95rem;
  line-height: 1.6;
  max-width: 70ch;
}

.modal-spec-item strong {
  color: #374151;
  font-weight: 600;
  min-width: 100px;
  flex-shrink: 0;
}

.modal-spec-item span {
  color: #6B7280;
}

/* Блок цены */
.modal-price-block {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 0;
  border-top: 1px solid #E5E7EB;
  border-bottom: 1px solid #E5E7EB;
}

.modal-price {
  font-size: 2rem;
  font-weight: 700;
  color: #2F6F4E;
  line-height: 1;
}

.modal-badge {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  background: #FEF3C7;
  color: #92400E;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 600;
}

/* CTA кнопки */
.modal-actions {
  display: flex;
  gap: 12px;
  margin-top: auto;
}

.modal-btn {
  flex: 1;
  padding: 14px 20px;
  border: none;
  border-radius: 10px;
  font-family: 'Inter', sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.modal-btn-primary {
  background: #2F6F4E;
  color: #FFFFFF;
}

.modal-btn-primary:hover {
  background: #265A3E;
  box-shadow: 0 4px 12px rgba(47, 111, 78, 0.3);
}

.modal-btn-secondary {
  background: #F3F4F6;
  color: #374151;
}

.modal-btn-secondary:hover {
  background: #E5E7EB;
}

/* Подсказка для зума */
.fullscreen-hint {
  text-align: center;
  margin-top: 8px;
  padding: 8px;
  background: transparent;
  border: none;
  color: #9CA3AF;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.fullscreen-hint:hover {
  color: #6B7280;
}

.fullscreen-hint i {
  margin-right: 6px;
}

/* Кнопка "Подробнее" */
.toggle-details-btn {
  width: 100%;
  padding: 12px 20px;
  margin: 16px 0;
  background: #F3F4F6;
  border: 1px solid #E5E7EB;
  border-radius: 8px;
  color: #374151;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.3s ease;
  position: relative;
}

.toggle-details-btn:hover {
  background: #E5E7EB;
  border-color: #D1D5DB;
}

.toggle-details-btn i {
  transition: transform 0.3s ease;
  font-size: 0.85rem;
}

.toggle-details-btn.active i {
  transform: rotate(180deg);
}

.toggle-details-btn .btn-text-less {
  display: none;
}

.toggle-details-btn.active .btn-text-more {
  display: none;
}

.toggle-details-btn.active .btn-text-less {
  display: inline;
}

/* Дополнительная информация (раскрывающийся блок) */
.additional-details {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease, opacity 0.3s ease, margin 0.3s ease;
  opacity: 0;
  margin: 0;
}

.additional-details.show {
  max-height: 1000px;
  opacity: 1;
  margin: 16px 0;
}

/* Красивые рамки для текстовых блоков */
.outlined-oval {
  border: 1px solid rgba(0, 0, 0, 0.2);
  border-radius: 12px;
  padding: 16px 20px;
  margin: 12px 0;
  background: rgba(255, 255, 255, 0.5);
  transition: all 0.3s ease;
}

.outlined-oval:hover {
  border-color: rgba(0, 0, 0, 0.3);
  background: rgba(255, 255, 255, 0.7);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.outlined-oval p {
  margin: 0;
  line-height: 1.6;
}

.outlined-oval ul {
  margin: 8px 0 0 0;
  padding-left: 20px;
}

.outlined-oval strong {
  color: #1D2A2B;
  font-weight: 600;
}

/* Стили для product-details с рамкой */
.product-details.outlined-oval {
  margin-bottom: 16px;
}

/* Стили для product-meta с рамкой */
.product-meta.outlined-oval {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.product-meta .outlined-oval {
  margin: 0;
}

/* Стили для дополнительных блоков */
.additional-details .outlined-oval {
  margin: 8px 0;
}

/* Скроллбар для модального окна */
.modal-body::-webkit-scrollbar {
  width: 8px;
}

.modal-body::-webkit-scrollbar-track {
  background: #F9FAFB;
}

.modal-body::-webkit-scrollbar-thumb {
  background: #D1D5DB;
  border-radius: 4px;
}

.modal-body::-webkit-scrollbar-thumb:hover {
  background: #9CA3AF;
}

/* Адаптив для планшетов и мобильных */
@media (max-width: 768px) {
  .product-modal {
    max-width: 100%;
    max-height: 100vh;
    border-radius: 0;
    margin: 0;
  }
  
  .modal-grid {
    grid-template-columns: 1fr;
    gap: 0;
    padding: 0;
  }
  
  .modal-gallery {
    border-right: none;
    border-bottom: 1px solid #E5E7EB;
    padding: 24px;
  }
  
  .modal-info {
    padding: 24px;
  }
  
  .modal-image-stage {
    width: 100%;
    height: auto;
    aspect-ratio: 1 / 1;
    max-width: 100%;
  }
  
  .modal-actions {
    position: sticky;
    bottom: 0;
    background: #FFFFFF;
    padding: 16px 24px;
    margin: 0 -24px -24px;
    border-top: 1px solid #E5E7EB;
    box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.05);
  }
  
  .modal-header h3 {
    font-size: 1.25rem;
  }
  
  .modal-price {
    font-size: 1.75rem;
  }
}

/* ==================== ИКОНКИ ECO И NEW ==================== */

.product-icons {
  position: absolute;
  top: 15px;
  left: 15px;
  z-index: 10;
  display: flex;
  gap: 10px;
}

.eco-icon,
.new-icon {
  width: 45px;
  height: 45px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(15px);
  border: 2px solid rgba(255, 255, 255, 0.3);
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.eco-icon {
  background: linear-gradient(135deg, rgba(76, 175, 80, 0.9), rgba(129, 199, 132, 0.8));
}

.new-icon {
  background: linear-gradient(135deg, rgba(255, 152, 0, 0.9), rgba(255, 193, 7, 0.8));
}

.eco-icon:hover,
.new-icon:hover {
  transform: scale(1.1) rotate(360deg);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

.icon-image {
  width: 24px;
  height: 24px;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

/* ==================== УЛУЧШЕНИЯ КАРТОЧЕК ==================== */

.product-card .card-body {
  padding: 20px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.9), rgba(248, 246, 240, 0.8));
  border-top: 1px solid rgba(74, 124, 89, 0.1);
  position: relative;
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
}

.product-card .card-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 16px;
  line-height: 1.35;
  text-align: center;
  min-height: 52px; /* одинаковая высота заголовка в 2 строки */
  display: flex;
  align-items: center;
  justify-content: center;
}

.product-card .buttons {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  margin-top: auto; /* прижимаем блок кнопок к низу карточки */
  height: 46px; /* фиксированная высота контейнера */
}

/* Адаптация размера карточек на узких экранах */
@media (max-width: 767.98px) {
  .product-card .card { height: 416px; } /* -20% */
  .product-image-static, .product-image-placeholder { height: 256px; }
}

@media (max-width: 575.98px) {
  .product-card .card { height: 384px; } /* -20% */
  .product-image-static, .product-image-placeholder { height: 240px; }
}

/* Специальные кнопки каталога - ИСПРАВЛЕНО */
.details-button.btn,
.product-card .card-body .details-button {
  background: rgba(74, 124, 89, 0.14) !important; /* матовое зеленое стекло */
  color: #111 !important;
  border: 1px solid #000 !important; /* тонкая черная окантовка */
  padding: 14px 26px !important;
  border-radius: 12px !important;
  font-weight: 600 !important;
  font-size: 1.05rem !important;
  min-width: 136px !important;
  min-height: 46px !important;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  box-shadow: none !important; /* без теней */
  transition: none !important; /* без анимации */
  cursor: pointer;
  text-align: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.details-button.btn:hover,
.product-card .card-body .details-button:hover,
.product-card .card-body .details-button:active,
.product-card .card-body .details-button:focus {
  background: rgba(74, 124, 89, 0.2) !important; /* чуть плотнее при наведении */
  color: #111 !important;
  transform: none !important; /* без анимации */
  box-shadow: none !important; /* без теней */
}

.product-card .card-body .cart-button {
  background: rgba(74, 124, 89, 0.15) !important;
  color: #000 !important;
  border: 1px solid #000 !important;
  padding: 14px 20px !important;
  border-radius: 12px !important;
  font-size: 1.05rem !important;
  min-width: 56px !important;
  min-height: 46px !important;
  max-height: 46px !important;
  height: 46px !important;
  line-height: 46px !important;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  box-shadow: none !important;
  transition: background 0.2s ease !important;
  cursor: pointer;
  position: relative;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex-shrink: 0;
  vertical-align: middle;
}

.product-card .card-body .cart-button i {
  color: #000 !important;
  font-size: 1.08rem;
  line-height: 1 !important;
  vertical-align: middle;
}

.product-card .card-body .cart-button:hover::after,
.product-card .card-body .cart-button:focus-visible::after {
  content: attr(data-cart-hover-label);
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.85);
  color: white;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 0.85rem;
  white-space: nowrap;
  pointer-events: none;
  z-index: 1000;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.product-card .card-body .cart-button:hover,
.product-card .card-body .cart-button:active,
.product-card .card-body .cart-button:focus {
  background: rgba(74, 124, 89, 0.24) !important;
  color: #000 !important;
  transform: none !important;
  box-shadow: none !important;
  border-color: #000 !important;
}

/* Кнопка избранного - матовый красный с черной окантовкой */
.product-card .card-body .favorite-button,
.product-card .card-body .btn-outline-danger {
  background: rgba(220, 53, 69, 0.15) !important; /* матовый красный */
  color: #000 !important;
  border: 1px solid #000 !important; /* тонкая черная окантовка */
  padding: 14px 20px !important;
  border-radius: 12px !important;
  font-size: 1.05rem !important;
  min-width: 56px !important;
  min-height: 46px !important;
  max-height: 46px !important;
  height: 46px !important;
  line-height: 46px !important;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  box-shadow: none !important;
  transition: background 0.2s ease !important; /* плавная смена фона */
  cursor: pointer;
  position: relative;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex-shrink: 0;
  vertical-align: middle;
}

.product-card .card-body .favorite-button i,
.product-card .card-body .btn-outline-danger i {
  color: #000 !important; /* черное сердечко */
  font-size: 1.1rem;
  line-height: 1 !important;
  vertical-align: middle;
}

/* Переопределение Bootstrap стилей для кнопок */
.product-card .card-body .btn {
  line-height: 1.5 !important;
}

.product-card .card-body .favorite-button.btn,
.product-card .card-body .btn-outline-danger.btn {
  line-height: 46px !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
}

/* Tooltip при наведении */
.product-card .card-body .favorite-button:hover::after,
.product-card .card-body .btn-outline-danger:hover::after {
  content: 'Добавить в избранное';
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.85);
  color: white;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 0.85rem;
  white-space: nowrap;
  pointer-events: none;
  z-index: 1000;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.product-card .card-body .favorite-button:hover,
.product-card .card-body .favorite-button:active,
.product-card .card-body .favorite-button:focus,
.product-card .card-body .btn-outline-danger:hover,
.product-card .card-body .btn-outline-danger:active,
.product-card .card-body .btn-outline-danger:focus {
  background: rgba(220, 53, 69, 0.25) !important; /* чуть плотнее при наведении */
  color: #000 !important;
  transform: none !important;
  box-shadow: none !important;
  border-color: #000 !important;
}

/* ========== АКТИВНОЕ СОСТОЯНИЕ (УЖЕ В ИЗБРАННОМ) ========== */
/* Яркая красная кнопка с заполненным сердечком */
.product-card .card-body .favorite-button.active,
.product-card .card-body .btn-outline-danger.active {
  background: linear-gradient(135deg, 
    rgba(220, 53, 69, 0.85) 0%, 
    rgba(239, 71, 85, 0.85) 100%) !important; /* яркий красный градиент */
  border: 2px solid #dc3545 !important; /* толстая красная окантовка */
  box-shadow: 
    0 0 0 3px rgba(220, 53, 69, 0.2),
    0 4px 12px rgba(220, 53, 69, 0.4) !important; /* объёмная тень */
  backdrop-filter: blur(10px) !important;
  -webkit-backdrop-filter: blur(10px) !important;
}

/* Белое заполненное сердечко на красном фоне */
.product-card .card-body .favorite-button.active i,
.product-card .card-body .btn-outline-danger.active i {
  color: #ffffff !important; /* БЕЛОЕ сердечко */
  font-weight: 900 !important;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3) !important; /* тень для контраста */
  filter: drop-shadow(0 0 4px rgba(255, 255, 255, 0.5)) !important; /* свечение */
  transform: scale(1.1) !important; /* немного увеличено */
}

/* При наведении на активную кнопку */
.product-card .card-body .favorite-button.active:hover,
.product-card .card-body .btn-outline-danger.active:hover {
  background: linear-gradient(135deg, 
    rgba(200, 35, 51, 0.9) 0%, 
    rgba(220, 53, 69, 0.9) 100%) !important; /* темнее при наведении */
  border-color: #b02a37 !important;
  box-shadow: 
    0 0 0 4px rgba(220, 53, 69, 0.3),
    0 6px 16px rgba(220, 53, 69, 0.5) !important;
  transform: translateY(-1px) !important; /* лёгкий подъём */
}

.product-card .card-body .favorite-button.active:hover::after {
  content: 'Уже в избранном • Нажмите, чтобы удалить';
  background: rgba(220, 53, 69, 0.95);
  border: 1px solid #dc3545;
  min-width: 280px;
}

/* Пульсирующая анимация свечения */
.product-card .card-body .favorite-button.active,
.product-card .card-body .btn-outline-danger.active {
  animation: favoriteGlow 2.5s ease-in-out infinite !important;
}

@keyframes favoriteGlow {
  0%, 100% { 
    box-shadow: 
      0 0 0 3px rgba(220, 53, 69, 0.2),
      0 4px 12px rgba(220, 53, 69, 0.4);
  }
  50% { 
    box-shadow: 
      0 0 0 5px rgba(220, 53, 69, 0.35),
      0 6px 20px rgba(220, 53, 69, 0.6);
  }
}

/* Значок "В избранном" в углу карточки */
.product-card.in-favorites .card::before {
  content: '♥ В избранном';
  position: absolute;
  top: 16px;
  right: 16px;
  background: linear-gradient(135deg, #dc3545 0%, #ef4755 100%);
  color: white;
  font-size: 12px;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 20px;
  box-shadow: 0 4px 12px rgba(220, 53, 69, 0.5);
  z-index: 100;
  animation: heartBeatBadge 2s ease-in-out infinite;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

@keyframes heartBeatBadge {
  0%, 100% { 
    transform: scale(1); 
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.5);
  }
  50% { 
    transform: scale(1.05); 
    box-shadow: 0 6px 16px rgba(220, 53, 69, 0.7);
  }
}

/* Анимация смены иконки при добавлении в избранное */
.product-card .card-body .favorite-button i {
  transition: color 0.2s ease, transform 0.2s ease;
}

.product-card .card-body .favorite-button.active i {
  animation: heartBeat 0.4s ease-in-out;
}

@keyframes heartBeat {
  0%, 100% { transform: scale(1); }
  25% { transform: scale(1.2); }
  50% { transform: scale(0.95); }
  75% { transform: scale(1.1); }
}

/* ==================== ПРОГРЕСС ЗАГРУЗКИ ==================== */

#catalog-loader {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(74, 124, 89, 0.9);
  color: white;
  padding: 20px 30px;
  border-radius: 15px;
  z-index: 9999;
  display: none;
  backdrop-filter: blur(10px);
  box-shadow: 0 10px 30px rgba(74, 124, 89, 0.3);
}

#catalog-loader::after {
  content: '';
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  display: inline-block;
  margin-left: 10px;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ==================== КАРУСЕЛЬ В МОДАЛЬНОМ ОКНЕ - СТРЕЛКИ СКРЫТЫ ==================== */

.modal-gallery .carousel-control-prev,
.modal-gallery .carousel-control-next {
  display: none;
}

/* ==================== FOOTER МОДАЛЬНОГО ОКНА - КОМПАКТНЫЙ ==================== */

.modal-footer {
  padding: 20px 40px; /* Уменьшены отступы */
  background: rgba(248, 246, 240, 0.9);
  border-top: 2px solid rgba(74, 124, 89, 0.1);
  display: flex;
  justify-content: center;
  align-items: center;
  box-shadow: 0 -5px 15px rgba(74, 124, 89, 0.1);
}

.modal-footer::before {
  display: none; /* Убираем декоративную линию */
}

/* Прямоугольная кнопка "Назад" */
.back-btn {
  background: var(--primary-green);
  color: white;
  border: none;
  padding: 12px 24px; /* Уменьшены размеры */
  border-radius: 8px; /* Прямоугольная форма */
  font-weight: 600;
  font-size: 1rem; /* Уменьшен размер */
  text-transform: uppercase;
  letter-spacing: 0.5px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 4px 12px rgba(74, 124, 89, 0.3);
  min-width: 150px; /* Уменьшена ширина */
  min-height: 44px; /* Уменьшена высота */
  position: relative;
  overflow: hidden;
}

.back-btn::before {
  display: none; /* Убираем shimmer эффект */
}

.back-btn::after {
  display: none; /* Убираем сложные эффекты */
}

.back-btn:hover {
  background: var(--light-green);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(74, 124, 89, 0.4);
}

.back-btn:active {
  transform: translateY(0);
}

.back-btn i {
  font-size: 1rem;
}

/* ==================== ПОЛНОЭКРАННОЕ МОДАЛЬНОЕ ОКНО - ПРОСТОЕ ==================== */

.fullscreen-modal {
  display: none;
  position: fixed;
  z-index: 3000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  justify-content: center;
  align-items: center;
  animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.fullscreen-close {
  position: absolute;
  top: 30px;
  right: 30px;
  color: white;
  font-size: 2rem;
  cursor: pointer;
  z-index: 3001;
  padding: 12px;
  border-radius: 8px;
  background: rgba(74, 124, 89, 0.8);
  border: 2px solid rgba(255, 255, 255, 0.2);
  transition: all 0.2s ease;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.fullscreen-close:hover {
  background: var(--primary-green);
  transform: scale(1.1);
}

.fullscreen-content {
  max-width: 95vw;
  max-height: 95vh;
  text-align: center;
  position: relative;
}

.fullscreen-content img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

/* ==================== ЗАГЛУШКА ДЛЯ ТОВАРОВ БЕЗ ИЗОБРАЖЕНИЙ ==================== */

.product-image-placeholder {
  height: 280px;
  background: linear-gradient(135deg, rgba(74, 124, 89, 0.1), rgba(127, 176, 105, 0.05));
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary-green);
  position: relative;
  overflow: hidden;
}

.placeholder-content {
  text-align: center;
  opacity: 0.7;
}

.placeholder-content i {
  font-size: 4rem;
  margin-bottom: 15px;
  display: block;
}

.placeholder-content p {
  font-size: 1.1rem;
  font-weight: 600;
  margin: 0;
  color: var(--text-light);
}

/* ==================== ПАГИНАЦИЯ ==================== */

.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
  margin: 30px auto 30px; /* 30px сверху и снизу, по центру */
  padding: 30px;
  max-width: 800px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.9), rgba(248, 246, 240, 0.8));
  border-radius: 20px;
  box-shadow: 
    0 10px 30px rgba(74, 124, 89, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.8);
  border: 2px solid rgba(74, 124, 89, 0.1);
  backdrop-filter: blur(10px);
  flex-wrap: wrap; /* предотвращает наложение кнопок на узких экранах */
  row-gap: 12px;
}

.pagination a {
  background: rgba(74,124,89,0.14); /* матовое зеленое стекло как у Подробнее */
  color: #111;
  text-decoration: none;
  padding: 14px 22px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 1rem;
  transition: background-color 0.2s ease;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  border: 1px solid #000; /* тонкая черная окантовка */
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 140px;
  justify-content: center;
  box-shadow: none;
}

.pagination a:hover,
.pagination a:focus {
  background: rgba(74,124,89,0.2);
  color: #111;
  text-decoration: none;
  transform: none;
  box-shadow: none;
}

.pagination > .page-info {
  background: rgba(74, 124, 89, 0.1);
  color: var(--primary-green);
  padding: 15px 30px;
  border-radius: 15px;
  font-weight: 700;
  font-size: 1.1rem;
  border: 2px solid rgba(74, 124, 89, 0.2);
  backdrop-filter: blur(5px);
  text-align: center;
  min-width: 200px;
  box-shadow: inset 0 2px 8px rgba(74, 124, 89, 0.1);
}

/* Не стилизуем вложенные span внутри текстового блока */
.pagination .page-info span {
  background: transparent;
  padding: 0;
  border: none;
  box-shadow: none;
  min-width: 0;
}

/* Адаптив: не даём элементам наезжать друг на друга */
@media (max-width: 992px) {
  .pagination {
    padding: 20px;
    gap: 12px;
  }
  .pagination a,
  .pagination span {
    min-width: 120px;
    padding: 12px 16px;
  }
}

@media (max-width: 640px) {
  .pagination {
    max-width: 100%;
    padding: 16px;
    gap: 10px;
  }
  .pagination a,
  .pagination span {
    width: 100%;
    min-width: 0;
    justify-content: center;
    text-align: center;
  }
}



/* ==================== SPECIAL EFFECTS ==================== */

/* Выделение товара при переходе по ссылке */
.product-card.product-focused {
  border: 2px solid #2F6F4E !important;
  box-shadow: none !important;
  animation: none !important;
  transform: none !important;
  z-index: 10;
  position: relative;
}

/* Убираем иконку */
.product-card.product-focused::after {
  content: none !important;
  display: none !important;
}
/* Единый контейнер изображения карточки */
.product-image-static,
.product-image-placeholder {
  height: 288px; /* -20%: фиксированная высота области изображения */
  overflow: hidden;
}

.product-image-static img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}
