/* assets/css/style.css */

/* Transisi Halus saat ganti tema */
body, .card, .navbar, .form-control, .btn {
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

/* Styling Hero Section di Index */
.hero-section {
    background: linear-gradient(135deg, #0d6efd 0%, #0dcaf0 100%);
    color: white;
    padding: 80px 0;
    border-radius: 0 0 50px 50px; /* Lengkungan modern di bawah */
    margin-bottom: 50px;
}

/* Dark Mode Specific Adjustments */
[data-bs-theme="dark"] .hero-section {
    background: linear-gradient(135deg, #052c65 0%, #044654 100%);
}

[data-bs-theme="dark"] .card {
    border-color: #373b3e; /* Border lebih halus di mode gelap */
}

/* Biar form input lebih enak dilihat di kedua mode */
.form-control:focus {
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.15);
    border-color: #0d6efd;
}

/* Agar Navbar melayang cantik */
.navbar-glass {
    backdrop-filter: blur(10px);
    background-color: rgba(255, 255, 255, 0.9) !important;
}
[data-bs-theme="dark"] .navbar-glass {
    background-color: rgba(33, 37, 41, 0.95) !important;
}

/* --- Dashboard Styles --- */
.sidebar {
    min-height: 100vh;
    background-color: var(--bs-body-bg);
    border-right: 1px solid var(--bs-border-color);
}
.nav-pills .nav-link {
    color: var(--bs-body-color);
    font-weight: 500;
    margin-bottom: 5px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.nav-pills .nav-link:hover {
    background-color: var(--bs-secondary-bg);
}
.nav-pills .nav-link.active {
    background-color: #0d6efd; /* Primary Color */
    color: white;
}
.stat-card {
    transition: transform 0.2s;
}
.stat-card:hover {
    transform: translateY(-5px);
}

/* --- SIDEBAR DESKTOP (FIX) --- */
@media (min-width: 768px) {
    .sidebar {
        position: sticky; /* Menempel saat discroll */
        top: 0;
        height: 100vh; /* Tinggi pas setinggi layar */
        overflow-y: auto; /* Scrollbar internal jika menu panjang */
        z-index: 1000;
    }
    
    /* Mempercantik Scrollbar Sidebar */
    .sidebar::-webkit-scrollbar {
        width: 5px;
    }
    .sidebar::-webkit-scrollbar-thumb {
        background-color: rgba(0,0,0,0.2);
        border-radius: 10px;
    }
}

/* --- BOTTOM NAVIGATION (FIXED & STABLE) --- */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 70px; /* Tinggi tetap agar stabil */
    background-color: var(--bs-body-bg); /* Mengikuti tema (Putih/Gelap) */
    display: flex;
    justify-content: space-around; /* Jarak antar tombol rata */
    align-items: center;
    box-shadow: 0 -5px 20px rgba(0,0,0,0.05);
    z-index: 1050;
    padding-bottom: env(safe-area-inset-bottom);
    border-top: 1px solid var(--bs-border-color);
}

.bottom-nav-item {
    color: var(--bs-secondary);
    text-decoration: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem; /* Ukuran teks label */
    font-weight: 500;
    width: 100%; /* Agar area klik luas */
    height: 100%;
    transition: color 0.2s;
    position: relative;
}

.bottom-nav-item i {
    font-size: 1.4rem; /* Ukuran icon standar */
    margin-bottom: 2px;
    transition: transform 0.2s;
}

/* Saat Menu Aktif */
.bottom-nav-item.active {
    color: var(--bs-primary);
    font-weight: 700;
}
.bottom-nav-item.active i {
    transform: translateY(-3px);
}

/* --- TOMBOL TENGAH (FLOATING/MENGAPUNG) --- */
.bottom-nav-item.floating-btn {
    color: var(--bs-primary);
    position: relative;
}

.bottom-nav-item.floating-btn .icon-wrapper {
    background-color: var(--bs-primary);
    color: white;
    width: 55px;
    height: 55px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: -35px; /* Mengangkat tombol ke atas */
    box-shadow: 0 5px 15px rgba(13, 110, 253, 0.4);
    border: 5px solid var(--bs-body-bg); /* Border agar seolah melubangi navbar */
    transition: transform 0.2s;
}

.bottom-nav-item.floating-btn span {
    margin-top: 25px; /* Jarak teks label agar tidak tertutup bola */
}

/* Efek pencet tombol tengah */
.bottom-nav-item.floating-btn:active .icon-wrapper {
    transform: scale(0.95) translateY(2px);
}

/* Padding tambahan agar konten tidak tertutup Bottom Nav */
body.has-bottom-nav {
    padding-bottom: 90px; /* Kita lebihkan sedikit dari tinggi navbar */
}

/* --- PRODUCT CARD STYLES --- */
.product-card {
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.product-card:active {
    transform: scale(0.96); /* Efek membal saat ditekan di HP */
}

@media (min-width: 768px) {
    .product-card:hover {
        transform: translateY(-5px); /* Efek naik saat dihover mouse */
        box-shadow: 0 10px 20px rgba(0,0,0,0.1) !important;
    }
}

/* Scroll Hide untuk Kategori */
.scroll-hide::-webkit-scrollbar {
    display: none;
}
.scroll-hide {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* --- BOTTOM SHEET MODAL (MOBILE) --- */
@media (max-width: 767px) {
    .modal-bottom-sheet .modal-dialog {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        margin: 0;
        max-width: 100%;
        transform: translate(0, 100%); /* Default sembunyi di bawah */
        transition: transform 0.3s ease-out;
    }
    
    .modal.show .modal-bottom-sheet .modal-dialog {
        transform: translate(0, 0); /* Muncul ke atas */
    }

    .modal-bottom-sheet .modal-content {
        border-radius: 20px 20px 0 0; /* Lengkung atas saja */
        border: none;
        min-height: 50vh; /* Minimal setengah layar */
        max-height: 85vh;
    }
}

/* Scrollable List di dalam Modal */
.variant-list {
    max-height: 60vh;
    overflow-y: auto;
    padding-bottom: 20px;
}

/* Item Varian */
.variant-item {
    transition: background-color 0.2s;
    cursor: pointer;
    border: 1px solid var(--bs-border-color);
}
.variant-item:hover {
    background-color: var(--bs-primary-bg-subtle);
    border-color: var(--bs-primary);
}
