/* Фиксация высоты карусели и вписывание вертикальных картинок */
.carousel-custom {
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  background-color: #1a1a1a; /* Темный фон по краям для узких фото */
  cursor: grab;
  user-select: none;
}

.carousel-custom .carousel-inner {
  height: 480px; /* Фиксированная высота слайдера на ПК */
}

.carousel-custom .carousel-item {
  height: 100%;
  width: 100%;
}

.carousel-custom .carousel-item img {
  height: 100% !important;
  width: 100% !important;
  object-fit: cover; /* Заполняет всю область высоты слайдера без деформации */
  object-position: center;
}

/* Превью под слайдером */
.carousel-thumbnails {
  position: relative;
  max-width: 100%;
  scrollbar-width: none; /* Скрываем стандартный скроллбар в Firefox */
  padding-top: 8px; /* Отступ сверху, чтобы превью не обрезались при увеличении и подъеме вверх */
  padding-bottom: 8px; /* Отступ снизу для баланса */
}
.carousel-thumbnails::-webkit-scrollbar {
  display: none; /* Скрываем скроллбар в Chrome/Safari */
}

.thumbnail-item {
  width: 90px;
  height: 60px;
  flex-shrink: 0;
  cursor: pointer;
  border-radius: 6px;
  overflow: hidden;
  border: 2px solid transparent !important;
  background-origin: border-box !important;
  background-clip: padding-box, border-box !important;
  background-image: linear-gradient(#fff, #fff), linear-gradient(#dee2e6, #dee2e6) !important;
  opacity: 0.5;
  transition: all 0.25s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.thumbnail-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.thumbnail-item.active, .thumbnail-item:hover {
  opacity: 1;
  /* Плавный переливающийся градиент подсветки */
  background-image: linear-gradient(#fff, #fff), linear-gradient(90deg, var(--color-turquoise) 0%, var(--color-purple) 50%, var(--color-turquoise) 100%) !important;
  background-size: auto, 200% auto !important;
  animation: border-shimmer 3s linear infinite;
  transform: translateY(-3px); /* Подъем чуть выше */
}

@media (max-width: 991.98px) {
  .carousel-custom .carousel-inner {
    height: 380px; /* Высота для планшетов */
  }
}

@media (max-width: 575.98px) {
  .carousel-custom .carousel-inner {
    height: 250px; /* Высота для мобильных */
  }
  .thumbnail-item {
    width: 70px;
    height: 45px;
  }
}
