/* ============================================================
   /your-plant-factory · หน้ารุ่นเฟรม NF (เลือกพืช + เลือกขนาด) · v0.4.1 [0.4.1 = ส่วน "ขยายต่อได้แค่ไหน" 2 การ์ดภาพแนวคิด]
   โหลดต่อท้าย ypf.css?v=0.5.0 · ใช้ตัวแปร --qp-* เท่านั้น ห้ามใส่สีตรง · คลาสเฉพาะขึ้นต้น nf-
   ตัวไทยทุกจุด ≥ 14 px · ปุ่มกดสูง ≥ 40 px (มือถือ 44)
   ============================================================ */

/* ── บทเปิด: ไทยนำ (ตัวใหญ่) · อังกฤษรอง (ป้ายเล็ก) ── */
.bx-on .y-herocard .nf-h1 { margin: 0; display: flex; flex-direction: column; gap: 8px; font-size: inherit; font-weight: inherit; }
.nf-mega { display: block; font-size: clamp(32px, 3.3vw, 48px); line-height: 1.2; font-weight: 700; color: var(--qp-ink); }
.nf-mega em { font-style: normal; color: var(--qp-green); }
.nf-mega em[translate="no"] { white-space: nowrap; }   /* ชื่อชุดรุ่น (NÜX S · M · L) ขึ้นบรรทัดใหม่ทั้งก้อน ไม่ให้ตัวท้ายตกบรรทัด */
.nf-en { margin: 0; }
@media (max-width: 560px) { .nf-mega { font-size: clamp(30px, 9.4vw, 40px); } }

/* ── ภาพห้องปลูก: พืชที่ยังไม่มีภาพ ── */
.nf-roomwait { display: grid; place-items: center; min-height: 220px; padding: 32px 24px; text-align: center; font-size: 15px; line-height: 1.6; color: var(--qp-muted); background: repeating-linear-gradient(135deg, transparent 0 14px, color-mix(in srgb, var(--qp-line) 55%, transparent) 14px 15px); }
.nf-roomwait p { margin: 0; }

/* ── ตัวเลือก: กว้าง · ยาว · พืช (แกนละแถว) ── */
.nf-pick { display: grid; gap: 8px; margin: 2px 0; }
.nf-ax { display: grid; grid-template-columns: 44px minmax(0, 1fr); align-items: center; gap: 10px; }
.nf-ax__l { font-size: 14px; color: var(--qp-muted); }
.nf-seg { display: flex; flex-wrap: wrap; gap: 8px; }
.nf-opt { min-height: 40px; padding: 0 14px; border-radius: 6px; border: 1px solid var(--qp-line-strong); background: color-mix(in srgb, var(--qp-surface) 70%, transparent); color: var(--qp-ink-2); font: 500 15px/1.2 var(--qp-font-sans); cursor: pointer; display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; transition: border-color var(--qp-d-2) var(--qp-ease), color var(--qp-d-2) var(--qp-ease), box-shadow var(--qp-d-2) var(--qp-ease); }
.nf-opt b { font: 500 17px/1 var(--qp-font-mono); color: inherit; }
.nf-opt small { font-size: 14px; color: var(--qp-muted); }
.nf-opt:hover { border-color: var(--qp-ink-2); color: var(--qp-ink); }
.nf-opt[aria-checked="true"] { border-color: var(--qp-gold); color: var(--qp-ink); box-shadow: 0 0 0 3px var(--qp-gold-t); }
.nf-opt[aria-checked="true"] small { color: var(--qp-ink-2); }
.nf-opt:focus-visible { outline: 2px solid var(--qp-gold); outline-offset: 3px; }
.nf-opt[disabled] { opacity: .45; cursor: not-allowed; }
.nf-seg--sm .nf-opt { min-height: 36px; padding: 0 12px; font-size: 14px; }

/* ── ชื่อชุดที่เลือก (รหัส = ตัวโมโน · ไม่ถ่างตัวไทย) ── */
.bx-on .nf-name { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; }
.nf-name__code { font-family: var(--qp-font-mono); letter-spacing: -.01em; }
.nf-name__crop { font-size: 16px; font-weight: 500; color: var(--qp-ink-2); }
.nf-code { font-family: var(--qp-font-mono); white-space: nowrap; }
.nf-cap { font-size: 14px; line-height: 1.5; color: var(--qp-muted); }   /* ป้ายไทยใต้ตัวเลขใหญ่: ไม่ใช้ .dt-label (ถ่างตัวอักษร ใช้กับอังกฤษเท่านั้น) */

/* ── ช่องที่ยังไม่มีตัวเลข ── */
.nf-waitcell { font-size: 14px; color: var(--qp-muted); border-bottom: 1px dashed var(--qp-line-strong); padding-bottom: 1px; white-space: nowrap; }
.y-specs .nf-wait { display: none; }
.y-specs .is-wait .nf-wait { display: block; }
.y-specs .is-wait .dt-num small, .y-specs .is-wait .nf-has { display: none; }
.y-specs .is-wait .dt-num { color: var(--qp-faint); }

/* ── ตารางเทียบ: จำนวนคอลัมน์ตามจำนวนขนาดที่มี (--nf-n) ── */
.nf-table { min-width: calc(190px + var(--nf-n, 3) * 150px); }
.nf-colpick { appearance: none; background: none; border: 0; padding: 4px 0; margin: 0; font: inherit; font-family: var(--qp-font-mono); color: inherit; cursor: pointer; white-space: nowrap; border-bottom: 1px solid transparent; }
.nf-colpick:hover { color: var(--qp-ink); border-bottom-color: var(--qp-line-strong); }
.nf-colpick:focus-visible { outline: 2px solid var(--qp-gold); outline-offset: 3px; }
.y-table th.is-on .nf-colpick { color: var(--qp-gold); }
.nf-th__sub { display: block; font-weight: 400; font-size: 14px; color: var(--qp-muted); white-space: nowrap; }
.nf-cmphd { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.nf-cmphd .nf-ax__l { font-size: 14px; }

/* ── จุดเสียบ 3D (ใช้กรอบ .nx3d ของชุดฝัง 3D · ภาพชั่วคราวจนกว่าชุด 3D ของเฟรมนี้พร้อม) ── */
.nf-slot__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.nf-slot__empty { position: absolute; inset: 0; margin: 0; display: grid; place-items: center; text-align: center; padding: 56px 24px; font-size: 15px; line-height: 1.6; color: var(--qp-muted); background: repeating-linear-gradient(135deg, transparent 0 14px, color-mix(in srgb, var(--qp-line) 55%, transparent) 14px 15px); }
.nf-slot[data-nux3d].is-noshot > .nf-slot__empty[hidden] { display: grid; }   /* ชุดภาพ 3 มิติไม่มีภาพของรุ่นนี้ */
.nf-slot__tag { position: absolute; right: 16px; top: 16px; margin: 0; padding: 4px 10px; border-radius: var(--qp-r-pill); border: 1px dashed var(--qp-gold); background: color-mix(in srgb, var(--qp-surface) 86%, transparent); font-size: 14px; line-height: 1.6; color: var(--qp-ink-2); }

/* ── ป้าย "ร่าง" (มีเฉพาะตอนสร้างจากไฟล์ตัวอย่าง) ── */
.nf-draft { grid-column: 1 / -1; margin: 0; padding: 10px 14px; border: 1px dashed var(--qp-gold); border-radius: 8px; background: var(--qp-gold-t); font-size: 14px; line-height: 1.6; color: var(--qp-ink); }
.nf-draft b { font-weight: 600; }
.nf-pill-draft { border-style: dashed; border-color: var(--qp-gold); color: var(--qp-ink); }

/* ── ฟอร์ม: 2 กลุ่มตัวเลือก (ขนาด · พืช) ── */
.nf-formrow { display: grid; gap: 14px; }

@media (max-width: 760px) {
  .nf-opt { min-height: 44px; }
  .nf-seg--sm .nf-opt { min-height: 40px; }
  .bx-on .nf-table { min-width: calc(132px + var(--nf-n, 3) * 124px); }
  .nf-slot__tag { right: auto; left: 16px; top: 96px; }   /* ใต้ป้ายชื่อชุด · ไม่ทับบรรทัดเงื่อนไขด้านล่าง */
}
@media (prefers-reduced-motion: reduce) { .nf-opt { transition: none; } }

/* ============================================================
   v0.2.0 · โชว์รูม 3 รุ่น + 2 (S / M / L · ต่อขยายแบบโมดุล · Roadmap)
   ============================================================ */
/* ── ชื่อขนาดในหัวการ์ด ── */
.nf-name__size { font-weight: 700; }
.nf-name__code--sub { font-size: 16px; font-weight: 500; color: var(--qp-ink-2); }


/* ── กล่องสเปกของโชว์รูม: ตัวเลขเป็นช่วง (ยาว) → ตัวเล็กลง หน่วยขึ้นบรรทัดใหม่ ไม่ทับช่องข้าง ๆ ── */
.nf-specs6 .dt-num--lg { font-size: clamp(22px, 1.75vw, 27px); display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 6px; }
.nf-specs6 .dt-num--lg > span:first-child { white-space: nowrap; }
.nf-specs6 dt { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 8px; }

/* ── ข้อความยาวในส่วนใหม่ ── */
.nf-p { margin: 8px 0 16px; font-size: 16px; line-height: 1.7; color: var(--qp-ink-2); max-width: 56ch; }

/* ── ต่อขยายแบบโมดุล (แผนภาพแนวคิด ไม่มีตัวเลข) ── */
.nf-scale__bd { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 28px; align-items: center; }
.nf-scale__fig { display: grid; gap: 18px; padding: 22px; border: 1px dashed var(--qp-line-strong); border-radius: 10px; }
.nf-mod__l { display: block; margin-bottom: 6px; font-size: 14px; color: var(--qp-muted); }
.nf-mod { display: flex; gap: 8px; }
.nf-mod i { flex: 1; min-height: 48px; display: grid; place-items: center; border-radius: 6px; border: 1px solid var(--qp-line-strong); background: color-mix(in srgb, var(--qp-green) 14%, transparent); font-style: normal; }
.nf-mod i b { font: 500 16px/1 var(--qp-font-mono); color: var(--qp-ink-2); }
.nf-mod i.is-add { border-style: dashed; background: none; }
.nf-mod--stack { flex-direction: column; gap: 4px; width: 34%; }

/* ── Roadmap · โครงการร่วมพัฒนา (ภาพแนวคิดวาดด้วย CSS ไม่ใช้ภาพของโครงการจริง) ── */
.nf-road__bd { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 32px; align-items: center; }
.nf-road__art { position: relative; min-height: 280px; display: grid; place-items: end center; padding: 28px 24px 0; overflow: hidden; border-radius: 10px; border: 1px dashed var(--qp-line-strong); background: repeating-linear-gradient(135deg, transparent 0 14px, color-mix(in srgb, var(--qp-line) 55%, transparent) 14px 15px); }
.nf-tower { width: 44%; height: 236px; border: 1px solid var(--qp-line-strong); border-bottom: 0; border-radius: 8px 8px 0 0; background: repeating-linear-gradient(to top, color-mix(in srgb, var(--qp-green) 22%, var(--qp-surface)) 0 9px, var(--qp-surface) 9px 12px); }
.nf-road__tag { position: absolute; left: 12px; top: 12px; padding: 3px 10px; border-radius: var(--qp-r-pill); border: 1px dashed var(--qp-gold); background: color-mix(in srgb, var(--qp-surface) 86%, transparent); font-size: 14px; line-height: 1.6; color: var(--qp-ink-2); }
.nf-road__pills { margin: 0 0 16px; display: flex; flex-wrap: wrap; gap: 8px; }

@media (max-width: 760px) {
  .nf-scale__bd, .nf-road__bd { grid-template-columns: 1fr; gap: 20px; }
  .nf-road__art { min-height: 220px; }
  .nf-tower { height: 180px; }
}

/* ── "ขยายต่อได้แค่ไหน": 2 การ์ดภาพแนวคิด (NÜX FACTORY · NÜX MEGA) · ภาพนิ่งจากชุดภาพ 3 มิติ (กรอบ .nx3d ของชุดนั้นกำหนดสัดส่วนภาพ 16:10 · มือถือ 4:5) ── */
.nf-grow__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.nf-cpt { display: flex; flex-direction: column; min-width: 0; overflow: hidden; border: 1px solid var(--qp-line); border-radius: 10px; }
.nf-cpt .nf-cpt__img { border: 0; border-bottom: 1px solid var(--qp-line); border-radius: 0; max-height: none; }
.nf-cpt__txt { flex: 1 1 auto; display: flex; flex-direction: column; gap: 10px; padding: 18px 20px 20px; }
.nf-cpt__h { margin: 0; }
.nf-cpt__pts { margin: 0 0 6px; padding: 0; list-style: none; display: grid; gap: 6px; font-size: 16px; line-height: 1.6; color: var(--qp-ink-2); }
.nf-cpt__pts li { position: relative; padding-left: 18px; }
.nf-cpt__pts li::before { content: ""; position: absolute; left: 0; top: .62em; width: 8px; height: 8px; border-radius: 50%; background: var(--qp-green); }
.nf-cpt__txt .dt-btn { align-self: flex-start; margin-top: auto; }
@media (max-width: 760px) { .nf-grow__grid { grid-template-columns: 1fr; } }
