.site-header {
    width: 100%;
    background: #fff;
}

/* =========================
   TOP HEADER ROW
   ========================= */

.site-header__top {
    min-height: 76px;

    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;

    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.brand {
    grid-column: 2;

    display: flex;
    align-items: center;
    gap: 0.75rem;

    text-decoration: none;
    color: inherit;
    font-weight: 600;
}

.brand img {
    width: 48px;
    height: 48px;
    object-fit: contain;
}


/* =========================
   CART + ACCOUNT
   ========================= */

.site-nav {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.cart-link,
.account-icon-link {
    position: relative;

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

    color: #17251c;
    text-decoration: none;
}
/* Active login icon */
.account-icon-link.active {
    background-color: #c5d8bd !important;
    border-radius: 20px;
    padding: 8px 16px !important;

    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.cart-icon,
.account-icon {
    width: 24px;
    height: 24px;

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

.cart-count {
    position: absolute;
    top: -8px;
    right: -10px;

    min-width: 18px;
    height: 18px;

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

    border-radius: 50%;
    font-size: 0.7rem;
}


/* =========================
   BOTTOM NAVIGATION ROW
   ========================= */

.site-header__bottom {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0.8rem 2rem;

    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 1.5rem;
}

.main-nav {
    grid-column: 2;

    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
}

.main-nav a {
    color: #174f39;
    text-decoration: none;
    font-weight: 500;
}

.main-nav a:hover {
    text-decoration: underline;
}

.header-actions {
    grid-column: 3;

    display: flex;
    align-items: center;
    justify-self: end;
    gap: 1.5rem;
}

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

.header-search {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0;
}

.header-search input {
    width: 180px;
    height: 38px;
    margin: 0;
    padding: 0 0.75rem;
    box-sizing: border-box;
}

.header-search button {
    height: 38px;
    margin: 0;
    padding: 0 1rem;

    background-color: #1f6b4f;
    color: white;
    border: 1px solid #17251c;
    border-radius: 4px;

    font-weight: 600;
    cursor: pointer;
}

.header-search button:hover {
    background-color: #174f39;
}

/* Account dropdown wrapper */
.account-menu {
    position: relative;
    display: inline-flex;
    align-items: center;
}

/* Username in navbar */
.account-menu-toggle {
    display: flex;
    align-items: center;
    gap: 5px;

    margin: 0;
    padding: 0;

    background: transparent;
    border: none;

    color: #174f39;
    font: inherit;
    font-weight: 500;
    line-height: normal;

    cursor: pointer;
}

.account-menu .account-dropdown > a + a {
    border-top: 1px solid #d8c7a9 !important;
}

.account-dropdown {
    display: none;

    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    z-index: 1000;

    min-width: 190px;
    padding: 0;

    background: #fffaf0;
    border: 1px solid #d8c7a9;
    border-radius: 6px;

    overflow: hidden;

    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

/* Only display when JS adds .open */
.account-dropdown.open {
    display: block;
}

.account-dropdown a {
    display: block;
    width: 100%;
    padding: 12px 16px;
    margin: 0;
    box-sizing: border-box;

    background: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;

    white-space: nowrap;
    text-align: center;
    text-decoration: none;
    color: #1f2d26;
}

.account-dropdown > a + a {
    border-top: 1px solid #d8c7a9;
}

.account-dropdown a:hover {
    background: #f3eadb !important;
}

.account-dropdown .account-logout {
    color: #b33a32;
}

.account-dropdown .account-logout:hover {
    background: #fff4f4 !important;
}

/* =========================
   RESPONSIVE
   ========================= */

@media (max-width: 700px) {

    .site-header__top {
        padding: 0 1rem;
    }

    .site-header__bottom-wrapper {
        width: 100%;
        border-top: 1px solid #aaa398;
        border-bottom: 1px solid #aaa398;
    }

    .site-header__bottom {
        max-width: 1200px;
        margin: 0 auto;
        padding: 0.8rem 2rem;

        display: grid;
        grid-template-columns: 1fr auto 1fr;
        align-items: center;
    }

    .main-nav {
        justify-content: center;
        gap: 1.5rem;
    }

    .header-search {
        width: 100%;
        max-width: 500px;
    }

    .header-search input {
        flex: 1;
        width: auto;
    }
}

.account-menu-toggle,
.account-menu-toggle:hover,
.account-menu-toggle:focus,
.account-menu-toggle:active {
    background: transparent !important;
    color: #174f39 !important;
    border: none !important;
    box-shadow: none !important;
}

.account-menu-toggle:focus-visible {
    outline: 2px solid #174f39;
    outline-offset: 2px;
}
