/* =========================================
   1. SETUP UTAMA & FONT
   ========================================= */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

:root {
    /* Warna Utama (Sesuai Gambar) */
    --primary: #6366f1;       /* Indigo utama */
    --primary-dark: #4f46e5;  /* Indigo gelap (hover) */
    --secondary: #8b5cf6;     /* Ungu */
    --accent: #f59e0b;        /* Kuning/Orange (Flash Sale) */
    
    /* Background */
    --bg-app: #f8fafc;        /* Slate-50 (Latar Belakang Aplikasi) */
    --bg-card: #ffffff;
    
    /* Radius (Sudut Membulat Ekstrem) */
    --radius-xl: 2rem;        /* 32px (Card Besar) */
    --radius-l: 1.5rem;       /* 24px (Tombol/Input) */
    --radius-m: 1rem;         /* 16px (Icon Box) */
    
    /* Bayangan (Soft Shadow) */
    --shadow-soft: 0 10px 40px -15px rgba(0,0,0,0.05);
    --shadow-glow: 0 20px 40px -10px rgba(99, 102, 241, 0.3);
}

body {
    font-family: 'Plus Jakarta Sans', sans-serif;
    background-color: var(--bg-app);
    color: #1e293b; /* Slate-800 */
    -webkit-tap-highlight-color: transparent; /* Hilangkan highlight biru di mobile */
    padding-bottom: 80px; /* Ruang untuk bottom nav */
}

/* Scrollbar Sembunyi (Untuk Kategori) */
.no-scrollbar::-webkit-scrollbar { display: none; }
.no-scrollbar { -ms-overflow-style: none; scrollbar-width: none; }

/* Animasi Masuk */
.animate-fade-in { animation: fadeIn 0.4s cubic-bezier(0.4, 0, 0.2, 1); }
@keyframes fadeIn { 
    from { opacity: 0; transform: translateY(15px); } 
    to { opacity: 1; transform: translateY(0); } 
}

/* =========================================
   2. KOMPONEN MARKETPLACE (HOME)
   ========================================= */

/* Banner Flash Sale (Gradasi Ungu) */
.banner-flash {
    background: linear-gradient(135deg, #6366f1 0%, #a855f7 100%);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-glow);
    position: relative;
    overflow: hidden;
    color: white;
}

/* Efek lingkaran blur di background banner */
.banner-flash::before {
    content: '';
    position: absolute;
    top: -50px;
    right: -50px;
    width: 200px;
    height: 200px;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
    filter: blur(40px);
}

/* Card Produk (Putih Bersih) */
.card-product {
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    border: 1px solid #f1f5f9;
    box-shadow: var(--shadow-soft);
    padding: 12px;
    display: flex;
    flex-direction: column;
    transition: transform 0.2s, box-shadow 0.2s;
    height: 100%;
}

.card-product:active {
    transform: scale(0.98);
}

/* Kotak Gambar Produk */
.product-img-box {
    background: #f8fafc;
    border-radius: var(--radius-l);
    aspect-ratio: 1/1;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
    padding: 15px;
}

.product-img-box img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 4px 6px rgba(0,0,0,0.05));
}

/* Badge (HOT / SALE) */
.badge-label {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 9px;
    font-weight: 800;
    padding: 4px 8px;
    border-radius: 100px;
    color: white;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    z-index: 10;
}
.badge-hot { background: #ef4444; }
.badge-sale { background: #f97316; }

/* Tombol Kategori (Capsule) */
.btn-category {
    border-radius: 100px;
    padding: 10px 20px;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
    border: 1px solid #e2e8f0;
    background: white;
    color: #64748b;
    transition: all 0.2s;
}
.btn-category.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    box-shadow: 0 5px 15px rgba(99, 102, 241, 0.25);
}

/* Search Bar Header */
.header-search {
    background: white;
    border-radius: 100px; /* Pill Shape */
    box-shadow: 0 4px 20px rgba(0,0,0,0.03);
    border: 1px solid #f1f5f9;
}

/* =========================================
   3. BOTTOM NAVIGATION (Mobile)
   ========================================= */

/* Kontainer Navigasi Melayang (Glassmorphism) */
.bottom-nav-glass {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-top: 1px solid rgba(255,255,255,0.5);
    box-shadow: 0 -10px 30px rgba(0,0,0,0.03);
    border-radius: 2rem 2rem 0 0; /* Lengkung atas saja */
    padding-bottom: env(safe-area-inset-bottom); /* Support iPhone X+ */
}

/* Item Navigasi */
.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    color: #94a3b8; /* Slate-400 */
    transition: color 0.3s;
}

.nav-item.active {
    color: var(--primary);
}

.nav-item.active i {
    stroke-width: 2.5px;
    filter: drop-shadow(0 2px 4px rgba(99, 102, 241, 0.3));
}

/* Tombol Tengah Besar (Topup/Scan) */
.nav-fab {
    width: 56px;
    height: 56px;
    background: #1e293b; /* Slate-900 */
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
    border: 4px solid #f8fafc; /* Border agar terlihat 'terpisah' */
    transform: translateY(-20px);
}

/* =========================================
   4. ADMIN PANEL (List Style)
   ========================================= */

/* Menu List Item (Admin Sidebar/Mobile) */
.menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    margin-bottom: 8px;
    border-radius: 16px;
    font-size: 14px;
    font-weight: 700;
    color: #64748b;
    transition: all 0.2s;
}

/* Menu Aktif (Sesuai Gambar Admin: Background ungu muda, teks ungu) */
.menu-item.active {
    background: #eef2ff; /* Indigo-50 */
    color: var(--primary);
}

.menu-item:hover:not(.active) {
    background: #f8fafc;
    color: #334155;
}

/* Card Admin Putih */
.card-admin {
    background: white;
    border-radius: var(--radius-xl);
    padding: 24px;
    border: 1px solid #f1f5f9;
    box-shadow: var(--shadow-soft);
}

/* Tabel Header Custom */
.table-head {
    background: #f8fafc;
    color: #94a3b8;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Typography Overrides for 'Inter' look-alike */
h1, h2, h3, h4, h5, h6 {
    letter-spacing: -0.02em; /* Sedikit rapat agar modern */
}

/* SweetAlert Custom Radius */
div:where(.swal2-container) div:where(.swal2-popup) {
    border-radius: 2rem !important;
}
