.topperr-photo {
    max-width: min(90vw, 1000px);
    max-height: 90vh;
    padding: 12px;
    border: 0;
}

.topperr-photo::backdrop { background: rgba(0, 0, 0, 0.65); }
.topperr-photo button { display: block; margin: 0 0 8px auto; }
.topperr-photo img { display: block; max-width: 100%; max-height: 75vh; object-fit: contain; }

@media (max-width: 996px) {
    #page-all, #page-footer { width: auto; height: auto; margin: 0; }
    #page-empty, .layout-spacer { display: none; }
    table.carcas, table.carcas > tbody, table.carcas > tbody > tr,
    table.carcas > tbody > tr > td { display: block; width: auto; }
    div.shapka, div.sh_fon { height: auto; }
    div.sh_fon { position: static; width: auto; padding: 12px 16px; background: #568629; }
    div.slogan_2, div.logo, div.top_menu {
        position: static; width: auto; height: auto; margin: 0 auto 8px;
    }
    div.logo img { width: min(180px, 100%); height: auto; display: block; margin: 8px auto; }
    div.top_menu ul { width: auto; height: auto; display: flex; flex-wrap: wrap; justify-content: center; }
    div.top_menu ul li { height: auto; float: none; }
    div.top_menu a { height: auto; padding: 8px; }

    td.left_col, td.center_col { padding: 12px; }
    td.left_col a > img { display: block; margin: auto; }
    div.slogan_left { width: auto; }
    div.content { margin: 0; padding: 16px; overflow-wrap: anywhere; }
    div.content img, td.left_col img { max-width: 100%; height: auto; }
    div.content img[align="left" i],
    div.content img[align="right" i],
    div.content img[style*="float:" i],
    div.content .news-detail img.detail_picture {
        display: block;
        float: none !important;
        margin: 0 auto 12px !important;
    }
    div.content input, div.content select { max-width: 100%; box-sizing: border-box; }
    #filter_select table, #filter_select tbody, #filter_select tr, #filter_select td {
        display: block; width: 100%; min-width: 0;
    }
    #filter_select select.steps { width: 100%; }
    #filter_select .step2 { padding: 8px 0 0; background: none; }


    table.tbl_cat, table.tbl_cat_03,
    table.tbl_cat > tbody, table.tbl_cat_03 > tbody,
    table.tbl_cat > tbody > tr, table.tbl_cat_03 > tbody > tr { display: block; width: auto; }
    table.tbl_cat > tbody, table.tbl_cat_03 > tbody {
        display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px;
    }
    table.tbl_cat > tbody > tr, table.tbl_cat_03 > tbody > tr { display: contents; }
    table.tbl_cat td, table.tbl_cat_03 td { display: block; padding: 0; width: auto; }
    div.cat_01_item, div.cat_03_item { width: auto; height: 100%; min-height: 115px; box-sizing: border-box; }

    .topperr-presentations { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
    .topperr-presentations .pres_item { min-height: 0; }
    .topperr-presentations .pres_item a { font-size: 13px; }

    div.footer { min-width: 0; width: auto; height: auto; padding: 16px; }
    div.for_tbl_foot, div.bottom_search, div.copyright, div.bottom_logo,
    div.bottom_mail, div.bottom_tel { position: static; width: auto; margin: 8px 0; text-align: left; }
    div.bottom_search { width: 175px; }
    table.footer_menu_tbl { width: 100%; display: block; }
    table.footer_menu_tbl > tbody > tr { display: flex; flex-wrap: wrap; gap: 0 12px; }
    table.footer_menu_tbl > tbody > tr > td { width: auto; min-width: 120px; }
}

@media (max-width: 996px) {
    .topperr-retailers { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; margin: 0; }
    .topperr-retailers .col-3 { width: auto; max-width: 100%; padding: 0; margin: 0 !important; }
    .topperr-retailers .card { max-width: 100%; }
}

@media (max-width: 996px) {
    #for_ajax .img_prev_in_fc { display: block; float: none; max-width: 100%; }
    #for_ajax .img_prev_in_fc img { margin: 0 0 10px !important; }
    #for_ajax .txt_prev_in_fc { width: 100%; max-width: 100%; }
}

@media (width > 996px) {
    table.tbl_cat_03 { display: block; }
    table.tbl_cat_03 > tbody {
        display: grid;
        grid-template-columns: repeat(5, minmax(0, 1fr));
        row-gap: 20px;
    }
    table.tbl_cat_03 > tbody > tr { display: contents; }
    table.tbl_cat_03 > tbody > tr > td {
        display: flex;
        width: auto;
        min-width: 0;
        padding-bottom: 0;
    }
    table.tbl_cat_03 .cat_03_item {
        box-sizing: border-box;
        width: 100%;
        max-width: 158px;
        height: auto;
        min-height: 182px;
        overflow-wrap: anywhere;
    }
}
