header {
    background-color: #ffffff;
    color: rgb(44, 37, 37);
    padding: 10px 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-container {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    justify-content: space-between;
    padding: 0 10px;
}


.logo img {
    height: 24px;
}

.login-btn {
    padding: 6px 14px;
    background-color: white;
    color: #2874f0;
    font-weight: 500;
    border: 1px solid #000000;
    border-radius: 4px;
    font-size: 14px;
    white-space: nowrap;
    flex-shrink: 0;
}


.mobile-cart {
    color: white;
    font-size: 18px;
}

/* nav links */
.nav-links {
    display: flex;
    width: 100%;
    justify-content: space-around;
    list-style: none;
    padding: 10px 0;
}

.nav-links li {
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: 12px;
    color: rgb(0, 0, 0);
}

.search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid #ccc;
    border-top: none;
    z-index: 10;
    display: block;
    max-width: 1250PX;
    margin: 0 auto;
    margin-top: 10px;
    padding: 0 10px;
    overflow-y: auto;
}

.search-results li {
    padding: 10px;
    cursor: pointer;
    list-style: none;
    border-bottom: 1px solid #eee;
}

.search-results li:hover {
    background-color: #f0f0f0;
}

.location-wrapper {
    position: relative;
    cursor: pointer;
}

.location-dropdown {
    position: absolute;
    top: 130%;
    left: 0;
    background: #fff;
    width: 220px;
    padding: 12px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.15);
    border-radius: 8px;
    display: none;
    z-index: 999;
}

.location-dropdown select,
.location-dropdown button {
    width: 100%;
    margin-top: 8px;
    padding: 6px;
}

.location-wrapper.active .location-dropdown {
    display: block;
}

/* MEDIA QUERIES */
@media (min-width: 768px) {
    .header-container {
        flex-wrap: nowrap;
    }

    .search-section {
        width: auto;
        flex: 1;
        margin: 0 20px;
    }

    .login-btn {
        order: 3;
        margin: 0 20px 0 0;
        margin-left: 20px;
    }

    .nav-links {
        width: auto;
        justify-content: flex-end;
        gap: 20px;
    }

    .nav-links li {
        flex-direction: row;
        font-size: 14px;
    }

    .nav-links li span {
        margin-left: 5px;
    }

    .three-lines {
        display: none !important;
    }

    .cart2 {
        display: inline !important;
    }
}

/* MEDIA QUERIES */
@media (max-width: 767px) {

    header {
        background-color: #e0f2f1;
    }

    /* Header container stays same */
    .header-container {
        padding: 0 10px;
    }

    /* Hide all nav items */
    .nav-links li {
        display: none;
    }

    /* 🔑 IMPORTANT FIX */
    .nav-links {
        width: 100%;
        justify-content: flex-start;   /* LEFT aligned */
        padding-left: 5px;            /* SAME as logo */
        padding-top: 2px;              /* small gap from logo */
    }

    .search-section {
        flex: 1;
        margin: 0;
        order: 1;
    }

    .three-lines {
        display: flex !important;
        align-items: center;
        font-size: 18px;
        margin-left: 10px;
        order: 2;
    }

    .login-btn {
        margin-left: auto;
        margin-right: 10px;
    }

    /* ==============================
       LOCATION (PINCODE)
       EXACTLY ALIGNED WITH LOGO
    ============================== */

    .nav-links li.location-wrapper {
        display: flex !important;
        align-items: center;
        font-size: 13px;
        margin-top: 2px;     /* less top space */
    }

    .location-trigger {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        padding: 3px 10px;
        border: 1px solid #ddd;
        border-radius: 6px;
        background: #ffffff;
    }

    /* Dropdown remains modal */
    .location-dropdown {
        position: fixed;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        width: 90%;
        max-width: 320px;
        box-shadow: 0 10px 30px rgba(0,0,0,0.25);
        z-index: 3000;
    }

    .location-wrapper.active::before {
        content: "";
        position: fixed;
        inset: 0;
        background: rgba(0,0,0,0.45);
        z-index: 2999;
    }
}






/* --- Mobile Drawer Styles --- */
.mobile-drawer {
    position: fixed;
    top: 0;
    left: -250px;
    width: 250px;
    height: 100%;
    background-color: #fff;
    color: #333;
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.3);
    transition: left 0.3s ease;
    z-index: 1501;
    padding: 20px;
}

.mobile-drawer.active {
    left: 0;
}



.drawer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: bold;
    font-size: 16px;
    margin-bottom: 20px;
}

.drawer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.drawer-links li {
    padding: 12px 0;
    font-size: 14px;
    border-bottom: 1px solid #eee;
    cursor: pointer;
    color: #333;
}

.drawer-links li i {
    margin-right: 10px;
}

/* Overlay */
.drawer-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1500;
}

.drawer-overlay.active {
    display: block;
}


/* second navbar */

/* ===== Secondary Navbar ===== */
.sub-navbar {
    background-color: #e0f2f1;
    color: white;
    padding: 8px 0;
    width: 100%;
    top: 60px;
    /* adjust based on header height */
    z-index: 99;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.sub-nav-links {
    list-style: none;
    display: flex;
    justify-content: center;
    gap: 30px;
    margin: 0;
    padding: 0;
}

.sub-nav-links li a {
    color: rgb(0, 0, 0);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: color 0.2s ease, border-bottom 0.2s ease;
    padding-bottom: 4px;
}

.sub-nav-links li a:hover {
    color: #000000;
    border-bottom: 2px solid #000000;
}



/* Responsive */
/* Hide sub-navbar on mobile */
@media (max-width: 767px) {
    .sub-navbar {
        display: none;
    }
}