/* assets/css/style.css */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;600;700&display=swap');

:root {
    /* Warna default jika database kosong */
    --primary-color: #4A90E2; 
    --secondary-color: #F5A623;
    --bg-color: #f8f9fa;
    --text-color: #333;
    --card-bg: #ffffff;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: 'Poppins', sans-serif; background-color: var(--bg-color); color: var(--text-color); }
a { text-decoration: none; color: inherit; }

/* --- STICKY HEADER & NAVBAR KEKINIAN --- */
.modern-header {
    background-color: #ffffff; /* Latar putih bersih yang kekinian */
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05); /* Bayangan sangat lembut */
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    max-width: 1200px;
    margin: 0 auto;
    gap: 30px;
}

.logo { 
    font-size: 24px; 
    font-weight: 800; 
    display: flex; 
    align-items: center; 
    gap: 10px; 
    color: var(--primary-color); /* Logo menyesuaikan warna tema */
}

/* --- SEARCH BAR --- */
.search-container {
    flex-grow: 1;
    max-width: 500px;
}
.search-form {
    display: flex;
    align-items: center;
    background: #f1f3f5;
    border-radius: 50px;
    padding: 5px 20px;
    border: 1px solid transparent;
    transition: all 0.3s ease;
}
.search-form:focus-within {
    background: white;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(74, 144, 226, 0.1); /* Efek cahaya (Glow) saat diketik */
}
.search-input {
    border: none;
    background: transparent;
    padding: 10px 0;
    width: 100%;
    outline: none;
    font-family: inherit;
    font-size: 14px;
    color: #333;
}
.search-btn {
    background: transparent;
    border: none;
    color: #888;
    cursor: pointer;
    font-size: 16px;
    padding: 5px;
    transition: 0.3s;
}
.search-btn:hover { color: var(--primary-color); }

/* --- NAVIGASI ICON --- */
.nav-links { 
    display: flex; 
    gap: 25px; 
    align-items: center;
}
.nav-links a { 
    font-size: 20px; /* Perbesar ukuran icon */
    color: #555;
    transition: all 0.3s ease;
    position: relative;
    display: flex;
}
.nav-links a:hover { 
    color: var(--primary-color); 
    transform: translateY(-2px); /* Efek melayang saat kursor menyentuh */
}

/* Badge Indikator Keranjang (Angka Merah) */
.cart-badge {
    position: absolute;
    top: -8px;
    right: -12px;
    background-color: #ff4757;
    color: white;
    font-size: 11px;
    font-weight: 800;
    padding: 2px 6px;
    border-radius: 20px;
    border: 2px solid white; /* Garis putih pemisah dengan icon */
    min-width: 18px;
    text-align: center;
    box-shadow: 0 2px 5px rgba(255, 71, 87, 0.4);
}

/* --- MOBILE RESPONSIVE HEADER --- */
@media (max-width: 768px) {
    .nav-container { 
        flex-wrap: wrap; /* Izinkan elemen turun ke baris baru */
        padding: 12px 15px; 
        gap: 15px;
    }
    .logo-text { display: none; /* Sembunyikan teks logo di HP, sisakan iconnya saja */ }
    .search-container { 
        order: 3; /* Turunkan search bar ke baris paling bawah */
        width: 100%; 
        max-width: 100%; 
    }
    .nav-links { gap: 20px; }
    .nav-links a { font-size: 22px; } /* Besarkan sedikit icon di HP agar mudah disentuh */
}

/* --- SLIDER BANNER KEKINIAN --- */
.swiper-container {
    width: 100%;
    max-width: 1200px; /* Batasi lebar maksimal agar elegan di layar besar */
    margin: 20px auto 40px auto; /* Jarak proporsional atas & bawah */
    border-radius: 24px; /* Sudut membulat modern di SEMUA sisi */
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.08); /* Bayangan super lembut (Floating effect) */
    overflow: hidden; /* Cegah gambar keluar dari sudut bulat */
    position: relative;
    --swiper-navigation-color: #333;
    --swiper-pagination-color: var(--primary-color);
}

.swiper-slide img { 
    width: 100%; 
    height: auto; 
    display: block;
    object-fit: cover; 
    transform: scale(1.01); /* Menghindari garis putih tipis (glitch) di tepi gambar */
}

/* Glassmorphism Navigation (Tombol Efek Kaca) */
.swiper-button-next, .swiper-button-prev {
    background: rgba(255, 255, 255, 0.6) !important;
    backdrop-filter: blur(10px); /* Efek buram khas Glassmorphism */
    -webkit-backdrop-filter: blur(10px); /* Dukungan untuk Safari */
    width: 50px !important;
    height: 50px !important;
    border-radius: 50%;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    margin: 0 15px; 
    z-index: 10;
}

.swiper-button-next:hover, .swiper-button-prev:hover {
    background: rgba(255, 255, 255, 0.95) !important;
    transform: scale(1.1);
}

.swiper-button-next::after, .swiper-button-prev::after {
    font-size: 20px !important;
    font-weight: 900;
}

/* Pill-Shaped Pagination (Titik Navigasi Kapsul) */
.swiper-pagination-bullet {
    width: 8px !important;
    height: 8px !important;
    background: #000 !important;
    opacity: 0.2 !important;
    transition: all 0.4s ease !important;
    border-radius: 10px !important;
}
.swiper-pagination-bullet-active {
    width: 30px !important; /* Memanjang membentuk kapsul */
    background: var(--primary-color) !important;
    opacity: 1 !important;
}

/* Penyesuaian Khusus HP */
@media (max-width: 768px) {
    .swiper-container {
        width: 92%; /* Beri celah (margin) di kiri dan kanan layar HP */
        margin: 15px auto 30px auto;
        border-radius: 16px; 
    }
    .swiper-button-next, .swiper-button-prev {
        display: none !important; /* Tetap sembunyikan tombol di HP */
    }
}

/* --- PRODUCT GRID KEKINIAN --- */
.container { max-width: 1200px; margin: 0 auto; padding: 20px; }

/* Judul Section dengan Aksen Garis Modern */
.section-title { 
    text-align: center; 
    margin-bottom: 40px; 
    font-size: 28px; 
    font-weight: 700; 
    color: var(--text-color);
    position: relative;
}
.section-title::after {
    content: '';
    width: 60px;
    height: 5px;
    background: var(--primary-color);
    display: block;
    margin: 12px auto 0;
    border-radius: 10px;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 30px;
    margin-bottom: 50px;
}

/* Desain Kartu Produk Melayang */
.product-card {
    background: var(--card-bg);
    border-radius: 20px; /* Sudut membulat modern */
    overflow: hidden;
    box-shadow: 0 10px 25px rgba(0,0,0,0.05); /* Bayangan lembut */
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    flex-direction: column;
    position: relative;
}
.product-card:hover { 
    transform: translateY(-10px); 
    box-shadow: 0 20px 40px rgba(0,0,0,0.12);
}

/* Pembungkus Gambar untuk Efek Zoom */
.product-img-wrapper {
    position: relative;
    width: 100%;
    height: 240px;
    overflow: hidden;
}
.product-img { 
    width: 100%; 
    height: 100%; 
    object-fit: cover; 
    transition: transform 0.6s ease;
}
.product-card:hover .product-img {
    transform: scale(1.12); /* Efek zoom gambar saat di-hover */
}

/* Badge (Label Kekinian) */
.badge {
    position: absolute;
    top: 15px; left: 15px;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    z-index: 2;
    color: white;
    backdrop-filter: blur(5px);
}
.badge-hot { background: rgba(255, 71, 87, 0.9); box-shadow: 0 4px 15px rgba(255, 71, 87, 0.3); }
.badge-new { background: rgba(46, 213, 115, 0.9); box-shadow: 0 4px 15px rgba(46, 213, 115, 0.3); }

/* Info Produk */
.product-info { padding: 20px; flex-grow: 1; display: flex; flex-direction: column; }
.product-title { font-size: 17px; font-weight: 600; margin-bottom: 8px; color: #2f3542; line-height: 1.4; }
.product-price { color: var(--primary-color); font-weight: 800; font-size: 20px; margin-bottom: 15px; }

.product-meta {
    display: flex; justify-content: space-between; align-items: center;
    font-size: 13px; color: #747d8c; margin-bottom: 20px;
}

/* Tombol Hollow-to-Solid */
.btn-buy-card {
    background: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    text-align: center;
    padding: 12px;
    border-radius: 12px;
    font-weight: 700;
    margin-top: auto;
    transition: all 0.3s ease;
}
.product-card:hover .btn-buy-card {
    background-color: var(--primary-color);
    color: white;
}

/* Responsive Mobile Update */
@media (max-width: 768px) {
    .product-grid { 
        grid-template-columns: repeat(2, 1fr); 
        gap: 15px; 
    }
    .product-img-wrapper { height: 180px; }
    .product-title { font-size: 14px; }
    .product-price { font-size: 16px; }
    .btn-buy-card { padding: 8px; font-size: 13px; }
}

/* --- POP-UP NOTIFICATION (KIRI BAWAH) --- */
.sales-popup {
    position: fixed; bottom: -100px; left: 20px;
    background: white; padding: 15px; border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    display: flex; align-items: center; gap: 15px;
    transition: bottom 0.5s ease-in-out; z-index: 9999;
}
.sales-popup.show { bottom: 20px; }
.sales-popup img { width: 50px; height: 50px; border-radius: 8px; object-fit: cover; }


/* --- RESPONSIVE MOBILE UMUM --- */
@media (max-width: 768px) {
    .nav-container { flex-direction: column; gap: 15px; }
    .product-grid { grid-template-columns: repeat(2, 1fr); }
}