﻿@import url('https://fonts.googleapis.com/css2?family=Sarabun:wght@400;600&display=swap');

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Sarabun', sans-serif;
    background-color: #f5f5f5;
}

.container {
    max-width: 100%;
    width: 100%;
    margin: 0px ;
    background-color: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.1);
}

/* ปรับภาพให้รองรับการแสดงผลทุกขนาดหน้าจอ */
.image img {
    width: 100%;
    max-width: 400px;
    height: auto;
    display: block;
    margin: 0 auto;
}

.info {
    padding: 0px;
    text-align: center;
}

/* ป้องกันชื่อร้านและเบอร์โทรไม่ตัดขึ้นบรรทัดใหม่ */
h1, .phone-number {
    margin-top: 10px;
    font-size: 30px;
    font-weight: 600;
    color: #333;
    white-space: nowrap; /* ป้องกันการตัดคำ */
    overflow: hidden;
    text-overflow: ellipsis; /* แสดง ... หากข้อความยาวเกิน */
}

.subtitle {
    font-size: 16px;
    color: #666;
    margin-top: 5px;
}

/* จัดให้ <hr> อยู่ตรงกลาง */
hr {
    width: 80%;
    border: none;
    border-top: 2px solid #666;
    margin: 20px auto; /* กำหนดให้อยู่กึ่งกลาง */
    color: #666;
}

/* ทำให้แสดง 2x2 ทั้งบน PC และมือถือ */
.details {
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* 2 คอลัมน์ */
    gap: 0px;
    margin-top: 20px;
}

.detail {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 10px;
    border-radius: 8px;
    text-align: center;
}

    .detail img {
        width: 40px;
        height: 40px;
        margin-bottom: 5px;
    }

    .detail p {
        margin: 0;
        font-size: 14px;
        color: #444;
        white-space: nowrap; /* ป้องกันเบอร์โทรศัพท์ตัดขึ้นบรรทัดใหม่ */
    }

/* Responsive สำหรับมือถือ */
@media screen and (max-width: 768px) {
    .container {
        width: 100%;
    }

    /* ลดขนาดชื่อร้านและเบอร์โทรเมื่อจอเล็กลง */
    h1, .phone-number {
        font-size: 15px;
    }

    .subtitle {
        font-size: 12px;
    }

    /* คง 2x2 บนมือถือ */
    .details {
        grid-template-columns: repeat(2, 1fr); /* 2 คอลัมน์ */
    }

    .detail {
        padding: 2px; /* ลดขนาด padding */
    }

        .detail img {
            width: 30px; /* ลดขนาดไอคอน */
            height: 30px;
        }

        .detail p {
            font-size: 10px; /* ลดขนาดฟอนต์ */
        }
}
