/* --- GLOBAL VARIABLES (Based on your Color System) --- */
:root {
    --organic-cream: #F5F1E8;
    --deep-forest-green: #1F3D2B;
    --harvest-mustard: #D4A017;
    --s-8: 8px;
    --s-16: 16px;
    --s-24: 24px;
    --s-32: 32px;
    --shadow-soft: 0 4px 20px rgba(31, 61, 43, 0.08);
}

/* --- HEADER BASE (Sticky & Top-level) --- */
header {
    background-color: var(--organic-cream);
    height: 80px;
    width: 100%;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 9999; /* Stays above everything */
    display: flex;
    align-items: center;
    border-bottom: 1px solid rgba(31, 61, 43, 0.1);
    box-sizing: border-box;
}

body {
    padding-top: 80px; /* Offsets content so it's not hidden under header */
}

.navbar {
    width: 100%;
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 var(--s-32);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* --- LOGO --- */
.logo img {
    display: block;
    object-fit: contain;
}

/* --- NAVIGATION LINKS (Desktop) --- */
.nav-links {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 40px; /* Spacious spacing to avoid 'jampacked' look */
}

.nav-links li a {
    text-decoration: none;
    color: var(--deep-forest-green);
    font-weight: 600;
    font-size: 16px;
    transition: 0.3s ease;
    position: relative;
}

.nav-links li a:hover {
    color: var(--harvest-mustard);
}

/* --- ICONS & BADGES --- */
.nav-icon {
    position: relative;
    display: inline-flex;
    align-items: center;
    margin-left: var(--s-24);
}

.nav-icon img {
    width: 26px;
    height: 26px;
    /* Forces icons to match Deep Forest Green #1F3D2B */
    filter: invert(18%) sepia(16%) saturate(1415%) hue-rotate(94deg) brightness(96%) contrast(92%);
}

.cart-counter, #notif-counter {
    position: absolute;
    top: -5px;
    right: -8px;
    background-color: var(--harvest-mustard);
    color: var(--deep-forest-green);
    font-size: 10px;
    font-weight: 800;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--organic-cream); /* Cutout effect */
    z-index: 2;
}

/* --- HAMBURGER MENU (Visibility Fix) --- */
.menu-toggle {
    display: none; /* Hidden on Desktop */
    flex-direction: column;
    justify-content: space-between;
    width: 28px;
    height: 20px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    margin-left: 20px;
}

.bar {
    display: block; /* Required for visibility */
    width: 100%;
    height: 3px;
    background-color: var(--deep-forest-green); /* The Forest Green color */
    border-radius: 10px;
    transition: 0.3s ease;
}

/* --- RESPONSIVE MOBILE VIEW --- */
@media (max-width: 992px) {
    header {
        height: 60px;
        padding: 0 var(--s-16);
    }
    
    body { padding-top: 60px; }

    .menu-toggle {
        display: flex; /* Hamburger becomes visible */
    }

    .nav-links {
        display: none; /* Hidden until .active class added by JS */
        flex-direction: column;
        position: absolute;
        top: 60px;
        left: 0;
        width: 100%;
        background-color: var(--organic-cream);
        padding: 40px 0;
        gap: 25px;
        text-align: center;
        border-bottom: 3px solid var(--harvest-mustard);
        box-shadow: 0 10px 20px rgba(0,0,0,0.05);
    }

    .nav-links.active {
        display: flex;
    }
}

/* GLOBAL FOOTER COMPONENTS (MOBILE-FIRST) */
.em-footer {
    background-color: #1F3D2B; /* var(--deep-forest) */
    color: rgba(245, 241, 232, 0.8); /* var(--text-light) */
    padding: 60px 0 30px;
    width: 100%;
    overflow: hidden;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

.em-footer *,
.em-footer *::before,
.em-footer *::after {
    box-sizing: border-box;
}

.em-footer-top {
    display: flex;
    flex-direction: column;
    gap: 40px;
    margin-bottom: 40px;
    border-bottom: 1px solid rgba(245, 241, 232, 0.15);
    padding-bottom: 40px;
}

.em-footer-brand {
    word-wrap: break-word;
    max-width: 100%;
}

.em-footer-brand h2 {
    color: #F5F1E8; /* var(--organic-cream) */
    font-size: 1.5rem;
    font-weight: 800;
    margin: 0 0 8px 0;
}

.em-footer-brand p {
    font-size: 1rem;
    margin: 0;
}

.em-footer-links-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 32px 16px;
    width: 100%;
}

.em-footer-col {
    min-width: 0;
}

.em-footer-col h4 {
    color: #F5F1E8; /* var(--organic-cream) */
    margin: 0 0 16px 0;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    word-wrap: break-word;
}

.em-footer-col ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.em-footer-col li {
    margin-bottom: 10px;
}

.em-footer-col a {
    color: inherit;
    text-decoration: none;
    font-size: 0.9rem;
    display: block;
    word-wrap: break-word;
}

.em-footer-bottom {
    text-align: center;
    font-size: 0.85rem;
    color: rgba(245, 241, 232, 0.5);
    word-wrap: break-word;
}

/* DESKTOP FOOTER UPGRADE */
@media (min-width: 768px) {
    .em-footer-top {
        flex-direction: row;
        justify-content: space-between;
        align-items: flex-start;
    }

    .em-footer-brand {
        flex: 1.2;
    }

    .em-footer-links-container {
        flex: 3;
        grid-template-columns: repeat(4, 1fr);
        gap: 32px;
    }

    .em-footer-col h4 {
        margin-bottom: 24px;
    }

    .em-footer-col a:hover {
        color: #D4A017; /* var(--harvest-mustard) */
    }
}
