:root {
    --bg-dark: #070a0f;
    --bg-surface: #0f141e;
    --primary: #10b981;
    --primary-glow: rgba(16, 185, 129, 0.3);
    --text-white: #f1f5f9;
    --text-dim: #94a3b8;
    --font-main: 'Plus Jakarta Sans', sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
body { background-color: var(--bg-dark); color: var(--text-white); font-family: var(--font-main); overflow-x: hidden; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 25px; }

/* --- Navbar Pojok Kiri & Kanan --- */
.navbar { padding: 25px 0; background: rgba(7, 10, 15, 0.85); backdrop-filter: blur(15px); position: fixed; width: 100%; top: 0; z-index: 1000; border-bottom: 1px solid rgba(255, 255, 255, 0.05); }

.nav-flex {
    display: flex;
    justify-content: space-between; /* Kunci Logo di kiri, Menu di kanan */
    align-items: center;
}

.logo { font-size: 1.6rem; font-weight: 800; text-decoration: none; color: #fff; letter-spacing: -1px; }
.logo span { color: var(--primary); }

.nav-links { display: flex; align-items: center; gap: 40px; }
.nav-links a {
    text-decoration: none;
    color: var(--text-dim);
    font-weight: 600;
    font-size: 0.95rem;
    transition: 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
}
.nav-links a:hover { color: var(--primary); }

.cart-icon { position: relative; cursor: pointer; font-size: 1.2rem; padding: 10px; background: rgba(255, 255, 255, 0.05); border-radius: 12px; }
#cart-count { position: absolute; top: -5px; right: -5px; background: var(--primary); color: #000; font-size: 0.7rem; font-weight: 800; width: 20px; height: 20px; border-radius: 50%; display: flex; align-items: center; justify-content: center; }

/* Hero Section */
.hero { height: 100vh; display: flex; align-items: center; justify-content: center; text-align: center; position: relative; }
.glow-effect { position: absolute; width: 500px; height: 500px; background: var(--primary); filter: blur(150px); opacity: 0.1; z-index: -1; }
.badge { background: rgba(16, 185, 129, 0.1); color: var(--primary); padding: 6px 16px; border-radius: 30px; font-size: 0.8rem; font-weight: 700; display: inline-block; margin-bottom: 20px; border: 1px solid var(--primary); }
.hero h1 { font-size: clamp(2.5rem, 6vw, 4rem); font-weight: 800; line-height: 1.1; margin-bottom: 25px; }
.text-emerald { color: var(--primary); text-shadow: 0 0 20px var(--primary-glow); }
.hero p { color: var(--text-dim); max-width: 600px; margin: 0 auto 40px; font-size: 1.1rem; }
.btn-primary { background: var(--primary); color: #000; padding: 16px 40px; border-radius: 14px; border: none; font-weight: 700; cursor: pointer; transition: 0.3s; font-size: 1rem; }

/* Catalog Page */
.page { display: none; padding: 140px 0 80px; min-height: 90vh; animation: fadeIn 0.5s ease; }
.page.active { display: block; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.section-title { text-align: center; margin-bottom: 60px; }
.catalog-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 30px; }
.card { background: var(--bg-surface); padding: 40px; border-radius: 24px; border: 1px solid rgba(255, 255, 255, 0.05); transition: 0.4s; }
.card .price { display: block; font-size: 2rem; font-weight: 800; color: var(--primary); margin: 20px 0; }
.btn-add { width: 100%; padding: 14px; background: rgba(255, 255, 255, 0.03); border: 1px solid rgba(255, 255, 255, 0.1); color: #fff; border-radius: 12px; font-weight: 700; cursor: pointer; }
.btn-add:hover { background: var(--primary); color: #000; }

/* Modals */
.modal-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0, 0, 0, 0.9); display: none; align-items: center; justify-content: center; z-index: 2000; backdrop-filter: blur(10px); padding: 20px; }
.modal-overlay.active { display: flex; animation: modalFade 0.3s ease; }
.cart-top { align-items: flex-start !important; padding-top: 80px; }
@keyframes modalFade { from { opacity: 0; transform: translateY(-20px); } to { opacity: 1; transform: translateY(0); } }

.modal-content { background: var(--bg-surface); width: 100%; max-width: 500px; border-radius: 28px; border: 1px solid rgba(255,255,255,0.1); overflow: hidden; }
.modal-header { padding: 25px; border-bottom: 1px solid rgba(255,255,255,0.05); display: flex; justify-content: space-between; align-items: center; }
.btn-close { background: none; border: none; color: #fff; font-size: 2rem; cursor: pointer; }
.modal-body { padding: 20px; max-height: 400px; overflow-y: auto; }

/* Item Keranjang */
.cart-item { display: flex; justify-content: space-between; align-items: center; background: rgba(255,255,255,0.03); padding: 15px; border-radius: 16px; margin-bottom: 12px; }
.qty-controls { display: flex; align-items: center; gap: 12px; }
.btn-qty { background: rgba(255,255,255,0.1); border: none; color: #fff; width: 30px; height: 30px; border-radius: 8px; cursor: pointer; }
.btn-qty:hover { background: var(--primary); color: #000; }
.qty-val { font-weight: 700; min-width: 20px; text-align: center; }

.modal-footer { padding: 25px; background: rgba(0,0,0,0.2); }
.footer-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.btn-clear { background: none; border: none; color: #ef4444; cursor: pointer; font-weight: 600; }
.btn-checkout { background: #25d366; color: #fff; border: none; width: 100%; padding: 18px; border-radius: 15px; font-weight: 700; cursor: pointer; }

/* Confirm Box Style (TIDAK DIUBAH) */
.confirm-box { max-width: 380px; text-align: center; }
.confirm-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }
.btn-secondary { background: rgba(255,255,255,0.05); color: #fff; border: 1px solid rgba(255,255,255,0.1); padding: 12px; border-radius: 12px; cursor: pointer; }
.btn-danger { background: #ef4444; color: #fff; border: none; padding: 12px; border-radius: 12px; cursor: pointer; font-weight: 700; }

/* Footer */
.footer { padding: 80px 0 0; background: #040609; border-top: 1px solid rgba(255, 255, 255, 0.05); }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr; gap: 80px; padding-bottom: 60px; }
.social-links { display: flex; gap: 15px; margin-top: 20px; }
.social-links a { width: 45px; height: 45px; background: rgba(255, 255, 255, 0.05); display: flex; align-items: center; justify-content: center; border-radius: 12px; color: var(--primary); text-decoration: none; transition: 0.3s; }
.social-links a:hover { background: var(--primary); color: #000; transform: translateY(-5px); }
.f-contact p { color: var(--text-dim); margin-bottom: 15px; display: flex; align-items: center; }
.f-contact i { color: var(--primary); margin-right: 12px; }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, 0.05); padding: 30px 0; text-align: center; color: #475569; font-size: 0.85rem; }

/* --- OPTIMASI MOBILE PREMIUM --- */
@media (max-width: 768px) {
    .nav-links {
        position: fixed;
        bottom: 25px;
        left: 50%;
        transform: translateX(-50%);
        background: rgba(15, 20, 30, 0.85);
        backdrop-filter: blur(20px);
        padding: 15px 30px;
        border-radius: 25px;
        border: 1px solid rgba(255, 255, 255, 0.1);
        gap: 35px;
        width: 85%;
        justify-content: center;
        box-shadow: 0 15px 35px rgba(0,0,0,0.6);
        z-index: 1001;
    }

    .nav-links a span { display: none; } /* Hanya ikon di mobile */
    .nav-links a { font-size: 1.3rem; }

    .hero h1 { font-size: 2.2rem; }
    .catalog-grid { grid-template-columns: 1fr; }
    .modal-content { max-width: 95%; margin-bottom: 100px; }
    .footer-grid { grid-template-columns: 1fr; text-align: center; gap: 40px; }
    .social-links, .f-contact p { justify-content: center; }
}

/* --- ANIMASI KLIK TOMBOL --- */
.btn-add {
    transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275), background 0.3s;
    position: relative;
    overflow: hidden;
}

/* Class yang akan dipicu oleh JavaScript */
.btn-clicked {
    transform: scale(0.9);
    background: var(--primary) !important;
    color: #000 !important;
}

/* Animasi tambahan: Efek partikel melayang (Opsional) */
@keyframes popOut {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.animate-pop {
    animation: popOut 0.4s ease-out;
}

/* Feedback visual pada ikon keranjang saat item bertambah */
@keyframes cartBounce {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.3) rotate(-10deg); }
}

.cart-icon-animate {
    animation: cartBounce 0.5s ease;
}

/* Container Filter */
.category-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
    margin-bottom: 40px;
    padding: 0 10px;
}

/* Tombol Filter */
.filter-btn {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-dim);
    padding: 10px 20px;
    border-radius: 30px;
    font-family: var(--font-main);
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-btn:hover {
    border-color: var(--primary);
    color: var(--text-white);
}

.filter-btn.active {
    background: var(--primary);
    color: #000;
    border-color: var(--primary);
    box-shadow: 0 0 15px var(--primary-glow);
}

/* Card Badge (Kategori di dalam Kartu) */
.card-badge {
    display: inline-block;
    background: rgba(16, 185, 129, 0.1);
    color: var(--primary);
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    margin-bottom: 12px;
    border: 1px solid rgba(16, 185, 129, 0.2);
}

/* Responsif Mobile untuk Filter */
@media (max-width: 768px) {
    .category-filter {
        gap: 8px;
    }
    .filter-btn {
        padding: 8px 15px;
        font-size: 0.75rem;
    }
}