/* Header */
.navbar {
    background-color: #ff4081; /* Pink background */
    color: #fff;
    justify-content: space-between;
    align-items: center;
    padding: 0rem 1rem !important;
    display: flex;
}

.navbar-brand {
    color: #fff;
    font-weight: 600;
    font-size: 1.5rem;
}

.navbar-icons {
    display: flex;
    align-items: center;
}

.navbar-icons a {
    color: #ffffffcc; /* Inactive icon color - slight transparency for a sleek look */
    margin-left: 1px;
    text-align: center;
    font-size: 1.2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.navbar-icons a i {
    font-size: 1.5rem;
}

.navbar-icons a span {
    font-size: 0.7rem; /* Smaller text for the labels */
    margin-top: 0.15rem; /* Add some space between the icon and the text */
}

/* Ensure Profile is at the end after Deals on desktop */
.navbar-icons .profile {
    order: 6;
}

/* Hide navbar-top by default on desktop */
.navbar-top {
    display: none;
}

/* Specific padding for the nav-link */
.nav-link {
    padding: .5rem 0.8rem !important;
    position: relative;
    color: #ffffffcc; /* Inactive color - slightly faded white */
    text-align: center;
    transition: color 0.3s ease, transform 0.3s ease;
}

/* Style for the icons */
.nav-link i {
    font-size: 1.5rem;
    transition: transform 0.3s ease, color 0.3s ease;
}

/* Highlight active link */
.nav-link.active {
    color: #ffffff; /* Active color - full white */
    transform: scale(1.1); /* Slightly scale up the icon */
}

.nav-link.active i {
    color: #ffffff; /* Active color for the icon */
    transform: scale(1.2); /* Scale the icon up slightly */
}

/* Underline effect for the active link */
.nav-link.active::after {
    content: '';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    bottom: -5px;
    width: 50%; /* Keep it slightly narrower than the text width */
    height: 3px;
    background-color: #ffffff; /* White underline for the active state */
    border-radius: 5px;
    transition: width 0.3s ease;
}

/* When inactive, no underline is visible */
.nav-link::after {
    content: '';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    bottom: -5px;
    height: 3px;
    background-color: transparent;
}

/* Hover effect for icons */
.nav-link:hover {
    color: #ffffff; /* Hover color - full white */
}

.nav-link:hover i {
    transform: scale(1.1); /* Scale icon on hover */
}

/* Dropdown for profile */
.nav-link.profile {
    position: relative;
}

.dropdown-content {
    display: none;
    position: absolute;
    background-color: #fff;
    color: #000;
    min-width: 120px;
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
    z-index: 1;
    top: 50px;
    right: 0;
    border-radius: 4px;
}

.dropdown-content a {
    color: #000;
    padding: 10px 16px;
    text-decoration: none;
    display: block;
    font-size: 0.9rem;
}

.dropdown-content a:hover {
    background-color: #ddd;
}

/* Keep dropdown open when hovering over profile or dropdown-content */
.nav-link.profile:hover .dropdown-content,
.nav-link.profile .dropdown-content:hover {
    display: block;
}

/* For mobile devices only */
@media (max-width: 768px) {
    /* Profile section at the top-right on mobile */
    .navbar-top {
        display: flex;
        justify-content: right;
        align-items: center;
        background-color: #ff4081;
        top: 0;
        width: 100%;
        height: 50px; /* Set height for the top header bar */
        z-index: 10; /* Ensure it stays above other content */
        position: relative; /* Position relative to ensure the Profile icon remains within this section */
    }

    .navbar-top a.profile {
        position: absolute; /* Ensure absolute positioning relative to navbar-top */
        display: flex;
        flex-direction: column;
        align-items: center;
        color: #fff;
    }

    .navbar-top i {
        font-size: 1.5rem;
    }

    .navbar-top span {
        font-size: 0.8rem;
        margin-top: 0.25rem;
    }

    /* Center the Page Title */
    .navbar-top #pageTitle {
        color: #fff;
        font-size: 1.2rem;
        margin: 0;
        text-align: center;
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
    }

    /* Hide Profile from bottom navbar on mobile */
    .navbar-icons .profile {
        display: none;
    }

    .navbar-top .dropdown-content {
            top: 60px; /* Adjusted to fit below the profile icon in mobile view */
        }
}
