/* NÜXGROW · หน้าแรก แผง 02 NÜX Factory · เวที 3 มิติ v0.4.0 (26 พ.ย. 2569 · ช่องภาพแนวคิด FACTORY / MEGA) · v0.3.1 (26 พ.ย. 2569 · แถวการ์ดกว้างตามจำนวนรุ่นที่แสดง) · v0.3.0 (26 พ.ย. 2569 · โชว์รูม NÜX · แท็บพืชแทนแท็บคลิป) · v0.2.0 (25 พ.ย. 2569 · โหมดโชว์) · v0.1.0 (24 พ.ย. 2569)
   คู่กับ /qp/home-fx3d.js · กล่อง 3 มิติ = ชุด /qp/nux3d/1.2.0/ (embed.css + embed.js · data-nux3d-ui="show") · ไม่แก้ไฟล์ชุดนั้น
   โหมดโชว์: ฉาก 3D ล้วน · แท็บพืช + ปุ่มเล็กรวมเป็นแถบเดียวเหนือภาพ (ไม่ทับฉาก) · การ์ดขนาด 4 ใบใต้ภาพ
   ตัวไทยทุกจุด ≥ 14 px · สีจากตัวแปร --qp-* / --v-* ของหน้าเท่านั้น */
.v-show--fx .v-show__stage.fx3 { height: auto; min-height: 0; padding: 12px 14px 12px; gap: 8px; justify-content: flex-start; }
.fx3 .nx3d { flex: 0 0 auto; aspect-ratio: 16 / 10; max-height: none; border-color: color-mix(in srgb, var(--svc) 30%, var(--qp-line)); }
.v-svc__panel.v-show > .v-show__stage.fx3 { align-self: start; }   /* ชิดบน: เวทีสูงไม่เท่าคอลัมน์ข้อความ แถบปุ่มอยู่ที่เดิมเสมอ */

/* ── แถบเดียวเหนือภาพ: มุมดู (ซ้าย) + ปุ่มเล็ก (ขวา) · อยู่นอกภาพ ไม่ทับ 3D ── */
.fx3-bar { display: flex; align-items: center; justify-content: space-between; gap: 6px; min-height: 32px; }
.fx3-tabs, .fx3-ctl { display: inline-flex; align-items: center; gap: 2px; padding: 2px; border-radius: 999px; border: 1px solid var(--v-glass-line, var(--qp-line)); background: var(--v-glass, var(--qp-surface)); }
.fx3-tabs[hidden], .fx3-ctl[hidden] { display: none; }
.fx3-ctl { margin-left: auto; }
.fx3-tab { position: relative; height: 28px; padding: 0 11px; border: 0; border-radius: 999px; background: transparent; color: var(--qp-ink-2); font: inherit; font-size: 14px; line-height: 1.4; white-space: nowrap; cursor: pointer; transition: background .2s, color .2s; }
.fx3-tab:hover { color: var(--qp-ink); }
.fx3-tab[aria-pressed="true"] { color: var(--qp-ink); background: color-mix(in srgb, var(--svc) 20%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--svc) 55%, transparent); }
.fx3-ic { position: relative; display: grid; place-items: center; width: 28px; height: 28px; padding: 0; border: 0; border-radius: 50%; background: transparent; color: var(--qp-ink-2); cursor: pointer; transition: background .2s, color .2s; }
.fx3-ic[hidden] { display: none; }
.fx3-ic:hover { color: var(--qp-ink); background: color-mix(in srgb, var(--qp-ink) 8%, transparent); }
.fx3-ic svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.fx3-ic[data-c="led"][aria-pressed="true"] { color: var(--svc); }
.fx3-ic .i-play, .fx3-ic.is-paused .i-pause { display: none; }
.fx3-ic.is-paused .i-play { display: inline; }
.fx3-tab:focus-visible, .fx3-ic:focus-visible, .fx3-m:focus-visible, .fx3-go:focus-visible { outline: 2px solid var(--qp-green); outline-offset: 2px; }
@media (pointer: coarse) { .fx3-tab::after, .fx3-ic::after { content: ""; position: absolute; inset: -7px 0; } }   /* จอสัมผัส: พื้นที่กดสูงขึ้น ปุ่มยังเล็กเท่าเดิม */

/* ── ปุ่มเปิด 3D (มือถือ/เครื่องอ่อน · ภาพนิ่งก่อน): เม็ดเล็กขอบล่าง ไม่บังโมเดล ── */
.fx3 .nx3d__go.fx3-go { top: auto; bottom: 12px; transform: translateX(-50%); display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 13px 0 10px; border-radius: 999px; border: 1px solid var(--v-glass-line, var(--qp-line)); background: color-mix(in srgb, var(--qp-surface) 86%, transparent); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); color: var(--qp-ink); font: inherit; font-size: 14px; line-height: 1.4; white-space: nowrap; cursor: pointer; box-shadow: 0 8px 24px -14px rgba(0, 0, 0, .5); }
.fx3 .nx3d__go.fx3-go[hidden] { display: none; }
.fx3-go svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* ── บรรทัดกฎหมาย: ติดใต้ภาพ (ใช้ร่วม 3D + คลิป · ห้ามหาย) ── */
.fx3-legal { margin: -2px 0 0; font-size: 14px; line-height: 1.5; color: var(--qp-ink-2); opacity: .85; text-align: center; text-wrap: balance; }
.fx3-legal span, .fx3-nw { white-space: nowrap; }   /* ตัดบรรทัดที่ตัวคั่นเท่านั้น (ไม่ตัดกลางคำ "บริษัท|กำหนด") */

/* ── ปุ่มรุ่น: ตัวเลขหลักของแต่ละรุ่น ── */
.fx3-pick { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 8px; }   /* คอลัมน์ = จำนวนการ์ด (รุ่นที่ซ่อนไม่มีการ์ด → ไม่มีช่องว่าง) */
.fx3-pick[hidden] { display: none; }
.fx3-m { display: flex; flex-direction: column; align-items: center; gap: 2px; min-width: 0; padding: 8px 6px 9px; border-radius: 14px; border: 1px solid var(--v-glass-line, var(--qp-line)); background: var(--v-glass, var(--qp-surface)); color: inherit; font: inherit; cursor: pointer; text-align: center; transition: border-color .3s var(--v-ease, ease), box-shadow .3s var(--v-ease, ease), opacity .3s; }
.fx3-m:not(.is-sel) { opacity: .72; }
.fx3-m:not(.is-sel):hover { opacity: .9; }
.fx3-m.is-sel { border-color: color-mix(in srgb, var(--svc) 75%, var(--qp-line)); box-shadow: 0 0 0 1px color-mix(in srgb, var(--svc) 40%, transparent), 0 18px 40px -26px var(--svc); }
.fx3-m .fx-num b { font-size: clamp(22px, 1.9vw, 30px); }
.fx3-name { font-size: 15px; font-weight: 600; line-height: 1.35; color: var(--qp-ink); white-space: nowrap; }
.fx3-code { font-family: var(--qp-font-mono); font-size: 14px; line-height: 1.35; color: var(--qp-ink-2); white-space: nowrap; }
.fx3-m.is-sel .fx3-name { color: var(--svc); }
.fx3-m.is-sel .fx-num b { color: var(--svc); }
.fx3-m .fx-num small { font-size: 14px; }
.fx3-sub { font-size: 14px; line-height: 1.4; color: var(--qp-ink-2); }
.fx3 .v-show__foot, .fx3 .v-show__note { margin: 0; }

/* ── ขยายต่อได้แค่ไหน: ภาพแนวคิด (ไม่ใช่รุ่นขาย) · ช่องเล็ก เส้นประ ต่างจากการ์ดขนาด ── */
.fx3-ext { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 8px; }
.fx3-x { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 0 8px; min-width: 0; padding: 7px 12px 8px; border-radius: 12px; border: 1px dashed var(--v-glass-line, var(--qp-line)); background: transparent; color: inherit; font: inherit; cursor: pointer; text-align: left; transition: border-color .3s var(--v-ease, ease), background .3s; }
.fx3-x .fx3-name { grid-column: 1; font-size: 14px; }
.fx3-xsub { grid-column: 1; font-size: 14px; line-height: 1.4; color: var(--qp-ink-2); }
.fx3-chip { grid-column: 2; grid-row: 1 / span 2; padding: 1px 8px; border-radius: 999px; font-size: 14px; line-height: 1.5; color: var(--qp-ink-2); background: color-mix(in srgb, var(--qp-src-sim, var(--qp-ink-2)) 14%, transparent); white-space: nowrap; }
.fx3-x:hover { border-color: color-mix(in srgb, var(--svc) 45%, var(--qp-line)); }
.fx3-x.is-sel { border-style: solid; border-color: color-mix(in srgb, var(--svc) 75%, var(--qp-line)); background: color-mix(in srgb, var(--svc) 8%, transparent); }
.fx3-x.is-sel .fx3-name { color: var(--svc); }
.fx3-x:focus-visible { outline: 2px solid var(--qp-green); outline-offset: 2px; }

@media (min-width: 1001px) {
  /* เดสก์ท็อป: กล่อง 3D สูงตามความสูงจอ (ไม่มีป้าย/ปุ่มในฉากแล้ว · โมเดลเต็มกล่อง) */
  .fx3 .nx3d { aspect-ratio: auto; height: clamp(360px, calc(100svh - 360px), 560px); }   /* จอ 900 = 540 px · การ์ด 4 ใบ (4 บรรทัด) ยังอยู่ในจอ */
}
@media (max-width: 760px) {
  .v-show--fx .v-show__stage.fx3 { padding: 10px 8px 10px; height: auto; gap: 8px; }
  .fx3 .nx3d { aspect-ratio: 4 / 5; }
  .fx3 .nx3d.is-3d { aspect-ratio: 4 / 5; height: auto; }   /* เปิด 3D แล้วกล่องเท่าเดิม (ไม่กระโดด) · ฉากโหมดโชว์ไม่มีแผงในกล่อง */
  .fx3-tab { padding: 0 9px; }
  .fx3-pick { grid-auto-flow: row; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fx3-m { padding: 7px 4px 8px; }
}
@media (max-width: 760px) { .fx3-ext { grid-auto-flow: row; } .fx3-x { padding: 7px 10px 8px; } }
@media (max-width: 360px) { .fx3-tab { padding: 0 7px; } }
@media (prefers-reduced-motion: reduce) { .fx3-m, .fx3-x, .fx3-tab, .fx3-ic { transition: none; } }
