/* Header Section */
.header-section {
    background-color: #fff;
    border-bottom: 1px solid #e0e0e0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    width: 100%;
    height: 80px;
    display: flex;
    align-items: center;
    padding: 0 5px;
    position: fixed;
    top: 0;
    z-index: 1000;
    justify-content: space-between;
    background-image: url('/images/bg.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;}

/* Hamburger Menu Toggle */
.menu-toggle-category {
    cursor: pointer;
    border: none;
    background: none;
    display: none; /* Hidden on large screens */
    align-items: center;
    font-size: 24px;
    color: #333;
}

.menu-toggle-category:hover {
    color: #1a73e8;
    transition: color 0.3s;
}

/* Logo */
.logo {
    height: 60px;
    width: 60px;
    display: none;
}

.logo img {
    height: 100%;
    width: 100%;
    object-fit: contain;
}

/* Header (Search and Navigation) */
.header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex: 1;
    margin-left: 4px;
    width: 100%;
}

/* Search Form */
.search-form {
    display: flex;
    align-items: center;
    width: 100%;
    max-width: 600px;
}

.search-form form {
    display: flex;
    align-items: center;
    width: 100%;
    background-color: #f0f0f0;
    border-radius: 25px;
    padding: 5px 5px;
    transition: box-shadow 0.3s;
}

.search-form form:hover {
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.2);
}
.search-category{
    border: none;
    background: none;
}

.category-opener {
    margin-right: 10px;
    display: flex;
    align-items: center;
}

.category-opener label {
    margin-right: 5px;
    font-size: 14px;
    color: #555;
}

.category-opener select.category {
    padding: 5px 10px;
    border: none;
    border-radius: 15px;
    background-color: #fff;
    cursor: pointer;
    font-size: 14px;
}

.category-opener select.category:focus {
    outline: none;
    box-shadow: 0 0 5px rgba(26, 115, 232, 0.5);
}

.search-input {
    flex: 1;
    border: none;
    background: transparent;
    padding: 10px;
    font-size: 16px;
}

.search-input:focus {
    outline: none;
}

.search-button {
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    color: #555;
    font-size: 18px;
}

.search-button:hover {
    color: #1a73e8;
    transition: color 0.3s;
}
/* Navigation */
.header-nav {
    display: flex;
    align-items: center;
}

.header-nav li {
    margin-left: 20px;
    position: relative;
}

.header-nav li a,
.header-nav li span {
    display: flex;
    align-items: center;
    font-size: 14px;
    color: #555;
    cursor: pointer;
    transition: color 0.3s;
}

.header-nav li a:hover,
.header-nav li span:hover {
    color: #1a73e8;
}

/*.deliver-to::after {
    margin-left: 5px;
    font-size: 12px;
}*/

.user-profile span i {
    margin-right: 2px;
}

.cart-li {
    position: relative;
}

.cart-container {
    display: flex;
    align-items: center;
    position: relative;
    cursor: pointer;
}

.cart-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-left: 5px;
}

.cart-info i {
    font-size: 16px;
    color: #1a73e8;
}

.cart-info span {
    font-size: 12px;
    color: #555;
    margin-top: 2px;
}
.cart-count {      /* or flex if it's block */
    align-items: center;        /* vertical center */
    justify-content: center;
    position: absolute;
    top: -5px;
    right: -5px;
    background-color: red;
    width: 20px;
    height: 20px;
    overflow: hidden;
    color: white;
    text-align: center;
    border-radius: 50%;
    padding: 0.3em;
    font-size: 0.6em;
    display: none;
}

/* Dropdown for Deliver to */
.deliver-to:hover .deliver-options {
    display: block;
}

.deliver-options {
    display: none;
    position: absolute;
    top: 20px;
    left: 0;
    background-color: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    padding: 10px;
    z-index: 1000;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.deliver-options a {
    display: block;
    padding: 5px 10px;
    color: #333;
    font-size: 14px;
}

.deliver-options a:hover {
    background-color: #f0f0f0;
    color: #1a73e8;
}

/* User Profile Dropdown */
/*.user-profile:hover .profile-options {
    display: block;
}*/
.user-profile:hover .account-links {
    display: flex;
}
.account-links {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 40px;
    width: 200px;
    right: 0;
    background-color: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    padding: 20px 10px;
    z-index: 1000;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.account-links a {
    text-decoration: none;
    color: #333;
    gap: 10px;
    font-size: 16px;
    display: flex;
    align-items: center;
    padding: 2px;
    transition: color 0.3s;
}

.account-links a:hover {
    color: #ff5722;
}

.account-links i {
    color: #ff5722;
    font-size: 18px;
}
/* Profile container */
.profile-container {
    display: flex;
    align-items: center;
    padding: 2px;
    border-radius: 8px; /* Rounded corners */
}

/* Profile image */
.profile-image {
    width: 40px;
    height: 40px;
    border-radius: 50%; /* Circular image */
    object-fit: cover; /* Ensure image scales properly */
    margin-right: 10px;
    border: 2px solid #ddd; /* Light border */
}

/* Username text */
.user-name {
    font-size: 16px;
    font-weight: 500;
    color: #333; /* Dark text color */
    margin: 0; /* Remove default margin */
    white-space: nowrap; /* Prevent text wrap */
}

@media (max-width: 540px){
    .user-name{
        display: none;
    }
}
@media (max-width: 767px) {
    .header nav {
        display: flex;
        width: 100%;
        justify-content: left;
    }
    /* Show Hamburger Menu */
    .menu-toggle-category {
        display: flex;
    }
    .search-button{
        display: none;
    }

    /* Hide Left Navigation and Ads by default */
    .left-nav-section{
        display: none;
    }
    /* Hide Deliver to */
    .deliver-to {
        display: none;
    }

    /* Simplify Cart Container */
    .cart-info {
        display: none; /* Hide the text, show only the icon with badge */
    }

    /*.cart-li::after {
        top: -5px;
        right: -10px;
        padding: 2px 6px;
        font-size: 12px;
    }*/

    /* Hide Category in Search Form */
    .category-opener {
        display: none;
    }

    /* Ensure Search Form is Full Width */
    .search-form {
        width: 40%;
        max-width: none;
    }
}
@media (min-width: 768px) and (max-width: 1023px) {
    .logo{
        display: block;
    }


}
/* Large Screens (Desktop) */
@media (min-width: 1024px) {
    .header-section {
        padding: 0 40px;
    }

    .logo {
        display: block;
        width: 150px;
    }

    .search-form form {
        max-width: 700px;
    }

    .cart-nav {
        display: block;
    }

    .cart-li::after {
        top: -5px;
        right: -15px;
        padding: 4px 8px;
        font-size: 14px;
    }

    .cart-info i {
        font-size: 18px;
    }

    .cart-info span {
        font-size: 14px;
    }


    /* Hide Hamburger Menu */
    .menu-toggle-category {
        display: none;
    }

    /* Show Deliver to */
    .deliver-to {
        display: flex;
    }

    /* Show Category in Search Form */
    .category-opener {
        display: flex;
        align-items: center;
    }
}
