.header {
    background-color: #0C4B59;
    border-bottom-right-radius: 15px;
    border-bottom-left-radius: 15px;
    position: fixed;
    top: 0;
    width: 100%;
    height: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-block: 0.5rem;
    font-size: 1.2rem;
    font-family: Poppins, Bold;
    z-index: 9999;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}



.logoContainer {
    display: flex;
    align-items: center;
    width: 100%;
    justify-content: space-between;
    padding: 0 1rem;
}

.header p {
    overflow: hidden;
    font-size: 1rem;
    display: none;
}

.header img {
    width: 70px;
    height: 70px;
    margin-left: 1rem;
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.1));
    transition: transform 0.5s ease, filter 0.3s ease;
}

.header img:hover {
    transform: scale(1.02);
    filter: drop-shadow(0 6px 8px rgba(0, 0, 0, 0.2));
}

.searchContainer {
    display: flex;
    align-items: center;
    background-color: white;
    border-radius: 20px;
    padding: 5px 10px;
    width: 100%;
    max-width: 300px; /* Default width */
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    margin: 0 10px;
}

.searchIcon {
    color: #0C4B59;
    font-size: 18px;
    margin-right: 10px;
    margin-top: 4px;
}

.searchBar {
    border: none;
    outline: none;
    width: 100%;
    padding: 8px;
    font-size: 14px;
    background: transparent;
}

.search-results {
    position: fixed; /* Change to fixed to overlay on top of the header */
    top: 60px; /* Adjust top to be below the header */
    left: 53.8%; /* Adjust left to move the box to the right */
    transform: translateX(-50%);
    width: 700px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    max-height: 80vh;
    overflow-y: auto;
    z-index: 10001; /* Ensure it is above the header */
    display: none;
    padding: 16px 0;
}

.search-results.active {
    display: block;
    animation: dropDown 0.3s ease;
}

.search-item {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    border-bottom: 1px solid #f5f5f5;
    text-decoration: none;
    color: inherit;
    transition: all 0.5s ease;
    width: 650px;
    left: 20px;
}

.search-item:hover {
    background-color: #f8f9fa;
}

.search-item:last-child {
    border-bottom: none;
}

.search-item img {
    width: 60px;
    height: 60px;
    object-fit: contain;
    margin-right: 20px;
    border-radius: 8px;
    background: #f8f9fa;
    padding: 5px;
}

.search-item-info {
    flex: 1;
}

.search-item-name {
    font-weight: 500;
    color: #333;
    margin-bottom: 4px;
    font-size: 1rem;
}

.search-item-price {
    color: #038C7F;
    font-weight: 600;
    font-size: 1.1rem;
    margin-bottom: 4px;
}

.search-item-category {
    font-size: 0.85rem;
    color: #666;
    display: flex;
    align-items: center;
    gap: 5px;
}

.search-item-category i {
    font-size: 0.8rem;
}

.no-results {
    padding: 20px;
    text-align: center;
    color: #666;
    font-size: 0.95rem;
}

@keyframes dropDown {
    from {
        opacity: 0;
        transform: translate(-50%, -10px);
    }
    to {
        opacity: 1;
        transform: translate(-50%, 0);
    }
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.navLinks {
    display: flex;
    justify-content: space-around;
    width: 100%;
    margin-top: 1rem;
    font-weight: bold;
    gap: 0.2rem;
    font-size: 1.125rem;
    transition: transform 0.3s ease;
}

.navLinks a {
    text-decoration: none;
    color: var(--text-light);
    padding-inline: 0.5rem;
}

.navLinks a:hover {
    color: var(--accent);
    transform: scale(1.01);
    filter: drop-shadow(0 6px 8px rgba(0, 0, 0, 0.2));
}

.icon {
    width: 24px;
    height: 24px;
    color: #fff; /* Ensure the icons are white */
}

.hamburger {
    display: none;
    background: none;
    border: none;
    color: var(--text-light);
    font-size: 1.5rem;
    cursor: pointer;
    position: fixed;
    top: 1rem;
    left: 1rem;
    z-index: 10001;
    margin-left: 350px;
}

/* Remove focus and active background styles */
.hamburger:focus,
.hamburger:active, 
.hamburger:hover {
    background-color: transparent !important; /* Override any background */
    outline: none; /* Remove focus outline */
    box-shadow: none; /* Remove any potential shadow */
}

/* If a class like 'active' or 'open' is added via JS, target that too */
.hamburger.active, /* Example class name */
.hamburger.open {   /* Example class name */
    background-color: transparent !important;
}

.overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    transition: opacity 0.3s ease;
}

.overlay.show {
    display: block;
    opacity: 1;
}

.navOpen {
    display: none;
}

.sidebar {
    position: fixed;
    top: 0;
    left: -100%; /* Hidden by default */
    width: 250px;
    height: 100vh;
    background-color: var(--primary);
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.2);
    z-index: 10000;
    display: flex;
    flex-direction: column;
    padding: 1rem;
    transition: left 0.3s ease-in-out;
}

.sidebar.show {
    left: 0; /* Slide in when active */
}

.sidebar .close-btn {
    align-self: flex-end;
    background: none;
    border: none;
    color: var(--text-light);
    font-size: 1.5rem;
    cursor: pointer;
    margin-bottom: 1rem;
}

.sidebar .menu-item {
    text-decoration: none;
    color: var(--text-light);
    font-size: 1rem;
    padding: 0.8rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transition: background-color 0.3s ease;
}

.sidebar .menu-item:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.sidebar .menu-item i {
    margin-right: 1rem;
    font-size: 1.2rem;
}

.sidebar .menu-item p {
    display: inline;
    margin: 0;
    flex-grow: 1; /* Allow text to take remaining space */
}

@media (max-width: 768px) {
    .hamburger {
        display: block; /* Show hamburger on smaller screens */
        position: absolute;
        top: 50%;
        right: 1rem;
        transform: translateY(-50%);
        margin-left: 680px;
    }

    .searchContainer {
        margin: 10px 0;
        max-width: calc(100% - 90px); /* Adjusted width calculation */
        padding: px 10px; /* Adjust padding */
        margin-left: auto; /* Push search bar towards the center/right */
        margin-right: 55px; /* Adjusted margin to prevent overlap */
        order: 3; /* Ensure it comes after logo and potential space */
        margin-left: 8px;;
    }

    .logoContainer {
        justify-content: flex-start; /* Align logo to the left */
    }

    .header .logoContainer img { /* Target logo specifically within container */
        margin-left: 0; /* Remove left margin on mobile */
        margin-right: auto; /* Push other elements away */
    }

    .searchBar {
        width: 100%;
        font-size: 14px; /* Ensure font size is appropriate */
    }

    .navLinks {
        display: none; /* Hide desktop nav links */
    }

    .sidebar {
        display: flex !important;
        visibility: visible;
        opacity: 1;
    }

    .sidebar.show {
        left: 0;
        display: flex !important;
        visibility: visible;
        opacity: 1;
    }

    .header p {
        display: flex;
    }

    .overlay.show {
        display: block;
    }

    .search-results {
        width: 90%;
        max-height: 70vh;
    }
}

@media (max-width: 740px) {
    .hamburger {
        margin-left: 650px;
    }
}

@media (max-width: 480px) {
    .hamburger {
        margin-left: 340px;
    }
    .header img {
        width: 60px;
        height: 60px;
        margin-right: 10px;
    }

    .searchContainer {
        max-width: calc(100% - 80px); /* Fine-tune for smaller screens */
        margin-right: 50px; /* Adjust margin */
        padding: 4px 8px;
    }

    .searchBar {
        font-size: 12px; /* Smaller font size for very small screens */
    }
}

@media (max-width: 380px) {
    .hamburger {
        margin-left: 300px;
    }
    
    .header img {
        width: 60px;
        height: 60px;
    }
    nav {
        display: none;
    }

    .searchIcon {
        position: absolute;
        left: 10px; /* Ensure the icon stays within the input area */
        color: var(--primary); /* Change the color of the search icon */
    }

    .searchBar {
        font-size: 0.65rem;
    }
}

@media (min-width: 769px) { /* Use min-width for desktop styles */
    .hamburger {
        display: none; /* Ensure hamburger is hidden on desktop */
    }

    .navLinks {
        display: flex; /* Ensure nav links are shown on desktop */
    }

    .sidebar {
        display: none; /* Hide sidebar on larger screens */
    }

    .searchContainer {
        max-width: 400px; /* Increased width for desktop */
        margin: 0 20px; /* Slightly larger margins */
    }

    .searchBar {
        font-size: 14px;
    }

    .searchIcon {
        font-size: 18px;
    }

    .logoContainer {
        justify-content: space-between; /* Restore default justification */
    }

    .header .logoContainer img {
        margin-left: 1rem; /* Restore left margin */
        margin-right: 0;
    }
}

@media (min-width: 1200px) { /* Large desktop styles */
    .searchContainer {
        max-width: 500px; /* Even wider for large screens */
    }

    .searchBar {
        font-size: 16px; /* Larger font size for better readability */
        padding: 10px; /* More padding for larger screens */
    }

    .searchIcon {
        font-size: 20px; /* Larger icon */
    }
}


