/* In-feed блоки novinki внутри flex .wide-cards-cont на /apps/* */

.wide-cards-cont > .listing-infeed-slot {
  flex: 1 1 100%;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  margin: 8px 0 16px;
}

/* Страховка: на /apps/ нет .novinki-page, поэтому border-box дублируем здесь. */
.listing-infeed-slot,
.listing-infeed-slot *,
.listing-infeed-slot *::before,
.listing-infeed-slot *::after {
  box-sizing: border-box;
}

.wide-cards-cont > .listing-infeed-slot .novinki-infeed {
  width: 100%;
  max-width: 100%;
}

/* Вне #novinki-page каталог-grid не нужен — чуть спокойнее радиус на листинге */
.listing-infeed-slot .novinki-infeed {
  border-radius: 20px;
}

/*
 * Wide-card задаёт размеры всем article внутри ленты. In-feed содержит свои
 * article (discussion lead, Embla slides, splash cards), поэтому возвращаем
 * им размеры компонента novinki.
 */
.wide-cards .wide-cards-cont > .listing-infeed-slot article {
  width: auto !important;
  max-width: none !important;
  flex: 0 0 auto !important;
}

.wide-cards .wide-cards-cont > .listing-infeed-slot .novinki-discussion__grid {
  width: 100%;
  min-width: 0;
}

.wide-cards .wide-cards-cont > .listing-infeed-slot .novinki-discussion__lead {
  width: 100% !important;
  max-width: none !important;
  min-width: 0;
  flex: none !important;
}

.wide-cards .wide-cards-cont > .listing-infeed-slot .novinki-discovery__stage,
.wide-cards .wide-cards-cont > .listing-infeed-slot .novinki-discovery__viewport,
.wide-cards .wide-cards-cont > .listing-infeed-slot .novinki-discovery__track {
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

.wide-cards .wide-cards-cont > .listing-infeed-slot .novinki-discovery-card {
  flex: 0 0 100% !important;
  width: 100% !important;
  max-width: none !important;
  min-width: 0;
}

.wide-cards .wide-cards-cont > .listing-infeed-slot .novinki-splash--infeed,
.wide-cards .wide-cards-cont > .listing-infeed-slot .novinki-splash-grid {
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

.wide-cards .wide-cards-cont > .listing-infeed-slot .novinki-splash-card {
  width: 100% !important;
  max-width: none !important;
  min-width: 0;
}

@media (max-width: 700px) {
  .wide-cards-cont > .listing-infeed-slot {
    margin: 4px 0 12px;
  }
}

@media (max-width: 640px) {
  .listing-infeed-slot .novinki-discovery .novinki-experience-nav {
    display: none;
  }
}

/* Стек скринов: без внутреннего Swiper. Дубль канона из novinki.scss — listing тянет этот файл напрямую. */
.listing-infeed-slot .novinki-discovery-card__shots {
  background: #101522;
}

.listing-infeed-slot .novinki-discovery-card__shots.is-instant .novinki-discovery-shot {
  transition: none;
}

.listing-infeed-slot .novinki-discovery-card__shots-track {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  transform: none !important;
}

.listing-infeed-slot .novinki-discovery-shot {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  z-index: 0;
  pointer-events: none;
  transform: none !important;
  transition: opacity 0.35s ease;
}

.listing-infeed-slot .novinki-discovery-shot.is-active {
  opacity: 1;
  z-index: 1;
}

.listing-infeed-slot .novinki-discovery-card__shots:not([data-shots-ready]) .novinki-discovery-shot:first-child {
  opacity: 1;
  z-index: 1;
}

@media (prefers-reduced-motion: reduce) {
  .listing-infeed-slot .novinki-discovery-shot {
    transition: none;
  }
}
