/* Reserve the final carousel geometry before scripts or images arrive. */
.header-logo img, .useful-goods .image img, .promo-pages .item img { height: auto; }
.ems-hero-frame { position: relative; aspect-ratio: var(--banner-ratio); margin: 15px 0; }
.ems-hero-frame .ems-hero-carousel { display: block; height: 100%; }
.ems-hero-carousel .owl-stage-outer,
.ems-hero-carousel .owl-stage,
.ems-hero-carousel .owl-item { height: 100%; }
.main-slider .ems-hero-carousel .item,
.mobile-main-slider .ems-hero-carousel .item { height: 100%; margin: 0; }
.ems-hero-carousel .item a,
.ems-hero-carousel picture,
.ems-hero-carousel picture img { display: block; width: 100%; height: 100%; }
.ems-hero-carousel picture img { object-fit: contain; }
.ems-hero-carousel:not(.owl-loaded) > .item { display: none; }
.ems-hero-carousel:not(.owl-loaded) > .item:first-child { display: block; }
/* Stack offscreen cards in one grid row so their maximum height is reserved. */
.ems-cards-carousel:not(.owl-loaded) { display: grid; grid-template-columns: minmax(0, 1fr); }
.ems-cards-carousel:not(.owl-loaded) > .item { grid-row: 1; grid-column: 1; min-width: 0; }
.ems-cards-carousel:not(.owl-loaded) > .item:nth-child(n+2) { visibility: hidden; }
@media (min-width: 576px) {
    .ems-cards-carousel:not(.owl-loaded) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .ems-cards-carousel:not(.owl-loaded) > .item:nth-child(2n) { grid-column: 2; }
    .ems-cards-carousel:not(.owl-loaded) > .item:nth-child(-n+2) { visibility: visible; }
}
@media (min-width: 768px) {
    #useful-goods:not(.owl-loaded) { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    #useful-goods:not(.owl-loaded) > .item { grid-column: 1; }
    #useful-goods:not(.owl-loaded) > .item:nth-child(3n+2) { grid-column: 2; }
    #useful-goods:not(.owl-loaded) > .item:nth-child(3n) { grid-column: 3; }
    #useful-goods:not(.owl-loaded) > .item:nth-child(-n+3) { visibility: visible; }
}
@media (min-width: 1024px) {
    #useful-goods:not(.owl-loaded) { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    #useful-goods:not(.owl-loaded) > .item { grid-column: 1; }
    #useful-goods:not(.owl-loaded) > .item:nth-child(4n+2) { grid-column: 2; }
    #useful-goods:not(.owl-loaded) > .item:nth-child(4n+3) { grid-column: 3; }
    #useful-goods:not(.owl-loaded) > .item:nth-child(4n) { grid-column: 4; }
    #useful-goods:not(.owl-loaded) > .item:nth-child(-n+4) { visibility: visible; }
    #promo-pages:not(.owl-loaded) { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    #promo-pages:not(.owl-loaded) > .item { grid-column: 1; }
    #promo-pages:not(.owl-loaded) > .item:nth-child(3n+2) { grid-column: 2; }
    #promo-pages:not(.owl-loaded) > .item:nth-child(3n) { grid-column: 3; }
    #promo-pages:not(.owl-loaded) > .item:nth-child(-n+3) { visibility: visible; }
}
.ems-map-status { padding: 28px 20px; text-align: center; }
.ems-map-status a { display: inline-block; margin-top: 12px; text-decoration: underline; }
.yandex-map-overflow #map[hidden], .ems-map-status[hidden] { display: none !important; }
.ems-captcha-wrap { position: relative; min-height: 78px; }
.ems-lazy-recaptcha { min-height: 78px; }
.ems-captcha-status { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: center; gap: 6px; background: #fff; font-size: 14px; }
.ems-captcha-status[hidden] { display: none !important; }
.ems-captcha-status button { align-self: flex-start; }
