/* ============================================================
   นำแสง เจนเนอเรเตอร์ — Design System
   ลุค: ถอดแบบเว็บเก่า namsangphuket.com  (teal สว่าง บนพื้นขาว)
   ฟอนต์: Prompt (หัวข้อ) + IBM Plex Sans Thai (เนื้อหา)
   สีแบรนด์: teal #0e98ae  — แก้สี/ฟอนต์/ระยะที่ :root ที่เดียว ใช้ร่วมทุกหน้า
   ============================================================ */

:root {
  /* สีแบรนด์ teal (จากเว็บเก่า) */
  --teal:      #0a7f90;   /* สีหลัก = ปุ่ม/ลิงก์/ไอคอน/แถบ (เข้มผ่าน WCAG AA ขาว 4.7:1) */
  --teal-d:    #0a6675;   /* hover/ตัวอักษร teal บนขาว เข้มขึ้น (6.6:1) */
  --teal-deep: #08434d;   /* เข้มสุด = ปลาย gradient / hero / cta */
  --teal-l:    #5ec0cb;   /* teal อ่อน */
  --teal-soft: #eaf5f6;   /* พื้นไอคอน/แท็ก (ซอฟต์ขึ้น) */
  /* ตัวอักษรบนพื้น teal (gradient teal→teal-deep) — ผ่าน AA */
  --on-teal:      #ffffff;
  --on-teal-soft: #e3f5f8;  /* ตัวอักษรรอง (เดิม #e3f5f8/#e3f5f8 contrast ต่ำ) */

  /* คงชื่อ --amber/--ink ไว้เพื่อ compatibility กับมาร์กอัปเดิม แต่ map เป็น teal */
  --amber:      var(--teal);
  --amber-dark: var(--teal-d);
  --amber-soft: var(--teal-soft);
  --ink:        #0b2a30;   /* deep teal-charcoal (footer/แถบเข้ม) ดูพรีเมียม */
  --ink-2:      #0f444e;
  --steel:      #0d8a9b;

  /* ตัวอักษร/พื้น */
  --text:   #1c2e34;       /* หัวข้อ/ตัวเข้ม */
  --muted:  #5f717a;       /* ตัวรอง */
  --paper:  #ffffff;
  --mist:   #f5f9fa;       /* พื้นส่วนสลับ */
  --mist-2: #eef4f5;
  --line:   #e2e9eb;

  /* ระบบ */
  --radius:    14px;
  --radius-sm: 10px;
  --shadow:    0 10px 30px rgba(14,51,59,.08);
  --shadow-lg: 0 24px 60px rgba(14,51,59,.16);
  --container: 1180px;
  --header-h:  72px;
  --ease: cubic-bezier(.22,.61,.36,1);

  --font-head: "Prompt", system-ui, sans-serif;
  --font-body: "IBM Plex Sans Thai", "Prompt", system-ui, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 12px); -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font-body);
  color: var(--text);
  background: var(--paper);
  line-height: 1.7;
  font-size: 16.5px;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3, h4 { font-family: var(--font-head); line-height: 1.2; color: var(--text); font-weight: 600; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
ul { list-style: none; }

/* ---------- layout helpers ---------- */
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: 22px; }
.section { padding: 84px 0; }
.section--tight { padding: 56px 0; }
.section--mist { background: var(--mist); }
.section--ink { background: linear-gradient(120deg, var(--teal-d) 0%, var(--teal-deep) 100%); color: #e6f7fa; }
.section--ink h2, .section--ink h3 { color: #fff; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-head); font-weight: 600; font-size: .82rem;
  letter-spacing: .14em; text-transform: uppercase;
  color: var(--teal);
}
.eyebrow::before { content: ""; width: 26px; height: 2px; background: var(--teal); border-radius: 2px; }
.section--ink .eyebrow { color: #d6f3f7; }
.section--ink .eyebrow::before { background: #d6f3f7; }

.section-head { max-width: 720px; margin-bottom: 46px; }
.section-head.center { margin-inline: auto; text-align: center; }
.section-head h2 { font-size: clamp(1.7rem, 3.4vw, 2.5rem); margin: 12px 0 14px; letter-spacing: -.01em; }
.section-head p { color: var(--muted); font-size: 1.06rem; }
.section--ink .section-head p { color: #e3f5f8; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  font-family: var(--font-head); font-weight: 600; font-size: 1rem;
  padding: 13px 26px; border-radius: 8px; border: 2px solid transparent;
  cursor: pointer; transition: transform .15s var(--ease), box-shadow .2s, background .2s, color .2s, border-color .2s;
  white-space: nowrap;
}
.btn svg { width: 18px; height: 18px; }
/* ปุ่มหลัก (teal) — คงชื่อ btn--amber ไว้ใช้กับมาร์กอัปเดิม */
.btn--amber { background: var(--teal); color: #fff; box-shadow: 0 8px 22px rgba(14,152,174,.30); }
.btn--amber:hover { background: var(--teal-d); transform: translateY(-2px); box-shadow: 0 12px 28px rgba(14,152,174,.40); }
.btn--ink { background: var(--teal-deep); color: #fff; }
.btn--ink:hover { background: var(--ink-2); transform: translateY(-2px); }
.btn--ghost { background: transparent; color: var(--teal-d); border-color: var(--teal); }
.btn--ghost:hover { background: var(--teal-soft); transform: translateY(-2px); }
.btn--light { background: #fff; color: var(--teal-d); }
.btn--light:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.btn--outline-light { background: transparent; color: #fff; border-color: rgba(255,255,255,.55); }
.btn--outline-light:hover { border-color: #fff; background: rgba(255,255,255,.12); }
.btn--lg { padding: 16px 34px; font-size: 1.06rem; }

/* ---------- header / nav (สว่าง) ---------- */
.header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,.97);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 1px 10px rgba(14,51,59,.04);
}
.nav { display: flex; align-items: center; justify-content: space-between; height: var(--header-h); gap: 18px; }
.brand { display: flex; align-items: center; gap: 11px; }
.brand .mark {
  width: 42px; height: 42px; border-radius: 11px; flex: none;
  background: linear-gradient(135deg, var(--teal-d), var(--teal-deep));
  display: grid; place-items: center; box-shadow: 0 6px 16px rgba(14,152,174,.35);
}
.brand .mark svg { width: 24px; height: 24px; }
.brand .mark svg path { fill: #fff; }
.brand-text b { display: block; font-family: var(--font-head); font-weight: 700; color: var(--text); font-size: 1.06rem; line-height: 1.1; letter-spacing: .01em; }
.brand-text span { display: block; font-size: .72rem; color: var(--teal); letter-spacing: .12em; text-transform: uppercase; }

.nav-links { display: flex; align-items: center; gap: 4px; }
.nav-links a {
  font-family: var(--font-head); font-weight: 500; font-size: .96rem; color: #3c4a52;
  padding: 9px 14px; border-radius: 8px; transition: color .15s, background .15s;
}
.nav-links a:hover { color: var(--teal-d); background: var(--teal-soft); }
.nav-links a.active { color: var(--teal-d); }

.nav-cta { display: flex; align-items: center; gap: 12px; }
.nav-tel { display: inline-flex; align-items: center; gap: 7px; color: var(--text); font-family: var(--font-head); font-weight: 600; font-size: .98rem; }
.nav-tel svg { width: 17px; height: 17px; color: var(--teal); }

.nav-toggle { display: none; background: transparent; border: 0; width: 44px; height: 44px; cursor: pointer; flex-direction: column; gap: 5px; justify-content: center; align-items: center; }
.nav-toggle span { width: 24px; height: 2px; background: var(--text); border-radius: 2px; transition: transform .25s var(--ease), opacity .2s; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- hero ---------- */
.hero {
  position: relative; color: #fff; overflow: hidden;
  background: linear-gradient(160deg, var(--teal-d) 0%, var(--teal-deep) 100%);
}
.hero-inner { position: relative; z-index: 2; display: grid; grid-template-columns: 1.15fr .85fr; gap: 48px; align-items: center; padding: 78px 0 86px; }
.hero h1 { color: #fff; font-size: clamp(2.1rem, 4.6vw, 3.4rem); font-weight: 700; letter-spacing: -.015em; }
.hero h1 .hl { color: #ffd24d; }
.hero .lede { color: #e3f5f8; font-size: 1.16rem; margin: 20px 0 30px; max-width: 560px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; }
.hero-trust { display: flex; flex-wrap: wrap; gap: 22px; margin-top: 34px; }
.hero-trust div { display: flex; align-items: center; gap: 9px; color: #eafafc; font-size: .96rem; }
.hero-trust svg { width: 20px; height: 20px; color: #ffd24d; flex: none; }

/* การ์ดสถิติฝั่งขวาของ hero */
.hero-card {
  background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.28);
  border-radius: 18px; padding: 28px; backdrop-filter: blur(8px);
}
.hero-card h2 { color: #fff; font-size: 1.12rem; margin-bottom: 18px; display: flex; align-items: center; gap: 9px; }
.hero-card h2 svg { width: 22px; height: 22px; color: #ffd24d; }
.hero-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.hero-stats .num { font-family: var(--font-head); font-weight: 700; font-size: 1.7rem; color: #fff; line-height: 1; }
.hero-stats .lbl { font-size: .86rem; color: #e3f5f8; margin-top: 4px; }

/* ---------- grids & cards ---------- */
.grid { display: grid; gap: 24px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.card {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 28px; transition: transform .2s var(--ease), box-shadow .2s, border-color .2s;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: var(--teal-l); }
/* icon + หัวข้อ อยู่แถวเดียว (เลี่ยง icon-tile AI-template) */
.card-head { display: flex; align-items: center; gap: 12px; margin-bottom: 9px; }
.card .ico {
  display: grid; place-items: center; width: 34px; height: 34px; flex: none;
  color: var(--teal);
}
.card .ico svg { width: 32px; height: 32px; }
.card-head h3 { margin-bottom: 0; }
.card h3 { font-size: 1.2rem; margin-bottom: 9px; }
.card p { color: var(--muted); font-size: .98rem; }
.card--link { display: block; }
.card--link .more { display: inline-flex; align-items: center; gap: 6px; margin-top: 14px; color: var(--teal-d); font-family: var(--font-head); font-weight: 600; font-size: .94rem; }
.card--link:hover .more { gap: 10px; }

/* product card */
.product {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
  display: flex; flex-direction: column; transition: transform .2s var(--ease), box-shadow .2s;
}
.product:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.product .ph { aspect-ratio: 16/10; background: linear-gradient(135deg, var(--teal-d), var(--teal-deep)); display: grid; place-items: center; position: relative; }
.product .ph svg { width: 76px; height: 76px; color: rgba(255,255,255,.85); }
.product .badge { position: absolute; top: 12px; left: 12px; background: var(--teal); color: #fff; font-family: var(--font-head); font-weight: 600; font-size: .76rem; padding: 4px 11px; border-radius: 6px; }
.product .body { padding: 20px 22px 24px; flex: 1; display: flex; flex-direction: column; }
.product h3 { font-size: 1.16rem; margin-bottom: 6px; }
.product .brand-line { color: var(--teal-d); font-family: var(--font-head); font-weight: 600; font-size: .88rem; margin-bottom: 10px; }
.product .specs { margin-top: auto; padding-top: 14px; border-top: 1px dashed var(--line); display: grid; gap: 6px; }
.product .specs li { display: flex; justify-content: space-between; gap: 12px; font-size: .92rem; }
.product .specs li span:first-child { color: var(--muted); }
.product .specs li span:last-child { font-weight: 600; color: var(--text); }

/* feature / check list */
.checks { display: grid; gap: 13px; }
.checks li { display: flex; gap: 12px; align-items: flex-start; }
.checks li svg { width: 22px; height: 22px; color: var(--teal); flex: none; margin-top: 2px; }
.checks li b { color: var(--text); }
.checks li span { color: var(--muted); }

/* stat band (บนพื้น teal) */
.stats-band { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; text-align: center; }
.stats-band .num { font-family: var(--font-head); font-weight: 700; font-size: clamp(2rem, 4vw, 2.8rem); color: #fff; line-height: 1; }
.stats-band .lbl { color: #e3f5f8; margin-top: 8px; font-size: .98rem; }

/* split (รูป + ข้อความ) */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 50px; align-items: center; }
.split .visual { border-radius: var(--radius); min-height: 320px; background: linear-gradient(150deg, var(--teal-d), var(--teal-deep)); position: relative; overflow: hidden; display: grid; place-items: center; box-shadow: var(--shadow); }
.split .visual svg { width: 110px; height: 110px; color: rgba(255,255,255,.9); }
.split h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); margin-bottom: 16px; }
.split p { color: var(--muted); margin-bottom: 18px; }

/* steps */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; counter-reset: step; }
.step { position: relative; padding-top: 8px; }
.step .n { width: 46px; height: 46px; border-radius: 12px; background: var(--teal-soft); color: var(--teal-d); display: grid; place-items: center; font-family: var(--font-head); font-weight: 700; font-size: 1.25rem; margin-bottom: 14px; }
.step h3 { font-size: 1.1rem; margin-bottom: 7px; }
.step p { color: var(--muted); font-size: .96rem; }

/* CTA band */
.cta-band { position: relative; overflow: hidden; background: linear-gradient(120deg, var(--teal-d), var(--teal-deep)); color: #fff; border-radius: 20px; padding: 52px; text-align: center; box-shadow: var(--shadow-lg); }
.cta-band::before { content: ""; position: absolute; right: -60px; top: -60px; width: 260px; height: 260px; border-radius: 50%; background: radial-gradient(circle, rgba(255,255,255,.18), transparent 70%); }
.cta-band h2 { color: #fff; font-size: clamp(1.6rem, 3vw, 2.3rem); position: relative; }
.cta-band p { color: #e3f5f8; max-width: 560px; margin: 12px auto 26px; position: relative; }
.cta-band .hero-actions { justify-content: center; position: relative; }

/* ---------- client logos strip ---------- */
.logos { display: grid; grid-template-columns: repeat(6, 1fr); gap: 18px; align-items: center; }
.logos .logo {
  background: #fff; border: 1px solid var(--line); border-radius: 12px;
  height: 92px; display: grid; place-items: center; padding: 14px;
  transition: box-shadow .2s, transform .2s, border-color .2s;
}
.logos .logo:hover { box-shadow: var(--shadow); transform: translateY(-3px); border-color: var(--teal-l); }
.logos .logo img { max-height: 100%; max-width: 100%; width: auto; object-fit: contain; transition: transform .2s; }
.logos .logo:hover img { transform: scale(1.04); }

/* ---------- portfolio / ผลงาน ---------- */
.pf-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.pf-card {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
  display: flex; flex-direction: column; transition: transform .2s var(--ease), box-shadow .2s;
}
.pf-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.pf-card .ph { aspect-ratio: 4/3; position: relative; overflow: hidden; background: var(--mist-2); }
.pf-card .ph img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .4s var(--ease); }
.pf-card:hover .ph img { transform: scale(1.05); }
.pf-card .ph .tag { position: absolute; top: 12px; left: 12px; background: rgba(14,152,174,.92); color: #fff; font-family: var(--font-head); font-weight: 600; font-size: .74rem; padding: 4px 11px; border-radius: 6px; }
.pf-card .body { padding: 18px 20px 20px; flex: 1; display: flex; flex-direction: column; }
.pf-card h3 { font-size: 1.06rem; margin-bottom: 8px; line-height: 1.35; }
.pf-card p { color: var(--muted); font-size: .92rem; margin-bottom: 14px; }
.pf-card .more { margin-top: auto; display: inline-flex; align-items: center; gap: 6px; color: var(--teal-d); font-family: var(--font-head); font-weight: 600; font-size: .9rem; }
.pf-card:hover .more { gap: 10px; }
.pf-card .more svg { width: 16px; height: 16px; }

/* page hero (หน้ารอง) */
.page-hero { background: linear-gradient(160deg, var(--teal-d), var(--teal-deep)); color: #fff; padding: 56px 0; position: relative; overflow: hidden; }
.page-hero::after { content: ""; position: absolute; inset: 0; opacity: .35; background-image: linear-gradient(rgba(255,255,255,.06) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.06) 1px, transparent 1px); background-size: 40px 40px; -webkit-mask-image: radial-gradient(600px 300px at 80% 0%, #000, transparent 70%); mask-image: radial-gradient(600px 300px at 80% 0%, #000, transparent 70%); }
.page-hero .inner { position: relative; z-index: 1; max-width: 760px; }
.page-hero h1 { color: #fff; font-size: clamp(1.9rem, 4vw, 2.8rem); }
.page-hero p { color: #e3f5f8; font-size: 1.1rem; margin-top: 14px; }
.crumbs { font-size: .9rem; color: #e3f5f8; margin-bottom: 14px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.crumbs a:hover { color: #fff; }
.crumbs span { color: #ffd24d; }

/* faq */
.faq { max-width: 820px; margin-inline: auto; display: grid; gap: 14px; }
.faq details { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 4px 22px; }
.faq summary { cursor: pointer; font-family: var(--font-head); font-weight: 600; color: var(--text); padding: 16px 0; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 14px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 1.5rem; color: var(--teal-d); transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { color: var(--muted); padding: 0 0 18px; }

/* contact */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: start; }
.info-list { display: grid; gap: 18px; }
.info-item { display: flex; gap: 15px; align-items: flex-start; }
.info-item .ic { width: 48px; height: 48px; border-radius: 12px; background: var(--teal-soft); color: var(--teal-d); display: grid; place-items: center; flex: none; }
.info-item .ic svg { width: 23px; height: 23px; }
.info-item .t { font-size: .85rem; color: var(--muted); }
.info-item .v { font-family: var(--font-head); font-weight: 600; color: var(--text); font-size: 1.06rem; }
.info-item a.v:hover { color: var(--teal-d); }

.form-card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 30px; box-shadow: var(--shadow); }
.field { margin-bottom: 16px; }
.field label { display: block; font-family: var(--font-head); font-weight: 500; font-size: .92rem; margin-bottom: 6px; color: var(--text); }
.field input, .field textarea, .field select {
  width: 100%; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius-sm);
  font-family: var(--font-body); font-size: 1rem; color: var(--text); background: #fff; transition: border-color .15s, box-shadow .15s;
}
.field input:focus, .field textarea:focus, .field select:focus { outline: none; border-color: var(--teal); box-shadow: 0 0 0 3px rgba(14,152,174,.18); }
.field textarea { resize: vertical; min-height: 110px; }

/* ---------- footer ---------- */
.footer { background: var(--ink); color: #a7c2c9; padding: 64px 0 28px; font-size: .95rem; }
.footer a:hover { color: #fff; }
.footer-top { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1.2fr; gap: 36px; padding-bottom: 38px; border-bottom: 1px solid rgba(255,255,255,.12); }
.footer .brand-text b { font-size: 1.1rem; color: #fff; }
.footer .brand .mark { background: linear-gradient(135deg, var(--teal-l), var(--teal)); }
.footer-col h3 { color: #fff; font-size: 1rem; margin-bottom: 16px; font-weight: 600; }
.footer-col ul { display: grid; gap: 10px; }
.footer-about p { margin: 16px 0; max-width: 320px; }
.footer-social { display: flex; gap: 10px; }
.footer-social a { width: 40px; height: 40px; border-radius: 10px; background: rgba(255,255,255,.10); display: grid; place-items: center; transition: background .2s, transform .15s; }
.footer-social a:hover { background: var(--teal); color: #fff; transform: translateY(-2px); }
.footer-social svg { width: 20px; height: 20px; }
.footer-bottom { padding-top: 22px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; font-size: .88rem; color: #7fa0a8; }

/* floating call button (มือถือ) */
.fab { position: fixed; right: 18px; bottom: 18px; z-index: 90; display: none; gap: 10px; }
.fab a { width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center; box-shadow: var(--shadow-lg); color: #fff; }
.fab .call { background: var(--teal); color: #fff; }
.fab .line { background: #06c755; }
.fab a svg { width: 26px; height: 26px; }

/* ---------- utilities ---------- */
.center { text-align: center; }
.mt-0 { margin-top: 0; }
.skip-link { position: absolute; left: -999px; top: 0; background: var(--teal); color: #fff; padding: 10px 16px; border-radius: 0 0 8px 0; z-index: 200; font-family: var(--font-head); font-weight: 600; }
.skip-link:focus { left: 0; }

/* รูปจริงใน hero และการ์ดสินค้า */
.hero-media { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 0; }
.hero-overlay { position: absolute; inset: 0; z-index: 1; background: linear-gradient(150deg, rgba(8,52,60,.93) 0%, rgba(11,92,104,.74) 52%, rgba(13,138,155,.60) 100%); }
.product .ph img, .split .visual img, .page-hero .ph img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

/* reveal on scroll */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
.js .reveal { will-change: opacity, transform; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
/* ===== เฮดเดอร์บรรทัดเดียว (เต็มกว้าง ไม่ตัดคำ) ===== */
.header .container { max-width: 1480px; }
.nav { flex-wrap: nowrap; gap: 14px; }
.brand-text b, .brand-text span, .nav-tel, .nav-links a { white-space: nowrap; }
.nav-links { gap: 2px; }
.nav-links a { padding: 8px 10px; font-size: .92rem; }
.nav-cta { gap: 10px; }
@media (max-width: 980px) {
  .hero-inner { grid-template-columns: 1fr; gap: 36px; padding: 56px 0 64px; }
  .hero-card { max-width: 460px; }
  .split { grid-template-columns: 1fr; gap: 30px; }
  .split .visual { min-height: 240px; order: -1; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .pf-grid { grid-template-columns: repeat(2, 1fr); }
  .logos { grid-template-columns: repeat(4, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .stats-band { grid-template-columns: repeat(2, 1fr); gap: 30px; }
  .footer-top { grid-template-columns: 1fr 1fr; gap: 28px; }
  .contact-grid { grid-template-columns: 1fr; gap: 30px; }
}

@media (max-width: 720px) {
  .section { padding: 60px 0; }
  .nav-links {
    position: fixed; inset: var(--header-h) 0 auto 0;
    background: #fff; flex-direction: column; align-items: stretch; gap: 0;
    padding: 12px 18px 22px; border-bottom: 1px solid var(--line); box-shadow: var(--shadow);
    transform: translateY(-12px); opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s;
    max-height: calc(100dvh - var(--header-h)); overflow-y: auto;
  }
  .nav-links.open { transform: none; opacity: 1; pointer-events: auto; }
  .nav-links a { padding: 13px 12px; border-radius: 10px; font-size: 1.02rem; }
  .nav-toggle { display: flex; }
  .nav-tel { display: none; }
  .nav-cta .btn { display: none; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .pf-grid { grid-template-columns: 1fr; }
  .logos { grid-template-columns: repeat(3, 1fr); gap: 12px; }
  .steps { grid-template-columns: 1fr; }
  .footer-top { grid-template-columns: 1fr; }
  .cta-band { padding: 38px 24px; }
  .fab { display: flex; }
  body { font-size: 16px; }
}

/* ---------- article / บทความ ---------- */
.post-layout { display: grid; grid-template-columns: minmax(0,1fr) 300px; gap: 48px; align-items: start; }
.post { font-size: 1.06rem; }
.post > img, .post .lead-img { width: 100%; max-height: 440px; object-fit: cover; border-radius: 14px; margin: 0 0 26px; box-shadow: var(--shadow); }
.post h2 { font-size: 1.5rem; margin: 34px 0 14px; }
.post h3 { font-size: 1.2rem; margin: 24px 0 10px; }
.post p { margin: 0 0 18px; color: #3a4b53; }
.post a { color: var(--teal-d); text-decoration: underline; }
.post ul { margin: 0 0 22px; display: grid; gap: 11px; }
.post ul li { position: relative; padding-left: 28px; color: #3a4b53; }
.post ul li::before { content: ""; position: absolute; left: 4px; top: 10px; width: 9px; height: 9px; border-radius: 50%; background: var(--teal); }
.post ol { margin: 0 0 22px 22px; display: grid; gap: 11px; }
.post ol li { color: #3a4b53; padding-left: 4px; }
.post strong, .post b { color: var(--text); font-weight: 600; }
.post-cta { background: var(--teal-soft); border: 1px solid #c7eaef; border-radius: 14px; padding: 28px; margin-top: 34px; text-align: center; }
.post-cta h3 { margin-bottom: 8px; }
.post-cta p { color: var(--muted); margin-bottom: 18px; }
.post-side { position: sticky; top: 90px; display: grid; gap: 18px; }
.side-card { background: var(--paper); border: 1px solid var(--line); border-radius: 14px; padding: 22px 24px; }
.side-card h2 { margin-bottom: 14px; color: var(--text); font-size: 1.05rem; }
.side-card ul { display: grid; gap: 11px; }
.side-card ul li a { color: var(--muted); font-size: .95rem; display: flex; gap: 8px; }
.side-card ul li a:hover { color: var(--teal-d); }
.side-card.side-cta { background: linear-gradient(135deg, var(--teal-d), var(--teal-deep)); border: 0; color: #fff; text-align: center; }
.side-card.side-cta h2 { color: #fff; }
.side-card.side-cta p { color: #e3f5f8; font-size: .95rem; margin-bottom: 16px; }
.post-gallery { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin: 6px 0 24px; }
.post-gallery img { width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: 10px; margin: 0; box-shadow: none; }
@media (max-width: 900px) {
  .post-layout { grid-template-columns: 1fr; gap: 30px; }
  .post-side { position: static; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; }
  .reveal { opacity: 1 !important; transform: none !important; transition: none !important; }
}

/* โลโก้ NSG จริง (แทนไอคอนสายฟ้า) */
.brand-logo { height: 46px; width: 46px; object-fit: contain; display: block; flex: none; }
.footer .brand-logo { height: 42px; width: 42px; }
@media (max-width: 720px) { .brand-logo { height: 40px; width: 40px; } }

/* ===== จอ < 1080px ใช้เมนูแฮมเบอร์เกอร์ (กันเมนูเบียดบรรทัดเดียวบนจอใหญ่) ===== */
@media (max-width: 1080px) {
  .nav-links {
    position: fixed; inset: var(--header-h) 0 auto 0;
    background: #fff; flex-direction: column; align-items: stretch; gap: 0;
    padding: 12px 18px 22px; border-bottom: 1px solid var(--line); box-shadow: var(--shadow);
    transform: translateY(-12px); opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s;
    max-height: calc(100dvh - var(--header-h)); overflow-y: auto;
  }
  .nav-links.open { transform: none; opacity: 1; pointer-events: auto; }
  .nav-links a { padding: 13px 12px; border-radius: 10px; font-size: 1.02rem; white-space: normal; }
  .nav-toggle { display: flex; }
  .nav-tel { display: none; }
  .nav-cta .btn { display: none; }
}
/* ===== Calculator CTA banner (cross-page) ===== */
.calc-cta { display: flex; align-items: center; gap: 22px; background: linear-gradient(110deg, var(--teal-soft), #fff 70%); border: 1px solid var(--teal-l); border-radius: var(--radius); padding: 22px 28px; transition: box-shadow .2s, transform .2s, border-color .2s; }
.calc-cta:hover { box-shadow: var(--shadow); transform: translateY(-2px); border-color: var(--teal); }
.calc-cta .ic { width: 56px; height: 56px; flex: none; border-radius: 15px; background: var(--teal); color: #fff; display: grid; place-items: center; }
.calc-cta .ic svg { width: 28px; height: 28px; }
.calc-cta .tx { flex: 1 1 auto; min-width: 0; }
.calc-cta .tx b { display: block; font-family: var(--font-head); font-weight: 600; font-size: 1.18rem; color: var(--text); margin-bottom: 3px; }
.calc-cta .tx > span { color: var(--muted); font-size: .96rem; line-height: 1.5; }
.calc-cta .go { flex: none; white-space: nowrap; }
@media (max-width: 680px){ .calc-cta { flex-direction: column; text-align: center; align-items: stretch; gap: 14px; } .calc-cta .ic { margin: 0 auto; } .calc-cta .go { width: 100%; } }

/* ============================================================
   PRODUCT CAROUSEL (แถบสินค้าเลื่อนได้ หน้าแรก)
   ============================================================ */
.products-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 30px; }
.products-head .eyebrow { margin-bottom: 10px; }
.products-head h2 { font-size: clamp(1.6rem, 3vw, 2.3rem); letter-spacing: -.01em; }
.products-more { display: inline-flex; align-items: center; gap: 7px; color: var(--teal-d); font-family: var(--font-head); font-weight: 600; font-size: .98rem; white-space: nowrap; flex: none; padding-bottom: 4px; }
.products-more svg { width: 18px; height: 18px; transition: transform .2s; }
.products-more:hover svg { transform: translateX(3px); }
.pcarousel { position: relative; }
.pcarousel-viewport { overflow: hidden; }
.pcarousel-track { display: flex; gap: 22px; padding: 4px 2px 14px; transition: transform .45s var(--ease); will-change: transform; }
.pcard { flex: 0 0 clamp(238px, 27%, 286px); background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; transition: box-shadow .2s var(--ease), transform .2s var(--ease), border-color .2s; }
.pcard:hover { box-shadow: var(--shadow); transform: translateY(-4px); border-color: var(--teal-l); }
.pcard-img { aspect-ratio: 4 / 3; background: #fff; display: grid; place-items: center; padding: 18px; border-bottom: 1px solid var(--line); position: relative; overflow: hidden; }
.pcard-img img { width: 100%; height: 100%; object-fit: contain; transform: scale(var(--imgscale, 1)); transition: transform .25s var(--ease); }
.pcard-img .badge { position: absolute; top: 12px; left: 12px; background: var(--teal); color: #fff; font-family: var(--font-head); font-weight: 600; font-size: .74rem; padding: 4px 11px; border-radius: 6px; }
.pcard-body { padding: 18px 20px 22px; flex: 1; display: flex; flex-direction: column; }
.pcard-body h3 { font-size: 1.04rem; line-height: 1.4; margin-bottom: 9px; }
.pcard-spec { color: var(--muted); font-size: .9rem; line-height: 1.55; }
.pcard-spec b { color: var(--text); font-weight: 600; }
.pcarousel-arrow { position: absolute; top: 36%; transform: translateY(-50%); width: 46px; height: 46px; border-radius: 50%; border: 0; background: var(--teal); color: #fff; cursor: pointer; display: grid; place-items: center; box-shadow: 0 6px 18px rgba(8,52,60,.22); transition: background .2s, transform .15s; z-index: 4; }
.pcarousel-arrow:hover { background: var(--teal-d); }
.pcarousel-arrow:active { transform: translateY(-50%) scale(.94); }
.pcarousel-arrow:focus-visible { outline: 2px solid var(--teal-d); outline-offset: 3px; }
.pcarousel-arrow.prev { left: -14px; }
.pcarousel-arrow.next { right: -14px; }
.pcarousel-arrow svg { width: 20px; height: 20px; }
@media (max-width: 720px) {
  .products-head { flex-direction: column; align-items: flex-start; gap: 8px; }
  .pcarousel-arrow { display: none; }
  .pcard { flex-basis: 80%; }
}

/* ============================================================
   PRODUCT GRID (หน้าสินค้า — แสดงทุกรุ่น จัดกลุ่มแบรนด์)
   ============================================================ */
.brand-group { display: flex; align-items: center; gap: 16px; font-family: var(--font-head); font-weight: 600; font-size: 1.3rem; color: var(--text); margin: 46px 0 22px; }
.brand-group:first-of-type { margin-top: 8px; }
.brand-group .tag-count { font-family: var(--font-body); font-weight: 500; font-size: .92rem; color: var(--muted); }
.brand-group::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.product-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.product-grid .pcard { flex: none; }
.product-grid .pcard-body { display: flex; flex-direction: column; }
.pcard-cta { margin-top: 14px; display: inline-flex; align-items: center; gap: 6px; color: var(--teal-d); font-family: var(--font-head); font-weight: 600; font-size: .92rem; transition: gap .15s; }
.pcard-cta svg { width: 16px; height: 16px; }
.pcard:hover .pcard-cta { gap: 11px; }
@media (max-width: 980px) { .product-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 760px) { .product-grid { grid-template-columns: repeat(2, 1fr); } .brand-group { font-size: 1.12rem; margin: 36px 0 18px; } }
@media (max-width: 440px) { .product-grid { grid-template-columns: 1fr; } }

/* ============================================================
   PRODUCT DETAIL PAGE (หน้ารายละเอียดสินค้าแต่ละรุ่น)
   ============================================================ */
.product-detail { display: grid; grid-template-columns: 1fr 1fr; gap: 44px; align-items: start; }
.pd-media { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(20px,4vw,40px); display: grid; place-items: center; aspect-ratio: 4/3; box-shadow: var(--shadow); }
.pd-media img { width: 100%; height: 100%; object-fit: contain; }
.pd-brand { display: inline-flex; align-items: center; gap: 8px; font-family: var(--font-head); font-weight: 600; font-size: .82rem; letter-spacing: .12em; text-transform: uppercase; color: var(--teal-d); margin-bottom: 12px; }
.pd-info h1 { font-size: clamp(1.7rem, 3.4vw, 2.4rem); line-height: 1.2; margin-bottom: 16px; }
.pd-kva { display: inline-flex; align-items: baseline; gap: 10px; background: var(--teal-soft); border: 1px solid var(--teal-l); border-radius: var(--radius-sm); padding: 14px 22px; margin-bottom: 20px; }
.pd-kva .num { font-family: var(--font-head); font-weight: 700; font-size: 2rem; color: var(--teal-d); line-height: 1; }
.pd-kva .lbl { color: var(--muted); font-size: .95rem; }
.pd-info > p.pd-desc { color: var(--muted); margin-bottom: 22px; line-height: 1.7; }
.pd-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 24px; }
.pd-highlights { display: grid; gap: 11px; }
.pd-highlights li { display: flex; gap: 11px; align-items: flex-start; font-size: .96rem; color: var(--text); }
.pd-highlights svg { width: 20px; height: 20px; color: var(--teal); flex: none; margin-top: 2px; }
.spec-block { max-width: 900px; margin-inline: auto; }
.spec-group { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; margin-bottom: 18px; }
.spec-group > h3 { background: var(--mist); padding: 14px 22px; font-size: 1.05rem; border-bottom: 1px solid var(--line); }
.spec-row { display: flex; justify-content: space-between; gap: 16px; padding: 12px 22px; border-bottom: 1px solid var(--line); font-size: .95rem; }
.spec-row:last-child { border-bottom: 0; }
.spec-row .k { color: var(--muted); }
.spec-row .v { font-weight: 600; color: var(--text); text-align: right; }
.pd-note { background: var(--teal-soft); border-radius: var(--radius-sm); padding: 16px 20px; font-size: .92rem; color: var(--muted); margin-top: 4px; }
.table-wrap { max-width: 100%; overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 18px; -webkit-overflow-scrolling: touch; }
.spec-table { width: 100%; border-collapse: collapse; min-width: 660px; font-size: .92rem; background: var(--paper); }
.spec-table thead th { background: var(--teal); color: #fff; font-weight: 600; text-align: left; padding: 12px 16px; white-space: nowrap; }
.spec-table tbody td { padding: 11px 16px; border-top: 1px solid var(--line); color: var(--text); white-space: nowrap; }
.spec-table tbody tr:nth-child(even) td { background: var(--mist); }
.spec-table tbody td:first-child { font-weight: 600; }
@media (max-width: 820px) { .product-detail { grid-template-columns: 1fr; gap: 28px; } .pd-media { max-width: 480px; } }

