@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

body {
    background: #f4f5f7;
}

/* NAVBAR */
.navbar {
    width: 100%;
    background: #0c6efd;
    padding: 15px 40px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: white;
}

.logo {
    font-size: 22px;
    font-weight: 600;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 25px;
}

.nav-links li a {
    color: white;
    text-decoration: none;
    font-weight: 400;
    transition: 0.3s;
}

.nav-links li a:hover,
.nav-links li .active {
    color: #ffe082;
}

/* HEADER (ANIMASI BG GRADIENT) */
.header {
    text-align: center;
    padding: 60px 20px; 
    background: linear-gradient(-45deg, #4facfe, #00f2fe, #43e97b, #f8ffae);
    background-size: 400% 400%;
    animation: gradientMove 8s ease infinite;
    border-radius: 10px;
    margin: 20px;
    color: white; 
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.header h1 {
    font-size: 36px;
    margin-bottom: 5px;
    font-weight: 700;
}

.header p {
    font-size: 18px;
    font-weight: 400;
}

/* ANIMASI TITLE & SUBTITLE (SAAT PAGE LOAD) */
.animate-title {
    opacity: 0;
    animation: fadeDown 1.1s ease forwards;
}

.animate-subtitle {
    opacity: 0;
    animation: fadeUp 1.3s ease forwards;
}

@keyframes fadeDown {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ANIMASI BACKGROUND GRADIENT */
@keyframes gradientMove {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* --- ANIMASI SCROLL (FADE-SCROLL) --- */
.fade-scroll {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 1s ease-out, transform 1s ease-out;
}

.fade-scroll.show {
    opacity: 1;
    transform: translateY(0);
}

/* PRODUCT GRID */
.product-container {
    width: 90%;
    margin: auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); 
    gap: 25px;
    padding-bottom: 50px;
}

.product-card {
    background: white;
    padding: 15px;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

/* PERUBAHAN UTAMA: Gambar Produk terlihat penuh */
.product-card img {
    width: 100%;
    height: 180px;
    object-fit: contain; /* Menggunakan CONTAIN agar gambar tidak terpotong */
    border-radius: 10px;
    margin-bottom: 10px;
}

.product-title {
    font-weight: 600;
    margin-top: 10px;
}

.price {
    margin: 8px 0;
    font-weight: 700;
    font-size: 18px;
    color: #0c6efd;
}

/* BUTTON BELI (STANDAR) */
.btn-buy {
    background: #ff9800;
    color: white;
    padding: 10px 15px;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    width: 100%;
    font-size: 15px;
    transition: 0.3s;
}

.btn-buy:hover {
    background: #f57c00;
}

/* --- PERBAIKAN: DETAIL PRODUK (Centering dan Tombol Pendek) --- */

.detail-box {
    /* Membuat kotak detail berada di tengah */
    width: 90%; 
    max-width: 500px; /* Batasi lebar */
    margin: 50px auto; 
    text-align: left; 
    padding: 20px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    display: flex; 
    flex-direction: column;
    align-items: flex-start; /* Konten di dalam detail-box rata kiri */
}

.detail-img {
    width: 100%;
    max-width: 250px; 
    height: auto;
    display: block;
    margin: 0 auto 20px auto; /* Gambar di tengah */
    object-fit: contain;
    border-radius: 15px;
}

.detail-price {
    font-size: 24px;
    font-weight: 700;
    color: #007bff;
    margin: 10px 0;
}

.qty-input {
    width: 100px;
    padding: 8px;
    text-align: center;
    margin-top: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
}

/* Tombol Beli di halaman Detail Produk */
.btn-buy.detail-button {
    width: 200px; /* Tombol dibuat lebih pendek */
    padding: 12px;
    margin-top: 20px;
    background: #ff9800; 
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 18px;
    cursor: pointer;
    align-self: flex-start; /* Mengikuti rata kiri dari detail-box */
}

.btn-buy.detail-button:hover {
    background: #f57c00;
}
.footer {
    width: 100%;
    background: #343a40; /* Warna gelap */
    color: #ffffff;
    text-align: center;
    padding: 20px 0;
    margin-top: 40px; /* Jarak dari konten di atas */
    font-size: 14px;
}