/* === General Reset === */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* === Mencegah Blank Space & Scroll Horizontal === */
html, body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
}

/* === General Styles === */
body {
    font-family: 'Roboto', Arial, sans-serif;
    line-height: 1.6;
    color: #555;
    background: linear-gradient(to bottom, #f9f9f9, #eaeaea);
}

/* === Container === */
.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 0;
}

h1, h2, h3 {
    color: #2e8b57;
    margin-bottom: 20px;
}

p {
    margin-bottom: 15px;
    font-size: 16px;
    line-height: 1.8;
}

/* === Header Section === */
header {
    background: linear-gradient(45deg, #2e8b57, #3cb371);
    color: white;
    padding: 15px 0;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    width: 100%;
    z-index: 1000;
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

header .logo img {
    height: 60px;
    width: auto;
    display: block;
}

header nav ul {
    list-style: none;
    display: flex;
    gap: 20px;
}

header nav ul li a {
    color: white;
    text-decoration: none;
    font-size: 16px;
    padding: 5px 10px;
    border-radius: 4px;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

header nav ul li a:hover {
    background-color: rgba(255, 255, 255, 0.2);
    transform: scale(1.05);
}

/* === Produk Section === */
.products {
    text-align: center;
    padding: 50px 20px;
}

.products h2 {
    font-size: 36px;
    color: #2e8b57;
    margin-bottom: 30px;
    text-transform: uppercase;
    position: relative;
}

.products h2::after {
    content: "";
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    bottom: -10px;
    width: 80px;
    height: 4px;
    background-color: #3cb371;
    border-radius: 2px;
}

/* === Product Grid === */
.product-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr); /* Default: 4 kolom */
    gap: 20px;
    padding: 20px;
    justify-content: center;
    animation: fadeIn 0.8s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* === Kartu Produk === */
.product-item {
    border: 1px solid #ddd;
    border-radius: 10px;
    overflow: hidden;
    text-align: center;
    background-color: #fff;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    margin: 0 auto;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.product-item:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
}

/* === Gambar Produk === */
.product-image {
    width: 100%;
    height: 300px;
    object-fit: cover;
    border-bottom: 1px solid #ddd;
}

/* === Nama Produk === */
.product-name {
    font-size: 1.2rem;
    margin: 15px 0;
    color: #333;
    font-weight: bold;
    text-transform: capitalize;
}

/* === Footer === */
footer {
    background-color: #2e8b57;
    color: white;
    text-align: center;
    padding: 20px 0;
    margin-top: 20px;
    font-size: 14px;
}

/* === Responsive Design === */
@media (max-width: 1024px) {
    .product-grid {
        grid-template-columns: repeat(3, 1fr); /* 3 produk per baris di tablet */
    }
}

@media (max-width: 768px) {
    .product-grid {
        grid-template-columns: repeat(2, 1fr); /* 2 produk per baris di layar kecil */
    }
}

@media (max-width: 480px) {
    .product-grid {
        grid-template-columns: 1fr; /* 1 produk per baris di mobile */
    }

    .product-image {
        height: 250px; /* Ukuran gambar lebih kecil agar pas */
    }
}

/* === Perbaikan Overflow Blank Space === */
*  {
    max-width: 100%;
}

body, html {
    overflow-x: hidden !important;
}
