/******* Do not edit this file *******
Simple Custom CSS and JS - by Silkypress.com
Saved: Mar 10 2026 | 08:44:47 */
/* --- 3. Layout Components --- */
.container {
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 24px;
}

.padding {
    padding: 12px 0;
}

.grid {
    display: grid;
    gap: 24px;
}

.grid--2-cols { grid-template-columns: repeat(2, 1fr); }
.grid--3-cols { grid-template-columns: repeat(3, 1fr); }
.grid--4-cols { grid-template-columns: repeat(4, 1fr); }

/* Logo */
.logo {
    font-size: 2rem;
    font-weight: 700;
    color: #fff; /* สีขาวตอนอยู่บนรูป */
    text-transform: uppercase;
    letter-spacing: 2px;
    text-decoration: none;
}

.image-container {
    max-width: 1140px;
    min-height: 100px;  
}

@media (max-width: 992px) {
    .grid--3-cols.image-container {
        grid-template-columns: 1fr;
    }
}


.photo-cover {
    max-width: 1140px;
    max-height: 640px;
}

/* --- 3. ส่วน Hero Section (รูปเต็มจอ) --- */
.hero {
    position: relative;
    min-height: 100%; /* ความสูงเต็มหน้าจอ 100% Viewport Height */
    height: auto;
    background-image: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url('../assets/image/aestora_web/image header cover.jpg');
    background-size: cover;
    background-position: center;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: white;
}

.hero-content p {
    font-size: 1.8rem;
    margin-bottom: 30px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.btn-hero {
    font-family: 'Helvethaica', sans-serif;
    color: var(--text-dark);
    font-size: 2rem;
    line-height: 1.6;
    padding: 15px 40px;
    background-color: var(--text-dark);
    color: white;
    border: none;
    cursor: pointer;
    border-radius: 8px;
    transition: 0.3s;
}

.btn-hero:hover {
    background-color: var(--text-dark);
}

.highlight-title {
    font-size: 2.6rem;
    text-align: center;
    padding: 12px 0;
    margin-bottom: 24px;
    color: white;
    background-color: var(--primary-color);
    /* รูปแบบ: [ขยับแนวนอน] [ขยับแนวตั้ง] [ความฟุ้ง] [สีเงา] */
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.section-title {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.section-title--primary {
    color: var(--primary-color);
    margin: 12px 0;
    line-height: 0.8;
}

/* --- จัดการหัวข้อ mission list --- */
.mission-list {
    list-style: none;    /* ปิด Bullet เดิมทิ้ง */
    padding-left: 0;     /* ล้างระยะเยื้อง */
}

.mission-list li {
    position: relative;
    padding-left: 25px;  /* เว้นที่ด้านซ้ายไว้ใส่ไอคอนใหม่ */
    margin-bottom: 15px;
}

/* สร้าง Marker ใหม่ที่เป็นเส้นขีดสั้นๆ หรือจุดสีประจำแบรนด์ */
.mission-list li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 10px;           /* ปรับตำแหน่งตามความสูงบรรทัด */
    width: 8px;
    height: 8px;
    background-color: #D42030; /* สีส้มอิฐตามธีม Aestora */
    border-radius: 2px;  /* ทำเป็นสี่เหลี่ยมมุมมนเล็กๆ หรือวงกลม */
}

/* --- 5. Product Card (Hover Effect) --- */
.relative-wrapper {
    position: relative;
}

.section-products {
    position: relative;
    background-color: rgba(229, 139, 49, 0.7);
    background-size: cover;
    background-position: center;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: white;

    padding:24px 0;
    min-height: 400px;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 24px;
}

.product-card {
    background-color: rgba(229, 139, 49, 0.7); /* พื้นหลังโปร่งใสตามโจทย์ */
    border-radius: 12px;
    padding: 24px;
    margin: 0;
    color: var(--text-light);
    transition: var(--transition);
    cursor: pointer;
    min-height: 240px;
    min-width: calc(25% - 16px);
    max-width: calc(25% - 16px);  
    box-sizing: border-box;
    flex-shrink: 0; /* ห้ามหด */
    height: 256px;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden
}

img.crop-image {
    height: 100% !important;
    width: 100% !important;
    object-fit: cover !important;
}

.product-card__image {
    min-width: 12px;          /* ปรับขนาดตามต้องการ แต่ไม่เกิน Card */
    max-height: 180px;
    opacity: 1;
    transition: var(--transition);
    overflow: hidden;
}

.product-card__image img {
    width: 100%;
    height: auto;
    max-width: 180px;
    object-fit: contain;
}

.product-carousel-viewport {
    width: 100%;
    overflow: hidden; /* ซ่อนส่วนเกิน */
    padding-top: 28px;
}

.product-track {
    display: flex;
    gap: 20px; /* ระยะห่างระหว่างการ์ด */
    transition: transform 0.5s ease-out; /* เอฟเฟกต์เลื่อน */
}

.btn-outline{
    color: var(--text-dark);
    text-decoration: none;
}

.product-card:hover {
    background-color: #ffffff; /* เปลี่ยนเป็นขาวทึบเมื่อ Hover */
    color: var(--text-dark);
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.1);
}

.product-card__details {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transition: var(--transition);
}

.product-card:hover .product-card__details {
    max-height: 200px;
    opacity: 1;
    margin-top: 20px;
}

.product-card:hover .product-card__image {
    max-height: 0;
    opacity: 0;
}



/* Responsive: มือถืออาจจะเหลือ 1-2 คอลัมน์ */
@media (max-width: 1024px) {
    .product-card { min-width: calc(33.33% - 14px); } /* Tablet: 3 คอลัมน์ */
}
@media (max-width: 768px) {
    .product-card { min-width: calc(50% - 10px); } /* Mobile Large: 2 คอลัมน์ */
}
@media (max-width: 480px) {
    .product-card { min-width: 100%; } /* Mobile Small: 1 คอลัมน์ */
}

/* --- 7. Helper Classes --- */
.section-padding {
    padding: 12px 0;
    display: flow-root; /* ตัวนี้จะช่วยให้ Section แม่ "รับรู้" ความสูงของลูกๆ ทั้งหมด */
}

.section-padding--top{
    padding-top: 96px;
    padding-bottom:24px;
    min-height: 400PX; /* ความสูงเต็มหน้าจอ 100% Viewport Height */
    height: auto;
    display: flex;
}

.btn-primary {
    background: var(--secondary-color);
    border: none;
    padding: 12px 30px;
    display: block;          /* เปลี่ยนเป็น block เพื่อให้ใช้ margin: auto ได้ */
    margin: 24px auto 0; /* บน 40px, ซ้าย-ขวา Auto (กึ่งกลาง), ล่าง 0 */
    border-radius: 50px;
    color: white;
    font-weight: bold;
    cursor: pointer;
    line-height: 1.5rem;
    width: fit-content;      /* ให้ความกว้างเท่ากับเนื้อหาข้างใน */
    text-decoration: none;   /* เอาเส้นใต้ Link ออก */
    text-align: center;
}

.btn-primary:hover {
    background-color: var(--primary-color);
}

.button-wrapper {
    width: 100%;
    text-align: center;
    margin-top: 40px;
}

/* --- 8. section news --- */

.news-flex-row {
    display: flex;          /* ใช้ Flex แทน Grid เพื่อให้เนื้อหาไหลต่อกัน */
    align-items: center;    /* จัดให้รูปและตัวหนังสืออยู่กึ่งกลางในแนวตั้งเสมอกัน */
    gap: 24px;              /* เว้นระยะห่างจากรูปถึงหัวข้อ 24px ตามโจทย์ */
    width: 100%;            /* ให้บล็อกกว้างเต็มพื้นที่คอลัมน์ขวา */
    padding-bottom: 12px;
    margin-bottom: 12px;
}

.news-image {
    width: 150px;
    height: 90px;
    object-fit: cover;
    object-position: center; /*เลือกจุดครอบ center, top, bottom*/
}

/* ปรับให้หัวข้อข่าวขยายเต็มพื้นที่ที่เหลือ */
.news-flex-row h4 {
    margin: 0;              /* ล้าง margin ของ h4 เพื่อการจัดวางที่แม่นยำ */
    flex: 1;                /* ให้ข้อความกินพื้นที่ที่เหลือทั้งหมด */
}

@media (max-width: 576px) {
    .news-flex-row {
        /* เปลี่ยนจาก Grid เป็น Flex Direction */
        flex-direction: column; 
        
        /* ปรับให้หัวข้อข่าวมาชิดซ้าย (หรือใช้ center ถ้าต้องการให้หัวข้ออยู่กลางรูป) */
        align-items: flex-start; 
        
        /* ระยะห่างระหว่างรูปกับหัวข้อเมื่อวางซ้อนกัน */
        gap: 12px; 
    }

    .news-image {
        width: 100%;    /* รูปขยายเต็มกว้างจอ */
        height: 180px;   /* ให้ความสูงปรับตามสัดส่วนรูป หรือใส่ 180px ก็ได้ครับ */
        aspect-ratio: 16 / 9; /* ช่วยรักษาทรงรูปให้สวยงาม */
    }

    .news-flex-row h4 {
        text-align: left; /* บังคับให้ข้อความชิดซ้ายในมือถือ */
        width: 100%;
    }
}

/* --- ส่วนควบคุม Responsive โดยไม่กระทบ Class ส่วนกลาง --- */

/* 1. เมื่อหน้าจอเล็กลง (เช่น ต่ำกว่า 992px หรือขนาด Tablet) */

@media (max-width: 992px) {
    /* เพิ่ม !important เพื่อทับคำสั่งเดิมของระบบ */
    .section-padding .grid--2-cols {
        grid-template-columns: 1fr !important;
        display: grid !important; /* มั่นใจว่ายังเป็น grid */
    }

    /* ปรับให้รูปภาพมาอยู่ต่อท้ายหรือจัดระเบียบใหม่ */
    .section-padding .info-card {
        margin-bottom: 30px; /* เพิ่มระยะห่างเมื่อซ้อนกัน */
    }
}

/* 2. การรักษาความสวยงามของรูปภาพ */
.main-news-box {
    width: 100%;
    /* ใช้ aspect-ratio เพื่อคงสัดส่วนภาพแทนการ Fix ความสูงตายตัว */
    /* 16 / 9 คือสัดส่วนมาตรฐาน ถ้าจอเล็กลง รูปจะย่อตามสัดส่วนนี้ ไม่โดนบีบ */
    aspect-ratio: 16 / 9; 
    height: auto; /* ปลดล็อก height: 400px เดิม */
}

/*วิธี "พิสูจน์ทราบ" และแก้ไขแบบกำปั้นทุบดินใส่เพื่อดูขอบเขตของ Section (ลบออกทีหลังได้)
.section-padding { border: 5px solid red !important; }
.section-products { border: 5px solid blue !important; }

/* โค้ดแก้ปัญหาแบบบังคับเลย์เอาต์ (The "Force Flow" Fix)
.section-padding, 
.section-products {
    display: block !important;    /* บังคับให้เรียงต่อกันตามปกติ 
    position: relative !important; /* ห้ามใช้ absolute/fixed 
    height: auto !important;       /* บับคับให้ยืดตามเนื้อหา 
    min-height: 1px;               /* ป้องกันการยุบตัว 
    clear: both;                   /* ล้างค่า float ถ้ามี
}
วิธี "พิสูจน์ทราบ" และแก้ไขแบบกำปั้นทุบดินใส่เพื่อดูขอบเขตของ Section (ลบออกทีหลังได้) */



/* Pagination Styling */
.pagination-container {
    margin-top: 50px;
    display: flex;
    justify-content: center;
}

.pagination {
    display: flex;
    list-style: none;
    padding: 0;
    gap: 8px;
}

.pagination li a {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 15px;
    text-decoration: none;
    color: #444;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.pagination li a:hover {
    border-color: #D16F50;
    color: #D16F50;
    background-color: #fdf2f0;
}

.pagination li a.active {
    background-color: #D16F50;
    border-color: #D16F50;
    color: #fff;
}

.pagination li a.prev-next {
    font-weight: 600;
}

/* ซ่อนย้อนกลับ/ถัดไป บนมือถือถ้าจอกะทัดรัดเกินไป */
@media (max-width: 480px) {
    .pagination li a {
        min-width: 35px;
        padding: 0 10px;
        font-size: 14px;
    }
}

/* 1. คอนเทนเนอร์หลักของรูป */
.product-card__image-container {
    position: relative;
    width: 100%;
	height: 100% !important;
    aspect-ratio: 1 / 1; /* บังคับจัตุรัส */
    overflow: hidden;    /* สำคัญ: เพื่อให้รูปที่ล้นออกมาถูกตัดทิ้ง */
    border-radius: 12px; /* ความมนของขอบรูป */
}

/* 2. สไตล์ของรูปภาพ (The Crop Logic) */
.product-card__image-container img.crop-image {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important; /* ครอบรูปให้เต็มพื้นที่โดยไม่เสียสัดส่วน */
    object-position: center;     /* เลือกจุดกลางรูป */
    display: block;
    transition: transform 0.5s ease;
}

/* Effect ตอนเมาส์ชี้ (Optional) */
.product-card:hover img.crop-image {
    transform: scale(1.1); /* รูปจะขยายเล็กน้อยเวลาชี้ */
}