/* General mobile-specific adjustments */
@media screen and (max-width: 768px) {
    .top-header {
        text-align: center;
    }
    .top-header p {
        margin: 0;
        padding: 10px 0;
    }
    .social-icons {
        margin: 10px 0;
        padding: 0;
        text-align: center;
    }
    .social-icons li {
        display: inline-block;
        margin: 0 5px;
    }
    .navbar-brand img {
        max-width: 100%;
        height: auto;
    }
    .navbar-header {
        float: none;
    }
    .navbar-toggle {
        margin-right: 0;
    }
    .navbar-collapse {
        float: none !important;
        text-align: center;
    }
    .navbar-collapse ul {
        float: none;
        display: inline-block;
    }
    .navbar-collapse ul li {
        float: none;
    }
}

/* Mobile-specific dropdown menu styling */
@media screen and (max-width: 768px) {
    ul.dropdown-menu-mobile {
        display: none; /* Hidden by default */
        list-style: none;
        padding-left: 0;
        position: relative;
        background-color: #08204a; /* Set to match the rest of the menu */
        width: 100%; /* Full width on mobile */
        max-height: calc(100vh - 20px); /* Optional: max height */
        overflow-y: auto; /* Allow scrolling if needed */
        left: 0; /* Ensure it's positioned within the viewport */
    }

    ul.dropdown-menu-mobile.show {
        display: block; /* Show when toggled */
    }

    ul.dropdown-menu-mobile > li {
        list-style: none;
        background-color: #08204a; /* Ensure list items have the same background */
    }

    ul.dropdown-menu-mobile > li > a {
        color: #fff; /* Ensure text is white */
        font-size: 14px;
        background-color: #08204a; /* Match background color */
    }

    ul.dropdown-menu-mobile > li ul {
        padding-left: 15px;
        display: none; /* Hidden by default */
    }

    ul.dropdown-menu-mobile > li.open > ul {
        display: block; /* Show when parent is open */
    }

    .dropdown-menu-mobile {
        background-color: #08204a; /* Consistent dark background color */
    }

    .dropdown-menu-mobile a:hover,
    .dropdown-menu-mobile .product-category-item > span:hover {
        background-color: #2980B9; /* Change background on hover */
        color: #fff; /* Ensure text remains white */
    }

    /* Arrow indicator for submenus */
    .product-category-item.has-submenu > a:after {
        content: '\25BC'; /* Unicode for down-pointing triangle */
        display: inline-block;
        margin-left: 10px;
        font-size: 0.8em;
        color: #fff; /* White color */
        vertical-align: middle;
    }

    /* Rotate the arrow when the dropdown is open */
    .product-category-item.has-submenu.open > a:after {
        content: '\25B2'; /* Unicode for up-pointing triangle */
        color: #fff; /* Ensure arrow remains white when rotated */
    }
}

/* Desktop-Specific Styles */
@media (min-width: 769px) {
    ul.dropdown-menu-mobile li:hover > a, 
    ul.dropdown-menu-mobile li.active > a, 
    .menu-item-has-children:hover > a, 
    .menu-item-has-children.active > a, 
    .sub-menu-item-has-children:hover > a, 
    .sub-menu-item-has-children.active > a {
        background: blue !important;
    }
    ul.dropdown-menu-mobile > li:hover > a, 
    ul.dropdown-menu-mobile > li > ul > li:hover > a, 
    ul.dropdown-menu-mobile > li > ul > li > ul > li:hover > a {
        background: blue;
    }
    .nav.navbar-nav li:hover > a {
        background-color: blue;
    }
    .dropdown-menu-mobile {
        background-color: #e0e0e0;
    }
    .dropdown-menu-mobile > li > a:hover, 
    .menu-item-has-children > a:hover {
        background-color: #cccccc;
    }
}

/* General Styles - Applicable to Both Mobile and Desktop */
.product-category-item:hover > a, 
.current-menu-item.product-category-item > a, 
.current-menu-ancestor.product-category-item > a, 
.current-post-ancestor.product-category-item > a {
    background-color: blue;
}

.dropdown-menu-mobile {
    list-style: none;
    padding-left: 0;
}

.dropdown-menu-mobile li {
    list-style: none;
    padding-left: 20px;
}

.dropdown-menu-mobile ul {
    list-style: none;
    padding-left: 20px;
    margin-left: 0;
}
