/**
 * Heritage Harvests - Enhanced Header Styles
 * A premium, nature-inspired header for organic products
 */

/* ===== Google Fonts Import ===== */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&display=swap');

/* ===== CSS Custom Properties ===== */
:root {
    /* Brand Colors - Organic Green Palette */
    --hh-primary: #2E7D32;
    /* Forest Green */
    --hh-primary-dark: #1B5E20;
    /* Dark Forest */
    --hh-primary-light: #4CAF50;
    /* Leaf Green */
    --hh-accent: #8BC34A;
    /* Light Lime */
    --hh-secondary: #33691E;
    /* Olive Green */

    /* Neutral Colors */
    --hh-white: #FFFFFF;
    --hh-cream: #F9FBF7;
    --hh-gray-light: #E8F5E9;
    --hh-gray: #607D5F;
    --hh-text: #1A1A1A;
    --hh-text-light: #5D6B5E;

    /* Effects */
    --hh-shadow-soft: 0 4px 20px rgba(46, 125, 50, 0.08);
    --hh-shadow-medium: 0 8px 32px rgba(46, 125, 50, 0.12);
    --hh-shadow-strong: 0 12px 48px rgba(46, 125, 50, 0.16);
    --hh-glass-bg: rgba(255, 255, 255, 0.95);
    --hh-glass-border: rgba(46, 125, 50, 0.1);

    /* Transitions */
    --hh-transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --hh-transition-smooth: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --hh-transition-bounce: 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ===== Top Announcement Bar ===== */
.hh-announcement-bar {
    background: linear-gradient(135deg, var(--hh-primary-dark) 0%, var(--hh-primary) 50%, var(--hh-secondary) 100%);
    color: var(--hh-white);
    text-align: center;
    padding: 10px 20px;
    font-family: 'Outfit', sans-serif;
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.3px;
    position: relative;
    overflow: hidden;
}

.hh-announcement-bar::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    animation: shimmer 3s infinite;
}

@keyframes shimmer {
    0% {
        left: -100%;
    }

    100% {
        left: 100%;
    }
}

.hh-announcement-bar a {
    color: var(--hh-accent);
    text-decoration: underline;
    text-underline-offset: 2px;
    transition: var(--hh-transition-fast);
}

.hh-announcement-bar a:hover {
    color: var(--hh-white);
}

.hh-announcement-bar .hh-close-bar {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: var(--hh-white);
    cursor: pointer;
    opacity: 0.7;
    transition: var(--hh-transition-fast);
    font-size: 18px;
    padding: 5px;
}

.hh-announcement-bar .hh-close-bar:hover {
    opacity: 1;
}

/* ===== Main Header ===== */
.site-header.hh-header {
    background: var(--hh-glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--hh-glass-border);
    padding: 0;
    position: relative;
    z-index: 1000;
    transition: var(--hh-transition-smooth);
    font-family: 'Outfit', sans-serif;
}

.site-header.hh-header.is-sticky {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    box-shadow: var(--hh-shadow-medium);
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }

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

/* ===== Header Inner Container ===== */
.hh-header .hh-header-inner {
    max-width: 1400px;
    margin: 0 auto;
    padding: 15px 30px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
}

/* ===== Logo Styling ===== */
.hh-header .hh-logo-wrapper {
    flex-shrink: 0;
}

.hh-header .hh-logo-wrapper a {
    display: block;
    transition: var(--hh-transition-smooth);
}

.hh-header .hh-logo-wrapper a:hover {
    transform: scale(1.02);
}

.hh-header .hh-logo-wrapper img {
    height: 70px;
    width: auto;
    object-fit: contain;
    transition: var(--hh-transition-smooth);
}

/* ===== Navigation ===== */
.hh-header .hh-nav-wrapper {
    flex: 1;
    display: flex;
    justify-content: center;
}

.hh-header .hh-nav {
    display: flex;
    align-items: center;
    gap: 5px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.hh-header .hh-nav>li {
    position: relative;
}

.hh-header .hh-nav>li>a {
    display: flex;
    align-items: center;
    padding: 12px 18px;
    font-size: 15px;
    font-weight: 500;
    color: var(--hh-text);
    text-decoration: none;
    border-radius: 8px;
    transition: var(--hh-transition-smooth);
    position: relative;
    letter-spacing: 0.2px;
}

.hh-header .hh-nav>li>a::after {
    content: '';
    position: absolute;
    bottom: 8px;
    left: 18px;
    right: 18px;
    height: 2px;
    background: linear-gradient(90deg, var(--hh-primary), var(--hh-accent));
    border-radius: 2px;
    transform: scaleX(0);
    transform-origin: center;
    transition: var(--hh-transition-smooth);
}

.hh-header .hh-nav>li>a:hover,
.hh-header .hh-nav>li.current-menu-item>a {
    color: var(--hh-primary);
    background: var(--hh-gray-light);
}

.hh-header .hh-nav>li>a:hover::after,
.hh-header .hh-nav>li.current-menu-item>a::after {
    transform: scaleX(1);
}

/* Dropdown Arrow */
.hh-header .hh-nav>li.menu-item-has-children>a::before {
    content: '';
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 5px solid currentColor;
    margin-left: 8px;
    transition: var(--hh-transition-fast);
}

.hh-header .hh-nav>li.menu-item-has-children:hover>a::before {
    transform: rotate(180deg);
}

/* ===== Dropdown Menu ===== */
.hh-header .hh-nav>li>.sub-menu {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    min-width: 220px;
    background: var(--hh-white);
    border-radius: 12px;
    box-shadow: var(--hh-shadow-strong);
    padding: 10px;
    opacity: 0;
    visibility: hidden;
    transition: var(--hh-transition-smooth);
    list-style: none;
    border: 1px solid var(--hh-glass-border);
    z-index: 100;
}

.hh-header .hh-nav>li:hover>.sub-menu {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.hh-header .hh-nav .sub-menu li {
    list-style: none;
}

.hh-header .hh-nav .sub-menu li a {
    display: block;
    padding: 12px 16px;
    font-size: 14px;
    font-weight: 500;
    color: var(--hh-text);
    text-decoration: none;
    border-radius: 8px;
    transition: var(--hh-transition-fast);
}

.hh-header .hh-nav .sub-menu li a:hover {
    background: var(--hh-gray-light);
    color: var(--hh-primary);
    padding-left: 20px;
}

/* ===== Header Actions (Cart, Search, Account) ===== */
.hh-header .hh-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.hh-header .hh-action-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: transparent;
    border: none;
    color: var(--hh-text);
    cursor: pointer;
    transition: var(--hh-transition-smooth);
    position: relative;
    text-decoration: none;
}

.hh-header .hh-action-btn:hover {
    background: var(--hh-gray-light);
    color: var(--hh-primary);
    transform: scale(1.05);
}

.hh-header .hh-action-btn i {
    font-size: 24px;
    line-height: 1;
    transition: var(--hh-transition-smooth);
}

/* Removed specific search btn size overrides as we want consistency now */

/* Cart Badge */
.hh-header .hh-cart-count {
    position: absolute;
    top: 0;
    right: 0;
    min-width: 18px;
    height: 18px;
    background: linear-gradient(135deg, var(--hh-primary), var(--hh-accent));
    color: var(--hh-white);
    font-size: 10px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(46, 125, 50, 0.3);
    animation: popIn 0.3s ease;
}

@keyframes popIn {
    0% {
        transform: scale(0);
    }

    50% {
        transform: scale(1.2);
    }

    100% {
        transform: scale(1);
    }
}

/* Shop Now CTA Button */
.hh-header .hh-cta-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: linear-gradient(135deg, var(--hh-primary) 0%, var(--hh-primary-dark) 100%);
    color: var(--hh-white);
    font-family: 'Outfit', sans-serif;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    border-radius: 50px;
    border: none;
    cursor: pointer;
    transition: var(--hh-transition-smooth);
    box-shadow: 0 4px 15px rgba(46, 125, 50, 0.25);
    letter-spacing: 0.3px;
}

.hh-header .hh-cta-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(46, 125, 50, 0.35);
    background: linear-gradient(135deg, var(--hh-primary-light) 0%, var(--hh-primary) 100%);
}

.hh-header .hh-cta-btn i {
    font-size: 18px;
    transition: var(--hh-transition-fast);
}

.hh-header .hh-cta-btn:hover i {
    transform: translateX(3px);
}

/* ===== Mobile Menu Toggle ===== */
.hh-header .hh-mobile-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 44px;
    height: 44px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 10px;
    border-radius: 8px;
    transition: var(--hh-transition-fast);
}

.hh-header .hh-mobile-toggle:hover {
    background: var(--hh-gray-light);
}

.hh-header .hh-mobile-toggle i {
    font-size: 28px;
    color: var(--hh-text);
    transition: var(--hh-transition-smooth);
}

/* Removed hamburger animation styles as we are using an icon */

/* ===== Mobile Menu Overlay ===== */
.hh-mobile-menu {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--hh-white);
    z-index: 9999;
    padding: 80px 30px 30px;
    transform: translateX(100%);
    transition: var(--hh-transition-smooth);
    overflow-y: auto;
}

.hh-mobile-menu.is-open {
    transform: translateX(0);
}

.hh-mobile-menu .hh-mobile-nav {
    list-style: none;
    padding: 0;
    margin: 0;
}

.hh-mobile-menu .hh-mobile-nav li {
    border-bottom: 1px solid var(--hh-gray-light);
}

.hh-mobile-menu .hh-mobile-nav li a {
    display: block;
    padding: 18px 0;
    font-family: 'Outfit', sans-serif;
    font-size: 18px;
    font-weight: 500;
    color: var(--hh-text);
    text-decoration: none;
    transition: var(--hh-transition-fast);
}

.hh-mobile-menu .hh-mobile-nav li a:hover {
    color: var(--hh-primary);
    padding-left: 10px;
}

.hh-mobile-menu .hh-mobile-nav .sub-menu {
    list-style: none;
    padding-left: 20px;
    margin: 0;
}

.hh-mobile-menu .hh-mobile-nav .sub-menu li a {
    font-size: 15px;
    padding: 12px 0;
    color: var(--hh-text-light);
}

.hh-mobile-menu .hh-mobile-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 44px;
    height: 44px;
    background: var(--hh-gray-light);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--hh-transition-fast);
}

.hh-mobile-menu .hh-mobile-close:hover {
    background: var(--hh-primary);
    color: var(--hh-white);
}

.hh-mobile-menu .hh-mobile-close i {
    font-size: 24px;
}

/* ===== Responsive Styles ===== */
@media (max-width: 1024px) {
    .hh-header .hh-header-inner {
        padding: 12px 20px;
    }

    .hh-header .hh-nav-wrapper {
        display: none;
    }

    .hh-header .hh-mobile-toggle {
        display: flex;
    }

    .hh-header .hh-logo-wrapper img {
        height: 55px;
    }

    .hh-header .hh-cta-btn {
        display: none;
    }
}

@media (max-width: 576px) {
    .hh-header .hh-header-inner {
        padding: 10px 15px;
    }

    .hh-header .hh-logo-wrapper img {
        height: 45px;
    }

    .hh-header .hh-action-btn {
        width: 40px;
        height: 40px;
    }

    .hh-announcement-bar {
        font-size: 12px;
        padding: 8px 40px 8px 15px;
    }
}

/* ===== Accessibility ===== */
.hh-header .hh-nav>li>a:focus,
.hh-header .hh-action-btn:focus,
.hh-header .hh-cta-btn:focus {
    outline: 2px solid var(--hh-primary);
    outline-offset: 2px;
}

/* Skip to content link */
.hh-skip-link {
    position: absolute;
    top: -100%;
    left: 50%;
    transform: translateX(-50%);
    background: var(--hh-primary);
    color: var(--hh-white);
    padding: 12px 24px;
    border-radius: 0 0 8px 8px;
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    z-index: 9999;
    transition: var(--hh-transition-fast);
}

.hh-skip-link:focus {
    top: 0;
}

/* ===== Leaf Decoration ===== */
.hh-header::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 30px;
    height: 15px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 15'%3E%3Cpath d='M15 15 C15 15 10 8 5 5 C3 4 0 3 0 0 L30 0 C30 3 27 4 25 5 C20 8 15 15 15 15 Z' fill='%23ffffff'/%3E%3C/svg%3E") no-repeat center;
    background-size: contain;
    opacity: 0;
    transition: var(--hh-transition-fast);
    z-index: -1;
}

/* Hide default WordPress themes header styles that might conflict */
.site-header:not(.hh-header) {
    display: none !important;
}