/* ==========================================================================
   HAPPYPIP Custom Header — Replaces Astra Header Builder
   ========================================================================== */

/* ==========================================================================
   ANNOUNCEMENT BAR
   ========================================================================== */

.hp-header__announce {
    background: var(--bg-page);
    border-bottom: 1px solid var(--border-default);
    text-align: center;
    padding: var(--space-sm) var(--space-md);
}

.hp-header__announce-inner {
    font-family: var(--font-heading);
    font-size: var(--text-small);
    font-weight: 600;
    color: var(--green-dark);
    letter-spacing: 0.3px;
}

/* ==========================================================================
   PRIMARY HEADER
   ========================================================================== */

.hp-header {
    background: linear-gradient(180deg, #152C24 0%, #1E3A2F 100%);
    position: relative;
    z-index: 100;
    border-top: 2px solid transparent;
    border-image: linear-gradient(90deg, #F4C08A, #ECA96E, #E89858) 1;
    box-shadow: 0 -2px 12px rgba(236, 169, 110, 0.4);
}

.hp-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 var(--space-xl);
    height: 70px;
}

/* ── Sunset glow border (bottom) ── */
.hp-header__glow {
    height: 2px;
    background: linear-gradient(90deg, #F4C08A, #ECA96E, #E89858);
    box-shadow: 0 2px 12px rgba(236, 169, 110, 0.4), 0 4px 24px rgba(244, 192, 138, 0.2);
}

/* ==========================================================================
   LEFT: Nav (desktop) + Hamburger/Search (mobile)
   ========================================================================== */

.hp-header__left {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    flex: 1;
}

/* Hamburger — mobile only */
.hp-header__hamburger {
    display: none;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    cursor: pointer;
    padding: var(--space-xs);
    -webkit-tap-highlight-color: transparent;
}

.hp-header__hamburger .hp-ico {
    width: 24px;
    height: 24px;
    filter: brightness(0) invert(0.85);
}

/* Search mobile — mobile only, hidden on desktop */
.hp-header__icon.hp-header__icon--search-mobile,
.hp-header__icon--search-mobile {
    display: none !important;
}

/* Desktop nav */
.hp-header__nav {
    display: flex;
}

.hp-header__menu {
    display: flex;
    align-items: center;
    gap: var(--space-lg);
    list-style: none;
    margin: 0;
    padding: 0;
}

.hp-header__menu .menu-link {
    font-family: var(--font-heading);
    font-size: 18px;
    font-weight: 600;
    color: rgba(250, 246, 239, 0.75);
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 2px;
    display: flex;
    align-items: center;
    gap: 4px;
    transition: color 0.25s ease;
    padding: var(--space-sm) 0;
}

.hp-header__menu .menu-link:hover,
.hp-header__menu .menu-link:focus,
.hp-header__menu .menu-item > .menu-link:hover,
.hp-header__menu .menu-item > .menu-link:focus {
    color: #fff;
    background: none !important;
    box-shadow: none !important;
}

.hp-header__menu .menu-item.hp-mega-active .menu-link {
    color: #fff;
}

.hp-header__chevron {
    width: 14px;
    height: 14px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    transition: transform 0.25s ease;
}

.hp-header__menu .menu-item.hp-mega-active .hp-header__chevron {
    transform: rotate(180deg);
}

/* ==========================================================================
   CENTER: Logo
   ========================================================================== */

.hp-header__logo {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

.hp-header__logo a {
    display: flex;
    align-items: center;
}

.hp-header__logo-img {
    height: 70px !important;
    width: auto !important;
    max-height: 70px !important;
}

/* ==========================================================================
   RIGHT: Icons
   ========================================================================== */

.hp-header__right {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    flex: 1;
    justify-content: flex-end;
}

.hp-header__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    cursor: pointer;
    padding: var(--space-xs);
    position: relative;
    text-decoration: none;
    transition: transform 0.25s ease;
    -webkit-tap-highlight-color: transparent;
}

.hp-header__icon:hover {
    transform: scale(1.1);
}

.hp-header__icon .hp-ico {
    width: 22px;
    height: 22px;
    filter: brightness(0) invert(0.85);
    transition: filter 0.25s ease;
}

.hp-header__icon:hover .hp-ico {
    filter: brightness(0) invert(1);
}

/* Cart count badge */
.hp-header__cart-count {
    position: absolute;
    top: -2px;
    right: -4px;
    min-width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #ECA96E;
    color: #152C24;
    font-family: var(--font-heading);
    font-size: 10px;
    font-weight: 700;
    border-radius: 50%;
    line-height: 1;
    padding: 0 4px;
}

/* Points badge (header) */
.hp-header__points {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px 4px 6px;
    background: rgba(236, 169, 110, 0.15);
    border: 1px solid rgba(236, 169, 110, 0.3);
    border-radius: var(--radius-full);
    text-decoration: none;
    transition: background 0.2s ease, border-color 0.2s ease;
}

.hp-header__points:hover {
    background: rgba(236, 169, 110, 0.25);
    border-color: rgba(236, 169, 110, 0.5);
}

.hp-header__points .hp-ico {
    width: 16px;
    height: 16px;
    filter: brightness(0) invert(0.85);
}

.hp-header__points-count {
    font-family: var(--font-heading);
    font-size: 11px;
    font-weight: 700;
    color: rgba(250, 246, 239, 0.9);
    line-height: 1;
    white-space: nowrap;
}

/* ==========================================================================
   MOBILE (≤1024px)
   ========================================================================== */

@media (max-width: 1024px) {
    .hp-header__inner {
        padding: 0 var(--space-md);
        height: 56px;
    }

    /* Hide desktop nav */
    .hp-header__nav {
        display: none;
    }

    /* Hide desktop search */
    .hp-header__icon--search-desktop {
        display: none;
    }

    /* Show hamburger + mobile search */
    .hp-header__hamburger {
        display: flex;
    }

    .hp-header__icon.hp-header__icon--search-mobile,
    .hp-header__icon--search-mobile {
        display: flex !important;
        align-items: center;
        justify-content: center;
        background: none;
        border: none;
        cursor: pointer;
        padding: var(--space-xs);
    }

    .hp-header__icon--search-mobile .hp-ico {
        width: 20px;
        height: 20px;
        filter: brightness(0) invert(0.85);
    }

    /* Logo on tablet */
    .hp-header__logo-img {
        height: 52px !important;
        width: auto !important;
        object-fit: contain !important;
    }

    /* Icon sizes */
    .hp-header__icon .hp-ico {
        width: 20px;
        height: 20px;
    }

    /* Cart badge smaller */
    .hp-header__cart-count {
        min-width: 16px;
        height: 16px;
        font-size: 9px;
        top: -1px;
        right: -3px;
    }

    /* Points badge — compact on mobile */
    .hp-header__points {
        padding: 3px 8px 3px 5px;
        gap: 4px;
    }

    .hp-header__points .hp-ico {
        width: 14px;
        height: 14px;
    }

    .hp-header__points-count {
        font-size: 10px;
    }
}

/* ==========================================================================
   SMALL MOBILE (≤540px)
   ========================================================================== */

@media (max-width: 540px) {
    .hp-header__inner {
        padding: 0 var(--space-sm);
        height: 50px;
    }

    .hp-header__left,
    .hp-header__right {
        gap: var(--space-sm);
    }

    .hp-header__logo-img {
        height: 48px !important;
        width: auto !important;
        object-fit: contain !important;
    }

    .hp-header__hamburger .hp-ico {
        width: 22px;
        height: 22px;
    }
}
