#header, #container, #main-cat-menu-wrapp ul, #main-cat-menu-wrapp .tab-item, #footer {
    width: 100%;
    max-width: 1200px;
}
 #main-cat-menu .cat-tab .cat-name.selected {
     color: #fff;
     background: #ab0101 ;
}  
#main-cat-menu .fake-bg { background: #fff;}
#main-cat-menu-wrapp .tab-item {
    flex-wrap: wrap;
}

.cat-tab .active {color: #ab0101;}
/* mobile.css - полная адаптивная версия для всех устройств */


/* ============================================
   ДЕСКТОПНАЯ ВЕРСИЯ (541px и выше)
   ============================================ */
@media screen and (min-width: 541px) {
    /* Скрываем все мобильные элементы */
    .mobile-menu-header,
    .mobile-menu-toggle,
    .mobile-menu-container,
    .mobile-menu-overlay {
        display: none !important;
    }
    
    /* Показываем десктопное меню */
    #top-menu {
        display: block !important;
    }
    


}


/* ============================================
   МОБИЛЬНЫЕ УСТРОЙСТВА (до 540px)
   ============================================ */
@media screen and (max-width: 540px) {
    /* Скрываем десктопное меню */
    #top-menu, #logo {
        display: none !important;
    }
#ya-site-form0 {
    position: revert;
}
body > div[style*="position: absolute"][style*="visibility: hidden"] {
    display: none !important;
}   
#header-wrapp {
    height: auto;}
    
    /* ===== МОБИЛЬНАЯ ШАПКА ===== */
    .mobile-menu-header {
        display: flex !important;
        align-items: center;
        justify-content: space-between;
        padding: 10px 15px;
        position: sticky;
        top: 0;
        z-index: 1001;
        /* Липкая мобильная шапка: непрозрачный белый фон,
           иначе контент страницы просвечивает сквозь неё */
        background: #fff;
        box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15);
    }
    
    /* Кнопка бургер-меню */
    .mobile-menu-toggle {
        display: block !important;
        width: 30px;
        height: 24px;
        position: relative;
        cursor: pointer;
        z-index: 1002;
        background: transparent;
        border: none;
        flex-shrink: 0;
    }
    
    .mobile-menu-toggle span {
        display: block;
        position: absolute;
        height: 3px;
        width: 100%;
        border-radius: 3px;
        opacity: 1;
        left: 0;
        transform: rotate(0deg);
        transition: 0.25s ease-in-out;
        background: black;
    }
    
    .mobile-menu-toggle span:nth-child(1) {
        top: 0px;
    }
    
    .mobile-menu-toggle span:nth-child(2) {
        top: 10px;
    }
    
    .mobile-menu-toggle span:nth-child(3) {
        top: 20px;
    }
    
    .mobile-menu-toggle.active span:nth-child(1) {
        top: 10px;
        transform: rotate(135deg);
    }
    
    .mobile-menu-toggle.active span:nth-child(2) {
        opacity: 0;
        left: -60px;
    }
    
    .mobile-menu-toggle.active span:nth-child(3) {
        top: 10px;
        transform: rotate(-135deg);
    }
    
    /* Логотип в мобильной шапке */
    .mobile-logo {
        flex: 1;
        text-align: center;
    }
    
    .mobile-logo img {
        max-height: 40px;
        width: auto;
    }
    
    /* Телефон в мобильной шапке */
    .mobile-phone {
        flex-shrink: 0;
    }

    /* Телефоны в мобильной шапке — как в десктопной версии:
       без красного фона, тёмный текст и красная иконка трубки */
    .mobile-phone a {
        color: #444;
        text-decoration: none;
        font-size: 15px;
        font-weight: normal;
        background: none;
        padding: 0;
        border-radius: 0;
        min-width: 0;
        display: inline-block;
        line-height: 1.5;
    }

    .mobile-phone a:before {
        content: '';
        display: inline-block;
        width: 16px;
        height: 16px;
        margin-right: 5px;
        background: url('../images/phone-receiver-silhouette.png') no-repeat center;
        background-size: 16px;
        vertical-align: -3px;
    }

    /* Иконка MAX у последнего номера — цветная, как на ПК */
    .mobile-phone a:last-child:before {
        background-image: url('../images/max-colored.svg');
        background-size: 14px;
    }
    
    /* Оверлей */
    .mobile-menu-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.7);
        z-index: 999;
        opacity: 0;
        visibility: hidden;
        transition: 0.3s;
    }
    
    .mobile-menu-overlay.active {
        opacity: 1;
        visibility: visible;
    }
    
    /* Контейнер меню */
    .mobile-menu-container {
        position: fixed;
        top: 60px;
        left: -100%;
        width: 85%;
        max-width: 320px;
        height: calc(100% - 60px);
        background: #1a1a1a;
        z-index: 1000;
        overflow-y: auto;
        transition: 0.3s;
        box-shadow: 2px 0 10px rgba(0, 0, 0, 0.3);
    }
    
    .mobile-menu-container.active {
        left: 0;
    }
    
    /* Стили меню */
    .mobile-nav {
        list-style: none;
        margin: 0;
        padding: 0;
    }
    
    .mobile-nav > li {
        border-bottom: 1px solid #333;
    }
    
    .mobile-nav > li > a {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 15px 20px;
        text-decoration: none;
        font-size: 16px;
        font-weight: 500;
        transition: 0.2s;
    }
    
    .mobile-nav > li > a:hover,
    .mobile-nav > li > a:active {
        background: #e80000;
        color: #fff;
    }
    
    /* Стрелка для пунктов с подменю */
    .menu-arrow {
        width: 8px;
        height: 8px;
        border-right: 2px solid #fff;
        border-bottom: 2px solid #fff;
        transform: rotate(45deg);
        transition: 0.2s;
        display: inline-block;
    }
    
    .menu-arrow.open {
        transform: rotate(-135deg);
        margin-top: 4px;
    }
    
    /* Подменю */
    .mobile-nav .sub-menu {
        list-style: none;
        margin: 0;
        padding: 0;
        background: #2a2a2a;
        display: none;
    }
    
    .mobile-nav .sub-menu li {
        border-top: 1px solid #3a3a3a;
    }
    
    .mobile-nav .sub-menu li a {
        display: block;
        padding: 12px 20px 12px 35px;
        color: #ccc;
        text-decoration: none;
        font-size: 14px;
        transition: 0.2s;
    }
    
    .mobile-nav .sub-menu li a:hover,
    .mobile-nav .sub-menu li a:active {
        background: #e80000;
        color: #fff;
        padding-left: 45px;
    }
    
    /* Второй уровень подменю */
    .mobile-nav .sub-menu .sub-menu li a {
        padding-left: 50px;
        font-size: 13px;
    }
    
    .mobile-nav .sub-menu .sub-menu li a:hover {
        padding-left: 60px;
    }
    
    /* Дополнительная информация в мобильном меню */
    .mobile-menu-footer {
        padding: 20px;
        border-top: 1px solid #333;
        margin-top: 20px;
    }
    
    .mobile-menu-footer .mobile-phone-footer {
        text-align: center;
        margin-bottom: 15px;
    }
    
    .mobile-menu-footer .mobile-phone-footer a {
        color: #e80000;
        text-decoration: none;
        font-size: 18px;
        font-weight: bold;
    }
    
    .mobile-menu-footer .mobile-email-footer {
        text-align: center;
        margin-bottom: 15px;
    }
    
    .mobile-menu-footer .mobile-email-footer a {
        color: #ccc;
        text-decoration: none;
        font-size: 12px;
    }
    
    .mobile-menu-footer .mobile-address-footer {
        text-align: center;
        color: #888;
        font-size: 11px;
        margin-bottom: 15px;
    }
    
    /* Блокировка скролла при открытом меню */
    body.menu-open {
        overflow: hidden !important;
        position: fixed;
        width: 100%;
        height: 100%;
    }
    
    /* ===== АДАПТАЦИЯ КОНТЕНТА ===== */
 .imagesd_block_index, .elem img, #main-cat-menu-wrapp .elem {width: 100%; height: auto;}   
 #main-cat-menu-wrapp .ttl {display: block; width: 100%;}
 #main-cat-menu-wrapp .ttl {height: 45px;}
.elem img {aspect-ratio: 3 / 2}

    /* Шапка */
    #header-wrapp {
        padding-top: 0 !important;
        margin-bottom: 0 !important;
    }
    
    #header {
        height: auto !important;
        padding: 10px 15px !important;
        width: 90%;
    }
    
    .concact_ehader_block {
        display: flex;
        flex-wrap: wrap;
        flex-direction: column;
        align-items: center;
    }
    
    #logo {
        width: 120px !important;
        height: auto !important;
        padding-top: 0 !important;
        margin: 0 auto 10px;
    }
    
    #logo img {
        max-width: 100%;
        height: auto;
    }
    
    .arrow-slider, .text-rtv {
        display: none;
    }

    /* Поиск */
    #searche {
        width: 100%;
        margin: 10px 0;
    }
    
    .ya-site-form {
        width: 100%;
    }
    
    .ya-site-form__form {
        width: 100%;
    }
    
    .ya-site-form__search-input {
        width: 100%;
    }
    
    .ya-site-form__input-text {
        width: 100% !important;
        font-size: 14px !important;
        padding: 8px !important;
    }
    
    /* Контакты в шапке */
    .header_adres {
        width: 100%;
        text-align: center;
    }
    
    #top-phone {
        position: static !important;
        width: auto !important;
        height: auto !important;
        margin: 5px 0;
    }
    
    #top-phone .number {
        position: static !important;
        width: auto !important;
        font-size: 18px !important;
        padding-top: 0 !important;
    }
    
    #top-phone .number a {
        color: #fff !important;
        text-decoration: none;
    }
    
    #zvonok_header,
    .time_work,
    #feedback, .header_adres {
        display: none !important;
    }
   .cookies-container {width: 300px;} 
    /* Слайдер */
    #slider-news-wrapp {
        height: auto !important;
        margin-bottom: 0;
    }
    
.slideshow {
    height: 250px;}
    .slideshow a,
    .slideshow img {
        width: auto;
        height: 250px;
        object-fit: cover;
    }
#nav {display: none;}    
    /* Основной контент */
.mobile-menu.header-fixed {
    display: none;
}
    
 #main-cat-menu-wrapp {
    padding: 0px 15px 15px 15px;
}   
    #main-cat-menu-wrapp .title span {
        font-size: 18px;
    }
    
    #main-cat-menu {
        display: flex;
        flex-direction: column;
        padding: 0 !important;
    }
    
    #main-cat-menu .cat-tab {
        width: 100% !important;
        float: none;
    }
    
    .fake-bg {
        display: none;
    }
    
    #tab-block {
        margin-left: 0 !important;
        overflow-x: auto;
    }
    
    .tab-item {
        width: 100%;
        display: flex;
        flex-wrap: wrap;
        justify-content: space-around;
    }
    
    #main-cat-menu-wrapp .elem {
        width: 33%;
        margin: 0 0 15px 0 !important;
        float: none;
        background-size: cover !important;
    }
    
    /* Блок "О компании" */
    #about-wrapp {
        height: auto !important;
        margin-bottom: 20px;
    }
    
    #about-text,
    #about-photo {
        width: 100% !important;
        float: none !important;
        height: auto !important;
        text-align: center;
    }
    
    #about-text .text {
        padding: 15px;
    }
    #about-text {
        padding: 0px;
    }
    .advantages-block {
    flex-wrap: wrap;
}
.advantages-block .advantages-block-item {
    width: 100%;
}
    #about-photo img {
        display: inline-block;
        width: 100%;
        margin: 5px;
        height: auto;
    }
    
    /* Каталог товаров */
    #catalog-wrapp {
        width: 100% !important;
        float: none !important;
    }
    
    .cat-item {
        width: 100% !important;
        margin: 0 0 20px 0 !important;
        float: none;
    }
    
    .cat-item img {
        max-width: 100%;
        height: auto;
    }
    
    /* Блок новостей */
    .main-news-item {
        width: 100% !important;
        margin: 0 0 20px 0 !important;
        height: auto !important;
    }
    
    /* Футер */
    #footer-wrapp {
        min-width: unset;
    }
    
    #footer {
        text-align: center;
            height: auto;
    }
    
    .news_block {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 20px;
        margin: 20px 0;
        width: auto !important;
        height: auto;
    }
    
    .news_block > div {
        width: 45%;
    }
    
    .news_block .foot-title {
        font-size: 14px;
        font-weight: bold;
        margin-bottom: 10px;
        color: #e80000;
    }
    
    .news_block ul {
        list-style: none;
        padding: 0;
    }
    
    .news_block ul li {
        margin-bottom: 5px;
    }
#footer #copyright > div {
    position: relative;
    bottom: 20px;
    max-width: unset;
}
    .bott-phone {
        float: none !important;
        margin: 15px 0 !important;
        text-align: center;
    }
    
    .bott-phone a {
        font-size: 20px;
        display: inline-block;
        margin: 0 5px;
    }
    
    .contact_footer {
        text-align: center;
    }
    
    .social {
        float: none !important;
        text-align: center;
        margin: 15px 0;
    }
    
    .buy-equip {
        text-align: center;
        font-size: 10px;
        position: relative !important;
    }
    
    /* Кнопка "наверх" */
    #go-top {
        left: auto !important;
        left: 20px !important;
        bottom: 20px !important;
        margin-left: 0 !important;
    }
    
    /* Модальные окна */
    #order-block,
    #order-block_tovar,
    #order-block_zapros,
    #order-block_oneklick {
        width: 90% !important;
        left: 5% !important;
        margin-left: 0 !important;
        box-sizing: border-box !important;
        padding: 15px !important;
    }
    
    /* Хлебные крошки и заголовки */
    #container h1.ttl,
    #container .title {
        font-size: 20px !important;
    }
    
    .cat-title,
    .cat-title2 {
        font-size: 16px !important;
    }
    .block_contact_t, .transport-companies .transport-companies-item, .articles-all .articles-item, .service-middle-item-2, .service-middle-item-3, .service-middle-top-b .service-middle-top-item-1, .service-middle-top-b .service-middle-top-item-2, .service-middle-top-b .service-middle-top-item-3, .service-middle-top-b .service-middle-top-item-4,.service-middle-top-b .service-middle-top-item-5 {
    width: 100%;
}
.about-top-b {
    padding: 160px 0 0 0;
}
.transport-companies {
    flex-wrap: wrap;
}
}

/* ============================================
   МАЛЕНЬКИЕ ТЕЛЕФОНЫ (до 480px)
   ============================================ */
@media screen and (max-width: 480px) {
    .mobile-logo img {
        max-height: 30px;
    }
    
    .mobile-phone a {
        font-size: 12px;
    }

    .mobile-phone a:before {
        width: 14px;
        height: 14px;
        margin-right: 4px;
        background-size: 14px;
    }
    
    .mobile-menu-container {
        width: 85%;
        max-width: 280px;
    }
    
    .mobile-nav > li > a {
        font-size: 14px;
        padding: 12px 15px;
    }
    
    .mobile-nav .sub-menu li a {
        font-size: 12px;
        padding: 10px 15px 10px 30px;
    }
    
    #logo {
        width: 100px !important;
    }
    
    .slideshow {
        height: auto;
    }
    
    #main-cat-menu-wrapp .title span {
        font-size: 16px;
    }
    
    .cat-item {
        margin-bottom: 15px;
    }
    
    .news_block > div {
        width: 100%;
    }
    
    .bott-phone a {
        font-size: 16px;
        display: block;
        margin: 5px 0;
    }
    
    #order-block,
    #order-block_tovar,
    #order-block_zapros,
    #order-block_oneklick {
        width: 95% !important;
        left: 2.5% !important;
        max-height: 90vh;
        overflow-y: auto;
    }
    
    .inp1,
    .inp2,
    .t-area {
        font-size: 14px !important;
    }
    
    #order-subm,
    #order-subm_tovar {
        width: 100% !important;
        margin: 10px 0 !important;
    }
}

/* ============================================
   ДОПОЛНИТЕЛЬНЫЕ ИСПРАВЛЕНИЯ
   ============================================ */

/* Исправление для backstretch фона */
#backstretch {
    width: 100% !important;
    left: 0 !important;
    overflow: hidden !important;
}

#backstretch img {
    width: 100% !important;
    height: auto !important;
    object-fit: cover;
}



/* Исправление для таблиц */
table {
    width: 100%;
    overflow-x: auto;
    display: block;
}

