
/* =========================
   NAVBAR BELIBELI
========================= */

.topbar {
    width: 100%;
    background: #ffffff;
    border-bottom: 1px solid #e8ebdf;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar {
    max-width: 1200px;
    min-height: 76px;
    margin: 0 auto;
    padding: 0 24px;

    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
}

/* Logo */

.navbar-logo {
    display: flex;
    align-items: center;
    gap: 9px;

    color: #365314;
    text-decoration: none;
    font-size: 25px;
    font-weight: 800;
    white-space: nowrap;
}

.logo-icon {
    font-size: 29px;
}

/* Menu */

.navbar-menu {
    display: flex;
    align-items: center;
    gap: 28px;
}

.navbar-menu a {
    color: #44483c;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    transition: color 0.2s;
}

.navbar-menu a:hover {
    color: #5b821c;
}

/* Tombol kanan */

.navbar-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    white-space: nowrap;
}

.navbar-actions a {
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
}

.navbar-cart {
    display: flex;
    align-items: center;
    gap: 7px;
    color: #374151;
    padding: 10px 12px;
}

.cart-count {
    min-width: 22px;
    height: 22px;
    padding: 0 6px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    background: #eaf5d5;
    color: #456817;
    border-radius: 50px;
    font-size: 12px;
    font-weight: 700;
}

.navbar-login {
    color: #456817;
    padding: 11px 18px;
    border: 1px solid #dce6cc;
    border-radius: 9px;
}

.navbar-login:hover {
    background: #f4f8eb;
}

.navbar-register {
    background: #4d7018;
    color: #ffffff;
    padding: 12px 20px;
    border-radius: 9px;
}

.navbar-register:hover {
    background: #3d5b12;
}

/* Responsive HP */

@media (max-width: 900px) {
    .navbar {
        flex-wrap: wrap;
        padding: 16px 20px;
        gap: 15px;
    }

    .navbar-menu {
        order: 3;
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
        gap: 18px;
    }

    .navbar-actions {
        margin-left: auto;
    }
}

@media (max-width: 520px) {
    .navbar {
        padding: 14px;
    }

    .navbar-logo {
        font-size: 21px;
    }

    .navbar-actions {
        gap: 6px;
    }

    .navbar-cart {
        padding: 8px;
        font-size: 12px !important;
    }

    .navbar-login,
    .navbar-register {
        padding: 9px 12px;
        font-size: 12px !important;
    }

    .navbar-menu {
        gap: 13px;
    }

    .navbar-menu a {
        font-size: 12px;
    }
}

/* Tombol tambah ke keranjang */

.add-cart-form {
    width: 100%;
    margin-top: 12px;
}

.add-cart-button {
    width: 100%;
    min-height: 42px;
    padding: 10px 14px;

    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;

    border: 1px solid #d8e6c2;
    border-radius: 9px;
    background: #f0f7e4;
    color: #456817;

    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}

.add-cart-button:hover {
    background: #4d7018;
    border-color: #4d7018;
    color: #ffffff;
}

/* Keranjang pada navbar */

.navbar-cart {
    display: flex;
    align-items: center;
    gap: 7px;
    text-decoration: none;
    color: #374151;
    font-size: 14px;
    font-weight: 600;
}

.cart-count {
    min-width: 22px;
    height: 22px;
    padding: 0 6px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    border-radius: 50px;
    background: #eaf5d5;
    color: #456817;
    font-size: 12px;
    font-weight: 800;
}

/* =========================================
   FIX NAVBAR BELIBELI
   Konsisten untuk index, keranjang,
   masuk, dan daftar
========================================= */

/* Font dan warna dasar navbar */
.topbar,
.topbar .navbar,
.topbar .navbar a,
.topbar .navbar span {
    font-family: Arial, Helvetica, sans-serif !important;
    box-sizing: border-box;
}

/* Logo */
.topbar .navbar-logo {
    color: #365314 !important;
    font-size: 25px !important;
    font-weight: 800 !important;
    text-decoration: none !important;
}

.topbar .navbar-logo span {
    color: inherit;
    font-weight: 800 !important;
}

.topbar .logo-icon {
    font-size: 29px !important;
}

/* Menu navbar */
.topbar .navbar-menu a {
    color: #44483c !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    text-decoration: none !important;
}

.topbar .navbar-menu a:hover {
    color: #5b821c !important;
}

/* Area tombol kanan */
.topbar .navbar-actions a {
    font-size: 14px !important;
    font-weight: 600 !important;
    text-decoration: none !important;
}

/* Keranjang */
.topbar .navbar-actions .navbar-cart {
    color: #374151 !important;
    font-weight: 600 !important;
}

.topbar .navbar-actions .cart-count {
    background: #eaf5d5 !important;
    color: #456817 !important;
    font-size: 12px !important;
    font-weight: 700 !important;
}

/* Tombol Masuk */
.topbar .navbar-actions .navbar-login {
    color: #456817 !important;
    font-weight: 600 !important;
    border: 1px solid #dce6cc !important;
    background: transparent !important;
}

/* Tombol Daftar */
.topbar .navbar-actions .navbar-register {
    background: #4d7018 !important;
    color: #ffffff !important;
    font-weight: 600 !important;
    border: 1px solid #4d7018 !important;
}

.topbar .navbar-actions .navbar-register:hover {
    background: #3d5b12 !important;
    color: #ffffff !important;
}

/* Jaga ukuran navbar */
.topbar {
    background: #ffffff !important;
    border-bottom: 1px solid #e8ebdf !important;
}

.topbar .navbar {
    min-height: 76px;
}

/* INFORMASI AKUN PENGGUNA */

.navbar-user {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-left: 20px;
}

.navbar-user-name {
    color: #2f6b45;
    font-size: 13px;
    font-weight: 700;
}

.navbar-logout {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 9px 16px;
    border-radius: 8px;
    background: #fff0ef;
    color: #c0392b;
    font-size: 12px;
    font-weight: 700;
    transition: 0.2s;
}

.navbar-logout:hover {
    background: #c0392b;
    color: white;
}

@media (max-width: 600px) {
    .navbar-user {
        gap: 8px;
        margin-left: 5px;
    }

    .navbar-user-name {
        font-size: 11px;
    }

    .navbar-logout {
        padding: 7px 10px;
        font-size: 11px;
    }
}