/* ==================================================
   1) RESET + BASE
   ================================================== */

* {
  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;

  /* พื้นหลังเลื่อน */
  background-image: url("../img/page1home/home-behind-product.jpg");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
}

/* ปิดรูปพื้นหลังไม่ให้โผล่ในส่วนอื่น */
section,
header,
footer {
  background: #fff;
}

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

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

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

/* ==================================================
   PRODUCTS: STANDARD IMAGE SHADOW (ALL + DETAIL)
   - ทำให้เงารูป "รูปใหญ่หน้า detail" เท่ากับหน้า all
   - และให้ main-img ใน gallery ใช้เงาเดียวกันด้วย
   ================================================== */

:root{
  --product-img-shadow: 0 0px 15px 2px rgba(0, 0, 0, 0.3);
}

/* ==================================================
   2) FONT UTILITIES
   ================================================== */

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

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

/* ==================================================
   3) LAYOUT WRAPPERS
   ================================================== */

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

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

/* ==================================================
   4) HEADER + NAV
   ================================================== */

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 {
  margin: 0 auto;
  width: fit-content;
}

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

nav a {
  padding-bottom: 4px;
}

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

/* ==================================================
   5) BANNER (STATIC)
   ================================================== */

.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 option */
.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;
}

/* Banner text animation chars */
.banner-text span.char {
  opacity: 0;
  filter: blur(14px);
  display: inline-block;
  transition: opacity 1.1s ease, filter 1.1s ease;
}

.banner-text span.char.show {
  opacity: 1;
  filter: blur(0);
}

/* ==================================================
   6) SECTIONS + TITLES
   ================================================== */

.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%);
}

.section-title-wrapper {
  position: relative;
  text-align: center;
  margin-bottom: 25px;
}

.section-title-wrapper .view-btn {
  position: absolute;
  right: 0;
  top: 0;
}

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

.section-large {
  padding-top: 42px !important;
  padding-bottom: 60px !important;
}

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

.home-info h1.section-title.with-line{
  text-align: left;
  font-weight: 700;
}

.home-info .text-image-row .lock-lines{
  font-size: 18px;
  margin-bottom: 15px;
}

.home-products .products-title{
  font-weight: 800;
  font-size: 30px;
}

.customers-section .customers-title{
  font-weight: 800;
  font-size: 30px;
}

.about-info .about-title{
  text-align: left;
  font-weight: 800;
  font-size: 30px;
  letter-spacing: 0.3px;
}

.about-info .about-text{
  font-size: 16px;
  text-align: justify;
}

/* พื้นหลังสีเทาอ่อน */
.about2-info{
  background: #EFEFEF;
}

/* หัวข้อ */
.about2-info .about2-title{
  text-align: left;
  font-weight: 800;
  font-size: 30px;
  letter-spacing: 0.3px;
}

/* ข้อความพันธกิจ */
.about2-info .about2-text{
  font-size: 18px;
  text-align: center;
  font-weight: 600;
  letter-spacing: 0.2px;
}

/* ==================================================
   7) LAYOUT: TEXT + IMAGE ROW (GENERAL)
   ================================================== */

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

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

.text-image-row > div:first-child {
  flex: 1;
  max-width: 520px;
  margin-top: -20px;
}

.text-image-row > div:last-child {
  flex: 1;
  min-width: 550px;
}

.text-image-row > div:last-child img {
  width: 950px;
  height: 380px;
  max-width: none;
  object-fit: cover;
  display: block;
  box-shadow: var(--product-img-shadow);
  margin-bottom: 10px;
}

/* ==================================================
   8) ABOUT PAGE ROWS
   ================================================== */

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

.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 {
  height: 380px;
  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;
  flex: 0 0 670px;
  max-width: 670px;
  margin-top: 40px;
}

.about-row > div:last-child {
  flex: 1;
  margin-left: 20px;
  margin-top: -10px;
}

.about-row p:not(.lock-lines) {
  white-space: normal;
}

.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 img {
  max-width: none;
  box-shadow: var(--product-img-shadow);
}

.about-row:not(.about-reverse) h2.section-title.with-line {
  margin-bottom: 4px;
}

.about-row:not(.about-reverse) p.lock-lines,
.about-row.about-reverse p.lock-lines {
  margin-top: 0;
}

.about-row.about-reverse h2.section-title.with-line-center {
  margin-bottom: 0px;
}

/* ==================================================
   9) BUTTONS
   ================================================== */

.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;
}

/* ==================================================
   10) PRODUCTS GRID (HOME + PRODUCTS)
   ================================================== */

.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;
}

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

.product-card h3,
.product-card h4 {
  margin-top: 35px;
  font-size: 18px;
  text-align: center;
}

.product-card h4 {
  font-weight: 600;
}

/* ✅ ใหม่: ให้รูป “เต็มคอลัมน์จริง” = ชิดขอบซ้าย/ขวาตามกริด */
.products-grid .product-card img {
  width: 100%;
  max-width: none;      /* สำคัญ: ตัด max-width เดิม */
  aspect-ratio: 1 / 1;  /* คงไว้เพื่อให้เป็นจตุรัส */
  object-fit: cover;
  object-position: center center; /* ✅ เพิ่ม: ให้ครอปตรงกลางเหมือนกัน */
  display: block;
  margin: 0;            /* สำคัญ: ตัด margin:0 auto เดิม */
  box-shadow: var(--product-img-shadow);
  transition: transform 0.35s ease, filter 0.35s ease, box-shadow 0.35s ease;
  will-change: transform, filter;
}

.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;
}

/* ==================================================
   11) PRODUCTS PAGE: TABS + DETAIL
   ================================================== */

/* คุณตั้ง gap หน้า products ไว้แล้ว */
.products-page .products-grid {
  gap: 60px !important;
}

/* tabs กว้างตามที่คุณตั้ง */
.products-page .product-tabs {
  max-width: 1280px !important;
  margin-left: auto !important;
  margin-right: auto !important;
  padding: 0 !important;
}

.product-tabs {
  width: 100%;
  max-width: 1160px;
  padding: 0 15px;
  margin: 40px auto 30px;
  display: flex;
  justify-content: space-between;
  gap: 0;
  border-collapse: collapse;
}

.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.is-active {
  background: #C2B23D;
  color: #fff;
}

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

#product-list {
  width: 100%;
  max-width: 1280px; /* ✅ ให้ ALL ไม่ถูกบีบ */
  padding: 0;
  margin: 80px auto 0;
}

/* ✅ ใหม่: ให้กรอบ detail เท่ากับกรอบหน้า All (1280) */
.product-detail {
  display: flex;
  gap: 80px;
  align-items: flex-start;
  width: 100%;
  max-width: 1280px;   /* ✅ จาก 1160 -> 1280 */
  padding: 0;
  margin: 80px auto 80px;
}

/* ---------- คำนวณ “ความกว้างรูปให้เท่าหน้า ALL” ---------- */
.products-page {
  --rt-grid-gap: 60px;
  --rt-card: calc(((1280px - 30px) - (var(--rt-grid-gap) * 2)) / 3);
}

/* ✅ ใหม่: หน้า ALL ให้ใช้ขนาดจริงจาก grid (จตุรัสแน่นอน แต่ไม่ผูกกับตัวแปร) */
.products-page .product-card img {
  width: 100% !important;
  height: auto !important;
  aspect-ratio: 1 / 1 !important;
  object-fit: cover !important;
  object-position: center center !important;
  display: block;
}

.product-detail-image {
  flex: 0 0 var(--rt-card);
  max-width: var(--rt-card);
}

.product-image-square {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  display: block;
}

/* ✅ ใหม่: ให้ detail ใช้กฎเดียวกับ ALL = aspect-ratio + เงามาตรฐาน */
.product-detail-image img {
  width: 100% !important;
  height: auto !important;
  aspect-ratio: 1 / 1 !important;
  object-fit: cover !important;
  object-position: center center !important;
  display: block;
  box-shadow: var(--product-img-shadow);
}

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

.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;
  flex-shrink: 0;
}

.products-page .product-detail-info{
  padding-left: 14px; /* ลอง 10-18px ได้ ตามที่ชอบ */
}

/* ให้ความกว้าง bar + list เท่ากัน */
.products-page .product-tabs,
.products-page #product-list,
.products-page .product-detail {
  max-width: 1280px;
}

.products-page .tab-btn {
  padding: 12px 18px;
  font-size: 20px;
  line-height: 1.15;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 56px;
  text-align: center;
  white-space: normal;
}

/* ✅ ให้ DETAIL ชิดขอบเหมือน ALL (ตัด padding container ออก) */
.products-page .product-detail,
.products-page #product-list,
.products-page .product-tabs {
  max-width: 1280px;
  padding-left: 0 !important;
  padding-right: 0 !important;
  margin-left: auto;
  margin-right: auto;
}

/* ==================================================
   12) CUSTOMERS LOGOS
   ================================================== */

.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 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; }

/* ==================================================
   13) 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;
}

footer .footer-inner .footer-address{
  font-size: 18px;
  line-height: 2;
}

.footer-inner > div:last-child {
  margin-top: 12px;
}

.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;
}

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;
}

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

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

.contact-row img {
  margin-right: 15px;
}

.contact-icon-black{
  filter: brightness(0) invert(0);
}

.contact-align .contact-info-title{
  text-align: left;
  font-weight: 700;
  font-size: 30px;
}

.contact-align .contact-info-list{
  margin-top: 40px;
}

.contact-align .contact-row.contact-info-item{
  font-size: 22px;
  margin-bottom: 30px;
  align-items: center;
}

.contact-align .contact-row.contact-info-item a{
  color: inherit;
  text-decoration: none;
}

.contact-align .contact-row.contact-info-item a:hover{
  text-decoration: underline;
}

/* ==================================================
   14) banner-slider (BANNER banner-slider)
   ================================================== */

.banner-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.is-active {
  opacity: 1;
}

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

.banner-slider button.prev,
.banner-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;
}

.banner-slider button.prev {
  left: 20px;
  transform: translate(-20px, -50%);
}

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

.banner.banner-slider:hover button.prev,
.banner.banner-slider:hover button.next {
  opacity: 1;
  pointer-events: auto;
  transform: translate(0, -50%);
}

.banner.banner-slider:hover button.prev:hover,
.banner.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);
}

.hidden {
  display: none;
}

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

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

/* ==================================================
   15) PRODUCT DETAIL: COLOR DOTS
   ================================================== */

.color-show {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: 0px;
  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: #f9154b; }
.dot.yellow { background: #ffe600; }
.dot.blue { background: #00a4ff; }
.dot.green { background: #19a84d; }

.color-text {
  font-size: 14px;
  font-weight: 400;
  margin-left: 6px;
  pointer-events: none;
}

.products-page .product-detail-info .color-show,
.products-page .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;
  flex-shrink: 0;
}

/* ==================================================
   16) NAV DROPDOWN (PRODUCTS)
   ================================================== */

nav ul li.nav-dropdown {
  position: relative;
}

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;
}

nav ul li.nav-dropdown:hover > a::after {
  color: #aaa;
  opacity: 1;
}

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;
  overflow: hidden;
  display: block !important;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease;
  z-index: 999;
}

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

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;
}

nav ul li.nav-dropdown .dropdown-menu li:hover {
  background: rgba(194, 178, 61, 0.12);
}

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;
}

nav ul li.nav-dropdown .dropdown-menu li a:hover,
nav ul li.nav-dropdown .dropdown-menu li a.is-active {
  border-bottom: none !important;
}

/* ==================================================
   17) PRODUCTS BACKGROUND 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);
}

/* ==================================================
   18) PRODUCT GALLERY THUMBNAILS (FINAL OVERRIDES)
   ================================================== */

.products-page .product-detail-image.product-gallery {
  position: relative;
  overflow: visible;
}

.products-page .product-gallery {
  /* --- เดิมคุณมีคอมเม้นค้าง: --main: 346px; --- */
  /* ✅ ใหม่: ให้ main image ของ gallery ใช้ขนาดเดียวกับ detail/หน้า all */
  --main: var(--rt-col);

  --thumb: 104px;
  --gap: 14px;
  --nav: 40px;
  --visible: 4;
  --extra: 140px;
}

.products-page .product-gallery .thumb-bar {
  display: flex;
  align-items: center;
  gap: var(--gap);
  justify-content: center;
  margin-left: 0 !important;
  margin-right: 0 !important;
  position: relative;
  left: 50%;
  transform: translateX(-50%);
  margin-top: 40px;
  width: calc(
    (var(--nav) * 2) +
    (var(--thumb) * var(--visible)) +
    (var(--gap) * (var(--visible) - 1)) +
    (var(--gap) * 2)
  );
}

.products-page .product-gallery .thumb-viewport {
  overflow: hidden;
  width: calc((var(--thumb) * var(--visible)) + (var(--gap) * (var(--visible) - 1)));
  flex: 0 0 auto;
}

.products-page .product-gallery .thumb-track {
  display: flex;
  gap: var(--gap);
  transition: transform 0.25s ease;
  will-change: transform;
}

/* ✅ ใหม่: main image ใน gallery เท่านั้น (จตุรัสแบบไม่คำนวณ) */
.products-page .product-gallery .main-img {
  width: 100% !important;
  height: auto !important;
  aspect-ratio: 1 / 1 !important;
  object-fit: cover !important;
  object-position: center center !important;
  display: block;
  box-shadow: var(--product-img-shadow); /* ✅ เพิ่ม: ให้เงาเท่าหน้า ALL/DETAIL */
}

/* thumb (คงเดิม) */
.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;
  object-position: center center; /* ✅ เพิ่ม: ให้ thumb ครอปกลางด้วย */
  display: block;
}

.products-page .thumb.is-active {
  border-color: #C2B23D;
  border-width: 3px;
  box-sizing: border-box;
}

.product-gallery .thumb {
  border-radius: 0 !important;
  overflow: hidden;
  border: 1px solid #ddd;
}

.product-gallery .thumb img {
  border-radius: 0 !important;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  display: block;
}

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

/* ✅ ใหม่: แยกกฎให้ชัด (main-img ถูกควบคุมด้วย var(--rt-col) ด้านบนแล้ว) */
.products-page .product-gallery .thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  display: block;
}

.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;
}

.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 0.22s ease, color 0.22s ease, transform 0.18s ease;
}

.products-page .product-gallery .thumb-nav:hover,
.products-page .thumb-nav:hover {
  background: #C2B23D !important;
  color: #fff !important;
}

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

/* ==================================================
   19) MAP / CONTACT ALIGN
   ================================================== */

.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;
}

.contact-align {
  width: 900px;
  margin: 0 auto 80px;
}

/* ==================================================
   20) RESPONSIVE
   ================================================== */

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

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

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

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

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

  .text-image-row > div:last-child {
    min-width: 0;
  }

  .text-image-row > div:last-child img {
    width: 100%;
    max-width: 100%;
    height: auto;
  }
}

/* ซ่อน/โชว์ */
.hidden { display: none !important; }

/* special เป็นกริดเหมือน all อยู่แล้วเพราะใช้ .products-grid เหมือนกัน */

/* รูปล้วน (ไม่คลิก) */
.products-grid--static .product-static {
  pointer-events: none; /* กันคลิกทั้งกล่อง */
}

.products-grid--static .product-static img {
  pointer-events: none; /* กันคลิกที่รูปซ้ำอีกชั้น */
}

.products-grid--static .product-static {
  padding-bottom: 60px;
}

.products-grid--static {
  pointer-events: none;
}

/* ให้รูปใน special (product-static) มีขนาด/ทรงเดียวกับหน้า ALL */
.products-grid .product-static img {
  width: 100%;
  max-width: 530px;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  display: block;
  margin: 0 auto;
}

.products-grid .product-static img {
  box-shadow: 0 0px 15px 2px rgba(0, 0, 0, 0.3);
}

.products-grid .product-static {
  padding-bottom: 60px;
}

.product-tabs {
  margin-bottom: 80px;
}

/* ==================================================
   INSIGHTS (FINAL CLEAN)
   ================================================== */

/* สลับพื้น ขาว/เทา */
.insight1-info,
.insight3-info { background: #ffffff; }

.insight2-info,
.insight4-info { background: #f2f2f2; }

/* ให้ section ของ insights ไม่ไปเพิ่ม padding ซ้อนกับกฎ section กลาง */
.insight1-info .container,
.insight2-info .container,
.insight3-info .container,
.insight4-info .container {
  padding-top: 0;
  padding-bottom: 0;
}

/* section 1 ใหญ่กว่า about นิดเดียวพอ */
.insight1-big{
  padding-top: 10px;
  padding-bottom: 10px;
}

/* โครงวงกลม */
.insight-split{
  position: relative;
  width: 100%;
  min-height: auto;
  display: block;
  overflow: visible;
}

.insight-split__inner{ width: 100%; }

.insight-circle{
  position: absolute;
  top: 50%;
  width: 380px;
  height: 380px;
  border-radius: 50%;
  overflow: hidden;
}

.insight-circle img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ตำแหน่งสุดท้าย = โผล่ครึ่งวง */
.insight-split--left  .insight-circle { left: 0;  transform: translate(-50%, -50%); }
.insight-split--right .insight-circle { right: 0; transform: translate( 50%, -50%); }

/* start state */
.insights-page .insight-split--left  .insight-circle { transform: translate(-120%, -50%); }
.insights-page .insight-split--right .insight-circle { transform: translate( 120%, -50%); }

/* animate */
.insights-page.is-animate .insight-circle { transition: transform 900ms ease; }
.insights-page.is-animate .insight-split--left  .insight-circle { transform: translate(-50%, -50%); }
.insights-page.is-animate .insight-split--right .insight-circle { transform: translate( 50%, -50%); }

/* responsive */
@media (max-width: 900px){
  .insight-circle{ width: 260px; height: 260px; }
}

/* กัน scroll แนวนอน แต่ให้ล้นได้ */
.page-wrapper{ overflow-x: hidden; }

/* =========================
   INSIGHTS: content blocks
   ========================= */

.insight-content {
  max-width: 820px; /* ปรับได้ ถ้าอยากให้บรรทัดไม่ยาวเกิน */
}

/* 1) Title */
.insight-title {
  text-align: left;
  font-weight: 800;
  font-size: 28px;       /* อยากเท่า about title ปรับเป็น 30px */
  letter-spacing: 0.2px;
  margin: 0 0 18px;      /* ระยะใต้ title = แยกจากก้อน 1 */
}

/* กล่องรวมของ 3 ก้อน */
.insight-points {
  display: grid;
  gap: 18px;             /* ระยะห่างระหว่างก้อน 1-2-3 (สำคัญ) */
}

/* 2-4) ก้อนเนื้อหา */
.insight-point {
  position: relative;
  padding-left: 22px;    /* เว้นที่ให้สัญลักษณ์ทอง */
  line-height: 1.8;
  font-size: 16px;
  text-align: justify;
}

/* สัญลักษณ์สีทองนำหน้า (สามเหลี่ยม/ลูกศรแบบในรูป) */
.insight-point::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;           /* จูนตำแหน่งให้พอดีกับบรรทัดแรก */
  transform: translateY(-50%);
  width: 0;
  height: 0;
  border-left: 10px solid #C2B23D;
  border-top: 7px solid transparent;
  border-bottom: 7px solid transparent;
}

/* ===== INSIGHT CONTENT ===== */

.insight-content {
  max-width: 820px;
}

/* title */
.insight-title {
  font-size: 26px;
  font-weight: 800;
  text-align: left;
  margin-bottom: 22px; /* แยก title กับก้อนชัด */
}

/* กล่องรวมก้อน */
.insight-points {
  display: flex;
  flex-direction: column;
  gap: 18px; /* ระยะห่างระหว่างก้อน */
}

/* ก้อนเนื้อหา */
.insight-point {
  position: relative;
  padding-left: 24px;  /* เว้นที่ให้สัญลักษณ์ทอง */
  font-size: 16px;
  line-height: 1.8;
  text-align: justify;
}

/* สัญลักษณ์สีทอง */
.insight-point::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  transform: translateY(-50%);
  width: 0;
  height: 0;
  border-left: 10px solid #C2B23D;
  border-top: 7px solid transparent;
  border-bottom: 7px solid transparent;
}

.insight-point.is-indent {
  margin-left: -22px; /* เยื้องไปทางซ้าย */
}

.insight-point.manual-break {
  white-space: normal;
}

/* ให้ข้อความกินพื้นที่ได้ยาวขึ้น */
.insight2-info .insight-content{
  max-width: 900px;            /* เอา 820px ออก */
  width: 100%;
}

/* เว้นที่ให้วงกลมฝั่งขวา (section --right) */
.insight2-info.insight-split--right .insight-content{
  padding-right: 200px;       /* ปรับตามขนาดวงกลม/ตำแหน่งจริง */
}

/* ถ้าวงกลมอยู่ฝั่งซ้าย (เผื่อ section อื่น) */
.insight-split--left .insight-content{
  padding-left: 240px;
}

.insight2-info .insight-content{
  box-sizing: border-box;
}

.insight-circle {
  width: 520px;
  height: 520px;
}

.insight-circle {
  top: 45%;                 /* เดิม 50% */
}

.insight-split--right .insight-content {
  padding-right: 320px;   /* เดิม ~240px */
}

.insight-split--left .insight-content {
  padding-left: 320px;
}

.about-info .about-title{
  text-align: left;
  font-weight: 800;
  font-size: 30px;
  letter-spacing: 0.3px;
}

.insight-table {
    margin-top: 50px;
    position: center;
}

.q1 {
    margin-top: 50px;
}

/* ==================================================
   PRODUCTS: แยก scrollbar ออกจากรูปเล็ก (FIX จริง)
   ================================================== */

/* 1) เพิ่มพื้นที่ใต้รูปเล็ก เพื่อดัน scrollbar ลง */
.products-page .product-gallery .thumb-viewport{
  padding-bottom: 18px;          /* 🔥 ระยะห่างรูป ↔ scrollbar */
  box-sizing: content-box;       /* สำคัญ: ไม่ให้ padding ไปบีบความกว้าง */
}

/* 2) ปรับความสูง scrollbar ให้ดูสุภาพ */
.products-page .product-gallery .thumb-viewport::-webkit-scrollbar{
  height: 8px;                   /* ความหนาบาร์ */
}

/* 3) สี scrollbar (โทนเดิม แต่อ่อน) */
.products-page .product-gallery .thumb-viewport::-webkit-scrollbar-track{
  background: #f2f2f2;
  border-radius: 10px;
}

.products-page .product-gallery .thumb-viewport::-webkit-scrollbar-thumb{
  background: #cfcfcf;            /* ก่อน hover อ่อน */
  border-radius: 10px;
}

/* 4) hover เป็นสีทอง */
.products-page .product-gallery .thumb-viewport::-webkit-scrollbar-thumb:hover{
  background: #C2B23D;
}

/* ==================================================
   PRODUCTS: ทำลูกศรอยู่กึ่งกลางรูปเล็ก + disabled เป็นเทา/กดไม่ได้
   ================================================== */

/* 1) ให้จัดองค์ประกอบชิดบน เพื่อไม่ให้ลูกศรโดนกึ่งกลางรวม scrollbar */
.products-page .product-gallery .thumb-bar{
  align-items: flex-start !important;
}

/* 2) จัดตำแหน่งลูกศรให้อยู่ "กึ่งกลางแนวตั้ง" ของรูปเล็ก (ไม่สน scrollbar) */
.products-page .product-gallery .thumb-nav{
  margin-top: calc((var(--thumb, 104px) - var(--nav, 40px)) / 2) !important;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* 3) สถานะ disabled: เป็นสีเทา + กดไม่ได้จริง */
.products-page .product-gallery .thumb-nav:disabled{
  background: #efefef !important;
  color: #9a9a9a !important;
  opacity: 1 !important;              /* ไม่ให้จางแบบมั่วๆ แต่ดูเป็น disabled ชัด */
  cursor: not-allowed !important;
  pointer-events: none !important;
  box-shadow: none !important;
  transform: none !important;
}

/* 4) กัน hover ไปติดตอน disabled */
.products-page .product-gallery .thumb-nav:disabled:hover{
  background: #efefef !important;
  color: #9a9a9a !important;
}

/* ดึงการ์ด "ถุงพิมพ์และถุงขยะ" ให้ชิดขึ้น (สวน grid gap) */
.products-page
#product-list
.product-card[data-target="special"] {
  margin-top: -60px; /* ลอง -20 / -40 ได้ */
}


/* ==============================
   INNER PAGES: AUTO BANNER ONLY
   (no buttons, no click)
   ============================== */

.banner-auto { position: relative; height: 380px; overflow: hidden; }
.banner-auto .slides { width: 100%; height: 100%; position: relative; }
.banner-auto .slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 3s ease-in-out;
  pointer-events: none; /* กันคลิก */
}
.banner-auto .slide.is-active { opacity: 1; }
.banner-auto .slide img { width: 100%; height: 100%; object-fit: cover; }
.banner-auto .banner-text { pointer-events: none; } /* กันคลิกที่ข้อความด้วย */


/* ==================================================
   INSIGHTS: FINAL OVERRIDE (DROP-IN)
   - วาง "ท้ายสุด" ของ style.css เพื่อทับของเดิม
   - ไม่ลบโค้ดเดิมของคุณ
   ================================================== */

/* 0) กัน horizontal scroll เพราะวงกลมล้นขอบ */
.insights-page .page-wrapper{
  overflow-x: hidden;
}

/* 1) กัน about-row margin-left 240px มาทำลายหน้า insights */
.insights-page .about-row{
  margin-left: auto !important;
  margin-right: auto !important;
  justify-content: flex-start !important;
}

/* 2) โครง section split */
.insights-page .insight-split{
  position: relative;
  overflow: visible;
}

/* 3) วงกลมใหญ่ + ล้นขอบบนล่างนิดหน่อย (เหมือนภาพ) */
.insights-page .insight-circle{
  position: absolute;
  top: 50%;
  width: 520px;
  height: 520px;
  border-radius: 50%;
  overflow: hidden;
  transform: translateY(-50%);
}

.insights-page .insight-circle img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* วงกลมโผล่ครึ่งวงซ้าย/ขวา */
.insights-page .insight-split--left  .insight-circle{
  left: 0;
  transform: translate(-50%, -50%);
}
.insights-page .insight-split--right .insight-circle{
  right: 0;
  transform: translate(50%, -50%);
}

/* 4) Content ต้อง “ยาวเต็มพื้นที่” แล้วเว้นช่องให้วงกลม */
.insights-page .insight-content{
  max-width: none !important;
  width: 100%;
  box-sizing: border-box;
}

/* เว้นที่ให้วงกลม (ฝั่งขวา / ฝั่งซ้าย) */
.insights-page .insight-split--right .insight-content{
  padding-right: 360px; /* ปรับ 320-380 ได้ ถ้าอยากชิด/ห่าง */
}
.insights-page .insight-split--left .insight-content{
  padding-left: 360px;  /* ปรับ 320-380 ได้ */
}

/* 5) Title + ก้อนข้อความ (ให้ฟีลตามภาพ) */
.insights-page .insight-title{
  font-size: 26px;
  font-weight: 800;
  text-align: left;
  margin: 0 0 22px;
}

.insights-page .insight-points{
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.insights-page .insight-point{
  position: relative;
  padding-left: 24px;
  font-size: 16px;
  line-height: 1.8;
  text-align: justify;
  white-space: normal;
}

.insights-page .insight-point::before{
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  transform: translateY(-50%);
  width: 0;
  height: 0;
  border-left: 10px solid #C2B23D;
  border-top: 7px solid transparent;
  border-bottom: 7px solid transparent;
}

/* ก้อน 2 เยื้องซ้ายเล็กน้อยแบบในภาพ */
.insights-page .insight-point.is-indent{
  margin-left: -22px;
}

/* 6) ปรับระยะ table + คำถาม */
.insights-page .insight-table{
  margin-top: 50px;
}

.insights-page .q1{
  margin-top: 50px;
}

/* 7) Responsive: ลดวงกลม + ลด padding กันชน */
@media (max-width: 900px){
  .insights-page .insight-circle{
    width: 260px;
    height: 260px;
  }
  .insights-page .insight-split--right .insight-content{
    padding-right: 180px;
  }
  .insights-page .insight-split--left .insight-content{
    padding-left: 180px;
  }
}


/* ==================================================
   INSIGHTS: CIRCLE -> OVAL (peek a bit, overflow top/bottom)
   วางท้ายสุดของ style.css
   ================================================== */

/* 1) ทำวงเป็น “วงรีนิดๆ” + ใหญ่ขึ้น */
.insights-page .insight-circle{
  width: 560px;         /* เพิ่มขนาด */
  height: 520px;        /* สูงใกล้เคียง = รีเล็กน้อย */
  border-radius: 999px; /* วงรีนุ่มๆ */
  top: 50%;
}

/* 2) ไม่เอาครึ่งวงแล้ว: ให้โผล่มา “นิดนึง” */
.insights-page .insight-split--right .insight-circle{
  right: 0;
  transform: translate(22%, -50%);   /* จาก 50% -> 22% = โผล่มานิดเดียว */
}

.insights-page .insight-split--left .insight-circle{
  left: 0;
  transform: translate(-22%, -50%);  /* จาก -50% -> -22% */
}

/* 3) ทำให้ “ล้นบน-ล่าง” โดยให้ section เตี้ยกว่าวงนิดนึง */
.insights-page .insight-split{
  min-height: 460px;  /* ต่ำกว่า height วง (520) -> ล้นบน/ล่างแน่ */
}

/* 4) เว้นพื้นที่ด้านข้างให้พอดีกับวงที่ใหญ่ขึ้น */
.insights-page .insight-split--right .insight-content{
  padding-right: 380px;  /* ปรับตามวงที่ใหญ่ขึ้น */
}

.insights-page .insight-split--left .insight-content{
  padding-left: 380px;
}

/* 5) Responsive: ลดวง + ลดการโผล่ */
@media (max-width: 900px){
  .insights-page .insight-circle{
    width: 300px;
    height: 280px;
  }
  .insights-page .insight-split{
    min-height: 360px;
  }
  .insights-page .insight-split--right .insight-circle{
    transform: translate(16%, -50%);
  }
  .insights-page .insight-split--left .insight-circle{
    transform: translate(-16%, -50%);
  }
  .insights-page .insight-split--right .insight-content{
    padding-right: 200px;
  }
  .insights-page .insight-split--left .insight-content{
    padding-left: 200px;
  }
}

/* ==================================================
   INSIGHTS: OVAL HORIZONTAL + REAL OVERFLOW
   (ล้นบน-ล่างจริง / รีแนวนอน)
   ================================================== */

/* 1) บังคับให้ section เตี้ยกว่าวง -> ต้องล้น */
.insights-page .insight-split{
  position: relative;
  min-height: 420px;   /* เตี้ยกว่าวงแน่นอน */
  overflow: visible;
}

/* 2) วงรีแนวนอน (กว้างกว่าสูง) */
.insights-page .insight-circle{
  position: absolute;
  width: 620px;        /* กว้าง */
  height: 440px;       /* เตี้ยกว่า = รีแนวนอน */
  border-radius: 999px;
  overflow: hidden;

  /* 🔥 จุดสำคัญ: ดันวงขึ้น */
  top: -60px;          /* ← ล้นบนจริง */
}

/* 3) โผล่จากขอบ "นิดเดียว" ไม่ครึ่งวง */
.insights-page .insight-split--right .insight-circle{
  right: 0;
  transform: translateX(20%);
}

.insights-page .insight-split--left .insight-circle{
  left: 0;
  transform: translateX(-20%);
}

/* 4) เว้นพื้นที่เนื้อหาให้พอดีกับวง */
.insights-page .insight-split--right .insight-content{
  padding-right: 400px;
}

.insights-page .insight-split--left .insight-content{
  padding-left: 400px;
}

/* 5) responsive */
@media (max-width: 900px){
  .insights-page .insight-circle{
    width: 360px;
    height: 260px;
    top: -40px;
  }

  .insights-page .insight-split--right .insight-circle{
    transform: translateX(14%);
  }
  .insights-page .insight-split--left .insight-circle{
    transform: translateX(-14%);
  }

  .insights-page .insight-split--right .insight-content{
    padding-right: 220px;
  }
  .insights-page .insight-split--left .insight-content{
    padding-left: 220px;
  }
}


/* ==================================================
   INSIGHTS: OVAL CROPPED BY SECTION (CORRECT LOGIC)
   - วงรีแนวนอน
   - ไม่มีขอบ
   - ถูกตัดโดย "section"
   ================================================== */

/* 1) ให้ section เป็นตัวตัด */
.insights-page .insight2-info,
.insights-page .insight3-info,
.insights-page .insight4-info{
  position: relative;
  overflow: hidden;        /* ⭐ ตัวตัดคือ section */
  padding-top: 60px;
  padding-bottom: 60px;
}

/* 2) โครง split */
.insights-page .insight-split{
  position: relative;
}

/* 3) วงรีแนวนอน (ใหญ่กว่า section แน่นอน) */
.insights-page .insight-circle{
  position: absolute;
  top: 50%;
  transform: translateY(-50%);

  width: 720px;        /* กว้าง */
  height: 520px;       /* สูงกว่า section → ต้องถูกตัด */
  border-radius: 999px;

  overflow: hidden;    /* ตัดรูปให้อยู่ในทรงวงรี */
  background: transparent;
  z-index: 1;
}

/* รูป */
.insights-page .insight-circle img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* 4) วางชิดขอบ แต่ไม่ดันออกจอ */
.insights-page .insight-split--right .insight-circle{
  right: -160px;   /* ขยับออกนิดเดียว */
}

.insights-page .insight-split--left .insight-circle{
  left: -160px;
}

/* 5) เว้นพื้นที่ให้เนื้อหา */
.insights-page .insight-split--right .insight-content{
  padding-right: 420px;
  position: relative;
  z-index: 2;
}

.insights-page .insight-split--left .insight-content{
  padding-left: 420px;
  position: relative;
  z-index: 2;
}

/* responsive */
@media (max-width: 900px){
  .insights-page .insight-circle{
    width: 420px;
    height: 320px;
  }

  .insights-page .insight-split--right .insight-circle{
    right: -120px;
  }

  .insights-page .insight-split--left .insight-circle{
    left: -120px;
  }

  .insights-page .insight-split--right .insight-content{
    padding-right: 240px;
  }

  .insights-page .insight-split--left .insight-content{
    padding-left: 240px;
  }
}



/* เพิ่มพื้นที่ล่างให้ภาพตาราง */
.insight-table{
  margin-bottom: 80px;   /* ลอง 60 / 80 / 100 ได้ */
}

/* ===== Q1 GOLD: CENTER PERFECT ===== */
.q1bg{
  background: #C2B23D;
  padding-top: 0 !important;
  padding-bottom: 0 !important;

  min-height: 100px;              /* ปรับความสูงแถบทองได้ */
  display: flex;
  align-items: center;            /* กลางแนวตั้ง */
}

.q1bg .container{
  width: 100%;
}

/* ตัด margin เดิมที่ทำให้ดูไม่กลาง */
.q1bg .section-title,
.q1bg .q1{
  margin: 0 !important;
  padding: 0 !important;
  color: #fff;
}

/* ==================================================
   INSIGHT 2: TEXT WIDTH FIX (DROP-IN FINAL)
   วางท้ายสุดของ style.css
   ================================================== */

/* 1) คืนพื้นที่ให้ข้อความ (หยุดโดนบีบ) */
.insights-page .insight2-info .insight-content{
  max-width: none !important;   /* ไม่ล็อค 820/900 อีก */
  width: 100% !important;
}

/* 2) ให้กันวงรีแบบ “ชัวร์” เฉพาะ section 2 ฝั่งขวา */
.insights-page .insight2-info.insight-split--right .insight-content{
  padding-right: 260px !important;  /* 🔥 ปรับ 240-300 ได้ */
}

/* 3) ปิดตัวที่ชอบมาทับแบบกว้างเกิน (เฉพาะ insight2) */
.insights-page .insight2-info.insight-split--right .insight-content{
  margin-right: 0 !important;
}

/* 4) คุมการตัดคำ/justify ให้ดูไม่เหมือน “ตัดประโยค” */
.insights-page .insight2-info .insight-point{
  text-align: justify;
  word-break: normal;
  overflow-wrap: normal;     /* กันตัดคำมั่ว */
  hyphens: auto;
}

/* 5) ถ้าต้องการ “ฟิกบรรทัดตามที่คุณพิมพ์” ให้ใช้ manual-break จริง */
.insights-page .insight2-info .manual-break{
  white-space: pre-line;   /* ✅ เคารพขึ้นบรรทัดใหม่ใน HTML */
}

/* ==================================================
   INSIGHT 2: USE RIGHT SPACE + PREVENT OVERFLOW
   ================================================== */

/* กันพื้นที่ให้วงรีแบบพอดีขึ้น (ไม่เผื่อเยอะเกิน) */
.insights-page .insight2-info.insight-split--right .insight-content{
  padding-right: 180px !important;  /* 🔥 ลอง 160-220 ได้ */
}

/* กันคำยาวๆ (สูตร/อังกฤษ) ไม่ให้ดัน layout จนเหมือนล้น */
.insights-page .insight2-info .insight-point{
  overflow-wrap: anywhere;   /* ✅ สำคัญมาก */
  word-break: break-word;    /* กันคำยาว */
}

/* ==================================================
   INSIGHTS: ALIGN ALL LINES TO >
   ================================================== */

.insights-page .insight-point{
  padding-left: 0 !important;     /* ❌ ไม่เว้นที่ให้ลูกศร */
  text-indent: 22px;              /* ✔ ระยะจาก > ถึงตัวอักษร */
}

/* ลูกศร > */
.insights-page .insight-point::before{
  left: 0;                        /* อยู่ตำแหน่งเดียวกับบรรทัดอื่น */
}

/* ถ้ามีก้อนที่เยื้อง (is-indent) */
.insights-page .insight-point.is-indent{
  margin-left: -36px;             /* คุม hierarchy เท่าเดิม */
}



/* ==================================================
   INSIGHTS: FIX ARROW VERTICAL ALIGN (drop-in)
   ================================================== */

.insights-page .insight-point{
  position: relative; /* กันหลุด */
}

.insights-page .insight-point::before{
  top: 0;                    /* ไม่อิง em แล้ว */
  transform: none !important; /* ไม่ดันขึ้นครึ่งนึง */
  margin-top: 0.35em;        /* 🔥 จูนตรงนี้: 0.30–0.45em */
}

/* ==================================================
   INSIGHTS: MAKE SECTION 2-4 FOLLOW MANUAL LINE BREAKS
   วางท้ายสุดของ style.css
   ================================================== */

/* 1) ให้ manual-break เคารพการขึ้นบรรทัดใหม่ (ทุก section ที่มี .manual-break) */
.insights-page .insight-point.manual-break{
  white-space: pre-line !important;  /* ✅ ตามที่คุณกดขึ้นบรรทัด */
}

/* 2) กันคำยาว/อังกฤษ ไม่ให้ดันแตกเละ */
.insights-page .insight-point{
  overflow-wrap: anywhere;
  word-break: break-word;
}

/* 3) (ถ้ายังอยากคุมลูกศรให้ตรงบรรทัดแรกเหมือนที่เพิ่งแก้) */
.insights-page .insight-point::before{
  top: 0;
  transform: none !important;
  margin-top: 0.35em; /* ปรับ 0.30–0.45em ได้ */
}



/* ==================================================
   INSIGHTS: NO OVERFLOW (FINAL OVERRIDE)
   - ทำให้ section 2-4 ไม่ล้นเหมือน section 1
   - ใช้ margin กันวงรีแทน padding (กันล้น)
   วางท้ายสุดของ style.css
   ================================================== */

/* 0) กันหลุดแนวนอนทั้งหน้า (กันไว้ชัวร์) */
html, body { overflow-x: hidden; }

/* 1) ให้ section 2-4 เป็นตัวตัดวงรี (คุณมีแล้ว แต่ย้ำให้ชนะ) */
.insights-page .insight2-info,
.insights-page .insight3-info,
.insights-page .insight4-info{
  position: relative;
  overflow: hidden;
}

/* 2) content ห้ามโดน padding ซ้าย/ขวาแบบใหญ่ๆ (ตัวการล้น) */
.insights-page .insight-content{
  max-width: 100% !important;
  width: 100% !important;
  box-sizing: border-box;
  padding-left: 0 !important;
  padding-right: 0 !important;
}

/* 3) เว้นที่ให้วงรีด้วย "margin" แทน (ไม่ทำให้ล้น) */
.insights-page .insight-split--right .insight-content{
  margin-right: 210px !important;  /* ปรับ 220-320 ได้ */
}
.insights-page .insight-split--left .insight-content{
  margin-left: 210px !important;   /* ปรับ 220-320 ได้ */
}

/* 4) วงรีลอยทับ ไม่กินพื้นที่ layout */
.insights-page .insight-circle{
  position: absolute;
  top: 50% !important;
  transform: translateY(-50%) !important;
  z-index: 1;
}

/* 5) ขยับวงรีออกขอบ "นิดเดียว" (อย่า -160 เยอะเกิน) */
.insights-page .insight-split--right .insight-circle{
  right: -110px !important;   /* ปรับ -80 ถึง -140 ได้ */
}
.insights-page .insight-split--left .insight-circle{
  left: -110px !important;
}

/* 6) ให้ข้อความอยู่หน้าวงรีเสมอ */
.insights-page .insight-content{
  position: relative;
  z-index: 2;
}

/* 7) Responsive ลด margin กันวงรี */
@media (max-width: 900px){
  .insights-page .insight-split--right .insight-content{
    margin-right: 170px !important;
  }
  .insights-page .insight-split--left .insight-content{
    margin-left: 170px !important;
  }
  .insights-page .insight-split--right .insight-circle{
    right: -80px !important;
  }
  .insights-page .insight-split--left .insight-circle{
    left: -80px !important;
  }
}

/* ก้อน 2 (PP) เยื้องขวาแบบเลื่อนทั้งบล็อก */
.insights-page .insight-point.pp-indent-right{
  margin-left: 22px !important;   /* ✅ เลื่อนไปขวา (ปรับ 10-40 ได้) */
  margin-right: 0 !important;
}

/* กันไม่ให้กฎเดิม .is-indent ดึงกลับไปซ้าย */
.insights-page .insight-point.pp-indent-right.is-indent{
  margin-left: 22px !important;   /* ย้ำให้ชนะ */
}


/* ==================================================
   INSIGHTS: OVAL SHAPE (NO BORDER) - FINAL
   วางท้ายสุดของ style.css
   ================================================== */

.insights-page .insight-circle{
  /* ทรงรีนิดๆ */
  width: 720px;
  height: 560px;        /* สูงน้อยกว่ากว้าง = รีแนวนอน */
  border-radius: 50%;   /* สำคัญ: ทำให้เป็นวงรีอัตโนมัติ */
  overflow: hidden;

  /* ไม่มีขอบ/เงา */
  border: 0 !important;
  box-shadow: none !important;
  outline: 0 !important;
  background: transparent;

  /* คงตำแหน่งเดิมของคุณ */
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 1;
}

.insights-page .insight-circle img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ให้โผล่แบบ “นิดหน่อย” (ปรับเลขได้) */
.insights-page .insight-split--right .insight-circle{ right: -120px; }
.insights-page .insight-split--left  .insight-circle{ left:  -120px; }

/* เว้นที่ให้ข้อความไม่ชนวงรี */
.insights-page .insight-split--right .insight-content{ margin-right: 220px !important; }
.insights-page .insight-split--left  .insight-content{ margin-left:  220px !important; }

/* responsive */
@media (max-width: 900px){
  .insights-page .insight-circle{
    width: 420px;
    height: 330px;
  }
  .insights-page .insight-split--right .insight-circle{ right: -80px; }
  .insights-page .insight-split--left  .insight-circle{ left:  -80px; }
  .insights-page .insight-split--right .insight-content{ margin-right: 170px !important; }
  .insights-page .insight-split--left  .insight-content{ margin-left:  170px !important; }
}


/* ==================================================
   INSIGHTS: OVAL BIGGER + OVERFLOW OUTSIDE SECTION
   วางท้ายสุดของ style.css
   ================================================== */

/* 1) ให้ล้นออกนอก section ได้จริง */
.insights-page .insight2-info,
.insights-page .insight3-info,
.insights-page .insight4-info{
  overflow: visible !important;   /* ⭐ ทำให้วงเลยขอบ section ได้ */
  position: relative;
}

/* 2) วงรี "อ้วนขึ้น" + ดันขึ้นนิดให้ล้นบน-ล่าง */
.insights-page .insight-circle{
  width: 720px;
  height: 620px;                 /* ✅ อ้วนขึ้น (จาก 560 -> 620) */
  border-radius: 50%;
  overflow: hidden;

  border: 0 !important;
  box-shadow: none !important;
  background: transparent;

  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 1;
}

/* รูป */
.insights-page .insight-circle img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* 3) โผล่จากขอบนิดเดียว */
.insights-page .insight-split--right .insight-circle{ right: -120px; }
.insights-page .insight-split--left  .insight-circle{ left:  -120px; }

/* 4) กันไม่ให้ข้อความชนวง (ใช้ margin ไม่ทำให้ล้นจอ) */
.insights-page .insight-split--right .insight-content{ margin-right: 240px !important; }
.insights-page .insight-split--left  .insight-content{ margin-left:  240px !important; }

/* 5) กัน scroll แนวนอนทั้งหน้า เพราะวงล้น */
html, body{ overflow-x: hidden; }

/* responsive */
@media (max-width: 900px){
  .insights-page .insight-circle{
    width: 420px;
    height: 380px;               /* อ้วนขึ้นในมือถือด้วย */
  }
  .insights-page .insight-split--right .insight-circle{ right: -80px; }
  .insights-page .insight-split--left  .insight-circle{ left:  -80px; }
  .insights-page .insight-split--right .insight-content{ margin-right: 180px !important; }
  .insights-page .insight-split--left  .insight-content{ margin-left:  180px !important; }
}

/* ==================================================
   INSIGHTS: MOVE OVAL OUTWARD (TEXT SAFE)
   ================================================== */

/* 1) ดันวงออกจากเนื้อหาเพิ่ม */
.insights-page .insight-split--right .insight-circle{
  right: -180px !important;   /* เดิม -120 → ดันออกอีก */
}

.insights-page .insight-split--left .insight-circle{
  left: -180px !important;
}

/* 2) กันข้อความชนวง (ใช้ margin ไม่ทำให้ล้น) */
.insights-page .insight-split--right .insight-content{
  margin-right: 200px !important;   /* แค่พอไม่ชน */
}

.insights-page .insight-split--left .insight-content{
  margin-left: 200px !important;
}

/* 3) ข้อความต้องอยู่หน้าวงเสมอ */
.insights-page .insight-content{
  position: relative;
  z-index: 2;
}

.insights-page .insight-circle{
  z-index: 1;
}

/* 4) กัน scroll แนวนอน */
html, body{
  overflow-x: hidden;
}

/* responsive */
@media (max-width: 900px){
  .insights-page .insight-split--right .insight-circle{
    right: -110px !important;
  }
  .insights-page .insight-split--left .insight-circle{
    left: -110px !important;
  }

  .insights-page .insight-split--right .insight-content{
    margin-right: 150px !important;
  }
  .insights-page .insight-split--left .insight-content{
    margin-left: 150px !important;
  }
}

/* ==================================================
   INSIGHT 3 (PP): push oval further out + more text clearance
   ================================================== */

/* ดันวงออกไปอีก */
.insights-page .insight3-info.insight-split--left .insight-circle{
  left: -230px !important;          /* จาก -180 → ออกไปอีก */
}

/* กันข้อความไม่ให้โดนทับ */
.insights-page .insight3-info.insight-split--left .insight-content{
  margin-left: 240px !important;    /* เพิ่มช่องให้พอดี */
}

/* ==================================================
   INSIGHT 4 (PE): add more bottom space without resizing image
   ================================================== */

.insights-page .insight4-info{
  padding-bottom: 180px !important;   /* เดิม 60 → เพิ่มพื้นที่ล่าง */
}

/* ==================================================
   INSIGHT 4 (PE): keep oval fixed to top + overflow above section
   ================================================== */

.insights-page .insight4-info .insight-circle{
  top: -50px !important;      /* ✅ เลยขอบบน (ปรับ -30 ถึง -90 ได้) */
  transform: none !important; /* ✅ ไม่ผูกกับกลาง section */
}


/* ==================================================
   INSIGHT 2 (HDPE): fill oval edge without zoom
   ================================================== */

.insights-page .insight2-info .insight-circle{
  overflow: hidden;        /* วงรีเป็นตัวตัด */
  background: transparent;
}

/* ขยายเฉพาะขอบภาพ ไม่ซูมเนื้อ */
.insights-page .insight2-info .insight-circle img{
  position: absolute;
  inset: -20px;            /* 🔥 ตัวแก้จริง (ลอง -12 ถึง -24 ได้) */

  width: auto;
  height: auto;
  min-width: 100%;
  min-height: 100%;

  object-fit: cover;
  object-position: right top;

  transform: none !important;
}

/* ==================================================
   INSIGHT 2 (HDPE): push oval a bit more to the right
   ================================================== */

.insights-page .insight2-info.insight-split--right .insight-circle{
  right: -220px !important;  /* เดิม -110 / -120 → ดันออกอีก */
}



/* ==================================================
   INSIGHTS: scroll-in animation (ONCE)
   - section 2,4: right -> left
   - section 3: left -> right
   ================================================== */

/* ให้รูปอยู่เหนือ/ใต้ได้ตามเดิม แต่เพิ่ม transition */
.insights-page .insight2-info .insight-circle,
.insights-page .insight3-info .insight-circle,
.insights-page .insight4-info .insight-circle{
  transition: transform 900ms ease;
  will-change: transform;
}

/* --- Start state (ยังไม่เข้า viewport) --- */
/* section 2 + 4 : ดันไปทางขวา */
.insights-page .insight2-info .insight-circle,
.insights-page .insight4-info .insight-circle{
  transform: translate(35%, -50%);  /* ขวาออกไป */
}

/* section 3 : ดันไปทางซ้าย */
.insights-page .insight3-info .insight-circle{
  transform: translate(-35%, -50%); /* ซ้ายออกไป */
}

/* --- End state (เข้า viewport แล้วครั้งแรก) --- */
.insights-page .insight2-info.is-inview .insight-circle,
.insights-page .insight4-info.is-inview .insight-circle{
  transform: translate(20%, -50%);  /* กลับเข้ามาตำแหน่งโชว์ */
}

.insights-page .insight3-info.is-inview .insight-circle{
  transform: translate(-20%, -50%); /* กลับเข้ามาตำแหน่งโชว์ */
}

/* ถ้าคนตั้ง Reduce Motion: ให้เข้าที่เลย */
@media (prefers-reduced-motion: reduce){
  .insights-page .insight2-info .insight-circle,
  .insights-page .insight3-info .insight-circle,
  .insights-page .insight4-info .insight-circle{
    transition: none;
  }
}

/* ==================================================
   INSIGHTS: Scroll reveal ONCE (animate by left/right)
   - sec2,4: from right -> to left
   - sec3: from left  -> to right
   (วางท้ายสุดของ style.css)
   ================================================== */

/* ให้มี transition */
.insights-page .insight2-info .insight-circle,
.insights-page .insight3-info .insight-circle,
.insights-page .insight4-info .insight-circle{
  transition: left 900ms ease, right 900ms ease;
  will-change: left, right;
}

/* -----------------------
   START STATE (ก่อนเห็น)
   ----------------------- */

/* section 2: ขวาออกไปไกล */
.insights-page .insight2-info .insight-circle{
  right: -520px !important;
}

/* section 3: ซ้ายออกไปไกล */
.insights-page .insight3-info .insight-circle{
  left: -520px !important;
}

/* section 4: ขวาออกไปไกล */
.insights-page .insight4-info .insight-circle{
  right: -520px !important;
}

/* -----------------------
   END STATE (เห็นแล้ว)
   ----------------------- */

/* section 2: กลับมาตำแหน่งที่คุณใช้อยู่ */
.insights-page .insight2-info.is-inview .insight-circle{
  right: -220px !important; /* ✅ ตามของคุณ */
}

/* section 3: กลับมาตำแหน่งที่คุณใช้อยู่ */
.insights-page .insight3-info.is-inview .insight-circle{
  left: -230px !important;  /* ✅ ตามของคุณ */
}

/* section 4: กลับมาตำแหน่งปกติ (ปรับได้) */
.insights-page .insight4-info.is-inview .insight-circle{
  right: -180px !important; /* ถ้าคุณอยากให้โผล่มาก/น้อย ปรับเลขนี้ */
}

/* กันคนตั้ง reduce motion */
@media (prefers-reduced-motion: reduce){
  .insights-page .insight2-info .insight-circle,
  .insights-page .insight3-info .insight-circle,
  .insights-page .insight4-info .insight-circle{
    transition: none !important;
  }
}

/* ==================================================
   (Optional) ถ้าต้องการให้ sec2+sec3 ยังล้นบน+ล่างเหมือนเดิม
   - ถ้าคุณไม่ได้ต้องการให้ 2 อันนั้นล้นล่างแล้ว ให้ลบ block นี้ทิ้งได้
   ================================================== */

body.insights-page .insight2-info,
body.insights-page .insight3-info{
  overflow: visible !important;
  position: relative;
  min-height: calc(var(--C) - (var(--OVER_23) * 2)) !important;
}

body.insights-page .insight2-info > .insight-circle,
body.insights-page .insight3-info > .insight-circle{
  top: calc(-1 * var(--OVER_23)) !important;
  transform: none !important;
}

body.insights-page .insight2-info > .insight-circle{
  right: calc(-1 * var(--OUT)) !important;
  left: auto !important;
}

body.insights-page .insight3-info > .insight-circle{
  left: calc(-1 * var(--OUT)) !important;
  right: auto !important;
}

/* มือถือ */
@media (max-width: 900px){
  body.insights-page{
    --C: 360px;
    --OUT: 150px;
    --GAP: 190px;

    --OVER_23: 26px;
    --OVER_TOP: 26px;
  }

  body.insights-page .insight4-info{
    padding-bottom: 140px !important;
  }
}



/* ==================================================
   INSIGHTS: MICRO SCALE DOWN (MINIMAL OVERFLOW)
   - ล้นออกมา "นิดเดียวจริง ๆ"
   - คงพฤติกรรมเดิมทุกอย่าง
   ================================================== */

body.insights-page{
  --C: 620px;        /* ลดอีกนิด แต่ยังใหญ่พอ */
  --OVER_23: 32px;   /* ล้นบน/ล่างแบบ minimal */
  --OVER_TOP: 32px;  /* เท่ากันทั้ง 3 */
}

/* มือถือ: minimal เช่นกัน */
@media (max-width: 900px){
  body.insights-page{
    --C: 300px;
    --OVER_23: 16px;
    --OVER_TOP: 16px;
  }
}



/* ==================================================
   INSIGHT 4 (PE): tiny top-align nudge
   - แค่ดันขึ้นนิดเดียวให้ล้นบนเท่าคนอื่น
   ================================================== */

body.insights-page .insight4-info > .insight-circle{
  top: calc(-1 * var(--OVER_TOP) - 4px) !important;
}




/* ==================================================
   INSIGHT 4 (PE): TEXT CLOSER TO CIRCLE (NO IMAGE CHANGE)
   - แก้เฉพาะระยะห่าง “เนื้อหา” กับรูป
   - ไม่แตะวง/รูป/ขนาด/ตำแหน่ง
   ================================================== */

body.insights-page .insight4-info.insight-split--right .insight-content{
  /* ฆ่าพวก padding-right ที่เคยตั้งไว้ก่อนหน้า */
  padding-right: 0 !important;

  /* ตัวนี้คือระยะห่างจริง ๆ ให้ข้อความเข้าใกล้รูป */
  margin-right: 180px !important;   /* ✅ ปรับ 140–220 ได้ตามชอบ */
}




/* ==================================================
   INSIGHTS: FIX LAST SECTION (PE) NOT TOUCH FOOTER
   - วงเท่ากัน 3 วง
   - ล้นบนได้
   - ไม่ล้นล่าง + เพิ่มระยะหายใจจาก footer
   วางท้ายสุดของ style.css
   ================================================== */

body.insights-page{
  --C: 520px;       /* ✅ ขนาดวงกลมเท่ากัน (ปรับตามของคุณ) */
  --OUT: 250px;     /* ดันวงออกขอบข้าง */
  --OVER_TOP: 18px; /* ✅ ล้นบน “นิดเดียว” */
}

/* วงเท่ากันทุกวง (กันโดนกฎก่อนหน้า) */
body.insights-page .insight-circle{
  width: var(--C) !important;
  height: var(--C) !important;
  border-radius: 50% !important;
}
/* ---------------------------
   PE (section สุดท้าย) เท่านั้น
   --------------------------- */

/* 1) เพิ่มพื้นที่ล่างให้ไม่ชิด footer */
body.insights-page .insight4-info{
  position: relative;
  overflow: visible !important;

  /* 🔥 ทำให้ "ก้นวงพอดีกับขอบล่าง" = ไม่ล้นล่าง */
  min-height: calc(var(--C) - var(--OVER_TOP)) !important;

  /* ✅ ระยะหายใจจาก footer (ปรับ 140–260 ได้) */
  padding-bottom: 220px !important;
}

/* 2) วางวงให้ล้นบนอย่างเดียว (ไม่ล้นล่าง) */
body.insights-page .insight4-info > .insight-circle{
  top: calc(-1 * var(--OVER_TOP)) !important;
  transform: none !important;

  right: calc(-1 * var(--OUT)) !important;
  left: auto !important;
}

/* 3) กันกฎเก่าที่ไป “ดันวงกลาง/ล้นล่าง” (เฉพาะ PE) */
body.insights-page .insight4-info > .insight-circle{
  bottom: auto !important;
}


/* ==================================================
   INSIGHTS: MORE SPACE BEFORE FOOTER (PE ONLY)
   - ไม่แตะรูป
   - ไม่แตะการล้น
   - เพิ่มพื้นที่หายใจก่อน footer
   ================================================== */

body.insights-page .insight4-info{
  padding-bottom: 250px !important;  /* ปรับ 260–360 ได้ตามใจ */
}





/* ==================================================
   INSIGHTS: MAKE 3 CIRCLES = HORIZONTAL OVAL (SUBTLE)
   - ยืดแนวนอนนิดนึง
   - ใช้กับวงทั้ง 3 (HDPE/PP/PE)
   - ไม่กระทบรูป (ยัง cover + center)
   ================================================== */

body.insights-page{
  --OVAL_X: 1.12;  /* ยืดแนวนอน (ลอง 1.08–1.18) */
}

/* ยืดเฉพาะ "กรอบวง" */
body.insights-page .insight2-info > .insight-circle,
body.insights-page .insight3-info > .insight-circle,
body.insights-page .insight4-info > .insight-circle{
  transform: none !important;             /* กันชนกับกฎเก่า */
  width: calc(var(--C) * var(--OVAL_X)) !important;  /* ✅ ยืด */
  height: var(--C) !important;
  border-radius: 50% !important;          /* วงรีอัตโนมัติ */
}

/* ให้รูปในวงยังเต็มและไม่เพี้ยน */
body.insights-page .insight-circle img{
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  object-position: center !important;
}

/* ดันวงออกขอบเพิ่มนิด เพราะวงกว้างขึ้น */
body.insights-page{
  --OUT_OVAL: 40px; /* ปรับ 20–70 ได้ */
}

body.insights-page .insight2-info > .insight-circle,
body.insights-page .insight4-info > .insight-circle{
  right: calc(-1 * (var(--OUT) + var(--OUT_OVAL))) !important;
}

body.insights-page .insight3-info > .insight-circle{
  left:  calc(-1 * (var(--OUT) + var(--OUT_OVAL))) !important;
}




/* ==================================================
   INSIGHTS: FORCE SHIFT ALL 3 SHAPES (SAFE METHOD)
   - ขยับรูปเท่านั้น
   - ไม่แตะข้อความ / layout
   ================================================== */

body.insights-page{
  --OVAL_SHIFT: 70px;   /* 🔧 ลอง 20–70px */
}

/* วงฝั่งขวา (HDPE + PE) */
body.insights-page .insight2-info > .insight-circle,
body.insights-page .insight4-info > .insight-circle{
  transform: translateX(var(--OVAL_SHIFT)) !important;
}

/* วงฝั่งซ้าย (PP) */
body.insights-page .insight3-info > .insight-circle{
  transform: translateX(calc(-1 * var(--OVAL_SHIFT))) !important;
}
/* ==================================================
   INSIGHTS: trim bottom space of Insight 2 a little
   + force Insight 3 total height = Insight 2
   (DROP-IN FINAL)
   ================================================== */

/* ลดพื้นที่ว่างใต้ข้อความ “นิดเดียว” = ลดความสูงขั้นต่ำของ 2&3 เท่ากัน */
body.insights-page{
  --I23_TRIM: 90px; /* ✅ ลดนิดเดียว: ลอง 20–50px */
}

/* ทำให้ insight2 + insight3 มี “ความสูงรวม” เท่ากัน */
body.insights-page .insight2-info,
body.insights-page .insight3-info{
  /* ฆ่าค่าที่เคยตั้งต่างกันไว้ก่อนหน้า */
  min-height: calc(var(--C) - (var(--OVER_23) * 2) - var(--I23_TRIM)) !important;

  /* กันเคสที่ insight3 เคยถูกเพิ่มช่องว่างล่างแบบพิเศษ */
  padding-bottom: 60px !important;  /* = ค่า section ปกติของคุณ */
}


/* ==================================================
   INSIGHTS: equalize section height (2 -> 3) via JS
   - ไม่แตะขนาด Insight 2
   - ให้ Insight 3 เติมพื้นที่ล่างเพิ่มได้
   ================================================== */

body.insights-page .insight3-info{
  /* ค่าเริ่มต้นของคุณ */
  padding-bottom: 60px;
}









/* ==================================================
   INSIGHTS: POSITION ONLY (NO SIZE / NO AREA CHANGE)
   - ไม่เพิ่ม/ลดพื้นที่ section (ไม่แตะ padding/min-height/margin ของ section)
   - ไม่เปลี่ยนทรง/ขนาดวง (ไม่แตะ width/height/border-radius)
   - แก้เฉพาะตำแหน่งให้ล้นบน-ล่างตามที่ต้องการ
   ================================================== */

/* insight2 + insight3: ให้ล้นบน/ล้นล่างเท่ากัน = จัดวงไว้กึ่งกลาง section */
body.insights-page .insight2-info > .insight-circle,
body.insights-page .insight3-info > .insight-circle{
  top: 50% !important;
  bottom: auto !important;

  /* ใช้ translate (ไม่ยุ่ง transform) เพื่อไม่ไปทับการ shift ซ้าย/ขวาที่คุณทำไว้ */
  translate: 0 -50% !important;
}

/* insight4: ล้น "ด้านบน" อย่างเดียว (ไม่ล้นล่าง)
   - ปรับแค่ค่า OVER_TOP_4 ได้ตามชอบ */
body.insights-page{
  --OVER_TOP_4: 45px; /* ปรับ 20–70 ได้ */
}

body.insights-page .insight4-info > .insight-circle{
  top: calc(-1 * var(--OVER_TOP_4)) !important;
  bottom: auto !important;

  /* ไม่ให้ดึงลงกลาง section */
  translate: 0 0 !important;
}
/* ==================================================
   INSIGHTS: SCALE DOWN CIRCLES ONLY (NO SHAPE CHANGE)
   - ลดขนาดวง/รูปลง โดยไม่เปลี่ยนรูปทรง
   - ไม่แตะพื้นที่ section (no padding/min-height changes)
   ================================================== */

body.insights-page{
  --CIRCLE_SCALE: 0.88;  /* ✅ ปรับได้: 0.82–0.95 */
}

/* insight2 + insight3: ยังอยู่กึ่งกลาง (ล้นบน/ล่างเท่ากัน) */
body.insights-page .insight2-info > .insight-circle,
body.insights-page .insight3-info > .insight-circle{
  top: 50% !important;
  bottom: auto !important;
  transform-origin: center center;

  /* ลดขนาดวงแบบคงรูปทรงเดิม */
  transform: scale(var(--CIRCLE_SCALE)) !important;
}

/* insight4: ล้นบนอย่างเดียว (ไม่ล้นล่าง) + ลดขนาดเหมือนกัน */
body.insights-page{
  --OVER_TOP_4: 45px; /* ของเดิมคุณ (ถ้าพอดีแล้วไม่ต้องยุ่ง) */
}
body.insights-page .insight4-info > .insight-circle{
  top: calc(-1 * var(--OVER_TOP_4)) !important;
  bottom: auto !important;
  transform-origin: center top;

  transform: scale(var(--CIRCLE_SCALE)) !important;
}









/* ==================================================
   INSIGHTS: FORCE MOVE (WIN EVERY RULE)
   ================================================== */

/* HDPE (sec2) — ขยับซ้าย/ขวาโดยแก้ right ตรง ๆ */
body.insights-page section.insight2-info.insight-split.insight-split--right > .insight-circle,
body.insights-page section.insight2-info.insight-split.insight-split--right.is-inview > .insight-circle{
  right: -250px !important;   /* 👈 ปรับเลขนี้ */
  left: auto !important;
}

/* PP (sec3) — ขยับซ้าย/ขวาโดยแก้ left ตรง ๆ */
body.insights-page section.insight3-info.insight-split.insight-split--left > .insight-circle,
body.insights-page section.insight3-info.insight-split.insight-split--left.is-inview > .insight-circle{
  left: -250px !important;    /* 👈 ปรับเลขนี้ */
  right: auto !important;
}

/* PE (sec4) — ขยับซ้าย/ขวาโดยแก้ right ตรง ๆ */
body.insights-page section.insight4-info.insight-split.insight-split--right > .insight-circle,
body.insights-page section.insight4-info.insight-split.insight-split--right.is-inview > .insight-circle{
  right: -250px !important;   /* 👈 ปรับเลขนี้ */
  left: auto !important;
}










/* ==================================================
   INSIGHTS: SLIDE CIRCLE IN (ONCE) — DROP-IN
   - sec2, sec4: from right -> to left
   - sec3:       from left  -> to right
   - relies on .is-inview added by JS
   ================================================== */

/* 1) ใส่ transition ให้ขยับนุ่ม */
body.insights-page section.insight2-info > .insight-circle,
body.insights-page section.insight3-info > .insight-circle,
body.insights-page section.insight4-info > .insight-circle{
  transition: left 900ms cubic-bezier(.22,.61,.36,1),
              right 900ms cubic-bezier(.22,.61,.36,1) !important;
  will-change: left, right;
}

/* 2) START: ก่อนเข้า viewport (ยังไม่มี .is-inview) */
/* sec2 + sec4 เริ่มจาก "ขวาออกไปไกล" */
body.insights-page section.insight2-info:not(.is-inview) > .insight-circle,
body.insights-page section.insight4-info:not(.is-inview) > .insight-circle{
  right: -900px !important;  /* 🔧 ออกไปไกล (ปรับ -700 ถึง -1200 ได้) */
  left: auto !important;
}

/* sec3 เริ่มจาก "ซ้ายออกไปไกล" */
body.insights-page section.insight3-info:not(.is-inview) > .insight-circle{
  left: -900px !important;   /* 🔧 ออกไปไกล */
  right: auto !important;
}

/* 3) END: พอเข้า viewport แล้ว = กลับไปตำแหน่ง "ที่คุณใช้อยู่จริง" */
/* ✅ ใส่เลขให้ “ตรงกับของคุณ” (ที่ท้าย ๆ คุณล็อกไว้ -250 อยู่แล้ว) */
body.insights-page section.insight2-info.is-inview > .insight-circle{
  right: -250px !important;
  left: auto !important;
}
body.insights-page section.insight3-info.is-inview > .insight-circle{
  left: -250px !important;
  right: auto !important;
}
body.insights-page section.insight4-info.is-inview > .insight-circle{
  right: -250px !important;
  left: auto !important;
}

/* 4) reduce motion */
@media (prefers-reduced-motion: reduce){
  body.insights-page section.insight2-info > .insight-circle,
  body.insights-page section.insight3-info > .insight-circle,
  body.insights-page section.insight4-info > .insight-circle{
    transition: none !important;
  }
}
/* ==================================================
   INSIGHTS: HOVER ZOOM (FORCE WIN)
   - ชี้ที่รูปแล้วเด้ง
   - ชนะกฎเดิมที่เคยเขียน transform: none !important;
   ================================================== */

body.insights-page section.insight2-info > .insight-circle,
body.insights-page section.insight3-info > .insight-circle,
body.insights-page section.insight4-info > .insight-circle{
  pointer-events: auto !important;
  z-index: 5 !important; /* ให้ชั้นบนพอรับ hover */
}

/* ตั้งค่าเริ่มต้น + transition (ชนะทุกอัน) */
body.insights-page section.insight2-info > .insight-circle img,
body.insights-page section.insight3-info > .insight-circle img,
body.insights-page section.insight4-info > .insight-circle img{
  pointer-events: auto !important;
  cursor: default;
  transition: transform 260ms ease !important;
  transform: scale(1) !important;          /* ✅ บังคับให้ไม่โดน transform:none */
  will-change: transform;
}

/* ชี้แล้วเด้ง */
body.insights-page section.insight2-info > .insight-circle:hover img,
body.insights-page section.insight3-info > .insight-circle:hover img,
body.insights-page section.insight4-info > .insight-circle:hover img{
  transform: scale(1.06) !important;       /* ปรับ 1.03–1.10 ได้ */
}

/* คนตั้ง reduce motion */
@media (prefers-reduced-motion: reduce){
  body.insights-page section.insight2-info > .insight-circle img,
  body.insights-page section.insight3-info > .insight-circle img,
  body.insights-page section.insight4-info > .insight-circle img{
    transition: none !important;
  }
}






/* ==================================================
   INSIGHT2 (HDPE): MOVE IMAGE DOWN a bit (ONLY)
   - ขยับ "รูปด้านในวง" ลงนิดนึง
   - ไม่แตะขนาดวง / ไม่แตะตำแหน่งวง / ไม่แตะวงอื่น
   ================================================== */

body.insights-page section.insight2-info > .insight-circle img{
  object-position: center 10% !important; /* ✅ เลื่อนลง: ลอง 55%–75% */
}













/* ==================================================
   MACBOOK 1440x900 ONLY (SAFE OVERRIDE)
   - กระทบเฉพาะจอ 1440×900 เท่านั้น
   - วาง "ท้ายสุด" ของ style.css
   ================================================== */
@media (width: 1440px) and (height: 900px){

  /* =========================
     1) HOME: รูป info ไม่ชิดขอบ
     ========================= */
  body.home .home-info .container{
    padding-left: 28px !important;
    padding-right: 0px !important;
  }

  /* กัน flex item ฝั่งรูปไม่ดัน/ล้น แล้วทำให้ดูชิดขอบ */
  body.home .home-info .text-image-row > div:last-child{
    min-width: 0 !important;
  }

  /* ลดความกว้างรูปจาก 950 ที่ล็อกไว้ ให้พอดีกับ 1440×900 */
  body.home .home-info .text-image-row > div:last-child img{
    width: 100% !important;
    max-width: 780px !important;  /* 🔧 ปรับได้ 740–820 */
    height: 360px !important;     /* เดิม 380; ลดนิดให้บาลานซ์บนจอนี้ */
    margin-left: auto !important; /* ดันให้มี breathing room ด้านขวา */
  }


  /* =========================
     2) ABOUT US: ทั้งหน้าเข้ากลาง + ไม่ล้น
     (ต้องมี body.about-page)
     ========================= */

  /* ฆ่า margin-left/right 240px ที่ทำให้ล้นบนจอ 1440×900 */
  body.about-page .about-row:not(.about-reverse),
  body.about-page .about-row.about-reverse{
    margin-left: auto !important;
    margin-right: auto !important;
    justify-content: center !important;
  }

  /* อนุญาตให้ wrap ได้ ถ้าพื้นที่ไม่พอ (กันล้นชัวร์) */
  body.about-page .about-row{
    flex-wrap: wrap !important;
    gap: 25px !important;
  }

  /* เอา margin ที่ดันคอลัมน์ข้อความออก */
  body.about-page .about-row > div:last-child{
    margin-left: 0 !important;
  }

  /* ลดขนาดรูปนิดนึงให้พอดีจอนี้ (กันล้นแน่นอน) */
  body.about-page .about-row > div:first-child img,
  body.about-page .about-row.about-reverse > div:last-child img{
    width: 520px !important;      /* 🔧 480–540 ได้ */
    height: 340px !important;
    max-width: 100% !important;
  }

  /* ลดการล็อกความกว้างฝั่งข้อความที่เคย fix 670 */
  body.about-page .about-row.about-reverse > div:first-child{
    flex: 1 1 620px !important;
    max-width: 620px !important;
    margin-right: 0 !important;
  }

  /* =========================
   ABOUT (เฉพาะ section ล่าง): ดันรูปไปชิดขวาให้ระยะขอบสมดุล
   ========================= */

/* เฉพาะ about2-info (แถวที่ reverse) ให้กระจายซ้าย-ขวาแทนการ center */
body.about-page .about2-info .about-row.about-reverse{
  justify-content: space-between !important;
}

/* บังคับคอลัมน์รูป (div สุดท้าย) ให้จัดรูปชิดขวา */
body.about-page .about2-info .about-row.about-reverse > div:last-child{
  display: flex !important;
  justify-content: flex-end !important;
}

/* กันกรณี img มี margin:auto แล้วไม่ชิดขวา */
body.about-page .about2-info .about-row.about-reverse > div:last-child img{
  margin-left: auto !important;
  margin-right: 0 !important;
  display: block;
}
body.about-page .about2-info .about-row.about-reverse > div:last-child img{
  transform: translateX(50px);
}

/* เพิ่มความกว้างฝั่งข้อความ (เฉพาะ about2-info) */
body.about-page .about2-info .about-row.about-reverse > div:first-child{
  flex: 1 1 700px !important;     /* เดิม 620 */
  max-width: 700px !important;    /* ปรับได้ 660–760 */
}

/* ==================================================
   ABOUT: about-info (แถวบน) ดันรูปให้ชิดซ้ายขึ้น
   ================================================== */

/* ให้แถวบนกระจาย ไม่ต้อง center */
body.about-page .about-info .about-row{
  justify-content: space-between !important;
}

/* คอลัมน์รูป (div แรก) จัดรูปชิดซ้าย */
body.about-page .about-info .about-row > div:first-child{
  display: flex !important;
  justify-content: flex-start !important;
}

/* กันกรณี img เคยถูกตั้งให้ margin auto */
body.about-page .about-info .about-row > div:first-child img{
  margin-left: 0 !important;
  margin-right: auto !important;
  display: block;
}

/* ปรับละเอียด: ดันรูปไปทางซ้ายอีกนิด (ลบ = ไปซ้าย, บวก = ไปขวา) */
body.about-page .about-info .about-row > div:first-child img{
  transform: translateX(-35px); /* 🔧 ลอง -20 ถึง -80 */
}

  /* =========================
     3) INSIGHTS: 3 วงไม่ทับข้อความ
     ========================= */


  /* HDPE (sec2) — ขยับออกขวา */
  body.insights-page section.insight2-info.insight-split.insight-split--right > .insight-circle,
  body.insights-page section.insight2-info.insight-split.insight-split--right.is-inview > .insight-circle{
    right: -450px !important;   /* 👈 ปรับเลขนี้ (ยิ่งติดลบมาก = ออกขวาเยอะขึ้น) */
    left: auto !important;
  }

  /* PP (sec3) — ขยับออกซ้าย */
  body.insights-page section.insight3-info.insight-split.insight-split--left > .insight-circle,
  body.insights-page section.insight3-info.insight-split.insight-split--left.is-inview > .insight-circle{
    left: -450px !important;    /* 👈 ปรับเลขนี้ (ยิ่งติดลบมาก = ออกซ้ายเยอะขึ้น) */
    right: auto !important;
  }

  /* PE (sec4) — ขยับออกขวา */
  body.insights-page section.insight4-info.insight-split.insight-split--right > .insight-circle,
  body.insights-page section.insight4-info.insight-split.insight-split--right.is-inview > .insight-circle{
    right: -450px !important;   /* 👈 ปรับเลขนี้ */
    left: auto !important;
  }

}
  
/* ==================================================
   iPad Pro 12.9" Portrait 1024×1366
   HOME: ลดรูป info ด้านขวา + เว้นที่ขวาเหมือนจอแมค
   ================================================== */
@media (width: 1024px) and (height: 1366px){

  /* (เหมือนของแมค) ปรับ container ให้มีระยะ */
  body.home .home-info .container{
    padding-left: 20px !important;
    padding-right: 0px !important;
  }

  /* กันคอลัมน์รูปไม่โดน min-width 550 ของกฎหลัก */
  body.home .home-info .text-image-row > div:last-child{
    min-width: 0 !important;
    flex: 0 0 auto !important;   /* ไม่ให้มันยืดเต็มจนชิดขอบ */
  }

  /* ลดรูป + ดันไปทางซ้ายให้มีที่ขวา (breathing room) */
  body.home .home-info .text-image-row > div:last-child img{
    width: 100% !important;
    max-width: 560px !important; /* 🔧 ลอง 520–620 ได้ */
    height: 320px !important;    /* 🔧 ลอง 280–340 ได้ */
    margin-left: auto !important;  /* ดันรูปชิดขวาของคอลัมน์ */
    margin-right: 40px !important; /* ✅ เว้นที่ขวาเพิ่มจริง */
  }
}






/*แก้ banner*/
/* About us: ปรับตำแหน่งรูป "ทีละสไลด์" */

/* รูปที่ 1 */
body.about-page .banner-auto .slides .slide:nth-child(1) img{
  object-position: center 75% !important;  /* 0% = ขึ้น, 100% = ลง */
}

/* รูปที่ 2 */
body.about-page .banner-auto .slides .slide:nth-child(2) img{
  object-position: center 30% !important;
}

/* product*/
/* รูปที่ 1 */
body.products-page .banner-auto .slides .slide:nth-child(1) img{
  object-position: center 35.5% !important;  /* 0% = ขึ้น, 100% = ลง */
}

/* รูปที่ 2 */
body.products-page .banner-auto .slides .slide:nth-child(2) img{
  object-position: center 50% !important;
}


body.home .home-info .text-image-row > div:last-child img{
  object-position: center 60% !important;
}


/* ==============================
   CONTACT: BANNER GREY BACKGROUND (NO GHOST)
   - ใช้เฉพาะหน้า contact us
   - ใช้ได้ทั้ง banner-auto และ banner-slider
   ============================== */

body.contact-page .banner.banner-slider,
body.contact-page .banner-auto,
body.contact-page .banner.banner-slider .slides,
body.contact-page .banner-auto .slides{
  background: #858585 !important;   /* เทา */
}

/* ให้ตัว slide เองทึบด้วย กันเห็นทะลุตอน fade */
body.contact-page .banner.banner-slider .slide,
body.contact-page .banner-auto .slide{
  background: #858585 !important;
}

/* กันขอบ/ช่องว่างของรูป */
body.contact-page .banner.banner-slider .slide img,
body.contact-page .banner-auto .slide img{
  display: block;
}
/* ==================================================
   HOME BANNER: iPad only (portrait + landscape)
   - กันข้อความตกบรรทัดโดยไม่ลด font-size
   - ไม่กระทบจออื่น
   ================================================== */
@media (min-width: 768px) and (max-width: 1180px) {

  /* 1) เพิ่มพื้นที่ให้กล่องข้อความ (แก้ต้นเหตุเรื่องพื้นที่แคบ) */
  body.home .banner-text{
    padding-left: 0 !important;     /* ฆ่า 50% เดิม */
    transform: none !important;     /* ฆ่า translateX เดิม */
    padding-right: 48px !important; /* ปรับ 30–80 ได้ */
    text-align: right !important;
    align-items: flex-end !important;

    max-width: 980px;               /* ปรับ 860–1100 ได้ */
    margin-left: auto;
  }

  /* 2) ไม่ให้ตกบรรทัด (เลือกใช้เฉพาะตัวที่ตกจริงก็ได้) */
  body.home .banner-text h1,
  body.home .banner-text p{
    white-space: nowrap;
  }

  /* 3) ถ้ายังแน่น: ลด “ระยะตัวอักษร” (ไม่ลดขนาดฟอนต์) */
  body.home .banner-text h1{ letter-spacing: 2px !important; } /* เดิม 4px */
  body.home .banner-text p { letter-spacing: 1px !important; } /* เดิม 2px */
}


/* iPad Portrait */
@media (min-width: 768px) and (max-width: 1024px) and (orientation: portrait){
  body.home .banner-text{ max-width: 900px; padding-right: 36px !important; }
}

/* iPad Landscape */
@media (min-width: 1024px) and (max-width: 1180px) and (orientation: landscape){
  body.home .banner-text{ max-width: 1040px; padding-right: 60px !important; }
}

/* ==================================================
   HOME-INFO: iPad only
   - Portrait: รูปอยู่ใต้ Learn More
   - Portrait + Landscape: ลดขนาดรูปโดยไม่เปลี่ยนทรง
   ================================================== */

/* 1) iPad PORTRAIT */
@media (min-width: 768px) and (max-width: 1024px) and (orientation: portrait){

  body.home .home-info .text-image-row{
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 22px !important;
  }

  /* กันคอลัมน์รูปไม่โดน min-width 550 (ของกฎ global) */
  body.home .home-info .text-image-row > div:last-child{
    min-width: 0 !important;
    width: 100% !important;
  }

  /* ลดขนาดรูป + คงทรงเดิม (เดิมคุณล็อก 950x380) */
  body.home .home-info .text-image-row > div:last-child img{
    width: 100% !important;
    max-width: 660px !important;        /* 🔧 ปรับ 640–780 ได้ */
    height: auto !important;            /* ✅ ไม่บิดทรง */
    aspect-ratio: 950 / 380 !important; /* ✅ คงสัดส่วนเดิม */
    object-fit: cover !important;

    margin: 8px auto 0 !important;      /* อยู่กลางใต้ปุ่ม */
  }
}


/* 2) iPad LANDSCAPE */
@media (min-width: 1024px) and (max-width: 1180px) and (orientation: landscape){

  /* ลดขนาดคอลัมน์รูป ไม่ให้ล้น */
  body.home .home-info .text-image-row > div:last-child{
    min-width: 0 !important;  /* ฆ่า min-width 550 */
    flex: 0 0 auto !important;
  }

  /* ลดขนาดรูป + คงทรงเดิม */
  body.home .home-info .text-image-row > div:last-child img{
    width: 100% !important;
    max-width: 520px !important;        /* 🔧 ปรับ 520–640 ได้ */
    height: auto !important;
    aspect-ratio: 950 / 380 !important;
    object-fit: cover !important;

    margin-left: auto !important;       /* จัดรูปชิดขวา */
    margin-right: 0 !important;
  }
}


/* ==================================================
   iPad ONLY: เพิ่มระยะขอบซ้าย/ขวาทั้งเว็บ (global gutters)
   - ไม่กระทบจออื่น
   - ครอบคลุม portrait + landscape (768–1180)
   ================================================== */
@media (min-width: 768px) and (max-width: 1180px){

  :root{
    --ipad-gutter: 32px; /* 🔧 ปรับ 24–44 ได้ตามชอบ */
  }

  /* 1) ตัวหลัก: ทุกหน้าที่อยู่ใน .container จะขยับเข้ามา */
  .container{
    padding-left: var(--ipad-gutter) !important;
    padding-right: var(--ipad-gutter) !important;
  }

  /* 2) แก้จุดที่เคย “ตัด padding ออก” ให้กลับมามีขอบบน iPad */
  .products-page .product-tabs,
  .products-page #product-list,
  .products-page .product-detail{
    padding-left: var(--ipad-gutter) !important;
    padding-right: var(--ipad-gutter) !important;
    box-sizing: border-box;
  }

  /* (ถ้ามี section อื่นที่คุณเคย set padding 0 ไว้แบบเดียวกัน
     ให้เพิ่ม selector ตรงนี้ได้) */
}

/* (optional) ถ้าอยากให้ portrait ขอบมากกว่า landscape นิดนึง */
@media (min-width: 768px) and (max-width: 1024px) and (orientation: portrait){
  :root{ --ipad-gutter: 36px; }  /* 🔧 portrait */
}
@media (min-width: 1024px) and (max-width: 1180px) and (orientation: landscape){
  :root{ --ipad-gutter: 28px; }  /* 🔧 landscape */
}


/* ==================================================
   iPad ONLY: เพิ่มขอบซ้าย/ขวาให้ "เนื้อหา" ทั้งเว็บ
   ✅ ไม่กระทบ HEADER (โลโก้+เมนู)
   ================================================== */

/* iPad Portrait + Landscape */
@media (min-width: 768px) and (max-width: 1180px){

  /* 0) ล็อก header ไว้เหมือนเดิม (กันโดนดัน) */
  header .container{
    padding-left: 15px !important;
    padding-right: 15px !important;
  }

  /* 1) ดัน “เนื้อหา” ใน SECTION/MAIN/FOOTER เท่านั้น */
  body .page-wrapper section .container,
  body .page-wrapper main .container,
  body .page-wrapper footer .container{
    padding-left: 34px !important;   /* 🔧 ปรับ 28–44 ได้ */
    padding-right: 34px !important;
    box-sizing: border-box;
  }

  /* 2) หน้า PRODUCTS คุณเคยตัด padding เป็น 0 !important
        เลยต้องย้ำเฉพาะกล่องหลักของ products ให้มีขอบ */
  body.products-page .product-tabs,
  body.products-page #product-list,
  body.products-page .product-detail{
    padding-left: 34px !important;
    padding-right: 34px !important;
    box-sizing: border-box;
  }

  /* 3) (ถ้าข้อความบนแบนเนอร์บางหน้าชิดขอบ) ดันเฉพาะตัวอักษรใน banner
        ไม่ได้แตะ header นะ */
  .banner-text{
    padding-left: 34px !important;
    padding-right: 34px !important;
  }
}

/* ปรับละเอียด: Portrait ขอบเยอะกว่า / Landscape ขอบน้อยกว่า */
@media (min-width: 768px) and (max-width: 1024px) and (orientation: portrait){
  body .page-wrapper section .container,
  body .page-wrapper main .container,
  body .page-wrapper footer .container,
  body.products-page .product-tabs,
  body.products-page #product-list,
  body.products-page .product-detail,
  .banner-text{
    padding-left: 38px !important;
    padding-right: 38px !important;
  }
}

@media (min-width: 1024px) and (max-width: 1180px) and (orientation: landscape){
  body .page-wrapper section .container,
  body .page-wrapper main .container,
  body .page-wrapper footer .container,
  body.products-page .product-tabs,
  body.products-page #product-list,
  body.products-page .product-detail,
  .banner-text{
    padding-left: 38px !important;
    padding-right: 38px !important;
  }
}

/* ค่าเริ่มต้น: ไม่ตัดบรรทัด */
.br-ipad{ display:none; }

/* iPad เท่านั้น: ให้ตัดบรรทัด */
@media (min-width: 768px) and (max-width: 1180px){
  .br-ipad{ display:inline; }
}

/* ==================================================
   HOME-INFO: iPad only
   - ข้อความไหลต่อกัน (ไม่ตาม Enter)
   - แต่ยังเว้นระยะห่างจาก Title เหมือนเดิม
   ================================================== */
@media (min-width: 768px) and (max-width: 1180px){

  /* ให้ข้อความไม่ทำ pre-line แล้ว */
  body.home .home-info p.lock-lines{
    white-space: normal !important;
    margin-top: 20px !important;      /* ✅ เว้นห่างจาก title (ปรับ 10–18 ได้) */
    margin-bottom: 15px !important;   /* คงช่องว่างก่อนปุ่ม */
  }

  /* ถ้าอยากคุมจากฝั่ง title ด้วย (กันชิดเกิน) */
  body.home .home-info .section-title{
    margin-bottom: 8px !important;    /* ปรับ 6–14 ได้ */
  }
}

/* ==================================================
   HOME-INFO: iPad PORTRAIT - ให้ข้อความใช้พื้นที่เต็มกว้าง
   (แก้ติด max-width:520px)
   ================================================== */
@media (min-width: 768px) and (max-width: 1024px) and (orientation: portrait){

  /* ให้คอลัมน์ข้อความเต็มความกว้างจริง */
  body.home .home-info .text-image-row > div:first-child{
    max-width: none !important;  /* ✅ ฆ่า 520px */
    width: 100% !important;
    margin-top: 0 !important;    /* กันชน title/ดูเพี้ยนจาก -20 */
  }

  /* เผื่อมีตัวอื่นไปล็อกไว้ */
  body.home .home-info .home-text{
    max-width: none !important;
    width: 100% !important;
  }

  /* ให้ <p> ไม่ถูกบีบแปลก ๆ */
  body.home .home-info .home-text p{
    width: 100% !important;
  }
}



/* ==================================================
   HOME-INFO: iPad LANDSCAPE ONLY
   - ระยะห่าง title vs ข้อความให้บาลานซ์เหมือนแนวตั้ง
   - ข้อความไหลเอง (ไม่ lock)
   - รูปอยู่ขวาเหมือนเดิม
   ================================================== */
@media (min-width: 1024px) and (max-width: 1180px) and (orientation: landscape){

  /* กัน margin-top -20 ที่ทำให้ตำแหน่งเพี้ยน */
  body.home .home-info .text-image-row > div:first-child{
    margin-top: 0 !important;
    max-width: none !important; /* ให้กินพื้นที่ได้มากขึ้น */
  }

  /* ระยะ title */
  body.home .home-info .section-title{
    margin-bottom: 12px !important; /* จูนให้ใกล้แนวตั้ง */
  }

  /* ให้ข้อความ "ไหลเอง" + จูนช่องว่างให้ไม่ห่างเกิน */
  body.home .home-info p.lock-lines{
    white-space: normal !important;
    margin-top: 14px !important;     /* 🔧 ปรับ 10–18 ได้ */
    margin-bottom: 15px !important;
  }

  /* คงรูปไว้ขวา + ไม่โดน min-width 550 มาบีบ layout */
  body.home .home-info .text-image-row > div:last-child{
    min-width: 0 !important;
  }
}
/* ==================================================
   HOME-INFO: เว้นระยะใต้ปุ่ม Learn More (iPad only)
   ================================================== */

/* iPad Portrait: ปุ่มอยู่เหนือรูป -> เพิ่มช่องใต้ปุ่มให้ห่างรูป */
@media (min-width: 768px) and (max-width: 1024px) and (orientation: portrait){
  body.home .home-info .home-learnmore{
    margin-bottom: 14px !important; /* 🔧 ลอง 10–22 */
    
  }
}

/* iPad Landscape: รูปอยู่ขวา แต่ถ้าอยากให้มี “ลมหายใจ” ใต้ปุ่มด้วย */
@media (min-width: 1024px) and (max-width: 1180px) and (orientation: landscape){
  body.home .home-info .home-learnmore{
    margin-bottom: 10px !important; /* 🔧 ลอง 8–18 */
  }
}





/* ==================================================
   HOME-INFO: iPad PORTRAIT — center align text
   (title + paragraph + button) without affecting others
   ================================================== */
@media (min-width: 768px) and (max-width: 1024px) and (orientation: portrait){

  /* จัดทุกอย่างใน home-info ให้อยู่กึ่งกลาง */
  body.home .home-info .section-title{
    text-align: center !important;
  }

  /* เส้นใต้หัวข้อ (with-line) ให้มาอยู่กลางด้วย */
  body.home .home-info .with-line::after{
    left: 50% !important;
    transform: translateX(-50%) !important;
  }

  /* ย่อหน้าให้กึ่งกลาง */
  body.home .home-info .home-text,
  body.home .home-info p.lock-lines{
    text-align: center !important;
  }

  /* ปุ่มอยู่กลาง (คุณมี center-btn อยู่แล้ว แต่อันนี้ย้ำให้ชนะ) */
  body.home .home-info .home-learnmore{
    margin-left: auto !important;
    margin-right: auto !important;
  }
}
/* ==================================================
   HOME-INFO (iPad): LOCK SPACING = portrait
   - title <-> text
   - text <-> button
   - button <-> image
   ================================================== */
@media (min-width: 768px) and (max-width: 1180px){

  /* ✅ ระยะทั้งหมดอ้างอิง "จอตั้ง" */
  body.home{
    --hi-stack-gap: 22px;   /* ระยะระหว่างบล็อก (ในแนวตั้ง) */
    --hi-title-mb: 8px;     /* title -> ข้อความ */
    --hi-text-mt: 20px;     /* ขยับข้อความจาก title (เท่าจอตั้งที่คุณชอบ) */
    --hi-text-mb: 15px;     /* ข้อความ -> ปุ่ม (แต่จะชนกับปุ่มด้านล่าง) */
    --hi-btn-mt: 50px;      /* ระยะข้อความ -> ปุ่ม (ตัวนี้จะชนะเวลามาร์จิ้นชนกัน) */
    --hi-btn-mb: 14px;      /* ปุ่ม -> รูป */
    --hi-img-mt: 8px;       /* เพิ่มลมหายใจเหนือรูป */
  }

  /* ระยะ title */
  body.home .home-info .section-title{
    margin-bottom: var(--hi-title-mb) !important;
  }

  /* ระยะข้อความ + ให้ไหลเอง */
  body.home .home-info p.lock-lines{
    white-space: normal !important;
    margin-top: var(--hi-text-mt) !important;
    margin-bottom: var(--hi-text-mb) !important;
  }

  /* ระยะปุ่ม */
  body.home .home-info .home-learnmore{
    margin-top: var(--hi-btn-mt) !important;
    margin-bottom: var(--hi-btn-mb) !important;
  }
}

/* ==================================================
   HOME-INFO: iPad PORTRAIT + LANDSCAPE = same vertical layout
   - image goes BELOW button
   - center align like portrait
   ================================================== */
@media (min-width: 768px) and (max-width: 1180px) and (orientation: portrait),
       (min-width: 1024px) and (max-width: 1180px) and (orientation: landscape){

  body.home .home-info .text-image-row{
    flex-direction: column !important;
    align-items: stretch !important;
    gap: var(--hi-stack-gap) !important;
  }

  body.home .home-info .text-image-row > div:first-child{
    max-width: none !important;
    width: 100% !important;
    margin-top: 0 !important;
  }

  /* title + เส้นใต้ + ข้อความ = กลาง */
  body.home .home-info .section-title{
    text-align: center !important;
  }
  body.home .home-info .with-line::after{
    left: 50% !important;
    transform: translateX(-50%) !important;
  }
  body.home .home-info .home-text,
  body.home .home-info p.lock-lines{
    text-align: center !important;
  }

  /* รูปอยู่ใต้ปุ่ม + ระยะจากปุ่ม */
  body.home .home-info .text-image-row > div:last-child{
    min-width: 0 !important;
    width: 100% !important;
  }
  body.home .home-info .text-image-row > div:last-child img{
    width: 100% !important;
    height: auto !important;
    aspect-ratio: 950 / 380 !important;
    object-fit: cover !important;
    margin: var(--hi-img-mt) auto 0 !important;
  }
}
/* ==================================================
   HOME-INFO: iPad LANDSCAPE ONLY — bigger image (no portrait impact)
   ================================================== */
@media (min-width: 1024px) and (max-width: 1180px) and (orientation: landscape){

  body.home{
    --hi-img-max-landscape: 900px;  /* ✅ ปรับตรงนี้: 600–760 ได้ */
  }

  body.home .home-info .text-image-row > div:last-child img{
    max-width: var(--hi-img-max-landscape) !important;
  }
}




/* ==================================================
   PORTRAIT ONLY: Footer show LEFT only (hide right column)
   - ใช้ได้ทุกหน้า
   - ไม่กระทบจอแนวนอน
   ================================================== */
@media (orientation: portrait){

  /* ซ่อนฝั่งขวา (ที่มี tel/fax/email/line) */
  footer .footer-inner > div:last-child{
    display: none !important;
  }

  /* ให้ฝั่งซ้ายกินเต็มความกว้าง */
  footer .footer-inner{
    grid-template-columns: 1fr !important;
    gap: 0 !important; /* กันเว้นช่องว่างจากคอลัมน์ที่หายไป */
  }

  /* ถ้าด้านล่างเว้นสูงเกินไปหลังซ่อนคอลัมน์ขวา */
  footer .footer-bottom{
    margin-top: 25px !important; /* เดิม 55px */
  }
}



/* ==================================================
   iPad PORTRAIT ONLY: OUR CUSTOMERS logos reflow
   1 2 3
   4 5
   6
   ================================================== */
@media (min-width: 768px) and (max-width: 1180px) and (orientation: portrait){

  body.home .customers-logos{
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 26px 34px;
  }

  body.home .customers-logos img{
    margin: 0 !important;
    flex: 0 0 calc((100% - 34px * 2) / 3);
    max-width: calc((100% - 34px * 2) / 3);
  }

  body.home .customers-logos img:nth-child(4),
  body.home .customers-logos img:nth-child(5){
    flex-basis: calc((100% - 34px) / 2);
    max-width: calc((100% - 34px) / 2);
  }

  body.home .customers-logos img:nth-child(6){
    flex-basis: 55%;
    max-width: 55%;
  }
}


@media (min-width: 768px) and (max-width: 1180px) and (orientation: portrait){

  /* แถว 2 (โลโก้ 4-5) ให้ใกล้กันขึ้น */
  body.home .customers-logos img:nth-child(4),
  body.home .customers-logos img:nth-child(5){
    margin-inline: -35px !important; /* 🔧 ปรับ -2 ถึง -12 ได้ */
  }
}
/* ==================================================
   iPad LANDSCAPE: OUR CUSTOMERS = 1 2 3 / 4 5 6
   ================================================== */
@media (min-width: 1024px) and (max-width: 1180px) and (orientation: landscape){

  /* จัดให้เป็น 2 แถว แถวละ 3 และอยู่กลาง */
  body.home .customers-logos{
    flex-wrap: wrap !important;
    justify-content: center !important;
    align-items: center !important;

    /* gap แนวนอน/แนวตั้ง (ปรับได้) */
    gap: 18px 26px !important; /* row-gap 18, col-gap 26 */
  }

  /* ทำให้ 1 แถวมี 3 โลโก้พอดี -> แถวสองเป็น 4-5-6 อัตโนมัติ */
  body.home .customers-logos img{
    margin: 0 !important; /* ฆ่า margin เดิมที่ทำให้ spacing แปลก */
    flex: 0 0 calc((100% - (26px * 2)) / 3) !important;
    max-width: calc((100% - (26px * 2)) / 3) !important;

    /* ให้อยู่กลางของช่อง */
    display: block;
  }
}


/* iPad PORTRAIT: เพิ่มช่องว่างเหนือแถวที่ 3 (เฉพาะโลโก้รูปที่ 6) */
@media (min-width: 768px) and (max-width: 1180px) and (orientation: portrait){
  body.home .customers-logos img:nth-child(6){
    margin-top: 45px !important;  /* ปรับ 10–24 ได้ตามชอบ */
  }
}






/* about us ipad */
/* ==================================================
   ABOUT US: iPad LANDSCAPE - CENTER 2 BLOCKS (image + text)
   - ไม่แตะ style ของข้อความ/เส้นใต้
   - แค่จัดทั้งแถวให้อยู่กึ่งกลาง
   ================================================== */
@media (min-width: 768px) and (max-width: 1180px) and (orientation: landscape){

  /* 1) ทำให้ทั้งแถวกลับมาอยู่กลางจริง ๆ */
  body.about-page .about-row:not(.about-reverse),
  body.about-page .about-row.about-reverse{
    margin-left: auto !important;
    margin-right: auto !important;
    justify-content: center !important;  /* 2 ก้อนรวมกันอยู่กลาง */
  }

  /* 2) ฆ่า offset 240px ที่ดันให้หลุด center */
  body.about-page .about-row:not(.about-reverse){
    margin-left: auto !important; /* ทับของเดิม 240px */
  }
  body.about-page .about-row.about-reverse{
    margin-right: auto !important; /* ทับของเดิม 240px */
  }

  /* 3) กัน margin-left ของฝั่งข้อความที่ทำให้ดูไม่บาลานซ์ */
  body.about-page .about-row > div:last-child{
    margin-left: 0 !important;  /* ไม่ไปแตะ text-align ข้างใน */
  }

  /* (optional) ถ้าอยากให้ 2 ก้อนชิด/ห่างกันปรับแค่ gap */
  body.about-page .about-row{
    gap: 40px !important; /* ปรับ 28–50 ได้ */
  }
}


/* ==================================================
   ABOUT US: iPad LANDSCAPE - SCALE DOWN 2 IMAGES (keep ratio)
   ================================================== */
@media (min-width: 768px) and (max-width: 1180px) and (orientation: landscape){

  /* รูปบน (about-1.jpg) */
  body.about-page .about-info .about-row > div:first-child img{
    width: 420px !important;         /* ✅ ลดขนาด (ปรับ 420–500 ได้) */
    height: auto !important;         /* ✅ ไม่บิด */
    aspect-ratio: 550 / 380 !important; /* ✅ คงทรงเดิมจากของคุณ */
    object-fit: cover !important;
  }

  /* รูปล่าง (about-2.jpg) */
  body.about-page .about2-info .about-row.about-reverse > div:last-child img{
    width: 420px !important;         /* ✅ ลดขนาด (ปรับ 420–500 ได้) */
    height: auto !important;
    aspect-ratio: 550 / 380 !important; /* ✅ คงทรงเดิม */
    object-fit: cover !important;
  }
}

/* ==================================================
   ABOUT US (TOP): iPad LANDSCAPE - make text flow (no fixed lines)
   - ทำเฉพาะย่อหน้าใต้ title ใน section บน (about-info)
   ================================================== */
@media (min-width: 768px) and (max-width: 1180px) and (orientation: landscape){

  /* ย่อหน้าใต้หัวข้อ (ที่ใช้ .lock-lines อยู่) */
  body.about-page .about-info p.about-text.lock-lines{
    white-space: normal !important;   /* ✅ ไหลเหมือนหน้า home */
    margin-top: 25px !important;      /* ✅ ระยะจาก title (ปรับ 10–20 ได้) */
  }
}
/* ==================================================
   ABOUT (iPad LANDSCAPE): fix huge spaces in about-text
   - ไม่แก้ HTML
   - ทำให้ข้อความไหลเหมือนหน้า home
   ================================================== */
@media (min-width: 1024px) and (max-width: 1180px) and (orientation: landscape){

  /* ให้ข้อความไหล + ตัดปัญหาช่องว่างระหว่าง <span> */
  body.about-page .about-info .about-text{
    white-space: normal !important; /* ไหลๆ ไม่ฟิคตามขึ้นบรรทัด */
    font-size: 0 !important;        /* ✅ ฆ่า whitespace text node ระหว่าง span */
    text-align: left;            /* จะคง justify ก็ได้ (ไม่ถ่างแล้ว) */
  }

  /* คืนค่าฟอนต์ให้ข้อความจริงใน span */
  body.about-page .about-info .about-text span{
    font-size: 16px;                /* ปรับตามเดิมของคุณได้ */
    line-height: 1.8;
  }
}
/* ==================================================
   ABOUT (iPad แนวนอน)
   - ข้อความอยู่บน / รูปอยู่ล่าง (รูปกลาง)
   - ไม่เปลี่ยนขนาดรูปเดิม
   ================================================== */

@media (min-width: 1024px) and (max-width: 1180px) and (orientation: landscape){

  /* เรียงแนวตั้ง */
  body.about-page .about-info .about-row{
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    gap: 22px !important;
  }

  /* สลับลำดับ: กล่องข้อความขึ้นก่อน รูปลงหลัง */
  body.about-page .about-info .about-row > :first-child{
    order: 2 !important; /* รูป */
  }
  body.about-page .about-info .about-row > :last-child{
    order: 1 !important; /* ข้อความ */
  }

  /* จัดกึ่งกลางทั้งสองก้อน */
  body.about-page .about-info .about-row > :first-child,
  body.about-page .about-info .about-row > :last-child{
    margin-left: auto !important;
    margin-right: auto !important;
    width: 100%;
  }

  /* ให้กล่องข้อความอ่านสวย (ไม่บังคับก็ได้ แต่ช่วยไม่ให้ยาวเต็มจอเกิน) */
  body.about-page .about-info .about-row > :last-child{
    max-width: 900px;
  }

  /* รูป: ไม่แตะขนาดเดิม แค่จัดให้อยู่กลาง */
  body.about-page .about-info .about-row img{
    width: auto !important;
    height: auto !important;
    margin: 0 auto !important;
  }
}
@media (min-width: 1024px) and (max-width: 1180px) and (orientation: landscape){

  body.about-page .about-info .about-row{
    gap: 32px !important; /* เดิม 22px -> เพิ่มระยะรวม */
  }

  /* เพิ่มระยะเฉพาะก่อนรูป (รูปอยู่ order:2) */
  body.about-page .about-info .about-row > :first-child{
    margin-top: 16px !important;
  }
}
/* ==================================================
   ABOUT (iPad Landscape): Mission = text then image (center)
   - ย้ายรูปไปอยู่ใต้เนื้อหา
   - จัดทั้งก้อน (ข้อความ + รูป) ให้อยู่กลาง
   ================================================== */
@media (min-width: 1024px) and (max-width: 1180px) and (orientation: landscape){

  /* แถวพันธกิจ: จัดเป็นแนวตั้ง */
  body.about-page .about2-info .about-row.about-reverse{
    flex-direction: column !important;
    align-items: center !important;     /* ✅ ทั้งก้อนอยู่กลาง */
    justify-content: center !important;
    gap: 18px !important;              /* ✅ เว้นระยะข้อความกับรูป */
    margin-left: auto !important;
    margin-right: auto !important;
  }

  /* ก้อนข้อความ (พันธกิจ) */
  body.about-page .about2-info .about-row.about-reverse > div:first-child{
    flex: 0 0 auto !important;
    max-width: 820px !important;       /* 🔧 คุมความกว้างอ่านง่าย (ปรับ 720–900) */
    width: 100% !important;
    margin: 0 auto !important;
  }

  /* ก้อนรูป (about-2) ให้มาอยู่ล่าง + อยู่กลาง */
  body.about-page .about2-info .about-row.about-reverse > div:last-child{
    width: 100% !important;
    display: flex !important;
    justify-content: center !important; /* ✅ รูปอยู่กลาง */
  }

  /* ขนาดรูป: ใช้ “ขนาดเล็กที่คุณเคยตั้งไว้” (ไม่บิดทรง) */
  body.about-page .about2-info .about-row.about-reverse > div:last-child img{
    width: 420px !important;           /* 🔧 ถ้าคุณมีเลข “ขนาดเล็ก” เดิม เปลี่ยนเป็นเลขนั้น */
    height: auto !important;           /* ✅ ไม่เสียทรง */
    aspect-ratio: 550 / 380 !important;/* ✅ รักษาทรงเดิมจากเดิมคุณ (550x380) */
    object-fit: cover !important;
    margin: 0 auto !important;
  }
}


@media (min-width: 1024px) and (max-width: 1180px) and (orientation: landscape){
  body.about-page .about2-info .about-row.about-reverse > div:last-child img{
    margin-top: 32px !important;   /* ✅ ระยะข้อความ↔รูป */
  }
}


@media (min-width: 1024px) and (max-width: 1180px) and (orientation: landscape){
  body.about-page .about2-info .about-row.about-reverse{ margin-top: 0 !important; }
  body.about-page .about2-info .about2-title{ margin-top: 0 !important; }
}
/* ==================================================
   ABOUT US: iPad PORTRAIT - make same as LANDSCAPE fix
   - ข้อความอยู่บน / รูปอยู่ล่าง (รูปกลาง)
   - จัดก้อนให้อยู่กลาง
   - ข้อความไหล (ไม่ล็อคบรรทัด / ไม่ถ่างช่อง span)
   ================================================== */
@media (min-width: 768px) and (max-width: 1180px) and (orientation: portrait){

  /* =========================
     A) SECTION บน (about-info)
     ========================= */

  /* เรียงแนวตั้ง + กลาง */
  body.about-page .about-info .about-row{
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 32px !important;  /* ปรับได้ */
    margin-left: auto !important;
    margin-right: auto !important;
  }

  /* สลับลำดับ: ข้อความขึ้นก่อน รูปลงหลัง */
  body.about-page .about-info .about-row > :first-child{
    order: 2 !important; /* รูป */
    margin-top: 16px !important; /* ระยะก่อนรูป */
  }
  body.about-page .about-info .about-row > :last-child{
    order: 1 !important; /* ข้อความ */
    width: 100% !important;
    max-width: 900px !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }

  /* รูปบน: ขนาดเท่าที่ใช้ใน landscape (ไม่บิดทรง) */
  body.about-page .about-info .about-row > div:first-child img{
    width: 420px !important;          /* ปรับ 380–480 ได้ */
    height: auto !important;
    aspect-ratio: 550 / 380 !important;
    object-fit: cover !important;
    margin: 0 auto !important;
  }

  /* ข้อความย่อหน้าใต้หัวข้อให้ไหล (ถ้ามี .lock-lines) */
  body.about-page .about-info p.about-text.lock-lines{
    white-space: normal !important;
    margin-top: 25px !important;
  }

  /* กันช่องว่างตัวหนังสือถ่างจาก span (ถ้า about-text เป็น span หลายตัว) */
  body.about-page .about-info .about-text{
    white-space: normal !important;
    font-size: 0 !important;      /* ฆ่า whitespace ระหว่าง span */
    text-align: left;             /* ถ้าจะ justify ก็เปลี่ยนได้ */
  }
  body.about-page .about-info .about-text span{
    font-size: 16px !important;
    line-height: 1.8 !important;
  }


  /* =========================
     B) SECTION พันธกิจ (about2-info)
     ========================= */

  /* ให้พันธกิจ: ข้อความบน รูปล่าง (กลาง) */
  body.about-page .about2-info .about-row.about-reverse{
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 18px !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }

  /* กล่องข้อความพันธกิจ */
  body.about-page .about2-info .about-row.about-reverse > div:first-child{
    flex: 0 0 auto !important;
    width: 100% !important;
    max-width: 820px !important;
    margin: 0 auto !important;
  }

  /* กล่องรูปพันธกิจ */
  body.about-page .about2-info .about-row.about-reverse > div:last-child{
    width: 100% !important;
    display: flex !important;
    justify-content: center !important;
  }

  /* รูปล่าง: ขนาดเท่าที่ใช้ใน landscape */
  body.about-page .about2-info .about-row.about-reverse > div:last-child img{
    width: 420px !important;         /* ปรับ 380–480 ได้ */
    height: auto !important;
    aspect-ratio: 550 / 380 !important;
    object-fit: cover !important;
    margin: 32px auto 0 !important;  /* ระยะข้อความ↔รูป */
  }

  /* ลดช่องว่างบนหัวข้อ/แถว (กันเกิดช่องโหว่) */
  body.about-page .about2-info .about-row.about-reverse{ margin-top: 0 !important; }
  body.about-page .about2-info .about2-title{ margin-top: 0 !important; }
}

/*map*/
/* ==================================================
   CONTACT: iPad แนวตั้ง 768 x 1024
   - ลดขนาด map ไม่ให้ล้น
   - กระทบเฉพาะ viewport นี้เท่านั้น
   ================================================== */
@media (width: 768px) and (height: 1024px) and (orientation: portrait) {

  /* กันเผื่อล้นแนวนอน (ถ้ามี) */
  .contact-page .page-wrapper{
    overflow-x: hidden;
  }

  /* ให้แผนที่ไม่หลุด container */
  .contact-page .map-wrapper{
    width: 100%;
    max-width: 720px;
    margin: 20px auto 0;
  }

  /* override width/height ที่ติดมากับ iframe ใน HTML */
  .contact-page .map-wrapper iframe{
    display: block;
    width: 100% !important;
    max-width: 100% !important;
    height: 320px !important; /* ลดสูงลงกันล้น (ปรับเป็น 300/280 ได้) */
    border: 0;
  }
}





/*
==================================================
iPad ONLY (1027x768 + 768x1024)
INSIGHTS: ซ่อนรูปวงกลม 3 รูปให้หายไปเลย
- ไม่กระทบจออื่น
==================================================

iPad แนวนอน: 1027×768
@media screen and (width: 1024px) and (height: 768px) {

  ซ่อนวงกลมทั้งหมดในหน้า insights
  .insights-page .insight-circle,
  .insights-page .insight-circle * ,
  .insights-page .circle,
  .insights-page .circle * ,
  .insights-page .circle-image,
  .insights-page .circle-img,
  .insights-page .insight-circle-img,
  .insights-page .insight-circle-image{
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    transform: none !important;
    animation: none !important;
    transition: none !important;
    pointer-events: none !important;
  }

  กันกรณีตัววงกลมเป็น pseudo-element
  .insights-page .insight-circle::before,
  .insights-page .insight-circle::after{
    content: none !important;
    display: none !important;
  }
}

iPad แนวตั้ง: 768×1024
@media screen and (width: 768px) and (height: 1024px) {

  .insights-page .insight-circle,
  .insights-page .insight-circle * ,
  .insights-page .circle,
  .insights-page .circle * ,
  .insights-page .circle-image,
  .insights-page .circle-img,
  .insights-page .insight-circle-img,
  .insights-page .insight-circle-image{
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    transform: none !important;
    animation: none !important;
    transition: none !important;
    pointer-events: none !important;
  }

  .insights-page .insight-circle::before,
  .insights-page .insight-circle::after{
    content: none !important;
    display: none !important;
  }
}
*/



/* ==================================================
   INSIGHTS PAGE: iPad only — HIDE insight-circle images
   (768x1024 + 1024x768 เท่านั้น)
   ================================================== */

@media screen and (width: 768px) and (height: 1024px),
       screen and (width: 1024px) and (height: 768px){

  /* ซ่อนวงกลม + รูป */
  body.insights-page .insight-circle{
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
  }

  /* กันกรณีมีตัวอื่นเผื่อไว้ */
  body.insights-page .insight-circle *{
    display: none !important;
  }

  /* คืนพื้นที่ให้ฝั่งข้อความ (เพราะเดิม layout มักเผื่อที่รูปไว้) */
  body.insights-page .insight-split__inner{
    grid-template-columns: 1fr !important; /* ถ้าใช้ grid */
  }

  body.insights-page .insight-content{
    width: 100% !important;
    max-width: 100% !important;
  }
}

/* ==================================================
   INSIGHTS (iPad 768x1024 + 1024x768)
   - ให้ข้อความ insight2/3/4 ไหลเอง ไม่ย่น ไม่ล็อคบรรทัด
   - ไม่แตะลูกศร (ตำแหน่งเดิม)
   ================================================== */

@media screen and (width: 768px) and (height: 1024px),
       screen and (width: 1024px) and (height: 768px){

  /* 1) คืนพื้นที่เต็มให้ content เพราะ iPad คุณซ่อนวงกลมแล้ว */
  body.insights-page .insight-split--right .insight-content,
  body.insights-page .insight-split--left  .insight-content{
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    max-width: none !important;
    width: 100% !important;
  }

  /* 2) ให้ “ข้อความไหลเอง” (ยกเลิกการบังคับขึ้นบรรทัด/ล็อคบรรทัด) */
  body.insights-page .insight2-info .insight-point,
  body.insights-page .insight3-info .insight-point,
  body.insights-page .insight4-info .insight-point{
    white-space: normal !important;     /* ✅ ไหลเอง */
    text-align: justify;                /* คงฟีลเดิม */
    overflow-wrap: anywhere;            /* กันคำยาวดันล้น */
    word-break: break-word;             /* กันคำอังกฤษยาวๆ */
  }

  /* 3) ถ้ามี .manual-break ที่เคยบังคับ pre-line -> iPad ให้ไหลเองเหมือนกัน */
  body.insights-page .insight2-info .insight-point.manual-break,
  body.insights-page .insight3-info .insight-point.manual-break,
  body.insights-page .insight4-info .insight-point.manual-break{
    white-space: normal !important;     /* ✅ ไม่ตาม Enter */
  }

  /* 4) ไม่ไปแตะลูกศร: ปล่อย ::before / text-indent ของคุณทำงานเหมือนเดิม */
  /* (ไม่ต้องใส่อะไรเพิ่ม) */
}



/* ==================================================
   INSIGHTS: iPad only (1024x768 / 768x1024)
   - ยกเลิกการเยื้องของก้อนที่มี .is-indent / .pp-indent-right
   - ให้ลูกศร + ข้อความชิดเท่าก้อนอื่น
   ================================================== */

@media (min-width: 768px) and (max-width: 1024px) {

  /* 1) ยกเลิกการ indent เฉพาะก้อนที่เคยเยื้อง */
  .insights-page .insight-point.is-indent,
  .insights-page .insight-point.pp-indent-right,
  .insights-page .insight-point.is-indent.pp-indent-right{
    margin-left: 0 !important;
    padding-left: 0 !important;
    text-indent: 0 !important;
  }

  /* 2) ถ้าลูกศรทำด้วย ::before (ส่วนใหญ่จะเป็นแบบนี้)
        ให้ตำแหน่งลูกศร “เท่าก้อนอื่น” */
  .insights-page .insight-point.is-indent::before,
  .insights-page .insight-point.pp-indent-right::before,
  .insights-page .insight-point.is-indent.pp-indent-right::before{
    left: 0 !important;
  }

  /* 3) กันกรณีมีการใส่ padding ให้กล่องย่อยของ is-indent */
  .insights-page .insight-point.is-indent > *{
    margin-left: 0 !important;
  }
}

/* ==================================================
   INSIGHTS: iPad only (1024x768 / 768x1024)
   แก้เฉพาะก้อนที่มี is-indent: ข้อความทับลูกศร
   ================================================== */
@media (min-width: 768px) and (max-width: 1024px) {

  /* เฉพาะก้อนที่เคย indent -> เพิ่มระยะซ้ายให้เท่าก้อนอื่น */
  .insights-page .insight-point.is-indent{
    padding-left: 26px !important;   /* เว้นที่ให้ลูกศร */
    margin-left: 0 !important;       /* ยกเลิกการดันแบบเดิม */
    text-indent: 0 !important;       /* กันการย่อหน้าไปทับลูกศร */
  }

  /* ถ้า PP มีคลาส pp-indent-right ร่วมด้วย ก็ให้ใช้กฎเดียวกัน */
  .insights-page .insight-point.is-indent.pp-indent-right{
    padding-left: 26px !important;
    margin-left: 0 !important;
    text-indent: 0 !important;
  }
}
/* ==================================================
   INSIGHTS: iPad only (1024x768 / 768x1024)
   ทำให้เฉพาะก้อน is-indent:
   - บรรทัดแรกไม่ทับลูกศร
   - บรรทัดถัดไปอยู่ใต้ลูกศร (ไม่เว้นหน้า)
   ================================================== */
@media (min-width: 768px) and (max-width: 1024px) {

  /* เฉพาะก้อนที่เคยมี is-indent เท่านั้น */
  .insights-page .insight-point.is-indent{
    padding-left: 0 !important;   /* ไม่ดันทั้งย่อหน้า */
    margin-left: 0 !important;
    text-indent: 26px !important; /* ดันแค่บรรทัดแรกให้พ้นลูกศร */
  }

  /* PP ที่มี pp-indent-right ก็ใช้กฎเดียวกัน */
  .insights-page .insight-point.is-indent.pp-indent-right{
    padding-left: 0 !important;
    margin-left: 0 !important;
    text-indent: 26px !important;
  }
}
/* ==================================================
   iPad only (768-1024):
   HDPE + PE (insight-split--right) ให้ content ใช้พื้นที่เต็ม
   - ไม่ล้นจอ (ยังมีขอบ container)
   - ซ่อนวงกลม (กันจองพื้นที่/ดัน layout)
   ================================================== */
@media (min-width: 768px) and (max-width: 1024px){

  /* 1) ซ่อนวงกลมเฉพาะ 2 ก้อนนี้ */
  .insights-page .insight2-info .insight-circle,
  .insights-page .insight4-info .insight-circle{
    display: none !important;
  }

  /* 2) ทำให้ inner เป็นบล็อกเดียว ไม่แบ่งซ้าย/ขวา */
  .insights-page .insight2-info.insight-split--right .insight-split__inner,
  .insights-page .insight4-info.insight-split--right .insight-split__inner{
    display: block !important;       /* ทับ flex/grid เดิม */
    width: 100% !important;
    max-width: 100% !important;
  }

  /* 3) content กินเต็มในกรอบ container (มีขอบ ไม่ล้น) */
  .insights-page .insight2-info.insight-split--right .insight-content,
  .insights-page .insight4-info.insight-split--right .insight-content{
    width: 100% !important;
    max-width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding-right: 0 !important;     /* เอาพื้นที่กันวงกลมด้านขวาออก */
    box-sizing: border-box !important;
  }

  /* 4) ถ้ามี rule เดิมที่ “ดันทั้งแถว” ให้รีเซ็ต (กันล้น) */
  .insights-page .insight2-info .about-row,
  .insights-page .insight4-info .about-row{
    margin-left: auto !important;
    margin-right: auto !important;
    transform: none !important;
    left: auto !important;
    right: auto !important;
    width: 100% !important;
    max-width: 100% !important;
  }

  /* 5) กันล้นแนวนอนแบบชัวร์เฉพาะ 2 ก้อนนี้ */
  .insights-page .insight2-info,
  .insights-page .insight4-info{
    overflow-x: hidden !important;
  }
}


/* ==================================================
   iPad only (768-1024):
   ทำให้ก้อน PP (insight3) ไม่เป็น left แล้ว ให้เหมือน right
   ================================================== */
@media (min-width: 768px) and (max-width: 1024px){

  /* 1) บังคับให้ก้อน PP จัดเลย์เอาต์เหมือน --right */
  .insights-page .insight3-info.insight-split--left .insight-split__inner{
    flex-direction: row !important;   /* กันกรณี left ไปสลับเป็น row-reverse */
    justify-content: space-between !important;
    align-items: center !important;
  }

  /* 2) รีเซ็ตระยะ/การดันที่มักมีในฝั่ง left (กันล้น + ให้มีขอบเท่าก้อนอื่น) */
  .insights-page .insight3-info.insight-split--left .about-row{
    margin-left: auto !important;
    margin-right: auto !important;
    transform: none !important;
    left: auto !important;
    right: auto !important;
    width: 100% !important;
    max-width: 100% !important;
  }

  /* 3) ให้ content อยู่ในกรอบ container เหมือนก้อนอื่น */
  .insights-page .insight3-info.insight-split--left .insight-content{
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    box-sizing: border-box !important;
  }

  /* 4) กันล้นแนวนอนแบบชัวร์ */
  .insights-page .insight3-info{
    overflow-x: hidden !important;
  }
}

/* ==================================================
   iPad only (768-1024): แก้ช่องไฟกว้างจาก justify
   ================================================== */
@media (min-width: 768px) and (max-width: 1024px){

  /* เป้าหมาย: ข้อความในก้อน Insight ทั้งหมด */
  .insights-page .insight-point{
    text-align: justify !important;        /* ตัด justify ที่ทำให้ช่องไฟยืด */
    /*text-justify: auto !important;*/
    word-spacing: normal !important;
    letter-spacing: normal !important;
    white-space: normal !important;
  }

  /* เผื่อมีบางที่ไปตั้ง justify ไว้ที่พาเรนต์ */
  .insights-page .insight-points,
  .insights-page .insight-content{
    text-align: justify !important;
    /*text-justify: auto !important;*/
  }
}

/* ==================================================
   PRODUCTS (DETAIL) – iPad only 768x1024 / 1024x768
   แก้ตำแหน่งเท่านั้น:
   - gallery อยู่กลาง
   - info ลงล่าง + เว้นระยะ
   - ทุกอย่างอยู่กลาง + มีขอบซ้าย/ขวาเท่ากัน
   - ห้ามทำให้ hidden พัง / ปุ่มพัง
   ================================================== */
@media (min-width: 768px) and (max-width: 1024px){

  /* กันล้นจอแบบเบาๆ */
  .products-page .page-wrapper{ overflow-x: hidden; }

  /* ทำเฉพาะตัวที่ "กำลังแสดง" เท่านั้น (ไม่ใช่ .hidden) */
  .products-page .product-detail:not(.hidden){
    /* ไม่บังคับ display ใหม่! แค่จัด flow ให้ลงล่าง */
    width: 100%;
    max-width: 920px;
    margin: 0 auto;
    padding-left: 24px;
    padding-right: 24px;

    /* ถ้าของเดิมเป็น flex หรือ grid อยู่แล้ว ใช้ wrap ให้ลงบรรทัด */
    flex-wrap: wrap;
    justify-content: center;
    align-items: flex-start;

    /* เว้นระยะระหว่างบล็อก */
    row-gap: 22px;
  }

  /* gallery: ให้กินเต็มแถว และอยู่กลาง */
  .products-page .product-detail:not(.hidden) .product-detail-image.product-gallery{
    width: 100%;
    max-width: 640px;
    margin: 0 auto;
  }

  /* รูปใหญ่ไม่ล้น */
  .products-page .product-detail:not(.hidden) .main-img{
    width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
  }

  /* thumb bar อยู่กลาง ไม่ไปยุ่งปุ่ม */
  .products-page .product-detail:not(.hidden) .thumb-bar{
    width: 100%;
    max-width: 640px;
    margin: 12px auto 0;
  }

  /* info: ลงล่าง กินเต็มแถว และอยู่กลาง */
  .products-page .product-detail:not(.hidden) .product-detail-info{
    width: 100%;
    max-width: 640px;
    margin: 0 auto;
  }

  /* ให้บรรทัดข้อความมีขอบเท่ากัน */
  .products-page .product-detail:not(.hidden) .product-detail-info .line{
    margin-left: 0;
    margin-right: 0;
  }

  /* ถ้าของเดิมใช้ float แยกซ้าย-ขวา ให้ปลดเฉพาะตอนแสดง */
  .products-page .product-detail:not(.hidden) .product-detail-image,
  .products-page .product-detail:not(.hidden) .product-detail-info{
    float: none;
  }
}
/* ==================================================
   PRODUCTS (DETAIL) – iPad spacing tweak only
   - เพิ่มระยะ: รูปหลัก ↔ รูปรอง (thumb)
   - เพิ่มระยะ: gallery ↔ เนื้อหา
   - ไม่แตะ display/hidden ไม่ทำให้ปุ่มพัง
   ================================================== */
@media (min-width: 768px) and (max-width: 1024px){

  /* 1) เพิ่มระยะ "รูปหลัก" กับ "แถบรูปย่อย" */
  .products-page .product-detail:not(.hidden) .main-img{
    margin-bottom: 30px; /* เดิมถ้าชิดไป เพิ่มตรงนี้ */
  }

  /* เผื่อบางหน้ามี margin เดิมอยู่แล้ว คุมให้ชัวร์ */
  .products-page .product-detail:not(.hidden) .thumb-bar{
    margin-top: 0;        /* ให้ระยะใช้จาก main-img เป็นหลัก */
    padding-top: 6px;     /* เพิ่มช่องว่างเล็กๆ ก่อนเข้า thumb */
  }

  /* 2) เพิ่มระยะ "gallery ทั้งก้อน" กับ "เนื้อหา" */
  .products-page .product-detail:not(.hidden){
    row-gap: 30px;  /* ระยะระหว่าง gallery (บล็อกบน) กับ info (บล็อกล่าง) */
  }

  /* สำรอง: ถ้าของเดิมไม่ใช้ row-gap (ไม่ใช่ flex) ให้มี margin-top ที่ info */
  .products-page .product-detail:not(.hidden) .product-detail-info{
    margin-top: 8px;
  }
}
/* ==================================================
   PRODUCTS (DETAIL) – iPad: เพิ่ม bottom ใต้ "เนื้อหา"
   - เพิ่มพื้นที่ด้านล่างของกล่องข้อมูล (product-detail-info)
   - ไม่แตะ display/hidden ไม่ทำให้ปุ่มพัง
   ================================================== */
@media (min-width: 768px) and (max-width: 1024px){

  /* เพิ่ม bottom ใต้เนื้อหา (ในบล็อกข้อมูล) */
  .products-page .product-detail:not(.hidden) .product-detail-info{
    padding-bottom: 28px;   /* เพิ่มพื้นที่ด้านในให้ดูหายใจ */
  }

  /* เผื่ออยากให้มีพื้นที่ต่อท้ายทั้ง section ของหน้าย่อยด้วย (กันชน footer) */
  .products-page .product-detail:not(.hidden){
    padding-bottom: 18px;   /* เพิ่มพื้นที่ด้านล่างทั้งก้อนรายละเอียด */
  }

}
/* ==================================================
   PRODUCTS (DETAIL) – iPad: ทำให้เลื่อน thumbnail ได้ด้วยการลาก/สกรอลล์
   - ไม่แตะ JS ไม่กระทบปุ่ม prev/next
   ================================================== */
@media (min-width: 768px) and (max-width: 1024px){

  /* ทำให้ viewport เป็นพื้นที่ scroll แนวนอน */
  .products-page .product-detail:not(.hidden) .thumb-viewport{
    overflow-x: auto !important;
    overflow-y: hidden !important;
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
    pointer-events: auto !important;

    /* ฟีลลากด้วยเม้าส์/แทร็กแพด */
    cursor: grab;
  }
  .products-page .product-detail:not(.hidden) .thumb-viewport:active{
    cursor: grabbing;
  }

  /* ให้แถว thumbnail กว้างตามจำนวนรูปจริง เพื่อให้มีอะไรให้เลื่อน */
  .products-page .product-detail:not(.hidden) .thumb-track{
    display: flex !important;
    width: max-content !important;
    gap: 10px;                 /* ระยะห่างรูปย่อย */
    pointer-events: auto !important;
  }

  /* กันโดนบีบแล้วไม่เหลือพื้นที่ scroll */
  .products-page .product-detail:not(.hidden) .thumb{
    flex: 0 0 auto;
  }

  /* กันปุ่มทับพื้นที่ลาก (แต่ยังคลิกได้เหมือนเดิม) */
  .products-page .product-detail:not(.hidden) .thumb-nav{
    position: relative;
    z-index: 2;
  }
}



/*map*/
/* ==================================================
   CONTACT: iPad แนวตั้ง 768 x 1024
   - ลดขนาด map ไม่ให้ล้น
   - กระทบเฉพาะ viewport นี้เท่านั้น
   ================================================== */
@media (width: 768px) and (height: 1024px) and (orientation: portrait) {

  /* กันเผื่อล้นแนวนอน (ถ้ามี) */
  .contact-page .page-wrapper{
    overflow-x: hidden;
  }

  /* ให้แผนที่ไม่หลุด container */
  .contact-page .map-wrapper{
    width: 100%;
    max-width: 720px;
    margin: 20px auto 0;
  }

  /* override width/height ที่ติดมากับ iframe ใน HTML */
  .contact-page .map-wrapper iframe{
    display: block;
    width: 100% !important;
    max-width: 100% !important;
    height: 320px !important; /* ลดสูงลงกันล้น (ปรับเป็น 300/280 ได้) */
    border: 0;
  }
}