/* การ์ดสินค้า: โหลดหลัง CSS ของหน้าและ tci-shared.css
   ปรับขนาดผ่าน --tci-product-card-flex, --tci-product-card-min และ --tci-product-card-max บนกรอบครอบการ์ด. */

/* Scoped reset ต้องอยู่ก่อนกฎของการ์ดและองค์ประกอบภายใน. */
.tci-shared-product-card,
.tci-shared-product-card * {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

.tci-shared-product-card :where(a) {
  text-decoration: none;
  color: inherit;
}

.tci-shared-product-card :where(ul) {
  list-style: none;
}

.tci-shared-product-card {
  flex: var(--tci-product-card-flex, 0 1 auto);
  min-width: var(--tci-product-card-min, 300px);
  max-width: var(--tci-product-card-max, 300px);
  scroll-snap-align: start;
  background: #ffffff;
  border: 1px solid #f4f4f4;
  border-radius: 12px;
  padding: 24px 32px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.06);
  font-family: var(--tci-font-body);
  color: #414141;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.tci-shared-product-card:hover {
  transform: translateY(-4px);
  border-color: var(--tci-orange);
  box-shadow: 0 12px 24px rgba(242, 110, 35, 0.25);
}

.tci-shared-product-image {
  display: block;
  width: 70px;
  height: 70px;
  flex-shrink: 0;
  border-radius: 50%;
  margin: 0 auto 16px;
  object-fit: contain;
}

/* จองความสูงหัวข้อสองบรรทัด เพื่อให้เนื้อหาการ์ดเรียงตรงกัน. */
.tci-shared-product-title {
  padding: 0;
  margin: 0;
  color: #414141;
  font-family: var(--tci-font-heading);
  font-size: 28px;
  font-style: normal;
  font-weight: var(--tci-title-weight);
  line-height: 1.2;
  letter-spacing: 0;
  text-align: center;
  min-height: 2.4em;
  display: flex;
  align-items: center;
  justify-content: center;
}

.tci-shared-product-desc {
  margin: 8px 0 0;
  color: var(--tci-orange);
  font-family: var(--tci-font-body);
  font-size: 16px;
  font-style: normal;
  font-weight: 400;
  line-height: 150%;
  letter-spacing: 0;
  text-align: center;
}

.tci-shared-check-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: fit-content;
  max-width: 100%;
  align-self: center;
  margin: 16px 0 20px;
}

.tci-shared-check-list li {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  font-size: 16px;
  color: var(--tci-dark);
  line-height: 1.6;
}

/* จัดไอคอนกึ่งกลางบรรทัดแรก โดยไม่เปลี่ยนระยะเมื่อข้อความขึ้นหลายบรรทัด. */
.tci-shared-check-list li > .tci-shared-icon-check {
  margin-top: calc((1.6em - var(--tci-icon-size, 16px)) / 2);
}

/* margin-top: auto จัดปุ่มชิดท้ายการ์ด. ใช้ได้ทั้ง <button> และ <a href>
   (display:flex + align/justify center ให้ข้อความอยู่กลางปุ่มแนวตั้งเท่ากัน
   ไม่งั้น <a> จะชิดบนเพราะไม่จัดกลางเองแบบ <button>). */

.tci-shared-product-card .tci-shared-product-details-link {
  display: flex;
  align-items: center;
  justify-content: center;
  align-self: center;
  text-decoration: none;
  width: auto;
  max-width: 100%;
  min-height: 44px;
  text-align: center;
  background: var(--tci-orange);
  color: #FFFFFF;
  font-family: var(--tci-font-body);
  font-size: 14px;
  font-weight: 700;
  border-radius: 999px;
  padding: 10px 20px;
  margin-top: auto;
}

/* คงสีเดิมตอน hover — กัน a:hover { color: #0056b3 } ของ Bootstrap บนเว็บจริง
   (specificity 0,1,1 ชนะ class ของลิงก์ แต่แพ้ .class:hover). */
.tci-shared-product-card .tci-shared-product-details-link:hover {
  color: #FFFFFF;
}

.tci-shared-view-all-link:hover {
  color: var(--tci-orange);
}

/* ลิงก์ดูทั้งหมดอยู่นอกการ์ด จึงมี reset ของตัวเอง. */
.tci-shared-view-all-link {
  display: block;
  text-align: center;
  text-decoration: none;
  color: var(--tci-orange);
  font-family: var(--tci-font-body);
  font-size: 14px;
  font-weight: 400;
  padding-bottom: 12px;
}



@media (max-width: 767.98px) {
  .tci-shared-product-desc { font-size: 12px; }
  .tci-shared-check-list li { font-size: 12px; }
  .tci-shared-product-card .tci-shared-product-details-link { font-size: 13px; }
  .tci-shared-view-all-link { font-size: 13px; }
}

/* Web typography: ใช้ขนาดกลาง 5 ประเภท. */
@media (min-width: 1024px) {
  .tci-shared-product-card {
    padding: 24px 40px;
  }
  .tci-shared-product-title {
    font-size: var(--tci-subtitle-size);
  }
  .tci-shared-product-desc,
  .tci-shared-check-list li,
  .tci-shared-product-card .tci-shared-product-details-link,
  .tci-shared-view-all-link {
    font-size: var(--tci-body-size);
  }
}
