/* --- 1. SIDEBAR & GENERAL FIXES --- */
.menu-web ul li a img {
    width: 20px;
    height: auto;
    display: inline-block;
    vertical-align: middle;
    margin-right: 10px;
    float: none;
}

.menu-web ul li a p {
    display: inline-block;
    width: auto;
    margin: 0;
    vertical-align: middle;
}

.card-spacing {
    padding: 5px !important;
}

/* --- 2. KARTU PRODUK (COMPACT VERSION) --- */
.card-product-kk {
    background: #fff;
    border-radius: 4px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
    border: 1px solid #ddd !important;
    transition: all 0.2s ease-in-out;
    position: relative;
}

.card-product-kk:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    border-color: #e11b1b !important;
    transform: translateY(-2px);
}

/* Area Gambar Dikunci 140px agar tidak melar */
.card-product-kk .image-box {
    height: 140px !important; 
    background: #fcfcfc;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
    border-bottom: 1px solid #f5f5f5;
}

.card-product-kk .image-box img {
    max-height: 100%;
    width: auto;
    object-fit: contain;
}

.card-product-kk .content-box {
    padding: 10px;
    flex-grow: 1;
}

.card-product-kk .title-kk {
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 5px;
    height: 34px;
    line-height: 1.4;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.card-product-kk .title-kk a { color: #333; text-decoration: none; }

.card-product-kk .price-kk {
    color: #e11b1b;
    font-weight: 700;
    font-size: 13px;
}

.card-product-kk .footer-box {
    border-top: 1px solid #eee;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #fafafa;
    padding: 0 0 0 10px;
}

.card-product-kk .views-kk { color: #999; font-size: 10px; }

.card-product-kk .btn-order-kk {
    background: #e11b1b !important;
    color: #ffffff !important; /* Paksa warna putih agar terlihat */
    padding: 8px 15px;
    text-decoration: none;
    font-weight: 700;
    font-size: 11px;
    border-top-left-radius: 12px;
    transition: 0.3s;
    display: inline-block;
}

.card-product-kk .btn-order-kk:hover {
    background: #25D366 !important; /* Warna hijau WA saat di-hover */
    color: #ffffff !important;
}

/* --- 3. HOME LAYOUT (BANNER & LISTING) --- */
.home-section-wrapper {
    margin-top: 40px;
    margin-bottom: 40px;
    clear: both;
}

.home-category-flex {
    display: flex;
    flex-wrap: wrap;
    align-items: stretch; /* Sejajarkan tinggi bawah banner & produk */
}

/* Lebar Banner Terkunci */
.home-category-banner {
    flex: 0 0 240px !important;
    width: 240px !important;
    margin-right: 10px;
    border-radius: 4px;
    overflow: hidden;
    position: relative;
}

.home-category-banner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Efek Garis Putih (Line) Saat Hover Banner */
.home-category-banner.effect-bubba::before, 
.home-category-banner.effect-bubba::after {
    content: '';
    position: absolute;
    top: 15px; right: 15px; bottom: 15px; left: 15px;
    border: 1px solid #fff;
    opacity: 0;
    transition: opacity 0.35s, transform 0.35s;
    transform: scale(0);
    z-index: 2;
    pointer-events: none;
}

.home-category-banner:hover::before, 
.home-category-banner:hover::after {
    opacity: 1;
    transform: scale(1);
}

.home-category-products {
    flex: 1;
    min-width: 0;
}

/* --- 4. RESPONSIVE MOBILE --- */
@media (max-width: 767px) {
    .home-category-flex { display: block; }
    .home-category-banner {
        width: 100% !important;
        flex: none !important;
        height: 180px;
        margin-right: 0 !important;
        margin-bottom: 15px;
    }
}

/* --- BANNER RESPONSIVE LOGIC --- */
/* Sembunyikan banner sidebar di HP agar tidak gepeng */
@media (max-width: 767px) {
    .home-category-banner.hidden-xs {
        display: none !important;
    }
    .mobile-banner-header {
        display: block !important;
        width: 100%;
        margin-bottom: 15px;
        border-radius: 4px;
        overflow: hidden;
    }
}

/* Pastikan di desktop banner header mobile sembunyi */
@media (min-width: 768px) {
    .mobile-banner-header {
        display: none !important;
    }
}

/* --- FIX BREADCRUMB MOBILE (PROPORSIONAL & SATU BARIS) --- */
@media (max-width: 767px) {
    .breadcrumb-web {
        padding: 15px 0 !important;
        border-bottom: 1px solid #f0f0f0;
    }

    .breadcrumb-web ul {
        display: flex !important; /* Gunakan flex agar aligment lebih presisi */
        align-items: center;
        white-space: nowrap;
        overflow: hidden; /* Sembunyikan teks yang meluber */
        padding: 0;
        margin: 0;
    }

    .breadcrumb-web ul li {
        /* Kembalikan ke ukuran normal agar proporsional */
        font-size: 13px !important; 
        display: inline-flex !important;
        align-items: center;
        color: #666;
    }

    /* Atur jarak ikon pemisah (>) */
    .breadcrumb-web ul li i, 
    .breadcrumb-web ul li:after {
        font-size: 11px !important;
        margin: 0 8px !important;
        opacity: 0.5;
    }

    /* Item Aktif (Nama Produk) yang akan dipotong jika lebar layar habis */
    .breadcrumb-web ul li.active {
        flex: 1; /* Biarkan mengambil sisa ruang */
        min-width: 0;
        display: block !important;
        overflow: hidden;
        text-overflow: ellipsis; /* Munculkan titik tiga (...) */
        white-space: nowrap;
        color: #333;
        font-weight: 500;
    }
}

/* --- FIX SEARCH BOX (FINAL NO DOUBLE BORDER) --- */
.header-content .search-box {
    margin-right: 60px !important;
    float: left !important;
    border: none !important; /* Hapus border container */
    background: transparent !important;
    position: relative;
    z-index: 10;
}

/* Satu-satunya border yang aktif */
.search-box form {
    display: flex !important;
    align-items: center;
    border: 2px solid #e11b1b !important; 
    border-radius: 4px;
    background: #fff;
    height: 42px;
}

.search-box input, .search-box select, .search-box button {
    border: none !important; /* Matikan semua border anak */
    box-shadow: none !important;
    outline: none !important;
}

.search-box .category-box {
    border-right: 1px solid #eee !important; /* Pemisah tipis */
}

/* --- FIX MENU KATEGORI DESKTOP (CLEAN WHITE) --- */
/* --- FIX DROPDOWN DESKTOP (CLEAN WHITE) --- */
.menu_more_header {
    display: none; 
    position: absolute;
    top: 185px; /* Sesuaikan dengan tinggi header Anda agar menempel */
    left: 50%;
    transform: translateX(-585px); /* Menyelaraskan dengan kontainer kiri */
    width: 270px;
    z-index: 999;
    background: #fff !important;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    border: 1px solid #eee;
}

.menu_more_header ul li {
    border-bottom: 1px solid #f9f9f9;
    background: #fff !important; /* Paksa putih */
}

.menu_more_header ul li a {
    color: #666 !important;
    padding: 12px 20px;
    display: block;
}

.menu_more_header ul li a:hover {
    color: #e11b1b !important;
    background: #fcfcfc;
}

/* --- FIX MENU SLIDE MOBILE --- */
.menu-mobile-left-content {
    position: fixed;
    top: 0;
    left: -270px; /* Sembunyi di kiri */
    width: 270px;
    height: 100%;
    z-index: 1000;
    transition: 0.3s;
    overflow-y: auto;
    background: #fff;
    box-shadow: 2px 0 10px rgba(0,0,0,0.1);
}

.menu-mobile-left-content.active {
    left: 0; /* Slide ke kanan saat aktif */
}

/* --- MEGASTORE PAGINATION STYLE --- */
.pagination-product {
    display: inline-block;
    list-style: none;
    padding: 0;
}

.pagination-product li {
    display: inline-block;
    margin: 0 3px;
}

.pagination-product li a {
    display: block;
    width: 35px;
    height: 35px;
    line-height: 33px; /* Center teks secara vertikal */
    text-align: center;
    border: 1px solid #ececec;
    color: #333;
    font-weight: 500;
    transition: all 0.3s ease;
    background: #fff;
    text-decoration: none;
}

.pagination-product li a i {
    font-size: 16px;
}

/* State: Hover & Active (Merah khas Kang Dik) */
.pagination-product li a:hover,
.pagination-product li.active a {
    background: #e11b1b !important;
    border-color: #e11b1b !important;
    color: #fff !important;
}

/* Responsif Mobile */
@media (max-width: 767px) {
    .pagination-product li a {
        width: 30px;
        height: 30px;
        line-height: 28px;
        font-size: 12px;
    }
}

.card-hover { transition: transform 0.2s ease; }
    .card-hover:hover { transform: translateY(-5px); }
    
/* =========================================
   STYLING IKON SOSMED DINAMIS (PROFESIONAL)
   ========================================= */

/* 1. Reset wadah link (<a>) agar hanya menjadi pembungkus */
.social-box .extra-social-link {
    display: inline-block;
    width: 44px;  /* Samakan dimensi dengan ikon gambar bawaan */
    height: 44px;
    margin-left: 6px;
    vertical-align: middle;
    padding: 0;
    background: transparent; /* PENTING: Hapus background default di sini */
    text-decoration: none;
    border-radius: 50%;
}

/* 2. Style dasar elemen ikon (<i>) */
.social-box .extra-social-link i {
    display: block;
    width: 100%;
    height: 100%;
    line-height: 44px; /* Agar simbol di tengah vertikal */
    text-align: center;
    border-radius: 50%; /* Membuat bentuk lingkaran */
    color: #fff; /* Warna simbol ikon putih */
    background: #333; /* Warna fallback (jika brand belum didaftarkan di bawah) */
    font-size: 16px;
    transition: all 0.3s ease;
}

/* 3. Efek Hover Global (Naik sedikit & bayangan) */
.social-box .extra-social-link:hover i {
    transform: translateY(-3px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    /* Note: Kita hapus hover background merah agar tidak menimpa warna brand */
}


/* =========================================
   4. DAFTAR WARNA BRAND (TAMBAHKAN DI SINI)
   Cukup targetkan nama class FontAwesome-nya
   ========================================= */

/* TikTok (Hitam) */
.social-box .extra-social-link i.fa-tiktok,
.social-box .extra-social-link i.fa-music { /* Fallback untuk input lama */
     background: #000000 !important;
}

/* Threads (Hitam) */
.social-box .extra-social-link i.fa-threads {
     background: #000000 !important;
}

/* X / Twitter Baru (Hitam) */
.social-box .extra-social-link i.fa-x-twitter {
     background: #000000 !important;
}

/* WhatsApp (Hijau) */
.social-box .extra-social-link i.fa-whatsapp {
     background: #25D366 !important;
}

/* YouTube (Merah) */
.social-box .extra-social-link i.fa-youtube,
.social-box .extra-social-link i.fa-youtube-play {
     background: #FF0000 !important;
}

/* Facebook (Biru) - Jika pakai FA */
.social-box .extra-social-link i.fa-facebook-f,
.social-box .extra-social-link i.fa-facebook {
     background: #1877F2 !important;
}

/* Instagram (Gradient) - Jika pakai FA */
.social-box .extra-social-link i.fa-instagram {
    background: #d6249f;
    background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fdf497 5%, #fd5949 45%,#d6249f 60%,#285AEB 90%) !important;
}

/* LinkedIn (Biru Profesional) */
.social-box .extra-social-link i.fa-linkedin-in,
.social-box .extra-social-link i.fa-linkedin {
     background: #0077B5 !important;
}

/* Pinterest (Merah) */
.social-box .extra-social-link i.fa-pinterest-p,
.social-box .extra-social-link i.fa-pinterest {
     background: #E60023 !important;
}

/* Telegram (Biru Muda) */
.social-box .extra-social-link i.fa-telegram,
.social-box .extra-social-link i.fa-telegram-plane {
     background: #0088cc !important;
}

/* Line (Hijau Muda) */
.social-box .extra-social-link i.fa-line {
     background: #00c300 !important;
}

/* Styling Tombol WA Melayang Profesional */
.floating-wa {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: #25d366;
    color: white !important;
    padding: 12px 25px;
    border-radius: 50px;
    font-weight: bold;
    z-index: 9999;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    text-decoration: none;
    transition: all 0.3s ease-in-out;
    display: flex;
    align-items: center;
    gap: 10px; /* Jarak antara ikon dan teks */
}

.floating-wa:hover {
    background: #20ba5a;
    transform: scale(1.05); /* Efek membesar sedikit saat disentuh */
    box-shadow: 0 6px 15px rgba(0,0,0,0.3);
}

.floating-wa i {
    font-size: 22px; /* Ukuran ikon WA */
}