/* =========================================
   main.css - FULL FIX (Clean, No-Apple Name)
   ========================================= */

/* --- 1. SETUP VARIABEL & DASAR --- */
:root {
    --primary-blue: #0066cc;  
    --primary-green: #7ccf30; 
    --accent-yellow: #f8d32f; 
    --dark-text: #333333;
    --light-bg: #f9f9f9;
    --white: #ffffff;
}

/* FIX: Scroll Halus */
html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 0;
    background-color: var(--light-bg);
    color: var(--dark-text);
}

/* =========================================
   2. HEADER & NAVBAR
   ========================================= */
header {
    background: linear-gradient(90deg, var(--primary-green) 0%, var(--primary-blue) 100%);
    color: var(--white);
    padding: 0;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15); 
    position: sticky; top: 0; z-index: 1000;
}

.header-container {
    max-width: 1200px; margin: auto; 
    padding: 12px 25px;
    display: flex; 
    justify-content: space-between; 
    align-items: center;
    position: relative; 
    height: auto; min-height: 50px;
}

/* --- LOGO (KIRI) --- */
.logo-area { display: flex; align-items: center; gap: 12px; z-index: 1002; }
.logo-img { height: 38px; width: auto; background: white; padding: 3px; border-radius: 6px; }
.company-name { font-size: 1rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; white-space: nowrap;}

/* --- NAV MENU (DESKTOP - MEPET KANAN) --- */
.nav-menu { 
    display: flex; 
    align-items: center; 
    gap: 20px; 
    
    /* LOGIKA: Dorong menu ke kanan mendekati icon search */
    margin-left: auto; 
    margin-right: 25px; 
    
    position: relative;
}

.nav-menu a {
    color: rgba(255,255,255,0.9); text-decoration: none; font-size: 0.95rem; font-weight: 500;
    transition: all 0.3s ease; position: relative; white-space: nowrap;
}

/* Efek garis bawah saat hover */
.nav-menu a::after {
    content: ''; position: absolute; width: 0; height: 2px; display: block;
    margin-top: 5px; right: 0; background: var(--accent-yellow); transition: width 0.3s ease;
}
.nav-menu a:hover { color: var(--accent-yellow); }
.nav-menu a:hover::after { width: 100%; left: 0; background: var(--accent-yellow); }

/* --- RIGHT ICONS (Search & Hamburger) --- */
.right-icons { display: flex; align-items: center; gap: 15px; z-index: 1002; }

.icon-btn {
    background: transparent; border: none; color: white; font-size: 1.1rem;
    cursor: pointer; padding: 8px; border-radius: 50%; transition: 0.3s;
    display: flex; align-items: center; justify-content: center;
}
.icon-btn:hover { background: rgba(255,255,255,0.15); color: var(--accent-yellow); }

/* --- HAMBURGER MENU (MOBILE ONLY) --- */
.hamburger {
    display: none; 
    flex-direction: column; justify-content: space-between;
    width: 24px; height: 17px; cursor: pointer; padding: 5px;
}
.hamburger span {
    display: block; width: 100%; height: 2px; background: white; border-radius: 2px; transition: 0.3s;
}
.hamburger.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }


/* =========================================
   3. PREMIUM SEARCH BAR (Gradient & Glass)
   ========================================= */
.search-dropdown-panel {
    display: none; /* Hidden Default */
    position: absolute; 
    top: 100%; left: 0; width: 100%;
    
    /* Background Gradient (Sama dengan Header) */
    background: linear-gradient(90deg, rgba(124, 207, 48, 0.98) 0%, rgba(0, 102, 204, 0.98) 100%);
    
    backdrop-filter: blur(20px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.2);
    padding: 25px 0;
    z-index: 999; 
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.search-dropdown-panel.active {
    display: block !important;
    animation: slideDownSmooth 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.search-container {
    max-width: 750px; margin: auto; padding: 0 25px;
    display: flex; align-items: center;
}

/* Input Wrapper */
.search-glass-form {
    width: 100%; display: flex; align-items: center; gap: 15px;
    
    background: rgba(255, 255, 255, 0.15); 
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    
    padding: 15px 25px;
    border-radius: 50px; 
    border: 1px solid rgba(255, 255, 255, 0.2);
    
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

.search-glass-form:focus-within {
    background: rgba(255, 255, 255, 0.25);
    border-color: var(--accent-yellow);
    box-shadow: 0 15px 35px -10px rgba(0, 0, 0, 0.4);
    transform: translateY(-2px);
}

.search-glass-form i.fa-search { color: rgba(255,255,255,0.8); font-size: 1.2rem; }
.search-glass-form input {
    border: none; background: transparent; width: 100%;
    font-size: 1.2rem; color: white; outline: none; font-weight: 500;
}
.search-glass-form input::placeholder { color: rgba(255,255,255,0.6); }

.close-search-icon {
    cursor: pointer; color: rgba(255,255,255,0.6); font-size: 1.2rem; padding: 5px; transition: 0.3s;
}
.close-search-icon:hover { color: white; transform: scale(1.2); }


/* =========================================
   4. RESPONSIVE (MEDIA QUERY)
   ========================================= */
@media (max-width: 992px) {
    .company-name { font-size: 0.9rem; }
    
    /* Nav Menu berubah jadi Sidebar */
    .nav-menu {
        position: fixed; top: 0; right: -100%; width: 80%; height: 100vh;
        background: white; flex-direction: column; justify-content: center;
        margin: 0; 
        transform: none; left: auto; 
        box-shadow: -5px 0 20px rgba(0,0,0,0.15); z-index: 1001; transition: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    }
    .nav-menu.active { right: 0; }
    .nav-menu a { color: var(--dark-text); font-size: 1.3rem; margin: 15px 0; font-weight: bold; }
    .nav-menu a::after { display: none; }
    
    /* Hamburger MUNCUL hanya di layar < 992px */
    .hamburger { display: flex; }
    
    .search-dropdown-panel { padding: 15px 0; }
    .search-glass-form { padding: 10px 15px; }
    .search-glass-form input { font-size: 1rem; }
}

@keyframes slideDownSmooth {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}


/* =========================================
   5. COMPONENT UTAMA (Footer, Buttons, Cards)
   ========================================= */
.container { max-width: 1200px; margin: auto; padding: 0 20px; }

/* Buttons */
.btn-cta {
    display: inline-block;
    background: linear-gradient(90deg, var(--primary-blue), var(--primary-green));
    color: white; padding: 12px 35px; text-decoration: none; border-radius: 50px;
    font-weight: bold; box-shadow: 0 4px 10px rgba(0,102,204,0.3); transition: transform 0.2s;
}
.btn-cta:hover { transform: translateY(-3px); box-shadow: 0 6px 15px rgba(0,102,204,0.4); }

.btn-order {
    display: block; width: 100%; background: var(--primary-blue); color: white;
    padding: 10px 0; text-decoration: none; border-radius: 5px; font-weight: bold;
    transition: background 0.3s;
}
.btn-order:hover { background: var(--primary-green); }

/* Product Card */
.product-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px; margin-bottom: 4rem;
}
.product-card {
    background: var(--white); border-radius: 10px; overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05); transition: transform 0.3s ease;
    border-top: 5px solid var(--primary-blue);
}
.product-card:hover { transform: translateY(-5px); }
.card-img-placeholder {
    height: 180px; background-color: #f0f0f0; display: flex;
    align-items: center; justify-content: center; color: #aaa; font-size: 3rem;
}
.card-body { padding: 1.5rem; text-align: center; }
.card-title { font-size: 1.2rem; margin: 0 0 10px; color: var(--primary-blue); font-weight: bold; }
.card-desc { font-size: 0.9rem; color: #666; margin-bottom: 15px; min-height: 40px;}
.price-tag { display: block; font-weight: bold; color: var(--primary-green); font-size: 1.1rem; margin-bottom: 15px; }


/* --- FIX: Agar Judul Tidak Ketutupan Header saat Navigasi --- */
.category-section {
    margin-bottom: 60px;
    border-bottom: 1px solid #eee;
    padding-bottom: 30px;
    scroll-margin-top: 120px; /* Jarak aman dari header sticky */
}

#produk {
    scroll-margin-top: 120px; /* Jarak aman untuk link 'Produk & Layanan' */
}


/* Catalog Layout & Filter */
.catalog-layout { display: flex; gap: 40px; margin-top: 40px; align-items: flex-start; }
.catalog-content { flex: 1; }
.filter-card {
    background: white; border-radius: 15px; box-shadow: 0 5px 20px rgba(0,0,0,0.05);
    padding: 25px; border: 1px solid #eee; position: sticky; top: 100px;
}
.filter-sidebar { flex: 0 0 250px; }
.filter-header {
    font-size: 1.1rem; font-weight: bold; color: var(--primary-blue);
    margin-bottom: 20px; padding-bottom: 15px; border-bottom: 2px solid #f0f0f0;
    display: flex; justify-content: space-between; align-items: center;
}
.filter-list { list-style: none; padding: 0; margin: 0; }
.filter-option {
    display: block; position: relative; padding: 12px 15px 12px 45px; margin-bottom: 10px;
    color: #555; text-decoration: none; border-radius: 10px; transition: 0.2s;
    background: #f9f9f9; border: 1px solid transparent;
}
.filter-option::before {
    content: ''; position: absolute; left: 15px; top: 50%; transform: translateY(-50%);
    width: 18px; height: 18px; border: 2px solid #ccc; border-radius: 50%; background: white; transition: 0.2s;
}
.filter-option:hover { background: #eef7ff; color: var(--primary-blue); }
.filter-option.active {
    background: #e6f4ff; color: var(--primary-blue); font-weight: bold; border-color: var(--primary-blue);
}
.filter-option.active::before {
    border-color: var(--primary-blue); background: var(--primary-blue); box-shadow: inset 0 0 0 3px white;
}
.mobile-filter-btn {
    display: none; position: fixed; bottom: 30px; left: 50%; transform: translateX(-50%);
    background: var(--dark-text); color: white; padding: 12px 30px; border-radius: 50px;
    font-weight: bold; box-shadow: 0 5px 20px rgba(0,0,0,0.3); z-index: 990;
    cursor: pointer; align-items: center; gap: 10px;
}
.filter-overlay {
    display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.5); z-index: 998; backdrop-filter: blur(3px);
}
@media (max-width: 768px) {
    .catalog-layout { display: block; }
    .mobile-filter-btn { display: flex; }
    .filter-sidebar {
        position: fixed; bottom: -100%; left: 0; width: 100%; height: auto;
        max-height: 80vh; background: white; z-index: 999; border-radius: 20px 20px 0 0;
        padding: 20px; transition: bottom 0.3s ease-out; box-shadow: 0 -5px 30px rgba(0,0,0,0.2);
        overflow-y: auto;
    }
    .filter-sidebar.show { bottom: 0; }
    .filter-header { justify-content: center; }
    .close-filter { position: absolute; right: 0; top: 0; font-size: 1.5rem; cursor: pointer; padding: 5px; }
}

/* Pagination */
.pagination {
    display: flex; justify-content: center; align-items: center; gap: 15px;
    margin-top: 50px; margin-bottom: 50px;
}
.page-btn {
    display: inline-flex; align-items: center; justify-content: center; height: 45px; padding: 0 25px;
    background: white; border: 2px solid var(--primary-blue); color: var(--primary-blue);
    text-decoration: none; border-radius: 50px; font-weight: bold; transition: 0.3s;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}
.page-btn:hover {
    background: var(--primary-blue); color: white; transform: translateY(-2px);
    box-shadow: 0 6px 10px rgba(0,102,204,0.2);
}
.page-btn.active {
    background: linear-gradient(90deg, var(--primary-blue), var(--primary-green));
    border: none; color: white; padding: 0 30px;
}
.page-btn.disabled {
    background: #f0f0f0; border-color: #ddd; color: #aaa; cursor: not-allowed;
    transform: none; box-shadow: none;
}

/* Modal */
.modal {
    display: none; position: fixed; z-index: 1000; left: 0; top: 0;
    width: 100%; height: 100%; background-color: rgba(0, 0, 0, 0.9);
}
.modal-content {
    margin: auto; display: flex; flex-direction: column; align-items: center;
    justify-content: center; height: 100%; color: white;
}
#modalImageContainer {
    width: 80%; max-width: 900px; height: 50vh; background: #333;
    display: flex; align-items: center; justify-content: center;
    border: 2px solid #555; border-radius: 10px;
}
.close-modal {
    position: absolute; top: 20px; right: 35px; color: #f1f1f1;
    font-size: 40px; font-weight: bold; cursor: pointer;
}

/* Footer */
footer {
    background: linear-gradient(90deg, #7ccf30 0%, #0066cc 100%);
    color: white; margin-top: 5rem; padding: 4rem 2rem 2rem 2rem;
    box-shadow: 0 -10px 30px rgba(0,0,0,0.15);
    border-top-left-radius: 20px; border-top-right-radius: 20px;
}
.footer-container {
    max-width: 1200px; margin: auto; display: flex; flex-direction: row; 
    justify-content: space-between; align-items: flex-start; gap: 40px; flex-wrap: wrap;
    margin-bottom: 3rem; text-align: left;
}
.footer-col { flex: 1; min-width: 250px; }
.footer-col h3 {
    font-size: 1.4rem; margin-bottom: 1.5rem; font-weight: bold; text-transform: uppercase;
    letter-spacing: 1px; position: relative; color: white;
}
.footer-col h3::after {
    content: ''; display: block; width: 50px; height: 3px; background-color: #f8d32f; margin-top: 8px;
}
.footer-links ul, .contact-list ul { list-style: none; padding: 0; margin: 0; }
.footer-links li, .contact-list li { margin-bottom: 12px; }
.footer-links a, .contact-list li { color: rgba(255,255,255, 0.9) !important; text-decoration: none; transition: 0.3s; }
.footer-links a:hover { color: #f8d32f !important; padding-left: 5px; }
.contact-list li { display: flex; align-items: flex-start; gap: 15px; }
.contact-list i { color: #f8d32f; margin-top: 5px; }
.social-links a {
    display: inline-flex; align-items: center; justify-content: center;
    width: 40px; height: 40px; background: rgba(255,255,255,0.2); 
    color: white; border-radius: 50%; margin-right: 10px; text-decoration: none; transition: 0.3s;
}
.social-links a:hover { background: #f8d32f; color: #333; }
.footer-bottom {
    text-align: center; border-top: 1px solid rgba(255,255,255, 0.3);
    padding-top: 20px; font-size: 0.9rem; color: rgba(255,255,255, 0.8);
}
@media (max-width: 768px) {
    .footer-container { flex-direction: column; text-align: center; }
    .footer-col h3::after { margin: 8px auto; }
    .contact-list li { justify-content: center; }
}