/* ──────────────────────────────── */
/* Base Header Layout              */
/* ──────────────────────────────── */
header {
    top: 0;
    width: 85%;
    margin: 0 auto;
    background-color: #282828;
    z-index: 1050;
    height: 9ppx;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid #c0c0c0; /* silverish line */
    position: relative;
/* ✨ new shadow */
}


.header-container {
    width: auto;
    max-width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: 10px;
    margin-left: 5%;
    

}

/* ──────────────────────────────── */
/* Logo                            */
/* ──────────────────────────────── */
.logo {
    margin-left: 1%;
    max-height: 40px;
    margin-bottom: 25%;
    cursor: pointer;
    max-width: 200px;
}

/* ──────────────────────────────── */
/* Search                          */
/* ──────────────────────────────── */
.header-search-bar {
    display: flex;
    justify-content: center;
    align-items: center;
    
    width: 90%;
margin-top: 10px;

}

#headerSearchInput {
    padding: 10px;
    font-size: 16px;
    border: 1px solid #ccc;
    border-radius: 5px;
    width: 80%;
    max-width: 500px;
    box-sizing: border-box;
}

.header-search-button {
    background-color: #fff;
    border: 1px solid #aaa;
    border-left: none;
    border-radius: 4px 4px 4px 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 40px;
    padding: 10px 18px;
    margin-left: 2px;
}

/* ──────────────────────────────── */
/* Sidebar                         */
/* ──────────────────────────────── */
.sidebar {
    position: absolute;
    
    left: 75%;
    width: 200px;
    max-height: 0;
    overflow: hidden;
    background-color: #2a2a2a;
    transition: max-height 0.3s ease-in-out;
    z-index: 999;
    border-top: 1px solid #c0c0c0; /* silverish line */
    border-bottom: 1px solid #c0c0c0; /* silverish line */
    border-left: 1px solid #c0c0c0; /* silverish line */
    border-right: 1px solid #c0c0c0; /* silverish line */
    
}
.sidebar.sidebar-open {
    top: 78px;
     max-height: 14rem;
    transform: translateY(0);
}
.user-info {
    display: flex;
    align-items: center;
    padding: 15px;
    gap: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    cursor: pointer;
    transition: background 0.3s;
}
.user-info:hover {
    background: rgba(255, 255, 255, 0.1);
}
.user-info i {
    font-size: 30px;
    color: white;
}
.username-text {
    display: block;
    color: white;
    padding-left: 10px;
    text-decoration: none;
    background: none;
    text-align: left;
    font-size: 18px;
    cursor: pointer;
}
.account-text {
    font-size: 14px;
    color: #aaa;
    padding-left: 10px;
}
.sidebar a {
    display: block;
    padding: 12px 20px;
    font-size: 16px;
    color: white;
    text-decoration: none;
    transition: background 0.3s ease-in-out;
}
.sidebar a:hover {
    background: #3F3F3F;
}
.logout-btn {
    margin: 10px;
    padding: 12px;
    border: none;
    background: #ff4b4b;
    color: white;
    font-size: 16px;
    cursor: pointer;
    border-radius: 5px;
    transition: background 0.3s ease-in-out;
}
.logout-btn:hover {
    background: #3F3F3F;
}

/* ──────────────────────────────── */
/* Cart + Menu Buttons             */
/* ──────────────────────────────── */
.header-cart, .header-cart-small {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 10px;
    padding: 15px;
    margin-right: 5%;
    justify-content: center;
}
.header-cart {margin-top: 10px;}
.header-cart-small {
    display: none;
    margin-right: 10%;
}
.menu-btn {
    margin-top: 2px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 25px;
    color: white;
}
.cart-icon svg {
    width: 24px;
    height: 24px;
    fill: white;
}

/* ──────────────────────────────── */
/* Medium Screens (Below 1150px)   */
/* ──────────────────────────────── */
@media (max-width: 1150px) {
    .sidebar {
        left: 67%;
    }
}

/* ──────────────────────────────── */
/* Responsive for < 880px Screens  */
/* ──────────────────────────────── */
@media (max-width: 880px) {
    header {        
        position: sticky;
        top: 0;
    



        height: 130px;
        flex-direction: column;
        align-items: flex-start;
        justify-content: center;
    }

    .header-container {
        height: 30%;
        flex-direction: row;
        justify-content: space-between;
        width: 100%;
        margin-top: 0;

    }

.logo {margin-bottom: 3.5%; }

    .header-search-bar {
        width: 100%;
        display: flex;
        justify-content: center;
        order: 3;
        margin-top: 10px;
        margin-bottom: 10px;
    }

    #headerSearchInput {
        width: 80%;
        max-width: 400px;
    }

    .header-search-button {
        height: 40px;
        width: 30px;
    }

    .sidebar {
        width: 65%;
        left: 17.5%;
        top: 129px;
       
    }
.sidebar.sidebar-open {
    top: 129px;
     max-height: 14rem;
    transform: translateY(0);
}
    .logged-in .sidebar {
        margin-top: 60px;
    }

    .logged-out .sidebar {
        margin-top: 0px;
    }

    .header-cart {
        display: none;
    }

    .header-cart-small {
        display: flex;
    }
}
