/* Container หลัก */
.affiliate-container {
  display: flex;
  flex-direction: column;
  gap: 1px; /* ลดช่องว่างระหว่างการ์ด */
  /* margin: 1.5rem 0; */
  margin-top: 7px;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* Card สินค้าแต่ละตัว */
.aff-item {
  display: flex;
  align-items: center;
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 5px;
  padding: 3px; /* ปรับตามความต้องการ: 3px */
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.aff-item:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  border-color: #3498db;
}

/* รูปภาพสินค้า */
.aff-item img {
  width: 120px; /* ปรับขนาดลงเล็กน้อยเพื่อให้สมดุลกับ padding */
  height: auto; /* เปลี่ยนเป็น auto เพื่อให้แสดงภาพครบถ้วน */
  max-height: 120px;
  object-fit: contain; /* เปลี่ยนจาก cover เป็น contain เพื่อให้เห็นภาพครบทั้งใบ ไม่โดนตัด */
  border-radius: 4px;
  margin-right: 12px;
  background: #ffffff; /* เปลี่ยนเป็นสีขาวเพื่อให้เนียนไปกับภาพสินค้าส่วนใหญ่ */
}

/* รายละเอียดสินค้า */
.aff-details {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding-right: 8px;
}

.aff-details h4 {
  margin: 0;
  font-size: 1.1rem;
  color: #2c3e50;
  line-height: 1.2;
}

.aff-details p {
  margin: 0;
  font-size: 0.95rem;
  color: #666;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.aff-details p.aff-excerpt{
  color: blue;
}

/* ปุ่มกด */
.btn-buy {
  align-self: flex-start;
  background: #3498db;
  color: white !important;
  padding: 3px 12px; /* ปรับปุ่มให้กระทัดรัดขึ้น */
  border-radius: 3px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.85rem;
  transition: background 0.2s;
  margin-top: 4px;
}
.btn-buy:hover {
  background: #2980b9;
}

/* Responsive สำหรับมือถือ */
@media (max-width: 600px) {
  .aff-item {
    padding: 5px; /* มือถือเพิ่มนิดหนึ่งให้กดง่าย */
  }

  .aff-item img {
    width: 80px; /* บนมือถือให้เล็กลงแต่ยังคงสัดส่วน */
    height: 80px;
    margin-right: 10px;
  }

  .aff-details h4 {
    font-size: 1rem;
  }
}








/**********************************************************
Quote
**********************************************************/

/* คอนเทนเนอร์หลักที่ห่อหุ้ม Quote ทั้งหมด */
.quotes-container {
  /* margin: 2rem 0; */
  margin-top: 7px;
  display: flex;
  flex-direction: column;
  gap: 1px; /* ระยะห่างระหว่าง Quote แต่ละตัว */
}

/* สไตล์ของ blockquote แต่ละอัน */
.article-quote {
  position: relative;
  margin: 0;
  padding: 1.5rem 2rem;
  background-color: var(--main-dark) ; 
  border-left: 5px solid #222; /* เส้นขอบหนาด้านซ้าย */
  border-right: 5px solid #222; /* เส้นขอบหนาด้านซ้าย */
  border-radius: 7px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

/* สไตล์ข้อความภายใน Quote */
.quote-content {
  font-size: 1rem;
  line-height: 1.75;
  font-style: italic;
  margin: 0;
}

/* เพิ่มเครื่องหมายคำพูด (Optional - ถ้าในฐานข้อมูลไม่มีเครื่องหมาย " ) */
.quote-content::before {
  content: open-quote;
  font-size: 2rem;
  color: #ccc;
  line-height: 0;
  vertical-align: -0.4em;
  margin-right: 0.2em;
}

/* ปรับแต่งสำหรับหน้าจอมือถือ */
@media (max-width: 600px) {
  .article-quote {
    padding: 1rem 1.2rem;
  }
  .quote-content {
    font-size: 1.1rem;
  }
}