/* 🔥 Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: Arial, sans-serif;
}

/* 🎯 Body */
body {
    background: #f4f4f4;
    color: #333;
    text-align: center;
    padding-bottom: 40px;
}

/* 🔝 Header */
header {
    background: linear-gradient(90deg, #000, #1a1a1a);
    color: white;
    padding: 30px 20px;
    margin-bottom: 30px;
}

header h1 {
    font-size: 36px;
}

/* 📦 Section */
.detail {
    max-width: 900px;
    margin: auto;
    padding: 20px;
}

/* 🖼️ รูปหลัก */
.main-img {
    width: 80%;
    max-width: 600px;
    border-radius: 20px;
    margin-bottom: 25px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
}

/* 📝 ข้อความ */
.detail p {
    font-size: 18px;
    line-height: 1.7;
    margin-bottom: 20px;
}

/* 🖼️ Gallery */
.gallery {
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* 2 คอลัมน์ */
    gap: 25px; /* ช่องว่างเท่ากัน */
    margin-top: 30px;
}

.gallery img {
    width: 100%;
    height: 180px; /* ยังล็อคความสูงอยู่ */
    object-fit: contain; /* 🔥 เปลี่ยนตรงนี้ */
    background: #fff; /* กันมีช่องว่างแล้วดูสวย */
    border-radius: 20px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
    padding: 10px; /* เพิ่มพื้นที่ให้รูปไม่ติดขอบ */
}

.gallery img:hover {
    transform: translateY(-5px) scale(1.03);
}

/* 🔘 ปุ่ม */
.btn {
    display: inline-block;
    margin-top: 30px;
    padding: 12px 30px;
    background: linear-gradient(90deg, #001f3f, red);
    color: white;
    text-decoration: none;
    border-radius: 25px;
    transition: 0.3s;
}

.btn:hover {
    opacity: 0.8;
    transform: scale(1.05);
}

@media (max-width: 768px) {
    .gallery {
        grid-template-columns: 1fr; /* เหลือ 1 รูปต่อแถว */
    }
}