/* Site header */

.site-header {
    position: relative;
    z-index: 100000;
}

.site-header-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 64px;
    background: #3b55a5;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    z-index: 100001;
}

.site-header-inner {
    width: 100%;
    height: 64px;
    margin: 0 auto;
    padding: 0 20px;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    gap: 0;
}

body {
    padding-top: 64px;
}

/* Logo */
.logo-wrap {
    flex-shrink: 0;
    margin-right: 24px;
}

.site-header .logo {
    padding: 0;
}

.site-header .logo a,
.site-header .logo span.active {
    text-decoration: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-family: 'sofa', sans-serif;
}

.site-header .logo-e {
    font-size: 26px;
    color: #fff;
    line-height: 26px;
}

.site-header .logo-s {
    font-size: 7px;
    color: #fff;
}

/* Desktop nav */
.header-nav-desktop {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.header-nav-desktop a,
.header-nav-desktop span.active {
    padding: 8px 14px;
    font-family: 'gothicb', 'gothic', sans-serif;
    font-size: 14px;
    text-transform: uppercase;
    text-decoration: none;
    color: rgba(255, 255, 255, 0.8);
    border-radius: 4px;
    white-space: nowrap;
}

.header-nav-desktop a:hover {
    color: #fff;
    background: rgba(0, 0, 0, 0.15);
}

.header-nav-desktop span.active {
    color: #fff;
    background: rgba(0, 0, 0, 0.2);
}

.header-spacer {
    flex: 1;
}

/* Desktop search icon */
.header-search-desktop {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    color: #fff;
    font-size: 20px;
    cursor: pointer;
    flex-shrink: 0;
    margin-right: 4px;
    border-radius: 6px;
    transition: background 0.25s ease;
}

.header-search-desktop:hover {
    background: rgba(255, 255, 255, 0.15);
}

.header-search-desktop .fa.red {
    color: #f44336;
}

/* Mobile icon-wrap */
.header-icon-wrap {
    display: none;
    align-items: center;
    gap: 4px;
    margin-left: auto;
}

.site-header .icon-wrap .fa,
.site-header .icon-wrap .far,
.site-header .icon-wrap .fas,
.site-header .icon-wrap .fab {
    color: #fff;
    font-size: 22px;
    padding: 8px;
    text-shadow: none;
}

.site-header .icon-wrap a {
    text-decoration: none;
    display: flex;
    align-items: center;
}

.site-header .icon-wrap .fa:hover,
.site-header .icon-wrap .far:hover {
    color: #4caf50;
}

.site-header .search {
    cursor: pointer;
}

/* Search bar */
.site-header .top-search {
    position: fixed;
    top: 64px;
    left: 0;
    right: 0;
    width: auto;
    height: auto;
    margin: 0;
    padding: 12px 15px;
    background: #fff;
    border: none;
    border-bottom: 1px solid #ddd;
    border-radius: 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    z-index: 100000;
    display: none;
}

.site-header .top-search form {
    max-width: 600px;
    margin: 0 auto;
    display: flex;
    gap: 8px;
}

.site-header .top-search input {
    flex: 1;
    float: none;
    width: auto;
    height: 40px;
    line-height: 40px;
    border: 1px solid #ccc;
    border-radius: 4px;
    padding: 0 12px;
    font-size: 16px;
    color: #333;
    background: #fff;
}

.site-header .top-search button {
    float: none;
    width: 44px;
    height: 40px;
    border-radius: 4px;
    flex-shrink: 0;
}

/* Phone block */
#phoneblock {
    display: none;
    position: relative;
    flex-shrink: 0;
    margin-right: 0;
}

.header_phone {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #fff;
    font-size: 16px;
    font-family: 'gothicb', 'gothic', sans-serif;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
    transition: opacity 0.25s ease;
}

.header_phone .fa-phone {
    font-size: 18px;
}

.header_phone:hover {
    opacity: 0.85;
}

ul.messenger__list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    padding-top: 8px;
    z-index: 10;
    gap: 4px;
}

#phoneblock:hover ul.messenger__list {
    display: flex;
}

.social__link_mobile a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 6px;
    text-decoration: none;
    color: #fff;
    background: #f89a1e;
    font-size: 16px;
}

.social__link_mobile a.mail { background: #da2b33; }
.social__link_mobile a.telegram { background: #2BA0DA; }
.social__link_mobile a.whatsapp { background: #00A000; }
.social__link_mobile a.viber { background: #7A4F9C; }

.social__link_mobile-phone {
    display: none;
}

.social__link_mobile-phone__number {
    display: none;
}

.phone__mobile {
    display: none;
}

.site-header .phone__mobile {
    margin: 0;
    cursor: pointer;
}

.site-header .phone__mobile .fa-phone {
    color: #fff;
}

/* Burger in header */
.site-header #nav-icon3 {
    position: relative;
    top: auto;
    right: auto;
    width: 26px;
    height: 24px;
    flex-shrink: 0;
    margin-left: 12px;
    cursor: pointer;
}

.site-header #nav-icon3 span {
    background: #fff;
    height: 4px;
}

.catalog-header .site-header #nav-icon3 span,
.good-header .site-header #nav-icon3 span,
.cart-header .site-header #nav-icon3 span,
.content-header .site-header #nav-icon3 span,
.contacts-header .site-header #nav-icon3 span,
.section-header .site-header #nav-icon3 span {
    background: #fff;
}

/* Category panel */
.wrap-right-menu {
    top: 64px !important;
    height: calc(100vh - 64px) !important;
}

/* Callback */
.backCall {
    left: 50% !important;
    margin-left: -160px;
    top: 50% !important;
    margin-top: -120px;
}

/* Layout fixes after removing left sidebar */
.wrap-heart {
    padding-left: 20px !important;
}

.basket .wrap-heart,
.good .wrap-heart {
    left: 0 !important;
    position: relative !important;
    top: auto !important;
}

/* ---- Desktop ---- */
@media only screen and (min-width: 991px) {
    .header-icon-wrap,
    .phone__mobile {
        display: none !important;
    }

    .header-nav-desktop,
    .header-search-desktop {
        display: flex;
    }

    #phoneblock {
        display: flex;
        flex-direction: column;
        align-items: flex-end;
        justify-content: center;
    }

    #phoneblock .header_phone {
        display: flex;
    }

    #phoneblock:hover ul.messenger__list {
        display: flex;
    }
}

/* ---- Mobile ---- */
@media only screen and (max-width: 990px) {
    .header-nav-desktop,
    .header-search-desktop,
    .header-spacer {
        display: none;
    }

    .header-icon-wrap {
        display: flex;
    }

    .phone__mobile {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 40px;
        height: 40px;
        color: #fff;
        font-size: 22px;
        cursor: pointer;
        flex-shrink: 0;
        margin-left: 4px;
    }

    .site-header .phone__mobile .fa-phone,
    .site-header .phone__mobile:hover .fa-phone,
    .phone-toggle-input:checked ~ .phone__mobile .fa-phone,
    .phone-toggle-input:checked ~ .phone__mobile:hover .fa-phone {
        color: #fff;
        transform: none;
    }

    .phone-toggle-input:checked ~ #phoneblock {
        display: flex;
    }

    .site-header #nav-icon3 {
        margin-left: 8px;
    }

    #phoneblock {
        position: fixed;
        top: 64px;
        left: 0;
        right: 0;
        padding: 5px 5px;
        background: #2a4080;
        text-align: center;
        z-index: 99999;
        box-sizing: border-box;
        flex-direction: column;
        align-items: center;
    }

    #phoneblock .header_phone {
        display: none;
    }

    ul.messenger__list {
        display: flex;
        position: static;
        justify-content: center;
        flex-wrap: wrap;
        gap: 6px;
        padding-top: 0;
        width: 100%;
    }

    #phoneblock:hover ul.messenger__list {
        display: flex;
    }

    .social__link_mobile a {
        width: 38px;
        height: 38px;
        font-size: 18px;
    }

    .social__link_mobile-phone {
        display: list-item;
        width: 50%;
    }

    .social__link_mobile-phone a {
        width: auto;
        height: auto;
        padding: 6px 10px;
        gap: 8px;
        margin: 0 auto;
    }

    .social__link_mobile-phone__number {
        display: inline;
        font-size: 16px;
        font-family: 'gothicb', sans-serif;
    }

    .logo-wrap {
        margin-right: auto;
    }

    .header-icon-wrap {
        margin-left: 0;
    }
}

@media only screen and (max-width: 480px) {
    .site-header-bar,
    .site-header-inner {
        height: 56px;
    }

    body {
        padding-top: 56px;
    }

    .wrap-right-menu {
        top: 56px !important;
        height: calc(100vh - 56px) !important;
    }

    .site-header .top-search,
    #phoneblock {
        top: 56px;
    }

    .site-header .logo-e {
        font-size: 22px;
        line-height: 22px;
    }
}
