/* --- style.css (VERSI FINAL AUTO-HEIGHT) --- */

/* 1. RESET & DASAR */
* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; }
body { background-color: #f4f7f6; color: #333; line-height: 1.6; display: flex; flex-direction: column; min-height: 100vh; }
a { text-decoration: none; color: inherit; transition: 0.3s; }
ul { list-style: none; }

/* 2. VARIABEL WARNA */
:root {
    --primary: #0d47a1; /* Royal Blue */
    --secondary: #ffca28; /* Golden Orange */
    --dark: #1e272e;
    --light: #ffffff;
}

/* 3. HEADER & NAVIGASI */
.top-bar { background: var(--secondary); color: var(--dark); padding: 8px 5%; font-size: 0.85rem; display: flex; justify-content: space-between; font-weight: bold; }
header { background: var(--light); padding: 15px 5%; box-shadow: 0 2px 10px rgba(0,0,0,0.1); display: flex; justify-content: space-between; align-items: center; position: relative; top: 0; z-index: 1000; }
.logo { font-size: 1.5rem; font-weight: 800; color: var(--primary); text-transform: uppercase; }
nav ul { display: flex; gap: 20px; }
nav ul li a { font-weight: 600; color: #333; }
nav ul li a:hover, nav ul li a.active { color: var(--primary); border-bottom: 2px solid var(--secondary); }

/* 4. SLIDESHOW (PERBAIKAN AUTO HEIGHT) */
.slideshow-container {
    max-width: 100%;
    position: relative;
    margin: auto;
    background: #000; /* Background hitam agar elegan saat loading */
}

/* Gambar Slide */
.mySlides {
    display: none;
    width: 100%;
    height: auto; /* Mengikuti tinggi asli gambar */
}

.mySlides img {
    width: 100%;
    height: auto; /* Gambar utuh 100%, tidak dicrop */
    display: block;
    filter: brightness(60%); /* Gelapkan sedikit agar teks terbaca */
}

/* Animasi Slide */
.fade { animation-name: fade; animation-duration: 1.5s; }
@keyframes fade { from {opacity: .4} to {opacity: 1} }

/* Teks di Atas Slide */
.text-overlay {
    color: #fff;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    width: 90%;
    z-index: 2;
}

.text-overlay h1 {
    font-size: 3.5vw; /* Ukuran font responsif (ikut lebar layar) */
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px #000;
}

.text-overlay p {
    font-size: 1.5vw;
    margin-bottom: 20px;
    text-shadow: 1px 1px 2px #000;
}

/* Tombol CTA Slide */
.btn-cta {
    background: var(--secondary);
    color: var(--dark);
    padding: 10px 25px;
    border-radius: 5px;
    font-weight: bold;
    display: inline-block;
    border: none;
    cursor: pointer;
    font-size: 1rem;
}
.btn-cta:hover { background: #ffb300; transform: translateY(-2px); }

/* Titik Navigasi (Dots) */
.dots-container {
    text-align: center;
    position: absolute;
    bottom: 20px;
    width: 100%;
    z-index: 3;
}
.dot {
    height: 12px;
    width: 12px;
    margin: 0 5px;
    background-color: rgba(255,255,255,0.5);
    border-radius: 50%;
    display: inline-block;
    transition: 0.6s;
    cursor: pointer;
}
.dot.active { background-color: var(--secondary); opacity: 1; }

/* 5. LAYOUT UMUM (GRID & CARD) */
.section { padding: 60px 5%; }
.section-title { text-align: center; margin-bottom: 40px; color: var(--primary); font-size: 2rem; position: relative; }
.section-title::after { content: ''; display: block; width: 80px; height: 4px; background: var(--secondary); margin: 10px auto 0; }

.grid-container { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 30px; }
.card { background: white; padding: 20px; border-radius: 8px; box-shadow: 0 3px 10px rgba(0,0,0,0.05); transition: 0.3s; }
.card:hover { transform: translateY(-5px); box-shadow: 0 10px 20px rgba(0,0,0,0.1); }
.card img { width: 100%; height: 200px; object-fit: cover; margin-bottom: 15px; background: #eee; border-radius: 5px; }
.card h3 { color: var(--primary); margin-bottom: 10px; }

/* 6. HALAMAN DETAIL PRODUK (TABEL) */
.product-detail-container { display: flex; flex-wrap: wrap; gap: 40px; margin-top: 20px; }
.detail-image { flex: 1; min-width: 300px; }
.detail-image img { width: 100%; border-radius: 10px; }
.detail-info { flex: 1.5; min-width: 300px; }
.spec-table { width: 100%; border-collapse: collapse; margin: 10px 0 20px; }
.spec-table th, .spec-table td { padding: 12px; border: 1px solid #ddd; text-align: left; }
.spec-table th { background: var(--primary); color: white; width: 40%; }
.spec-table tr:nth-child(even) { background: #f2f2f2; }

/* 7. FORMULIR KONTAK */
.contact-form input, .contact-form textarea { width: 100%; padding: 10px; margin-bottom: 15px; border: 1px solid #ddd; border-radius: 5px; background: #fafafa; }
.contact-form button { background: var(--primary); color: white; padding: 12px; border: none; border-radius: 5px; width: 100%; cursor: pointer; }

/* 8. FITUR ZOOM GAMBAR (LIGHTBOX) */
.modal { display: none; position: fixed; z-index: 9999; left: 0; top: 0; width: 100%; height: 100%; background-color: rgba(0,0,0,0.9); overflow: hidden; }
.modal-content { margin: auto; display: block; width: 80%; max-width: 800px; max-height: 80vh; object-fit: contain; position: relative; top: 50%; transform: translateY(-50%); border: 2px solid white; animation: zoomEffect 0.3s; }
.close { position: absolute; top: 20px; right: 35px; color: #f1f1f1; font-size: 40px; font-weight: bold; cursor: pointer; z-index: 10000; }
@keyframes zoomEffect { from {transform: translateY(-50%) scale(0.5); opacity: 0;} to {transform: translateY(-50%) scale(1); opacity: 1;} }
.card img { cursor: zoom-in; }

/* 9. TOMBOL WA MELAYANG */
.float-wa { position: fixed; width: 60px; height: 60px; bottom: 30px; right: 30px; background-color: #25d366; color: #FFF; border-radius: 50px; text-align: center; box-shadow: 2px 2px 10px rgba(0,0,0,0.2); z-index: 9999; display: flex; align-items: center; justify-content: center; animation: pulse 2s infinite; }
.float-wa:hover { background-color: #128C7E; transform: scale(1.1); }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7); } 70% { box-shadow: 0 0 0 15px rgba(37, 211, 102, 0); } 100% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0); } }

/* 10. FOOTER */
footer { background: var(--dark); color: #ccc; padding: 50px 5% 20px; margin-top: auto; }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 40px; margin-bottom: 40px; }
.footer-col h3 { color: white; margin-bottom: 20px; border-bottom: 2px solid var(--secondary); display: inline-block; }
.copyright { text-align: center; border-top: 1px solid #444; padding-top: 20px; font-size: 0.8rem; }

/* --- RESPONSIVE MOBILE (Gaya App Modern) --- */
@media (max-width: 768px) {
    
    /* 1. Bar Atas (Jam Kerja) dibuat kecil & geser */
    .top-bar {
        font-size: 0.7rem; /* Huruf kecil */
        white-space: nowrap;
        overflow-x: auto; /* Bisa digeser jika kepanjangan */
        display: block; /* Agar tidak tumpuk */
        text-align: center;
        padding: 5px;
    }

 
    /* 3. Logo diperkecil sedikit agar pas */
    .logo {
        font-size: 1.2rem;
        margin-bottom: 5px;
    }

    /* 4. MENU NAVIGASI (MODEL GESER SAMPING) */
    nav {
        width: 100%;
        background-color: #fff; /* Warna dasar putih */
    }

    nav ul {
        display: flex;       /* Wajib: Menyusun ke samping */
        flex-direction: row; /* Arah Horizontal */
        overflow-x: auto;    /* Aktifkan Scroll Samping */
        white-space: nowrap; /* Mencegah teks turun ke baris baru */
        gap: 20px;           /* Jarak antar menu */
        padding: 10px 20px;  /* Ruang sentuh jari */
        
        /* Agar tulisan menu di tengah secara visual */
        justify-content: flex-start; 
        
        /* Hilangkan Scrollbar kasar (biar mulus) */
        -webkit-overflow-scrolling: touch; 
        scrollbar-width: none; /* Untuk Firefox */
    }

    /* Hilangkan batang scrollbar di Chrome/Safari agar bersih */
    nav ul::-webkit-scrollbar {
        display: none;
    }

    /* Gaya Link Menu di HP */
    nav ul li a {
        font-size: 0.9rem;
        padding-bottom: 5px;
        color: #555;
    }
    
    /* Indikator Menu Aktif (Garis Bawah) */
    nav ul li a.active {
        color: var(--primary);
        border-bottom: 3px solid var(--secondary);
    }

    /* 5. Slideshow & Teks Hero */
    .mySlides { height: 250px; } /* Banner tidak terlalu tinggi */
    .text-overlay { width: 95%; }
    .text-overlay h1 { font-size: 1.2rem; }
    .text-overlay p { font-size: 0.8rem; display: none; } /* Sembunyikan deskripsi panjang di HP agar rapi */
    .btn-cta { padding: 6px 15px; font-size: 0.8rem; margin-top: 5px; }
    
    /* 6. Grid & Layout Lainnya */
    .section { padding: 40px 5%; }
    .grid-container { grid-template-columns: 1fr; gap: 20px; }
    
    /* Tombol WA & Tabel */
    .float-wa { width: 50px; height: 50px; bottom: 20px; right: 20px; }
    .float-wa svg { width: 25px; height: 25px; }
    
    /* Tabel Spesifikasi agar bisa digeser di HP */
    .product-detail-container { flex-direction: column; }
    .spec-table { display: block; overflow-x: auto; white-space: nowrap; }
}