/* Mobile homepage presentation. Scoped to the homepage responsive modules. */

/* Mobile article cards. */

@media (max-width: 940px) {
  body.main-page .news-section.arsenal-articles-source-hidden {
    display: none !important;
  }

  body.main-page .arsenal-mobile-articles-app {
    display: block !important;
    margin: 18px auto 36px !important;
    overflow: visible !important;
    box-sizing: border-box !important;
    width: var(--arsenal-mobile-shell-w) !important;
    max-width: none !important;
}

  body.main-page .arsenal-mobile-articles-head {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    width: 100% !important;
    margin: 0 0 10px !important;
    padding: 0 2px !important;
    box-sizing: border-box !important;
  }

  body.main-page .arsenal-mobile-articles-title {
    color: #171521 !important;
    font-size: 24px !important;
    line-height: 1.06 !important;
    font-weight: 950 !important;
    letter-spacing: -0.04em !important;
  }

  body.main-page .arsenal-mobile-articles-card {
    position: relative !important;
    width: 100% !important;
    height: clamp(154px, 39.5vw, 174px) !important;
    margin-bottom: 30px !important;
    border: 0 !important;
    border-radius: 22px !important;
    background: transparent !important;
    box-shadow: none !important;
    overflow: visible !important;
    box-sizing: border-box !important;
  }

  body.main-page .arsenal-mobile-articles-viewport {
    width: 100% !important;
    height: 100% !important;
    overflow: hidden !important;
    border-radius: 22px !important;
    background: transparent !important;
    box-shadow: 0 10px 24px rgba(20, 19, 33, .09) !important;
  }

  body.main-page .arsenal-mobile-articles-track {
    display: flex !important;
    width: 100% !important;
    height: 100% !important;
    transform: translate3d(0,0,0);
  }

  body.main-page .arsenal-mobile-articles-slide {
    display: block !important;
    flex: 0 0 100% !important;
    width: 100% !important;
    height: 100% !important;
    overflow: hidden !important;
    border-radius: 22px !important;
    background: transparent !important;
    text-decoration: none !important;
  }

  body.main-page .arsenal-mobile-articles-slide img {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    border-radius: 22px !important;
    object-fit: cover !important;
    background: transparent !important;
  }

  body.main-page .arsenal-mobile-articles-dots {
    position: absolute !important;
    left: 0 !important;
    right: 0 !important;
    bottom: -25px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 7px !important;
    height: 12px !important;
    z-index: 5 !important;
    pointer-events: auto !important;
  }

  body.main-page .arsenal-mobile-articles-dot {
    display: block !important;
    width: 7px !important;
    height: 7px !important;
    min-width: 7px !important;
    min-height: 7px !important;
    border: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    border-radius: 999px !important;
    background: #d8d7e4 !important;
    box-shadow: none !important;
    opacity: 1 !important;
    transition: width .22s ease, background .22s ease, transform .22s ease !important;
  }

  body.main-page .arsenal-mobile-articles-dot.is-active {
    width: 22px !important;
    background: #393186 !important;
  }

body.main-page .arsenal-mobile-news-all,
body.main-page .arsenal-mobile-articles-all {


        position: relative !important;
        flex: 0 0 auto !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 5px !important;
        min-width: 112px !important;
        height: 28px !important;
        padding: 0 9px 0 12px !important;
        border: 0 !important;
        border-radius: 999px !important;
        background: rgba(57, 49, 134, .09) !important;
        color: #393186 !important;
        box-shadow: none !important;
        font-size: 12px !important;
        line-height: 28px !important;
        font-weight: 900 !important;
        text-decoration: none !important;
        white-space: nowrap !important;
        box-sizing: border-box !important;
    

}
body.main-page .arsenal-mobile-news-all::after,
body.main-page .arsenal-mobile-articles-all::after {


        content: "" !important;
        display: block !important;
        width: 7px !important;
        min-width: 7px !important;
        height: 7px !important;
        flex: 0 0 7px !important;
        margin: 0 0 0 1px !important;
        padding: 0 !important;
        border: 0 !important;
        border-top: 2px solid currentColor !important;
        border-right: 2px solid currentColor !important;
        background: none !important;
        transform: rotate(45deg) !important;
        box-sizing: border-box !important;
        font-size: 0 !important;
        line-height: 0 !important;
    

}
body.main-page .arsenal-mobile-news-all:hover,
body.main-page .arsenal-mobile-news-all:focus,
body.main-page .arsenal-mobile-articles-all:hover,
body.main-page .arsenal-mobile-articles-all:focus {


        background: rgba(57, 49, 134, .13) !important;
    

}}

/* Mobile news cards share the article-card presentation. */

/*
  Нормализуем "Новости" и "Статьи о ремонте" в одном стиле.
  Важно: это только визуал карточек/точек. JS-сборку статей не трогаем.
*/

@media (max-width: 940px) {
  body.main-page .arsenal-mobile-news-card,
  body.main-page .arsenal-mobile-articles-card {
    position: relative !important;
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;

    margin-bottom: 0 !important;
    padding: 0 0 11px !important;

    border-radius: 22px !important;
    border: 1px solid #ebe8f6 !important;
    background: #fff !important;
    box-shadow: 0 12px 28px rgba(31, 24, 84, 0.075) !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
  }

  body.main-page .arsenal-mobile-news-card::before,
  body.main-page .arsenal-mobile-articles-card::before {
    content: "" !important;
    position: absolute !important;
    left: 18px !important;
    right: 18px !important;
    bottom: 7px !important;
    height: 2px !important;
    border-radius: 999px !important;
    background: linear-gradient(90deg, transparent, rgba(57,49,134,0.16), transparent) !important;
    opacity: .5 !important;
    pointer-events: none !important;
  }

  body.main-page .arsenal-mobile-news-viewport,
  body.main-page .arsenal-mobile-articles-viewport {
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;

    overflow: hidden !important;
    border-radius: 22px 22px 18px 18px !important;
    background: #fff !important;
    box-shadow: none !important;
    touch-action: pan-y !important;
    position: relative !important;
    aspect-ratio: var(--arsenal-content-ratio, auto) !important;
}

  body.main-page .arsenal-mobile-news-track,
  body.main-page .arsenal-mobile-articles-track {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    width: 100% !important;
    min-height: 0 !important;
    max-height: none !important;
    transform: translate3d(0, 0, 0);
    will-change: transform !important;
    position: var(--arsenal-content-track-position, static) !important;
    inset: 0 !important;
    height: var(--arsenal-content-track-height, auto) !important;
}

  body.main-page .arsenal-mobile-news-slide,
  body.main-page .arsenal-mobile-articles-slide {
    position: relative !important;
    flex: 0 0 100% !important;
    width: 100% !important;
    min-width: 100% !important;

    display: block !important;

    border-radius: 22px 22px 18px 18px !important;
    overflow: hidden !important;
    background: #393186 !important;
    text-decoration: none !important;
    height: var(--arsenal-content-height, 166px) !important;
    min-height: var(--arsenal-content-min-height, 166px) !important;
    max-height: var(--arsenal-content-max-height, 166px) !important;
}

  body.main-page .arsenal-mobile-news-slide img,
  body.main-page .arsenal-mobile-articles-slide img {
    display: block !important;
    width: 100% !important;
    border-radius: 22px 22px 18px 18px !important;
    background: transparent !important;
    user-select: none !important;
    -webkit-user-drag: none !important;
    height: var(--arsenal-content-height, 166px) !important;
    min-height: var(--arsenal-content-min-height, 166px) !important;
    max-height: var(--arsenal-content-max-height, 166px) !important;
    object-fit: var(--arsenal-content-fit, cover) !important;
}

  body.main-page .arsenal-mobile-news-dots,
  body.main-page .arsenal-mobile-articles-dots {
    position: relative !important;
    left: auto !important;
    right: auto !important;
    bottom: auto !important;

    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;

    min-height: 22px !important;
    height: auto !important;
    margin: 10px 0 0 !important;
    padding: 0 12px !important;

    box-sizing: border-box !important;
    z-index: 5 !important;
    pointer-events: auto !important;
  }

  body.main-page .arsenal-mobile-news-dot,
  body.main-page .arsenal-mobile-articles-dot {
    display: block !important;
    width: 8px !important;
    height: 8px !important;
    min-width: 8px !important;
    min-height: 8px !important;
    max-width: 8px !important;

    padding: 0 !important;
    margin: 0 !important;
    border: 0 !important;
    border-radius: 999px !important;
    background: #d8d5e4 !important;
    box-shadow: none !important;
    opacity: 1 !important;
    transition: width .22s ease, max-width .22s ease, background .22s ease, transform .22s ease !important;
  }

  body.main-page .arsenal-mobile-news-dot.is-active,
  body.main-page .arsenal-mobile-articles-dot.is-active {
    width: 22px !important;
    max-width: 22px !important;
    background: #393186 !important;
    transform: scaleY(1.08) !important;
  }

  @media (max-width: 374px) {
    body.main-page .arsenal-mobile-news-slide,
    body.main-page .arsenal-mobile-articles-slide,
    body.main-page .arsenal-mobile-news-slide img,
    body.main-page .arsenal-mobile-articles-slide img {
      height: 156px !important;
      min-height: 156px !important;
      max-height: 156px !important;
    }
  }
}



/* Article section link alignment. */
@media (max-width: 940px) {
  body.main-page .arsenal-mobile-articles-head {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 12px !important;
  }

  body.main-page .arsenal-mobile-articles-title {
    flex: 1 1 auto !important;
    min-width: 0 !important;
  }
}


/* PWA homepage action cards: keep the price rows aligned across the two-column grid. */
@media (max-width: 940px) {
  body.main-page .actions-section .product-list .product-block,
  body.main-page .actions-section .product-list .product-block .product-container {
    height: 100% !important;
  }

  body.main-page .actions-section .product-list .product-block .product-container {
    display: flex !important;
    flex-direction: column !important;
  }

  body.main-page .actions-section .product-list .product-block h3 {
    flex: 1 0 auto !important;
    margin-bottom: 10px !important;
  }

  body.main-page .actions-section .product-list .product-block .price {
    margin-top: auto !important;
  }

  body.main-page .actions-section .product-list .product-block .price-by-card,
  body.main-page .actions-section .product-list .product-block .price-new {
    box-sizing: border-box !important;
    width: 100% !important;
  }
}

/* Current homepage action carousel uses catalog-card__surface, not product-container. */
@media (max-width: 940px) {
  body.main-page .actions-section .catalog-card-carousel .catalog-card,
  body.main-page .actions-section .catalog-card-carousel .catalog-card__surface {
    height: 100% !important;
  }

  body.main-page .actions-section .catalog-card-carousel .catalog-card__surface {
    display: flex !important;
    flex-direction: column !important;
  }

  body.main-page .actions-section .catalog-card-carousel .catalog-card__purchase {
    margin-top: auto !important;
  }
}


@media (min-width: 481px) and (max-width: 940px) {

body.main-page {
    --arsenal-content-ratio: 960 / 444;
    --arsenal-content-track-position: absolute;
    --arsenal-content-track-height: 100%;
    --arsenal-content-height: 100%;
    --arsenal-content-min-height: 0px;
    --arsenal-content-max-height: none;
}
body.main-page .arsenal-mobile-news-slide {
    --arsenal-content-fit: contain;
}}