/* Shared catalog layout; native Bitrix controls and product handlers stay intact. */
.rm-catalog-page {
    --rc-ink: #20201e;
    --rc-muted: #77766e;
    --rc-line: #e5e3dd;
    --rc-paper: #f5f2e9;
    color: var(--rc-ink);
    padding: 12px 0 56px;
}
.rm-catalog-page .main_title { padding: 0; margin: 20px 0 32px; font-size: clamp(28px, 3.6vw, 52px); line-height: 1.08; letter-spacing: -.035em; }
.rm-catalog-page .main_title:before,
.rm-catalog-page .main_title span:before,
.rm-catalog-page .main_title:after { display: none; }
.rm-catalog-page .main_title span { padding: 0; }
.rm-catalog-eyebrow { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .15em; margin: 0 0 16px; }
.rm-catalog-intro { margin-bottom: 36px; }
.rm-catalog-intro__heading { display: flex; align-items: baseline; justify-content: space-between; gap: 24px; margin-bottom: 28px; }
.rm-catalog-intro__text { max-width: 530px; font-size: 18px; line-height: 1.5; color: var(--rc-muted); margin: 0; }
.rm-catalog-directions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.rm-catalog-direction { border: 1px solid var(--rc-line); border-radius: 24px; overflow: hidden; color: var(--rc-ink); background: #faf9f5; }
.rm-catalog-direction img { width: 100%; height: auto; aspect-ratio: 1.3; object-fit: cover; display: block; transition: transform .4s ease; }
.rm-catalog-direction__body { display: flex; flex-direction: column; position: relative; gap: 8px; padding: 24px 48px 24px 24px; }
.rm-catalog-direction strong { font-size: 23px; line-height: 1.15; letter-spacing: -.025em; }
.rm-catalog-direction__body > span:not(.rm-catalog-direction__arrow) { font-size: 14px; line-height: 1.5; color: var(--rc-muted); }
.rm-catalog-direction__arrow { position: absolute; top: 24px; right: 24px; font-size: 24px; }
.rm-catalog-direction:hover { color: var(--rc-ink); border-color: #c6c1b3; }
.rm-catalog-direction:hover img { transform: scale(1.025); }
.rm-catalog-page .section_description { background: var(--rc-paper); border-radius: 28px; overflow: hidden; margin: 0 0 32px; }
.rm-catalog-page .description_wrapper { padding: 0; background: none; }
.rm-catalog-page .section_description .row { margin: 0; align-items: stretch; }
.rm-catalog-page .section_description .row > div { padding: 0; }
.rm-catalog-page .section_description .sect_description { padding: clamp(24px, 3vw, 44px); font-size: 16px; line-height: 1.65; }
.rm-catalog-page .sect_description p:last-child { margin-bottom: 0; }
.rm-catalog-page .sectiton_picture { padding: 0; height: 100%; min-height: 300px; border-radius: 0; background-size: cover; background-position: center; }
.rm-catalog-page .catalog_sections_list { margin: 28px 0 36px; }
.rm-catalog-page .catalog_sections_list .tabs { gap: 8px; margin-bottom: 16px; }
.rm-catalog-page .catalog_sections_list .tabs li.tab a { border-radius: 30px; padding: 12px 18px; letter-spacing: .04em; font-size: 11px; border: 1px solid var(--rc-line); }
.rm-catalog-page .catalog_sections_list .tabs li.tab a.active { background: var(--rc-ink); color: #fff; border-color: var(--rc-ink); }
.rm-catalog-page .catalog_sections_list .section_tab { border-radius: 20px; padding: 20px; background: #f8f7f3; }
.rm-catalog-page .catalog_sections_list .sections_list { display: flex; flex-wrap: wrap; gap: 8px; padding: 0; margin: 0; }
.rm-catalog-page .catalog_sections_list .sections_list li { display: block; margin: 0; padding: 0; width: auto; }
.rm-catalog-page .catalog_sections_list .sections_list a { display: flex; align-items: center; padding: 11px 18px; min-height: 44px; border: 1px solid var(--rc-line); border-radius: 30px; font-size: 13px; line-height: 1.35; background: #fff; color: var(--rc-ink); }
.rm-catalog-page .catalog_sections_list .sections_list a:hover { background: var(--rc-paper); border-color: #c5c0b1; }
.rm-catalog-page .brand_sections_list { background: #f8f7f3; padding: 28px; border-radius: 24px; }
.rm-catalog-page .brand_sections_list .letter { color: var(--rc-muted); }
.rm-catalog-page .section_info { border-top: 1px solid var(--rc-line); padding-top: 20px; margin: 0 0 24px; }
.rm-catalog-page .section_info .section_items_total { font-size: 12px; line-height: 1.5; color: var(--rc-muted); align-items: center; flex-wrap: wrap; gap: 8px; }
.rm-catalog-page .sort_order { border: 1px solid var(--rc-line); border-radius: 24px; background: #f8f7f3; padding: 14px 18px; font-size: 13px; line-height: 18px; }
.rm-catalog-page .sort_order .selecteed i { font-size: 18px; line-height: 18px; }
.rm-catalog-page .sort_order .dropdown { top: 100%; border: 1px solid var(--rc-line); border-radius: 16px; overflow: hidden; box-shadow: 0 8px 24px #20201e0d; }
.rm-catalog-page .sort_order .dropdown a { font-size: 13px; line-height: 1.4; padding: 14px 18px; }
.rm-catalog-page .catalog_element_list { margin: 0 -8px; }
.rm-catalog-page .catalog_element_list > .row > [class*="col-"] { display: flex; }
.rm-catalog-page .catalog_element_list .element { display: flex; flex-direction: column; width: 100%; min-width: 0; border: 1px solid var(--rc-line); border-radius: 20px; margin: 0 8px 20px; overflow: hidden; box-shadow: none; }
.rm-catalog-page .catalog_element_list .element:hover { border-color: #c3beb1; box-shadow: none; }
.rm-catalog-page .catalog_element_list .element .picture_wrapper { background: #f8f7f3; }
.rm-catalog-page .catalog_element_list .element .offer_label { box-shadow: none; border-radius: 0 0 12px 0; height: auto; font-size: 9px; line-height: 16px; padding: 5px 9px; }
.rm-catalog-page .catalog_element_list .element .title_wrapper { margin: 18px 0 8px; padding: 0 16px; min-height: 106px; height: auto; overflow: visible; overflow-wrap: anywhere; }
.rm-catalog-page .catalog_element_list .element .title_wrapper .title { font-size: 14px; line-height: 1.4; }
.rm-catalog-page .catalog_element_list .element .title_wrapper .title span { font-size: 12px; line-height: 1.5; color: var(--rc-muted); }
.rm-catalog-page .catalog_element_list .element .title_wrapper .title .bold { font-weight: 700; }
.rm-catalog-page .catalog_element_list .element .articul { font-size: 10px; line-height: 1.4; }
.rm-catalog-page .catalog_element_list .element .price_block { padding: 0 16px; height: auto; min-height: 64px; margin: auto 0 12px; overflow: visible; }
.rm-catalog-page .catalog_element_list .element .price_block .price { font-size: 16px; line-height: 24px; color: var(--rc-ink); }
.rm-catalog-page .catalog_element_list .element .price_block .price_old { font-size: 11px; line-height: 16px; height: 16px; }
.rm-catalog-page .catalog_element_list .element .price_block .price_request { margin: 0; height: auto; min-height: 40px; white-space: normal; font-size: 12px; line-height: 1.4; padding: 12px; border-radius: 22px; background: var(--rc-paper); color: var(--rc-ink); }
.rm-catalog-page .catalog_element_list .element .price_block .cart_wrapper { padding-top: 2px; height: auto; }
.rm-catalog-page .catalog_element_list .element .price_block .cart_wrapper .add2cart { margin-left: 0; background: #ffdc18; width: 40px; height: 40px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; }
.rm-catalog-page .catalog_element_list .element .price_block .cart_wrapper .add2cart i { font-size: 22px; line-height: 24px; height: 24px; width: 24px; }
.rm-catalog-page .catalog_element_list .element .wishbtn { top: 12px; right: 12px; }
.rm-catalog-page .show_more_wrapper .cta { border-radius: 30px; box-shadow: none; background: #ffdc18; color: var(--rc-ink); font-size: 13px; padding: 16px 32px; }
.rm-catalog-page .bottom_description { margin: 48px 0 0; }
.rm-catalog-page .bottom_description .description_text { font-size: 15px; line-height: 1.7; }
.rm-catalog-page .bottom_description h2,
.rm-catalog-page .rm-catalog-presentation-heading h2 { font-size: clamp(26px, 3vw, 38px); line-height: 1.12; letter-spacing: -.03em; }
.rm-catalog-page .rm-catalog-presentation-heading { margin: 48px 0 24px; }
.rm-catalog-page .rm-catalog-presentation-heading p:last-child { color: var(--rc-muted); }
.rm-catalog-page .rm-pdf-viewer { box-shadow: none; padding: 16px; border-color: var(--rc-line); border-radius: 24px; background: #f8f7f3; }
.rm-catalog-page .rm-pdf-viewer__controls { flex-wrap: wrap; }
.rm-catalog-page .section_nav { margin-top: 56px; }
.rm-catalog-page .section_nav .element { border-radius: 20px; overflow: hidden; border: 1px solid var(--rc-line); box-shadow: none; }
.rm-catalog-page .section_nav .element .title { padding: 18px; font-size: 16px; }
.rm-catalog-page .crm_pdf_wrapper { background: var(--rc-paper); border-radius: 24px; padding: 32px; }
.rm-catalog-page .romatti_filter form { background: #f8f7f3; padding: 20px 16px; border-radius: 20px; }
.rm-catalog-page .romatti_filter form .element { padding-bottom: 20px; margin-bottom: 20px; border-bottom: 1px solid var(--rc-line); }
.rm-catalog-page .romatti_filter form .element .title { line-height: 1.4; font-size: 12px; }
.rm-catalog-page .romatti_filter form .element .value_wrapper { scrollbar-width: thin; scrollbar-color: #d6d1c5 transparent; overflow-x: hidden; }
.rm-catalog-page .romatti_filter form .element .value_wrapper .label { font-size: 12px; line-height: 1.4; min-height: 26px; }
.rm-catalog-page .romatti_filter form .element .value_wrapper .label span.box { flex-shrink: 0; }
.rm-catalog-page a:focus-visible { outline: 2px solid #9f8300; outline-offset: 4px; }
@media (min-width: 992px) {
    .rm-catalog-page > .row > .col-lg-2 { flex: 0 0 23%; max-width: 23%; }
    .rm-catalog-page > .row > .col-lg-10 { flex: 0 0 77%; max-width: 77%; }
    .rm-catalog-page > .row > .col-lg-10 .catalog_element_list .element { margin-left: 6px; margin-right: 6px; }
    .rm-catalog-page > .row > .col-lg-10 .catalog_element_list .element .price_block,
    .rm-catalog-page > .row > .col-lg-10 .catalog_element_list .element .title_wrapper { padding-left: 12px; padding-right: 12px; }
}
@media (max-width: 991px) {
    .rm-catalog-page .romatti_filter_mobile { display: flex; align-items: center; gap: 10px; border: 1px solid var(--rc-line); border-radius: 24px; padding: 12px 18px; margin: 0 0 20px; font-size: 13px; min-height: 44px; }
    .rm-catalog-page .romatti_filter_mobile i { font-size: 16px; margin: 0; background: transparent; }
    .rm-catalog-page .romatti_filter { display: none; position: fixed; inset: 0; z-index: 90000; background: #f8f7f3; padding: 24px 20px; }
    .rm-catalog-page .romatti_filter.active { display: block; }
    .rm-catalog-page .romatti_filter .inner_wrapper { height: 100%; overflow: auto; padding-bottom: 120px; }
    .rm-catalog-page .romatti_filter_mobile_title { display: flex; align-items: center; margin-bottom: 24px; }
    .rm-catalog-page .romatti_filter .filter_close { margin-left: auto; border: 0; padding: 12px; }
    .rm-catalog-page .filter_apply_cta { position: fixed; bottom: 0; left: 0; right: 0; padding: 12px 20px max(16px, env(safe-area-inset-bottom)); background: #f8f7f3; border-top: 1px solid var(--rc-line); }
    .rm-catalog-page .filter_apply_cta a.cta { margin: 0; border-radius: 28px; box-shadow: none; }
    .rm-catalog-page .romatti_filter .romatti_result { display: none !important; }
}
@media (max-width: 575px) {
    .rm-catalog-page { padding-top: 0; }
    .rm-catalog-page .main_title { margin: 16px 0 24px; font-size: 30px; }
    .rm-catalog-intro__heading { display: block; margin-bottom: 20px; }
    .rm-catalog-intro__text { font-size: 15px; }
    .rm-catalog-directions { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
    .rm-catalog-direction { border-radius: 18px; }
    .rm-catalog-direction:last-child { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1fr; }
    .rm-catalog-direction:last-child img { height: 100%; aspect-ratio: 1.2; }
    .rm-catalog-direction__body { padding: 16px 26px 16px 14px; gap: 6px; }
    .rm-catalog-direction strong { font-size: 17px; }
    .rm-catalog-direction__body > span:not(.rm-catalog-direction__arrow) { font-size: 12px; }
    .rm-catalog-direction__arrow { right: 10px; top: 16px; font-size: 18px; }
    .rm-catalog-page .section_description { border-radius: 20px; }
    .rm-catalog-page .section_description .sect_description { font-size: 14px; line-height: 1.65; padding: 24px; }
    .rm-catalog-page .sectiton_picture { height: 220px; min-height: 0; }
    .rm-catalog-page .catalog_sections_list { margin: 24px 0; }
    .rm-catalog-page .catalog_sections_list .sections_list { gap: 7px; }
    .rm-catalog-page .catalog_sections_list .sections_list a { font-size: 12px; padding: 10px 14px; }
    .rm-catalog-page .catalog_sections_list .section_tab { padding: 14px; }
    .rm-catalog-page .section_info { padding-top: 12px; margin-bottom: 16px; }
    .rm-catalog-page .catalog_element_list { margin: 0 -5px; }
    .rm-catalog-page .catalog_element_list .element { margin: 0 5px 12px; border-radius: 16px; }
    .rm-catalog-page .catalog_element_list .element .title_wrapper { padding: 0 12px; min-height: 112px; height: auto; margin-top: 14px; }
    .rm-catalog-page .catalog_element_list .element .title_wrapper .title { font-size: 13px; }
    .rm-catalog-page .catalog_element_list .element .title_wrapper .title span { font-size: 11px; }
    .rm-catalog-page .catalog_element_list .element .price_block { padding: 0 12px; }
    .rm-catalog-page .catalog_element_list .element .price_block .price { font-size: 14px; }
    .rm-catalog-page .catalog_element_list .element .price_block .cart_wrapper .add2cart { width: 34px; height: 34px; }
    .rm-catalog-page .catalog_element_list .element .offer_label { font-size: 8px; padding: 3px 6px; }
    .rm-catalog-page .brand_sections_list { padding: 20px; }
    .rm-catalog-page .rm-pdf-viewer { padding: 12px; border-radius: 18px; }
    .rm-catalog-page .rm-pdf-viewer__controls { gap: 8px; }
}
@media (prefers-reduced-motion: reduce) {
    .rm-catalog-direction img { transition: none; }
}

/* Physical brands index uses news.list rather than the shared category template. */
.rm-catalog-page .bottom_description .expand_link { max-width: 100%; white-space: normal; width: auto; font-size: 13px; line-height: 1.5; padding: 14px 20px; border-radius: 24px; box-shadow: none; }
.rm-catalog-brands .brands_caption { border: 0; background: var(--rc-paper); border-radius: 24px; padding: 32px; font-size: 15px; line-height: 1.65; margin: 24px 0 32px; }
.rm-catalog-brands .brands_caption .ico { display: none; }
.rm-catalog-brands .filter { border-radius: 20px; background: #f8f7f3; padding: 12px 20px; }
.rm-catalog-brands .filter form .element .title { border-radius: 24px; }
.rm-catalog-brands .brands_list .element { border-color: var(--rc-line); border-radius: 20px; overflow: hidden; color: var(--rc-ink); }
.rm-catalog-brands .brands_list .element .picture { background: #f8f7f3; }
.rm-catalog-brands .brands_list .element .title { font-size: 16px; line-height: 1.3; overflow-wrap: anywhere; }
.rm-catalog-brands .brands_list .element .description { font-size: 13px; line-height: 1.6; color: var(--rc-muted); }
.rm-catalog-brands .brands_list .element .link { font-size: 12px; flex-wrap: wrap; color: var(--rc-ink); }
.rm-catalog-brands .brands_list .letter_wrapper { max-width: 100%; overflow-x: auto; scrollbar-width: thin; scrollbar-color: #d6d1c5 transparent; }
.rm-catalog-brands .brands_list .letter_wrapper > .container { width: 100%; max-width: 100%; padding: 0; }
.rm-catalog-brands .brands_list .letter_row a { flex: 0 0 36px; height: 36px; font-size: 16px; line-height: 36px; border-radius: 50%; background: var(--rc-paper); }
@media (max-width: 1199px) {
    .rm-catalog-brands .brands_list .letter_row.fixed .letter_wrapper { top: 54px; }
}
@media (max-width: 575px) {
    .rm-catalog-brands .brands_caption { padding: 24px; font-size: 14px; }
    .rm-catalog-brands .brands_list .element .caption { padding: 14px 12px; }
    .rm-catalog-brands .brands_list .element .title { font-size: 13px; }
    .rm-catalog-brands .brands_list .element .picture .cat_link { font-size: 9px; border-radius: 16px; bottom: 8px; }
}
/* Let long prices take the space they need; move the cart below when necessary. */
.rm-catalog-page .catalog_element_list .price_block > .row { gap: 8px; align-items: flex-end; }
.rm-catalog-page .catalog_element_list .price_block > .row > .col-6:first-child { flex: 1 1 auto; width: auto; min-width: max-content; max-width: 100%; }
.rm-catalog-page .catalog_element_list .price_block > .row > .col-6:last-child { flex: 0 1 auto; width: auto; max-width: 100%; margin-left: auto; }
