/* Mobile Menu Styles */

/* Dropdown Menu Base Styles */
.dropdown-menu {
    display: none;
    position: absolute;
    background: white;
    border: none;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 0.5rem;
    z-index: 1000;
    min-width: 200px;
}

/* Dropdown Item Styles */
.dropdown-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 1rem;
    color: #333;
    text-decoration: none;
    cursor: pointer;
    white-space: nowrap;
    background: transparent;
}

/* Remove hover effects */
.dropdown-item:hover,
.dropdown-item:focus,
.dropdown-item:active {
    color: #333;
    background: transparent;
    text-decoration: none;
}

/* Active state */
.dropdown-item.active {
    background: #f8f9fa;
    color: #0d6efd;
}

/* Submenu Styles */
.dropdown-submenu {
    position: relative;
}

.dropdown-submenu .dropdown-menu {
    top: 0;
    left: 100%;
    margin-top: -0.5rem;
    margin-left: 0.1rem;
}

/* Show submenu when parent has show class */
.dropdown-submenu.show > .dropdown-menu {
    display: block !important;
}

/* Arrow indicator */
.dropdown-submenu > .dropdown-item::after {
    content: '\f107';
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    margin-left: 0.5rem;
    transition: transform 0.3s ease;
}

.dropdown-submenu.show > .dropdown-item::after {
    transform: rotate(180deg);
}

/* Mobile View */
@media (max-width: 991.98px) {
    .dropdown-submenu .dropdown-menu {
        position: static;
        margin-left: 1rem;
        border-left: 2px solid #dee2e6;
        box-shadow: none;
        width: 100%;
    }

    .dropdown-item {
        padding: 0.75rem 1rem;
    }

    /* Ensure nested submenus are visible on mobile */
    .dropdown-submenu .dropdown-submenu .dropdown-menu {
        margin-left: 1rem;
    }
}

/* Desktop View */
@media (min-width: 992px) {
    .dropdown-submenu .dropdown-menu {
        min-width: 250px;
    }

    .dropdown-menu {
        padding: 0.75rem;
    }

    .dropdown-item {
        padding: 0.75rem 1rem;
        font-size: 0.95rem;
    }

    .dropdown-submenu > .dropdown-menu {
        position: absolute;
        top: 0;
        left: 100%;
        margin-top: 0;
    }

    /* Ensure nested submenus are properly positioned */
    .dropdown-submenu .dropdown-submenu > .dropdown-menu {
        top: 0;
        left: 100%;
        margin-top: 0;
    }
    
/* Ensure links are clickable */
.dropdown-item[href]:not(.dropdown-submenu > .dropdown-item) {
    pointer-events: auto;
}

}

/* Category and Subcategory Icons */
.category-icon,
.subcat-icon {
    margin-right: 0.5rem;
    color: #6c757d;
    font-size: 1.1rem;
}

.product-icon {
    color: #adb5bd;
    margin-right: 0.5rem;
}

/* Link styles */
.dropdown-item[href] {
    text-decoration: none;
    color: inherit;
    cursor: pointer;
}

.dropdown-item[href]:hover {
    text-decoration: none;
    color: inherit;
}

/* Ensure links are clickable */
.dropdown-item[href]:not(.dropdown-submenu > .dropdown-item) {
    pointer-events: auto;
}
