/* -------------------------------------------------- 
 * Global 
 * -------------------------------------------------- */

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: "Noto Sans Thai", sans-serif;
    font-weight: 400;
    line-height: 1.6;
    color: #000000;
    font-size: 16px;
}



/*พื้นหลังเลื่อน*/
/* ปิดรูปพื้นหลังไม่ให้โผล่ในส่วนอื่น */
section,
header,
footer{
  background: #fff;
}
body{
  background-image: url("../img/photo/test.jpg"); /* ปรับพาธให้ตรง */
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed; /* สำคัญ: รูปอยู่กับ viewport */
}


.font-en {
    font-family: "Kanit", sans-serif !important;
}

.font-noto {
    font-family: "Noto Sans Thai", sans-serif !important;
}

h1,
h2,
h3,
h4 {
    font-weight: 600;
}

a {
    text-decoration: none;
    color: inherit;
}

img {
    max-width: 100%;
    display: block;
}

/* --------------------------------------------------
 * Layout wrappers (all)
 * -------------------------------------------------- */

.page-wrapper {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 15px;
}

/* --------------------------------------------------
 * Header
 * -------------------------------------------------- */

header {
    background: #ffffff;
    border-bottom: 1px solid #eee;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
    min-height: 80px;
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 240px;
    height: 80px;
    padding: 0;
}

.logo a {
    display: block;
    width: 100%;
    height: 100%;
}

.logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    transition: transform 0.25s ease, opacity 0.25s ease;
}

.logo a:hover img {
    transform: scale(1.05);
    opacity: 0.95;
}

.logo span {
    font-weight: 500;
    font-size: 16px;
}

nav ul {
    list-style: none;
    display: flex;
    gap: 36px;
    font-size: 16px;
    font-weight: 400;
}

nav a {
    padding-bottom: 4px;
}

nav a.active,
nav a:hover {
    border-bottom: 2px solid #C2B23D;
}

nav {
    margin: 0 auto;
    width: fit-content;
}

/* --------------------------------------------------
 * Banner
 * -------------------------------------------------- */

.banner {
    position: relative;
    height: 380px;
    overflow: hidden;
}

.banner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.banner-text {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-end;
    color: #fff;
    text-align: left;
    padding-left: 50%;
    transform: translateX(-20%);
}

.banner-text h1 {
    font-size: 64px;
    font-weight: 500;
    letter-spacing: 4px;
    margin-bottom: 0px;
    font-style: italic;
    font-family: "Kanit", sans-serif;
}

.banner-text p {
    font-size: 32px;
    font-weight: 300;
    letter-spacing: 2px;
    margin-top: -15px;
    font-style: italic;
    font-family: "Kanit", sans-serif;
}

.banner-text h1,
.banner-text p {
    text-shadow: 0 3px 10px rgba(0, 0, 0, 0.45);
}

.center-banner {
    justify-content: center !important;
    align-items: center !important;
    text-align: center !important;
    padding-left: 0 !important;
    transform: none !important;
}

.center-banner h1,
.center-banner p {
    font-style: normal !important;
    letter-spacing: 0 !important;
}

.center-banner h1 {
    font-size: 48px;
    font-weight: 500;
    letter-spacing: 2px;
    margin-bottom: 0px;
}

.center-banner p {
    font-size: 28px;
    font-weight: 300;
    margin-top: -15px;
    letter-spacing: 0.5px;
}

.banner-text p.font-noto {
    font-family: "Noto Sans Thai", sans-serif !important;
}

.arrow-big {
    font-size: 20px;
    margin-left: 3px;
    display: inline-block;
    transform: translateY(0.55px);
    /* ดันลงนิดนึงให้ระดับพอดี */
    line-height: 0;
}

/* --------------------------------------------------
 * Sections
 * -------------------------------------------------- */

.lock-lines {
    white-space: pre-line !important;
}

.with-line {
    position: relative;
    padding-bottom: 5px;
}

.with-line::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 120px;
    height: 0.8px;
    background-color: #000000;
}

.with-line-center {
    position: relative;
    padding-bottom: 12px;
    margin: 0 auto;
    width: fit-content;
}

.with-line-center::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 60px;
    height: 0.8px;
    background-color: #000000;
    transform: translateX(-50%);
}

/* หัวข้อ + ปุ่ม View Details อยู่ในบรรทัดเดียวกัน */
.section-title-wrapper {
    position: relative;
    text-align: center;
    margin-bottom: 25px;
}

/* ปุ่ม View Details ขึ้นไปอยู่มุมขวาบน */
.section-title-wrapper .view-btn {
    position: absolute;
    right: 0;
    top: 0;
}

section {
    padding-top: 40px !important;
    padding: 60px 0;
}

/* section ใหญ่พิเศษ เช่น Our Products */
.section-large {
    padding-top: 42px !important;
    padding-bottom: 60px 0 !important;
}

.section-title {
    text-align: center;
    font-weight: 600;
    margin-bottom: 20px;
}

/* --------------------------------------------------
 * Sections – layout text+image ทั่วไป
 * -------------------------------------------------- */

.text-image-row {
    display: flex;
    align-items: flex-start;
    gap: 30px;
}

.text-image-row>div:first-child {
    margin-left: 0;
    flex: 1;
    /* ให้กินพื้นที่ที่เหลือ */
    max-width: 520px;
    /* ประมาณเดิมที่เคยใช้ */
    margin-top: -20px;
}

.text-image-row>div:first-child img {
    width: 100%;
    max-width: 520px;
    height: auto;
    object-fit: cover;
    display: block;
}

/* กล่องรูปฝั่งขวา */
.text-image-row>div:last-child {
    flex: 0 0 550px;
    /* กว้างคงที่ ประมาณ 550px */
}

.text-image-row.reverse {
    flex-direction: row-reverse;
}




/* ขนาดรูป + เงา (ให้เหมือนหน้า about) */
.text-image-row>div:last-child img {
    width: 950px;
    height: 380px;
    object-fit: cover;
    display: block;
    box-shadow: 0 0px 15px 2px rgba(0, 0, 0, 0.3);
    margin-bottom: 10px;
}

/* -----------------------------
   ABOUT PAGE 
   ----------------------------- */
.about-row {
    display: flex;
    align-items: flex-start;
    gap: 40px;
    justify-content: center;
    padding-left: 0;
    margin: 40px auto 0 auto;
    margin-top: 35px;
}

/* ก้อนบน */
.about-row:not(.about-reverse) {
    justify-content: flex-start;
    /* จัดจากฝั่งซ้าย */
    margin-left: 240px;
    /* ขยับทั้งก้อนไปทางซ้าย */
    margin-right: auto;
    /* ปล่อยขวา */
}

/* ก้อนล่าง */
.about-row.about-reverse {
    justify-content: flex-end;
    /* ดันก้อนไปฝั่งขวา */
    margin-left: auto;
    /* ขยับทั้งก้อนไไปทางซ้าย */
    margin-right: 240px;
    /* ปล่อยขวา */
    margin-top: 50px;
}

/* รูปฝั่งซ้ายให้กว้างแบบสี่เหลี่ยมผืนผ้า และไม่ถูกบีบ */
.about-row>div:first-child {
    flex-shrink: 0;
}

.about-row>div:first-child img {
    width: 550px;
    height: 350px;
    object-fit: cover;
}

/* รูปฝั่งซ้าย (ประวัติบริษัท) */
.about-row:not(.about-reverse)>div:first-child img {
    width: 550px;
    height: 380px;
    object-fit: cover;
    margin-bottom: 15px;
}

/* รูปฝั่งขวา (พันธกิจของเรา) */
.about-row.about-reverse>div:last-child img {
    width: 550px;
    height: 380px;
    object-fit: cover;
    margin-bottom: 25px;
}

.about-row.about-reverse>div:first-child {
    margin-right: 40px;
    /* เพิ่มช่องว่างระหว่างข้อความกับรูป */
}

/* เนื้อหาด้านขวา – ให้กินพื้นที่กว้างขึ้น และดันขึ้นไม่ให้ "ล่น" */
.about-row>div:last-child {
    flex: 1;
    margin-left: 20px;
    margin-top: -10px;
}

/* paragraph ใน about ใช้ปกติ ยกเว้นอันที่เป็น lock-lines */
.about-row p:not(.lock-lines) {
    white-space: normal;
}

/* reverse → สลับตำแหน่งรูปไปด้านขวา (สำหรับบล็อกพันธกิจ) */
.about-row.reverse {
    flex-direction: row-reverse !important;
}

.about-row.reverse>div:first-child {
    margin-left: 0 !important;
}

.about-row.reverse>div:last-child {
    margin-right: 0 !important;
}

/* เนื้อหาด้านขวา – แก้ให้ใช้เฉพาะก้อนบน */
.about-row:not(.about-reverse)>div:last-child {
    flex: 1;
    margin-left: 20px;
    margin-top: -10px;
}

/* ก้อนล่าง (พันธกิจ) ให้ข้อความยืดแทน และขยับห่างจากรูป */
.about-row.about-reverse>div:first-child {
    flex: 0 0 670px;
    max-width: 670px;
    margin-right: 40px;
    margin-top: 40px;
}

/* กันไม่ให้รูปใน about โดน max-width:100% บีบ */
.about-row img {
    max-width: none;
    box-shadow: 0 0px 15px 2px rgba(0, 0, 0, 0.3);
}

.about-row:not(.about-reverse) h2.section-title.with-line {
    margin-bottom: 4px;
    /* จากเดิมน่าจะเยอะกว่านี้ → หดลงให้ชิดขึ้น */
}

.about-row:not(.about-reverse) p.lock-lines {
    margin-top: 0;
    /* ตัด margin-top เดิมของ <p> ทิ้ง */
}

/* หัวข้อ + เนื้อหาของก้อนล่าง (พันธกิจของเรา) */
.about-row.about-reverse h2.section-title.with-line-center {
    margin-bottom: 0px;
    /* ลดช่องว่างใต้หัวข้อให้ชิดเนื้อหามากขึ้น */
}

.about-row.about-reverse p.lock-lines {
    margin-top: 0;
    /* ตัด margin-top เดิมของ <p> ออก */
}

/* ปุ่มเหลือง */
.btn-primary {
    font-weight: 400;
    display: inline-block;
    padding: 8px 18px;
    background: #C2B23D;
    color: #fff;
    font-size: 16px;
    border-radius: 6px;
    transition: all 0.25s ease;
    letter-spacing: 0.5px;
    line-height: 1.8;
    /* คุมความสูงปุ่มให้คงที่ */
}

.btn-primary:hover {
    background: #ad9f33;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.12);
}

.center-btn {
    display: block;
    width: fit-content;
    margin: 20px auto 0;
}

.home-learnmore {
    margin-top: 50px !important;
}

/* --------------------------------------------------
 * 6. หน้าแรก: products + customers
 * -------------------------------------------------- */
 /* =========================================
   Hover effect: Our Products (index) + Products ALL
   - ขยายเล็กน้อย + เทาเบาๆ ดูพรีเมียม
   ========================================= */

.products-grid .product-card img {
    transition: transform 0.35s ease, filter 0.35s ease, box-shadow 0.35s ease;
    will-change: transform, filter;
}

/* ตอน hover: ภาพขยาย + เทาแบบเบา */
.products-grid .product-card:hover img {
    transform: scale(1.035);
    filter: grayscale(35%) brightness(0.98);
    box-shadow: 0 0px 18px 3px rgba(0, 0, 0, 0.28);
}
.products-grid .product-card h3,
.products-grid .product-card h4{
  transition: color 0.28s ease;
}

.products-grid .product-card:hover h3,
.products-grid .product-card:hover h4{
  color: #C2B23D;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 25px;
    margin-top: 40px;
}

.product-card {
    text-align: center;
    cursor: pointer;
    padding-bottom: 60px;
    /* เพิ่มช่องว่างล่างจริง */
    display: block;
    /* ทำให้ทั้งการ์ดคลิกได้เต็มกล่อง และจัด layout เหมือนเดิม */
}

.product-card h3 {
    margin-top: 35px;
    /* จากเดิม 10px → เพิ่มนิดให้โล่งขึ้น */
    font-size: 18px;
    text-align: center;
}

/* ใช้กับหน้า Products ที่ใช้ h4 ใต้รูป */
.product-card h4 {
    margin-top: 35px;
    /* ระยะห่างจากรูปเท่าหน้าแรก */
    font-size: 18px;
    text-align: center;
    font-weight: 600;
}

.product-card a {
    display: block;
    text-decoration: none;
    color: inherit;
}

.products-grid .product-card img {
    width: 100%;
    max-width: 530px;
    /* ปรับเลขนี้ถ้าอยากให้ใหญ่/เล็กลง */
    aspect-ratio: 1 / 1;
    /* บังคับเป็นจตุรัส */
    object-fit: cover;
    display: block;
    margin: 0 auto;
    box-shadow: 0 0px 15px 2px rgba(0, 0, 0, 0.3);
}

.product-detail-info .line {
    font-size: 18px;
    margin: 0 0 14px 0;
    line-height: 1.6;
    display: flex;
    align-items: flex-start;
}

.product-detail-info .label {
    font-weight: 700;
    width: 120px;
    /* ← ความกว้าง label ให้ทุกบรรทัดตรงกัน */
    flex-shrink: 0;
}

/* -----------------------------------------
   OVERRIDE — หน้า Products + หน้าย่อย = 390px
   ----------------------------------------- */

.products-page .product-card img,
.products-page .product-detail-image img {
    width: 346px !important;
    height: 346px !important;
    object-fit: cover;
    display: block;
}

.products-page .products-grid {
    gap: 60px !important;
}

.products-page .product-tabs {
    max-width: 1160px !important;
    margin-left: auto !important;
    margin-right: auto !important;
    padding: 0 !important;
}

/* รายละเอียดสินค้า */
.product-detail {
    display: flex;
    gap: 80px;
    align-items: flex-start;
}

.product-detail-image {
    flex: 0 0 346px;
    /* ความกว้างรูปคงที่ */
    max-width: 346px;
}

.product-detail-info p {
    font-size: 14px;
    margin-bottom: 8px;
}

/* มาตรฐานรูปสินค้าใช้ทั้งเว็บ */
.product-image-square {
    width: 100%;
    aspect-ratio: 1 / 1;
    /* จตุรัส */
    object-fit: cover;
    display: block;
}

.product-detail-image img {
    width: 100%;
    height: auto;
    aspect-ratio: 1 / 1;
    /* ถ้าอยากให้จตุรัสเหมือนเดิม */
    object-fit: cover;
    display: block;
    box-shadow: 0 0px 15px 2px rgba(0, 0, 0, 0.3);
}

/* Tabs บนหน้า Products */
.product-tabs {
    width: 100%;
    max-width: 1160px;
    /* เท่ากับ container */
    padding: 0 15px;
    /* ให้ขอบซ้าย-ขวาเท่ากับ container */
    margin: 40px auto 30px;

    display: flex;
    justify-content: space-between;
    gap: 0;
    border-collapse: collapse;
}

/* กรอบเนื้อหาใต้ bar สำหรับทั้งหน้า ALL และหน้าย่อย */
#product-list {
    width: 100%;
    max-width: 1160px;
    padding: 0;
    margin: 80px auto 0;
    /* หน้า ALL ใช้อันนี้ */
}

.product-detail {
    width: 100%;
    max-width: 1160px;
    padding: 0;
    margin: 80px auto 80px;
    /* ← เพิ่มด้านล่างเฉพาะหน้าย่อย */
}

/* ปุ่มในแท็บคงสไตล์เดิม */
.tab-btn {
    flex: 1;
    /* ← ให้ปุ่มยืดเท่ากันทุกปุ่ม */
    text-align: center;
    padding: 12px 40px;
    border: none;
    outline: none;
    background: #000;
    color: #fff;
    font-size: 22px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    text-transform: none;
    letter-spacing: 0.5px;
    border-radius: 0;
}

.tab-btn+.tab-btn {
    border-left: 1px solid #fff;
    margin-left: 1px;
}

.tab-btn.active {
    background: #C2B23D;
    color: #fff;
}

.tab-btn:not(.active):hover {
    background: #333;
}

.customers-logos {
    display: flex;
    flex-wrap: nowrap;
    justify-content: center;
    align-items: center;
    /* จัดให้โลโก้สูงพอดีกัน */
    gap: 40px;
    margin-top: 30px;
}

.customers-logos img {
    width: auto;
    object-fit: contain;
    display: block;
    margin: 0 20px;
    /* ระยะห่างซ้าย-ขวา */
    margin-bottom: 25px;
}

.logo-scgp {
    height: 160px;
}

.logo-innovation {
    height: 90px;
}

.logo-sppetpack {
    height: 115px;
}

.logo-blowpack {
    height: 140px;
}

.logo-tsplaspack {
    height: 90px;
}

.logo-tns {
    height: 100px;
}

/* --------------------------------------------------
 * 7. Footer
 * -------------------------------------------------- */

footer {
    background: #C2B23D;
    margin-top: auto;
    color: #fff;
    padding: 40px 0 10px;
}

.footer-inner {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 40px;
}

.footer-title {
    font-size: 25px;
    font-weight: 600;
    margin-bottom: 15px;
}

.footer-inner p,
.footer-inner .contact-row {
    font-size: 16px;
    font-weight: 400;
    letter-spacing: 0.5px;
}

.contact-row {
    display: flex;
    align-items: center;
    margin-bottom: 18px;
}

.contact-row img {
    margin-right: 15px; /* 👈 เพิ่มช่องว่างระหว่างไอคอนกับข้อความ */
}

.footer-btn {
    margin-top: 10px;
}

.footer-icon {
    width: 22px;
    height: 22px;
    margin-right: 8px;
    object-fit: contain;
    transform: translateY(-1px);
}

.footer-icon-up {
    width: 30px;
    height: 30px;
    margin-right: 8px;
    object-fit: contain;
    transform: translateY(-1px);
}

.footer-bottom {
    text-align: center;
    margin-top: 55px;
    font-size: 12px;
    font-weight: 300;
}

/* ปุ่ม CONTACT US ใน footer — ใช้ขนาดเดียวกับ .btn-primary */
footer .footer-btn {
    font-weight: 600;
    display: inline-block;
    padding: 8px 18px;
    font-size: 16px;
    border-radius: 6px;
    letter-spacing: 0.5px;
    background: #ffffff;
    color: #C2B23D;
    border: 2px solid #C2B23D;
    transition: all 0.25s ease;
    margin-top: 25px;
    line-height: 1.8;
    /* คุมความสูงปุ่มให้คงที่ */
}

footer .footer-btn:hover {
    background: #f2f2f2;
    color: #C2B23D;
    animation: bounceTwice 0.75s cubic-bezier(.22,.61,.36,1);
    box-shadow: 0 6px 18px rgba(194,178,61,0.35);
    animation-fill-mode: both;
}
.footer-inner>div:last-child {
    margin-top: 12px;
}


@keyframes bounceTwice {
    0% {
        transform: translateY(0);
    }
    28% {
        transform: translateY(-4px);
    }
    52% {
        transform: translateY(0);
    }
    72% {
        transform: translateY(-1.5px);
    }
    100% {
        transform: translateY(0);
    }
}



/* --------------------------------------------------
 * 8. Responsive
 * -------------------------------------------------- */

@media (max-width: 768px) {
    .header-inner {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .text-image-row,
    .text-image-row.reverse {
        grid-template-columns: 1fr;
    }

    .products-grid {
        grid-template-columns: 1fr;
    }

    .footer-inner {
        grid-template-columns: 1fr;
    }

    .map-wrapper {
        width: 100%;
        height: 300px;
    }
}

@media (max-width: 768px) {
    .about-fixed-lines span {
        white-space: normal;
        /* บนมือถือให้ตัดบรรทัดได้ */
    }
}

@media (max-width: 900px) {
    .text-image-row {
        flex-direction: column;
    }
}

.text-image-row>div:first-child,
.text-image-row>div:last-child {
    flex: none;
    width: 100%;
}

.map-wrapper {
    margin: 15px auto 0 auto;
    width: 900px;
    height: 500px;
    overflow: hidden;
    margin-bottom: 50px;
}

.map-wrapper iframe {
    width: 100%;
    height: 100%;
    border: 0;
}

/* กล่องจัด content ให้ตรงกับขนาดแผนที่ */
.contact-align {
    width: 900px;
    margin: 0 auto 80px;
}

/* --------------------------------------------------
 * 9. Kanit font utility classes
 * -------------------------------------------------- */

.kanit-thin {
    font-family: "Kanit", sans-serif;
    font-weight: 100;
    font-style: normal;
}

.kanit-extralight {
    font-family: "Kanit", sans-serif;
    font-weight: 200;
    font-style: normal;
}

.kanit-light {
    font-family: "Kanit", sans-serif;
    font-weight: 300;
    font-style: normal;
}

.kanit-regular {
    font-family: "Kanit", sans-serif;
    font-weight: 400;
    font-style: normal;
}

.kanit-medium {
    font-family: "Kanit", sans-serif;
    font-weight: 500;
    font-style: normal;
}

.kanit-semibold {
    font-family: "Kanit", sans-serif;
    font-weight: 600;
    font-style: normal;
}

.kanit-bold {
    font-family: "Kanit", sans-serif;
    font-weight: 700;
    font-style: normal;
}

.kanit-extrabold {
    font-family: "Kanit", sans-serif;
    font-weight: 800;
    font-style: normal;
}

.kanit-black {
    font-family: "Kanit", sans-serif;
    font-weight: 900;
    font-style: normal;
}

.kanit-thin-italic {
    font-family: "Kanit", sans-serif;
    font-weight: 100;
    font-style: italic;
}

.kanit-extralight-italic {
    font-family: "Kanit", sans-serif;
    font-weight: 200;
    font-style: italic;
}

.kanit-light-italic {
    font-family: "Kanit", sans-serif;
    font-weight: 300;
    font-style: italic;
}

.kanit-regular-italic {
    font-family: "Kanit", sans-serif;
    font-weight: 400;
    font-style: italic;
}

.kanit-medium-italic {
    font-family: "Kanit", sans-serif;
    font-weight: 500;
    font-style: italic;
}

.kanit-semibold-italic {
    font-family: "Kanit", sans-serif;
    font-weight: 600;
    font-style: italic;
}

.kanit-bold-italic {
    font-family: "Kanit", sans-serif;
    font-weight: 700;
    font-style: italic;
}

.kanit-extrabold-italic {
    font-family: "Kanit", sans-serif;
    font-weight: 800;
    font-style: italic;
}

.kanit-black-italic {
    font-family: "Kanit", sans-serif;
    font-weight: 900;
    font-style: italic;
}

/* --------------------------------------------------
 * 9. Noto Sans Thai font utility classes
 * -------------------------------------------------- */

.noto-thin {
    font-family: "Noto Sans Thai", sans-serif;
    font-weight: 100;
    font-style: normal;
}

.noto-extralight {
    font-family: "Noto Sans Thai", sans-serif;
    font-weight: 200;
    font-style: normal;
}

.noto-light {
    font-family: "Noto Sans Thai", sans-serif;
    font-weight: 300;
    font-style: normal;
}

.noto-regular {
    font-family: "Noto Sans Thai", sans-serif;
    font-weight: 400;
    font-style: normal;
}

.noto-medium {
    font-family: "Noto Sans Thai", sans-serif;
    font-weight: 500;
    font-style: normal;
}

.noto-semibold {
    font-family: "Noto Sans Thai", sans-serif;
    font-weight: 600;
    font-style: normal;
}

.noto-bold {
    font-family: "Noto Sans Thai", sans-serif;
    font-weight: 700;
    font-style: normal;
}

.noto-extrabold {
    font-family: "Noto Sans Thai", sans-serif;
    font-weight: 800;
    font-style: normal;
}

.noto-black {
    font-family: "Noto Sans Thai", sans-serif;
    font-weight: 900;
    font-style: normal;
}

/* SLIDER */
.slider {
    position: relative;
    height: 380px;
    overflow: hidden;
}

/* สไลด์ทั้งหมด */
.slides {
    width: 100%;
    height: 100%;
    position: relative;
}

.slide {
    position: absolute;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1s ease-in-out;
}

.slide.active {
    opacity: 1;
}

.slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ปุ่มซ้าย–ขวา แบบวงกลม (ใช้ขนาดเดิม) */
.slider button.prev,
.slider button.next {
    position: absolute;
    top: 50%;
    width: 45px;
    height: 45px;
    border-radius: 50%;

    background: rgba(255, 255, 255, 0.75);
    border: none;

    font-size: 22px;
    font-weight: bold;
    color: #000;

    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;

    opacity: 0;
    pointer-events: none;
    transform: translateY(-50%);
    transition: opacity 0.35s ease, transform 0.35s ease;
}

/* ตำแหน่ง + ทิศทางสไลด์ตอนซ่อนอยู่ */
.slider button.prev {
    left: 20px;
    transform: translate(-20px, -50%);
}

.slider button.next {
    right: 20px;
    transform: translate(20px, -50%);
}

/* เมื่อเม้าส์อยู่บนแบนเนอร์ → ให้ปุ่มเลื่อนเข้ามา + โผล่ */
.banner.slider:hover button.prev,
.banner.slider:hover button.next {
    opacity: 1;
    pointer-events: auto;
    transform: translate(0, -50%);
}

/* Hover ที่ตัวปุ่มเอง → เพิ่ม effect นิดหน่อย */
.banner.slider:hover button.prev:hover,
.banner.slider:hover button.next:hover {
    background: #C2B23D;
    color: #fff;
    transform: translate(0, -50%) scale(1.07);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Utility ซ่อน/แสดง */
.hidden {
    display: none;
}

/* ใช้เฉพาะหน้า index */
.home-banner {
    height: 500px;
}

/* ใช้เฉพาะหน้า index: banner slider */
.banner.slider {
    height: 600px;
    position: relative;
    overflow: hidden;
}

.color-show {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-left: 0px;
    /* ให้ตรงกับตำแหน่งหลัง label */
    margin-top: 6px;
    pointer-events: none;
    /* ← ผู้ใช้คลิกไม่ได้ */
}

.dot {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: inline-block;
    border: 1px solid #ddd;
}

/* สีต่าง ๆ */
.dot.white { background: #ffffff; }
.dot.red { background: #ff0a47; }
.dot.yellow { background: #f3f306; }
.dot.blue { background: #009dff; }
.dot.green { background: #02af64; }

.color-text {
    font-size: 14px;
    font-weight: 400;
    margin-left: 6px;
    pointer-events: none;
    /* เผื่อไว้ */
}

/* วงกลม */
.products-page .product-detail-info .color-show {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0;
    pointer-events: none;
}

/* ซ่อนคำว่า สี : แต่คงพื้นที่ไว้ */
.products-page .label-hide {
    color: transparent;
    /* ไม่แสดงตัวอักษร */
}

/* จัดบรรทัดสี */
.products-page .color-line {
    display: flex;
    align-items: center;
    margin: 0 0 14px 0;
}

.products-page .color-line .label {
    width: 120px;
    /* ตำแหน่งเดียวกับ label อื่น */
    flex-shrink: 0;
}

/* วงกลม */
.products-page .color-show {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0;
    pointer-events: none;
}

/* ==================================================
   ✅ เพิ่มเติม: Thumbnail Gallery ใต้รูปสินค้า (5 รูป + ลูกศร)
   (เพิ่มอย่างเดียว ไม่ลบของเดิม)
   ================================================== */

/* ให้รูปหลักใน product-gallery ยังเป็น 346x346 ตามเดิม */
.products-page .product-gallery .main-img {
    width: 346px !important;
    height: 346px !important;
    object-fit: cover;
    display: block;
}

/* แถบ thumbnail + ลูกศร */
.products-page .thumb-bar {
    margin-top: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* ปุ่มลูกศร */
.products-page .thumb-nav {
    width: 34px;
    height: 34px;
    border: none;
    border-radius: 6px;
    background: #eee;
    cursor: pointer;
    font-size: 20px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.products-page .thumb-nav:disabled {
    opacity: 0.4;
    cursor: default;
}

/* viewport สำหรับเลื่อน */
.products-page .thumb-viewport {
    overflow: hidden;
    width: 100%;
}

/* track รวม thumbnail */
.products-page .thumb-track {
    display: flex;
    gap: 10px;
    transition: transform 0.25s ease;
    will-change: transform;
}

/* thumbnail เป็นจตุรัส */
.products-page .thumb {
    border: 2px solid transparent;
    padding: 0;
    background: transparent;
    cursor: pointer;
    flex: 0 0 auto;

    width: 60px;
    height: 60px;

    border-radius: 6px;
    overflow: hidden;
}

.products-page .thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* อันที่ active */
.products-page .thumb.active {
    border-color: #C2B23D;
     border-width: 3px;
  box-sizing: border-box;
}

/* ให้โชว์ได้พอดี 5 รูป */
.products-page .thumb-bar[data-visible="5"] .thumb-viewport {
    max-width: calc((60px * 5) + (10px * 4));
}

/* =========================
 * FIX: thumbnail เป็นสี่เหลี่ยม
 * ========================= */

/* ตัวปุ่ม thumb */
.product-gallery .thumb {
  border-radius: 0 !important;
  overflow: hidden; /* กันรูปทะลุ */
}

/* รูปด้านใน thumb */
.product-gallery .thumb img {
  border-radius: 0 !important;
  aspect-ratio: 1 / 1;   /* บังคับจตุรัส */
  object-fit: cover;     /* ไม่ยืด */
  display: block;
  
}
.product-gallery .thumb {
  border: 1px solid #ddd;
 
}

.product-gallery .thumb.active {
  border-color: #C2B23D;
}



/* -----------------------------
   NAV DROPDOWN (Products) – FINAL
   ----------------------------- */

/* ตัวเมนูหลัก */
nav ul li.nav-dropdown{
  position: relative;
}

/* ลิงก์ Products (เผื่อที่ให้ลูกศร) */
nav ul li.nav-dropdown > a{
  position: relative;
  padding-right: 18px;
}

/* ลูกศรลง (นิ่ง สุภาพ) */
nav ul li.nav-dropdown > a::after{
  content: "▾";
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);

  font-size: 15px;
  font-weight: 500;
  color: #666;          /* เทาเข้ม แยกจากข้อความ */
  opacity: 0.85;

  transition: color 0.25s ease, opacity 0.25s ease;
}

/* hover ที่ Products → ลูกศรอ่อนลง */
nav ul li.nav-dropdown:hover > a::after{
  color: #aaa;
  opacity: 1;
}

/* -----------------------------
   Dropdown menu
   ----------------------------- */

nav ul li.nav-dropdown .dropdown-menu{
  position: absolute;
  top: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%);

  min-width: 220px;
  background: #fff;
  border: 1px solid #eee;
  box-shadow: 0 10px 25px rgba(0,0,0,0.12);
  border-radius: 10px;

  list-style: none;
  padding: 0;                 /* 👈 ตัด padding เพื่อกันช่องขาว */
  overflow: hidden;           /* 👈 ให้ hover สีเนียนกับขอบมน */

  display: block !important;  /* กันโดน nav ul { display:flex } */

  opacity: 0;
  visibility: hidden;
  pointer-events: none;

  transition: opacity 0.18s ease, transform 0.18s ease;
  z-index: 999;
}

/* แสดง dropdown */
nav ul li.nav-dropdown:hover .dropdown-menu{
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(-50%) translateY(2px);
}

/* buffer กันเมนูหายตอนเลื่อนเมาส์ */
nav ul li.nav-dropdown::after{
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  height: 14px;
}

/* -----------------------------
   รายการย่อย
   ----------------------------- */

nav ul li.nav-dropdown .dropdown-menu li{
  display: block;
  width: 100%;
}

/* ลิงก์ด้านใน */
nav ul li.nav-dropdown .dropdown-menu li a{
  display: block;
  width: 100%;
  padding: 10px 16px;
  font-size: 15px;
  white-space: nowrap;
  background: transparent;   /* สีไปอยู่ที่ li */
}

/* hover ที่ li → สีเต็มกรอบ ไม่มีช่อง */
nav ul li.nav-dropdown .dropdown-menu li:hover{
  background: rgba(194,178,61,0.12);
}

/* โค้ง item แรก/สุดท้าย ให้เนียนกับกรอบ */
nav ul li.nav-dropdown .dropdown-menu li:first-child{
  border-top-left-radius: 10px;
  border-top-right-radius: 10px;
}

nav ul li.nav-dropdown .dropdown-menu li:last-child{
  border-bottom-left-radius: 10px;
  border-bottom-right-radius: 10px;
}
/* ❌ เอาเส้นใต้ hover ของ nav ออกจาก dropdown item */
nav ul li.nav-dropdown .dropdown-menu li a:hover,
nav ul li.nav-dropdown .dropdown-menu li a.active{
  border-bottom: none !important;
}

/*พื้นหลังเลื่อน*/
/* Our Products background image (เฉพาะ section นี้) */
.products-bg{
  background: rgba(255,255,255,0.55); /* ความใสของกระจก */
  
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border-top: 1px solid rgba(255,255,255,0.35);
  border-bottom: 1px solid rgba(255,255,255,0.35);
}

/*ภาพตัวอย่าง*/
/* ==================================================
   ✅ ทำ thumbnail bar "เลยขอบรูปหลัก" + โชว์ 4 รูปเป็นค่าเริ่มต้น
   (ไม่ยุ่ง JS / ไม่เปลี่ยนโครง)
   ================================================== */

/* 1) อนุญาตให้ของด้านล่างเลยออกนอกกล่องรูปหลักได้ */
.products-page .product-detail-image.product-gallery{
  overflow: visible;
  
}

/* 2) ตั้งค่าขนาดใหม่ (ปรับเลขได้ง่าย) */
.products-page .product-gallery{
  --main: 346px;        /* ขนาดรูปหลักเดิม */
  --thumb: 104px;        /* ✅ ทำรูปเล็กให้ใหญ่ขึ้น */
  --gap: 14px;          /* ช่องว่างระหว่างรูปเล็ก */
  --nav: 40px;          /* ขนาดปุ่มลูกศร */
  --visible: 4;         /* ✅ โชว์ 4 รูปก่อน */
  --extra: 140px;       /* ✅ ความกว้างที่ “เลยขอบ” รวมซ้าย+ขวา */
}

/* 3) ขยายทั้งแถบ thumbnail ให้กว้างกว่า main และดันให้ออกกลาง */
.products-page .product-gallery .thumb-bar{
  width: calc(
    (var(--nav) * 2) +
    (var(--thumb) * var(--visible)) +
    (var(--gap) * (var(--visible) - 1)) +
    (var(--gap) * 2)
  );

  margin-left: calc(var(--extra) / -2);
  margin-right: calc(var(--extra) / -2);
}

/* 4) ปรับขนาดปุ่มลูกศรให้บาลานซ์กับรูปเล็กที่ใหญ่ขึ้น */
.products-page .product-gallery .thumb-nav{
  width: var(--nav);
  height: var(--nav);
}

/* 5) ให้ viewport กว้างพอดีกับ “4 รูป” (หรือใช้ data-visible="4") */
.products-page .product-gallery .thumb-viewport{
  width: calc((var(--thumb) * var(--visible)) + (var(--gap) * (var(--visible) - 1)));
  
}

/* 6) ปรับขนาดรูปเล็กจริง */
.products-page .product-gallery .thumb-track{
  gap: var(--gap);
}

.products-page .product-gallery .thumb{
  width: var(--thumb);
  height: var(--thumb);
}
/* ✅ OVERRIDE: ทำให้ thumb-bar "กลางของรูปหลัก" จริง ๆ (ไม่ไปกลางหน้า) */
.products-page .product-detail-image.product-gallery{
  position: relative;     /* ให้เป็นจุดอ้างอิง */
  overflow: visible;
}

/* ✅ แก้จุดที่ทำให้เบี้ยว */
.products-page .product-gallery .thumb-bar{
  /* ของเดิมคุณคำนวณ width ไว้แล้ว ใช้ต่อได้ */
  display: flex;
  align-items: center;
  gap: var(--gap);

  /* ✅ จัด content ด้านในให้กลาง ไม่ชิดซ้าย */
  justify-content: center;

  /* ✅ ยกเลิก negative margin ที่ทำให้เพี้ยน */
  margin-left: 0 !important;
  margin-right: 0 !important;

  /* ✅ “กลางของรูปหลัก” (อ้างอิงจากกล่องรูปหลัก 346px) */
  position: relative;
  left: 50%;
  transform: translateX(-50%);
  margin-top: 40px;
}

/* กัน viewport โดนยืด/บีบจาก flex */
.products-page .product-gallery .thumb-viewport{
  flex: 0 0 auto;
}

/* ==============================
   ✅ UNIFY CROP: รูปใหญ่ + รูปเล็ก
   ============================== */
.products-page .product-gallery .main-img,
.products-page .product-gallery .thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  display: block;
}



/* ✅ FORCE: thumbnail ใช้ crop แบบเดียวกับรูปใหญ่ */
.products-page .product-detail-image.product-gallery .thumb-bar .thumb {
  width: var(--thumb, 104px) !important;
  height: auto !important;             /* สำคัญ */
  aspect-ratio: 1 / 1 !important;      /* สำคัญ */
  overflow: hidden !important;
  padding: 0 !important;
  border-radius: 0 !important;
}

.products-page .product-detail-image.product-gallery .thumb-bar .thumb img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  object-position: center center !important;
  display: block !important;
}



/* =========================================
   THUMB NAV (ใต้รูปสินค้า) — CIRCLE + GOLD HOVER
   ========================================= */

.products-page .product-gallery .thumb-nav,
.products-page .thumb-nav{
  width: var(--nav, 40px) !important;
  height: var(--nav, 40px) !important;

  border-radius: 50% !important;     /* ✅ วงกลม */
  background: #e5e5e5 !important;    /* ✅ ปุ่มสีเทา */
  border: none !important;

  color: #000 !important;            /* ✅ ลูกศรสีดำ */
  font-size: 20px;
  font-weight: 700;
  line-height: 1;

  display: flex;
  align-items: center;
  justify-content: center;

  cursor: pointer;
  transition: background-color .22s ease, color .22s ease, transform .18s ease;
}

.products-page .product-gallery .thumb-nav:hover,
.products-page .thumb-nav:hover{
  background: #C2B23D !important;    /* ✅ hover สีทอง */
  color: #fff !important;            /* ✅ ลูกศรสีขาว */
  transform: scale(1.06);
}

.products-page .product-gallery .thumb-nav:disabled,
.products-page .thumb-nav:disabled{
  opacity: 0.35;
  cursor: default;
  transform: none;
}
