/*NOTE: This file is intended for programmers. Aspro technical support is not advised to work with him.*/

/* Examples (uncomment to use):*/

/* Expand site width */
/* body .wrapper { max-width: 1400px !important;  } */

/* Set site background image */
/* body {  background: url(image_source) top no-repeat; }

/* Hide compare button */
/* a.compare_item { display: none !important;  }*/

/* =========================
   NEWS ADAPTIVE GRID FIX
   ========================= */

/* Универсальный контейнер списка */
.news-list-wrapper .news,
.news-list-wrapper .news-list,
.news-list-wrapper .items,
.news-list-wrapper .grid-list,
.news-list-wrapper .row {
    display: flex !important;
    flex-wrap: wrap;
    gap: 20px;
}

/* Карточка новости — базово */
.news-list-wrapper .news_item,
.news-list-wrapper .item,
.news-list-wrapper .news-list-item,
.news-list-wrapper .col,
.news-list-wrapper .col-md-4,
.news-list-wrapper .col-sm-6 {
    float: none !important;
    display: flex !important;
    flex-direction: column;
    box-sizing: border-box;
    width: 100% !important;
}

/* 📱 МОБИЛКА — 1 колонка */
@media (max-width: 767px) {
    .news-list-wrapper .news_item,
    .news-list-wrapper .item,
    .news-list-wrapper .news-list-item,
    .news-list-wrapper .col,
    .news-list-wrapper .col-md-4 {
        width: 100% !important;
    }
}

/* 📲 ПЛАНШЕТ — 2 колонки */
@media (min-width: 768px) and (max-width: 1023px) {
    .news-list-wrapper .news_item,
    .news-list-wrapper .item,
    .news-list-wrapper .news-list-item,
    .news-list-wrapper .col,
    .news-list-wrapper .col-md-4 {
        width: calc(50% - 10px) !important;
    }
}

/* 🖥 ДЕСКТОП — 3 колонки */
@media (min-width: 1024px) {
    .news-list-wrapper .news_item,
    .news-list-wrapper .item,
    .news-list-wrapper .news-list-item,
    .news-list-wrapper .col,
    .news-list-wrapper .col-md-4 {
        width: calc(33.333% - 14px) !important;
    }
}

/* =========================
   HEADER PHONE IN MENU (задача 1, 2026-07-07)
   ========================= */

/* Убрать телефон из верхней полосы */
.header_wrap .top-h-row {
    display: none;
}

/* Телефон в главном меню — desktop (после иконки поиска) */
.main-nav .menu_phone_block {
    float: right;
    white-space: nowrap;
    padding: 6px 0 0 12px;
    vertical-align: middle;
}

.main-nav .menu.full > li.menu_phone {
    display: none;
}

.main-nav .menu_phone_block .phone_text,
.main-nav .menu_phone_block .phone_text a,
.main-nav .menu.full > li.menu_phone .phone_text,
.main-nav .menu.full > li.menu_phone .phone_text a {
    font-size: 13px;
    font-weight: 600;
    line-height: 20px;
    white-space: nowrap;
    text-decoration: none;
    cursor: default;
}

.h_color_colored .main-nav .menu_phone_block .phone_text a,
.h_color_colored .main-nav .menu.full > li.menu_phone .phone_text a {
    color: #fff;
}

.h_color_white .main-nav .menu_phone_block .phone_text a,
.h_color_white .main-nav .menu.full > li.menu_phone .phone_text a {
    color: #1d1a1a;
}

/* Mobile — телефон в бургер-меню */
@media all and (max-width: 950px) {
    .main-nav .menu_phone_block {
        display: none !important;
    }

    .main-nav .menu.full > li.menu_phone {
        display: block;
        float: none;
        width: 100%;
        padding: 0;
        background: #ecf0f3;
        border-top: 1px solid #f2f5f7;
        border-bottom: 1px solid #e4e6e7;
    }

    .main-nav .menu.full > li.menu_phone .phone_text {
        display: block;
        padding: 0 20px;
        height: 42px;
        line-height: 43px;
    }

    .main-nav .menu.full > li.menu_phone .phone_text a {
        font-size: 14px;
        font-weight: 600;
        color: #000;
    }

    .m_color_dark #header ul.menu.full.opened > li.menu_phone {
        background: #505050;
        border-top: 1px solid #848484;
        border-bottom: 1px solid #e4e6e7;
    }

    .m_color_dark #header ul.menu.full.opened > li.menu_phone .phone_text a {
        color: #fff;
    }
}

/* =========================
   HEADER MENU WIDTH (задача 2, 2026-07-07)
   ========================= */

#header .middle-h-row .center_block ul.menu {
    float: left;
    width: 75%;
    max-width: calc(100% - 280px);
    margin: 0;
    box-sizing: border-box;
}

/* =========================
   HEADER LOGO SIZE (задача 2, 2026-07-21)
   template_styles.min.css перебивает 102px → 51px
   ========================= */

#header .middle-h-row .logo_wrapp .logo {
    min-height: 100px;
    line-height: normal;
    overflow: visible;
}

#header .middle-h-row .logo_wrapp .logo a img,
#header .middle-h-row .logo_wrapp .logo a svg {
    max-height: 102px !important;
    height: auto;
    width: auto;
}

/* =========================
   STATIC HEADER SEARCH (задача 3, вариант A, 2026-07-07)
   ========================= */

@media all and (min-width: 601px) {
    /* Поле всегда видно — без иконки-лупы (как basket_fly на демо) */
    #header .main-nav .search_block,
    #headerfixed .main-nav .search_block {
        display: none !important;
    }

    #header .main-nav {
        display: flex;
        flex-wrap: nowrap;
        align-items: center;
        justify-content: flex-end;
    }

    #header .main-nav ul.menu.full {
        float: none;
        flex: 1 1 auto;
        width: auto !important;
        max-width: none !important;
        margin: 0 auto 0 0;
    }

    #header .main-nav .search_middle_block {
        float: none !important;
        display: block !important;
        flex: 0 0 220px;
        width: 220px;
        max-width: 220px;
        position: relative;
        order: 2;
        padding-top: 0;
    }

    #header .main-nav .menu_phone_block {
        float: none !important;
        flex: 0 0 auto;
        order: 3;
        padding: 0 0 0 12px;
        line-height: 41px;
    }

    #headerfixed .main-nav .search_middle_block {
        float: right !important;
        width: 220px;
        max-width: 220px;
        position: relative;
        padding-top: 0;
    }

    /* Крестик закрытия из шаблона catalog — не нужен в статичном режиме */
    #header .main-nav .search_middle_block .close-block,
    #headerfixed .main-nav .search_middle_block .close-block {
        display: none !important;
    }

    /* Сброс toggle-стилей mshop (middle_form) и headerfixed (stitle_form) */
    #header .main-nav .search_middle_block .middle_form,
    #header .main-nav .search_middle_block .stitle_form,
    #headerfixed .main-nav .search_middle_block .middle_form,
    #headerfixed .main-nav .search_middle_block .stitle_form {
        opacity: 1;
        visibility: visible;
        width: 100%;
        position: relative;
        right: auto;
        top: auto;
        display: block;
        overflow: visible;
    }

    #header .main-nav .search_middle_block .stitle_form .text,
    #header .main-nav .search_middle_block .stitle_form .small_block,
    #headerfixed .main-nav .search_middle_block .stitle_form .text,
    #headerfixed .main-nav .search_middle_block .stitle_form .small_block {
        width: 100%;
        padding: 10px 45px 9px 13px;
        height: 41px;
        font-size: 13px;
        line-height: 20px;
        border-color: transparent;
        border-radius: 2px;
        box-sizing: border-box;
    }

    .h_color_colored #header .main-nav .search_middle_block .stitle_form .text,
    .h_color_colored #headerfixed .main-nav .search_middle_block .stitle_form .small_block {
        background: rgba(255, 255, 255, 0.15);
        color: #fff;
    }

    .h_color_colored #header .main-nav .search_middle_block .stitle_form .text::placeholder,
    .h_color_colored #headerfixed .main-nav .search_middle_block .stitle_form .small_block::placeholder {
        color: rgba(255, 255, 255, 0.75);
    }

    .h_color_white #header .main-nav .search_middle_block .stitle_form .text,
    .h_color_white #headerfixed .main-nav .search_middle_block .stitle_form .small_block {
        background: #eee;
        color: #1d1a1a;
    }

    .h_color_white #header .main-nav .search_middle_block .stitle_form .text::placeholder,
    .h_color_white #headerfixed .main-nav .search_middle_block .stitle_form .small_block::placeholder {
        color: rgba(29, 26, 26, 0.55);
    }

    #header .main-nav .menu.full + .search_middle_block .stitle_form .button,
    #headerfixed .main-nav .menu.full + .search_middle_block .stitle_form .button {
        top: 2px;
    }
}

/* =========================
   SERVICE ORDER BUTTON (задача 6, 2026-07-07)
   ========================= */

.news_detail_wrapp .service_order_btn_wrap {
    margin: 28px 0 32px;
    text-align: center;
}

.news_detail_wrapp .service_order_btn_wrap .services_btn {
    display: inline-block;
    min-width: 280px;
    max-width: 100%;
    cursor: pointer;
}

.news_detail_wrapp .service_order_btn_wrap .services_btn span {
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

/* Скрыть устаревший блок кнопок в контенте услуг */
.news_detail_wrapp .detail_text .service-order-box {
    display: none !important;
}

/* Поле «Услуга» в модалке — заполняется автоматически */
.form.SERVICES .form-control:has([data-sid="SERVICE"]) {
    display: none;
}