/*
Theme Name: WP Mobil By Gudangwebsite.net
Theme URI: https://gudangwebsite.net/wpmobil
Author: gudangwebsite.net
Author URI: https://gudangwebsite.net
Description: Tema Dealer Mobile buatan Gudang Website. Untuk mengaktifkan Mega Menu, buka Appearance > Menus, aktifkan 'CSS Classes' di Screen Options, lalu tambahkan class 'trigger-mega-menu' pada menu item yang diinginkan.
Version: 2.0.5
Text Domain: wpmobil
*/


@import url("https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600;700&display=swap");

html {
    scroll-behavior: smooth;
}
/* 1. RESET & BODY SETUP */
body {
    font-family: "Inter", sans-serif;
    scroll-behavior: smooth;
    margin: 0;
    /* Memberikan ruang agar konten di bawah navigasi fixed tidak terpotong */
    padding-top: 80px; 
}

/* Menjaga ukuran logo agar tetap proporsional di dalam header */
.custom-logo-link img {
    max-height: 50px; /* Sesuaikan tinggi logo Anda */
    width: auto;
    display: block;
    transition: transform 0.3s ease;
}

.custom-logo-link:hover img {
    transform: scale(1.05); /* Efek zoom sedikit saat dihover */
}

/* 2. NAVIGASI UTAMA (FIXED) */
.glass-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    /* Hapus display:flex di sini agar tidak bertabrakan dengan flex justify-between di HTML */
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    z-index: 9999;
    transition: all 0.3s ease;
}

/* Tinggi bar navigasi disamakan dengan padding-top body agar presisi */
.glass-nav .max-w-7xl {
    height: 80px;
}

.nav-scrolled {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    /* Menghilangkan transform translateY agar tidak menutupi slider lebih dalam */
    transform: translateY(0) !important; 
}

/* 3. MENU UTAMA & DROPDOWN - VERSI PREMIUM */
.wpmobil-menu-list {
    display: flex;
    align-items: center;
    gap: 0.5rem; /* Jarak antar menu utama */
    list-style: none;
    margin: 0;
    padding: 0;
}

.wpmobil-menu-list > li {
    position: relative;
}

/* Link Menu Utama */
.wpmobil-menu-list > li > a {
    display: block;
    padding: 0.75rem 1.25rem;
    font-size: 0.95rem;
    font-weight: 600;
    color: #1f2937; /* Gray-800 */
    text-decoration: none;
    transition: all 0.3s ease;
    border-radius: 0.5rem;
}

.wpmobil-menu-list > li:hover > a {
    color: var(--primary-color, #2563eb);
    background-color: rgba(37, 99, 235, 0.05); /* Hover effect halus */
}

/* Indikator Dropdown (Otomatis jika ada sub-menu) */
.wpmobil-menu-list .menu-item-has-children > a::after {
    content: "\f107"; /* FontAwesome Chevron Down */
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    margin-left: 8px;
    font-size: 0.75rem;
    transition: transform 0.3s ease;
    display: inline-block;
}

.wpmobil-menu-list .menu-item-has-children:hover > a::after {
    transform: rotate(180deg);
}

/* Sub-menu (Dropdown) */
.wpmobil-menu-list .sub-menu {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 16rem;
    background: #ffffff;
    padding: 0.75rem;
    border: 1px solid rgba(0,0,0,0.05);
    border-radius: 1rem;
    box-shadow: 0 15px 30px -10px rgba(0, 0, 0, 0.15);
    z-index: 10000;
    
    /* Animasi */
    opacity: 0;
    visibility: hidden;
    transform: translateY(15px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.wpmobil-menu-list li:hover > .sub-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(5px);
}

/* Item di dalam Dropdown */
.wpmobil-menu-list .sub-menu li {
    list-style: none;
}

.wpmobil-menu-list .sub-menu li a {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
    font-weight: 500;
    color: #4b5563;
    border-radius: 0.5rem;
    text-decoration: none;
    transition: all 0.2s;
}

.wpmobil-menu-list .sub-menu li a:hover {
    background-color: var(--primary-color, #2563eb);
    color: #ffffff !important;
    padding-left: 1.5rem;
}

/* Perbaikan untuk Mobile Menu agar rapi */
.mobile-nav-list li a {
    display: block;
    padding: 0.75rem 1rem;
    font-weight: 600;
    color: #1f2937;
    border-radius: 0.5rem;
}

.mobile-nav-list .sub-menu {
    margin: 0.5rem 0 0.5rem 1rem;
    border-left: 2px solid #e5e7eb;
}

/* 4. PERBAIKAN SLIDER (PRESISE HERO) */
#home {
    position: relative;
    overflow: hidden;
    width: 100%;
    /* Tinggi layar dikurangi tinggi menu agar slider pas satu layar */
    z-index: 1;
}

.slide {
    opacity: 0;
    transition: opacity 1s ease-in-out;
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.slide.active {
    opacity: 1;
    z-index: 10;
}

.slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

/* 5. ELEMEN TAMBAHAN */
.nav-link-effect {
    position: relative;
    font-weight: 600;
}

.nav-link-effect::after {
    content: "";
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -4px;
    left: 0;
    background-color: #2563eb;
    transition: width 0.3s ease;
}

.nav-link-effect:hover::after {
    width: 100%;
}

.car-card:hover img {
    transform: scale(1.05);
}

.filter-btn.active {
    background-color: #2563eb;
    color: white;
    border-color: #2563eb;
}

/* Pastikan Mobile Menu berada di atas slider dan navigasi */

/* Mobile Menu Styling */
#mobile-menu {
    transition: all 0.3s ease-in-out;
}

/* Memastikan menu list mobile vertikal rapi */
.mobile-nav-list li {
    list-style: none;
    padding: 10px 0;
    border-bottom: 1px solid #f3f4f6;
}

.mobile-nav-list li a {
    display: block;
    color: #374151;
}

/* Pastikan tombol mobile dapat ditekan */
#mobile-menu-button {
    position: relative;
    z-index: 10002;
    cursor: pointer;
}


/* --- PERBAIKAN SUB-MENU MOBILE --- */

/* Sembunyikan sub-menu secara default di mobile agar tidak langsung muncul */
.mobile-nav-list .sub-menu {
    display: none; /* Sembunyikan dulu */
    padding-left: 1.5rem; /* Beri jarak agar terlihat seperti level 2 */
    background-color: #f9fafb;
    border-left: 2px solid #2563eb;
    margin-top: 0.5rem;
}

/* Jika Anda ingin sub-menu mobile muncul saat menu utama di-klik, 
   tambahkan class aktif via JS nanti. 
   Tapi jika ingin muncul otomatis namun rapi, gunakan ini: */
.mobile-nav-list li:hover > .sub-menu {
    display: block;
}

.mobile-nav-list li {
    list-style: none;
    position: relative;
}

.mobile-nav-list .sub-menu li a {
    font-size: 0.875rem;
    color: #4b5563;
    padding: 0.5rem 0;
}


/* Styling sederhana untuk paginasi WordPress */
.pagination {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}
.pagination li span, .pagination li a {
    padding: 0.5rem 1rem;
    border-radius: 0.75rem;
    background-color: white;
    border: 1px solid #f3f4f6;
    font-size: 0.875rem;
    font-weight: 600;
}
.pagination li span.current {
    background-color: #2563eb;
    color: white;
    border-color: #2563eb;
}
.pagination li a:hover {
    background-color: #eff6ff;
    color: #2563eb;
}


/* Mega Menu Logic */
#mega-menu-panel {
    transition: opacity 0.3s ease, visibility 0.3s ease;
    display: block !important; 
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    
    /* TAMBAHKAN INI */
    background-color: #ffffff; /* Warna putih solid */
    z-index: 100;             /* Pastikan di atas konten body */
    position: absolute;       /* Memastikan posisi melayang */
    width: 100%;
    left: 0;
}

/* Mega Menu Full Width Logic */
#mega-menu-panel {
    position: absolute;
    left: 0;
    right: 0;
    width: 100vw; /* Memaksa lebar sesuai viewport/layar */
    background-color: #ffffff !important; /* Warna putih solid */
    transition: all 0.3s ease-in-out;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    z-index: 999;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

#mega-menu-panel.is-active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
}

/* Memastikan konten di dalam panel tidak transparan */
.mega-menu-wrapper {
    background-color: #ffffff;
}

/* Hilangkan efek blur navigasi jika mengganggu */
.nav-scrolled {
    background-color: rgba(255, 255, 255, 0.98) !important;
    backdrop-filter: none !important;
}


