/* =========================
   HEADER
========================= */

#site-header {
    position: sticky;
    top: 0;
    z-index: 9999;

    display: flex;
    flex-direction: column;

    max-width: 100%;

    background: #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,.1);

    padding: 0;
    margin-bottom: 2rem;
}


/* =========================
   TOPBAR
========================= */

.header-topbar {
    background-color: var(--e-global-color-accent);
    color: #fff;

    padding-top: 1em;
}

.header-topbar-inner {
    width: min(1700px, 92%);
    margin: 0 auto;

    text-align: center;
}

.header-topbar p {
    margin: 0;

    font-size: 15px;
    line-height: 1;
}

.header-topbar a,
.header-topbar a:hover,
.header-topbar a:focus,
.header-topbar a:visited {
    color: #fff;

    font-weight: 600;
    text-decoration: underline;
}


/* =========================
   TOPMENU
========================= */

.header-topmenu {
    padding-top: 1em;

    color: var(--e-global-color-text);
}

.header-topmenu-inner {
    width: min(1700px, 92%);
    margin: 0 auto;
    display: flex;
    justify-content: flex-end;
    gap: 5px;
}

#menu-top-nav {
    display: flex;
    list-style: none;
}

.top-nav-menu li:not(:last-child)::after {
    content: "|";
    margin: 0 .75rem;
    color: #999;
}

.header-topmenu a {
    color: var(--e-global-color-text);

    font-family: 'Manrope', sans-serif;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
}

.header-topmenu a:hover {
    color: var(--e-global-color-f1c15ad);
}


/* =========================
   MAIN HEADER
========================= */

.header-main {
    padding: 0 1em;
}

.header-main-inner {
    width: min(1700px, 92%);
    margin: 0 auto;

    display: flex;
    align-items: center;
    gap: 2em;
}


/* =========================
   LOGO
========================= */

.header-logo {
    flex-shrink: 0;
}

.header-logo img {
    max-height: 5.5rem;
    width: auto;
}


/* =========================
   SEARCH
========================= */

.header-search {
    flex: 1;
}


/* FIBOSEARCH */

.header-search .dgwt-wcas-search-wrapp {
    width: 100%;
    max-width: 100%;
}

.header-search .dgwt-wcas-search-input {
    font-size: 16px !important;
}

.header-search .dgwt-wcas-ico-magnifier {
    max-width: 24px;
    max-height: 24px;
}

.header-search .dgwt-wcas-search-icon {
    left: 22px !important;
}


/* =========================
   ACTIONS
========================= */

.header-actions {
    display: flex;
    align-items: center;
    gap: 2em;

    flex-shrink: 0;
}

.header-actions a {
    position: relative;

    display: flex;
    align-items: center;
    justify-content: center;

    color: var(--e-global-color-text);
}


/* CART COUNT */

.cart-count {
    position: absolute;

    top: -6px;
    right: -10px;

    width: 20px;
    height: 20px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 999px;

    background: var(--e-global-color-text);
    color: #fff;

    font-size: 11px;
    font-weight: 600;
}


/* =========================
   MENU
========================= */

.header-menu-inner {
    width: min(1700px, 92%);
    margin: 0 auto;
}

.primary-menu {
    display: flex;
    justify-content: center;
    gap: 3em;

    list-style: none;

    padding: 0 0 1em;
    margin: 0;
}

.primary-menu li {
    flex-shrink: 0;
}

.primary-menu a {
    font-family: 'Manrope', sans-serif;
    font-size: 16px;
    font-weight: 500;

    color: var(--e-global-color-text);

    text-decoration: none;
    white-space: nowrap;

    transition: .2s ease;
}

.primary-menu a:hover {
    color: var(--e-global-color-f1c15ad);
}


/* =========================
   MOBILE
========================= */

@media (max-width: 992px) {

    /* HEADER */

    #site-header {
        margin-bottom: 1rem;
        overflow-x: clip;
    }

    /* TOPBAR */

    .header-topbar {
        padding-top: 0.5em;
    }

    .header-topbar-inner {
        min-width: 0;
    }

    .header-topbar p {
        font-size: 13px;
        line-height: 1.4;
        white-space: normal;
        overflow-wrap: break-word;
    }

    /* TOP MENU */

    .header-topmenu {
        display: none;
    }

    /* MAIN */

    .header-main {
        width: 100%;
        padding: .8rem 0;
    }

    .header-main-inner {
        width: min(92%, 100%);

        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 1rem;
    }

    /* LOGO */

    .header-logo {
        flex-shrink: 0;
    }

    .header-logo img {
        max-height: clamp(38px, 6vw, 46px);
    }


    /* FIBOSEARCH */

    .header-search .dgwt-wcas-search-wrapp {
        z-index: 2;
    }


    .header-search .dgwt-wcas-search-input {
        min-height: 54px !important;

        padding-left: 3.2em !important;

        font-size: 16px !important;
    }


    .header-search .dgwt-wcas-search-icon {
        left: 16px !important;
    }


    .header-search .dgwt-wcas-ico-magnifier {
        width: 20px;
        height: 20px;
    }

    .header-search form.dgwt-wcas-search-form .dgwt-wcas-sf-wrapp button.dgwt-wcas-search-submit {
        top: 15px;
    }


    /* ACTIONS */

    .header-actions {
        gap: 1em;
    }

    .header-actions svg {
        width: 24px;
        height: 24px;
    }

    .header-languages {
        display: none;
    }

    /* CART */

    .cart-count {
        width: 16px;
        height: 16px;

        top: -4px;
        right: -7px;

        font-size: 10px;
    }

    /* MENU */

    .header-menu {
        width: 100%;
    }

    .header-menu-inner {
        width: 100%;
    }

    .primary-navigation {
        overflow-x: auto;
        overflow-y: hidden;

        width: 100%;

        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;

        mask-image: linear-gradient(
            to right,
            transparent 0,
            black 20px,
            black calc(100% - 20px),
            transparent 100%
        );

        -webkit-mask-image: linear-gradient(
            to right,
            transparent 0,
            black 20px,
            black calc(100% - 20px),
            transparent 100%
        );
    }

    .primary-navigation::-webkit-scrollbar {
        display: none;
    }

    .primary-menu {
        display: flex;
        flex-wrap: nowrap;

        width: max-content;
        min-width: 100%;

        gap: 1rem;

        padding: .9rem 1rem;
        margin: 0;

        list-style: none;
    }

    .primary-menu li {
        flex: 0 0 auto;
    }

    .primary-menu a {
        display: block;

        white-space: nowrap;

        font-size: 14px;
    }


}


/* =========================
   SMALL MOBILE
========================= */

@media (max-width: 576px) {

    .header-main-inner {
        gap: .8rem;
    }

    .header-logo img {
        max-height: 40px;
    }

    .header-actions {
        gap: .8em;
    }

    .header-actions svg {
        width: 22px;
        height: 22px;
    }

    .header-topbar p {
        font-size: 12px;
    }

    .primary-menu {
        gap: 14px;
        padding: 0 0.5em 0.5em;
    }

    .primary-menu a {
        font-size: 15px;
    }

}


/* =========================
   MOBILE MENU
========================= */

.header-mobile-toggle,
.mobile-menu,
.mobile-menu-overlay {
    display: none;
}

@media (max-width: 992px) {

    .header-mobile-toggle {
        display: flex;
        flex-direction: column;
        justify-content: space-between;

        width: 24px;
        height: 18px;

        padding: 0;

        background: none;
        border: 0;

        cursor: pointer;
    }

    .header-mobile-toggle span {
        display: block;

        width: 100%;
        height: 2px;

        background: var(--e-global-color-text);

        border-radius: 2px;
    }


    .mobile-menu-overlay {
        display: block;

        position: fixed;
        inset: 0;

        background: rgba(0,0,0,.45);

        opacity: 0;
        visibility: hidden;

        transition: .25s;

        z-index: 9998;
    }


    .mobile-menu {
        display: block;

        position: fixed;

        top: 0;
        right: -320px;

        width: 320px;
        max-width: 90vw;
        height: 100vh;

        padding: 2rem;

        background: #fff;

        transition: right .3s ease;

        z-index: 9999;

        overflow-y: auto;
    }

    .mobile-menu-close {

        position: absolute;

        top: 18px;
        right: 18px;

        background: none;
        border: 0;

        font-size: 32px;

        cursor: pointer;
        color: var(--e-global-color-text);
        margin-left: 8px;
    }

    .mobile-top-nav {

        list-style: none;

        margin: 3rem 0 0;
        padding: 0;
    }

    .mobile-top-nav li {
        border-bottom: 1px solid #eee;
    }

    .mobile-top-nav a {

        display: block;

        padding: 1rem 0;

        color: var(--e-global-color-text);

        font-weight: 600;
        text-transform: uppercase;
        text-decoration: none;
    }


    body.mobile-menu-open {
        overflow: hidden;
    }

    body.mobile-menu-open .mobile-menu {
        right: 0;
    }

    body.mobile-menu-open .mobile-menu-overlay {
        opacity: 1;
        visibility: visible;
    }

}