/* หน้าเว็บ ศิริพัฒน์เพอร์เฟคชั่น — ทิศทาง "องค์กรน่าเชื่อถือ" (แบบอ้างอิง design/comps/แบบอ้างอิง.png)
   น้ำเงินองค์กรเป็นพื้นส่วนเข้ม · เทาเงินโลหะเป็นพื้นรอง · ม่วงแบรนด์ (--accent จาก site.config.js) ใช้กับปุ่มและจุดเน้นเท่านั้น
   กฎเหล็ก: ทุกส่วนต้องยังสวยเมื่อลูกค้าใส่ข้อความสั้นมากหรือยาวมาก และต้องไม่ล้นจอที่ 360px */

:root {
  --accent: #5530c4;
  --accent-ink: #ffffff;
  --accent-soft: color-mix(in srgb, var(--accent) 9%, white);
  --navy: #0c2257;
  --navy-2: #143a86;
  --navy-ink: #e9eef8;
  --steel: #c9d0da;
  --steel-2: #e8ecf1;
  --ink: #0d1b33;
  --muted: #55627a;
  --paper: #f6f7f9;
  --card: #ffffff;
  --line: #dde3eb;
  --radius: 10px;
  --font: 'IBM Plex Sans Thai', 'Noto Sans Thai', -apple-system, 'Segoe UI', sans-serif;
  --display: var(--font);
  --gap: clamp(56px, 7.5vw, 100px);
  --pad: clamp(16px, 4vw, 32px);
  --max: 1200px;
  --shadow: 0 1px 2px rgba(13, 27, 51, .06), 0 6px 20px -8px rgba(13, 27, 51, .14);
  --ease: cubic-bezier(.2, .7, .2, 1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; font-family: var(--font); color: var(--ink); background: var(--paper);
  font-size: 16.5px; line-height: 1.7; overflow-x: hidden;
}
img, video { max-width: 100%; display: block; height: auto; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--display); line-height: 1.42; margin: 0; text-wrap: balance; font-weight: 700; }
/* หัวข้อใหญ่ตัดบรรทัดที่ช่องว่างเท่านั้น กันคำไทยขาดกลาง (ทุ|กล็อต) · คำยาวเกินจอยังตัดได้ */
.hero h1, .hero .h1-like, .sec-head h2, .about-text h2, .page-head h1, .cta-inner h2 { word-break: keep-all; overflow-wrap: anywhere; }
/* render.js ห่อแต่ละคำด้วย .nw → ตัดบรรทัดได้เฉพาะที่ช่องว่าง (Chrome ไม่ใช้ keep-all กับไทย) */
/* inline-block: คำไม่ขาดถ้ายังพอดีบรรทัด · คำยาวเกินจอ (ไม่มีช่องว่าง) ยังตัดในคำได้ ไม่ล้นจอ */
.nw { display: inline-block; max-width: 100%; }
p { margin: 0 0 1em; }
svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.75; flex: none; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.skip { position: absolute; left: -999px; top: 8px; z-index: 100; background: #fff; padding: 8px 14px; border-radius: 6px; }
.skip:focus { left: 8px; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 60%, white); outline-offset: 2px; }

.wrap { max-width: var(--max); margin: 0 auto; padding-inline: var(--pad); }
.sec { padding-block: var(--gap); }
.sec-alt { background: var(--steel-2); }

/* ---------- หัวส่วน: เลขกำกับ + หัวข้อ + เส้นม่วงสั้น ---------- */
.sec-head { max-width: 760px; margin-bottom: clamp(26px, 4vw, 44px); position: relative; }
.sec-head h2 { font-size: clamp(26px, 3.6vw, 40px); letter-spacing: -.005em; }
.sec-head h2::after { content: ''; display: block; width: 44px; height: 4px; border-radius: 2px; background: var(--accent); margin-top: 14px; }
.sec-head p { color: var(--muted); margin: 14px 0 0; font-size: 17px; max-width: 60ch; }
.eyebrow { display: inline-block; font-size: 14px; font-weight: 700; letter-spacing: .16em; color: var(--accent); margin-bottom: 6px; }
.sec-link { display: inline-flex; align-items: center; gap: 6px; margin-top: 16px; font-weight: 600; color: var(--accent); text-decoration: none; }
.sec-link svg { width: 18px; height: 18px; transition: transform .2s var(--ease); }
.sec-link:hover svg { transform: translateX(3px); }

/* ---------- ปุ่ม ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 22px; border-radius: 8px; font: inherit; font-size: 16px; font-weight: 600; line-height: 1.45;
  background: var(--accent); color: var(--accent-ink); text-decoration: none; cursor: pointer;
  border: 1.5px solid var(--accent); transition: background-color .18s ease, transform .18s ease, box-shadow .18s ease;
  min-height: 46px; text-align: center;
}
.btn:hover { background: color-mix(in srgb, var(--accent) 86%, black); box-shadow: 0 6px 16px -6px color-mix(in srgb, var(--accent) 60%, transparent); }
.btn:active { transform: translateY(1px); }
.btn[disabled] { background: #9aa3b2; border-color: #9aa3b2; cursor: not-allowed; box-shadow: none; }
.btn-lg { min-height: 52px; padding: 13px 26px; font-size: 16.5px; }
.btn-sm { min-height: 40px; padding: 8px 16px; font-size: 15px; }
.btn-ghost { background: transparent; color: inherit; border-color: currentColor; }
.btn-ghost:hover { background: color-mix(in srgb, currentColor 8%, transparent); box-shadow: none; }
.btn-light { background: #fff; color: var(--navy); border-color: #fff; }
.btn-light:hover { background: var(--steel-2); }
.btn svg { width: 20px; height: 20px; }

/* ---------- แถบข้อมูลบน ---------- */
.topbar { background: var(--navy); color: var(--navy-ink); font-size: 14px; }
.topbar .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px 26px; min-height: 40px; padding-block: 6px; }
.topbar span, .topbar a { display: inline-flex; align-items: center; gap: 7px; text-decoration: none; }
.topbar svg { width: 16px; height: 16px; opacity: .85; }
.topbar a:hover { color: #fff; text-decoration: underline; }
.top-social { gap: 10px; }
@media (max-width: 720px) { .topbar .hide-sm, .topbar span:first-child, .top-social { display: none !important; } .topbar .wrap { gap: 4px 18px; } }

/* ---------- หัวเว็บ (ห้าม backdrop-filter/transform/filter ที่นี่ — เมนูมือถือ fixed ต้องเต็มจอ) ---------- */
.nav { background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 40; }
.nav-row { display: flex; align-items: center; gap: 20px; min-height: 76px; }
.logo { display: flex; align-items: center; gap: 12px; text-decoration: none; min-width: 0; }
.logo img { width: 54px; height: 54px; object-fit: contain; border-radius: 6px; }
.logo span { display: flex; flex-direction: column; line-height: 1.45; min-width: 0; }
.logo b { font-size: clamp(17px, 2vw, 21px); color: var(--navy); }
.logo small { font-size: 14px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.menu { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.menu > a:not(.btn) { padding: 10px 12px; text-decoration: none; font-weight: 600; color: var(--ink); border-radius: 6px; position: relative; }
.menu > a:not(.btn):hover { color: var(--accent); }
.menu > a[aria-current="page"] { color: var(--navy-2); }
.menu > a[aria-current="page"]::after { content: ''; position: absolute; left: 12px; right: 12px; bottom: 4px; height: 2.5px; border-radius: 2px; background: var(--accent); }
.nav-cta { margin-left: 10px; }
.nav-toggle { display: none; margin-left: auto; width: 48px; height: 48px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--navy); align-items: center; justify-content: center; cursor: pointer; }
.nav-toggle svg { width: 24px; height: 24px; }
.nav-toggle svg + svg { display: none; }
body.nav-open .nav-toggle svg { display: none; }
body.nav-open .nav-toggle svg + svg { display: block; }
@media (max-width: 960px) {
  .nav-row { min-height: 66px; gap: 12px; }
  .logo img { width: 46px; height: 46px; }
  .nav-toggle { display: inline-flex; position: relative; z-index: 52; }
  .menu {
    position: fixed; inset: 0; z-index: 51; background: #fff; flex-direction: column; align-items: stretch;
    padding: 96px var(--pad) 32px; gap: 2px; margin: 0; overflow-y: auto;
    opacity: 0; visibility: hidden; transition: opacity .2s ease, visibility .2s;
  }
  body.nav-open { overflow: hidden; }
  body.nav-open .menu { opacity: 1; visibility: visible; }
  .menu > a:not(.btn) { font-size: 20px; padding: 14px 4px; border-bottom: 1px solid var(--line); border-radius: 0; }
  .menu > a[aria-current="page"]::after { left: 4px; right: auto; width: 36px; bottom: 8px; }
  .nav-cta { margin: 22px 0 0; min-height: 54px; font-size: 17px; }
}

/* ---------- แบนเนอร์แบบองค์กร: ข้อความซ้าย ภาพโรงงานขวา ---------- */
.hero-corp { background: linear-gradient(115deg, var(--navy) 0%, var(--navy) 46%, var(--navy-2) 100%); color: #fff; position: relative; overflow: hidden; }
.hero-corp::before { /* ลายเส้นเหล็กบางๆ */
  content: ''; position: absolute; inset: 0; pointer-events: none; opacity: .07;
  background: repeating-linear-gradient(115deg, #fff 0 1px, transparent 1px 22px);
}
.hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr); align-items: stretch; gap: 0; position: relative; }
.hero-copy { padding: clamp(40px, 6vw, 84px) clamp(0px, 3vw, 44px) clamp(40px, 6vw, 84px) 0; display: flex; flex-direction: column; justify-content: center; }
.hero-eyebrow { align-self: flex-start; display: inline-block; background: color-mix(in srgb, var(--accent) 88%, black); color: #fff; font-size: 14.5px; font-weight: 600; padding: 6px 14px; border-radius: 4px; margin-bottom: 18px; clip-path: polygon(0 0, 100% 0, calc(100% - 10px) 100%, 0 100%); padding-right: 22px; }
.hero-corp h1, .hero-corp .h1-like { font-size: clamp(32px, 4.6vw, 56px); line-height: 1.4; letter-spacing: -.01em; margin: 0 0 16px; font-weight: 700; }
.hero-sub { font-size: clamp(16.5px, 1.7vw, 19px); color: #d6deef; max-width: 46ch; margin: 0 0 26px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-corp .btn-ghost { color: #fff; border-color: rgba(255, 255, 255, .7); }
.hero-phone { display: inline-flex; align-items: center; gap: 10px; margin-top: 24px; text-decoration: none; font-size: 18px; color: #fff; align-self: flex-start; }
.hero-phone svg { width: 22px; height: 22px; }
.hero-phone b { font-size: 21px; letter-spacing: .01em; }
.hero-track { display: grid; }
.hero-track > .hero-slide { grid-area: 1 / 1; opacity: 0; visibility: hidden; transition: opacity .6s ease, visibility .6s; }
.hero-track > .hero-slide.is-on { opacity: 1; visibility: visible; }
.hero-media { position: relative; margin-right: calc(-1 * max(var(--pad), (100vw - var(--max)) / 2 + var(--pad))); min-height: 420px; }
.hero-pic { position: absolute; inset: 0; opacity: 0; transition: opacity .8s ease; }
.hero-pic.is-on { opacity: 1; }
.hero-pic picture, .hero-pic img { width: 100%; height: 100%; }
.hero-pic img { object-fit: cover; object-position: 50% 45%; }
/* วิดีโอส่วนหัว: คลิปเต็มสัดส่วนกลางกรอบ + ภาพปกเบลอเป็นพื้นหลัง (คลิปแนวตั้งไม่โดนครอป) */
.hero-vid { overflow: hidden; background: var(--navy-2); }
.hero-vid-bg { position: absolute; inset: -40px; background: center / cover no-repeat; filter: blur(28px) brightness(.55) saturate(1.1); }
.hero-vid video { position: relative; display: block; height: 100%; width: auto; max-width: 100%; margin: 0 auto; object-fit: contain; box-shadow: 0 0 0 1px rgba(255,255,255,.08), 0 30px 60px -20px rgba(0,0,0,.6); }
.hero-media::before { /* ขอบเฉียงซ้ายของภาพ */
  content: ''; position: absolute; z-index: 2; top: 0; bottom: 0; left: -1px; width: 70px;
  background: linear-gradient(115deg, var(--navy) 50%, transparent 50.5%);
}
.hero-dots { position: absolute; z-index: 3; right: 20px; bottom: 18px; display: flex; gap: 8px; }
.hero-dots button { width: 30px; height: 6px; border-radius: 3px; border: 0; background: rgba(255, 255, 255, .55); cursor: pointer; padding: 0; }
.hero-dots button[aria-current="true"] { background: #fff; width: 44px; }
@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-media { order: -1; margin: 0 calc(-1 * var(--pad)); min-height: 0; aspect-ratio: 4/3; max-height: 56vh; }
  .hero-media::before { display: none; }
  .hero-media:has(.hero-vid) { aspect-ratio: 1/1; max-height: 64vh; }
  .hero-copy { padding: 28px 0 40px; }
}

/* แบนเนอร์แบบข้อความทับภาพ (ร้านเลือกได้ในหลังบ้าน) */
.hero-over { position: relative; color: #fff; }
.hero-over .hero-track > .hero-slide { position: relative; min-height: clamp(420px, 66vh, 660px); display: flex; align-items: flex-end; }
.hero-over .hero-pic, .hero-over .hero-pic img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 1; }
.hero-over .hero-slide::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(12, 34, 87, .15), rgba(12, 34, 87, .82)); }
.hero-over .hero-copy { position: relative; z-index: 2; width: 100%; padding-block: clamp(40px, 7vw, 90px); }
.hero-over h1, .hero-over .h1-like { font-size: clamp(30px, 5vw, 58px); line-height: 1.4; max-width: 18ch; margin-bottom: 14px; font-weight: 700; }
.hero-compact .hero-track > .hero-slide { min-height: clamp(260px, 36vh, 380px); }

/* ---------- แถบมาตรฐาน / จุดเด่นใต้แบนเนอร์ ---------- */
.trust { background: #fff; border-bottom: 1px solid var(--line); }
.trust-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.trust-list li { display: flex; align-items: center; gap: 14px; padding: 22px 18px; border-left: 1px solid var(--line); }
.trust-list li:first-child { border-left: 0; padding-left: 0; }
.trust-list .ic { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); flex: none; }
.trust-list .ic svg { width: 24px; height: 24px; }
.trust-list h3 { font-size: 16px; line-height: 1.4; }
.trust-list p { margin: 2px 0 0; font-size: 14.5px; color: var(--muted); line-height: 1.5; }
@media (max-width: 900px) {
  .trust-list { grid-template-columns: 1fr 1fr; }
  .trust-list li { padding: 16px 12px; border-left: 0; border-top: 1px solid var(--line); }
  .trust-list li:nth-child(-n+2) { border-top: 0; }
  .trust-list li:nth-child(odd) { padding-left: 0; }
  .trust-list .ic { width: 40px; height: 40px; }
}
@media (max-width: 400px) { .trust-list li { flex-direction: column; align-items: flex-start; gap: 8px; } }

/* ---------- หมวดงาน (การ์ดแนวนอน รูปซ้าย ข้อความขวา) ---------- */
.cat-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; margin-bottom: clamp(36px, 5vw, 56px); }
/* 4 หมวด → 2x2 ไม่ให้เหลือกล่องเดียวโดดในแถวล่าง */
.cat-grid:has(> :nth-child(4):last-child) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cat { display: grid; grid-template-columns: 44% 1fr; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; text-decoration: none; transition: transform .2s var(--ease), box-shadow .2s var(--ease); }
.cat:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.cat-pic { background: #e9ebee; display: grid; place-items: center; min-height: 170px; }
.cat-pic img { width: 100%; height: 100%; object-fit: cover; }
.cat-pic .ic svg { width: 44px; height: 44px; color: var(--navy-2); }
.cat-body { padding: 18px 18px 16px; display: flex; flex-direction: column; }
.cat-no { font-size: 14px; font-weight: 700; letter-spacing: .14em; color: var(--muted); }
.cat h3 { font-size: 20px; color: var(--navy); margin: 2px 0 6px; }
.cat p { font-size: 14.5px; color: var(--muted); line-height: 1.55; margin: 0 0 12px; }
.cat-more { margin-top: auto; display: inline-flex; align-items: center; gap: 6px; align-self: flex-start; font-size: 14.5px; font-weight: 600; color: var(--accent); border: 1.5px solid var(--accent); border-radius: 6px; padding: 5px 12px; }
.cat-more svg { width: 16px; height: 16px; }
@media (max-width: 960px) { .cat-grid, .cat-grid:has(> :nth-child(4):last-child) { grid-template-columns: 1fr; gap: 12px; } .cat { grid-template-columns: 38% 1fr; } }

/* ---------- การ์ดสินค้า (รูปตามสัดส่วนจริง ไม่ครอป) ---------- */
.pc-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; align-items: start; }
.pc { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; transition: transform .2s var(--ease), box-shadow .2s var(--ease); }
.pc:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.pc[hidden], .spec-row[hidden] { display: none; }
.pc-pic { display: block; background: #e9ebee; aspect-ratio: 3/4; }
.pc-pic img { width: 100%; height: 100%; object-fit: contain; }
.pc-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.pc-cat { font-size: 14px; font-weight: 600; color: var(--accent); letter-spacing: .02em; }
.pc h3 { font-size: 17px; line-height: 1.45; }
.pc h3 a { text-decoration: none; }
.pc h3 a:hover { color: var(--accent); }
.pc p { font-size: 14.5px; color: var(--muted); line-height: 1.55; margin: 0; }
.pc-foot { margin-top: 10px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }
.pc-price { font-weight: 700; color: var(--navy); }
.pc-price s { font-weight: 400; color: var(--muted); margin-left: 6px; }
.pc-price.is-quote { font-size: 14.5px; color: var(--navy-2); background: var(--steel-2); padding: 3px 10px; border-radius: 4px; }
.pc-sold { font-weight: 700; color: #b42318; }
@media (max-width: 1080px) { .pc-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 767px) { .pc-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; } .pc-body { padding: 10px 12px 12px; } .pc h3 { font-size: 15.5px; } .pc .btn-sm { width: 100%; } .pc-foot { flex-direction: column; align-items: stretch; } }

/* ตัวกรองหมวด + ค้นหา */
.chips { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 22px; }
.chip { font: inherit; font-size: 15px; font-weight: 600; padding: 9px 18px; border-radius: 999px; border: 1.5px solid var(--line); background: #fff; color: var(--ink); cursor: pointer; min-height: 44px; }
.chip[aria-pressed="true"] { background: var(--navy); border-color: var(--navy); color: #fff; }
.search { margin-left: auto; flex: 0 1 280px; }
.search input { width: 100%; font: inherit; font-size: 16px; padding: 10px 14px; border: 1.5px solid var(--line); border-radius: 8px; background: #fff; min-height: 44px; }
@media (max-width: 640px) { .search { margin-left: 0; flex: 1 1 100%; } }
.empty { padding: 28px; text-align: center; color: var(--muted); background: #fff; border: 1px dashed var(--line); border-radius: var(--radius); }

/* รายการแนวนอนแบบตารางสเปก */
.spec-rows { border-top: 1px solid var(--line); }
.spec-row { display: grid; grid-template-columns: 96px 1fr auto; gap: 18px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--line); }
.spec-pic { background: #e9ebee; border-radius: 8px; overflow: hidden; }
.spec-pic img { width: 100%; aspect-ratio: 1; object-fit: contain; }
.spec-row h3 { font-size: 17.5px; }
.spec-row h3 a { text-decoration: none; }
.spec-row p { margin: 2px 0 0; color: var(--muted); font-size: 15px; }
.row-cta { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
@media (max-width: 600px) { .spec-row { grid-template-columns: 72px 1fr; } .row-cta { grid-column: 1 / -1; flex-direction: row; justify-content: space-between; align-items: center; } }

/* ---------- เกี่ยวกับ / บริการเด่น แบบแบ่งครึ่ง ---------- */
.about-sec + .about-sec { padding-top: 0; }
.about { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: clamp(24px, 5vw, 64px); align-items: center; background: #fff; border: 1px solid var(--line); border-radius: calc(var(--radius) + 4px); overflow: hidden; }
.about.pic-right .about-pic { order: 2; }
.about-pic { margin: 0; align-self: stretch; min-height: 320px; position: relative; }
.about-pic img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.about-text { padding: clamp(26px, 4.5vw, 56px); padding-left: 0; }
.about.pic-right .about-text { padding-left: clamp(26px, 4.5vw, 56px); padding-right: 0; }
.about-text h2 { font-size: clamp(24px, 2.5vw, 32px); margin-bottom: 14px; color: var(--navy); }
.about-text h2::after { content: ''; display: block; width: 44px; height: 4px; border-radius: 2px; background: var(--accent); margin-top: 12px; }
.about-text .prose { color: var(--muted); margin-bottom: 20px; }
.about:not(:has(.about-pic)) { grid-template-columns: 1fr; }
.about:not(:has(.about-pic)) .about-text { padding: clamp(26px, 4.5vw, 56px); }
@media (max-width: 860px) {
  .about { grid-template-columns: 1fr; }
  .about.pic-right .about-pic { order: 0; }
  .about-pic { min-height: 0; aspect-ratio: 3/2; }
  .about-text, .about.pic-right .about-text { padding: 22px 20px 26px; }
  /* มือถือ: ให้ชื่อบริษัทเต็ม "บริษัท ศิริพัฒน์เพอร์เฟคชั่น จำกัด" อยู่บรรทัดเดียว (ลูกค้าขอ) */
  .about-text h2 { font-size: min(24px, 5.1vw); }
}

/* ---------- ขั้นตอน 01–04 ---------- */
.steps { background: #fff; border-block: 1px solid var(--line); }
.step-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(var(--n, 4), minmax(0, 1fr)); gap: 18px; counter-reset: s; position: relative; }
.step-list li { position: relative; padding: 22px 20px 20px; border-radius: var(--radius); background: var(--paper); border: 1px solid var(--line); }
.step-list li:not(:last-child)::after { /* ลูกศรเชื่อมขั้น */
  content: ''; position: absolute; top: 50%; right: -14px; width: 10px; height: 10px; border-top: 2px solid var(--steel); border-right: 2px solid var(--steel); transform: translateY(-50%) rotate(45deg); z-index: 1;
}
.step-no { display: block; font-size: clamp(34px, 3.6vw, 44px); font-weight: 700; line-height: 1; color: var(--accent); letter-spacing: -.01em; }
.step-list .ic { position: absolute; top: 20px; right: 18px; color: var(--navy-2); opacity: .8; }
.step-list .ic svg { width: 30px; height: 30px; stroke-width: 1.5; }
.step-list h3 { font-size: 17.5px; margin: 14px 0 4px; color: var(--navy); }
.step-list p { margin: 0; font-size: 15px; color: var(--muted); line-height: 1.55; }
@media (max-width: 900px) {
  .step-list { grid-template-columns: 1fr 1fr; gap: 12px; }
  .step-list li::after { display: none; }
}
@media (max-width: 420px) { .step-list { grid-template-columns: 1fr; } }

/* ---------- เหตุผลที่เลือกเรา (หัวข้อซ้าย รายการเลขขวา) ---------- */
.reasons-grid { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: clamp(24px, 5vw, 72px); align-items: start; }
.reasons-grid .sec-head { position: sticky; top: 110px; margin: 0; }
.reason-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.reason-list li { display: grid; grid-template-columns: 64px 1fr auto; gap: 16px; align-items: start; padding: 22px 0; border-bottom: 1px solid var(--line); }
.reason-no { font-size: 30px; font-weight: 700; color: var(--accent); line-height: 1.1; }
.reason-list h3 { font-size: 19px; color: var(--navy); }
.reason-list p { margin: 4px 0 0; color: var(--muted); font-size: 15.5px; }
.reason-list .ic { color: var(--navy-2); opacity: .7; }
.reason-list .ic svg { width: 28px; height: 28px; }
@media (max-width: 860px) { .reasons-grid { grid-template-columns: 1fr; } .reasons-grid .sec-head { position: static; } .reason-list li { grid-template-columns: 48px 1fr; } .reason-list .ic { display: none; } }

/* การ์ดบริการไอคอนเส้น / กล่อง */
.svc-grid { display: grid; grid-template-columns: repeat(var(--cols, 3), minmax(0, 1fr)); gap: 16px; }
.svc, .fx-cell { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.svc .ic, .fx-cell .ic { width: 48px; height: 48px; border-radius: 10px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); margin-bottom: 14px; }
.svc .ic svg, .fx-cell .ic svg { width: 26px; height: 26px; }
.svc h3, .fx-cell h3 { font-size: 18px; color: var(--navy); }
.svc p, .fx-cell p { margin: 6px 0 0; color: var(--muted); font-size: 15px; }
.fx-bento { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.fx-big { grid-column: span 2; background: var(--navy); color: #fff; border-color: var(--navy); }
.fx-big h3 { color: #fff; } .fx-big p { color: #cfd8ea; }
@media (max-width: 860px) { .svc-grid, .fx-bento { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .svc-grid { grid-template-columns: 1fr; } .fx-bento { grid-template-columns: 1fr; } .fx-big { grid-column: auto; } }

/* ---------- ผลงาน (พื้นน้ำเงินเข้ม · masonry ตามสัดส่วนจริง) ---------- */
.sec-dark { background: var(--navy); color: #fff; position: relative; overflow: hidden; }
.sec-dark::before { content: ''; position: absolute; inset: 0; opacity: .05; background: repeating-linear-gradient(115deg, #fff 0 1px, transparent 1px 22px); pointer-events: none; }
.sec-dark .wrap { position: relative; }
.sec-dark .sec-head p { color: #c7d2e8; }
.sec-dark .eyebrow { color: #b9a7ff; }
.sec-dark .sec-link { color: #fff; border: 1.5px solid rgba(255, 255, 255, .7); padding: 8px 16px; border-radius: 8px; }
/* แถวเสมอกัน: ความกว้างของแต่ละรูปตามสัดส่วนจริง (--r = กว้าง/สูง) ไม่ครอป */
.gal { display: flex; flex-wrap: wrap; gap: 14px; --h: calc(860px / var(--cols, 3)); }
.gal::after { content: ''; flex: 999 1 0; }
.gal-item { flex: var(--r, 1) 1 calc(var(--h) * var(--r, 1)); aspect-ratio: var(--r, 1); max-width: 100%; margin: 0; position: relative; border-radius: 8px; overflow: hidden; background: #19357a; }
.gal-item a, .gal-item video { display: block; width: 100%; height: 100%; }
.gal-item video { object-fit: cover; background: #0c2257; }
.gal-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease); }
.gal-item a:hover img { transform: scale(1.03); }
.gal-item figcaption { position: absolute; left: 10px; bottom: 10px; right: 10px; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; pointer-events: none; }
.gal-item figcaption b { background: var(--accent); color: #fff; font-size: 14px; padding: 3px 10px; border-radius: 4px; }
.gal-item figcaption span { background: rgba(12, 34, 87, .85); font-size: 14px; padding: 2px 8px; border-radius: 4px; line-height: 1.45; }
@media (max-width: 767px) { .gal { gap: 8px; --h: 130px; } }

/* ---------- เสียงจากลูกค้า ---------- */
.quotes { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.quote { margin: 0; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.quote p { font-size: 16.5px; }
.quote figcaption { display: flex; gap: 12px; align-items: center; }
.quote figcaption img { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; }
.quote figcaption span { display: flex; flex-direction: column; font-size: 14.5px; color: var(--muted); }
.quote b { color: var(--ink); }

/* ---------- คำถามที่พบบ่อย ---------- */
.faq-grid { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: clamp(24px, 5vw, 64px); align-items: start; }
.faq-grid > .faq:only-child { grid-column: 1 / -1; }
.faq details { background: #fff; border: 1px solid var(--line); border-radius: 8px; margin-bottom: 10px; }
.faq summary { cursor: pointer; list-style: none; padding: 16px 52px 16px 18px; font-weight: 600; position: relative; color: var(--navy); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; position: absolute; right: 18px; top: 50%; transform: translateY(-50%); font-size: 24px; font-weight: 400; color: var(--accent); }
.faq details[open] summary::after { content: '–'; }
.faq-a { padding: 0 18px 18px; margin: 0; color: var(--muted); }
@media (max-width: 860px) { .faq-grid { grid-template-columns: 1fr; } }

/* ---------- แถบชวนติดต่อ ---------- */
.cta-band { padding-block: clamp(40px, 6vw, 64px); }
.cta-dark { background: linear-gradient(115deg, var(--navy-2), var(--navy)); color: #fff; }
.cta-soft { background: var(--accent-soft); }
.cta-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 22px 40px; }
.cta-inner h2 { font-size: clamp(22px, 3vw, 32px); max-width: 30ch; }
.cta-kicker { display: block; font-size: 14px; font-weight: 600; letter-spacing: .08em; opacity: .8; margin-bottom: 6px; }
.cta-actions { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
.cta-phone { text-decoration: none; opacity: .9; font-weight: 600; }
.cta-phone:hover { text-decoration: underline; }

/* ---------- ติดต่อ (พื้นน้ำเงินเข้ม) ---------- */
.contact-sec { background: var(--navy); color: #fff; }
.contact-sec .sec-head p { color: #c7d2e8; }
.contact-sec .eyebrow { color: #b9a7ff; }
.contact { display: grid; grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr); gap: clamp(24px, 5vw, 56px); align-items: start; }
.contact-note { color: #d6deef; }
.contact-list { list-style: none; margin: 0 0 22px; padding: 0; display: grid; gap: 14px; }
.contact-list li { display: flex; gap: 14px; align-items: flex-start; }
.contact-list li > svg { width: 22px; height: 22px; margin-top: 3px; color: #b9a7ff; }
.contact-list small { display: block; font-size: 14px; color: #aebbd6; }
.contact-list a, .contact-list span { text-decoration: none; font-size: 17px; overflow-wrap: anywhere; }
.contact-list a:hover { text-decoration: underline; }
.hours { list-style: none; margin: 0 0 24px; padding: 14px 18px; display: grid; gap: 4px; background: rgba(255, 255, 255, .06); border-radius: 8px; font-size: 15.5px; }
.hours li { display: flex; justify-content: space-between; gap: 12px; }
.hours .closed { color: #ffb4a8; }
.lead { background: #fff; color: var(--ink); border-radius: calc(var(--radius) + 2px); padding: clamp(20px, 3vw, 32px); display: grid; gap: 14px; }
.lead h3 { font-size: 20px; color: var(--navy); }
.f2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 520px) { .f2 { grid-template-columns: 1fr; } }
.lead label { display: block; font-size: 14.5px; font-weight: 600; margin-bottom: 6px; }
.lead input, .lead textarea { width: 100%; font: inherit; font-size: 16px; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: 8px; background: var(--paper); color: var(--ink); }
.lead input:focus, .lead textarea:focus { border-color: var(--accent); outline: none; background: #fff; }
.lead textarea { min-height: 120px; resize: vertical; }
.lead .btn { width: 100%; }
.hp { position: absolute; left: -9999px; }
.msg { margin: 0; font-size: 15px; min-height: 1em; }
.msg.ok { color: #067647; } .msg.bad { color: #b42318; }
.form-note { margin: 0; font-size: 14px; color: var(--muted); }
.map-wrap { margin-top: clamp(24px, 4vw, 40px); }
.map { width: 100%; height: 340px; border: 0; border-radius: var(--radius); display: block; background: #19357a; }
.map-link { display: inline-flex; align-items: center; gap: 6px; margin-top: 10px; color: #fff; font-weight: 600; }
@media (max-width: 860px) { .contact { grid-template-columns: 1fr; } .map { height: 280px; } }

/* ---------- หัวหน้ารอง / เส้นทาง ---------- */
.page-head { background: linear-gradient(115deg, var(--navy), var(--navy-2)); color: #fff; padding-block: clamp(30px, 5vw, 56px); }
.page-head h1 { font-size: clamp(28px, 4vw, 44px); }
.page-head p { color: #d6deef; margin: 8px 0 0; max-width: 60ch; }
.crumbs { font-size: 14px; margin-bottom: 10px; opacity: .85; }
.crumbs a { text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }
.pd .crumbs { color: var(--muted); opacity: 1; margin-bottom: 20px; }

/* ---------- รายละเอียดสินค้า ---------- */
.pd-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(24px, 5vw, 60px); align-items: start; }
.pd-main { background: #e9ebee; border-radius: var(--radius); overflow: hidden; max-height: 80vh; }
.pd-main img { width: 100%; height: 100%; object-fit: contain; }
.pd-thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(72px, 1fr)); gap: 8px; margin-top: 10px; }
.pd-thumbs button { padding: 0; border: 2px solid transparent; border-radius: 8px; overflow: hidden; background: #e9ebee; cursor: pointer; }
.pd-thumbs button[aria-current="true"] { border-color: var(--accent); }
.pd-thumbs img { width: 100%; aspect-ratio: 1; object-fit: contain; }
.pd-info h1 { font-size: clamp(26px, 3.4vw, 38px); color: var(--navy); margin: 4px 0 10px; }
.pd-short { color: var(--muted); font-size: 17.5px; }
.pd-price { font-size: 24px; font-weight: 700; color: var(--navy); margin: 0 0 18px; }
.pd-price.is-quote { font-size: 20px; }
.pd-price small { display: block; font-size: 14.5px; font-weight: 400; color: var(--muted); }
.pd-opts { margin-bottom: 18px; }
.pd-opts ul { list-style: none; padding: 0; margin: 8px 0 0; display: flex; flex-wrap: wrap; gap: 8px; }
.pd-opts li { border: 1px solid var(--line); background: #fff; border-radius: 6px; padding: 6px 12px; font-size: 15px; }
.pd-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 20px; }
.pd-actions .btn-ghost { color: var(--navy); }
.pd-points { list-style: none; padding: 16px 18px; margin: 0 0 24px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); display: grid; gap: 8px; font-size: 15.5px; }
.pd-points li { display: flex; gap: 10px; }
.pd-points svg { color: var(--accent); margin-top: 3px; }
.pd-desc h2 { font-size: 20px; margin-bottom: 8px; color: var(--navy); }
.pd-related { margin-top: clamp(40px, 6vw, 72px); }
.pd-related h2 { font-size: clamp(22px, 2.6vw, 28px); margin-bottom: 18px; }
@media (max-width: 860px) { .pd-grid { grid-template-columns: 1fr; } .pd-actions .btn { flex: 1 1 100%; } }

/* ---------- ข้อความยาว ---------- */
.prose { max-width: 70ch; }
.prose-wide { max-width: none; }
.prose h2 { font-size: clamp(22px, 2.8vw, 30px); margin-bottom: 14px; }

/* ---------- ท้ายเว็บ ---------- */
.foot { background: #081a45; color: #cdd6ea; padding-top: clamp(40px, 6vw, 64px); }
.foot-grid { display: grid; grid-template-columns: 1.4fr .8fr 1.2fr; gap: 32px; padding-bottom: 32px; }
.logo-foot b { color: #fff; } .logo-foot small { color: #aebbd6; white-space: normal; }
.logo-foot img { background: #fff; }
.foot-brand p { margin: 14px 0 0; font-size: 15px; max-width: 46ch; }
.foot h3 { font-size: 16px; color: #fff; margin-bottom: 12px; }
.foot ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; font-size: 15.5px; }
.foot a { text-decoration: none; }
.foot a:hover { color: #fff; text-decoration: underline; }
.foot-contact li { display: flex; gap: 10px; align-items: flex-start; }
.foot-contact svg { width: 18px; height: 18px; margin-top: 4px; color: #b9a7ff; }
.social { display: flex; gap: 10px; margin-top: 16px; }
.social a { width: 42px; height: 42px; border-radius: 8px; display: grid; place-items: center; background: rgba(255, 255, 255, .08); }
.foot-bottom { border-top: 1px solid rgba(255, 255, 255, .12); padding-block: 18px; font-size: 14px; }
@media (max-width: 860px) { .foot-grid { grid-template-columns: 1fr 1fr; } .foot-brand { grid-column: 1 / -1; } }
@media (max-width: 480px) { .foot-grid { grid-template-columns: 1fr; } }

/* ---------- ปุ่มลอยมือถือ (ไลน์ + โทร) ---------- */
.float-contact { display: none; }
@media (max-width: 760px) {
  .float-contact { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; padding: 8px 10px calc(8px + env(safe-area-inset-bottom)); background: #fff; border-top: 1px solid var(--line); }
  .float-contact .btn { min-height: 44px; padding: 8px 10px; }
  .float-contact .btn-ghost { color: var(--navy); }
  body { padding-bottom: 66px; }
  body.nav-open .float-contact { display: none; }
}

/* ---------- ดูรูปขนาดเต็ม ---------- */
dialog.light { border: 0; padding: 0; background: transparent; max-width: 94vw; max-height: 92vh; }
dialog.light::backdrop { background: rgba(5, 14, 36, .88); }
dialog.light img { max-width: 94vw; max-height: 88vh; object-fit: contain; border-radius: 6px; }
dialog.light button { position: fixed; top: 14px; right: 16px; width: 48px; height: 48px; border-radius: 50%; border: 0; background: #fff; font-size: 28px; cursor: pointer; }

/* ---------- บทความ (ใช้เมื่อซื้อระบบบทความ) ---------- */
.cards { display: grid; grid-template-columns: repeat(var(--cols, 3), minmax(0, 1fr)); gap: 16px; }
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.card-pic img { width: 100%; aspect-ratio: 16/10; object-fit: cover; }
.card-body { padding: 16px; }
.a-wrap { max-width: 760px; }
.a-meta { color: var(--muted); font-size: 14.5px; }
.a-cover { margin: 20px 0; } .a-cover img { border-radius: var(--radius); }
.a-lead { font-size: 18.5px; }
.a-toc { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 20px; margin: 20px 0; }
.a-body h2 { margin: 1.6em 0 .5em; } .a-body h3 { margin: 1.3em 0 .4em; }
.a-fig { margin: 24px 0; } .a-fig figcaption { font-size: 14px; color: var(--muted); margin-top: 6px; }
.a-body blockquote { margin: 20px 0; padding: 12px 20px; border-left: 4px solid var(--accent); background: #fff; }
.a-cta, .a-embed { margin: 28px 0; padding: 20px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); }
@media (max-width: 767px) { .cards { grid-template-columns: 1fr 1fr; } }

/* ---------- เนื้อหาปรากฏตอนเลื่อนถึง ---------- */
.rv { opacity: 0; transform: translateY(18px); transition: opacity .55s var(--ease) var(--d, 0ms), transform .55s var(--ease) var(--d, 0ms); }
.rv.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; scroll-behavior: auto !important; }
  .rv { opacity: 1; transform: none; }
}
.pc.rv.in:hover, .cat.rv.in:hover { transform: translateY(-3px); }

/* ---------- พื้นที่กดอย่างน้อย 44x44 ทุกลิงก์ (มือถือกดง่าย · ตัวตรวจ qa) ---------- */
.topbar a, .hero-phone, .sec-link, .cta-phone, .map-link, .crumbs a, .foot a:not(.logo), .contact-list a,
.pc h3 a, .spec-row h3 a, .skip { display: inline-flex; align-items: center; min-height: 44px; min-width: 44px; }
.btn-sm { min-height: 44px; }
.crumbs a { justify-content: center; }
.social a { width: 44px; height: 44px; }
.hero-dots { gap: 0; bottom: 6px; }
.hero-dots button, .hero-dots button[aria-current="true"] { width: 44px; height: 44px; background: none; position: relative; }
.hero-dots button::after { content: ''; position: absolute; left: 7px; right: 7px; top: 19px; height: 6px; border-radius: 3px; background: rgba(255, 255, 255, .55); }
.hero-dots button[aria-current="true"]::after { background: #fff; left: 0; right: 0; }
.topbar .wrap { min-height: 44px; padding-block: 0; }
