/* Основной контейнер */
.tt-hero-slider-wrapper {
  width: 100%;
  max-width: 1248px;
  margin: 0 auto;
  position: relative;
  box-sizing: border-box;
}

/* Для статичного баннера */
.tt-hero-static {
  position: relative;
  overflow: hidden;
  border-radius: 12px;
}

.tt-hero-static__image {
  display: block;
  width: 100%;
  height: auto;
}

/* Слайдер */
.tt-hero-slider {
  position: relative;
  width: 100%;
  overflow: hidden;
  border-radius: 12px;
  /* Соотношение сторон ~1248x272 (0.218) - это для ПК */
  padding-top: 21.8%;
  background: #220000; /* Темный фон под цвет сайта */
}

/* Абсолютно позиционируем каждый слайд */
.tt-hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.7s ease-in-out;
  pointer-events: none;
}

/* Активный слайд */
.tt-hero-slide--active {
  opacity: 1;
  pointer-events: auto;
}

/* Кликабельная область */
.tt-hero-slide__link {
  display: block;
  width: 100%;
  height: 100%;
  position: relative;
  text-decoration: none;
}

/* Картинка (общие стили) */
.tt-hero-slide__image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover; /* Заполняет блок, обрезая лишнее */
  object-position: center center; /* Центрируем картинку */
  display: block;
}

/* ПО УМОЛЧАНИЮ (Desktop): Скрываем мобильную, показываем ПК */
.tt-img-mobile {
  display: none !important;
}
.tt-img-desktop {
  display: block !important;
}

/* Кнопка внутри баннера */
.tt-hero-slide__btn {
  position: absolute;
  bottom: 10%;
  left: 50%;
  transform: translateX(-50%);
  padding: 10px 28px;
  border-radius: 999px;
  background: linear-gradient(135deg, #ff4d4d, #ff9f1c);
  color: #fff;
  font-weight: 600;
  font-size: 16px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25);
  white-space: nowrap;
}

/* Навигационные стрелки */
.tt-hero-slider__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  border: none;
  background: rgba(0, 0, 0, 0.35);
  color: #fff;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 18px;
  line-height: 32px;
  text-align: center;
  padding: 0;
  outline: none;
  transition: background 0.2s ease, transform 0.2s ease;
  z-index: 5;
}

.tt-hero-slider__nav--prev {
  left: 10px;
}

.tt-hero-slider__nav--next {
  right: 10px;
}

.tt-hero-slider__nav:hover {
  background: rgba(0, 0, 0, 0.55);
  transform: translateY(-50%) scale(1.05);
}

/* ----- Адаптив ----- */

/* Планшеты (до 1024px) */
@media (max-width: 1024px) {
  .tt-hero-slider {
    padding-top: 27%;
  }

  .tt-hero-slide__btn {
    font-size: 14px;
    padding: 8px 22px;
  }
}

/* Мобильные (до 768px) */
@media (max-width: 768px) {
  /* ПЕРЕКЛЮЧЕНИЕ КАРТИНОК */
  .tt-img-desktop {
    display: none !important;
  }
  .tt-img-mobile {
    display: block !important;
  }

  .tt-hero-slider-wrapper {
    border-radius: 0;
  }

  .tt-hero-slider {
    /* Уменьшено с 40% до 30%, чтобы картинка была более панорамной */
    padding-top: 30%;
    border-radius: 0;
  }

  .tt-hero-slide__btn {
    font-size: 13px;
    padding: 8px 18px;
    bottom: 15%; /* Чуть выше, так как слайдер стал уже */
  }

  .tt-hero-slider__nav {
    width: 26px;
    height: 26px;
    font-size: 16px;
    line-height: 26px;
  }

  /* ИСПРАВЛЕНИЕ: Уменьшен отступ снизу */
  .nasa-sc.products.woocommerce.ns-type-grid {
    margin-top: 30px !important; /* Было 195px */
  }
}

/* Маленькие экраны (до 480px) */
@media (max-width: 480px) {
  .tt-hero-slider {
    /* Уменьшено с 50% до 36%.
       Это компромисс: баннер достаточно виден, но не квадратный */
    padding-top: 36%;
  }

  .tt-hero-slide__btn {
    font-size: 12px;
    padding: 6px 16px;
  }

  /* ИСПРАВЛЕНИЕ: Уменьшен отступ снизу для телефонов */
  .nasa-sc.products.woocommerce.ns-type-grid {
    margin-top: 20px !important; /* Было 195px */
  }
}
