/* General Styling */
.section1 {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 3rem;
    background: rgb(255, 255, 255);
}

/* หัวข้อของส่วนสินค้า */
.section-title {
    font-size: 2.8rem;
    font-weight: 800;
    color: #2c3e50;
    margin-bottom: 2rem;
    letter-spacing: 1px;
}

/* การจัดการการ์ดสินค้า */
.product-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
    /* ✅ เพิ่มช่องว่างบน desktop */
    width: 100%;
    max-width: 880px;
    margin: 0 auto;
    justify-items: center;
}

/* การ์ดสินค้าแต่ละใบ */
.product-card {
    width: 280px;
    height: auto;
    padding: 0;
    background-color: transparent;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-radius: 0px;
    box-shadow: none;
    border: none;
}

/* รูปภาพสินค้า */
.product-card img {
    width: 100%;
    height: auto;
    object-fit: cover;
    border-radius: 0px;
}

/* เอฟเฟกต์เมื่อโฮเวอร์ */
.product-card:hover {
    transform: translateY(-8px);
}

/* ปรับการแสดงผลสำหรับหน้าจอขนาดกลาง */
@media screen and (max-width: 1024px) {
    .product-container {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
        max-width: 600px;
    }
}

/* ปรับการแสดงผลสำหรับแท็บเล็ต */
@media screen and (max-width: 768px) {
    .section-title {
        font-size: 2rem;
        margin-left: 0;
    }

    .product-container {
        grid-template-columns: 1fr;
        gap: 14px;
        max-width: 100%;
        padding: 0 10px;
    }

    .product-card {
        width: 90%;
        max-width: 240px;
        margin: 0 auto;
    }

    .product-card img {
        height: auto;
    }
}

/* ปรับการแสดงผลสำหรับมือถือ */
@media screen and (max-width: 480px) {
    .section-title {
        font-size: 1.6rem;
    }

    .product-container {
        gap: 8px;
    }

    .product-card {
        width: 90%;
        max-width: 220px;
        margin: 0 auto;
    }

    .product-card img {
        max-height: 400px;
        object-fit: contain;
    }
}