/* Shared header and primary navigation styles. */

.site-header {
    position: relative;
    z-index: 100;
    background: rgba(255, 250, 242, 0.96);
    border-bottom: 1px solid #5a3b211a;
    color: var(--color-text);
}

.site-header .navbar {
    min-height: 4.75rem;
}

.announcement-bar {
    padding: 0.45rem 1rem;
    background: var(--color-dark);
    color: #f8e8dc;
    font-size: 0.77rem;
    letter-spacing: 0.01em;
}

.announcement-bar span { margin-inline: 0.45rem; color: var(--color-gold); }
.announcement-bar strong { color: var(--color-gold); }

.brand {
    display: inline-flex;
    align-items: center;
    gap: 0.7rem;
    color: var(--color-text);
    font-family: "Baloo 2", "Nunito Sans", sans-serif;
    font-size: 27px;
    font-weight: 750;
    text-decoration: none;
}

.brand:hover {
    color: var(--color-text);
}

.brand__wordmark {
    font-size: 36px;
    font-weight: 900;
    letter-spacing: -0.06em;
}

.brand__wordmark span { color: var(--color-brand); }

.site-header .nav-link {
    color: var(--color-text);
    font-size: 16px;
    font-weight: 800;
}

.site-header .nav-link:hover,
.site-header .nav-link.active {
    color: var(--color-brand-dark);
}

.site-header__nav {
    margin-left: 2rem;
}

.site-header__actions {
    display: flex;
}

.mobile-menu-toggle {
    color: var(--brown-dark);
    cursor: pointer;
    background: linear-gradient(180deg, #fff, #fff7eb);
    border: 1px solid #eadbc8;
    border-radius: 999px;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 4px;
    width: 38px;
    height: 38px;
    display: none;
    box-shadow: 0 8px 18px #5a3b2117;
}

.mobile-menu-toggle span {
    background: currentColor;
    border-radius: 99px;
    width: 15px;
    height: 2px;
    transition: transform 0.2s, opacity 0.2s;
    display: block;
}

.site-header.menu-open .mobile-menu-toggle span:first-child {
    transform: translateY(6px) rotate(45deg);
}

.site-header.menu-open .mobile-menu-toggle span:nth-child(2) {
    opacity: 0;
}

.site-header.menu-open .mobile-menu-toggle span:last-child {
    transform: translateY(-6px) rotate(-45deg);
}

@media (max-width: 991.98px) {
    .site-header .navbar-collapse {
        padding: 1rem 0 1.25rem;
    }

    .site-header__actions {
        align-items: stretch;
        flex-direction: column;
        margin-top: 0.75rem;
    }
}

/* Public imported-page header. */
.announcement {
    min-height: 38px;
    padding: 8px 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    background: var(--brown-dark);
    color: #fff;
    font-size: 14px;
    letter-spacing: 0.02em;
}

.announcement strong {
    color: var(--amber);
}

.announcement-dot {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--orange);
}

.public-header {
    position: sticky;
    top: 0;
    z-index: 50;
    height: 78px;
    padding: 0 clamp(22px, 5vw, 78px);
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 36px;
    background: #fffaf3f0;
    border-bottom: 1px solid #5a3b211a;
    color: var(--brown-dark);
    -webkit-backdrop-filter: blur(16px);
    backdrop-filter: blur(16px);
}

.public-header .brand {
    justify-self: start;
    width: fit-content;
    color: var(--brown-dark);
    font-size: 27px;
    font-weight: 800;
    line-height: 1;
}

.public-header .brand > span:last-child > span {
    color: var(--orange);
}

.public-header nav {
    justify-self: center;
    display: flex;
    align-items: center;
    gap: 32px;
}

.public-header nav a,
.public-header .text-link {
    font-size: 16px;
    font-weight: 800;
    color: var(--brown-dark);
    text-decoration: none;
    transition: color 0.2s;
}

.public-header .button,
.public-header .button:hover,
.public-header .button:focus {
    text-decoration: none;
}

.public-header nav a:hover,
.public-header nav a[aria-current="page"],
.public-header .text-link:hover {
    /* color: var(--orange-dark); */
}

.public-header .header-actions {
    justify-self: end;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 22px;
}

.public-header .header-cart {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
    width: 2.65rem;
    height: 2.65rem;
    flex: 0 0 2.65rem;
    border: 1px solid #eadbc8;
    border-radius: 0.8rem;
    background: #fffaf5;
    color: var(--brown-dark);
    font-size: 1rem;
    text-decoration: none;
    transition: border-color .2s, background .2s, transform .2s;
}

.public-header .header-cart:hover { border-color: var(--orange); background: #fff1e6; color: var(--brown-dark); transform: translateY(-1px); }
.public-header .header-cart b { position: absolute; top: -0.42rem; right: -0.42rem; display: grid; min-width: 1.3rem; height: 1.3rem; padding: 0 0.22rem; place-items: center; border: 2px solid #fffaf5; border-radius: 999px; background: var(--orange); color: #fff; font-size: .64rem; font-weight: 900; line-height: 1; }

.public-header .public-menu-toggle {
    justify-self: end;
}

@media (max-width: 1080px) {
    .public-header {
        grid-template-columns: 1fr auto;
        align-content: center;
        gap: 14px;
    }

    .public-header nav,
    .public-header .header-actions {
        display: none;
    }

    .public-header .public-menu-toggle {
        display: flex;
    }

    .public-header.menu-open {
        height: auto;
        min-height: 78px;
        padding-top: 14px;
        padding-bottom: 14px;
    }

    .public-header.menu-open nav,
    .public-header.menu-open .header-actions {
        grid-column: 1 / -1;
        width: 100%;
        background: #fff;
        border: 1px solid var(--line);
        border-radius: 14px;
        box-shadow: 0 14px 34px #5a3b2114;
    }

    .public-header.menu-open nav {
        justify-self: stretch;
        display: grid;
        gap: 0;
        margin-top: 6px;
        overflow: hidden;
    }

    .public-header.menu-open nav a {
        border-bottom: 1px solid #eadbc8a8;
        padding: 15px 16px;
    }

    .public-header.menu-open nav a:last-child {
        border-bottom: 0;
    }

    .public-header.menu-open .header-actions {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        align-items: stretch;
        gap: 10px;
        padding: 12px;
    }

    .public-header.menu-open .header-actions::before,
    .public-header.menu-open .header-actions .text-link::before,
    .public-header.menu-open .header-actions .button-small::before {
        content: none;
        display: none;
    }

    .public-header.menu-open .header-actions .text-link,
    .public-header.menu-open .header-actions .header-cart,
    .public-header.menu-open .header-actions .button-small {
        width: 100%;
        min-height: 44px;
        font-size: 15px;
        justify-content: center;
    }

    .public-header.menu-open .header-actions .text-link {
        display: flex;
        align-items: center;
        padding: 0 12px;
        background: #fff8ef;
        border: 1px solid var(--line);
        border-radius: 11px;
    }

    .public-header.menu-open .header-actions .header-cart { justify-content: center; }

    .public-header.menu-open .header-actions .button-small svg {
        display: block;
        width: 18px;
        height: 18px;
    }
}

@media (max-width: 540px) {
    .public-header {
        padding-left: 18px;
        padding-right: 18px;
    }

    .public-header .brand {
        font-size: 23px;
    }

    .public-header.menu-open .header-actions {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 820px) {
    .announcement > span:first-child,
    .announcement-dot {
        display: none;
    }
}
