/* =========================================
   1. GLOBAL & BACKGROUND POLA TITIK
   ========================================= */
@import url('https://fonts.googleapis.com/css2?family=Nunito:wght=400;600;700;800;900&display=swap');

body {
    font-family: 'Nunito', sans-serif;
    background-color: #ffffff;
    /* Efek Pola Titik (Dotted Background) */
    background-image: radial-gradient(#d1d5db 1px, transparent 1px);
    background-size: 25px 25px;
    color: #333;
    margin: 0;
    padding: 20px;
}

h2 { 
    color: #2d6a4f; 
}

/* =========================================
   2. NAVBAR DESKTOP
   ========================================= */
.navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: #ffffff;
    padding: 10px 25px;
    border-radius: 60px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    max-width: 1200px;
    position: sticky;      /* Membuat navbar menempel */
    top: 20px;            /* Memberikan jarak dari atas layar saat melayang */
    z-index: 1000;         /* Memastikan navbar di atas elemen lain */
    margin: 0 auto 20px;   /* Margin otomatis ke tengah dan jarak bawah */
}

.nav-logo img {
    height: 40px;
    object-fit: contain;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 25px;
    margin: 0;
    padding: 0;
    align-items: center;
}

.nav-links li a {
    text-decoration: none;
    color: #4a5568; 
    font-weight: 700;
    font-size: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: color 0.3s ease;
}

.nav-links li a:hover {
    color: #ed8805; /* Warna hover menyesuaikan tema HeyaCamp */
}

.nav-links li a i {
    font-size: 18px;
}

.text-stack {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
    font-size: 14px;
    text-align: center;
}

/* =========================================
   3. KATALOG GRID (UTAMA)
   ========================================= */
.grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-top: 20px;
}

.card {
    background: white;
    padding: 15px;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.card img {
    width: 100%;
    height: 150px;
    object-fit: contain;
    border-radius: 8px;
}

.quantity-control {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
    background: #f1f5f9;
    padding: 5px 10px;
    border-radius: 8px;
    width: fit-content;
}

.btn-qty {
    background: #1e5631;
    color: white;
    border: none;
    width: 30px; height: 30px;
    border-radius: 5px;
    cursor: pointer;
}

/* =========================================
   4. FLOATING CART BADGE (KERANJANG MELAYANG)
   ========================================= */
.floating-cart {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: #ea580c; /* Warna oranye khas HeyaCamp */
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    cursor: pointer;
    box-shadow: 0 8px 25px rgba(234, 88, 12, 0.4);
    z-index: 9999; /* Tetap berada di atas elemen apa pun */
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    transform: scale(0); /* Tersembunyi default (skala 0) saat cart kosong */
}

.floating-cart:hover {
    background: #c2410c;
    transform: scale(1.1) translateY(-3px);
}

.cart-count {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #1e5631; /* Warna hijau penanda jumlah */
    color: white;
    font-size: 12px;
    font-weight: 900;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid white;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

/* Kelas Animasi Pemicu Efek Mengembang Mengagetkan */
.cart-pop {
    transform: scale(1.2) !important;
}

/* =========================================
   5. RESPONSIVE MOBILE (HP) - FIXED VERSION
   ========================================= */
@media (max-width: 768px) {
    /* 1. Sembunyikan TOTAL navbar desktop agar tidak muncul sama sekali */
    nav.navbar, .navbar { 
        display: none !important; 
    }

    /* 2. Munculkan Mobile Nav di bawah */
    .mobile-nav {
        display: flex !important;
        position: fixed;
        bottom: 0; left: 0; right: 0;
        height: 70px;
        background: white;
        justify-content: space-around;
        align-items: center;
        box-shadow: 0 -2px 15px rgba(0,0,0,0.1);
        z-index: 9999;
        border-radius: 20px 20px 0 0;
        padding-bottom: env(safe-area-inset-bottom); /* Untuk HP layar penuh/poni */
    }

    /* 3. Perbaikan Grid Katalog (2 Kolom) */
    .grid {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 12px !important;
        margin-top: 15px !important;
    }

    /* 4. Perbaikan Ukuran Card & Gambar */
    .card {
        padding: 10px !important;
    }

    .card img {
        height: 100px !important; /* Ukuran pas untuk HP */
        object-fit: contain !important;
    }

    .card h3 {
        font-size: 0.9rem !important;
    }

    /* 5. Jarak Body agar tidak tertutup menu bawah */
    body { 
        padding: 15px !important;
        padding-bottom: 100px !important; 
    }

    /* 6. Judul H2 */
    h2 {
        font-size: 1.4rem;
        margin-bottom: 10px;
    }

    /* 7. Geser posisi Keranjang Melayang ke atas agar tidak menutupi menu bawah */
    .floating-cart {
        bottom: 90px; /* Jarak aman di atas bar .mobile-nav */
        right: 20px;
        width: 55px;
        height: 55px;
        font-size: 20px;
    }

    .cart-count {
        width: 20px;
        height: 20px;
        font-size: 11px;
    }
}

/* =========================================
   6. UTILITY MOBILE NAV (DESKTOP HIDDEN)
   ========================================= */
.mobile-nav { 
    display: none; 
}

.mobile-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: #94a3b8;
    font-size: 10px;
    gap: 4px;
}

.mobile-nav-item.active { 
    color: #ed8805; 
}

.mobile-nav-item i { 
    font-size: 20px; 
}