/* ============================================================
   Anglo Aunty's Kitchen — Header Styles
   /assets/css/header.css
   ============================================================ */

/* ── Google Font ── */
@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&family=Oswald:wght@400;600&display=swap');

/* ── CSS Variables ── */
:root {
    --header-bg:      #111111;
    --header-height:  90px;
    --accent-red:     #cc0000;
    --text-white:     #ffffff;
    --text-active:    #cc0000;
    --logo-size:      80px;
    --transition:     0.25s ease;
    --font-nav:       'Oswald', sans-serif;
}

/* ── Reset / Base ── */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background: #1a1a1a;
    font-family: var(--font-nav);
}

/* ── Header Wrapper ── */
.site-header {
    background: var(--header-bg);
    position: sticky;
    top: 0;
    z-index: 1000;
    width: 100%;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.6);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: center;
    height: var(--header-height);
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 24px;
    position: relative;
}

/* ── Red accent line ── */
.header-accent-line {
    height: 3px;
    background: var(--accent-red);
    width: 100%;
}

/* ============================================================
   LOGO
   ============================================================ */
.logo-link {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin: 0 40px;
    text-decoration: none;
    transition: transform var(--transition), filter var(--transition);
}

.logo-img {
    width: var(--logo-size);
    height: var(--logo-size);
    object-fit: contain;
    border-radius: 50%;
    /* White circle glow for logo */
    filter: drop-shadow(0 0 6px rgba(255,255,255,0.15));
    transition: filter var(--transition), transform var(--transition);
}

.logo-link:hover .logo-img {
    transform: scale(1.06);
    filter: drop-shadow(0 0 10px rgba(204,0,0,0.4));
}

/* ============================================================
   DESKTOP NAV
   ============================================================ */
.nav-left,
.nav-right {
    flex: 1;
}

.nav-left { display: flex; justify-content: flex-end; }
.nav-right { display: flex; justify-content: flex-start; }

.nav-left ul,
.nav-right ul {
    display: flex;
    list-style: none;
    gap: 36px;
    align-items: center;
}

.nav-left a,
.nav-right a {
    color: var(--text-white);
    text-decoration: none;
    font-family: var(--font-nav);
    font-weight: 600;
    font-size: 1rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    position: relative;
    transition: color var(--transition);
}

/* Underline hover effect */
.nav-left a::after,
.nav-right a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-red);
    transition: width var(--transition);
}

.nav-left a:hover,
.nav-right a:hover {
    color: var(--accent-red);
}

.nav-left a:hover::after,
.nav-right a:hover::after {
    width: 100%;
}

/* Active page link */
.nav-left a.active,
.nav-right a.active {
    color: var(--accent-red);
}

.nav-left a.active::after,
.nav-right a.active::after {
    width: 100%;
}

/* ============================================================
   CART BUTTON
   ============================================================ */
.cart-btn {
    position: absolute;
    right: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-white);
    text-decoration: none;
    width: 44px;
    height: 44px;
    border: 2px solid #444;
    border-radius: 6px;
    transition: border-color var(--transition), color var(--transition), background var(--transition);
    position: relative;
}

/* Reposition as sibling — override above absolute with flex approach */
.header-inner .cart-btn {
    position: relative;
    right: auto;
    margin-left: auto;
}

.cart-btn:hover {
    border-color: var(--accent-red);
    color: var(--accent-red);
    background: rgba(204, 0, 0, 0.08);
}

.cart-count {
    position: absolute;
    top: -8px;
    right: -8px;
    background: var(--accent-red);
    color: #fff;
    font-size: 0.65rem;
    font-weight: 700;
    font-family: var(--font-nav);
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    pointer-events: none;
}

/* ============================================================
   HAMBURGER  (hidden on desktop)
   ============================================================ */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 26px;
    height: 20px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    margin-right: auto;
    z-index: 1100;
    flex-shrink: 0;
}

.hamburger span {
    display: block;
    height: 2px;
    width: 100%;
    background: var(--text-white);
    border-radius: 2px;
    transition: transform 0.35s ease, opacity 0.25s ease, width 0.25s ease;
    transform-origin: center;
}

/* Animated X state */
.hamburger.open span:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
}
.hamburger.open span:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}
.hamburger.open span:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
}

/* ============================================================
   MOBILE MENU
   ============================================================ */
.mobile-menu {
    display: none;
    background: #111;
    overflow: hidden;
    max-height: 0;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-menu.open {
    max-height: 400px;
}

.mobile-menu ul {
    list-style: none;
    padding: 12px 0 20px;
    border-top: 1px solid #222;
}

.mobile-menu ul li a {
    display: block;
    padding: 14px 28px;
    color: var(--text-white);
    text-decoration: none;
    font-family: var(--font-nav);
    font-weight: 600;
    font-size: 1.1rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    transition: color var(--transition), background var(--transition), padding-left var(--transition);
    border-left: 3px solid transparent;
}

.mobile-menu ul li a:hover,
.mobile-menu ul li a.active {
    color: var(--accent-red);
    background: rgba(204, 0, 0, 0.06);
    padding-left: 36px;
    border-left-color: var(--accent-red);
}

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

/* Tablet: shrink gaps */
@media (max-width: 900px) {
    :root {
        --logo-size: 70px;
        --header-height: 80px;
    }

    .nav-left ul,
    .nav-right ul {
        gap: 20px;
    }

    .nav-left a,
    .nav-right a {
        font-size: 0.88rem;
    }

    .logo-link {
        margin: 0 20px;
    }
}

/* Mobile: switch to hamburger layout */
@media (max-width: 640px) {
    :root {
        --logo-size: 62px;
        --header-height: 70px;
    }

    .nav-left,
    .nav-right {
        display: none;
    }

    .hamburger {
        display: flex;
    }

    .mobile-menu {
        display: block;
    }

    .header-inner {
        justify-content: space-between;
        padding: 0 16px;
    }

    /* On mobile logo is centred between hamburger & cart */
    .logo-link {
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
        margin: 0;
    }

    .header-inner .cart-btn {
        margin-left: 0;
    }
}