/* === Organic & Natural — Responsive Storefront Design System === */

/* 0. Safe horizontal-overflow guard (clip preserves position:sticky) */
html,
body {
    overflow-x: clip;
}

/* 1. Full-width action buttons across desktop, tablet, and mobile (overrides legacy NLM057) */
#allrecords .t-catalog__card__btns-wrapper {
    display: flex !important;
    flex-direction: column !important;
    gap: 8px !important;
    margin-top: 12px !important;
}

#allrecords .t-catalog__card.t-catalog__card-nlm057 .t-catalog__card__btn,
#allrecords .t-catalog__card.t-catalog__card-nlm057 a.t-catalog__card__btn.t-btn,
#allrecords .t-catalog__card.t-catalog__card-nlm057 a.js-catalog-prod-btn.t-catalog__card__btn.t-btn,
#allrecords .t-catalog__card.t-catalog__card-nlm057 a.js-catalog-prod-btn2.t-catalog__card__btn.t-catalog__card__btn_second.t-btn,
#allrecords .t-catalog__card.t-catalog__card-nlm057 .wbtn,
#allrecords .t-catalog__card .t-catalog__card__btn {
    width: 100% !important;
    max-width: 100% !important;
    min-height: 40px !important;
    margin: 0 !important;
    box-sizing: border-box !important;
    cursor: pointer;
    transition: background-color 180ms ease, color 180ms ease, border-color 180ms ease, opacity 180ms ease;
}

/* 2. Uniform card geometry & clean white studio backdrop behind transparent images */
#allrecords .t-catalog__card {
    display: flex;
    flex-direction: column;
}

#allrecords .t-catalog__card__imgwrapper,
#allrecords .t-catalog__card__bgimg,
#allrecords .t-store__prod-popup__slider .t-slds__bgimg,
#allrecords .t-catalog__prod-popup__slider .t-slds__bgimg {
    background-color: #ffffff;
}

#allrecords .t-catalog__card__imgwrapper,
#allrecords .t-catalog__card__bgimg {
    flex: 0 0 auto;
}

#allrecords .t-catalog__card__wrap_txt-and-btns,
#allrecords .t-catalog__card__wrap_txt-and-opts,
#allrecords .t-catalog__card__textwrapper,
#allrecords .t-catalog__card__wrap_txt-and-opts > a,
#allrecords .t-catalog__card__textwrapper > a,
#allrecords .t-catalog__card__link.js-product-link {
    display: flex !important;
    flex-direction: column !important;
    flex: 1 1 auto !important;
    height: 100%;
    box-sizing: border-box;
}

#allrecords .t-catalog__card__descr.js-product-descr {
    margin-top: 6px;
    margin-bottom: 0;
}

/* 3. Clear typographic price hierarchy + deterministic alignment with Yandex Split badges */
#allrecords .t-catalog__card .js-catalog-price-wrapper.t-catalog__card__price-wrapper {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: wrap !important;
    align-items: baseline !important;
    justify-content: flex-start !important;
    column-gap: 8px !important;
    row-gap: 6px !important;
    margin-top: auto !important;
    padding-top: 12px !important;
    width: 100%;
    box-sizing: border-box;
}

#allrecords .t-catalog__card .t-catalog__card__price,
#allrecords .t-catalog__card .t-catalog__card__price-value,
#allrecords .t-catalog__card .t-catalog__card__price-currency {
    font-size: 22px !important;
    font-weight: 800 !important;
    line-height: 1.2 !important;
    letter-spacing: -0.01em;
    font-variant-numeric: tabular-nums;
}

#allrecords .t-catalog__card .t-catalog__card__price_old,
#allrecords .t-catalog__card .t-catalog__card__price_old .t-catalog__card__price-value,
#allrecords .t-catalog__card .t-catalog__card__price_old .t-catalog__card__price-currency {
    font-size: 16px !important;
    font-weight: 500 !important;
    opacity: 0.55;
}

#allrecords .t-catalog__card .js-catalog-price-wrapper .yandex-pay-badge {
    flex: 1 0 100% !important;
    width: 100% !important;
    max-width: 100% !important;
    margin-top: 0 !important;
    padding: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 5px !important;
}

/* Tablet & small desktop (481px - 1200px) */
@media screen and (max-width: 1200px) {
    #allrecords .t-catalog__card .t-catalog__card__price,
    #allrecords .t-catalog__card .t-catalog__card__price-value,
    #allrecords .t-catalog__card .t-catalog__card__price-currency {
        font-size: 20px !important;
    }

    #allrecords .t-catalog__card .t-catalog__card__price_old,
    #allrecords .t-catalog__card .t-catalog__card__price_old .t-catalog__card__price-value,
    #allrecords .t-catalog__card .t-catalog__card__price_old .t-catalog__card__price-currency {
        font-size: 15px !important;
    }
}

/* Small desktop 3-col title balance (961px - 1200px) */
@media screen and (min-width: 961px) and (max-width: 1200px) {
    #allrecords .t-catalog__card__title {
        font-size: 16px !important;
        line-height: 1.25 !important;
    }
}

/* Mobile (<= 480px) */
@media screen and (max-width: 480px) {
    #allrecords .t-catalog__card .t-catalog__card__price,
    #allrecords .t-catalog__card .t-catalog__card__price-value,
    #allrecords .t-catalog__card .t-catalog__card__price-currency {
        font-size: 18px !important;
    }

    #allrecords .t-catalog__card .t-catalog__card__price_old,
    #allrecords .t-catalog__card .t-catalog__card__price_old .t-catalog__card__price-value,
    #allrecords .t-catalog__card .t-catalog__card__price_old .t-catalog__card__price-currency {
        font-size: 14px !important;
    }
}

/* 4. Product detail page: prevent tablet horizontal overflow & strengthen price legibility */
#allrecords .t-store__prod-popup__container,
#allrecords .t-store__prod-popup__col-left,
#allrecords .t-store__prod-popup__slider,
#allrecords .t-store__prod-popup__slider .t-slds,
#allrecords .t-catalog__prod-popup__container,
#allrecords .t-catalog__prod-popup__slider,
#allrecords .t-catalog__prod-popup__slider .t-slds,
#allrecords .t-catalog__relevants-grid-cont {
    max-width: 100%;
    overflow-x: clip;
    box-sizing: border-box;
}

@media screen and (max-width: 960px) {
    #allrecords .t-catalog__prod-popup__info,
    #allrecords .t-catalog__prod-popup__slider {
        margin-left: 0 !important;
        margin-right: 0 !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }
}

#allrecords .t-store__prod-popup__price,
#allrecords .t-store__prod-popup__price-value,
#allrecords .t-store__prod-popup__price-currency,
#allrecords .t-catalog__prod-popup__price,
#allrecords .t-catalog__prod-popup__price-value,
#allrecords .t-catalog__prod-popup__price-currency {
    font-size: 26px !important;
    font-weight: 800 !important;
    font-variant-numeric: tabular-nums;
}

@media screen and (max-width: 640px) {
    #allrecords .t-store__prod-popup__price,
    #allrecords .t-store__prod-popup__price-value,
    #allrecords .t-store__prod-popup__price-currency,
    #allrecords .t-catalog__prod-popup__price,
    #allrecords .t-catalog__prod-popup__price-value,
    #allrecords .t-catalog__prod-popup__price-currency {
        font-size: 22px !important;
    }
}

/* 5. Respect reduced-motion preference */
@media (prefers-reduced-motion: reduce) {
    #allrecords .t-catalog__card,
    #allrecords .t-catalog__card__btn,
    #allrecords .t-catalog__card__bgimg {
        transition: none !important;
        animation: none !important;
    }
}
