/* ==============================================================
   PENGATURAN BERANDA (MOBILE-FIRST DESIGN)
   ============================================================== */

/* 1. Layout Dasar (Otomatis menyesuaikan layar HP) */
.ghv-frontpage-wrapper { 
    display: flex; 
    flex-direction: column; 
    width: 100%; 
    overflow: hidden;
    background-color: var(--color-background);
}

/* Memastikan susunan section di dalam home mobile tetap rapi */
.home-mobile {
    display: flex;
    flex-direction: column;
    width: 100%;
}

/* ==============================================================
   TAMPILAN DESKTOP (RESPONSIVE SCALING)
   ============================================================== */
@media (min-width: 992px) {
    
    /* Membatasi lebar agar tampilan HP tidak melar raksasa di PC */
    .ghv-frontpage-wrapper {
        max-width: 1200px;
        margin: 20px auto 40px auto; /* Menengahkan layout */
        padding: 0 15px;
        border-radius: 16px;
        background-color: transparent;
    }

    /* Memberikan jarak nafas antar section (Banner, Kategori, Flash Sale) di Desktop */
    .home-mobile > div,
    .home-mobile > section {
        margin-bottom: 45px !important;
    }

    /* Jika ada elemen di mobile yang di-set stretch 100% (margin negatif), 
       kita normalkan di desktop agar masuk dalam batas 1200px */
    .home-mobile {
        overflow: visible; 
    }
}
/* Extracted from section-banner.php */
/* Spacing diperkecil: margin-top 10px (mepet header), margin-bottom 5px (mepet trust badge) */
    .ghv-hero-wrapper { position: relative; overflow: hidden; border-radius: 16px; margin: 10px 0 5px 0; box-shadow: 0 4px 15px rgba(0,0,0,0.05); }
    .ghv-hero-slider { display: flex; transition: transform 0.5s ease-in-out; width: 100%; }
    .ghv-hero-slide { min-width: 100%; aspect-ratio: 21/9; background: #eee; position: relative; }
    @media (max-width: 767px) { .ghv-hero-slide { aspect-ratio: 16/9; } }
    .ghv-hero-slide img { width: 100%; height: 100%; object-fit: cover; display: block; }
    
    .ghv-hero-dots { position: absolute; bottom: 12px; left: 0; right: 0; display: flex; justify-content: center; gap: 6px; z-index: 10; }
    .ghv-dot { width: 8px; height: 5px; background: rgba(255,255,255,0.5); border-radius: 50%; cursor: pointer; transition: 0.3s; }
    .ghv-dot.active { background: #fff; transform: scale(1.2); width: 20px; border-radius: 4px; }



/* Extracted from section-categories.php */
.cat-scroll-wrapper { display: flex; overflow-x: auto; gap: 15px; padding-bottom: 10px; scrollbar-width: none; }
    .cat-scroll-wrapper::-webkit-scrollbar { display: none; }
    .cat-item-link { text-align: center; min-width: 65px; display: block; flex-shrink: 0; text-decoration: none; }
    .cat-item-link .cat-image { width: 60px; height: 60px; border-radius: 50%; margin: 0 auto 8px; box-shadow: 0 4px 10px rgba(0,0,0,0.05); }
    .cat-item-link span { font-size: 0.7rem; color: var(--color-text-main); font-weight: 600; display: block; }
    
    @media (min-width: 768px) {
        .cat-scroll-wrapper { justify-content: center; gap: 40px; }
        .cat-item-link { min-width: 90px; transition: transform 0.2s ease; }
        .cat-item-link:hover { transform: translateY(-5px); }
        .cat-item-link .cat-image { width: 85px; height: 85px; margin-bottom: 12px; }
        .cat-item-link span { font-size: 0.85rem; }
    }



/* Extracted from section-flash-sale.php */
.fs-slider-wrapper { display: flex; overflow-x: auto; gap: 10px; padding-bottom: 5px; scroll-snap-type: x mandatory; scrollbar-width: none; }
    .fs-slider-wrapper::-webkit-scrollbar { display: none; }
    .fs-product-card { flex: 0 0 calc(33.333% - 7px); scroll-snap-align: start; border: 1px solid var(--color-border); border-radius: 10px; overflow: hidden; position: relative; display: flex; flex-direction: column; background: #fff; }
    @media (min-width: 768px) { .fs-slider-wrapper { gap: 15px; padding-bottom: 20px; } .fs-product-card { flex: 0 0 calc(20% - 12px); border-radius: 14px; } }



/* Extracted from section-recent.php */
/* CSS Grid Khusus New Arrival */
    .ghv-recent-grid {
        display: grid;
        grid-template-columns: repeat(2, 1fr); /* 2 Kolom untuk Mobile */
        gap: 15px;
    }
    .ghv-recent-grid .product-card {
        box-shadow: 0 4px 10px rgba(0,0,0,0.03);
        transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    }
    
    /* Tampilan Desktop (5 Kolom) */
    @media (min-width: 992px) {
        .ghv-recent-grid {
            grid-template-columns: repeat(5, 1fr) !important; /* 5 Kolom untuk PC */
            gap: 20px !important;
        }
        /* Efek Hover Premium ala UI Modern */
        .ghv-recent-grid .product-card:hover {
            transform: translateY(-5px);
            box-shadow: 0 10px 25px rgba(0,0,0,0.08) !important;
            border-color: var(--color-primary) !important;
        }
    }



/* Extracted from section-trust-badge.php */
.trust-badge-section { padding: 7px 0 0 0; order: 2; }
    
    /* KOTAK PUTIH UTAMA (Mobile) */
    .tb-main-box {
        background: #fff;
        border-radius: 15px;
        box-shadow: 0 4px 15px rgba(0,0,0,0.04);
        border: 1px solid #f2f2f2;
        margin: 0 15px 5px 15px; 
        overflow: hidden;
    }

    /* AREA SCROLL (Tanpa Padding Bawah Berlebih) */
    .tb-scroll-wrapper { 
        display: flex; overflow-x: auto; scroll-snap-type: x mandatory; 
        scrollbar-width: none;
    }
    .tb-scroll-wrapper::-webkit-scrollbar { display: none; }
    
    /* ITEM KONTEN (Mobile) */
    .tb-item { 
        display: flex; align-items: center; gap: 10px; 
        padding: 10px 18px; 
        scroll-snap-align: start;
        flex: 0 0 auto; 
        position: relative;
    }

    /* GARIS PEMISAH VERTIKAL */
    .tb-item:not(:last-child)::after {
        content: ''; position: absolute; right: 0; top: 25%; height: 50%; width: 1px; background: #eaeaea;
    }
    
    .tb-icon { font-size: 1.4rem; color: var(--color-primary); flex-shrink: 0; }
    .tb-text { display: flex; flex-direction: column; }
    .tb-text h4 { margin: 0 0 2px 0; font-size: 0.8rem; font-weight: 700; color: #333; white-space: nowrap; }
    .tb-text p { margin: 0; font-size: 0.65rem; color: #777; line-height: 1.2; white-space: nowrap; }

    /* INDIKATOR SLIDER MOBILE */
    .tb-indicator-container { width: 40px; height: 4px; background: #dcdcdc; border-radius: 4px; margin: 0 auto 5px auto; overflow: hidden; position: relative; }
    .tb-indicator-bar { width: 50%; height: 100%; background: var(--color-primary); border-radius: 4px; transform: translateX(0); will-change: transform; }

    /* ==============================================================
       DESKTOP RESPONSIVE (PROPORSIONAL & EFEK MELAYANG)
       ============================================================== */
    @media (min-width: 992px) {
        .trust-badge-section {
            padding: 0;
            margin-top: -35px; /* Menarik kotak ke atas agar memotong banner (efek overlap/melayang) */
            position: relative;
            z-index: 10;
        }
        
        .tb-main-box { 
            margin: 0 auto 30px auto; 
            max-width: 1000px; /* Lebar maksimal ditahan agar tidak melar se-layar penuh */
            border-radius: 20px;
            box-shadow: 0 10px 30px rgba(0,0,0,0.06); /* Shadow lebih elegan di PC */
            border: none;
        }
        
        .tb-scroll-wrapper { 
            justify-content: center; /* Menengahkan posisi item */
            overflow: visible;
        }
        
        .tb-item {
            padding: 18px 30px; /* Ruang bernapas yang proporsional untuk layar PC */
            gap: 15px; /* Jarak antara ikon dan teks sedikit dilebarkan */
        }
        
        /* Penyesuaian ukuran tipografi & ikon untuk PC */
        .tb-icon { font-size: 1.8rem; }
        .tb-text h4 { font-size: 0.95rem; margin-bottom: 3px; }
        .tb-text p { font-size: 0.8rem; }
        
        .tb-indicator-container { display: none !important; } /* Sembunyikan garis di Desktop */
    }


