/* EVO_MODERN_MODULE_PRESENTATION_R6 — homepage-only presentation overrides. */

/* A. Keep the EO mega-menu functional, but remove its forced almost-viewport height. */
@media (min-width: 992px) {
  body.eo-modern-page .eo-catalog-megamenu-r3 .menu1.new {
    height: clamp(320px, calc(100vh - 220px), 440px) !important;
    min-height: 0 !important;
    max-height: clamp(320px, calc(100vh - 220px), 440px) !important;
  }

  body.eo-modern-page .eo-catalog-megamenu-r3 .menu1.new > .menu__collapse,
  body.eo-modern-page .eo-catalog-megamenu-r3 .menu1.new .eo-mega-panel {
    height: 100% !important;
    min-height: 0 !important;
    max-height: 100% !important;
    overscroll-behavior: contain;
  }

  body.eo-modern-page .eo-catalog-megamenu-r3 .eo-mega-panel__inner {
    min-height: 0;
  }
}

/* B–D. Real module data in clean Lovable grids. */
.eo-modern-home[data-eo-stage="r6"] .eo-category-grid,
.eo-modern-home[data-eo-stage="r6"] .eo-product-grid,
.eo-modern-home[data-eo-stage="r6"] .eo-product-grid--promotion {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  padding: 0;
  overflow: visible;
  border-radius: 0;
  background: transparent;
}

.eo-modern-home[data-eo-stage="r6"] .eo-category-card {
  padding: 18px;
  border-color: #e6e6ea;
  border-radius: 22px;
  box-shadow: 0 8px 26px rgba(32, 32, 37, .045);
}

.eo-modern-home[data-eo-stage="r6"] .eo-category-card__media {
  height: 190px;
  border-radius: 16px;
  background: #f7f7f8;
}

.eo-modern-home[data-eo-stage="r6"] .eo-category-card__image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  mix-blend-mode: multiply;
}

.eo-modern-home[data-eo-stage="r6"] .eo-product-card.product-thumb {
  min-height: 532px;
  padding: 18px;
  border-color: #e6e6ea;
  border-radius: 22px;
  box-shadow: 0 8px 26px rgba(32, 32, 37, .045);
}

.eo-modern-home[data-eo-stage="r6"] .eo-product-card__media {
  height: 232px;
  border-radius: 16px;
  background: #f8f8f9;
}

.eo-modern-home[data-eo-stage="r6"] .eo-product-card__image-link {
  padding: 10px;
}

.eo-modern-home[data-eo-stage="r6"] .eo-product-card__image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  mix-blend-mode: multiply;
}

.eo-modern-home[data-eo-stage="r6"] .eo-product-card__buy {
  min-height: 44px !important;
  border-color: #ed3124 !important;
  border-radius: 12px !important;
  background: #ed3124 !important;
  color: #fff !important;
}

.eo-modern-home[data-eo-stage="r6"] .eo-product-card__quick {
  min-height: 30px !important;
  border: 0 !important;
  background: transparent !important;
  color: #6d6d76 !important;
}

.eo-modern-home[data-eo-stage="r6"] .eo-product-grid--count-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.eo-modern-home[data-eo-stage="r6"] .eo-product-grid--count-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

@media (min-width: 992px) {
  .eo-modern-home[data-eo-stage="r6"] .eo-product-grid--promotion.eo-product-grid--count-1 {
    grid-template-columns: 1fr;
  }

  .eo-modern-home[data-eo-stage="r6"] .eo-product-grid--promotion.eo-product-grid--count-1 .eo-product-card {
    display: grid;
    min-height: 390px;
    grid-template-columns: minmax(320px, 42%) minmax(0, 1fr);
    gap: 34px;
    align-items: stretch;
    padding: 28px;
    border-color: rgba(237, 49, 36, .18);
    background: linear-gradient(120deg, #fff 0%, #fff 58%, #fff4f1 100%);
  }

  .eo-modern-home[data-eo-stage="r6"] .eo-product-grid--promotion.eo-product-grid--count-1 .eo-product-card__media {
    height: 334px;
  }
}

/* E–H. Final scenes/services/articles; old module roots remain as hidden data sources. */
.eo-modern-home[data-eo-stage="r6"] .eo-solution-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.eo-modern-home[data-eo-stage="r6"] .eo-solution-card,
.eo-modern-home[data-eo-stage="r6"] .eo-service-card.product-thumb,
.eo-modern-home[data-eo-stage="r6"] .eo-article-card {
  border-color: #e6e6ea;
  box-shadow: 0 8px 26px rgba(32, 32, 37, .045);
}

.eo-modern-home[data-eo-stage="r6"] .eo-services-layout {
  grid-template-columns: minmax(0, 1fr) 400px;
  gap: 20px;
}

.eo-modern-home[data-eo-stage="r6"] .eo-service-card__request {
  border-color: #ed3124;
  background: #ed3124;
  color: #fff;
}

.eo-modern-home[data-eo-stage="r6"] .eo-article-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: stretch;
  gap: 16px;
}

.eo-modern-home[data-eo-stage="r6"] .eo-article-card__media {
  height: 200px;
  padding: 16px;
  background: #fff;
}

.eo-modern-home[data-eo-stage="r6"] .eo-article-card__image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  mix-blend-mode: multiply;
}

.eo-modern-home[data-eo-stage="r6"] .eo-article-card__content strong {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.eo-modern-home[data-eo-stage="r6"] .eo-article-card__content p {
  display: -webkit-box;
  overflow: hidden;
  font-size: 15px;
  line-height: 1.65;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.eo-modern-home[data-eo-stage="r6"] .eo-seo-source-integrated {
  display: none !important;
  height: 0 !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
}

.eo-modern-home[data-eo-stage="r6"] .eo-seo-faq.eo-seo-integrated {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.eo-modern-home[data-eo-stage="r6"] .eo-seo-faq__intro,
.eo-modern-home[data-eo-stage="r6"] .eo-seo-live-copy,
.eo-modern-home[data-eo-stage="r6"] .eo-seo-faq > .eo-faq {
  padding: 42px 46px;
  border: 1px solid #e6e6ea;
  border-radius: 26px;
  background: #fff;
}

.eo-modern-home[data-eo-stage="r6"] .eo-seo-live-copy__item + .eo-seo-live-copy__item {
  margin-top: 30px;
  padding-top: 30px;
  border-top: 1px solid #e6e6ea;
}

.eo-modern-home[data-eo-stage="r6"] .eo-seo-live-copy h1,
.eo-modern-home[data-eo-stage="r6"] .eo-seo-live-copy h2,
.eo-modern-home[data-eo-stage="r6"] .eo-seo-live-copy h3 {
  margin: 0 0 14px;
  color: #202025;
  font-size: 24px;
  line-height: 1.3;
  font-weight: 800;
}

.eo-modern-home[data-eo-stage="r6"] .eo-seo-live-copy p,
.eo-modern-home[data-eo-stage="r6"] .eo-seo-live-copy li {
  color: #74747d;
  font-size: 15px;
  line-height: 1.75;
}

/* I. Manufacturer lane is real supplemental data with complete scroll cards. */
.eo-modern-home[data-eo-stage="r6"] .eo-brand-track {
  scroll-padding-inline: 2px;
}

.eo-modern-home[data-eo-stage="r6"] .eo-brand-card {
  width: 190px !important;
  min-width: 190px !important;
  flex-basis: 190px !important;
  border-color: #e6e6ea;
  box-shadow: 0 6px 20px rgba(32, 32, 37, .035);
}

/* J. Official Yandex summary; no unverified individual review text. */
.eo-yandex-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin: -8px 0 20px;
}

.eo-yandex-mark {
  display: inline-flex;
  min-height: 36px;
  align-items: center;
  gap: 9px;
  padding: 5px 13px;
  border: 1px solid #e6e6ea;
  border-radius: 999px;
  background: #fff;
  color: #74747d;
  font-size: 13px;
  font-weight: 800;
}

.eo-yandex-mark b {
  display: flex;
  width: 22px;
  height: 22px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #ed3124;
  color: #fff;
  font-size: 12px;
}

.eo-yandex-rating {
  display: flex;
  align-items: center;
  gap: 10px;
}

.eo-yandex-rating strong {
  color: #202025;
  font-size: 26px;
  line-height: 1;
  font-weight: 800;
}

.eo-yandex-rating > span {
  color: #ed3124;
  font-size: 17px;
  letter-spacing: 2px;
}

.eo-yandex-rating small {
  color: #74747d;
  font-size: 13px;
}

.eo-yandex-pending {
  display: flex;
  min-height: 150px;
  align-items: center;
  justify-content: space-between;
  gap: 36px;
  padding: 30px 32px;
  border: 1px solid #e6e6ea;
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 8px 26px rgba(32, 32, 37, .045);
}

.eo-yandex-pending strong {
  color: #202025;
  font-size: 20px;
  line-height: 1.3;
  font-weight: 800;
}

.eo-yandex-pending p {
  max-width: 760px;
  margin: 8px 0 0;
  color: #74747d;
  font-size: 15px;
  line-height: 1.65;
}

.eo-yandex-pending > a {
  display: inline-flex;
  min-height: 46px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  padding: 0 20px;
  border-radius: 999px;
  background: #ed3124;
  color: #fff !important;
  font-size: 14px;
  font-weight: 800;
}

/* K. Homepage-only light FooterMain; original links and hooks stay in the DOM. */
body.eo-modern-page > footer.eo-modern-footer {
  padding-top: 0;
  border-top: 1px solid #e6e6ea;
  background: #fff;
  color: #202025;
}

.eo-modern-footer .subscribe {
  padding: 30px 0;
  border-bottom: 1px solid #e6e6ea;
  background: #f6f6f8;
}

.eo-modern-footer .subscribe__title,
.eo-modern-footer .footer__column-heading {
  color: #202025;
}

.eo-modern-footer .subscribe__text,
.eo-footer-brand p,
.eo-modern-footer .footer__column-li,
.eo-modern-footer .footer__column-a {
  color: #74747d !important;
}

.eo-modern-footer .subscribe__input {
  border: 1px solid #e6e6ea;
  background: #fff;
  color: #202025;
}

.eo-modern-footer .subscribe__btn {
  background: #ed3124;
  color: #fff;
}

.eo-modern-footer > .container {
  padding: 48px 0 24px;
}

.eo-modern-footer .row-flex {
  grid-template-columns: 280px repeat(4, minmax(0, 1fr));
  gap: 40px;
}

.eo-modern-footer .footer__text,
.eo-modern-footer .footer__socials-payments {
  border-top-color: #e6e6ea;
  color: #74747d;
  background: #fff;
}

.eo-modern-footer .footer__socials-icon,
.eo-footer-brand__contacts a {
  color: #202025 !important;
}

.eo-modern-footer .footer__payments {
  filter: none;
  opacity: .78;
}

/* Preserve UniShop2 sticky lifecycle; R3's relative header rule must not win while fixed. */
@media (min-width: 992px) {
  body.eo-modern-page > header.eo-modern-header.fixed {
    position: fixed !important;
    z-index: 1040;
    top: 0;
    right: 0;
    left: 0;
    width: 100%;
    background: #fff;
    box-shadow: 0 10px 30px rgba(32, 32, 37, .10);
  }

  body.eo-modern-page > header.eo-modern-header.fixed .eo-header-topbar,
  body.eo-modern-page > header.eo-modern-header.fixed .eo-header-secondary {
    display: none;
  }

  body.eo-modern-page > header.eo-modern-header.fixed .eo-header-main {
    min-height: 76px;
    padding-top: 9px;
    padding-bottom: 9px;
  }
}

@media (max-width: 1279px) {
  .eo-modern-home[data-eo-stage="r6"] .eo-product-grid,
  .eo-modern-home[data-eo-stage="r6"] .eo-product-grid--promotion,
  .eo-modern-home[data-eo-stage="r6"] .eo-category-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .eo-modern-footer .row-flex {
    grid-template-columns: 240px repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 1023px) {
  .eo-modern-home[data-eo-stage="r6"] .eo-services-layout {
    grid-template-columns: 1fr;
  }

  .eo-yandex-pending {
    align-items: flex-start;
    flex-direction: column;
    gap: 20px;
  }
}

@media (max-width: 767px) {
  .eo-modern-home[data-eo-stage="r6"] .eo-category-grid,
  .eo-modern-home[data-eo-stage="r6"] .eo-product-grid,
  .eo-modern-home[data-eo-stage="r6"] .eo-product-grid--promotion {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 11px;
  }

  .eo-modern-home[data-eo-stage="r6"] .eo-category-card__media {
    height: 142px;
  }

  .eo-modern-home[data-eo-stage="r6"] .eo-product-card.product-thumb {
    min-height: 480px;
    padding: 12px;
  }

  .eo-modern-home[data-eo-stage="r6"] .eo-product-card__media {
    height: 178px;
  }

  .eo-modern-home[data-eo-stage="r6"] .eo-solution-grid,
  .eo-modern-home[data-eo-stage="r6"] .eo-services-grid,
  .eo-modern-home[data-eo-stage="r6"] .eo-article-grid {
    grid-template-columns: 1fr;
  }

  .eo-modern-home[data-eo-stage="r6"] .eo-seo-faq__intro,
  .eo-modern-home[data-eo-stage="r6"] .eo-seo-live-copy,
  .eo-modern-home[data-eo-stage="r6"] .eo-seo-faq > .eo-faq {
    padding: 28px 22px;
    border-radius: 23px;
  }

  .eo-yandex-summary {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
  }

  .eo-yandex-pending {
    min-height: 0;
    padding: 24px 20px;
  }

  .eo-yandex-pending > a {
    width: 100%;
  }

  .eo-modern-footer .row-flex {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 30px 22px;
  }

  .eo-modern-footer .eo-footer-brand {
    grid-column: 1 / -1;
  }
}

@media (max-width: 430px) {
  .eo-modern-home[data-eo-stage="r6"] .eo-category-card__media {
    height: 126px;
  }

  .eo-modern-home[data-eo-stage="r6"] .eo-product-card.product-thumb {
    min-height: 460px;
  }

  .eo-modern-home[data-eo-stage="r6"] .eo-product-card__media {
    height: 158px;
  }

  .eo-yandex-rating {
    flex-wrap: wrap;
  }

  .eo-yandex-rating small {
    width: 100%;
  }

  .eo-modern-footer .row-flex {
    grid-template-columns: 1fr;
  }

  .eo-modern-footer .eo-footer-brand {
    grid-column: auto;
  }
}
