/* ===== BAGO: Navbar Dropdown Styles ===== */
.nav-dropdown {
    position: relative;
}
.nav-dropdown-toggle {
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px; /* Space between text and arrow */
}
.nav-dropdown-toggle .fa-chevron-down {
    font-size: 0.7em;
    transition: transform 0.3s ease;
}
.nav-dropdown-menu {
    display: none;
    position: absolute;
    top: 150%; /* Position below the link */
    left: -15px; /* Align with padding */
    background-color: var(--dark-color);
    border: 1px solid #333;
    border-radius: 5px;
    min-width: 180px;
    z-index: 1001;
    opacity: 0;
    transition: opacity 0.3s ease, top 0.3s ease;
    padding: 5px 0;
    box-shadow: 0 5px 15px rgba(0,0,0,0.5);
}
.nav-dropdown-menu a {
    display: block;
    padding: 10px 20px;
    white-space: nowrap;
    transition: background-color 0.2s ease;
}
.nav-dropdown-menu a:hover {
    background-color: #333;
    color: #fff !important; /* Ensure hover color is white */
}

/* Show on hover (Desktop) */
@media (min-width: 769px) {
    .nav-dropdown:hover .nav-dropdown-menu {
        display: block;
        opacity: 1;
        top: 100%; /* Tamang position pag hover */
    }
    .nav-dropdown:hover .nav-dropdown-toggle .fa-chevron-down {
        transform: rotate(180deg);
    }
}

/* Adjustments for Mobile Nav Menu */
@media (max-width: 768px) {
    .nav-dropdown {
        width: 100%;
        text-align: center;
    }
    .nav-dropdown-toggle {
        justify-content: center; /* Center "Collections" text */
        padding: 10px 0; /* Add some space */
    }
    .nav-dropdown-menu {
        position: static; /* Remove absolute positioning */
        display: block;
        opacity: 1;
        background: none;
        border: none;
        box-shadow: none;
        min-width: auto;
        width: 100%;
        padding: 0;
        max-height: 0; /* Collapse by default */
        overflow-y: auto; /* <--- Pinalitan dito (allows vertical scroll) */
        transition: max-height 0.3s ease-out; /* Animate collapse */

        /* Optional: Hide scrollbar visually but keep functionality */
        -ms-overflow-style: none;  /* IE and Edge */
        scrollbar-width: none;  /* Firefox */
    }
    /* Optional: Hide scrollbar visually for Webkit browsers (Chrome, Safari) */
    .nav-dropdown-menu::-webkit-scrollbar {
        display: none;
    }

    .nav-dropdown-menu a {
        font-size: 0.9em; /* Make sub-links smaller */
        color: #ccc;
        padding: 8px 20px;
        background-color: rgba(0,0,0,0.2);
    }

    /* BAGO: JS-driven toggle for mobile */
    .nav-dropdown.mobile-active .nav-dropdown-menu {
       max-height: 170px; /* <--- Pinalitan dito (approx 5 items) */
    }
    .nav-dropdown.mobile-active .nav-dropdown-toggle .fa-chevron-down {
        transform: rotate(180deg);
    }
}