/* =========================================
   HEADER + NAVIGATION
========================================= */

.site-header,
.site-header.is-scrolled {
    position: fixed;
    top: 14px;
    right: 0;
    left: 0;
    z-index: 999;

    padding: 0;

    background: transparent !important;
    box-shadow: none !important;
}

.site-header .container {
    width: calc(100% - 30px);
    max-width: none;
}


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

.header-inner {
    position: relative;

    min-height: 58px;

    display: flex;
    align-items: center;

    gap: 24px;

    padding: 7px 20px;

    background: transparent;

    border: 1px solid transparent;
    border-radius: 99px;

    box-shadow: none;

    transition:
        background .25s ease,
        border-color .25s ease,
        box-shadow .25s ease;
}


/* Scrolled header */

.site-header.is-scrolled .header-inner {
    min-height: 58px;

    padding: 7px 20px;

    background: rgba(255, 255, 255, .96);

    border-color: #e0e7df;
    border-radius: 99px;

    box-shadow: 0 9px 25px rgba(20, 58, 45, .1);

    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}


/* WordPress Admin Bar */

body.admin-bar .site-header,
body.admin-bar .site-header.is-scrolled {
    top: 46px;
}


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

.site-branding {
    flex: 0 0 132px;
    line-height: 1;
}

.site-branding a {
    color: var(--ink);
    text-decoration: none;
}

.custom-logo-link {
    display: block;
}

.custom-logo {
    display: block;

    max-height: 52px;
    width: auto;
}


/* Fallback logo */

.brand-mark {
    position: relative;

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

    width: 62px;
    height: 44px;

    padding: 0 2px;

    color: #f5d938 !important;

    background: #174529;

    border: 2px solid #a7ae35;
    border-radius: 50% 50% 46% 46%;

    font-family: Georgia, serif;
    font-size: 13px;
    font-style: italic;
    font-weight: 700;

    letter-spacing: -1px;

    transform: rotate(-4deg);
}

.brand-mark span {
    color: #fff17d;
}

.brand-mark small {
    position: absolute;

    right: 3px;
    bottom: 6px;
    left: 3px;

    color: #fff;

    font-family: Arial, sans-serif;
    font-size: 4px;
    font-style: normal;

    letter-spacing: .3px;

    text-align: center;
    text-transform: uppercase;
}


/* =========================================
   DESKTOP NAVIGATION
========================================= */

.primary-navigation {
    flex: 1;
}

.primary-menu,
.footer-menu {
    display: flex;
    align-items: center;
    justify-content: center;

    gap: 28px;

    list-style: none;

    padding: 0;
    margin: 0;
}

.primary-menu li {
    margin: 0;
}

.primary-menu a {
    color: #263a31;

    font-size: 15px;
    font-weight: 500;

    text-decoration: none;

    transition: color .2s ease;
}

.primary-menu a:hover {
    color: var(--accent-dark);
}


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

.header-actions {
    display: flex;
    flex: 0 0 auto;

    align-items: center;

    gap: 11px;
}


/* Optional header button */

.header-link {
    display: inline-flex;
    align-items: center;

    min-height: 32px;

    padding: 0 16px;

    color: #fff;

    background: #123f29;

    border-radius: 99px;

    font-size: 11px;
    font-weight: 700;

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

.header-link:hover {
    color: #fff;
    background: #286344;
}


/* Shop All */

.shop-all-link {
    color: #193826;

    background:
        linear-gradient(
            135deg,
            #f1ce63,
            #d9a623
        );

    box-shadow:
        inset 0 0 0 1px rgba(113, 73, 6, .12);
}

.shop-all-link:hover {
    color: #fff;
    background: #174b30;
}


/* =========================================
   ICONS
========================================= */

.icon-link {
    position: relative;

    display: grid;

    width: 24px;
    height: 32px;

    place-items: center;

    color: #253b31;

    text-decoration: none;
}

.icon-link svg {
    width: 20px;
    height: 20px;

    fill: none;

    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.8;
}


/* Cart count */

.cart-count {
    position: absolute;

    top: 0;
    right: -2px;

    display: grid;

    width: 13px;
    height: 13px;

    place-items: center;

    color: #213e2f;
    background: #e3b52b;

    border-radius: 50%;

    font-size: 8px;
    font-weight: 700;
}


/* =========================================
   HAMBURGER - DESKTOP HIDDEN
========================================= */

.menu-toggle {
    display: none;

    border: 0;
    outline: none;
}


/* =========================================
   TABLET + MOBILE
   991px AND BELOW
========================================= */

@media (max-width: 991px) {

    .site-header .container {
        position: relative;
    }


    .header-inner {
        position: relative;

        display: flex;
        align-items: center;

        gap: 12px;
    }


    /* Logo */

    .site-branding {
        flex: 0 0 auto;
    }


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

    .primary-navigation {
        display: none;

        position: absolute;

        top: calc(100% + 10px);
        right: 0;
        left: 0;

        z-index: 9999;

        flex: none;

        padding: 18px 20px;

        background: #fff;

        border: 1px solid #e0e7df;
        border-radius: 14px;

        box-shadow:
            0 12px 35px rgba(20, 58, 45, .14);
    }


    /* Open state */

    .primary-navigation.is-open {
        display: block;
    }


    /* Mobile menu list */

    .primary-menu {
        display: grid;

        align-items: initial;
        justify-content: stretch;

        gap: 5px;

        width: 100%;

        padding: 0;
        margin: 0;
    }


    .primary-menu li {
        width: 100%;
    }


    .primary-menu a {
        display: block;

        width: 100%;

        padding: 10px 5px;

        color: #263a31;

        font-size: 15px;
        font-weight: 600;

        border-bottom: 1px solid #eef2ef;
    }


    .primary-menu li:last-child a {
        border-bottom: 0;
    }


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

    .header-actions {
        display: flex;
        flex: 0 0 auto;

        align-items: center;

        gap: 10px;

        margin-left: auto;
        margin-right: 0;

        padding: 0;
    }


    /* Hide search */

    .search-link {
        display: none !important;
    }


    /* Account stays visible */

    .account-link {
        display: grid !important;
    }


    /* Cart stays visible */

    .cart-link {
        display: grid !important;
    }


    /* =====================================
       HAMBURGER
    ===================================== */

    .menu-toggle {
        display: flex;

        flex: 0 0 38px;

        width: 38px;
        height: 36px;

        margin: 0;

        padding: 8px;

        flex-direction: column;

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

        gap: 4px;

        color: #253b31;

        background: transparent;

        border: 1px solid #dce5df;
        border-radius: 7px;

        cursor: pointer;

        appearance: none;
        -webkit-appearance: none;
    }


    .menu-toggle span {
        display: block;

        width: 19px;
        height: 2px;

        margin: 0;

        background: currentColor;

        border-radius: 2px;

        transition:
            transform .22s ease,
            opacity .22s ease;
    }


    /* Hamburger becomes X */

    .menu-toggle[aria-expanded="true"] span:nth-child(1) {
        transform: translateY(6px) rotate(45deg);
    }


    .menu-toggle[aria-expanded="true"] span:nth-child(2) {
        opacity: 0;
    }


    .menu-toggle[aria-expanded="true"] span:nth-child(3) {
        transform: translateY(-6px) rotate(-45deg);
    }
}


/* =========================================
   MOBILE
   720px AND BELOW
========================================= */

@media (max-width: 720px) {

    .site-header,
    .site-header.is-scrolled {
        top: 8px;
    }


    .site-header .container {
        width: auto;
        max-width: none;
        margin-right: 8px;
        margin-left: 8px;
    }


    body.admin-bar .site-header,
    body.admin-bar .site-header.is-scrolled {
        top: 54px;
    }


    .header-inner,
    .site-header.is-scrolled .header-inner {
        min-height: 52px;

        gap: 7px;

        padding: 7px 11px 7px 14px;
    }


    /* Logo */

    .custom-logo {
        max-height: 44px;
        max-width: 130px;
    }


    /* Icons */

    .header-actions {
        gap: 5px;
    }


    .icon-link {
        width: 25px;
        height: 30px;
    }


    .icon-link svg {
        width: 19px;
        height: 19px;
    }


    /* Hamburger */

    .menu-toggle {
        flex-basis: 36px;

        width: 36px;
        height: 34px;

        padding: 7px;
    }


    .menu-toggle span {
        width: 18px;
    }


    /* Dropdown */

    .primary-navigation {
        top: calc(100% + 8px);

        padding: 15px 17px;
    }
}


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

@media (max-width: 420px) {

    .header-inner,
    .site-header.is-scrolled .header-inner {
        padding-left: 11px;
        padding-right: 9px;
    }


    .custom-logo {
        max-width: 115px;
        max-height: 41px;
    }


    .header-actions {
        gap: 3px;
    }


    .account-link,
    .cart-link {
        width: 23px;
    }


    .menu-toggle {
        width: 34px;
        height: 32px;

        flex-basis: 34px;
    }
}

/* =========================================
   ULTRA-WIDE DESKTOP
========================================= */

@media screen and (min-width: 1800px) {

    .container {
        max-width: 1600px;
    }


    .site-header {
        width: 87%;

        margin-right: auto;
        margin-left: auto;
    }
}
