/* การตั้งค่าพื้นฐาน */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* ธีมสีโรงเย็น (Professional Cold Storage Theme) */
:root {
    --primary-blue: #0b3954;   
    --accent-blue: #0ea5e9;    
    --ice-bg: #f0f8ff;         
    --text-dark: #1e293b;      
    --text-light: #64748b;
    --white: #ffffff;
}

body {
    font-family: 'Prompt', sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--white);
}

/* แถบนำทาง (Navbar) */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: var(--white);
    padding: 1rem 5%;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

/* โลโก้และชื่อบริษัท */
.logo-container {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo-text h1 {
    font-size: 1.3rem;
    color: var(--primary-blue);
    margin: 0;
    line-height: 1.2;
    font-weight: 600;
}

.logo-text span {
    font-size: 0.85rem;
    color: var(--text-light);
    font-weight: 400;
    letter-spacing: 0.5px;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 2rem;
    margin-right: auto;
    margin-left: 3rem;
}

.nav-links a {
    color: var(--primary-blue);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: var(--accent-blue);
}

/* =========================================
   ปุ่มสลับภาษา และ กลุ่มควบคุมเมนู
========================================= */
.nav-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-left: auto;
}

.lang-switch {
    display: flex;
    gap: 12px;
    align-items: center;
    justify-content: center;
}

.flag-icon {
    width: 28px;
    height: 20px;
    object-fit: cover;
    border-radius: 3px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.15);
    transition: all 0.3s ease;
    cursor: pointer;
    display: block; 
}

.flag-icon:hover {
    transform: scale(1.15);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.active-lang {
    opacity: 1;
}

.inactive-lang {
    opacity: 0.4;
    filter: grayscale(70%);
}

.inactive-lang:hover {
    opacity: 1;
    filter: grayscale(0%);
}

.mobile-menu-btn {
    display: none; 
    background: none;
    border: none;
    font-size: 1.8rem;
    color: var(--primary-blue);
    cursor: pointer;
    padding: 0;
}

/* =========================================
   ส่วนหัวเว็บไซต์แบบแบนเนอร์รูปภาพ (Hero Banner)
========================================= */
.hero-banner {
    width: 100%;
    display: flex;
    justify-content: center; 
    background-color: #f4f6f9; 
    overflow: hidden;
}

.banner-img {
    width: 100%;       
    max-width: 1440px; 
    height: auto;      
    display: block;
    object-fit: contain; 
}

/* ส่วนเนื้อหาทั่วไป */
.section {
    padding: 6rem 5%;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

.section-title {
    text-align: center;
    font-size: 2.2rem;
    margin-bottom: 2rem;
    color: var(--primary-blue);
    position: relative;
    font-weight: 600;
}

.section-title::after {
    content: '';
    display: block;
    width: 80px;
    height: 4px;
    background-color: var(--accent-blue);
    margin: 15px auto 0;
    border-radius: 2px;
}

.bg-ice {
    background-color: var(--ice-bg);
}

.bg-dark {
    background-color: var(--primary-blue);
    color: var(--white);
}

.text-white {
    color: var(--white);
}

.text-white::after {
    background-color: var(--accent-blue);
}

/* การจัดวางเลย์เอาต์ */
.content-split {
    display: flex;
    gap: 4rem;
    align-items: center;
    flex-wrap: wrap;
}

.content-split > div {
    flex: 1;
    min-width: 300px;
}

.text-content p {
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
    color: var(--text-light);
}

.text-content strong {
    color: var(--primary-blue);
}

/* =========================================
   ระบบสไลเดอร์โปรโมชั่น 1 รูปใหญ่ (Slider 1 Image)
========================================= */
.product-slider-container {
    position: relative; 
    max-width: 500px; /* ปรับขนาดให้เล็กลงตามบรีฟ (จาก 700px เป็น 500px) */
    margin: 0 auto;
    padding: 20px 0; /* ลดระยะขอบล่างบนให้กระชับขึ้น */
    overflow: hidden; 
    background-color: transparent; 
}

.product-slider {
    display: flex;
    align-items: center; 
    transition: transform 0.5s cubic-bezier(0.25, 0.8, 0.25, 1); 
}

.promo-slide-card {
    min-width: 100%; 
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent; 
    padding: 0 15px; 
}

.promo-img {
    width: 100%;
    aspect-ratio: 1 / 1; /* บังคับให้เป็นสี่เหลี่ยมจัตุรัสและเท่ากันทุกรูป */
    object-fit: contain; /* ป้องกันการโดนตัดขอบ */
    display: block;
    border-radius: 16px; 
    box-shadow: 0 10px 30px rgba(0,0,0,0.15); 
}

/* ปุ่มกดสไลด์ */
.slider-btn {
    position: absolute; 
    top: 50%;
    transform: translateY(-50%); 
    background: rgba(255, 255, 255, 0.95); 
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--primary-blue);
    z-index: 10;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.slider-btn:hover {
    background: var(--primary-blue);
    color: var(--white);
}

.prev-btn { left: 10px; } 
.next-btn { right: 10px; }


/* =========================================
   ระบบ Grid ของใบรับรอง 5 รูป
========================================= */
.grid-certs {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
    justify-items: center;
    align-items: center;
    width: 100%;
}

.cert-img {
    width: 100%;
    max-width: 250px;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    border: 1px solid #e2e8f0;
    transition: transform 0.3s ease;
}

.cert-img:hover {
    transform: scale(1.03);
}

.contact-info p {
    font-size: 1.1rem;
    margin-bottom: 1.2rem;
    display: flex;
    align-items: center;
}

/* ส่วนท้ายเว็บ */
footer {
    text-align: center;
    padding: 1.5rem;
    background-color: #062335;
    color: #94a3b8;
}

/* =========================================
   แกลเลอรีภาพบรรยากาศโรงงาน (Facility Gallery)
========================================= */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 1rem;
}

.gallery-img {
    width: 100%;
    height: 250px; 
    object-fit: cover; 
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.gallery-img:hover {
    transform: scale(1.03); 
}

/* =========================================
   ปุ่มมาตรฐาน
========================================= */
.btn-primary {
    background-color: var(--primary-blue);
    color: var(--white);
    padding: 12px 30px;
    border: none;
    font-weight: 600;
    border-radius: 30px;
    transition: all 0.3s ease;
    display: inline-block;
    cursor: pointer;
    font-family: 'Prompt', sans-serif;
    font-size: 1rem;
    box-shadow: 0 4px 15px rgba(11, 57, 84, 0.2);
}

.btn-primary:hover {
    background-color: var(--accent-blue);
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(14, 165, 233, 0.3);
}

/* =========================================
   ปุ่มโซเชียลมีเดีย (LINE & Facebook) พร้อมไอคอน
========================================= */
.btn-social {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 25px;
    border-radius: 30px;
    color: #fff !important;
    text-decoration: none;
    font-family: 'Prompt', sans-serif;
    font-weight: 500;
    font-size: 1rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}

.btn-social i {
    font-size: 1.3rem;
    margin-right: 10px; 
}

.btn-line {
    background-color: #00b900;
}

.btn-line:hover {
    background-color: #009900;
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(0, 185, 0, 0.3);
}

.btn-fb {
    background-color: #1877f2;
}

.btn-fb:hover {
    background-color: #145dbf;
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(24, 119, 242, 0.3);
}

/* =========================================
   ป๊อปอัปรายละเอียด (Modal) 
========================================= */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(11, 57, 84, 0.85); 
    align-items: center;
    justify-content: center;
}

.modal-content {
    background-color: var(--white);
    padding: 40px;
    border-radius: 16px;
    max-width: 900px;
    width: 90%;
    position: relative;
    box-shadow: 0 15px 40px rgba(0,0,0,0.2);
    max-height: 90vh; 
    overflow-y: auto; 
}

.close-btn {
    position: absolute;
    top: 15px;
    right: 25px;
    font-size: 2.5rem;
    cursor: pointer;
    color: #94a3b8;
    z-index: 10;
    line-height: 1;
}

.close-btn:hover {
    color: var(--primary-blue);
}

.modal-body {
    display: flex;
    gap: 40px;
    align-items: flex-start;
    flex-wrap: wrap;
}

.modal-img {
    flex: 1;
    width: 100%;
    min-width: 200px;
    max-width: 100%; 
    height: auto;
    max-height: 400px; 
    object-fit: contain;
}

.modal-info {
    flex: 1;
    min-width: 250px;
    position: relative;
    text-align: left;
}

.modal-info h2 {
    color: var(--primary-blue);
    margin-bottom: 20px;
    font-size: 1.8rem;
    border-bottom: 2px solid var(--ice-bg);
    padding-bottom: 10px;
}

.modal-info p {
    color: var(--text-light);
    margin-bottom: 15px;
    line-height: 1.8;
}

/* =========================================
   รองรับมือถือ (Responsive)
========================================= */
@media (max-width: 768px) {
    .navbar {
        flex-wrap: wrap;
        position: relative;
    }
    
    .logo-text {
        display: none; 
    }
    
    .mobile-menu-btn {
        display: flex;
        align-items: center;
        justify-content: center;
        height: 20px; 
        line-height: 0;
    }

    .nav-links {
        display: none;
        width: 100%;
        flex-direction: column;
        background-color: var(--white);
        position: absolute;
        top: 100%;
        left: 0;
        padding: 15px 0;
        box-shadow: 0 10px 15px rgba(0,0,0,0.1);
        margin: 0;
        gap: 15px;
    }

    .nav-links.active {
        display: flex; 
    }

    .nav-links li {
        text-align: center;
        width: 100%;
    }

    .nav-links a {
        display: block;
        padding: 10px;
        font-size: 1.1rem;
    }
    
    .hero h2 {
        font-size: 2.2rem;
    }
    
    .content-split {
        gap: 2rem;
    }

    .banner-img {
        border-radius: 0;
    }
    
    .hero-banner {
        padding: 0;
    }
    
    .product-slider-container {
        padding: 15px 0; 
    }

    .promo-slide-card {
        padding: 0 5px; 
    }

    .modal-content {
        padding: 25px 15px; 
        width: 95%; 
    }

    .close-btn {
        top: 5px;
        right: 15px;
    }
    
    .modal-body {
        flex-direction: column;
        align-items: center;
        gap: 20px; 
    }
    
    .modal-img {
        min-width: 100%; 
        max-height: 250px; 
    }

    .modal-info {
        text-align: center;
        min-width: 100%;
    }
}