/* ==================================== */
/* 1. RESET DAN FONT */
/* ==================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Menggunakan Montserrat sebagai font dasar */
body {
    font-family: 'Montserrat', sans-serif;
    line-height: 1.6;
    color: #333333; /* Warna teks utama: Hitam gelap */
    background-color: #F8F5EE; /* Warna latar belakang: Beige lembut/Cream */
}

/* Menggunakan Playfair Display untuk judul */
h1, h2, h3 {
    font-family: 'Playfair Display', serif;
    color: #1A1A1A; /* Warna judul: Hitam pekat */
}

/* Kontainer umum untuk mengatur lebar konten */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Warna Aksen Brand (Terakota/Coklat Kemerahan) */
:root {
    --primary-color: #A34A2E; /* Terakota/Coklat Kemerahan */
    --secondary-color: #1A1A1A; /* Hitam Elegan */
    --accent-bg: #EAE0D7; /* Beige/Cream lebih gelap */
}

/* ==================================== */
/* 2. HEADER DAN NAVIGASI */
/* ==================================== */
header {
    background: #F8F5EE;
    border-bottom: 1px solid #EAE0D7;
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo a {
    font-size: 1.8em;
    font-weight: 700;
    color: var(--secondary-color);
    text-decoration: none;
}

#main-nav ul {
    list-style: none;
    display: flex;
    gap: 30px;
}

#main-nav a {
    text-decoration: none;
    color: #555;
    font-weight: 500;
    transition: color 0.3s;
    text-transform: uppercase;
    font-size: 0.9em;
}

#main-nav a:hover {
    color: var(--primary-color);
}

/* Ikon keranjang dan menu mobile */
.cart-icon, .menu-icon {
    background: none;
    border: none;
    font-size: 1.3em;
    cursor: pointer;
    color: var(--secondary-color);
}

#cart-btn {
    position: relative;
    padding-right: 20px;
}

#cart-count {
    position: absolute;
    top: -5px;
    right: 0;
    background-color: var(--primary-color);
    color: white;
    border-radius: 50%;
    padding: 2px 6px;
    font-size: 0.7em;
    font-weight: bold;
}

#mobile-menu-btn {
    display: none; /* Sembunyikan di desktop */
}

/* ==================================== */
/* 3. KOMPONEN UMUM */
/* ==================================== */
.section-title {
    font-size: 2.5em;
    text-align: center;
    margin-bottom: 10px;
    color: var(--secondary-color);
}

.section-subtitle {
    text-align: center;
    margin-bottom: 50px;
    color: #777;
    font-weight: 300;
}

/* Tombol */
.btn {
    display: inline-block;
    padding: 12px 25px;
    text-decoration: none;
    border: 1px solid var(--primary-color);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    text-transform: uppercase;
    font-size: 0.85em;
    text-align: center;
}

.primary-btn {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.primary-btn:hover {
    background-color: #8C4029; /* Warna lebih gelap saat hover */
    border-color: #8C4029;
}

.accent-text {
    color: var(--primary-color);
}

/* Garis pemisah */
hr {
    border: none;
    height: 1px;
    background-color: #EAE0D7;
    margin: 80px 0;
}

/* ==================================== */
/* 4. BAGIAN HOME (HERO) */
/* ==================================== */
.hero {
    padding: 100px 0;
    min-height: 70vh;
    display: flex;
    align-items: center;
}

.hero-content {
    display: flex;
    align-items: center;
    gap: 50px;
}

.hero-text {
    flex: 1;
    max-width: 50%;
}

.hero-text h2 {
    font-size: 3.5em;
    line-height: 1.1;
    margin-bottom: 20px;
}

.hero-text p {
    font-size: 1.1em;
    margin-bottom: 30px;
    color: #555;
    font-weight: 300;
}

.hero-image-wrapper {
    flex: 1;
    max-width: 50%;
    overflow: hidden;
    border-radius: 5px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

.hero-image {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.5s ease;
}

.hero-image:hover {
    transform: scale(1.05);
}

/* ==================================== */
/* 5. BAGIAN PRODUK */
/* ==================================== */
.product-grid {
    padding: 50px 0 80px 0;
}

.products-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
}

.product-card {
    background: white;
    border: 1px solid #EAE0D7;
    padding: 20px;
    text-align: center;
    transition: box-shadow 0.3s, transform 0.3s;
    border-radius: 5px;
}

.product-card:hover {
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    transform: translateY(-5px);
}

.product-image {
    width: 100%;
    height: auto;
    max-height: 350px;
    object-fit: cover;
    margin-bottom: 15px;
    border-radius: 3px;
}

.product-name {
    font-size: 1.4em;
    margin-bottom: 5px;
    color: var(--secondary-color);
}

.product-price {
    font-size: 1.2em;
    color: var(--primary-color);
    font-weight: 700;
    margin-bottom: 15px;
}

.product-description {
    font-size: 0.9em;
    color: #666;
    margin-bottom: 20px;
    min-height: 60px;
}

/* Tombol Buy Now hanya tampil di mobile, jadi defaultnya disembunyikan */
.buy-now-btn {
    display: none;
    margin-top: 10px;
    background-color: #4CAF50; /* Hijau WhatsApp */
    border-color: #4CAF50;
    color: white;
}

.buy-now-btn:hover {
    background-color: #45A049;
    border-color: #45A049;
}

/* ==================================== */
/* 6. BAGIAN ABOUT */
/* ==================================== */
.about-section {
    padding: 50px 0;
}

.about-content {
    display: flex;
    align-items: center;
    gap: 40px;
}

.about-image {
    flex: 1;
    max-width: 40%;
    height: auto;
    object-fit: cover;
    border-radius: 5px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.about-text {
    flex: 1;
    max-width: 60%;
    font-size: 1.05em;
    color: #444;
}

.about-text p {
    margin-bottom: 20px;
}

/* ==================================== */
/* 7. BAGIAN REVIEW */
/* ==================================== */
.reviews-section {
    padding: 50px 0;
    background-color: var(--accent-bg); /* Latar belakang aksen */
}

.reviews-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.review-card {
    background: white;
    padding: 30px;
    border-radius: 5px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.review-text {
    font-style: italic;
    margin-bottom: 15px;
    font-size: 0.95em;
    color: #555;
}

.review-author {
    font-weight: 500;
    color: var(--secondary-color);
}

.rating {
    color: gold;
    margin-left: 5px;
}

/* ==================================== */
/* 8. BAGIAN CONTACT */
/* ==================================== */
.contact-section {
    padding: 50px 0;
    text-align: center;
}

.contact-info {
    margin: 30px auto;
    max-width: 600px;
    font-size: 1.1em;
}

.contact-info p {
    margin-bottom: 10px;
    color: #555;
}

.contact-info a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
    max-width: 500px;
    margin: 0 auto;
}

.contact-form input,
.contact-form textarea {
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 3px;
    font-family: 'Montserrat', sans-serif;
}

.contact-form textarea {
    resize: vertical;
}

/* ==================================== */
/* 9. FOOTER */
/* ==================================== */
footer {
    background-color: var(--secondary-color); /* Hitam Elegan */
    color: #EAE0D7; /* Beige/Cream */
    padding: 40px 0;
    font-size: 0.9em;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    gap: 40px;
    flex-wrap: wrap;
}

.footer-brand, .footer-links, .social-media {
    flex-basis: 30%;
    min-width: 200px;
}

.footer-brand h3 {
    color: white;
    font-size: 1.5em;
    margin-bottom: 10px;
}

.footer-links ul {
    list-style: none;
}

.footer-links a {
    color: #EAE0D7;
    text-decoration: none;
    display: block;
    margin-bottom: 8px;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: var(--primary-color);
}

.social-media a {
    color: white;
    font-size: 1.5em;
    margin-right: 15px;
    transition: color 0.3s;
}

.social-media a:hover {
    color: var(--primary-color);
}

/* ==================================== */
/* 10. KERANJANG (MODAL) */
/* ==================================== */
.modal {
    display: none; /* Default tersembunyi */
    position: fixed; 
    z-index: 2000; 
    left: 0;
    top: 0;
    width: 100%; 
    height: 100%; 
    overflow: auto; 
    background-color: rgba(0,0,0,0.4); 
}

.modal-content {
    background-color: #fefefe;
    margin: 10% auto; /* Jarak dari atas dan tengah */
    padding: 30px;
    border: 1px solid #888;
    width: 80%; 
    max-width: 400px;
    border-radius: 5px;
    position: relative;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.close-btn {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
}

.close-btn:hover,
.close-btn:focus {
    color: var(--primary-color);
    text-decoration: none;
    cursor: pointer;
}

#cart-items {
    margin: 20px 0;
    border-top: 1px solid #eee;
    padding-top: 15px;
}

.cart-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #eee;
}

.item-details {
    flex-grow: 1;
}

.item-details p {
    margin: 0;
}

.remove-item-btn {
    background: none;
    border: none;
    color: var(--primary-color);
    cursor: pointer;
    font-size: 1em;
    margin-left: 10px;
    opacity: 0.7;
}

.cart-total {
    font-size: 1.2em;
    font-weight: 700;
    margin-top: 20px;
    border-top: 2px solid var(--primary-color);
    padding-top: 10px;
}

.checkout-btn {
    width: 100%;
    margin-top: 20px;
}

/* ==================================== */
/* 11. RESPONSIVE DESIGN (MOBILE) */
/* ==================================== */
@media (max-width: 768px) {
    
    /* 11.1 Navigasi Mobile */
    #main-nav {
        display: none; /* Sembunyikan navigasi utama */
        position: absolute;
        top: 65px; /* Sesuaikan dengan tinggi header */
        left: 0;
        width: 100%;
        background-color: #F8F5EE;
        box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
        z-index: 900;
        border-top: 1px solid #EAE0D7;
    }

    #main-nav.active {
        display: block; /* Tampilkan saat menu di klik */
    }

    #main-nav ul {
        flex-direction: column;
        gap: 0;
        padding: 10px 0;
    }

    #main-nav li {
        text-align: center;
        border-bottom: 1px solid #eee;
    }
    
    #main-nav li:last-child {
        border-bottom: none;
    }

    #main-nav a {
        display: block;
        padding: 15px 0;
    }

    #mobile-menu-btn {
        display: block; /* Tampilkan tombol menu mobile */
        margin-left: 15px;
    }

    /* 11.2 Home Section Mobile */
    .hero {
        padding: 50px 0;
    }

    .hero-content {
        flex-direction: column; /* Ubah tata letak menjadi kolom */
        text-align: center;
    }

    .hero-text, .hero-image-wrapper {
        max-width: 100%;
    }

    .hero-text h2 {
        font-size: 2.5em; /* Perkecil ukuran font */
    }

    .hero-image-wrapper {
        order: -1; /* Pindahkan gambar ke atas */
        margin-bottom: 30px;
    }

    /* 11.3 Produk Mobile */
    .product-card {
        padding: 15px;
    }

    /* Tampilkan tombol Buy Now (mobile-only) */
    .product-card .add-to-cart-btn {
        display: none; /* Sembunyikan 'Add to Cart' */
    }

    .product-card .buy-now-btn {
        display: block; /* Tampilkan 'Buy Now' */
        width: 100%;
    }
    
    /* 11.4 About Mobile */
    .about-content {
        flex-direction: column;
        text-align: center;
    }

    .about-image {
        max-width: 100%;
        margin-bottom: 20px;
    }

    .about-text {
        max-width: 100%;
    }

    /* 11.5 Footer Mobile */
    .footer-content {
        flex-direction: column;
        text-align: center;
    }

    .footer-brand, .footer-links, .social-media {
        min-width: 100%;
        margin-bottom: 20px;
    }

    .social-media {
        margin-top: 10px;
    }
}