/* ======================================= */
/* VARIABLE & RESET */
/* ======================================= */
:root {
    --primary-color: #2c3e50; /* Warna utama (Biru gelap/Navy) */
    --secondary-color: #3498db; /* Warna aksen (Biru cerah) */
    --background-color: #ecf0f1; /* Warna latar belakang ringan */
    --success-color: #27ae60; /* Warna hijau untuk tombol beli/sukses */
    --font-family: 'Arial', sans-serif;
    --white-color: #fff;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-family);
    background-color: var(--background-color);
    color: #333;
    line-height: 1.6;
    position: relative;
    padding-top: 60px; /* Jarak untuk fixed header (desktop) */
}

/* BACKGROUND STATIS */
.static-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('https://i.postimg.cc/ydFtkQn9/a2e1e25c32a379f674b2036d25a68974.jpg') no-repeat center center/cover;
    opacity: 0.3; 
    z-index: -1; 
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: auto;
    overflow: hidden;
}

/* ======================================= */
/* HEADER & NAVIGASI (DESKTOP) */
/* ======================================= */
header {
    background-color: var(--primary-color);
    color: white;
    padding: 10px 0;
    position: fixed;
    width: 100%;
    top: 0;
    left: 0;
    z-index: 1000;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

header h1 i {
    color: var(--secondary-color);
    margin-right: 10px;
}

header nav ul {
    list-style: none;
    display: flex;
}

header nav ul li a {
    color: white;
    text-decoration: none;
    padding: 10px 15px;
    display: block;
    transition: background-color 0.3s;
}

header nav ul li a:hover {
    background-color: var(--secondary-color);
}

/* Tombol Hamburger (Hanya terlihat di mobile) */
.menu-toggle {
    display: none; 
    background: none;
    border: none;
    color: var(--white-color);
    font-size: 1.5em;
    cursor: pointer;
    padding: 0;
}

/* Class 'active' untuk menampilkan navigasi di mobile (ditambah oleh JS) */
.header-content.active nav {
    display: block !important; 
}

/* ======================================= */
/* UTILITY & BUTTONS (Contoh) */
/* ======================================= */
.primary-button {
    background-color: var(--secondary-color);
    color: white;
    padding: 10px 20px;
    border: none;
    cursor: pointer;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    transition: background-color 0.3s;
}

.primary-button:hover {
    background-color: #2980b9;
}

.buy-button {
    background-color: var(--success-color);
    color: white;
    padding: 8px 15px;
    border: none;
    cursor: pointer;
    border-radius: 5px;
    text-decoration: none;
    display: inline-block;
    transition: background-color 0.3s;
}

.buy-button:hover {
    background-color: #2ecc71;
}

/* Gaya Produk */
#produk, #promo, #kontak {
    padding: 60px 0;
}

#produk h2, #promo h2, #kontak h2 {
    text-align: center;
    margin-bottom: 30px;
    color: var(--primary-color);
}

.hero-section {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 80px 0;
    background-color: #fff;
    margin-top: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.hero-section img {
    max-width: 40%;
    height: auto;
    border-radius: 8px;
}

.hero-text {
    max-width: 55%;
}

.hero-text h2 {
    font-size: 2.5em;
    margin-bottom: 15px;
    color: var(--primary-color);
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.product-item {
    background-color: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    text-align: center;
    transition: transform 0.3s;
}

.product-item:hover {
    transform: translateY(-5px);
}

.product-item img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    margin-bottom: 15px;
}

.product-item h3 {
    color: var(--primary-color);
    margin-bottom: 10px;
}

.product-item .price {
    font-size: 1.2em;
    font-weight: bold;
    color: var(--success-color);
    margin-bottom: 15px;
}

.testimonial-card {
    background-color: var(--white-color);
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    border-left: 5px solid var(--secondary-color);
}

.testimonial-card p {
    font-style: italic;
    margin-bottom: 10px;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 12px;
    margin-bottom: 15px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-family: var(--font-family);
}

.contact-form button {
    width: 100%;
}

/* Notifikasi */
#notification-box {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--success-color);
    color: white;
    padding: 15px 30px;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    z-index: 2000;
    transition: opacity 0.5s ease;
}

#notification-box.hidden {
    opacity: 0;
    visibility: hidden;
}

/* Footer */
footer {
    background-color: var(--primary-color);
    color: white;
    padding: 20px 0;
    text-align: center;
    margin-top: 30px;
}

footer .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.social-links a {
    color: white;
    font-size: 1.5em;
    margin-left: 15px;
    transition: color 0.3s;
}

.social-links a:hover {
    color: var(--secondary-color);
}

.footer-text-group p {
    margin: 5px 0;
    font-size: 0.9em;
}

/* ======================================= */
/* MEDIA QUERIES (RESPONSIVE DESIGN) */
/* ======================================= */

@media (max-width: 768px) {
    
    /* 1. PENYESUAIAN GLOBAL */
    .container {
        width: 95%; 
        padding: 0 10px; 
    }
    
    body {
        padding-top: 60px; 
    }

    /* 2. HEADER & NAVIGASI (Perbaikan Menu Overlay) */
    .header-content {
        flex-direction: row; 
        justify-content: space-between; 
        align-items: center;
        padding: 10px 0; 
    }

    .menu-toggle {
        display: block; 
    }

    /* NAVIGASI: Posisikan tepat di bawah header dan BATASI TINGGI */
    header nav {
        display: none; 
        position: absolute; 
        top: 100%; 
        left: 0;
        width: 100%;
        background-color: var(--primary-color);
        box-shadow: 0 4px 5px rgba(0, 0, 0, 0.2);
        z-index: 999; 
        /* PERBAIKAN UTAMA UNTUK OVERLAY */
        max-height: 50vh; /* Batasi menu agar tidak menutupi seluruh layar */
        overflow-y: auto; /* Aktifkan scroll jika perlu */
    }
    
    header nav ul {
        flex-direction: column; 
    }

    header nav ul li a {
        padding: 15px 20px;
        text-align: left;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        display: block;
    }
    
    /* 3. HERO SECTION */
    .hero-section {
        flex-direction: column; 
        padding: 30px 0;
    }
    
    .hero-section img {
        max-width: 100%;
        margin-top: 20px;
    }

    .hero-text {
        max-width: 100%;
        text-align: center;
    }

    /* 4. PRODUCT GRID */
    .product-grid {
        grid-template-columns: 1fr;
    }
    
    /* 5. FOOTER */
    footer .container {
        flex-direction: column;
    }
    
    .social-links {
        margin-top: 10px;
    }
    
    /* 6. TAMPILAN KERANJANG DI HP (Perbaikan Layout Berantakan) */
    
    .cart-container {
        padding-top: 20px;
    }
    
    /* Item keranjang tampil bertumpuk vertikal */
    .cart-item {
        flex-direction: column; 
        align-items: flex-start;
        padding: 15px;
    }

    .cart-item img {
        width: 100%; 
        max-width: 80px; 
        height: auto;
        margin-right: 0;
        margin-bottom: 10px;
        order: 1; 
    }
    
    .item-details {
        flex-basis: 100%; 
        width: 100%;
        margin-bottom: 5px;
        order: 2; 
    }

    /* Baris kontrol (harga, qty, hapus) di baris tersendiri */
    .item-controls-row {
        display: flex;
        justify-content: space-between;
        align-items: center;
        width: 100%;
        margin-top: 10px;
        padding-top: 10px;
        border-top: 1px dashed #ddd;
        order: 3;
    }
    
    .item-price {
        order: 1; 
        font-size: 1.1em;
        width: auto;
    }
    
    .quantity-control {
        order: 2;
        width: auto;
        margin: 0 10px; 
    }
    
    .remove-item {
        order: 3;
        margin-left: 10px;
        font-size: 1.5em;
    }
    
    /* Ringkasan Keranjang */
    .cart-summary {
        margin-top: 20px;
        padding: 15px;
    }
}
