body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f4f4f4;
    color: #333;
}

/* Header Styling */
header {
    background-color: #4CAF50; /* Warna hijau khas */
    color: white;
    padding: 0.5rem 5%; /* Padding menyesuaikan, 5% dari lebar */
    text-align: center;
    position: sticky; /* Membuat header sticky */
    top: 0; /* Menempel di bagian atas */
    z-index: 100; /* Memastikan header di atas konten lain */
    box-shadow: 0 2px 5px rgba(0,0,0,0.2); /* Efek bayangan */
    display: flex; /* Untuk menata logo dan konten */
    align-items: center; /* Pusatkan vertikal */
    justify-content: space-between; /* Menyebar elemen */
}

header .logo-container {
    display: flex;
    align-items: center;
}

header .logo-container img {
    height: 50px; /* Ukuran logo */
    margin-right: 15px; /* Jarak antara logo dan teks */
}

header h1 {
    margin: 0;
    font-size: 1.8em; /* Ukuran judul */
}

header nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    justify-content: center;
}

header nav ul li {
    margin: 0 15px;
}

header nav ul li a {
    color: white;
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s ease; /* Efek hover halus */
}

header nav ul li a:hover {
    color: #ddd;
}

/* Main Container */
.container {
    width: 80%;
    margin: auto;
    overflow: hidden; /* Clear floats */
    padding: 20px 0;
    padding-top: 80px; /* Memberikan ruang agar konten tidak tertutup header sticky */
}

h1, h2 {
    text-align: center;
    color: #333;
    margin-bottom: 30px;
}

/* Product List */
.product-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); /* Responsif grid */
    gap: 20px;
    margin-top: 30px;
}

.product-item {
    background-color: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    text-align: center;
    transition: transform 0.2s ease; /* Efek hover */
}

.product-item:hover {
    transform: translateY(-5px); /* Sedikit naik saat dihover */
}

.product-item img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    margin-bottom: 15px;
    cursor: pointer; /* Tetap clickable untuk modal */
}

.product-item h3 {
    margin-bottom: 10px;
    color: #555;
}

/* Buttons */
.whatsapp-button, .add-to-cart-button, .submit-button, .submit-order-button {
    background-color: #25D366; /* Warna WhatsApp hijau */
    color: white;
    padding: 8px 15px;
    border-radius: 5px;
    text-decoration: none;
    display: inline-block;
    margin-top: 10px;
    font-size: 0.9em;
    border: none;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.whatsapp-button:hover, .submit-button:hover {
    background-color: #1DA851;
}

/* Add to Cart specific button style */
.add-to-cart-button {
    background-color: #007BFF; /* Warna biru */
    margin-left: 10px; /* Jarak dari tombol WhatsApp */
}
.add-to-cart-button:hover {
    background-color: #0056b3;
}

/* Product Detail Section (About Us) */
.product-detail-section {
    background-color: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-top: 40px;
}

.product-detail-section h3 {
    margin-top: 0;
    text-align: left;
}

.product-detail-section p {
    line-height: 1.6;
    margin-bottom: 15px;
}

/* Modal/Popup Styling */
.modal {
    display: none; /* Hidden by default */
    position: fixed; /* Stay in place */
    z-index: 1000; /* Sit on top */
    left: 0;
    top: 0;
    width: 100%; /* Full width */
    height: 100%; /* Full height */
    overflow: auto; /* Enable scroll if needed */
    background-color: rgba(0,0,0,0.7); /* Black w/ opacity */
    padding-top: 60px;
}

.modal-content {
    background-color: #fefefe;
    margin: 5% auto; /* 5% from the top and centered */
    padding: 30px;
    border: 1px solid #888;
    border-radius: 10px;
    width: 80%; /* Could be more or less, depending on screen size */
    max-width: 700px; /* Max width */
    position: relative;
    box-shadow: 0 4px 8px 0 rgba(0,0,0,0.2),0 6px 20px 0 rgba(0,0,0,0.19);
    animation-name: animatetop; /* Add animation */
    animation-duration: 0.4s;
}

/* Add Animation */
@keyframes animatetop {
    from {top: -300px; opacity: 0}
    to {top: 0; opacity: 1}
}

.close-button {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
}

.close-button:hover,
.close-button:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
}

.modal-content img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto 20px;
    border-radius: 5px;
}

.modal-content h3 {
    text-align: center;
    margin-bottom: 15px;
    color: #333;
}

.modal-content p {
    margin-bottom: 10px;
    line-height: 1.6;
}

.modal-content .whatsapp-button,
.modal-content .add-to-cart-button {
    margin: 10px auto; /* Sesuaikan margin */
    display: block; /* Agar di tengah dan tidak berjejer */
    width: fit-content; /* Lebar sesuai konten */
}

/* Contact Page Specific Styles */
.contact-section {
    background-color: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 30px;
}

.contact-section h3 {
    color: #555;
    margin-top: 0;
    margin-bottom: 20px;
    text-align: center;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-sizing: border-box; /* Pastikan padding tidak menambah lebar */
}

.form-group textarea {
    resize: vertical; /* Hanya izinkan resize vertikal */
    min-height: 100px;
}

.submit-button {
    background-color: #25D366;
    color: white;
    padding: 12px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1em;
    display: block;
    width: 100%;
    text-align: center;
    text-decoration: none;
}

.map-container {
    margin-top: 40px;
    text-align: center;
}

.map-container h3 {
    margin-bottom: 20px;
}

.map-container iframe {
    width: 100%;
    height: 450px;
    border: 0;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Checkout Page Specific Styles */
#cart-items {
    margin-top: 20px;
}

#cart-items .cart-item {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    padding: 10px;
    background-color: #f9f9f9;
    border-radius: 5px;
    border: 1px solid #eee;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

#cart-items .cart-item img {
    width: 80px;
    height: 80px;
    object-fit: cover; /* Memastikan gambar mengisi area tanpa distorsi */
    border-radius: 5px;
    margin-right: 15px;
}

#cart-items .item-details {
    flex-grow: 1; /* Mengambil sisa ruang yang tersedia */
}

#cart-items .item-details h4 {
    margin: 0 0 5px 0;
    color: #555;
}

#cart-items .item-details p {
    margin: 0;
    font-size: 0.9em;
    color: #777;
}

#cart-items .item-actions {
    display: flex;
    align-items: center;
    gap: 10px; /* Jarak antar elemen aksi */
}

#cart-items .item-actions input {
    width: 50px;
    padding: 5px;
    text-align: center;
    border: 1px solid #ddd;
    border-radius: 4px;
}

#cart-items .remove-item-button {
    background-color: #dc3545; /* Merah untuk hapus */
    color: white;
    border: none;
    padding: 5px 10px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.8em;
}
#cart-items .remove-item-button:hover {
    background-color: #c82333;
}

#cart-summary {
    margin-top: 30px;
    border-top: 1px solid #ddd;
    padding-top: 20px;
}

#cart-summary p {
    text-align: right;
    font-size: 1.2em;
    font-weight: bold;
    color: #333;
}

#checkout-form .form-group {
    margin-bottom: 15px;
}

#checkout-form .form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

#checkout-form .form-group input[type="text"],
#checkout-form .form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-sizing: border-box;
}

.submit-order-button {
    background-color: #28a745; /* Hijau yang berbeda untuk submit pesanan */
    color: white;
    padding: 12px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1.1em;
    display: block;
    width: 100%;
    text-align: center;
    text-decoration: none;
}
.submit-order-button:hover {
    background-color: #218838;
}

#empty-cart-message {
    text-align: center;
    margin-top: 50px;
    font-size: 1.2em;
    color: #888;
}

/* Footer Styling */
footer {
    background-color: #333;
    color: white;
    padding: 30px 0;
    margin-top: 40px;
    text-align: left; /* Mengatur teks default ke kiri */
}

footer .footer-container {
    width: 80%;
    margin: auto;
    display: flex;
    flex-wrap: wrap; /* Memungkinkan kolom untuk wrap ke baris baru */
    justify-content: space-between; /* Menyebar kolom secara merata */
    gap: 20px; /* Jarak antar kolom */
}

footer .footer-column {
    flex: 1; /* Setiap kolom akan mengambil ruang yang sama */
    min-width: 200px; /* Lebar minimum sebelum wrap */
    padding: 10px;
}

footer .footer-column h4 {
    color: #4CAF50;
    margin-bottom: 15px;
    font-size: 1.2em;
}

footer .footer-column p,
footer .footer-column ul {
    font-size: 0.9em;
    line-height: 1.6;
    margin: 0;
    padding: 0;
    list-style: none;
}

footer .footer-column ul li a {
    color: white;
    text-decoration: none;
    margin-bottom: 5px;
    display: block; /* Membuat setiap link menjadi blok agar rapi */
}

footer .footer-column ul li a:hover {
    text-decoration: underline;
}

footer .footer-bottom {
    text-align: center;
    border-top: 1px solid #555;
    padding-top: 20px;
    margin-top: 20px;
    font-size: 0.8em;
}

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

@media (max-width: 768px) {
    /* Header Responsif */
    header {
        flex-direction: column; /* Ubah arah flex menjadi kolom */
        padding: 1rem 2%; /* Sesuaikan padding */
    }
    header .logo-container {
        margin-bottom: 10px; /* Beri jarak di bawah logo */
    }
    header nav ul {
        flex-wrap: wrap; /* Izinkan menu wrap */
        justify-content: center;
    }
    header nav ul li {
        margin: 5px 10px; /* Sesuaikan margin menu */
    }
    .container {
        padding-top: 120px; /* Sesuaikan padding-top untuk header yang lebih tinggi di mobile */
        width: 95%; /* Lebih lebar di mobile */
    }
    .product-list {
        grid-template-columns: 1fr; /* Satu kolom untuk produk di mobile */
    }
    .product-item {
        padding: 15px;
    }

    /* Modal Responsif */
    .modal-content {
        width: 90%;
        margin: 10% auto; /* Sesuaikan margin modal di mobile */
        padding: 20px;
    }

    /* Form Responsif */
    .contact-section, .checkout-section {
        padding: 20px;
    }

    /* Footer Responsif */
    footer .footer-container {
        flex-direction: column; /* Jadikan kolom bertumpuk di layar kecil */
        align-items: center; /* Pusatkan kolom */
        text-align: center; /* Pusatkan teks di kolom */
    }
    footer .footer-column {
        min-width: unset; /* Hapus min-width agar menyesuaikan lebar */
        width: 90%; /* Ambil hampir seluruh lebar di mobile */
        margin-bottom: 20px; /* Beri jarak antar kolom */
    }
    footer .footer-column:last-child {
        margin-bottom: 0; /* Hapus margin bawah untuk kolom terakhir */
    }
}

@media (max-width: 480px) {
    header h1 {
        font-size: 1.5em; /* Ukuran judul lebih kecil di HP sangat kecil */
    }
    header .logo-container img {
        height: 40px; /* Ukuran logo lebih kecil */
    }
    header nav ul li {
        margin: 5px 7px; /* Margin menu lebih kecil */
    }
    .product-item h3 {
        font-size: 1.1em;
    }
    .whatsapp-button, .add-to-cart-button {
        padding: 6px 12px;
        font-size: 0.8em;
    }
    .map-container iframe {
        height: 300px; /* Tinggi map lebih kecil di mobile */
    }
}