/* Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    color: #333;
    background-color: #f9f9f9;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* Top Bar */
.top-bar {
    background-color: #ffffff;
    border-bottom: 1px solid #e5e5e5;
    padding: 8px 0;
    font-size: 13px;
    color: #888;
}

.top-bar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.top-left-info {
    display: flex;
    gap: 20px;
}

.top-left-info span {
    display: flex;
    align-items: center;
    gap: 5px;
}

.top-left-info i {
    color: #f9ce34;
    /* Gold-ish color from image */
}

.top-right-menu ul {
    display: flex;
    gap: 20px;
}

.top-right-menu a {
    color: #666;
    transition: color 0.3s;
}

.top-right-menu a:hover {
    color: #007bff;
}

/* Main Header */
.main-header {
    background-color: #ffffff;
    padding: 15px 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.main-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
}

/* Logo */
.logo img {
    height: 40px;
    /* Adjust as per actual logo aspect ratio */
    display: block;
}

/* Search Bar */
.search-bar {
    flex-grow: 1;
    max-width: 600px;
    position: relative;
    display: flex;
    align-items: center;
}

.search-bar form {
    width: 100%;
}

.search-bar input {
    width: 100%;
    padding: 10px 15px 10px 45px;
    /* Extra padding on left for icon */
    border: 1px solid #2874f0;
    /* Professional blue border */
    border-radius: 4px;
    /* Slightly rounded, or change to 50px for pill */
    background-color: #f8f9fa;
    font-size: 14px;
    transition: all 0.3s;
}

.search-bar input:focus {
    outline: none;
    border-color: #2874f0;
    background-color: #fff;
    box-shadow: 0 0 8px rgba(40, 116, 240, 0.2);
}

.search-bar button {
    position: absolute;
    left: 12px;
    right: auto;
    /* Move to left */
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #999;
    cursor: default;
    pointer-events: none;
    /* Just an icon now */
}

.search-bar button i {
    font-size: 16px;
}


/* Icons (Cart & User) */
.header-icons {
    display: flex;
    align-items: center;
    gap: 20px;
}

.icon-item a {
    font-size: 20px;
    color: #333;
    position: relative;
}

.icon-item a:hover {
    color: #0d6efd;
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 24px;
    color: #333;
    cursor: pointer;
    margin-left: 10px;
}

/* Mobile Sidebar Styling */
.mobile-sidebar {
    position: fixed;
    top: 0;
    left: -280px;
    width: 280px;
    height: 100vh;
    background: #fff;
    z-index: 2000;
    transition: left 0.3s ease;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
}

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

.mobile-sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1999;
    display: none;
}

.mobile-sidebar-overlay.active {
    display: block;
}

.mobile-sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid #eee;
}

.mobile-logo img {
    height: 35px;
}

.mobile-menu-close {
    background: none;
    border: none;
    font-size: 24px;
    color: #333;
    cursor: pointer;
}

.mobile-sidebar-content {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.mobile-user-info {
    padding: 20px;
    background: #f8f9fa;
    border-bottom: 1px solid #eee;
}

.mobile-user-profile {
    display: flex;
    align-items: center;
    gap: 15px;
}

.mobile-avatar {
    width: 45px;
    height: 45px;
    background: #e9ecef;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: #555;
}

.mobile-user-details span {
    font-size: 12px;
    color: #666;
    display: block;
}

.mobile-user-details h4 {
    margin: 0;
    font-size: 16px;
    color: #333;
}

.mobile-login-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #004aad;
    font-weight: 600;
    font-size: 16px;
}

.mobile-nav-menu {
    padding: 10px 0;
}

.mobile-nav-menu ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.mobile-nav-menu li a {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px 20px;
    color: #333;
    font-size: 15px;
    border-bottom: 1px solid #f5f5f5;
    transition: background 0.2s;
}

.mobile-nav-menu li a:hover {
    background: #f9f9f9;
    color: #004aad;
}

.mobile-nav-menu li a i {
    width: 20px;
    text-align: center;
    color: #777;
}

.mobile-sidebar-footer {
    padding: 20px;
    border-top: 1px solid #eee;
    background: #fcfcfc;
}

.mobile-sidebar-footer a {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #666;
    font-size: 13px;
    margin-bottom: 10px;
}

.mobile-sidebar-footer a i {
    color: #004aad;
}

/* Updated Mobile Responsive */
@media (max-width: 991px) {
    .top-bar {
        display: none;
    }

    .main-navigation {
        display: none;
    }

    .main-header .container {
        flex-wrap: wrap;
        gap: 15px;
    }

    .logo {
        flex-grow: 1;
        order: 1;
    }

    .header-icons {
        order: 2;
        gap: 15px;
    }

    .search-bar {
        order: 3;
        width: 100%;
        max-width: 100%;
        margin-top: 10px;
        display: flex;
        align-items: center;
    }

    .search-bar input {
        border-radius: 4px 0 0 4px;
        /* Fix radius for button attachment */
    }

    /* Show Mobile Menu Toggle */
    .mobile-menu-toggle {
        display: block;
        background: #004aad;
        /* Match search button */
        color: white;
        height: 100%;
        /* Match search input height if possible, or set explicit */
        height: 38px;
        /* Assuming input padding results in approx this */
        width: 45px;
        border-radius: 4px;
        display: flex;
        align-items: center;
        justify-content: center;
        margin-left: 10px;
    }

    /* Adjust search button radius since we have a separate menu button now? 
       Actually user asked "search bar ka jo width h usko kam kro & search bar k right side me menu button lagana h"
       So search input + search button + menu button.
    */

    .search-bar {
        position: relative;
    }

    .search-bar input {
        width: calc(100% - 100px);
        /* Space for search btn + menu btn */
        border-radius: 4px 0 0 4px;
    }

    .search-bar button[type="button"]:first-of-type {
        /* Search Icon Button */
        position: absolute;
        right: 55px;
        /* Space for menu button + gap */
        width: 45px;
        border-radius: 0 4px 4px 0;
    }

    .mobile-menu-toggle {
        position: absolute;
        right: 0;
        top: 0;
        height: 100%;
        width: 45px;
        margin: 0;
        background: #333;
        /* Darker color for distinction or user pref */
        border-radius: 4px;
    }
}

@media (max-width: 600px) {
    .container {
        padding: 0 15px;
    }
}

@media (max-width: 600px) {
    .container {
        padding: 0 10px;
    }
}

/* Professional Search Results Dropdown */
.search-results-dropdown {
    position: absolute;
    top: calc(100% + 5px);
    left: 0;
    right: 0;
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    z-index: 9999;
    display: none;
    max-height: 480px;
    overflow-y: auto;
    border: 1px solid #e1e4e8;
}

.search-results-dropdown.active {
    display: block;
}

.search-result-item {
    display: flex;
    align-items: center;
    padding: 10px 16px;
    text-decoration: none;
    color: #333;
    transition: all 0.2s ease;
    border-bottom: 1px solid #f1f1f1;
}

.search-result-item:last-of-type {
    border-bottom: none;
}

.search-result-item:hover {
    background-color: #f9f9f9;
    text-decoration: none;
}

.search-result-image {
    width: 38px;
    height: 38px;
    object-fit: contain;
    background: #fff;
    border-radius: 2px;
    margin-right: 14px;
}

.search-result-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.search-result-title {
    display: block;
    font-size: 14px;
    font-weight: 400;
    color: #212121;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 2px;
}

.search-result-category {
    font-size: 13px;
    color: #2874f0;
    /* Flipkart blue */
    font-weight: 400;
}

.search-view-all {
    display: block;
    padding: 12px;
    text-align: center;
    background-color: #fff;
    color: #2874f0;
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    border-top: 1px solid #f1f1f1;
}

.search-view-all:hover {
    background-color: #f9f9f9;
}

.search-no-results {
    padding: 20px;
    text-align: center;
    color: #757575;
    font-size: 14px;
}