/*** Header Elements ***/
#header {
    position: sticky;
    top: 0;
    width: 100%;
    height: fit-content;
    background: rgba(255, 255, 255, 0.95);
    z-index: 15;
}
a[rel="home"] {
 	white-space: nowrap; 
}
.logo {
  display: inline-block;
    vertical-align: middle;
    height: auto;
    width: 120px;
}
.logo-small {
    vertical-align: middle;
    height: 36px;
    width: auto;
}
#header-nav {
    max-width: 1200px;
    margin: 0 auto;
}
#header-nav a:not([class*="cart"]) {
    flex: 1;
    line-height: 1;
    text-decoration: none;
}
#main-menu-checkbox + #header-nav {
    display: flex;
    position: relative;
    justify-content: flex-start;
    align-items: center;
}
.menu-toggle {
    display: inline-block;
    padding: 10px;
    font-size: 2em;
    line-height: 1em;
    color: #333;
    cursor: pointer;
}
.menu-toggle:hover,
#main-menu-checkbox:focus ~ #header-nav .menu-toggle {
    color: var(--color-brand-80);
    outline: auto;
}
#main-menu-checkbox {
    position: absolute;
    left: -100vw;
}
.main-menu {
    height: 100%;
    overflow: visible;
    position: fixed;
    top: 0;
    z-index: 999;
    left: -230px;
    transition: left 0.3s ease, box-shadow 0.3s ease;
    background: rgba(255, 255, 255, 0.95);
}
.main-menu > ul {
    width: 200px;
    margin: 0;
    padding: 2.5em 0 0;

    list-style: none;
}
.main-menu ul ul:not(.cart-products) {
    padding-left: 1rem;
    list-style: none;
}
.main-menu a:not([class*="cart"]),
.main-menu .menu-close {
    display: block;
    padding: 0.75em 15px;
    color: var(--color-brand-100);
    text-decoration: none;
}
.main-menu a[href='#'] {
    color: var(--color-gray-100);
}
.main-menu li:first-child a {
    border-top: 1px solid rgba(0, 0, 0, 0.2);
}
.main-menu a:hover,
.main-menu a:focus,
.main-menu .menu-close:hover,
#main-menu-checkbox:focus ~ #header-nav .menu-close {
    color: var(--color-brand-50);
}
.main-menu .menu-close {
    line-height: 1;
    position: absolute;
    right: 0;
    top: 0;
    cursor: pointer;
}
#main-menu-checkbox:checked ~ #header-nav .main-menu,
.main-menu[aria-expanded='true'] {
    outline: none;
    left: 0;
    overflow-y: scroll;
}
#main-menu-checkbox:checked ~ #header-nav .menu-close,
.main-menu[aria-expanded='true'] .menu-close {
    z-index: 1001;
}
#main-menu-checkbox:checked ~ #header-nav .main-menu ul,
.main-menu[aria-expanded='true'] ul {
    position: relative;
    z-index: 1000;
}
#main-menu-checkbox:checked ~ #header-nav .main-menu ul > li > ul > li > a,
.main-menu[aria-expanded='true'] ul > li > ul > li > a {
    padding-left: 1rem;
}
#main-menu-checkbox:checked ~ #header-nav .backdrop,
.main-menu[aria-expanded='true'] + .backdrop {
    content: '';
    display: block !important;
    height: 100%;
    position: fixed;
    width: 100%;
    background-color: #000;
    background-color: rgba(0, 0, 0, 0.85);
    top: 0;
    z-index: 998;
    left: 0;
    cursor: default;
}
.nav-lang {
    margin: 0;
    padding-left: 1rem;
    padding-right: 1rem;
    text-align: center;
    list-style-type: none;
}
.nav-lang li.small {
    line-height: 24px;
}
.nav-lang a {
    color: #333;
    text-decoration: none;
}
.nav-lang a:hover {
    color: var(--color-brand-50);
}

@media (min-width: 768px) {
    .logo {
        width: 150px;
    }
    #header {
        box-shadow: var(--shadow);
    }
    #header-nav a:not([class*="cart"]) {
        flex:none;
    }
    .menu-toggle,
    .main-menu .menu-close,
    #main-menu-checkbox {
        display: none;
    }
    .main-menu {
        height: auto;
        position: relative;
        top: auto;
        left: auto;
        flex: 1;
        align-self: flex-end;
        overflow-y: auto;
        overflow-y: visible;
        background: transparent;
    }
    .main-menu > ul {
        height: auto;
        width: auto;
        box-shadow: none;
        text-align: right;
        padding: 0;
    }
  
    .main-menu ul.sub-menu ul.sub-menu {
        position: absolute;
        top: 0;
        left: 100%;
        width: fit-content;
    }

    .main-menu li {
        display: inline-block;
        position: relative;
    }
    .main-menu li:first-child a {
        border-top: none;
    }
    .main-menu a {
        white-space: nowrap;
        border-bottom: none;
    }
    .main-menu a:hover {
        background-image: none;
    }
    .main-menu li:not([class*='cart-']) a:not(:only-child):not([class*='cart-'])::after {
        content: ' ▾';
    }
    .main-menu li ul:not(.cart-products) {
        position: absolute;
        background-color: #fff;
        right: 0;
        z-index: 1;
        text-align: center;
        visibility: hidden;
        opacity: 0;
        transition: all 0.25s ease;
    }
    .main-menu li:hover > ul,
    .main-menu li ul:hover {
        visibility: visible;
        opacity: 1;
    }
    .main-menu ul ul:not(.cart-products) {
        padding-left: 0;
        box-shadow: var(--shadow);
    }
    .nav-lang {
        margin-bottom: 0;
        line-height: 1.5;
        position: relative;
        left: 0;
        align-self: flex-end;
        padding: 0 0 8px 8px;
    }
}

/* tweak to fit Store Cart button alongside sister sites */
#header-nav .wp-block-spl-store-cart {
    position: relative;
    margin-left: 0.25rem;
}

@media (min-width:768px) {
    .main-menu > ul:first-of-type:not(.main-menu) {
        margin-right: 6.25rem;
    }
    /* tweak positioning -- only applicable to this theme */
    #header-nav .wp-block-spl-store-cart {
        position: absolute;
        right: 2rem;
        z-index: 1000;
    }
}
/* end tweak */