/* =====================================================
   HEADER BASE
===================================================== */

.site-header {
    --header-green: #103d34;
    --header-gold: #e7cf8c;

    position: relative;
    z-index: 1000;
    overflow: visible;
    background: linear-gradient(
        135deg,
        #103d34 0%,
        #0b342c 55%,
        #123f35 100%
    );
}

.site-header .site-header-inner {
    width: 100%;
    max-width: 1440px;
    margin: 0 auto;
    padding: 12px 24px;
    align-items: center;
}

.site-header .site-logo {
    display: block;
    margin: 0;
    text-decoration: none;
}

.site-header .site-logo img {
    display: block;
    width: 92px;
    height: 64px;
    padding: 2px;
    border-radius: 4px;
    background: #ffffff;
    object-fit: contain;
}

.site-header [hidden] {
    display: none !important;
}

.site-header a:focus-visible,
.site-header button:focus-visible,
.site-header [role="button"]:focus-visible {
    outline: 2px solid var(--header-gold);
    outline-offset: 3px;
}

/* =====================================================
   PRIMARY NAVIGATION
===================================================== */

.site-header .makoro-primary-nav {
    display: flex;
    justify-content: center;
    align-items: stretch;
    margin: 0;
}

.site-header .makoro-primary-nav > a,
.site-header .makoro-category-toggle {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 12px 0;
    border: 0;
    background: transparent;
    color: #ffffff;
    font: 600 15px/1.4 Arial, sans-serif;
    white-space: nowrap;
    text-decoration: none;
    cursor: pointer;
    transition: color 0.2s ease;
}

.site-header .makoro-primary-nav > a:hover,
.site-header .makoro-category-toggle:hover {
    color: var(--header-gold);
}

.site-header .makoro-category-toggle:focus:not(:focus-visible) {
    outline: none;
    box-shadow: none;
}

.site-header .makoro-nav-toggle {
    display: none;
}

/* =====================================================
   CATEGORY DROPDOWN
===================================================== */

.site-header .makoro-category-menu {
    position: relative;
    display: flex;
    align-items: center;
}

.site-header .makoro-category-toggle {
    gap: 7px;
}

.site-header .makoro-category-toggle i {
    font-size: 10px;
    transition: transform 0.2s ease;
}

.site-header .makoro-category-toggle[aria-expanded="true"] i {
    transform: rotate(180deg);
}

.site-header .makoro-category-links {
    position: absolute;
    top: calc(100% + 12px);
    left: 0;
    z-index: 1500;
    width: 240px;
    max-height: min(420px, 65vh);
    margin: 0;
    padding: 8px;
    overflow-y: auto;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 0 0 12px 12px;
    background: #103d34;
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
}

/* Continuous hover path from button to dropdown */
.site-header .makoro-category-menu::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    height: 12px;
}

.site-header .makoro-category-links a {
    display: block;
    margin: 0;
    padding: 11px 14px;
    border-radius: 7px;
    color: #ffffff;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.5;
    text-decoration: none;
    overflow-wrap: anywhere;
}

.site-header .makoro-category-links a:hover,
.site-header .makoro-category-links a:focus-visible {
    color: var(--header-gold);
    background: rgba(255, 255, 255, 0.08);
}

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

.site-header .smart-search-form {
    position: relative;
    width: 100%;
    margin: 0;
}

.site-header .smart-search-input {
    width: 100%;
    height: 42px;
    margin: 0;
    padding: 0 16px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 999px;
    background: #fafbf9;
    color: #193b33;
    font-size: 13px;
    outline: none;
}

.site-header .smart-search-input:focus {
    border-color: #c6a755;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(198, 167, 85, 0.14);
}

.site-header .search-suggestions {
    top: calc(100% + 8px);
}

.site-header .mobile-search-wrap {
    display: none;
}

/* =====================================================
   ACCOUNT AND CART
===================================================== */

.site-header .header-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex: 0 0 auto;
    gap: 14px;
}

.site-header .account-menu-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.site-header .account-dropdown {
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
    left: auto;
    width: 270px;
    max-width: calc(100vw - 32px);
    z-index: 1600;
}

/* =====================================================
   DESKTOP
   Equal side columns keep menu in the centre
===================================================== */

@media (min-width: 1200px) {
    .site-header .site-header-inner {
        display: grid;
        grid-template-columns:
            minmax(0, 1fr)
            auto
            minmax(0, 1fr);
        gap: 20px;
    }

    .site-header .site-logo {
        grid-column: 1;
        grid-row: 1;
        justify-self: start;
    }

    .site-header .makoro-navigation {
        display: contents;
    }

    .site-header .makoro-primary-nav {
        grid-column: 2;
        grid-row: 1;
        align-self: stretch;
        gap: clamp(20px, 2.3vw, 35px);
    }

    .site-header .makoro-header-tools {
        display: flex;
        grid-column: 3;
        grid-row: 1;
        align-items: center;
        justify-content: flex-end;
        gap: 14px;
        min-width: 0;
    }

    .site-header .desktop-search-wrap {
        display: block;
        flex: 0 1 240px;
        width: 100%;
        min-width: 120px;
        max-width: 240px;
    }
}

/* =====================================================
   MOBILE AND TABLET
===================================================== */

@media (max-width: 1199px) {
    .site-header .site-header-inner {
        display: flex;
        flex-wrap: wrap;
        justify-content: space-between;
        gap: 0;
        padding: 12px 16px;
    }

    .site-header .site-logo img {
        width: 82px;
        height: 58px;
    }

    /* Hamburger button */
    .site-header .makoro-nav-toggle {
        position: relative;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 5px;
        flex: 0 0 44px;
        width: 44px;
        height: 44px;
        margin-left: auto;
        padding: 10px;
        border: 1px solid rgba(255, 255, 255, 0.35);
        border-radius: 8px;
        background: transparent;
        cursor: pointer;
    }

    .site-header .makoro-nav-toggle span {
        display: block;
        width: 22px;
        height: 2px;
        background: #ffffff;
        transition:
            transform 0.25s ease,
            opacity 0.2s ease;
    }

    .site-header .makoro-nav-toggle[aria-expanded="true"] span:nth-child(1) {
        transform: translateY(7px) rotate(45deg);
    }

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

    .site-header .makoro-nav-toggle[aria-expanded="true"] span:nth-child(3) {
        transform: translateY(-7px) rotate(-45deg);
    }

    /* Closed panel */
    .site-header #makoroNavigation {
        display: none;
        flex: 0 0 100%;
        width: 100%;
        min-width: 0;
        margin: 0;
    }

    /* Open panel */
    .site-header #makoroNavigation.is-open {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        max-height: 75vh;
        max-height: 75dvh;
        padding-bottom: 12px;
        overflow-y: auto;
        animation: makoroMenuReveal 0.25s ease both;
    }

    .site-header .makoro-primary-nav {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        justify-content: flex-start;
        width: 100%;
        gap: 0;
        margin: 14px 0 0;
        padding: 8px 0;
        border-top: 1px solid rgba(255, 255, 255, 0.2);
    }

    .site-header .makoro-primary-nav > a,
    .site-header .makoro-category-toggle {
        display: flex;
        align-items: center;
        width: 100%;
        min-height: 46px;
        padding: 12px 8px;
        text-align: left;
    }

    .site-header .makoro-category-menu {
        display: block;
    }

    .site-header .makoro-category-menu::after {
        display: none;
    }

    .site-header .makoro-category-toggle {
        justify-content: space-between;
    }

    .site-header .makoro-category-links {
        position: static;
        width: 100%;
        max-height: 240px;
        margin-bottom: 8px;
        border-radius: 8px;
        background: rgba(255, 255, 255, 0.045);
        box-shadow: none;
    }

    .site-header .makoro-header-tools {
        display: contents;
    }

    .site-header .desktop-search-wrap {
        display: none;
    }

    /* Mobile search before account/cart */
    .site-header .mobile-search-wrap {
        display: block;
        order: 2;
        width: 100%;
        margin: 8px 0 0;
    }

    .site-header .smart-search-input {
        height: 44px;
        font-size: 14px;
    }

    /* Suggestions remain inside scrollable panel */
    .site-header .mobile-search-wrap .search-suggestions {
        position: static;
        max-height: 230px;
        margin-top: 8px;
    }

    .site-header .header-actions {
        display: flex;
        order: 3;
        align-items: flex-start;
        justify-content: flex-end;
        width: 100%;
        gap: 14px;
        padding: 14px 4px 0;
    }

    /* Account dropdown expands inside the panel */
    .site-header .account-menu-wrap {
        display: flex;
        flex-direction: column;
        align-items: flex-end;
        min-width: 0;
    }

    .site-header .account-dropdown {
        position: static;
        width: min(270px, calc(100vw - 100px));
        max-width: 100%;
        margin-top: 12px;
    }

    .site-header .account-dropdown::before {
        display: none;
    }
}

/* Small phones */
@media (max-width: 480px) {
    .site-header .site-header-inner {
        padding: 10px 12px;
    }

    .site-header .site-logo img {
        width: 78px;
        height: 56px;
    }
}

/* Opening animation */
@keyframes makoroMenuReveal {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Reduced-motion support */
@media (prefers-reduced-motion: reduce) {
    .site-header #makoroNavigation.is-open {
        animation: none;
    }

    .site-header .makoro-nav-toggle span,
    .site-header .makoro-category-toggle i {
        transition: none;
    }
}