/* ================== RESET & BODY ================== */
body, html {
  margin: 0;
  padding: 0;
}

/* ================== NAVBAR BASE ================== */
.navbar {
    background-color: #ffffff !important; /* Ensure solid white background */
    /* background: var(--primary-color); /* Changed background color to primary color */
    padding: 8px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow:0 2px 8px rgba(0,0,0,0.08);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    flex-wrap: nowrap;
    min-height: 60px;
    height: 60px;
    overflow: visible;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif; /* Ensure consistent font family */
    font-size: 16px; /* Base font size for navbar elements */
}

/* ================== LEFT SECTION (LOGO) ================== */
.nav-left {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    margin-left: 20px; /* Adjust this value to move the logo further right */
}

/* ================== LOGO ================== */
.logo img {
    height: 42px; /* desktop default */
    width: auto;
    display: block;
}

/* ================== SEARCH BAR ================== */
.search-container {
    position: relative;
    flex: 0 1 240px; /* Keep flex properties for layout within navbar */
    background: #f1f1f1;
    padding: 5px 12px 5px 10px;
    border-radius: 16px;
    box-sizing: border-box;
    min-width: 0;
}

.search-container input {
    border: none;
    outline: none;
    background: transparent;
    padding: 6px 10px;
    width: 100%;
    font-size: 15px;
}

/* ================== NAV CENTER LINKS ================== */
.nav-center-links {
    list-style: none;
    display: flex;
    gap: 25px;
    margin: 0;
    padding: 0;
    flex: 1 1 auto;
    justify-content: center;
    align-items: center;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
}

.nav-center-links li a {
    text-decoration: none;
    color: var(--primary-color); /* Use primary color for default links */
    font-size: 16px; /* Consistent font size for nav links */
    font-weight: 500;
    transition: color 0.3s ease;
    padding-bottom: 3px;
    display: flex;
    align-items: center;
    gap: 5px;
    position: relative;
}

.nav-center-links li a:hover { color: var(--primary-color); } /* Primary color on hover */

.nav-center-links li a.active {
    color: var(--orange-active-color); /* Orange color for active link */
    padding-bottom: 3px; /* Keep padding for consistent spacing */
}

.nav-center-links li a::after { /* Default state for the underline */
    content: '';
    position: absolute;
    left: 50%; /* Start from center */
    bottom: -6px;
    width: 0; /* Initially no width */
    height: 3px;
    background: var(--orange-active-color); /* Orange color underline for hover */
    border-radius: 2px;
    transition: width 0.3s ease, left 0.3s ease; /* Transition for width and left */
}

.nav-center-links li a:hover::after { /* Hover state for the underline */
    left: 0; /* Slide to left */
    width: 100%; /* Expand to full width */
}

.nav-center-links li a.active::after { /* Ensure active state has an underline */
    left: 0; /* Start from left */
    width: 100%; /* Expand to full width */
    background: var(--orange-active-color); /* Orange color for active underline */
}

/* ================== NAV RIGHT ICONS ================== */
.nav-right-icons {
    display: flex;
    align-items: center;
    gap: 15px;
    position: relative; /* for verify-popup */
    flex: 0 0 auto;
}

.nav-right-icons .icon-link {
    text-decoration: none;
    color: var(--primary-color); /* Primary color for default icons */
    font-size: 20px; /* Consistent font size for icons */
    transition: 0.3s;
}

.nav-right-icons .icon-link i {
    font-size: 20px; /* Consistent Font Awesome icon size */
}


.nav-right-icons .icon-link:hover { color: var(--primary-color); } /* Primary color on hover */
.nav-right-icons .icon-link.active { color: var(--orange-active-color); } /* Orange color for active icon */

.verify-popup {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    background: #fff;
    color: #000;
    padding: 10px 15px;
    border-radius: 8px;
    font-size: 14px;
    white-space: nowrap;
    box-shadow: 0 6px 18px rgba(0,0,0,0.18);
    z-index: 2100;
}

.disabled-cart {
    color: #888;
    pointer-events: none;
    cursor: not-allowed;
}

/* ================== HAMBURGER ================== */
.hamburger {
    display: none;
    font-size: 28px;
    cursor: pointer;
    margin-left: 10px;
}

/* ================== MOBILE LAYOUT ================== */
@media (max-width: 900px) {
    .navbar {
        display: flex !important;
        flex-wrap: nowrap !important;
        justify-content: space-between !important;
        align-items: center !important;
        height: 60px !important;
        padding: 8px 12px !important;
    }

    .nav-left {
        flex: 0 0 auto !important;
        display: flex !important;
        align-items: center !important;
    }
    .logo img {
        height: 35px !important; /* Smaller logo for mobile */
        width: auto !important;
        display: block !important;
    }

    .search-bar {
        display: none !important; /* Hide search bar on mobile */
    }

    .profile-icon-link {
        display: none !important; /* Hide profile icon on mobile */
    }

    /* Ensure other icons in nav-right-icons remain visible */
    .nav-right-icons .icon-link:not(.profile-icon-link) {
        display: flex !important;
    }

    .nav-right-icons {
        flex: 0 auto !important;
        display: flex !important;
        align-items: center !important;
        gap: 10px !important;
        margin-left: 0 !important;
    }

    .hamburger {
        display: block !important;
        font-size: 32px !important; /* Slightly larger for better visibility */
        cursor: pointer !important;
        margin-left: 10px !important;
        color: var(--primary-color); /* Ensure color is consistent with other icons */
        z-index: 1001; /* Ensure it's above other elements if needed */
    }

    .nav-center-links {
        display: flex !important; /* Always display as flex for positioning */
        flex-direction: column !important;
        width: 80% !important; /* Set a specific width for the side menu */
        max-width: 300px; /* Optional: max width for larger mobile devices */
        height: calc(100vh - 60px) !important; /* Fill screen height below navbar */
        position: fixed !important; /* Fixed position for sliding effect */
        top: 60px !important;
        right: 0 !important; /* Position off-screen to the right */
        transform: translateX(100%); /* Hide menu by default */
        background: #fff !important;
        padding: 20px 0 !important; /* Adjusted padding for better look */
        gap: 0 !important; /* Remove gap, use padding on li instead */
        justify-content: flex-start !important; /* Align items to the top */
        align-items: flex-start !important; /* Align items to the left */
        white-space: normal !important;
        z-index: 99 !important;
        box-shadow: -2px 0 8px rgba(0,0,0,0.1); /* Add shadow for depth */
        transition: transform 0.3s ease-out; /* Add transition for sliding effect */
    }
    .nav-center-links.mobile-show {
        transform: translateX(0) !important; /* Slide into view */
    }
    .nav-center-links li {
        width: 100%; /* Make list items take full width */
    }
    .nav-center-links li a {
        display: block !important; /* Make links block to fill li */
        padding: 10px 20px !important; /* Add padding for "active like padding" */
        text-align: left !important; /* Align text to the left */
        color: #333 !important; /* Default color for mobile links */
    }
    .nav-center-links li a.active {
        background-color: var(--orange-active-color) !important; /* Active indicator as background */
        color: #fff !important; /* White text for active link */
        box-shadow: none !important; /* Remove existing box-shadow */
    }
    .nav-center-links li a::after {
        display: none !important; /* Hide underline on mobile menu */
    }
}

@media (max-width: 480px) {
    .logo img { height: 30px !important; }
    .search-bar { max-width: 140px !important; }
}

/* Profile link in mobile menu */
.mobile-profile-link {
    display: none; /* Hidden by default on desktop */
}

@media (max-width: 900px) {
    .mobile-profile-link {
        display: block !important; /* Show on mobile when menu is open */
        text-align: center; /* Center the text */
        padding: 10px 0; /* Add some padding */
        border-top: 1px solid #eee; /* Separator line */
        margin-top: 10px; /* Space from other links */
    }
}

/* Profile Picture in Navbar */
.profile-icon-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px; /* Adjust size as needed */
    height: 28px; /* Adjust size as needed */
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid var(--primary-color); /* Highlight with primary color accent */
}

.profile-pic-navbar {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%; /* Ensure the image itself is circular */
}

/* Search Results Dropdown */
.search-results {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: #fff;
    border: 1px solid #ccc;
    max-height: 250px;
    overflow-y: auto;
    z-index: 999;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    border-radius: 0 0 8px 8px;
}

.search-results ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.search-results li {
    padding: 8px 10px;
    cursor: pointer;
}

.search-results li:hover {
    background-color: #eee;
}

.no-results {
    padding: 8px 10px;
    color: #555;
}
