/* Перебиваем старый display:flex!important из сниппета шапки. */
html body #masthead.site-header
.site-header-inner.fixed
>.social-links[class~="social-links"]{
    display:none!important;
    visibility:hidden!important;
    opacity:0!important;
    width:0!important;
    min-width:0!important;
    height:0!important;
    min-height:0!important;
    margin:0!important;
    padding:0!important;
    overflow:hidden!important;
    pointer-events:none!important;
}

@media (max-width:767px){
    html body.single-product #masthead.site-header{
        margin-bottom:10px!important;
    }

    html body.single-product .woocommerce-breadcrumb{
        margin-top:0!important;
    }
}

@media (min-width:768px){
    html body.single-product .msk-product-chat{
        display:none!important;
    }
}

/* После удаления кнопки чатов разделитель над Avito больше не нужен. */
html body.single-product
.msk-product-channels-card
>.msk-product-avito{
    margin-top:0!important;
    padding-top:0!important;
    border-top:0!important;
}

.msk-quick-chats{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:12px;
    width:100%;
    min-width:0;
    box-sizing:border-box;
    font-family:Manrope,Arial,sans-serif;
}

.msk-quick-chats--product{
    display:none!important;
    flex-direction:column;
    align-items:stretch;
    justify-content:flex-start;
    gap:0;
    margin-top:0;
}

.msk-quick-chats__toggle{
    -webkit-appearance:none;
    appearance:none;
    display:grid;
    grid-template-columns:18px auto 18px;
    align-items:center;
    justify-content:center;
    column-gap:8px;
    width:100%;
    min-height:38px;
    margin:0;
    padding:7px 12px;
    box-sizing:border-box;
    color:#3b3734;
    background:#fbf8f3;
    border:1px solid rgba(183,155,114,.34);
    border-radius:9px;
    box-shadow:none;
    font-family:Manrope,Arial,sans-serif;
    font-size:12.5px;
    line-height:1.2;
    font-weight:600;
    text-align:center;
    cursor:pointer;
    transition:
        color .18s ease,
        background-color .18s ease,
        border-color .18s ease,
        box-shadow .18s ease;
}

.msk-quick-chats__toggle:hover{
    color:#8c6a3e;
    background:#f8f3ec;
    border-color:rgba(164,124,70,.52);
    box-shadow:0 3px 10px rgba(102,76,43,.08);
}

.msk-quick-chats__toggle:focus-visible{
    outline:2px solid rgba(177,133,68,.55);
    outline-offset:2px;
}

.msk-quick-chats__toggle-icon{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    width:18px;
    height:18px;
    color:#a27b46;
}

.msk-quick-chats__toggle-icon svg{
    display:block;
    width:18px;
    height:18px;
    fill:none;
    stroke:currentColor;
    stroke-width:1.7;
    stroke-linecap:round;
    stroke-linejoin:round;
}

.msk-quick-chats__chevron{
    display:block;
    width:7px;
    height:7px;
    margin-top:-3px;
    border-right:1.5px solid #9d7745;
    border-bottom:1.5px solid #9d7745;
    transform:rotate(45deg);
    transition:transform .2s ease,margin .2s ease;
}

.msk-quick-chats--product.is-open .msk-quick-chats__chevron{
    margin-top:3px;
    transform:rotate(225deg);
}

.msk-quick-chats__panel{
    max-height:0;
    padding-top:0;
    opacity:0;
    visibility:hidden;
    overflow:hidden;
    pointer-events:none;
    transition:
        max-height .24s ease,
        padding-top .24s ease,
        opacity .18s ease,
        visibility .18s ease;
}

.msk-quick-chats--product.is-open .msk-quick-chats__panel{
    max-height:52px;
    padding-top:9px;
    opacity:1;
    visibility:visible;
    overflow:visible;
    pointer-events:auto;
}

.msk-quick-chats__panel .msk-quick-chats__links{
    justify-content:center;
}

/* Третья строка — «Наши каналы», отделённая от Avito. */
body.single-product
.msk-product-channels-card.msk-product-contact-ordered
>.msk-product-channels-row{
    margin-top:10px!important;
    padding-top:10px!important;
    border-top:1px solid rgba(184,151,86,.2)!important;
}

/* Дополнительная статья больше не поднимается и не перекрывает блоки. */
body.single-product .woocommerce-product-form-wrap .product-related-article-link,
body.single-product .woocommerce-product-form-wrap .msk-guide-host{
    position:relative!important;
    top:auto!important;
    right:auto!important;
    bottom:auto!important;
    left:auto!important;
    order:50!important;
    clear:both!important;
    margin-top:10px!important;
    margin-bottom:12px!important;
    transform:none!important;
    z-index:1!important;
}

.msk-quick-chats__label{
    min-width:0;
    color:#3b3734;
    font-size:12px;
    line-height:1.2;
    font-weight:600;
    white-space:nowrap;
}

.msk-quick-chats--product .msk-quick-chats__label{
    color:inherit;
    font-size:12.5px;
    line-height:1.2;
    font-weight:600;
}

.msk-quick-chats__links{
    display:flex;
    align-items:center;
    gap:8px;
    flex:0 0 auto;
}

.msk-quick-chats--product .msk-quick-chats__links{
    gap:6px;
}

.msk-quick-chats__link{
    position:relative!important;
    display:inline-flex!important;
    align-items:center!important;
    justify-content:center!important;
    overflow:visible!important;
    width:31px!important;
    height:31px!important;
    flex:0 0 31px!important;
    margin:0!important;
    padding:0!important;
    background:transparent!important;
    border:0!important;
    border-radius:8px!important;
    box-shadow:none!important;
    line-height:0!important;
    text-decoration:none!important;
    transition:transform .18s ease,filter .18s ease;
}

.msk-quick-chats--product .msk-quick-chats__link{
    width:29px!important;
    height:29px!important;
    flex-basis:29px!important;
}

.msk-quick-chats__link:hover{
    transform:translateY(-2px) scale(1.04);
    filter:saturate(1.06);
}

.msk-quick-chats__link:focus-visible{
    outline:2px solid rgba(177,133,68,.65);
    outline-offset:3px;
}

.msk-quick-chats__link svg,
.msk-quick-chats__link img{
    display:block!important;
    width:100%!important;
    height:100%!important;
    margin:0!important;
    padding:0!important;
    border:0!important;
    border-radius:0!important;
    box-shadow:none!important;
    object-fit:contain!important;
}

.msk-channel-hover-text{
    position:absolute!important;
    right:auto!important;
    bottom:calc(100% + 6px)!important;
    left:50%!important;
    z-index:999999!important;
    display:none!important;
    width:max-content!important;
    min-width:max-content!important;
    max-width:none!important;
    margin:0!important;
    padding:4px 7px!important;
    box-sizing:border-box!important;
    color:#6f5a3f!important;
    background:#fbf7f1!important;
    border:1px solid rgba(183,155,114,.38)!important;
    border-radius:7px!important;
    box-shadow:0 4px 12px rgba(80,62,42,.13)!important;
    font-family:Manrope,Arial,sans-serif!important;
    font-size:10.5px!important;
    line-height:1.15!important;
    font-weight:500!important;
    text-align:center!important;
    white-space:nowrap!important;
    opacity:0!important;
    visibility:hidden!important;
    pointer-events:none!important;
    transform:translateX(-50%) translateY(3px)!important;
    transition:opacity .16s ease,visibility .16s ease,transform .16s ease!important;
}

@media (min-width:768px) and (hover:hover){
    body.single-product .msk-product-channels-card,
    body.single-product .msk-product-channels-row,
    body.single-product .msk-product-channels-icons,
    body.single-product .msk-product-channels-icons>a{
        overflow:visible!important;
    }

    body.single-product .msk-product-channels-icons>a{
        position:relative!important;
    }

    .msk-channel-hover-text{
        display:block!important;
    }

    body.single-product .msk-product-channels-icons>a:hover>.msk-channel-hover-text,
    body.single-product .msk-product-channels-icons>a:focus-visible>.msk-channel-hover-text,
    .msk-quick-chats__link:hover>.msk-channel-hover-text,
    .msk-quick-chats__link:focus-visible>.msk-channel-hover-text{
        opacity:1!important;
        visibility:visible!important;
        transform:translateX(-50%) translateY(0)!important;
    }
}

@media (min-width:768px){
    body.single-product .msk-product-channels-title{
        width:86px;
        flex:0 0 86px;
        box-sizing:border-box;
    }
}

@media (max-width:767px){
    body.single-product .msk-quick-chats--product{
        display:none!important;
    }

    /* На мобильном первым видимым элементом становится Avito. */
    body.single-product
    .msk-product-channels-card.msk-product-contact-ordered
    >.msk-product-avito{
        margin-top:0!important;
        padding-top:0!important;
        border-top:0!important;
    }
}

@media (max-width:390px){
    .msk-quick-chats__links{
        gap:7px;
    }

    .msk-quick-chats__link{
        width:29px!important;
        height:29px!important;
        flex-basis:29px!important;
    }
}
