/* ========= Page Scope: Customers Detail =========
   ทุกกฎอยู่ใต้ .detail-page เพื่อกันชน header/footer
   หลีกเลี่ยงการสไตล์ tag ตรง เช่น body, h1, p โดยไม่มี prefix
================================================= */

.detail-page {
  background-color: #f7f9fc;       /* ไม่บังคับก็ได้ หากไม่อยากให้พื้นหลังทั้งหน้าถูกเปลี่ยน ให้ลบออก */
  color: #333;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.detail-page__container {
  max-width: 1100px;
  margin: 24px auto;
  background: #fff;
  padding: 24px;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0,0,0,.06);
}

.detail-page__title {
  margin: 0 0 16px;
  font-size: 1.8rem;
  text-align: center;
  color: #0b63b6;
}

.detail-page__subtitle {
  margin: 24px 0 12px;
  font-size: 1.25rem;
  color: #0b63b6;
}

.detail-page__section {
  margin-bottom: 20px;
}

.detail-page__empty {
  margin: 12px 0;
  color: #777;
}

.detail-page__error {
  padding: 12px 16px;
  border-radius: 8px;
  background: #fff4f4;
  color: #a40000;
  border: 1px solid #f3caca;
}

/* รูปภาพ: ใช้ Grid ให้ยืดหยุ่นกับความกว้างหน้าจอ */
.detail-page__images {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
  margin-top: 12px;
}

.detail-page__image-card {
  background: #f4f6f8;
  border-radius: 10px;
  padding: 10px;
  text-align: center;
  overflow: hidden;
  border: 1px solid #e9ecef;
}

.detail-page__image-card img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 4px;
}

.detail-page__caption {
  margin-top: 8px;
  font-size: 0.95rem;
  color: #555;
}

/* ข้อความข้อมูลลูกค้า */
.customer-info p {
  margin: 8px 0;
}

.customer-info strong {
  color: #222;
}

/* ปรับ spacing จอเล็ก */
@media (max-width: 600px) {
  .detail-page__container {
    padding: 16px;
    border-radius: 10px;
  }

  .detail-page__title {
    font-size: 1.5rem;
  }
}

/* ====== Bigger images on wide screens ====== */

/* ขยายความกว้างกล่องหลัก เมื่อหน้าจอใหญ่ */
@media (min-width: 1200px) {
  .detail-page__container {
    max-width: 1400px;          /* เดิม ~1100px → กว้างขึ้น */
  }
}

/* ทำให้กริดรูป “คอลัมน์ใหญ่ขึ้น” = รูปใหญ่ขึ้น */
@media (min-width: 992px) {
  .detail-page__images {
    grid-template-columns: repeat(auto-fit, minmax(420px, 1fr)); /* เดิม ~260px */
    gap: 4px;                          /* เพิ่มช่องไฟนิดหน่อย */
  }

  .detail-page__image-card {
    padding: 10px;                      /* เผื่อขอบการ์ดเล็กน้อย */
  }

  .detail-page__caption {
    font-size: 1rem;                    /* ตัวอักษรคำอธิบายใหญ่ขึ้นเล็กน้อย */
  }
}

/* คงคุณภาพรูป ไม่ยืด/บิด */
.detail-page__image-card img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: contain;   /* กันรูปโดนครอป หากไฟล์ต้นฉบับเป็นแนวตั้ง/แนวนอนต่างกัน */
}
