html, body {
    height: auto;
    max-height: 10140px; /* ปรับความสูงตามที่ต้องการ */
    overflow-y: auto;
    margin: 0;
    padding: 0;
}

.logo {
    width: auto; /* ปรับตามอัตราส่วนภาพ */
    height: 60px; /* กำหนดความสูงเพื่อให้พอดีกับข้อความ */
    object-fit: contain; /* ป้องกันภาพบิดเบี้ยว */
    max-width: 100%; /* ป้องกันไม่ให้โลโก้ใหญ่เกินขนาด */
}

.banner {
    background-color: rgba(255, 255, 255, 0.1); /* สีขาวโปร่งแสง 10% */
    padding: 0px; /* ลบระยะขอบด้านใน */
    margin: 0px; /* ลบระยะขอบด้านนอก */
    width: 100%; /* ทำให้ความกว้างครอบคลุมทั้งหมด */
    z-index: 1; /* ให้อยู่เหนือ BGImageTop */
    display: flex; /* ทำให้เป็น flex container */
    align-items: center; /* จัดให้อยู่กลางแนวตั้ง */
    
}

.center-section {
    position: absolute;
    top: 50%; /* ดันลงกลางแนวตั้ง */
    left: 60%; /* ดันเข้ากลางแนวนอน */
    transform: translate(-50%, -50%); /* ปรับตำแหน่งให้ตรงกลางสมบูรณ์ */
    text-align: center;
    z-index: 10; /* ทำให้ Home อยู่เหนือเมนู */
}

.left-section {
    display: flex;
    align-items: center;
}

.right-section {
    display: flex;
    align-items: center;
    justify-content: flex-end;

}


.text {
    font-size: 2rem;
    color: #373737; /* สีเริ่มต้น */
    font-family: 'Roboto Slab', serif;
    font-weight: 500;
    line-height: 1.5;
    animation: textColorChange 8s infinite; /* ใช้ animation ที่ชื่อว่า textColorChange, เปลี่ยนทุก 3 วินาที */
}

    .text:hover {
        color: #0056b3; /* เปลี่ยนสีเมื่อ hover */
        text-decoration: underline; /* เพิ่มขีดเส้นใต้ */
    }

    @keyframes textColorChange {
        0% {
            color: #373737; /* สีเริ่มต้น */
        }
        20% {
            color: #4D2618; /* สีเปลี่ยนที่ 25% */
        }
        40% {
            color: #F5F0E6; /* สีเปลี่ยนที่ 50% */
        }
        60% {
            color: #BA8C4B; /* สีเปลี่ยนที่ 75% */
        }
        80% {
            color: #73634D; /* กลับไปที่สีเริ่มต้น */
        }
        100% {
            color: #373737; /* กลับไปที่สีเริ่มต้น */
        }
    }
/*                    สลับสัตัวอักษร                       */
/*                    สลับสัตัวอักษร                       */
/*                    สลับสัตัวอักษร                       */

.content {
    font-size: 1.5rem;
    color: #F5F0E6; /* สีอ่อน */
    font-family: 'Lora', serif; /* ฟอนต์เนื้อหา */
    font-weight: 400; /* น้ำหนักปกติ */
    line-height: 1.8;
    margin: 20px 0;
    max-height: 10140px; /* จำกัดความสูงเนื้อหา */
    overflow-y: auto; /* เปิดสกอลล์ถ้าจำเป็น */
}

.product-name {
    font-size: 2rem;
    color: #BA8C4B; /* สีทอง */
    font-family: 'Playfair Display', serif; /* ฟอนต์ชื่อสินค้า */
    font-weight: 700; /* เน้นหนา */
    line-height: 1.4;
    margin: 10px 0;
}

.BGImageTop {
    position: relative;
    background-image: url('./1-1_item/Artwork1.png');
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;
    height: 100vh;
    display: flex;
    align-items: center; 
    margin: 0px;
    padding: 0px;
    transition: background-image 1s ease-in-out; 
}

.BGtop .text {
    font-size: 2rem; /* ขนาดตัวอักษร */
    color: #895737;
    font-family: Lateef;
    font-weight: 500;
    line-height: 1.5;
    text-align: center;
    margin-bottom: 0%; /* ลบระยะขอบล่างที่อาจเกิดจากค่า default */
}

.row {
    margin-left: 0px;
    margin-right: 0px;
}

.col {
    padding-left: 0px; /* ปรับให้ column ไม่มี padding */
    padding-right: 0px;
}

.welcome-container {
    position: relative;
    width: 100%; /* ให้เต็มความกว้าง */
    padding-left: 0px; /* ให้พื้นหลังติดขอบซ้าย */
    margin-left: 0px; /* ให้เนื้อหาติดขอบซ้าย */
    
    
}

.welcome-title {
    font-family: 'Lora', serif;
    font-size: clamp(50px, 5vw, 90px); /* ขนาดฟอนต์ยืดหยุ่น */
    font-weight: 500;
    margin-bottom: 20px;
    color: #ffffff;
    text-align: left; /* จัดข้อความให้อยู่ฝั่งซ้าย */
}

.welcome-description {
    font-family: 'Lora', serif;
    font-size: clamp(20px, 2.5vw, 40px); /* ขนาดฟอนต์ยืดหยุ่น */
    line-height: 1.5;
    margin: 0;
    color: #ffffff;
    max-width: 90%; /* จำกัดความกว้างให้อยู่ในสัดส่วนที่เหมาะสม */
    text-align: left; /* จัดข้อความให้อยู่ฝั่งซ้าย */
    word-wrap: break-word; /* บังคับข้อความให้ตัดบรรทัดถ้ายาวเกิน */
}

.welcome-background {
    width: 100%; /* ให้ขนาดความกว้างปรับตามหน้าจอ */
    height: auto; /* ปรับความสูงให้สัมพันธ์กับความกว้าง */
    aspect-ratio: 1412 / 424; /* ตั้งอัตราส่วนของกรอบ */
    background: linear-gradient(271deg, rgba(255, 255, 255, 0) 0.1%, rgba(255, 255, 255, 0.20) 100%);
    display: flex;
    flex-direction: column;
    justify-content: center; /* จัดข้อความให้อยู่กลางแนวตั้ง */
    align-items: flex-start; /* จัดข้อความให้อยู่ฝั่งซ้าย */
    padding: 60px;
    border-radius: 0px; /* ไม่มีมุมมน */
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1); /* เพิ่มเงาเล็กน้อย */
    margin-left: 0px; /* ติดขอบซ้าย */
    
    
    
}

.bottom-blur {
    width: 100%;
    height: 100px; /* กำหนดความสูงตามที่คุณต้องการ */
    background: linear-gradient(180deg, rgba(69, 49, 37, 0.00) 0.1%, rgba(255, 255, 255, 0.20) 99.9%); /* สีพื้นหลังกับ gradient */
    position: absolute;
    bottom: 0; /* ติดขอบด้านล่าง */
    left: 0;
    flex-shrink: 0; /* ป้องกันไม่ให้ยืดหรือยุบ */
    
}


/* สำหรับหน้าจอขนาดเล็ก */
@media (max-width: 1024px) {

    .logo {
        height: auto; /* ให้ความสูงของโลโก้คงที่ตามอัตราส่วน */
        max-width: 100%; /* ให้โลโก้ไม่ใหญ่เกินขนาดที่ต้องการ */
        width: 30px; /* กำหนดความกว้างของโลโก้ให้พอดี */
    }

    .center-section {
        position: static;
        transform: none;
        top: auto;
        left: auto;
        text-align: left; /* กลับไปจัดตำแหน่งธรรมดา */
    }

    .banner nav {
        flex-direction: row; /* เรียงเมนูในแถว (แนวนอน) */
        justify-content: flex-end; /* ให้เมนูไปทางขวา */
        align-items: center; /* จัดแนวให้ตรงกลางในแนว Y */
        gap: 15px; /* เพิ่มช่องว่างระหว่างเมนู */
    }

    .left-section {
        flex-direction: column;
        align-items: center;
    }

    .right-section {
        display: flex;
        justify-content: flex-end; /* เมนูอยู่ฝั่งขวา */
        align-items: center;
    }

    .text {
        font-size: 1.2rem; /* ขนาดตัวอักษรในมือถือ */
        color: #373737;
        margin: 0 10px; /* เพิ่มระยะห่างระหว่างแต่ละเมนู */
    }
    .BGImageTop {
        background-size: cover; /* ใช้แบบ cover เพื่อเติมหน้าจอ */
        height: auto; /* ให้ความสูงปรับตามเนื้อหาหรือภาพ */
        min-height: 400px; /* กำหนดความสูงขั้นต่ำ */
        padding-bottom: 5%; /* ลดระยะห่างจากขอบล่าง */
    }

    .BGtop .text {
        font-size: 1.2rem; /* ลดขนาดตัวอักษร */
    }

    .welcome-title {
        font-size: 60px;
    }

    .welcome-description {
        display: none; /* ซ่อนข้อความย่อยบนหน้าจอเล็ก */
    }

    .welcome-background {
        width: 100%; /* ปรับขนาดความกว้าง */
        height: auto; /* ปรับความสูงตามอัตราส่วน */
        aspect-ratio: unset; /* ยกเลิกการตั้งอัตราส่วน */
    }
}


/*                                                              */
/*                           BG1-2/1-6                          */
/*                                                              */
.BG-common {
    position: relative;
    background-size: contain;
    background-repeat: no-repeat;
    width: 100%;
    height: auto;
    padding-top: 56.25%; /* อัตราส่วน 16:9 */
    display: flex;
    align-items: center;
    justify-content: center;
}

.BG1-2 {
    background-image: url('/1-2_item/MT_Graphic_1-2.png');
}

.BG1-3 {
    background-image: url('/1-3_item/MT_Graphic_1-3.png');
}

.BG1-4 {
    background-image: url('/1-4_item/MT_Graphic_1-4.png');
}

.BG1-5 {
    background-image: url('/1-5_item/MT_Graphic_1-5.png');
}

.BG1-6 {
    background-image: url('/1-6_item/MT_Graphic_1-6.png');
    width: auto;
    height: 512px;
}

/*                                                              */
/*                           BG1-1/1-6                          */
/*                                                              */

.Button {
    position: absolute;
    bottom: 10px; /* ระยะจากด้านล่าง */
    right: 10px; /* ระยะจากด้านซ้าย */
    width: 480px; /* กำหนดขนาดปุ่ม */
    height: 138px;
    background-image: url('/1-2_item/Button.png'); /* รูปภาพของปุ่ม */
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;
    cursor: pointer;
    transition: transform 0.3s ease, opacity 0.3s ease; /* เอฟเฟกต์ */

}

.Button:hover {
    transform: scale(1.1); /* ขยายปุ่มเมื่อ hover */
    opacity: 0.8; /* เพิ่มความโปร่งแสง */
}

@media (max-width: 1024px) {
    .Button {
        position: absolute; /* ยึดตำแหน่งแบบ absolute */
        bottom: 5px; /* ติดขอบด้านล่าง */
        right: 05px; /* ติดขอบด้านขวา */
        width: 20%; /* กำหนดขนาดเป็นเปอร์เซ็นต์ของคอนเทนเนอร์ */
        height: auto; /* รักษาสัดส่วนของภาพ */
        aspect-ratio: 480 / 138; /* รักษาอัตราส่วนภาพ */
        background-size: cover; /* แสดงภาพแบบเต็มปุ่ม */
        background-position: center; /* จัดภาพให้อยู่กลาง */
    }
}




/*                                                              */
/*                                                              */
/*                           PRODUCT                            */
/*                                                              */
/*                                                              */




.BG-2-1-2{

    position: relative;
    background-size: cover;
    background-repeat: no-repeat;
    width: 100%;
    height: 2160px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-image: url('/2-1_2item/BG_MT1-2.png'); /* รูปภาพของปุ่ม */
    margin-top: 0;
    padding: 0;
    background-position: top center;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.Left-Button{

    position: absolute;
    top: 850px; 
    right: 100px; 
    width: 240px; 
    height: 69px;
    background-image: url('/1-2_item/Button.png');
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;
    cursor: pointer;
    transition: transform 0.3s ease, opacity 0.3s ease; 
}

.Right-Button{

    position: absolute;
    bottom: 200px; 
    left: 100px; 
    width: 240px; 
    height: 69px;
    background-image: url('/1-2_item/Button.png'); 
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;
    cursor: pointer;
    transition: transform 0.5s ease, opacity 0.5s ease; 
}

.Left-Button:hover .Right-Button:hover {

    transform: scale(1.1); 
    opacity: 0.8;
}

.BG2-3 {
    background-image: url('/2-3_item/BG_MT3.png');
    position: relative;
    background-size: contain;
    background-repeat: no-repeat;
    width: 100%;
    height: auto;
    padding-top: 56.25%; /* อัตราส่วน 16:9 */
    display: flex;
    align-items: center;
    justify-content: center;
}

.BG2-4 {
    background-image: url('/2-4_item/BG_MT4.png');
    position: relative;
    background-size: contain;
    background-repeat: no-repeat;
    width: 100%;
    height: auto;
    padding-top: 56.25%; /* อัตราส่วน 16:9 */
    display: flex;
    align-items: center;
    justify-content: center;
}

.BG2-5 {
    background-image: url('/2-5_item/BG_MT5.png');
    position: relative;
    background-size: contain;
    background-repeat: no-repeat;
    width: 100%;
    height: auto;
    padding-top: 56.25%; /* อัตราส่วน 16:9 */
    display: flex;
    align-items: center;
    justify-content: center;
}

.BG2-6 {
    background-image: url('/2-6_item/BG_MT6.png');
    position: relative;
    background-size: contain;
    background-repeat: no-repeat;
    width: 100%;
    height: auto;
    padding-top: 56.25%; /* อัตราส่วน 16:9 */
    display: flex;
    align-items: center;
    justify-content: center;
}

.BG2-7 {
    background-image: url('/2-7_item/BG_MT7.png');
    position: relative;
    background-size: contain;
    background-repeat: no-repeat;
    width: 100%;
    height: auto;
    padding-top: 56.25%; /* อัตราส่วน 16:9 */
    display: flex;
    align-items: center;
    justify-content: center;
}

.BG2-8 {
    background-image: url('/2-8_item/MT_Graphic_2-8.png');
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;
    width: 100%;
    min-height: auto;
    aspect-ratio: 1920/512;
}

@media (max-width: 1024px) {

    .BG-2-1-2{
        background-image: url('/2-1_2item/BG_MT1-2\(RES\).png'); 
        background-size: cover;
        background-repeat: no-repeat;
        background-position: center;
        width: 100%;
        height: auto;
        aspect-ratio: 1024 / 2160 ;
        /* padding-top: 53.33%;  */
        
    }

    .Left-Button{

        display: none;
    }
    
    .Right-Button{
    
        display: none;
    }
}

/* .BG2-3 {
        
        background-image: url('/2-3_item/BG_MT3\(RES\).png');
        position: relative;
        background-size: contain;
        background-repeat: no-repeat;
        width: 100%;
        height: 2160px;
        aspect-ratio: 1024 / 2160 ;
        padding-top: 53.33%; 
        display: flex;
        align-items: center;
        justify-content: center;
        margin-top: 0 !important;
        padding-top: 0 !important;
        
        
    }

.BG2-4 {
        background-image: url('/2-4_item/BG_MT4\(RES\).png');
    }

.BG2-5 {
        background-image: url('/2-5_item/BG_MT5\(RES\).png');
    }

.BG2-6 {
        background-image: url('/2-6_item/BG_MT6\(RES\).png');
    } */







    /*                                                              */
    /*                                                              */
    /*                           Port                               */
    /*                                                              */
    /*                                                              */





.BG-3-1 {

    background-image: url('/3-1_item/BG_MT3-1.png'); /* รูปภาพของปุ่ม */
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;
    width: 100%;
    min-height: auto;
    aspect-ratio: 1920/2160;
}

.BG3-2 {

    background-image: url('/3-2_item/BG_MT3-2.png');
    position: relative;
    background-size: contain;
    background-repeat: no-repeat;
    width: 100%;
    height: auto;
    padding-top: 56.25%; /* อัตราส่วน 16:9 */
    display: flex;
    align-items: center;
    justify-content: center;
}

.BG3-3 {

    background-image: url('/3-3_item/MT_Graphic_3-3.png');
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;
    width: 100%;
    min-height: auto;
    aspect-ratio: 1920/512;
}




    /*                                                              */
    /*                                                              */
    /*                           About us                           */
    /*                                                              */
    /*                                                              */






    .BG-4-1 {

        background-size: cover;
        background-repeat: no-repeat;
        background-position: center;
        width: 100%;
        min-height: auto;
        aspect-ratio: 1920/2160;
        background-image: url('/4-1_item/MT_Graphic_4-1.png'); /* รูปภาพของปุ่ม */

}

.BG4-2 {

    background-image: url('/4-2_item/MT_Graphic_4-2.png');
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;
    width: 100%;
    min-height: auto;
    aspect-ratio: 1920/512;
}


.gallery {
    margin-top: 100px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); /* ปรับขนาดรูปให้พอดี */
    grid-auto-rows: minmax(300px, auto); /* ปรับความสูงของแถว */
    gap: 20px; /* ระยะห่างระหว่างรูป */
    width: 100%;
    height: 100%;
}

.gallery-item {
    width: 100%;
    height: 100%;
    overflow: hidden;
    border-radius: 10px;
    box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.1); /* เพิ่มเงา */
    position: relative;
    transition: all 0.3s ease-in-out;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease-in-out;
}

.gallery-item:hover img {
    object-fit: contain; /* แสดงรูปเต็มโดยไม่มีการตัด */
    transform: scale(0.8); /* ขยายรูปขึ้น */
}

/* ปรับแต่ง Pagination */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    background-size: contain;
    background-repeat: no-repeat;
    color: #F5F0E6; /* สีอ่อน */
    font-family: 'Lora', serif;
    margin-top: 20px;
    text-align: center;
}

.pagination a {
    
    margin: 5px;
    padding: 8px 12px;
    text-decoration: none;
    background: #007bff;
    color: white;
    border-radius: 4px;
}

.pagination a.disabled {
    background: #ccc;
    pointer-events: none;
}