/* ==========================================================================
   pages.css — ส่วนที่ใช้เฉพาะหน้าพรีออเดอร์ / ผลิตไพ่ / ตลาดไพ่

   ใช้ .card .grid .step-card .faq-* จาก style.css เป็นหลัก
   ไฟล์นี้เพิ่มเฉพาะรูปแบบที่ยังไม่มีในเว็บ
   สีทั้งหมดมาจาก token ใน style.css ไม่ประกาศสีใหม่
   ========================================================================== */

/* --------------------------------------------------------------------------
   กล่องรูปตัวอย่าง — ใช้แทนรูปจริงระหว่างที่ยังไม่มีภาพ
   เมื่อมีรูปจริงแล้วเปลี่ยนเป็น <img> ได้เลย แล้วลบคลาสนี้ทิ้ง
   -------------------------------------------------------------------------- */

.ph-media {
  display: flex;
  align-items: center;
  justify-content: center;

  aspect-ratio: 4 / 3;
  border: 1px dashed var(--gold-a40);
  border-radius: var(--radius-sm);
  background: var(--gold-a10);

  font-size: var(--fs-xs);
  color: var(--cream-a55);
  text-align: center;
}

.ph-media--tall { aspect-ratio: 3 / 4; }

/* --------------------------------------------------------------------------
   การ์ดรอบพรีออเดอร์
   -------------------------------------------------------------------------- */

.pre-card {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.pre-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
}

.pre-status {
  padding: 0.15rem 0.6rem;
  border-radius: var(--radius-pill);
  border: 1px solid var(--gold-a25);
  font-size: var(--fs-xs);
  white-space: nowrap;
}

.pre-status.is-open   { border-color: rgba(120, 200, 140, 0.5); color: #8fd6a5; }
.pre-status.is-soon   { color: var(--cream-a70); }
.pre-status.is-closed { border-color: rgba(220, 130, 130, 0.5); color: #e59a9a; }

.pre-price {
  font-size: var(--fs-h3);
  color: var(--color-gold-bright);
}

.pre-price s {
  margin-inline-end: 0.4rem;
  font-size: var(--fs-small);
  color: var(--cream-a55);
}

/* --- แถบความคืบหน้ายอดจอง --- */

.pre-bar {
  height: 8px;
  border-radius: var(--radius-pill);
  background: rgba(49, 12, 10, 0.6);
  overflow: hidden;
}

/* ความกว้างสั่งจาก style="--pct:62" ที่ตัว element จะได้เปลี่ยนค่าได้จากข้อมูลจริง */
.pre-bar span {
  display: block;
  height: 100%;
  width: calc(var(--pct, 0) * 1%);
  border-radius: inherit;
  background: var(--grad-gold);
}

.pre-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem;
  font-size: var(--fs-xs);
  color: var(--cream-a70);
}

@media (max-width: 640px) {
  .pre-head { flex-direction: column; align-items: flex-start; gap: 0.35rem; }
}

/* --------------------------------------------------------------------------
   ตารางสเปกงานผลิต
   -------------------------------------------------------------------------- */

.spec-wrap {
  /* ตารางกว้างกว่าจอมือถือ ให้เลื่อนในกล่องตัวเอง ไม่ดันทั้งหน้าให้เลื่อนซ้ายขวา */
  overflow-x: auto;
  border: var(--border-gold);
  border-radius: var(--radius-lg);
  background: var(--surface-card-soft);
}

.spec-table {
  width: 100%;
  min-width: 520px;
  border-collapse: collapse;
  font-size: var(--fs-small);
}

.spec-table th,
.spec-table td {
  padding: 0.85rem 1rem;
  text-align: start;
  border-bottom: 1px solid var(--gold-a18);
}

.spec-table thead th {
  font-weight: 500;
  color: var(--color-gold-bright);
  background: var(--gold-a10);
}

.spec-table tbody tr:last-child th,
.spec-table tbody tr:last-child td {
  border-bottom: 0;
}

.spec-table th[scope="row"] {
  font-weight: 400;
  color: var(--cream-a70);
  white-space: nowrap;
}

/* --------------------------------------------------------------------------
   การ์ดประกาศขายในตลาดไพ่
   -------------------------------------------------------------------------- */

.listing-card {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  padding: 0.85rem;
}

.listing-title {
  font-size: var(--fs-small);
  font-weight: 500;
  color: var(--color-gold-bright);
  line-height: var(--lh-tight);
}

.listing-price {
  font-size: var(--fs-h3);
  color: var(--color-cream);
}

.listing-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  font-size: var(--fs-xs);
}

.listing-tag {
  padding: 0.12rem 0.5rem;
  border-radius: var(--radius-pill);
  background: var(--gold-a10);
  color: var(--cream-a70);
  white-space: nowrap;
}

.listing-tag.is-new { background: rgba(120, 200, 140, 0.16); color: #8fd6a5; }

.listing-seller {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: var(--fs-xs);
  color: var(--cream-a55);
}

/* --------------------------------------------------------------------------
   หมายเหตุว่ายังเป็นข้อมูลตัวอย่าง
   ลบทั้งบล็อกและ element ที่ใช้ออกได้เมื่อต่อข้อมูลจริงแล้ว
   -------------------------------------------------------------------------- */

.demo-note {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;

  max-width: 640px;
  margin: 0 auto 1.5rem;
  padding: 0.6rem 1rem;

  border: 1px dashed var(--gold-a40);
  border-radius: var(--radius-pill);

  font-size: var(--fs-xs);
  color: var(--cream-a70);
  text-align: center;
}
