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

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

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

.sarabun-regular {
  font-family: "Sarabun", sans-serif !important;
  font-weight: 400;
  font-style: normal;
}

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

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

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

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

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

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

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

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

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

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

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

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



/* By default, hide .mobile_on and show .mobile_off */
.mobile_on {
  display: none;
}
.mobile_off {
  display: block;
}

/* When viewport width is 767px or less (mobile) */
@media (max-width: 767.98px) {
  .mobile_on {
    display: block;
  }
  .mobile_off {
    display: none;
  }
}

/* When viewport width is 768px or more (desktop/tablet) */
@media (min-width: 768px) {
  .mobile_on {
    display: none;
  }
  .mobile_off {
    display: block;
  }
}


/* ตัว wrapper ความสูงเท่ากัน */
.product-image {
  height: 250px;        /* ปรับความสูงตามต้องการ */
  overflow: hidden;
  position: relative;
  display: flex;
  align-items: center;  /* จัดรูปในแนวตั้งตรงกลาง */
  justify-content: center; /* จัดรูปในแนวนอนตรงกลาง */
}

/* รูปใน .product-image */
.product-image img {
  max-width: 100%;      /* ห้ามเกินความกว้าง */
  max-height: 100%;     /* ห้ามเกินความสูง */
  object-fit: contain;  /* ย่อ-ขยายโดยรักษาสัดส่วน */
  display: block;
}

/* ปรับกรอบรูปให้สูงขึ้น และจัดการครอป/วางรูป */
.card-img-top {
  height: 250px;           /* ปรับความสูงตามต้องการ */
  width: 100%;
  object-fit: contain;     /* ย่อ/ขยายให้พอดีกรอบ โดยไม่ตัดส่วนหัวออก */
  object-position: center; /* จัดภาพกึ่งกลางทั้งแนวนอนและแนวตั้ง */
  background-color: #f8f9fa; /* พื้นหลังสำรอง ให้ไม่โปร่ง */
}

/* ยืดการ์ดให้เท่ากัน */
.row.g-4 {
  display: flex;
  flex-wrap: wrap;
}
.row.g-4 > .col-md-3 {
  display: flex;
}
.row.g-4 > .col-md-3 .card {
  display: flex;
  flex-direction: column;
  flex: 1;
}

/* ให้เนื้อหาการ์ดอยู่ด้านล่างของกรอบภาพ */
.card-body {
  flex: 0 0 auto;
  padding: 1rem;
  text-align: center;
}

/* custom.css */
/* กรอบรูปคงความสูง 180px, เป็น flex เพื่อกึ่งกลางภาพ */
.tph-img-wrapper {
  height: 180px;
  overflow: hidden;
  background: #fff;
}

/* รูปปรับเป็น auto width, max-height 100%, อยู่กึ่งกลาง */
.tph-img {
  max-height: 100%;
  max-width: 100%;
  object-fit: contain;
  display: block;
}

 

/* เอฟเฟกต์ hover เฉพาะ */
.tph-hover {
  transition: transform .3s, box-shadow .3s;
}
.tph-hover:hover {
  transform: translateY(-5px) scale(1.02);
  box-shadow: 0 0.5rem 1rem rgba(0,0,0,0.15);
}

.tplink {
  color: gold;
  text-decoration: none;
  transition: color 0.2s ease-in-out;
}

.tplink:hover {
  color: silver;
}

.text-gold {
  color: #d4af37 !important; /* สีทองแบบมาตรฐาน */
}

.text-white {
  color: #ffffff !important;
}

.lcp-img {
  aspect-ratio: 3 / 2;
  object-fit: cover;
  max-width: 100%;
  height: auto;
  display: block;
}
