/* ==============================================
   PAIDEE MADEE — สินค้าตามหมวดหมู่
   ใช้กับ resources/views/th/product/show_category.blade.php
   โครงร่วมของหน้าหมวดหมู่อยู่ที่ pages/category.css
============================================== */

/* ภาพแนวตั้ง — สัดส่วน 3:4 ปรับตามความกว้างคอลัมน์ */
.cat-std-img img { width: 100%; aspect-ratio: 3 / 4; height: auto; object-fit: cover; display: block; }
.cat-std-lead { color: var(--pm-text-muted); font-size: 17px; line-height: 1.9; margin-bottom: 22px; }
.cat-std-item { display: flex; gap: 16px; padding: 16px 0; border-bottom: 1px solid rgba(72,100,75,.1); }
.cat-std-item:last-child { border-bottom: 0; padding-bottom: 0; }
.cat-std-item-no {
  flex: 0 0 42px; height: 42px;
  border-radius: 13px;
  background: var(--pm-mint-light);
  color: var(--pm-green);
  display: flex; align-items: center; justify-content: center;
  font-family: 'Averia Libre', serif; font-weight: 700; font-size: 17px;
}
.cat-std-item h3 {
  font-family: 'Noto Sans Thai Looped', 'Noto Sans Thai', sans-serif;
  font-size: 17px; font-weight: 600;
  color: var(--pm-green-deep);
  margin-bottom: 5px;
}

/* ── Product Cards ── */
/* ป้ายรหัสสินค้ามุมขวาบนของรูป ขึ้นเฉพาะสินค้าที่กรอกรหัสไว้ */
.cat-type-img { position: relative; }
.product-code {
  position: absolute; top: 12px; right: 12px; z-index: 2;
  background: var(--pm-green); color: #fff;
  font-size: .85rem; font-weight: 600; letter-spacing: .5px; line-height: 1;
  padding: 6px 12px; border-radius: 999px;
  box-shadow: 0 2px 8px rgba(0,0,0,.15);
}

/* สไตล์เฉพาะหมวด ใช้คลาส cat-{rewrite_url} ที่ติดอยู่บน section ของหน้าหมวดหมู่ */
/* โลงศพ: รูปเต็มกรอบ ซูมเล็กน้อยตอน hover หัวข้อการ์ด 20px */
.cat-pet-coffin .cat-type-img img { object-fit: cover; transition: transform .5s; }
.cat-pet-coffin .cat-type-card:hover .cat-type-img img { transform: scale(1.08); }
.cat-pet-coffin .cat-type-body h3 { font-size: 20px; }
.cat-pet-coffin .cat-type-body p { line-height: inherit; }
/* บล็อกเกริ่นนำของโลงศพในดีไซน์ใช้ .coffin-intro-section ซึ่งเว้นล่าง 40px */
.cat-intro-section.cat-pet-coffin { margin-bottom: 40px; }

/* โกศ / ของที่ระลึก: รูปสินค้าบนพื้นเทา ย่อให้เห็นทั้งชิ้น */
.cat-pet-urn .cat-type-img,
.cat-pet-souvenir .cat-type-img { background: #eaeaee; }
.cat-pet-urn .cat-type-img img,
.cat-pet-souvenir .cat-type-img img { object-fit: contain; mix-blend-mode: multiply; }
.cat-pet-urn .cat-type-body { padding: 28px 20px; }

/* ของที่ระลึก: รูปบล็อกเกริ่นนำพื้นเทาแบบเดียวกับรูปสินค้า */
.cat-pet-souvenir .cat-intro-img { background: #eaeaee; }
.cat-pet-souvenir .cat-intro-img img { object-fit: contain; mix-blend-mode: multiply; }

.cat-group + .cat-group { margin-top: 56px; padding-top: 56px; }
.cat-group-head { margin-bottom: 32px; }
.cat-group-head h3 {
  font-family: 'Noto Sans Thai Looped', 'Noto Sans Thai', sans-serif;
  font-weight: 600;
  color: var(--pm-green-deep);
  font-size: clamp(1.3rem, 2.4vw, 1.7rem);
  line-height: 1.4;
  margin-bottom: 12px;
}
.cat-group-head p {
  color: var(--pm-text-muted);
  font-size: 17px;
  line-height: 1.9;
  max-width: 780px;
  margin: 0 auto 6px;
}
.cat-group-head p:last-child { margin-bottom: 0; }

/* ── Steps ── */

.measure-card {
  background: #fff;
  border-radius: 18px;
  padding: 26px 24px;
  height: 100%;
  display: flex;
  align-items: flex-start;
  gap: 16px;
  box-shadow: 0 4px 24px rgba(72,100,75,.08);
  transition: transform .3s, box-shadow .3s;
}
.measure-card:hover { transform: translateY(-4px); box-shadow: 0 12px 32px rgba(72,100,75,.14); }
.measure-step {
  flex: 0 0 38px;
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px;
  border-radius: 50%;
  background: var(--pm-green); color: #fff;
  font-family: 'Averia Libre', serif; font-weight: 700; font-size: 16px;
  margin-top: 2px;
}
.measure-card h3 {
  font-family: 'Noto Sans Thai Looped', 'Noto Sans Thai', sans-serif;
  font-size: 17px; font-weight: 600;
  color: var(--pm-green-deep);
  margin-bottom: 8px;
}

/* Mobile: clear the fixed topbar + navbar stack (--pm-header-h is measured in JS) */
@media (max-width: 991.98px) {
  .cat-std-img img { aspect-ratio: 4 / 5; }
  .cat-group + .cat-group { margin-top: 40px; padding-top: 40px; }
}
