/* --- Pengaturan Global --- */
body {
    background-color: #fafafa; 
    color: #f1f1f1;
    font-family: Arial, sans-serif;
}

/* --- 2. Banner Utama --- */
.banner-section img {
    width: 100%;
    height: 360px !important; /* Kembali ke ukuran awal kamu agar mantap dan tidak lucu */
    object-fit: cover !important; 
    border-radius: 8px; 
}

/* --- 3. Navigasi Kategori (Gaya Garis Bawah) --- */
.category-nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    padding: 5px 0;
    margin-bottom: 15px;
}

.category-nav .nav-link {
    color: #000000; 
    padding: 10px 15px;
    font-size: 0.9rem;
    text-decoration: none;
    background-color: transparent;
    border-bottom: 2px solid transparent; 
    transition: color 0.2s, border-bottom-color 0.2s;
}

.category-nav .nav-link:hover,
.category-nav .nav-link.active {
    color: #eab94e; 
    background-color: transparent; 
    border-bottom-color: #eab94e; 
}

/* = Konten Produk (Kotak Putih) =*/
.product-section {
    background-color: #ffffff;
    color: #111; 
    padding: 30px;
    border-radius: 15px;
}

.product-section h2 {
    font-weight: bold;
    color: #333;
}

/* --- 4. Kartu Produk --- */
.product-card {
    height: 100%; 
    display: flex;
    flex-direction: column;
    border: 1px solid #eee;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0,0,0,0.1);
}

.product-card .card-img-top {
    height: 200px !important;
    object-fit: contain !important; 
    width: 100%;
    aspect-ratio: 1 / 1;
}

.product-card .card-title {
    font-size: 1.1rem;
    font-weight: 600;
}

/* --- 5. Media Query Responsive untuk Layar HP --- */
@media (max-width: 768px) {
    .banner-section img {
        height: 180px !important; 
    }
    .product-card .card-img-top {
        height: 140px !important; 
    }
}

/* ========================================================
   KHUSUS TAMPILAN MOBILE (HP) - DASHBOARD FINAL
   ======================================================== */
@media (max-width: 767px) {
    
    /* --- 1. KATEGORI (Teks Natural, Turun ke Bawah) --- */
    .category-nav {
        display: flex !important;
        flex-wrap: wrap !important;
        justify-content: center !important;
        gap: 8px 15px !important;
        padding-bottom: 10px;
    }

    .category-nav .nav-link {
        flex: 0 0 auto !important; 
        background: transparent !important;
        border: none !important;
        padding: 5px 0 !important;
        font-size: 0.9rem !important;
        font-weight: 500;
        color: #444 !important;
    }

    /* --- 2. PRODUK UNGGULAN (Swipe ke Samping) --- */
    main.product-section:nth-of-type(1) .row {
        display: flex !important;
        flex-wrap: nowrap !important;
        overflow-x: auto !important;
        gap: 15px !important;
        padding-top: 15px !important; /* Ruang aman untuk badge */
        padding-bottom: 15px !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        -webkit-overflow-scrolling: touch;
    }

    main.product-section:nth-of-type(1) .row::-webkit-scrollbar {
        display: none;
    }

    main.product-section:nth-of-type(1) .row .col-md-3 {
        flex: 0 0 160px !important;
        max-width: 160px !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

    /* --- 3. SEMUA PRODUK (Grid 2 Kolom) --- */
    main.product-section:nth-of-type(2) .row {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important; 
        gap: 12px !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }

    main.product-section:nth-of-type(2) .row .col-md-3 {
        width: 100% !important;
        max-width: 100% !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
        margin-bottom: 0 !important;
    }

    /* --- 4. PENYESUAIAN KARTU PRODUK --- */
    .product-card {
        height: 100% !important;
        display: flex;
        flex-direction: column;
    }
    
    .product-card .card-img-top {
        height: 120px !important;
        object-fit: contain !important;
        padding-top: 5px;
    }

    .product-card .card-body {
        display: flex;
        flex-direction: column;
        justify-content: space-between; /* Mendorong tombol ke bawah */
        flex: 1;
    }

    .product-card .card-title { font-size: 0.85rem !important; margin-top: 5px; }
    .product-card p { font-size: 0.85rem !important; }
    .product-card .badge.rounded-pill { font-size: 0.65rem !important; padding: 4px 8px !important; }
}