/* Header */
#masthead {
    width: 100%;
    background: #fff;
    border-bottom: 1px solid var(--mw-color-border-light);
}

#masthead .site-header-inner {
    width: 100%;
}

/* Main header container */
#masthead .site-header-inner > .woostify-container {
    display: flex;
    align-items: center;
    width: calc(100% - 40px);
    max-width: var(--mw-container-max);
    min-height: 68px;
    margin: 0 auto;
    padding: 0;
    box-sizing: border-box;
}

/* Branding */
#masthead .site-branding {
    display: flex;
    align-items: center;
    flex: 0 0 auto;
    margin: 0;
}

/* Logo */
#masthead .custom-logo-link {
    display: flex;
    align-items: center;
    width: 82px;
    height: 62px;
    overflow: hidden;
}

#masthead .custom-logo {
    display: block !important;
    width: 82px !important;
    height: 62px !important;
    max-width: 82px !important;
    max-height: 62px !important;
    object-fit: contain;
}

/* Brand name */
#masthead .mw-header-brand-name {
    margin-left: 14px;
    color: var(--mw-color-ink);
    font-size: var(--mw-font-md);
    font-weight: var(--mw-font-medium);;

    letter-spacing: .27em;
    line-height: 1;
    white-space: nowrap;
}

/*.site-header .mw-header-brand-name {*/
/*    font-family: "Cormorant Garamond", serif;*/
/*    font-size: 25px;*/
/*    font-weight: 500;*/
/*    font-style: italic;*/
/*    letter-spacing: 0.5px;*/

/*    color: #171717;*/
/*}*/

/* Navigation */
#masthead .site-navigation {
    display: flex;
    align-items: center;
    flex: 0 0 auto !important;
    width: auto !important;
    max-width: none !important;
    margin-left: auto !important;
    margin-right: 20px !important;
}

/* Main navigation */
#masthead .main-navigation {
    display: flex;
    align-items: center;
    width: auto !important;
    margin: 0;
}

/* Navigation list */
#masthead .primary-navigation {
    display: flex;
    align-items: center;
    gap: 28px;
    width: auto !important;
    margin: 0;
    padding: 0;
    list-style: none;
}

/* Top-level menu item */
#masthead .primary-navigation > li {
    position: relative;
    flex: 0 0 auto;
    margin: 0 !important;
    padding: 0 !important;
}

/* Top-level menu link */
#masthead .primary-navigation > li > a {
    display: flex;
    align-items: center;
    height: 68px;
    margin: 0 !important;
    padding: 0 !important;
    color: var(--mw-color-ink);
    font-size: var(--mw-font-base);
    font-weight: 500;
    line-height: 1;
    text-transform: uppercase;
    white-space: nowrap;
    transition: color .2s ease;
}

#masthead .primary-navigation > li > a:hover {
    color: var(--mw-color-text-faint);
}

/* Menu arrow */
#masthead .menu-item-arrow {
    display: flex;
    align-items: center;
    margin-left: 6px;
}

#masthead .menu-item-arrow svg {
    display: block;
    width: 8px;
    height: 8px;
}

/* Dropdown */
#masthead .primary-navigation .sub-menu {
    min-width: 180px;
    margin: 0;
    padding: 4px 0;
    border: 0;
    background: #fff;
    box-shadow: 0 4px 14px rgba(0, 0, 0, .08);
}

/* Dropdown item */
#masthead .primary-navigation .sub-menu li {
    margin: 0;
    padding: 0;
}

/* Dropdown link */
#masthead .primary-navigation .sub-menu a {
    display: block;
    padding: 8px 20px;
    color: var(--mw-color-ink);
    font-size: 12px;
    font-weight: 400;
    line-height: 1.4;
    text-transform: uppercase;
    white-space: nowrap;
    transition: color .2s ease;
}

#masthead .primary-navigation .sub-menu a:hover {
    color: var(--mw-color-text-faint);
}

/* Header tools */
#masthead .site-tools {
    display: flex;
    align-items: center;
    flex: 0 0 auto !important;
    width: auto !important;
    gap: 17px;
    margin: 0 !important;
    padding: 0;
}

/* Tool wrapper */
#masthead .tools-icon {
    margin: 0;
}

/* Tool buttons */
#masthead .header-search-icon,
#masthead .my-account-icon,
#masthead .shopping-cart {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    padding: 0;
}

/* Tool icons */
#masthead .site-tools svg {
    display: block;
    width: 21px;
    height: 21px;
}

/* Tool hover */
#masthead .site-tools a,
#masthead .header-search-icon {
    color: var(--mw-color-ink);
    transition: opacity .2s ease;
}

#masthead .site-tools a:hover,
#masthead .header-search-icon:hover {
    opacity: .55;
}

/* Account dropdown */
#masthead .my-account {
    position: relative;
}

#masthead .my-account .subbox {
    left: auto;
    right: 0;
}

/* Cart */
#masthead .shopping-cart {
    position: relative;
}

#masthead .shop-cart-count {
    position: absolute;
    top: -5px;
    right: -7px;
}

/* Desktop mobile-menu toggle */
#masthead .wrap-toggle-sidebar-menu {
    display: none;
}

/* Tablet */
@media (max-width: 900px) {
    #masthead .site-header-inner > .woostify-container {
        width: calc(100% - 24px);
        min-height: 60px;
    }

    #masthead .wrap-toggle-sidebar-menu {
        display: block;
        order: 1;
        margin-right: 12px;
    }

    #masthead .site-branding {
        order: 2;
    }

    #masthead .custom-logo-link {
        width: 68px;
        height: 52px;
    }

    #masthead .custom-logo {
        width: 68px !important;
        height: 52px !important;
        max-width: 68px !important;
        max-height: 52px !important;
    }

    #masthead .mw-header-brand-name {
        margin-left: 10px;
        font-size: 12px;
        letter-spacing: .18em;
    }

    #masthead .site-navigation {
        display: none;
    }

    #masthead .site-tools {
        order: 3;
        margin-left: auto !important;
        gap: 12px;
    }

    #masthead .site-tools svg {
        width: 20px;
        height: 20px;
    }
}

/* Mobile */
@media (max-width: 600px) {
    #masthead .mw-header-brand-name {
        display: none;
    }

    #masthead .site-tools {
        gap: 8px;
    }

    #masthead .header-search-icon,
    #masthead .my-account-icon,
    #masthead .shopping-cart {
        width: 23px;
        height: 23px;
    }
}

/* Mobile drawer main entries */
.sidebar-menu .primary-navigation > li > a > .menu-item-text {
    text-transform: uppercase;
}

@media (max-width: 900px) {

    .sidebar-menu {
        position: relative;
    }

    .sidebar-menu .widget_product_search {
        width: calc(100% - 42px) !important;
    }

    .sidebar-menu .site-search {
        padding-right: 54px;
    }

    .sidebar-menu .mw-sidebar-close {
        position: absolute;
        top: 15px;
        right: 16px;

        display: flex;
        align-items: center;
        justify-content: center;

        width: 40px;
        height: 40px;
        padding: 0;

        background: transparent;
        border: 0;
        color: var(--mw-color-ink);
        cursor: pointer;
        z-index: 10;
    }

    .sidebar-menu .mw-sidebar-close svg {
        display: block;
        width: 17px;
        height: 17px;
    }

    .sidebar-menu .mw-sidebar-close path {
        fill: currentColor;
    }
}
