/* ================================
   menu.css
   ================================ */

/* ========== Reset and Fonts ========== */
* {
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

:root {
    --green: #e71c1c;
    --white: #efefef;
    --orange: #efefef;
    --red: #e71c1c;
}

/* ===============================
   DESKTOP STYLES
   =============================== */

/* Navbar */
.navbar {
    position: sticky;
    top: 0;
    background: var(--white);
    padding: 1rem 0;
    display: flex;
    justify-content: center; /* centers the navbar-inner */
    align-items: center;
    border-bottom: 1px solid rgb(224, 224, 224);
    z-index: 1000;
}

.navbar-inner {
    width: 90%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Logo */
.logo img {
    height: 70px;
    transition: transform 0.3s ease;
}
.logo:hover img {
    transform: scale(1.05);
}

/* Search Bar */


.search-bar {
    
    flex: 1;
    display: flex;
    justify-content: center;
    margin: 0 2rem;
}
.search-bar form {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.search-bar input[type="search"] {
    padding: 0.6rem 1rem;
    border: 2px solid #e0e0e0;
    border-radius: 25px;
    width: 250px;
    transition: all 0.3s ease;
}
.search-bar input[type="search"]:focus {
    outline: none;
    border-color: var(--green);
    box-shadow: 0 0 8px rgba(231, 28, 28, 0.2);
}
.btn-search {
    background: var(--green);
    color: var(--white);
    border: none;
    padding: 0.6rem 1.5rem;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
}
.btn-search:hover {
    transform: translateY(-2px);
}

/* Account Section */
.account {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

/* Desktop Icons + Login/Register */
.account-nav {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

/* Icons */
.desktop-icons {
    display: flex;
    align-items: center;
    gap: 1rem;
}
.desktop-icon {
    width: 45px;     /* increased from 26px */
    height: 45px;    /* increased from 26px */
    object-fit: contain;
    cursor: pointer;
    transition: transform 0.2s ease;
}
.desktop-icon:hover {
    transform: scale(1.15);
}

.account-nav ul li a img.desktop-icon {
    margin-left: 5px;
    width: 30px;
    height: 30px;
    object-fit: contain;
    vertical-align: middle;
}

.login-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: white;
    color: #333;
    padding: 0.4rem 1rem;
    border-radius: 25px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    font-weight: 500;
    font-size: 0.95rem;
    text-decoration: none;
    transition: all 0.3s ease;
}

.login-btn:hover {
    background: #f5f5f5;
    color: var(--green);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
}

.login-btn img.desktop-icon {
    width: 26px;
    height: 26px;
    object-fit: contain;
    vertical-align: middle;
}



/* Login/Register Links */
.account-nav ul {
    display: flex;
    align-items: center;
    gap: 1rem;
    list-style: none;
    margin: 0;
    padding: 0;
}
.account-nav ul li a {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.3s ease;
}
.account-nav ul li a:hover {
    color: var(--green);
}

.cart-icon-wrapper {
    position: relative;
    display: inline-block;
}

.cart-count {
    position: absolute;
    top: -6px;
    right: -4px;
    background: var(--red);
    color: white;
    font-size: 12px;
   
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.15);
}

/* ===============================
   MOBILE STYLES
   =============================== */

.mobile-account-nav {
    display: none;
    gap: 1rem;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.mobile-icon {
    width: 40px;
    height: 40px;
    transition: transform 0.2s ease;
}

.mobile-icon:hover {
    transform: scale(1.1);
}

.mobile-searchbar {
    display: none;
    width: 100%;
    background-color: var(--white);
    justify-content: center;
}

.mobile-searchbar form {
    display: flex;
    width: 100%;
}

.mobile-searchbar input[type="search"] {
    flex: 1;
    padding: 0.8rem 1.2rem;
    border: 0;
    font-size: 1rem;
}

.mobile-btnsearch {
    background: var(--green);
    color: var(--white);
    border: none;
    padding: 5px 15px;
    font-size: 1rem;
    cursor: pointer;
}

/* Responsive */
@media only screen and (max-width: 768px) {
    .navbar {
        flex-direction: column;
        padding: 0;
        gap: 0;
        width: 100%;
    }

    .navbar-inner {
        width: 100%;
        padding: 0 10px; /* optional slight padding */
        box-sizing: border-box;
    }

    .logo img {
        height: 80px;
    }

    .search-bar {
        display: none;
    }

    .account-nav {
        display: none;
    }

    .mobile-account-nav {
        display: flex;
        justify-content: space-between;
        width: 100%;
        padding: 0.8rem 10px;
        box-sizing: border-box;
    }

    .mobile-icon {
        width: 42px;
        height: 42px;
    }

    .mobile-searchbar {
        display: flex;
        width: 100%;
    }
}
