/* ========== GLOBAL & VARIABEL ========== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

body {
    background-color: #FDF8F0;
    color: #3E2A1F;
    scroll-behavior: smooth;
    overflow-x: hidden;
}

h1, h2, h3, .logo, .section-title {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
}

:root {
    --coklat-tua: #5C3A21;
    --coklat-sedang: #8B5E3C;
    --coklat-muda: #A67C52;
    --coklat-soft: #C4A484;
    --krem: #FDF8F0;
    --shadow: 0 10px 25px -5px rgba(0,0,0,0.05), 0 8px 10px -6px rgba(0,0,0,0.02);
}

/* ========== NAVBAR ========== */
.navbar {
    background: var(--krem);
    padding: 0.8rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 15px rgba(0,0,0,0.05);
    border-bottom: 1px solid #E8DCCC;
}
.logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--coklat-tua);
}
.logo span {
    color: var(--coklat-muda);
}
.logo a {
    text-decoration: none;
    display: inline-block;
}
.logo img {
    width: 150px;
    height: auto;
    display: block;
}
.nav-links {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}
.nav-links a {
    text-decoration: none;
    font-weight: 500;
    color: var(--coklat-sedang);
    transition: 0.2s;
    font-size: 0.95rem;
}
.nav-links a:hover, .nav-links a.active {
    color: var(--coklat-tua);
    font-weight: 600;
}
.burger {
    display: none;
    font-size: 1.6rem;
    cursor: pointer;
    color: var(--coklat-sedang);
}

/* ========== HERO SLIDER ========== */
.hero-slider {
    position: relative;
    width: 100%;
    overflow: hidden;
    border-radius: 0 0 2rem 2rem;
}
.slides {
    display: flex;
    transition: transform 0.5s ease-in-out;
}
.slide {
    min-width: 100%;
    background-size: cover;
    background-position: center;
    padding: 5rem 2rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 400px;
}
.slide1 { background-image: linear-gradient(rgba(92,58,33,0.7), rgba(139,94,60,0.8)), url('../images/slide1.jpg'); }
.slide2 { background-image: linear-gradient(rgba(92,58,33,0.7), rgba(139,94,60,0.8)), url('../images/slide2.jpg'); }
.slide3 { background-image: linear-gradient(rgba(92,58,33,0.7), rgba(139,94,60,0.8)), url('../images/slide3.jpg'); }
.slide h1 {
    font-size: 2.8rem;
    margin-bottom: 0.8rem;
    color: #FFF5E6;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}
.slide p {
    font-size: 1.2rem;
    margin-bottom: 1.8rem;
    color: #FFF0E0;
}
.btn {
    background: var(--coklat-muda);
    border: none;
    padding: 10px 28px;
    border-radius: 40px;
    font-weight: 600;
    color: white;
    cursor: pointer;
    transition: 0.2s;
    font-size: 0.95rem;
    display: inline-block;
    text-decoration: none;
}
.btn:hover {
    background: var(--coklat-sedang);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}
.slider-controls {
    position: absolute;
    bottom: 20px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    gap: 12px;
    z-index: 10;
}
.dot {
    width: 12px;
    height: 12px;
    background-color: rgba(255,255,255,0.6);
    border-radius: 50%;
    cursor: pointer;
    transition: 0.2s;
}
.dot.active {
    background-color: var(--coklat-muda);
    transform: scale(1.2);
}
.prev, .next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,0.3);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    z-index: 10;
    transition: 0.2s;
}
.prev:hover, .next:hover {
    background: var(--coklat-muda);
}
.prev { left: 15px; }
.next { right: 15px; }

/* ========== SECTION ========== */
section {
    padding: 3rem 1.5rem;
    max-width: 1280px;
    margin: 0 auto;
}
.section-title {
    font-size: 2rem;
    text-align: center;
    margin-bottom: 2rem;
    color: var(--coklat-tua);
    position: relative;
}
.section-title:after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background: var(--coklat-muda);
    margin: 0.5rem auto 0;
    border-radius: 3px;
}
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1.8rem;
}
.product-card {
    background: white;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 10px 20px rgba(0,0,0,0.03);
    transition: all 0.25s ease;
    cursor: pointer;
}
.product-card:hover {
    transform: scale(1.02);
    box-shadow: 0 20px 30px -12px rgba(0,0,0,0.15);
}
.product-img {
    width: 100%;
    height: 180px;
    object-fit: cover;
}
.product-info {
    padding: 1rem;
}
.product-title {
    font-weight: 700;
    font-size: 1.2rem;
    margin-bottom: 0.3rem;
    color: var(--coklat-tua);
}
.product-desc {
    font-size: 0.8rem;
    color: #7a6a5c;
    margin: 0.5rem 0;
}
.price {
    font-weight: 700;
    color: var(--coklat-muda);
    font-size: 1.1rem;
}
.btn-order {
    background: var(--coklat-muda);
    width: 100%;
    margin-top: 12px;
    padding: 8px;
    border-radius: 40px;
    border: none;
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: 0.2s;
}
.btn-order:hover {
    background: var(--coklat-sedang);
}

/* ========== KATEGORI ========== */
.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 1rem;
}
.category-card {
    background: white;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 10px 20px rgba(0,0,0,0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.category-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 30px -12px rgba(0,0,0,0.15);
}
.category-img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}
.category-info {
    padding: 1.5rem;
    text-align: center;
}
.category-info h3 {
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    color: var(--coklat-tua);
    margin-bottom: 0.5rem;
}
.category-info p {
    font-size: 0.9rem;
    color: #7a6a5c;
    margin-bottom: 1rem;
}
.btn-category {
    display: inline-block;
    background: var(--coklat-muda);
    color: white;
    padding: 8px 20px;
    border-radius: 40px;
    text-decoration: none;
    font-weight: 500;
    transition: background 0.2s;
}
.btn-category:hover {
    background: var(--coklat-sedang);
}

/* ========== MODAL ========== */
.modal {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.6);
    align-items: center;
    justify-content: center;
    z-index: 1100;
}
.modal-content {
    background: var(--krem);
    max-width: 500px;
    width: 90%;
    border-radius: 28px;
    padding: 1.5rem;
    position: relative;
    max-height: 90vh;
    overflow-y: auto;
    border: 1px solid var(--coklat-soft);
}
.close-modal {
    position: absolute;
    right: 18px;
    top: 12px;
    font-size: 1.8rem;
    cursor: pointer;
    color: var(--coklat-sedang);
}
.close-modal:hover {
    color: var(--coklat-tua);
}

/* ========== SHARE BUTTONS ========== */
.share-buttons-container {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    font-weight: 500;
}
.share-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    color: white;
    text-decoration: none;
    font-size: 1rem;
    transition: 0.2s;
}
.share-btn.facebook { background: #3b5998; }
.share-btn.twitter { background: #1da1f2; }
.share-btn.whatsapp { background: #25D366; }
.share-btn.instagram { background: #E4405F; }
.share-btn:hover {
    transform: scale(1.1);
    opacity: 0.9;
}

/* ========== TESTIMONI SLIDER BARU ========== */
.testimonial-wrapper {
    max-width: 1000px;
    margin: 0 auto;
    overflow: hidden;
    position: relative;
}
.testimonial-viewport {
    overflow: hidden;
    width: 100%;
}
.testimonial-track-new {
    display: flex;
    transition: transform 0.5s ease-in-out;
    will-change: transform; /* Optimasi performa */
}
.testimonial-group-new {
    min-width: 100%;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    padding: 0.5rem;
    box-sizing: border-box;
}
.testi-card {
    background: #fff;
    border-radius: 20px;
    padding: 1.8rem 1.2rem;
    text-align: center;
    box-shadow: 0 10px 25px rgba(0,0,0,0.04);
    transition: 0.2s;
    /* Pastikan tinggi seragam */
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.testi-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 30px rgba(0,0,0,0.08);
}
.testi-card .avatar {
    font-size: 2.8rem;
    color: #A67C52;
    margin-bottom: 0.5rem;
}
.testi-card .stars {
    color: #FFB800;
    margin-bottom: 0.5rem;
}
.testi-card p {
    font-style: italic;
    color: #4a3a2a;
    font-size: 0.95rem;
    margin-bottom: 0.8rem;
    flex: 1; /* Agar teks mengisi ruang */
}
.testi-card h6 {
    font-weight: 600;
    color: #8B5E3C;
    margin: 0;
}
.testimonial-dots-new {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 1.8rem;
}
.testimonial-dots-new .dot {
    width: 11px;
    height: 11px;
    background: #d4c4b0;
    border-radius: 50%;
    cursor: pointer;
    transition: 0.2s;
}
.testimonial-dots-new .dot.active {
    background: #8B5E3C;
    transform: scale(1.3);
}

/* ========== MARQUEE ========== */
.marquee-banner {
    background: #ffe066;
    overflow: hidden;
    padding: 8px 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    margin-top: 2rem;
}
.marquee-inner {
    display: flex;
    width: max-content;
    animation: marqueeScroll 20s linear infinite;
    will-change: transform; /* Optimasi di mobile */
}
.marquee-item {
    flex-shrink: 0;
    padding: 0 28px;
    display: flex;
    align-items: center;
}
.marquee-item a {
    text-decoration: none;
    color: #3E2A1F;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
    font-family: 'Poppins', sans-serif;
}
.marquee-item .icon {
    width: 22px;
    height: 22px;
    vertical-align: middle;
}
@keyframes marqueeScroll {
    0%   { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}
.marquee-inner:hover {
    animation-play-state: paused;
}

/* ========== FOOTER ========== */
footer {
    background: #f8f9fa;
    text-align: center;
    padding: 15px 10px;
    font-size: 14px;
    color: #555;
    border-top: 1px solid #ddd;
    margin-top: 20px;
    clear: both;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 768px) {
    .navbar {
        padding: 0.7rem 1rem;
    }
    .nav-links {
        display: none;
        flex-direction: column;
        width: 100%;
        background: var(--krem);
        padding: 1rem 0;
        gap: 0.8rem;
        text-align: center;
    }
    .nav-links.show {
        display: flex;
    }
    .burger {
        display: block;
    }
    .slide {
        padding: 3rem 1rem;
        min-height: 350px;
    }
    .slide h1 {
        font-size: 1.8rem;
    }
    .slide p {
        font-size: 1rem;
    }
    .prev, .next {
        width: 30px;
        height: 30px;
        font-size: 1rem;
    }
    .section-title {
        font-size: 1.6rem;
    }
    .products-grid {
        gap: 1.2rem;
    }
    .category-grid {
        gap: 1.2rem;
    }
    .category-info h3 {
        font-size: 1.2rem;
    }

    /* ===== PERBAIKAN TESTIMONI MOBILE ===== */
    .testimonial-group-new {
        grid-template-columns: 1fr; /* Satu kolom penuh */
        gap: 1rem;
        padding: 0 0.5rem;
    }
    .testi-card {
        padding: 1.2rem 1rem; /* Padding lebih kecil */
    }
    .testi-card .avatar {
        font-size: 2.2rem;
    }
    .testi-card p {
        font-size: 0.9rem;
    }
    .testi-card h6 {
        font-size: 0.85rem;
    }
    .testimonial-dots-new {
        margin-top: 1.2rem;
    }

    /* ===== PERBAIKAN MARQUEE MOBILE ===== */
    .marquee-banner {
        padding: 5px 0;
    }
    .marquee-item {
        padding: 0 15px; /* Padding lebih kecil */
    }
    .marquee-item a {
        font-size: 0.8rem; /* Teks lebih kecil */
    }
    .marquee-item .icon {
        width: 18px;
        height: 18px;
    }
    .marquee-inner {
        animation-duration: 15s; /* Sedikit lebih cepat agar tidak terlalu panjang */
    }

    .share-buttons-container {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .slide h1 { font-size: 1.5rem; }
    /* Tambahan opsional untuk layar sangat kecil */
    .marquee-item {
        padding: 0 10px;
    }
    .marquee-item a {
        font-size: 0.75rem;
    }
    .marquee-item .icon {
        width: 16px;
        height: 16px;
    }
    .testi-card {
        padding: 1rem 0.8rem;
    }
}