@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600;700&display=swap');

:root {
    --primary: #4F46E5;
    --primary-hover: #4338CA;
    --dark: #111827;
    --light: #F9FAFB;
    --gray: #6B7280;
    --border: #E5E7EB;
    --white: #FFFFFF;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --transition: all 0.3s ease;
}

* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Inter', sans-serif; }
body { background-color: var(--light); color: var(--dark); line-height: 1.6; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }

/* --- Navbar Baru (Logo Terkunci di Tengah) --- */
.navbar {
    background: var(--white);
    padding: 1rem 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow);
}

.logo-center {
    position: static;
    left: auto;
    transform: none;
    text-decoration: none;
    display: flex;
    align-items: center;
    order: 0;
}

.logo-center img {
    max-height: 40px; 
    width: auto;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 2rem;
    margin-left: auto; /* Mendorong menu ke kanan mentok */
}

/* Animasi Hover Menu Keren */
.nav-item {
    font-weight: 600;
    color: var(--gray);
    position: relative;
    padding: 0.5rem 0;
    transition: color 0.3s ease;
    text-decoration: none;
}

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

.nav-item::after {
    content: '';
    position: absolute;
    width: 0;
    height: 3px;
    bottom: 0;
    left: 0;
    background-color: var(--primary);
    transition: width 0.3s ease;
    border-radius: 5px;
}

.nav-item:hover::after, .nav-item.active::after {
    width: 100%;
}

/* Tombol Menu (Pill Button) */
.btn-nav {
    background: var(--primary);
    color: var(--white);
    padding: 0.6rem 1.5rem;
    border-radius: 30px;
    font-weight: 600;
    box-shadow: 0 4px 6px rgba(79, 70, 229, 0.2);
    transition: all 0.3s ease;
    white-space: nowrap; /* Mencegah teks turun ke baris kedua */
    text-decoration: none;
}

.btn-nav:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(79, 70, 229, 0.3);
    color: var(--white);
}

/* --- Buttons Global --- */
.btn { padding: 0.75rem 1.5rem; border-radius: 8px; font-weight: 600; cursor: pointer; transition: var(--transition); border: none; display: inline-block; text-align: center; }
.btn-primary { background: var(--primary); color: var(--white); }
.btn-primary:hover { background: var(--primary-hover); transform: translateY(-2px); }
.btn-outline { border: 2px solid var(--primary); color: var(--primary); background: transparent; }
.btn-outline:hover { background: var(--primary); color: var(--white); }
.btn-wa { background: #25D366; color: white; }
.btn-wa:hover { background: #128C7E; transform: translateY(-2px); }

/* --- Hero Section --- */
.hero { text-align: center; padding: 6rem 5%; background: linear-gradient(135deg, #111827 0%, #374151 100%); color: var(--white); }
.hero h1 { font-size: 3rem; margin-bottom: 1rem; }
.hero p { font-size: 1.1rem; color: #D1D5DB; margin-bottom: 2rem; max-width: 600px; margin-left: auto; margin-right: auto; }
.hero-btns { display: flex; justify-content: center; gap: 1rem; }

/* --- Sections --- */
.section { padding: 5rem 5%; }
.section-title { text-align: center; font-size: 2rem; margin-bottom: 3rem; color: var(--dark); }

/* --- Features --- */
.features-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 2rem; text-align: center; }
.feature-card { background: var(--white); padding: 2rem; border-radius: 12px; box-shadow: var(--shadow); }
.feature-card i { font-size: 2.5rem; color: var(--primary); margin-bottom: 1rem; }

/* --- Product Grid --- */
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 2rem; }
.product-card { background: var(--white); border-radius: 12px; overflow: hidden; box-shadow: var(--shadow); transition: var(--transition); display: flex; flex-direction: column;}
.product-card:hover { transform: translateY(-5px); box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1); }
.card-img { position: relative; height: 200px; }
.card-img img { width: 100%; height: 100%; object-fit: cover; }
.badge { position: absolute; top: 10px; right: 10px; background: rgba(17, 24, 39, 0.8); color: white; padding: 0.2rem 0.8rem; border-radius: 20px; font-size: 0.8rem; }
.card-body { padding: 1.5rem; display: flex; flex-direction: column; flex-grow: 1;}
.card-body h3 { font-size: 1.2rem; margin-bottom: 0.5rem; }
.price { color: var(--primary); font-weight: 700; font-size: 1.25rem; margin-bottom: 1rem; }
.card-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem; margin-top: auto;}

/* --- Search & Filter --- */
.filter-section { margin-bottom: 3rem; display: flex; flex-direction: column; gap: 1.5rem; align-items: center; }
.search-bar { width: 100%; max-width: 500px; padding: 0.8rem 1.2rem; border: 1px solid var(--border); border-radius: 8px; font-size: 1rem; outline: none; }
.search-bar:focus { border-color: var(--primary); }
.categories { display: flex; gap: 0.5rem; flex-wrap: wrap; justify-content: center; }
.filter-btn { padding: 0.5rem 1rem; border: 1px solid var(--border); background: var(--white); border-radius: 20px; cursor: pointer; transition: var(--transition); }
.filter-btn.active, .filter-btn:hover { background: var(--primary); color: var(--white); border-color: var(--primary); }

/* --- Detail Page --- */
.detail-container { max-width: 1000px; margin: 0 auto; background: var(--white); border-radius: 12px; overflow: hidden; box-shadow: var(--shadow); display: grid; grid-template-columns: 1fr 1fr; align-items: stretch; }
.detail-img {
    min-height: 400px;
    padding: 0;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    background: var(--white);
    overflow: hidden;
}
.detail-img img {
    display: block;
    width: 100%;
    height: auto;
    max-width: 100%;
    max-height: none;
    object-fit: contain;
    object-position: top center;
    border-radius: 0;
}
.detail-info { padding: 3rem; }
.detail-info h1 { font-size: 2rem; margin-bottom: 0.5rem; }
.detail-category { color: var(--gray); font-size: 0.9rem; margin-bottom: 1rem; display: inline-block; }
.detail-price { font-size: 2rem; color: var(--primary); font-weight: 700; margin-bottom: 1.5rem; }
.detail-desc { margin-bottom: 1.5rem; color: var(--gray); }
.features-list { margin-bottom: 1.5rem; }
.features-list li { margin-bottom: 0.5rem; display: flex; align-items: center; gap: 0.5rem; }
.features-list i { color: #10B981; }
.tech-stack { display: flex; gap: 0.5rem; margin-bottom: 2rem; flex-wrap: wrap; }
.tech-badge { background: var(--light); border: 1px solid var(--border); padding: 0.3rem 0.8rem; border-radius: 4px; font-size: 0.8rem; font-weight: 600; }
.action-btns { display: flex; gap: 1rem; }

/* --- Halaman Tentang & Kontak --- */
.about-content { max-width: 800px; margin: 0 auto; text-align: center; font-size: 1.1rem; color: var(--gray); }
.about-content h2 { color: var(--dark); margin-bottom: 1rem; font-size: 2rem; }
.about-content p { margin-bottom: 1.5rem; }

.contact-wrapper { padding: 2rem; }
.contact-info { display: flex; flex-direction: column; gap: 1.5rem; margin-top: 1.5rem; }
.info-item { display: flex; align-items: flex-start; gap: 1rem; }
.info-item i { font-size: 1.5rem; color: var(--primary); margin-top: 0.2rem; }
.info-item h4 { margin-bottom: 0.2rem; color: var(--dark); }
.info-item p { color: var(--gray); font-size: 0.95rem; }

.form-group { margin-bottom: 1.5rem; }
.form-group label { display: block; margin-bottom: 0.5rem; font-weight: 600; color: var(--dark); }
.form-control { width: 100%; padding: 0.8rem 1rem; border: 1px solid var(--border); border-radius: 8px; font-size: 1rem; font-family: inherit; transition: var(--transition); }
.form-control:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1); }
textarea.form-control { resize: vertical; min-height: 120px; }

/* --- Footer --- */
footer { background: var(--dark); color: var(--gray); text-align: center; padding: 2rem 5%; margin-top: 3rem; }

/* --- Animations --- */
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
.fade-in { animation: fadeIn 0.5s ease forwards; }

/* --- Responsive (Mobile) --- */
/* --- Pengaturan Tombol Hamburger Default --- */
.hamburger {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--dark);
    z-index: 1001; /* Agar tombol selalu di atas */
}

/* --- Responsive (Mobile) --- */
@media (max-width: 768px) {
    /* Menampilkan tombol hamburger */
    .hamburger { display: block; }
    
    /* Mengembalikan posisi logo ke kiri */
    .logo-center { position: relative; left: 0; transform: none; }
    
    /* Mengubah menu menjadi dropdown vertikal */
    .nav-right { 
        display: flex;
        flex-direction: column;
        position: absolute;
        top: -400px; /* Sembunyikan ke atas layar */
        left: 0;
        width: 100%;
        background: var(--white);
        padding: 2rem 5%;
        box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
        transition: top 0.4s ease; /* Animasi turun yang smooth */
        z-index: 999;
    }

    /* Class tambahan yang akan diaktifkan oleh JavaScript saat diklik */
    .nav-right.active { top: 70px; }

    /* Menyesuaikan jarak menu di HP */
    .nav-right .nav-item { padding: 1rem 0; width: 100%; border-bottom: 1px solid var(--light); }
    .btn-nav { margin-top: 1rem; width: 100%; text-align: center; }
    
    /* Penyesuaian ukuran teks untuk HP */
    .hero h1 { font-size: 2.2rem; }
    .hero-btns { flex-direction: column; }
    .detail-container { grid-template-columns: 1fr; }
    .detail-img { min-height: 0; padding: 1rem; }
    .detail-img img { max-height: 500px; }
    .detail-info { padding: 1.5rem; }
    .action-btns { flex-direction: column; }
}

footer { text-align:center; padding:40px 20px; margin-top:60px; }
.footer-content { max-width:1200px; margin:0 auto; }
.footer-content h3 { margin-bottom:10px; }
