/* ===================================
   MENU & SUBMENU STYLES
   =================================== */

/* Logo Styles */
.logo-image img {
    max-height: 50px;
    width: auto;
    display: block;
}

.logo-image .custom-logo-link {
    display: block;
    line-height: 1;
}

/* Footer Logo */
.footer-logo img {
    max-height: 60px;
    width: auto;
    margin-bottom: 15px;
}

.footer-logo .custom-logo-link {
    display: inline-block;
}

/* Navigation Menu with Submenu Support */
.nav-menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 0;
}

.nav-menu > li {
    position: relative;
    margin: 0;
}

.nav-menu > li > a {
    display: block;
    padding: 1.2rem 1.5rem;
    color: var(--text-color);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
}

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

.nav-menu > li > a::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 50%;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: all 0.3s ease;
    transform: translateX(50%);
}

.nav-menu > li > a:hover::after,
.nav-menu > li.current-menu-item > a::after {
    width: 80%;
}

/* Menu Items with Children */
.nav-menu .menu-item-has-children > a::before {
    content: '\f078';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    font-size: 0.7em;
    margin-left: 0.5rem;
    transition: transform 0.3s ease;
}

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

/* Submenu Styles */
.nav-menu .sub-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: #ffffff;
    min-width: 220px;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    padding: 0.5rem 0;
    list-style: none;
    margin: 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
    z-index: 1000;
}

.nav-menu .menu-item-has-children:hover > .sub-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.nav-menu .sub-menu li {
    margin: 0;
    border-bottom: 1px solid #f0f0f0;
}

.nav-menu .sub-menu li:last-child {
    border-bottom: none;
}

.nav-menu .sub-menu a {
    display: block;
    padding: 0.8rem 1.5rem;
    color: var(--text-color);
    text-decoration: none;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    position: relative;
}

.nav-menu .sub-menu a:hover {
    color: var(--primary-color);
    background: rgba(139, 69, 19, 0.05);
    padding-right: 2rem;
}

.nav-menu .sub-menu a::after {
    content: '\f053';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    right: 1rem;
    opacity: 0;
    transition: all 0.3s ease;
}

.nav-menu .sub-menu a:hover::after {
    opacity: 1;
    right: 0.8rem;
}

/* Third Level Submenu */
.nav-menu .sub-menu .menu-item-has-children > a::before {
    content: '\f053';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    left: 1rem;
    font-size: 0.8em;
}

.nav-menu .sub-menu .sub-menu {
    top: 0;
    right: 100%;
    margin-right: 5px;
}

.nav-menu .sub-menu .menu-item-has-children:hover > .sub-menu {
    right: 100%;
}

/* Active/Current Menu Items */
.nav-menu .current-menu-item > a,
.nav-menu .current-menu-ancestor > a {
    color: var(--primary-color);
}

.nav-menu .sub-menu .current-menu-item > a {
    background: rgba(139, 69, 19, 0.1);
    font-weight: 600;
}

/* Mobile Menu Styles */
@media (max-width: 768px) {
    .nav-menu {
        flex-direction: column;
        position: fixed;
        top: 70px;
        right: -100%;
        width: 280px;
        height: calc(100vh - 70px);
        background: #ffffff;
        box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
        transition: right 0.3s ease;
        overflow-y: auto;
        padding: 1rem 0;
        z-index: 999;
    }

    .nav-menu.active {
        right: 0;
    }

    .nav-menu > li {
        width: 100%;
    }

    .nav-menu > li > a {
        padding: 1rem 1.5rem;
        border-bottom: 1px solid #f0f0f0;
    }

    .nav-menu > li > a::after {
        display: none;
    }

    .nav-menu .menu-item-has-children > a::before {
        position: absolute;
        left: 1.5rem;
        margin: 0;
    }

    /* Mobile Submenu */
    .nav-menu .sub-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        background: rgba(139, 69, 19, 0.02);
        border-radius: 0;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
    }

    .nav-menu .menu-item-has-children.open > .sub-menu {
        max-height: 500px;
        padding: 0.5rem 0;
    }

    .nav-menu .sub-menu a {
        padding: 0.7rem 2rem;
        font-size: 0.9rem;
    }

    .nav-menu .sub-menu a::after {
        display: none;
    }

    /* Third level on mobile */
    .nav-menu .sub-menu .sub-menu {
        background: rgba(139, 69, 19, 0.05);
    }

    .nav-menu .sub-menu .sub-menu a {
        padding-right: 3rem;
    }

    /* Toggle submenu on mobile */
    .nav-menu .menu-item-has-children > a {
        cursor: pointer;
    }
}

/* Hamburger Active State */
.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

/* Footer Menu Styles */
.footer-col ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-col ul li {
    margin-bottom: 0.5rem;
}

.footer-col ul li a {
    color: var(--text-light);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-col ul li a:hover {
    color: var(--primary-color);
}

/* Submenu Hover Effects */
.nav-menu .sub-menu li:hover {
    background: linear-gradient(to right, rgba(139, 69, 19, 0.03), transparent);
}

/* Submenu Icons for Different Categories */
.nav-menu .sub-menu li.cat-coffee::before,
.nav-menu .sub-menu li.cat-brewing::before,
.nav-menu .sub-menu li.cat-beans::before {
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    margin-left: 0.5rem;
    opacity: 0.5;
}

.nav-menu .sub-menu li.cat-coffee::before {
    content: '\f0f4'; /* Coffee icon */
}

.nav-menu .sub-menu li.cat-brewing::before {
    content: '\f72e'; /* Pour icon */
}

.nav-menu .sub-menu li.cat-beans::before {
    content: '\f51f'; /* Seed icon */
}
