/* --- CONFIGURATION & COLORS --- */
/* --- CONFIGURATION & COLORS (Updated) --- */
:root {
    --primary: #2d3436; /* Warna teks gelap (tetap) */
    --accent: #3C736E; /* Warna Hijau Logo "CORDUKU" */
    --accent-dark: #2F5A56; /* Warna Hijau Hover (sedikit lebih gelap) */
    --light: #f9f9f9; /* Latar belakang terang (tetap) */
    --danger: #e74c3c; /* Warna merah untuk diskon/alert (diperbaiki sedikit agar lebih fresh) */
}

* { 
    margin: 0; 
    padding: 0; 
    box-sizing: border-box; 
    font-family: 'Quicksand', sans-serif; 
}

body { 
    background-color: var(--light); 
    color: var(--primary); 
    line-height: 1.6; 
}

.container { 
    max-width: 1100px; 
    margin: 0 auto; 
    padding: 0 20px; 
}

/* --- HEADER & NAV ICONS (KODE BARU) --- */
header { 
    background: white; 
    padding: 10px 0; 
    position: sticky; 
    top: 0; 
    z-index: 100; 
    box-shadow: 0 2px 10px rgba(0,0,0,0.05); 
}

nav { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
}

.logo img { 
    height: 60px; /* Ukuran desktop */
    width: auto; 
    object-fit: contain;
    transition: 0.3s;
}

/* --- PERBAIKAN HEADER: RAPAT DAN PRESISI --- */
.nav-icons {
    display: flex;
    align-items: center;
    gap: 5px; /* DIKECILKAN: Agar ikon tidak memakan banyak tempat ke samping */
    justify-content: flex-end;
}

.nav-link-icon, .cart-icon {
    text-decoration: none;
    color: var(--primary);
    font-size: 1.5rem; /* Ukuran tetap besar agar jelas */
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.3s ease;
    cursor: pointer;
    position: relative;
    width: 40px;  /* Memberi area klik yang pasti tanpa mendorong ikon lain */
    height: 40px; /* Membuat ikon berada di dalam kotak imajiner yang sama */
}

/* Warna khusus WhatsApp */
.wa-color {
    color: #0d4622;
}

/* Badge Keranjang: Disesuaikan agar tidak terpotong */
#cart-count { 
    position: absolute; 
    top: -3px;           /* Posisi sedikit ke atas */
    right: -3px;         /* Posisi sedikit ke kanan agar tidak menutupi ikon */
    background: var(--accent); 
    color: white; 
    font-size: 12px;     /* Angka diperbesar (sebelumnya 10px) */
    padding: 4px 6px;    /* Bulatan diperbesar (sebelumnya 2px 5px) */
    border-radius: 50%; 
    font-weight: bold;
    border: 2px solid white; /* Outline putih agar kontras */
    z-index: 10;
    line-height: 1;      /* Memastikan angka tepat di tengah bulatan */
    min-width: 20px;     /* Lebar minimal agar tetap bulat sempurna */
    height: 20px;        /* Tinggi minimal agar tetap bulat sempurna */
    display: flex;
    align-items: center;
    justify-content: center;
}

/* PENYESUAIAN KHUSUS MOBILE */
@media (max-width: 480px) {
    .nav-icons {
        gap: 2px; /* Sangat rapat untuk layar HP sempit */
    }
    .nav-link-icon, .cart-icon {
        font-size: 1.3rem;
        width: 35px; /* Kotak ikon lebih kecil di HP */
        height: 35px;
    }
    .logo img {
        height: 35px; 
    }
}

/* --- HERO SECTION --- */
.hero { 
    text-align: center; 
    padding: 15px 0 5px 0; 
}

.hero h1 { 
    font-size: 2.2rem; 
    margin-bottom: 2px; 
}

.hero p {
    font-size: 0.9rem;
    color: #666;
}

/* --- HERO SLIDER --- */
.hero-slider {
    position: relative;
    width: 100%;
    overflow: hidden;
    background: #fff;
}

.slider-container {
    position: relative;
    max-width: 1100px;
    margin: 0 auto;
    height: 400px; /* Tinggi untuk Desktop */
}

.slide {
    display: none;
    height: 100%;
    position: relative;
    animation: fade 0.8s ease-in-out;
}

.slide.active { display: block; }

.slide img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Gambar akan menyesuaikan area tanpa gepeng */
    border-radius: 15px;
}

.slide-content {
    position: absolute;
    bottom: 40px;
    left: 50px;
    color: white;
    text-shadow: 0 2px 10px rgba(0,0,0,0.5);
    z-index: 2;
}

.slide-content h2 { font-size: 2.5rem; margin-bottom: 10px; }

.btn-slider {
    display: inline-block;
    padding: 10px 25px;
    background: var(--accent); /* Warna Hijau Logo */
    color: white;
    text-decoration: none;
    border-radius: 30px;
    font-weight: 600;
    margin-top: 15px;
    transition: 0.3s;
}

/* Navigasi Panah */
.prev, .next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.7);
    color: var(--accent);
    padding: 15px;
    border: none;
    cursor: pointer;
    border-radius: 50%;
    font-size: 18px;
    transition: 0.3s;
    z-index: 5;
}

.prev:hover, .next:hover { background: white; color: var(--accent-dark); }
.prev { left: 20px; }
.next { right: 20px; }

/* Dots */
.dots-container { text-align: center; padding: 10px 0; }
.dot {
    height: 10px; width: 10px;
    margin: 0 5px;
    background-color: #bbb;
    border-radius: 50%;
    display: inline-block;
    cursor: pointer;
}
.dot.active { background-color: var(--accent); }

@keyframes fade {
    from { opacity: 0.4; } 
    to { opacity: 1; }
}

/* Responsif Mobile */
@media (max-width: 480px) {
    .slider-container { height: 250px; } /* Lebih pendek di HP */
    .slide-content { left: 20px; bottom: 20px; }
    .slide-content h2 { font-size: 1.5rem; }
    .slide-content p { font-size: 0.8rem; }
    .btn-slider { padding: 8px 15px; font-size: 0.8rem; }
    .prev, .next { padding: 10px; font-size: 14px; }
}

/* --- FILTER & SEARCH --- */
.filter-search-container {
    margin-top: 5px;
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.search-box {
    position: relative;
    width: 100%;
    max-width: 500px;
}

.search-box input {
    width: 100%;
    padding: 12px 15px 12px 45px;
    border-radius: 30px;
    border: 1px solid #ddd;
    outline: none;
    font-size: 0.95rem;
}

.search-box i {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: #888;
}

.category-filter {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
}

.cat-btn {
    padding: 6px 15px;
    border-radius: 20px;
    border: 1px solid #ddd;
    background: white;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    transition: 0.3s;
}

.cat-btn.active, .cat-btn:hover {
    background: var(--accent);
    color: white;
    border-color: var(--accent);
}

/* --- PRODUCT GRID & DISKONS --- */
.product-grid { 
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); 
    gap: 15px; 
    margin-bottom: 50px; 
}

.product-card { 
    background: white; 
    padding: 12px; 
    border-radius: 15px; 
    border: 1px solid #eee; 
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: 0.3s;
    position: relative; /* Penting untuk badge diskon */
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.05);
}

.product-card img { 
    width: 100%; 
    height: 180px; 
    object-fit: cover; 
    border-radius: 10px; 
    margin-bottom: 10px; 
}

/* Style Khusus Diskon */
.discount-tag {
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--danger);
    color: white;
    padding: 3px 8px;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 700;
    z-index: 5;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.price-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    margin-bottom: 12px;
}

.price-old {
    font-size: 0.8rem;
    color: #b2bec3;
    text-decoration: line-through;
}

.price-now {
    color: var(--accent);
    font-weight: 700;
    font-size: 1.1rem;
}

.product-card h3 { 
    font-size: 0.9rem; 
    margin-bottom: 5px; 
    text-align: center;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-card p { 
    color: var(--accent); 
    font-weight: 700; 
    font-size: 1rem; 
    margin-bottom: 12px; 
    text-align: center;
}

.btn-primary { 
    width: 100%; 
    background: var(--accent); 
    color: white; 
    padding: 10px 5px; 
    border: white; 
    border-radius: 8px; 
    cursor: pointer; 
    font-weight: 600; 
    font-size: 0.8rem; 
    white-space: nowrap; 
    transition: 0.3s;
}

.btn-primary:hover { 
    background: var(--accent-dark); 
}

/* --- MODAL STYLES --- */
.modal { 
    display: none; 
    position: fixed; 
    z-index: 1000; 
    left: 0; top: 0; width: 100%; height: 100%; 
    background: rgba(0,0,0,0.6); 
    align-items: center; 
    justify-content: center; 
    backdrop-filter: blur(5px); 
}


.modal-content { 
    background: white; 
    padding: 30px; 
    border-radius: 25px; 
    width: 90%; 
    max-width: 450px; 
    max-height: 90vh; 
    overflow-y: auto; 
    position: relative;
    animation: slideUp 0.4s ease; 
}

@keyframes slideUp {
    from { transform: translateY(50px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.close { 
    position: absolute; 
    right: 20px; 
    top: 15px; 
    font-size: 24px; 
    cursor: pointer; 
    color: #999; 
    z-index: 10;
}

#main-detail-img { 
    width: 100%; 
    height: 300px; 
    object-fit: contain; 
    background: #f4f4f4;
    border-radius: 15px; 
    margin-bottom: 10px; 
}

.thumbnail-grid { 
    display: flex; 
    gap: 8px; 
    overflow-x: auto; 
    padding-bottom: 10px; 
}

.thumbnail-grid img { 
    width: 60px; height: 60px; 
    object-fit: cover; 
    border-radius: 8px; 
    cursor: pointer; 
    opacity: 0.5; 
    border: 2px solid transparent;
}

.thumbnail-grid img.active { 
    opacity: 1; 
    border-color: var(--accent); 
}

#checkout-form h3 {
    margin: 20px 0 15px 0;
    font-size: 1.1rem;
    font-weight: 700;
}

.form-group {
    margin-bottom: 15px; 
}

#main-checkout-btn {
    margin-top: 10px;
    background: var(--accent); 
}

/* --- Info Pembayaran --- */
.payment-info {
    background: #f0f7f0; 
    border: 1px dashed var(--accent);
    padding: 15px;
    border-radius: 12px;
    margin: 15px 0;
    font-size: 0.85rem;
    line-height: 1.5;
}

.payment-info strong { color: var(--accent); }

/* --- Pop-up Sukses --- */
.success-icon {
    font-size: 50px;
    color: var(--accent);
    display: block;
    text-align: center;
    margin-bottom: 10px;
}

.success-title {
    text-align: center;
    font-weight: 700;
    margin-bottom: 15px;
}

/* --- WHATSAPP ELEMENTS --- */
.nav-wa-icon {
    font-size: 1.5rem;
    color: #25d366;
    display: flex;
    align-items: center;
}

.floating-wa {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: #25d366;
    color: white;
    padding: 12px 20px; /* Padding yang nyaman untuk ditekan */
    border-radius: 50px;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    z-index: 999;
    font-weight: 600;
    font-size: 14px;
    transition: 0.3s;
}

.floating-wa:hover {
    transform: scale(1.05);
    background: #20ba5a;
}

.floating-wa i {
    font-size: 20px; /* Ukuran ikon WA */
}

/* --- FOOTER --- */
.main-footer {
    background: white;
    padding: 40px 0 20px;
    border-top: 1px solid #eee;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-bottom: 30px;
}

.social-links {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 15px;
}

.social-item {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--primary);
}

.social-item i {
    font-size: 20px;
    color: var(--accent);
    width: 25px;
}

.footer-bottom {
    text-align: center;
    font-size: 12px;
    color: #999;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

/* --- MOBILE RESPONSIVE --- */
@media (max-width: 480px) {
    .product-grid { 
        grid-template-columns: repeat(2, 1fr); 
        gap: 10px; 
    }
    
    .hero h1 { font-size: 1.8rem; }
    
    .product-card { padding: 8px; }
    
    .product-card img { height: 140px; }
    
    .btn-primary { 
        font-size: 0.75rem; 
        padding: 8px 4px; 
    }

/* Memastikan tulisan "Tanya Admin" tetap muncul di HP */
    .floating-wa span { 
        display: inline-block; /* Pastikan tulisan muncul */
    }

    .floating-wa { 
        padding: 10px 18px; /* Sedikit lebih kecil agar tidak menutupi layar HP */
        font-size: 13px;
        bottom: 15px; /* Jarak dari bawah sedikit naik agar tidak menempel */
        right: 15px;
    }
}

/* --- Penyesuaian Form agar Seragam --- */
.form-group input, 
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px 15px; 
    border: 1px solid #ddd;
    border-radius: 12px;
    font-size: 0.95rem;
    font-family: inherit;
    outline: none;
    display: block;
    background-color: white;
    margin-bottom: 5px;
}

.form-group textarea {
    height: 80px; 
    resize: none;
}

.form-group select {
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 1em;
    cursor: pointer;
}

.form-group select:disabled {
    background-color: #f2f2f2;
    cursor: not-allowed;
    color: #999;
}

/* Tombol Share Mini di Kartu Produk */
.share-btn-mini {
    position: absolute;
    top: 10px;
    left: 10px; /* Di sebelah kiri jika badge diskon di kanan */
    background: white;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    cursor: pointer;
    z-index: 5;
    color: var(--primary);
    transition: 0.3s;
}

.share-btn-mini:hover {
    background: var(--accent);
    color: white;
    transform: scale(1.1);
}

/* Pastikan FontAwesome terpasang untuk ikon share */

.nav-link-icon:hover, .cart-icon:hover {
    color: var(--accent);
    transform: scale(1.1);
}