* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Merriweather Sans', serif;
}

/* Main Header Styling */
.header {
    font-family: 'Merriweather', serif;
    background-color: #ffffff;
    padding: 15px 20px;
    border-bottom-left-radius: 20px;
    border-bottom-right-radius: 20px;
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.1);
}

.header .dropdown {
    display: flex;
    align-items: center;
    /* Rata tengah dengan elemen lain */
    margin-left: auto;
    /* Dorong ke kanan */
}

.header .hamburger {
    display: flex;
    align-items: center;
    /* Untuk ikon hamburger */
    margin-left: 10px;
    /* Spasi antara dropdown dan hamburger */
}

.navbar {
    display: flex;
    align-items: center;
    justify-content: space-around;
    flex-wrap: wrap;
    width: 100%;
    position: relative !important;
    padding: 0 20px;
}

/* Logo and Brand Name */
.brand-logo {
    width: 50px;
    height: 50px;
    align-items: center !important;
}

.brand-name {
    font-weight: bold;
    color: #005f73;
    font-family: 'Merriweather', serif;
    font-size: 2em;
}

/* Logo and Brand Name Wrapper */
.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    white-space: nowrap;
    /* Mencegah teks Logic Coffee terpisah */
    flex-shrink: 0;
}

/* Navigation Links */
.nav-links {
    display: flex;
    font-family: 'Merriweather Sans', serif;
    flex-wrap: wrap;
}

.nav-links a {
    text-decoration: none;
    color: #005f73;
    font-weight: 500;
    font-size: large;
    padding: 8px 12px;
    font-family: 'Merriweather Sans', serif;
    position: relative;
    gap: 50%;
}

.nav-links a:hover {
    color: #20B2AA;
}

.nav-links a::after {
    content: "";
    position: absolute;
    bottom: 0px;
    left: 50%;
    width: 0;
    height: 2px;
    background-color: #20B2AA;
    transition: all 0.3s ease;
    border-radius: 5px;
}

.nav-links a:hover::after {
    width: 100%;
    left: 0;
}

/* Search Bar */
.search-bar {
    display: flex;
    align-items: center;
    background-color: #f0f0f0;
    border-radius: 10px;
    padding: 5px;
    max-width: 400px;
    margin-right: 10px;
    transition: box-shadow 0.3s ease;
    margin-left: 10px;
}

.search-bar:hover {
    box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.2);
}

.search-bar input {
    font-family: "Merriweather Sans", serif;
    border: none;
    background: transparent;
    outline: none;
    width: 100%;
    padding-left: 5px;
    font-size: 0.9em;
}

.search-bar input:focus {
    outline: none;
}

.search-button {
    background-color: #D5B561;
    border: none;
    padding: 10px 15px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 1em;
    height: 100%;
    display: flex;
    align-items: center;
    transition: background-color 0.3s ease;
}

.search-button:hover {
    background-color: #FFBD59;
}

.profile {
    cursor: pointer;
}

.btn-login {
    background-color: #005f73;
    /* Warna tombol */
    color: #ffffff;
    /* Warna teks */
    border: none;
    /* Menghilangkan border */
    border-radius: 5px;
    /* Membuat sudut tombol melengkung */
    padding: 10px 20px;
    /* Jarak di dalam tombol */
    font-size: 14px;
    /* Ukuran teks */
    cursor: pointer;
    /* Mengubah kursor menjadi pointer saat hover */
    display: inline-flex;
    /* Untuk ikon dan teks sejajar */
    align-items: center;
    /* Menyelaraskan ikon dan teks secara vertikal */
    gap: 5px;
    /* Memberi jarak antara ikon dan teks */
    font-family: "Poppins", serif;
    margin-left: 10px;
}

.btn-login:hover {
    background-color: #20B2AA;
    /* Warna saat tombol di-hover */
}

.btn-login i {
    font-size: 16px;
    /* Ukuran ikon */
}


.header-login {
    font-family: "Signika", Arial, sans-serif;
    background-color: #ffffff;
    padding: 15px 20px;
    border-bottom-left-radius: 20px;
    border-bottom-right-radius: 20px;
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.1);
}

/* Dropdown Style */
.dropdown {
    position: relative;
    margin-left: 0;
    /* Agar dropdown berada di sisi kanan */
}

.dropdown a {
    display: flex;
    align-items: center;
    justify-content: end;
    text-decoration: none;
    color: #005f73;
    text-decoration: none;
    font-weight: 500;
    font-size: large;
    padding: 8px 12px;
    border-radius: 4px;
    /* Panjang tetap untuk Pengguna */
    text-align: center;
    /* Teks berada di tengah */
    font-family: "Signika", Arial, sans-serif;
}

.dropdown a:hover {
    color: #20B2AA;
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    color: #20B2AA;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    /* Panjang menu sama dengan "Pengguna" */
    padding: 0;
    /* Hilangkan padding untuk konsistensi */
    z-index: 1000;
}

.dropdown-menu a {
    display: flex;
    align-items: center;
    justify-content: end;
    gap: 5px;
    /* Jarak antara ikon dan teks */
    text-decoration: none;
    color: #005f73;
    padding: 10px 12px;
    /* Padding vertikal */
    text-align: center;
    /* Teks berada di tengah */
    width: 100%;
    /* Sesuaikan lebar dengan dropdown-menu */
    transition: background-color 0.3s ease;
}

.dropdown-menu a:hover {
    background-color: #20B2AA;
    color: #fff;
}

/* Hover Dropdown */
.dropdown:hover .dropdown-menu {
    display: block;
}

.dropdown-category {
    display: none;
    position: absolute;
    top: 100%;
    color: #20B2AA;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    padding: 0;
    /* Hilangkan padding untuk konsistensi */
    z-index: 1000;
}

.dropdown-category a {
    display: flex;
    align-items: center;
    justify-content: end;
    gap: 5px;
    /* Jarak antara ikon dan teks */
    text-decoration: none;
    color: #005f73;
    padding: 10px 12px;
    /* Padding vertikal */
    text-align: center;
    /* Teks berada di tengah */
    width: 100%;
    /* Sesuaikan lebar dengan dropdown-menu */
    transition: background-color 0.3s ease;
}

.dropdown-category a:hover {
    background-color: #20B2AA;
    color: #fff;
}

/* Hover Dropdown */
#dropdown-category:hover .dropdown-category {
    display: block;
}




/* Responsive Styling */
@media (max-width: 768px) {

    /* Adjust navbar layout */
    .navbar {
        flex-direction: row;
        align-items: center;
        gap: 0px;
        margin-bottom: 15px;
        margin-top: 15px;
        width: 100%;
        display: flex;
        position: relative;
        justify-content: flex-start;
    }

    /* Center align brand logo and name */
    .brand {
        justify-content: flex-start;
        width: 100%;
        flex: 1;
        display: flex;
        align-items: center;
        gap: 0px !important;
        flex-shrink: 0;
    }

    /* Pengguna dan Hamburger Menu */
    .user-cart,
    .hamburger,
    .dropdown {
        display: flex;
        align-items: center;
        gap: 0px !important;
        /* Mengatur jarak antara hamburger dan pengguna */
    }

    .dropdown {
        order: 2;
        /* Tempatkan dropdown setelah nama */
        margin-left: 10px;
        /* Tambahkan spasi kecil antara nama dan dropdown */
    }

    /* Stack nav links */
    .nav-links {
        display: none;
        flex-direction: column;
        align-items: center !important;
        background-color: #fff;
        position: absolute;
        top: 45px;
        /* Sesuaikan dengan tinggi header */
        right: 0;
        width: 100%;
        text-align: center !important;
        z-index: 1000;
        border-top: 1px solid #805700;
        max-height: 90vh;
        /* Maksimal tinggi menu agar tidak terlalu besar */
        padding: 15px;
        gap: 5px;
        border-bottom-left-radius: 20px;
        border-bottom-right-radius: 20px;
        box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.1);
    }

    .hamburger {
        display: none !important;
        /* Sembunyikan di desktop */
        font-size: 24px;
        cursor: pointer;
        margin-left: auto;
        padding: 0;
        order: 3;
    }

    /* Resize search bar */
    .search-bar {
        display: none;
        width: 100%;
        margin-right: auto;
        margin-left: auto !important;
        flex: 1;
        max-width: 100%;
        flex-grow: 1 !important;
        margin-top: 10px;
    }

    /* Search bar muncul jika hamburger menu diaktifkan */
    .search-bar.active {
        display: flex;
    }

    .search-bar input {
        width: 100%;
        /* Input search bar mengambil lebar penuh */
    }

    /* Align user and cart section to center */
    .user-cart {
        justify-content: center;
        width: 100%;
        gap: 10px;
    }

    /* Tampilkan nav-links saat active */
    .nav-links.active {
        display: flex;
    }

    .nav-links .search-bar {
        display: none;
        margin-bottom: 10px;
        /* Tambahkan margin jika perlu */
    }

    /* Hamburger Menu Tampil di Mobile */
    .hamburger {
        display: block !important;
        margin-left: auto;
    }

    /* Search bar muncul jika hamburger menu aktif */
    .nav-links.active .search-bar {
        display: flex;
        /* Tampilkan */
        width: 90%;
    }

    .header {
        padding: 2px;
        margin-bottom: 10px;
    }

    .brand-logo {
        width: 30px;
        height: 30px;
    }

}

@media (max-width: 480px) {

    /* Further adjustments for very small screens */
    .brand-name {
        font-size: 1.2em;
    }

    .nav-links a {
        display: flex;
        font-size: medium;
        text-align: right;
        padding-left: 20px;
        flex-direction: row-reverse;
        gap: 10px;
        padding: 5px;
    }

    .search-button {
        padding: 10px;
        font-size: 16px;
    }

    .navbar {
        flex-wrap: wrap;
        /* Elemen melipat jika layar sangat kecil */
    }
}