/* Custom Header Styling */
.custom-site-header {
    background-color: var(--color-bg-cream);
    position: sticky;
    top: 0;
    width: 100%;
    z-index: 1000;
    transition: all var(--transition-speed);
}

.custom-site-header.is-sticky {
    background: rgba(253, 253, 250, 0.85); /* rgba value of --color-bg-cream */
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    border-bottom: 1px solid rgba(4, 92, 47, 0.1);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1rem;
    padding-bottom: 1rem;
    transition: padding var(--transition-speed);
}

.is-sticky .header-container {
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
}

/* Left: Logo */
.header-left {
    display: flex;
    align-items: center;
}
.header-left .site-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--color-primary-green);
    text-decoration: none;
}
.header-left img {
    max-height: 50px;
    width: auto;
}

/* Center: Navigation */
.desktop-nav {
    display: none !important; /* Hidden on mobile by default */
}
@media (min-width: 992px) {
    .desktop-nav {
        display: block !important;
    }
}
.primary-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 1.5rem;
    align-items: center;
}
.primary-nav a {
    text-decoration: none;
    color: var(--color-text-dark);
    font-weight: 500;
    font-size: var(--font-size-base);
    position: relative;
    padding-bottom: 4px;
    transition: color var(--transition-speed);
}
.primary-nav a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: var(--color-primary-green);
    transition: width var(--transition-speed);
}
.primary-nav a:hover {
    color: var(--color-primary-green);
}
.primary-nav a:hover::after {
    width: 100%;
}

/* Dropdown Menu */
.has-dropdown {
    position: relative;
}
.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background-color: var(--color-white);
    min-width: 200px;
    display: flex;
    flex-direction: column;
    gap: 0 !important;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all var(--transition-speed);
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    border-radius: var(--border-radius-card);
    padding: 0.5rem 0 !important;
    z-index: 10;
}
.has-dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.dropdown-menu li {
    width: 100%;
}
.dropdown-menu a {
    display: block;
    padding: 0.75rem 1.5rem;
    width: 100%;
    box-sizing: border-box;
}
.dropdown-menu a::after {
    display: none; /* No underline in dropdown */
}
.dropdown-menu a:hover {
    background-color: rgba(4, 92, 47, 0.05); /* very light green */
    color: var(--color-primary-green);
}

/* Right: Icons */
.header-right {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}
.icon-link {
    color: var(--color-text-dark);
    transition: color var(--transition-speed);
    display: flex;
    align-items: center;
}
.icon-link:hover {
    color: var(--color-primary-green);
}
.mini-cart-icon {
    position: relative;
}
.cart-badge {
    position: absolute;
    top: -5px;
    right: -8px;
    background-color: var(--color-secondary-yellow);
    color: var(--color-text-dark);
    font-size: 0.75rem;
    font-weight: 700;
    height: 18px;
    min-width: 18px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--color-text-dark);
    padding: 0;
    display: flex !important;
    align-items: center;
    margin-left: 10px;
}
@media (min-width: 992px) {
    .mobile-menu-toggle {
        display: none !important;
    }
}

/* Mobile Drawer */
.mobile-drawer {
    position: fixed;
    top: 0;
    right: -100%;
    width: 300px;
    max-width: 80%;
    height: 100vh;
    background-color: var(--color-bg-cream);
    z-index: 2000;
    box-shadow: -5px 0 30px rgba(0,0,0,0.1);
    transition: right 0.4s ease-in-out;
    display: flex;
    flex-direction: column;
}
.mobile-drawer.active {
    right: 0;
}
.drawer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid #eee;
}
.drawer-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--color-primary-green);
}
.drawer-close {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--color-text-dark);
    padding: 0;
}
.mobile-nav {
    padding: 1.5rem;
    overflow-y: auto;
}
.mobile-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.mobile-nav a, .mobile-dropdown-toggle {
    text-decoration: none;
    color: var(--color-text-dark);
    font-size: 1.1rem;
    font-weight: 600;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
}
.mobile-dropdown-menu {
    display: none; /* Hidden initially */
    padding-left: 1rem !important;
    margin-top: 1rem !important;
    border-left: 2px solid rgba(4, 92, 47, 0.2);
}
.mobile-dropdown-menu.active {
    display: flex; /* Shown when toggled */
    flex-direction: column;
    gap: 0.5rem;
}
.mobile-dropdown-menu a {
    font-size: 1rem;
    font-weight: 500;
}
.mobile-drawer-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0,0,0,0.5);
    z-index: 1500;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s ease-in-out;
}
.mobile-drawer-overlay.active {
    opacity: 1;
    visibility: visible;
}
