/* === DROPDOWN CORE === */
.nav-item.dropdown {
    position: relative;
}

/* Show dropdown on hover or focus */
.nav-item.dropdown:hover > .dropdown-menu,
.nav-item.dropdown:focus-within > .dropdown-menu {
    display: block;
    visibility: visible;
    opacity: 1; /* Make sure it's fully visible */
}

/* dropdown menu box */
.nav-item.dropdown .dropdown-menu {
    display: none;
    position: absolute;
    top: calc(100% + 10px); /* Distance below Categories */
    left: 0;
    min-width: 180px;
    list-style: none;
    padding: 0;
    margin: 0;
    background-color: #ffffff;
    z-index: 9999;
    
    /* Add transition for smoother appearance/disappearance */
    visibility: hidden;  /* Start off hidden */
    opacity: 0;
    transition: visibility 0s 0.2s, opacity 0.2s ease-in-out;
}

/* === DROPDOWN ITEMS === */
.dropdown-menu li {
    background-color: #ffffff;
}

.dropdown-menu .dropdown-link {
    display: block;
    padding: 10px 14px;
    color: #000000;
    text-decoration: none;
    font-weight: normal;
}

.dropdown-menu .dropdown-link:hover {
    background-color: transparent;
    font-weight: bold;
    color: #000000;
}

/* Ensure dropdown stays visible when hovering over the dropdown menu itself */
.nav-item.dropdown:hover .dropdown-menu {
    visibility: visible;
    opacity: 1;
    transition-delay: 0s; /* Remove delay when hovering over the dropdown */
}
