/* ============================================================
   STACK — финальный
   ============================================================ */

.mp-stack {
  width: 100vw;
  max-width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  background: #000;
  overflow: hidden;
}

.mp-stack__item {
  position: sticky;
  top: 0;
  width: 100%;
  height: 100vh;
  min-height: 100vh;
  max-height: 100vh;
  display: flex;
  flex-direction: column;
  background: #000;
  transform-origin: center top;
  transition: transform .12s linear, opacity .12s linear;
  will-change: transform, opacity;
}

.mp-stack__item:nth-child(n+2) {
  border-top: 1px solid rgba(255,255,255,.1);
  border-radius: 24px 24px 0 0;
  box-shadow: 0 -30px 80px -20px rgba(0,0,0,.9);
  background: #0a0a0a;
}
.mp-stack__item:nth-child(1) { z-index: 1; }
.mp-stack__item:nth-child(2) { z-index: 2; }
.mp-stack__item:nth-child(3) { z-index: 3; }

body.has-admin-bar .mp-stack__item {
  top: 44px;
  height: calc(100vh - 44px);
  min-height: calc(100vh - 44px);
  max-height: calc(100vh - 44px);
}

.mp-stack__section {
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  overflow-x: hidden;
}

/* ============================================================
   Единый контейнер контента во всех трёх блоках стека
   ============================================================ */

.mp-stack .section__inner {
  width: 100% !important;
  max-width: 1200px !important;
  margin: 0 auto !important;
  padding-left: 40px !important;
  padding-right: 40px !important;
}

.mp-stack__item:nth-child(1) .section__inner {
  max-width: 1200px !important;
  margin: 0 auto !important;
}

.mp-stack__head-only .section__inner,
.mp-stack__stats-wrap .section__inner {
  max-width: 1200px !important;
  margin: 0 auto !important;
}

.mp-stack .section__head {
  margin-bottom: 24px;
}

.mp-stack .section__title {
  margin: 0;
}

.mp-stack .section.about {
  width: 100% !important;
  max-width: 100% !important;
  padding: 40px 0 !important;
  margin: 0 !important;
}

.mp-stack .about__stats .about__stat {
  opacity: 1 !important;
  transform: none !important;
  animation: none !important;
}

/* Видео в блоке 02 — на всю ширину */
.mp-stack__media-fullbleed {
  width: 100% !important;
  max-width: 100% !important;
  height: 50vh;
  min-height: 280px;
  max-height: 600px;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden;
  flex: 0 0 auto;
}

.mp-stack__media-fullbleed .about__media,
.mp-stack__media-fullbleed .about__media-frame,
.mp-stack__media-fullbleed .about__media-video {
  width: 100% !important;
  height: 100% !important;
  max-width: 100% !important;
  min-height: 0 !important;
  margin: 0 !important;
  border-radius: 0 !important;
  border: none !important;
  box-shadow: none !important;
}

/* Слайдер в блоке 03 */
.mp-stack .section.showcase {
  width: 100% !important;
  max-width: 100% !important;
  padding: 0 !important;
  margin: 0 !important;
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  background: #000;
  overflow: hidden;
}

/* Увеличенная полезная высота: компактная шапка → слайдеру больше места */
.mp-stack .section.showcase .section__inner {
  width: 100% !important;
  max-width: 1200px !important;
  margin: 0 auto !important;
  flex: 0 0 auto;
  padding: 16px 40px 8px !important;
}

.mp-stack .section.showcase .section__head {
  margin-bottom: 8px !important;
}

/* Уменьшаем картинки блока «Продукция» + аккуратное скругление */
.mp-stack .section.showcase .showcase-slider {
  flex: 1 1 auto;
  width: 100% !important;
  max-width: 100% !important;
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  margin: 0 !important;
  padding: 0 !important;
  border-radius: 18px !important;
  overflow: hidden;

  transform: scale(0.92) !important;
  transform-origin: center center !important;

  -webkit-mask: none !important;
          mask: none !important;
  -webkit-mask-image: none !important;
          mask-image: none !important;
}

.mp-stack .showcase-slider__slides,
.mp-stack .showcase-slide,
.mp-stack .showcase-slide__bg,
.mp-stack .showcase-slide.is-active .showcase-slide__bg {
  width: 100% !important;
  height: 100% !important;
  inset: 0 !important;
  transform: none !important;
  -webkit-mask: none !important;
          mask: none !important;
  -webkit-mask-image: none !important;
          mask-image: none !important;
}

/* ============================================================
   Блок 01 — растягиваем фото и выравниваем сетку
   ============================================================ */

.mp-stack__item:nth-child(1) .section__inner {
  max-width: 1280px !important;
  margin: 0 auto !important;
}

.mp-stack__item:nth-child(1) .about__grid {
  display: grid !important;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr) !important;
  gap: 40px !important;
  align-items: stretch !important;
}

.mp-stack__item:nth-child(1) .about__body {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.mp-stack__item:nth-child(1) .about__media {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 420px;
  display: flex;
}

.mp-stack__item:nth-child(1) .about__media-frame {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 420px;
  border-radius: 18px;
  overflow: hidden;
}

.mp-stack__item:nth-child(1) .about__media-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

/* ============================================================
   Скрываем все оверлейные теги-бейджи
   ============================================================ */

.mp-stack .about__media-badge,
.mp-stack .about__media-caption,
.mp-stack .about__media-badge-dot {
  display: none !important;
}

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

@media (max-width: 900px) {
  .mp-stack__item:nth-child(1) .about__grid {
    grid-template-columns: 1fr !important;
    gap: 24px !important;
  }
  .mp-stack__item:nth-child(1) .about__media,
  .mp-stack__item:nth-child(1) .about__media-frame {
    min-height: 280px;
  }
}

@media (max-width: 768px) {
  .mp-stack {
    width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }
  .mp-stack__item {
    position: relative;
    top: auto;
    height: auto;
    min-height: auto;
    max-height: none;
    border-radius: 0;
    box-shadow: none;
    transform: none !important;
    opacity: 1 !important;
  }
  body.has-admin-bar .mp-stack__item { top: auto; height: auto; }
  .mp-stack__section { overflow: visible; display: block; }

  .mp-stack .section__inner,
  .mp-stack .section.showcase .section__inner {
    padding-left: 20px !important;
    padding-right: 20px !important;
  }

  .mp-stack .section.about { padding: 40px 0 !important; }
  .mp-stack__media-fullbleed { height: 40vh; min-height: 220px; }

  /* Блок Продукция на мобилке — выше и чуть меньше */
  .mp-stack .section.showcase .showcase-slider {
    flex: none;
    height: 85vh;
    min-height: 520px;
    transform: scale(0.94) !important;
    border-radius: 14px !important;
  }
}