* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', Arial, sans-serif;
}

.navbar {
    width: 100%;
    background-color: #222;
    color: white;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000;
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.1);
}

.navbar-top {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 40px;
    background-color: #1a1a1a;
}

.logo {
    max-width: 220px;
    height: auto;
}

.contact-info {
    text-align: right;
    font-size: 14px;
    color: #d3d3d3;
}
    
.contact-info p {
    margin: 3px 0;
}

.navlink {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    list-style: none;
    background-color: #333;
    box-shadow: 0px 2px 5px rgba(0, 0, 0, 0.1);
}

.nav-center {
    display: flex;
    justify-content: center;
    width: 70%;
}

.navlink li {
    margin: 0;
    position: relative;
}

.navlink a {
    color: #f5f7fa;
    text-decoration: none;
    font-size: 25px;
    font-weight: 500;
    padding: 18px 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s ease, color 0.3s ease;
    height: 100%;
}

.navlink li:hover {
    background-color: #f5f7fa;
}

.navlink li:hover a {
    color: #333; /* dark text on light background */
}

.nav-right {
    margin-left: auto;
    display: flex;
    align-items: center;
}

.dropdown {
    position: relative;
}

.dropbtn {
    background-color: transparent;
    color: #f5f7fa;
    padding: 15px 20px;
    border: none;
    cursor: pointer;
    font-size: 18px;
    font-weight: 500;
    transition: color 0.3s ease;
}

.dropbtn:hover {
    color: #9ab6d2;
}

.dropdown-content {
    display: none;
    position: absolute;
    background-color: #f5f7fa;
    padding: 20px;
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.2);
    z-index: 10;
    width: 70vw;
    left: 50%;
    transform: translateX(-50%);
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    border-radius: 0;
}

.dropdown-content a {
    background-color: #f5f7fa;
    color: #333;
    text-align: center;
    text-decoration: none;
    font-size: 16px;
    font-weight: 500;
    transition: background-color 0.3s ease, transform 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 60px;
}

.dropdown-content a:hover {
    background-color: #9ab6d2;
    color: #1a1a1a;
    transform: translateY(-3px);
    box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.1);
}

.dropdown:hover .dropdown-content {
    display: grid;
}

.search-form {
    display: flex;
    align-items: center;
    background-color: #444;
    border-radius: 5px;
    overflow: hidden;
}

.search-form input {
    padding: 8px 12px;
    border: none;
    outline: none;
    font-size: 14px;
    background-color: #555;
    color: #f5f7fa;
    width: 200px;
}

.search-form button {
    padding: 8px 12px;
    border: none;
    background-color: #9ab6d2;
    color: #1a1a1a;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.search-form button:hover {
    background-color: #b7e6ca;
}

.fas.fa-shopping-cart {
    position: relative;
    font-size: 22px;
    color: #9ab6d2;
    margin-left: 20px;
    transition: color 0.3s ease, box-shadow 0.3s ease;
}

.fas.fa-shopping-cart:hover {
    color: #b7e6ca;
}

.cart-icon {
    position: relative;
    margin-left: 20px;
}

.cart-count {
    position: absolute;
    top: -8px;
    right: -10px;
    background-color: #cf8d8c; /* muted red tone */
    color: white;
    font-size: 12px;
    padding: 2px 6px;
    border-radius: 50%;
    font-weight: bold;
    border: 1px solid #fff;
    box-shadow: 0 0 0 2px #cf8d8c;
}

.cart-active {
    border: 2px solid #cf8d8c;
    border-radius: 6px;
    padding: 2px;
}

.hamburger {
    display: none;
    font-size: 24px;
    color: #f5f7fa;
    cursor: pointer;
    padding: 10px 20px;
}

@media (max-width: 768px) {
    .hamburger {
        display: block;
    }

    .navlink {
        display: none;
        flex-direction: column;
        width: 100%;
        background-color: #333;
    }

    .navlink.active {
        display: flex;
    }

    .navlink li {
        width: 100%;
    }

    .navlink a {
        width: 100%;
        padding: 12px 20px;
        text-align: left;
    }
}

@media (max-width: 768px) {
    .navbar-top {
        flex-direction: column;
        align-items: flex-start;
        padding: 15px;
    }

    .contact-info {
        text-align: left;
        margin-top: 10px;
    }

    .navlink {
        flex-direction: column;
        align-items: flex-start;
    }

    .nav-center,
    .nav-right {
        width: 100%;
        justify-content: flex-start;
        flex-direction: column;
        align-items: flex-start;
    }

    .dropdown-content {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100vw;
        max-height: 300px; /* Adjust as needed */
        overflow-y: auto;
        overflow-x: hidden;
        transform: none;
        padding: 10px 0;
        grid-template-columns: 1fr !important; /* stack items vertically */
    }

    
    .dropdown-content a {
        padding: 12px 16px;
        font-size: 16px;
    }
    .search-form {
        width: 100%;
    }

    .search-form input {
        width: 100%;
    }

    .logo {
        width: 180px;
    }
}


.hamburger-wrapper {
    position: relative;
    display: none; /* show only on mobile via media query */
}

.hamburger-cart-badge {
    position: absolute;
    top: -4px;
    right: -6px;
    background-color: #cf8d8c;
    color: white;
    font-size: 12px;
    font-weight: bold;
    border-radius: 50%;
    padding: 2px 6px;
    border: 2px solid #333;
    box-shadow: 0 0 3px rgba(0, 0, 0, 0.3);
}

@media (max-width: 768px) {
    .hamburger-wrapper {
        display: inline-block;
    }

    .hamburger {
        font-size: 24px;
        color: #f5f7fa;
        cursor: pointer;
        padding: 10px 20px;
    }
}

