/* ==========================================================================
   หลังคาเมทัลชีท — ธีมหลัก (Stylesheet หลัก)
   แก้สี/ขนาดได้ในส่วน :root ด้านล่าง
   ========================================================================== */

:root {
  /* --- สี --- */
  --ink: #0f2942;          /* น้ำเงินเข้มกระดาษหลังคา */
  --ink-2: #17395a;
  --ink-3: #1e4a72;
  --brand: #f97316;        /* ส้ม สีแบรนด์/ปุ่มหลัก */
  --brand-dark: #d95f0a;
  --brand-soft: #fff3e6;
  --accent: #0ea5e9;       /* ฟ้า สีรอง */
  --green: #16a34a;
  --red: #dc2626;

  --bg: #ffffff;
  --bg-soft: #f6f8fb;
  --bg-dark: #0b1c2e;
  --line: #e3e9f0;
  --text: #1c2b3a;
  --text-2: #4b5f73;
  --text-3: #7c8fa3;
  --text-inv: #eef4fa;

  /* --- รูปร่าง --- */
  --r-sm: 8px;
  --r: 14px;
  --r-lg: 20px;
  --r-xl: 28px;
  --r-full: 999px;

  /* --- เงา --- */
  --sh-1: 0 1px 2px rgba(15, 41, 66, .06), 0 1px 3px rgba(15, 41, 66, .08);
  --sh-2: 0 4px 10px rgba(15, 41, 66, .08), 0 10px 24px rgba(15, 41, 66, .06);
  --sh-3: 0 12px 28px rgba(15, 41, 66, .12), 0 24px 60px rgba(15, 41, 66, .10);

  /* --- ขนาด --- */
  --container: 1200px;
  --header-h: 72px;
  --sec-y: clamp(48px, 7vw, 88px);

  --font: "Sarabun", "Noto Sans Thai", "IBM Plex Sans Thai", "Leelawadee UI",
    -apple-system, BlinkMacSystemFont, "Segoe UI", Tahoma, sans-serif;
}

/* ==========================================================================
   1. Reset / พื้นฐาน
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.7;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body.no-scroll { overflow: hidden; }

img, svg, video { max-width: 100%; height: auto; display: block; }

h1, h2, h3, h4, h5 { margin: 0 0 .5em; line-height: 1.3; color: var(--ink); font-weight: 700; }
h1 { font-size: clamp(28px, 4.6vw, 50px); letter-spacing: -.5px; }
h2 { font-size: clamp(23px, 3.2vw, 36px); letter-spacing: -.3px; }
h3 { font-size: clamp(18px, 2vw, 22px); }
h4 { font-size: 17px; }
p  { margin: 0 0 1em; }

a { color: var(--ink-3); text-decoration: none; transition: color .15s ease; }
a:hover { color: var(--brand-dark); }

ul, ol { margin: 0 0 1em; padding-left: 1.3em; }
li { margin-bottom: .35em; }

hr { border: 0; border-top: 1px solid var(--line); margin: 28px 0; }

:focus-visible {
  outline: 3px solid var(--brand);
  outline-offset: 2px;
  border-radius: 4px;
}

::selection { background: var(--brand); color: #fff; }

/* ตัวช่วยสำหรับโปรแกรมเมอร์ */
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: 20px; }
.container-narrow { max-width: 900px; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.nowrap { white-space: nowrap; }

/* ==========================================================================
   2. ปุ่ม
   ========================================================================== */
.btn {
  --btn-bg: var(--ink);
  --btn-fg: #fff;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 22px;
  font-family: inherit; font-size: 15px; font-weight: 600; line-height: 1.2;
  color: var(--btn-fg); background: var(--btn-bg);
  border: 2px solid var(--btn-bg); border-radius: var(--r-full);
  cursor: pointer; text-align: center; white-space: nowrap;
  transition: transform .12s ease, box-shadow .18s ease, background .18s ease, color .18s ease, border-color .18s ease;
  box-shadow: var(--sh-1);
}
.btn:hover { transform: translateY(-2px); box-shadow: var(--sh-2); color: var(--btn-fg); }
.btn:active { transform: translateY(0); }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; box-shadow: none; }
.btn svg { width: 18px; height: 18px; flex: none; }

.btn-primary   { --btn-bg: var(--brand); --btn-fg: #fff; }
.btn-primary:hover { --btn-bg: var(--brand-dark); }
.btn-dark      { --btn-bg: var(--ink); --btn-fg: #fff; }
.btn-dark:hover { --btn-bg: var(--ink-2); }
.btn-line      { --btn-bg: #06c755; --btn-fg: #fff; border-color: #06c755; }
.btn-line:hover { --btn-bg: #05a947; }
.btn-outline   { --btn-bg: transparent; --btn-fg: var(--ink); border-color: var(--line); box-shadow: none; }
.btn-outline:hover { border-color: var(--ink); background: #fff; }
.btn-ghost     { --btn-bg: transparent; --btn-fg: var(--ink); border-color: transparent; box-shadow: none; }
.btn-ghost:hover { background: var(--bg-soft); }
.btn-white     { --btn-bg: #fff; --btn-fg: var(--ink); }
.btn-white:hover { --btn-bg: #f0f4f9; }

.btn-sm { padding: 8px 16px; font-size: 14px; }
.btn-sm svg { width: 16px; height: 16px; }
.btn-lg { padding: 15px 30px; font-size: 16.5px; }
.btn-block { width: 100%; }

.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

/* ==========================================================================
   3. แบรนด์ / ป้าย / ชิป
   ========================================================================== */
.logo { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; }
.logo img { height: 40px; width: auto; }
.logo-text { display: flex; flex-direction: column; line-height: 1.1; }
.logo-text b { font-size: 17px; color: var(--ink); letter-spacing: -.2px; }
.logo-text span { font-size: 11px; color: var(--text-3); letter-spacing: 1.6px; text-transform: uppercase; }
.on-dark .logo-text b { color: #fff; }
.on-dark .logo-text span { color: rgba(255,255,255,.6); }

.badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 11px; font-size: 12.5px; font-weight: 700; line-height: 1.5;
  border-radius: var(--r-full);
  background: var(--brand-soft); color: var(--brand-dark);
}
.badge-hot   { background: #ffe9e9; color: #c81e1e; }
.badge-new   { background: #e6f7ee; color: #12833c; }
.badge-info  { background: #e8f2fe; color: #1b6fc4; }
.badge-ink   { background: var(--ink); color: #fff; }
.badge-ok    { background: #e6f7ee; color: #12833c; }

.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 12px; font-size: 13px; font-weight: 600; color: var(--text-2);
  background: var(--bg-soft); border: 1px solid var(--line); border-radius: var(--r-full);
}
.chip-dot { width: 14px; height: 14px; border-radius: 50%; border: 1px solid rgba(0,0,0,.15); flex: none; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  margin-bottom: 12px; font-size: 13.5px; font-weight: 800; letter-spacing: 1.6px;
  text-transform: uppercase; color: var(--brand);
}
.eyebrow::before { content: ""; width: 26px; height: 3px; background: var(--brand); border-radius: 2px; }

.sec-head { max-width: 720px; margin-bottom: 40px; }
.sec-head.center { margin-inline: auto; text-align: center; }
.sec-head p { font-size: 17px; color: var(--text-2); margin: 0; }

.section { padding-block: var(--sec-y); }
.section-soft { background: var(--bg-soft); }
.section-dark { background: var(--bg-dark); color: var(--text-inv); }
.section-dark h2, .section-dark h3, .section-dark h4 { color: #fff; }
.section-dark p { color: rgba(238,244,250,.78); }

/* ==========================================================================
   4. Header
   ========================================================================== */
.header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
  transition: box-shadow .2s ease;
}
.header.scrolled { box-shadow: var(--sh-2); }
.header-inner {
  display: flex; align-items: center; gap: 20px;
  height: var(--header-h);
}
.nav { display: flex; align-items: center; gap: 4px; margin-inline: auto; }
.nav a {
  position: relative; padding: 9px 15px; border-radius: var(--r-full);
  font-size: 15px; font-weight: 600; color: var(--text-2);
}
.nav a:hover { background: var(--bg-soft); color: var(--ink); }
.nav a.active { color: var(--brand-dark); background: var(--brand-soft); }
.header-cta { display: flex; align-items: center; gap: 10px; }

.hamburger {
  display: none; margin-left: auto;
  width: 44px; height: 44px; padding: 0;
  background: transparent; border: 1px solid var(--line); border-radius: var(--r-sm);
  cursor: pointer;
}
.hamburger span {
  display: block; width: 20px; height: 2px; margin: 4px auto;
  background: var(--ink); border-radius: 2px; transition: transform .2s ease, opacity .2s ease;
}
.hamburger[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.hamburger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.hamburger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

.topbar {
  background: var(--ink); color: rgba(238,244,250,.85);
  font-size: 13.5px;
}
.topbar .container { display: flex; flex-wrap: wrap; gap: 8px 22px; align-items: center; min-height: 38px; }
.topbar a { color: #fff; font-weight: 600; }
.topbar-item { display: inline-flex; align-items: center; gap: 7px; }
.topbar-item svg { width: 15px; height: 15px; opacity: .8; flex: none; }
.topbar-right { margin-left: auto; display: flex; gap: 18px; align-items: center; }

/* แถบซ้อนบนมือถือ */
.mobile-nav {
  display: none; position: fixed; inset: 0; z-index: 200;
  background: rgba(11, 28, 46, .55);
  padding: 16px;
}
.mobile-nav.open { display: block; }
.mobile-nav-panel {
  background: #fff; border-radius: var(--r-lg); padding: 20px;
  max-width: 400px; margin-left: auto; height: 100%; overflow-y: auto;
  animation: slideIn .22s ease;
}
@keyframes slideIn { from { transform: translateX(24px); opacity: 0; } }
.mobile-nav-panel nav { display: flex; flex-direction: column; gap: 4px; margin: 16px 0 20px; }
.mobile-nav-panel nav a {
  padding: 13px 14px; border-radius: var(--r-sm);
  font-size: 17px; font-weight: 600; color: var(--text);
}
.mobile-nav-panel nav a:hover, .mobile-nav-panel nav a.active { background: var(--brand-soft); color: var(--brand-dark); }

/* ==========================================================================
   5. Hero
   ========================================================================== */
.hero {
  position: relative; overflow: hidden;
  background: linear-gradient(135deg, var(--bg-dark) 0%, var(--ink) 55%, var(--ink-3) 100%);
  color: var(--text-inv);
  padding-block: clamp(48px, 8vw, 92px);
}
.hero::before {
  content: ""; position: absolute; inset: 0;
  /* ลายหลังคาทำด้วย CSS ล้วน ไม่ต้องใช้ไฟล์รูป */
  background-image:
    repeating-linear-gradient( 45deg,  transparent 0 26px, rgba(255,255,255,.55) 26px 28px, transparent 28px 54px),
    repeating-linear-gradient(135deg,  transparent 0 26px, rgba(255,255,255,.55) 26px 28px, transparent 28px 54px);
  background-size: 460px 460px;
  opacity: .07;
  pointer-events: none;
}
.hero::after {
  content: ""; position: absolute; right: -10%; top: -20%;
  width: 620px; height: 620px; border-radius: 50%;
  background: radial-gradient(circle, rgba(249,115,22,.34), transparent 68%);
  pointer-events: none;
}
.hero-inner { position: relative; z-index: 1; display: grid; gap: 44px; grid-template-columns: 1.05fr .95fr; align-items: center; }
.hero h1 { color: #fff; margin-bottom: 18px; }
.hero h1 .hl { color: var(--brand); }
.hero-lead { font-size: clamp(16px, 1.6vw, 19px); color: rgba(238,244,250,.85); max-width: 56ch; margin-bottom: 26px; }

.hero-stats { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 30px; }
.hero-stat {
  padding: 12px 18px; border-radius: var(--r);
  background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.13);
  backdrop-filter: blur(6px);
}
.hero-stat b { display: block; font-size: 22px; color: var(--brand); line-height: 1.2; }
.hero-stat span { font-size: 13px; color: rgba(238,244,250,.75); }

.hero-card {
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.14);
  border-radius: var(--r-xl);
  padding: 22px; backdrop-filter: blur(10px);
  box-shadow: var(--sh-3);
}
.hero-card h3 { color: #fff; font-size: 18px; margin-bottom: 4px; }
.hero-card > p { font-size: 14px; color: rgba(238,244,250,.7); }
.hero-card ul { list-style: none; padding: 0; margin: 16px 0 0; }
.hero-card li {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 11px 0; border-top: 1px solid rgba(255,255,255,.1);
  font-size: 14.5px; color: rgba(238,244,250,.88);
}
.hero-card li svg { width: 20px; height: 20px; color: var(--brand); flex: none; margin-top: 2px; }
.hero-card li b { color: #fff; display: block; font-size: 15px; }

.quick-form {
  display: grid; gap: 10px; margin-top: 16px;
  padding: 14px; background: rgba(255,255,255,.95); border-radius: var(--r-lg);
}
.quick-form label { font-size: 13px; font-weight: 700; color: var(--ink); }
.quick-form .qf-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.quick-form .hint { font-size: 12px; color: var(--text-3); }

/* ==========================================================================
   6. การ์ด
   ========================================================================== */
.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg);
  overflow: hidden; transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.card-hover:hover { transform: translateY(-4px); box-shadow: var(--sh-2); border-color: #d3dde7; }

.grid { display: grid; gap: 22px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

/* --- การ์ดสินค้า --- */
.product-card { position: relative; display: flex; flex-direction: column; }
.product-media { position: relative; aspect-ratio: 4 / 3; background: var(--bg-soft); overflow: hidden; }
.product-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.product-card:hover .product-media img { transform: scale(1.05); }
.product-flags { position: absolute; top: 12px; left: 12px; display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.product-body { display: flex; flex-direction: column; flex: 1; padding: 18px; }
.product-cat { font-size: 12.5px; font-weight: 700; color: var(--brand-dark); letter-spacing: .4px; }
.product-title { font-size: 18px; margin: 4px 0 8px; }
.product-desc { font-size: 14.5px; color: var(--text-2); margin: 0 0 14px; flex: 1; }
.product-specs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.product-actions { display: flex; gap: 8px; margin-top: auto; }
.product-actions .btn { flex: 1; }

.swatch-row { display: flex; align-items: center; gap: 7px; margin-bottom: 12px; }
.swatch-row .label { font-size: 12.5px; color: var(--text-3); margin-right: 2px; }
.swatch {
  width: 20px; height: 20px; border-radius: 50%;
  border: 2px solid #fff; box-shadow: 0 0 0 1px rgba(0,0,0,.14);
  cursor: pointer; padding: 0;
}
.swatch:hover { transform: scale(1.15); }
.swatch[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--brand); }
.swatch-more { font-size: 12.5px; color: var(--text-3); font-weight: 600; }

/* --- การ์ดฟีเจอร์ --- */
.feature { padding: 26px; background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); }
.feature-icon {
  display: grid; place-items: center; width: 52px; height: 52px; margin-bottom: 16px;
  background: var(--brand-soft); color: var(--brand-dark); border-radius: var(--r);
}
.feature-icon svg { width: 26px; height: 26px; }
.feature h3 { font-size: 18px; margin-bottom: 6px; }
.feature p { font-size: 14.5px; color: var(--text-2); margin: 0; }
.feature:hover .feature-icon { background: var(--brand); color: #fff; }
.feature-icon, .feature h3, .product-media img { transition: all .2s ease; }
.section-dark .feature { background: rgba(255,255,255,.05); border-color: rgba(255,255,255,.1); }
.section-dark .feature p { color: rgba(238,244,250,.75); }

/* --- การ์ดหมวดหมู่ --- */
.cat-card { position: relative; display: block; overflow: hidden; border-radius: var(--r-lg); min-height: 260px; }
.cat-card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.cat-card:hover img { transform: scale(1.07); }
.cat-card::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(11,28,46,0) 25%, rgba(11,28,46,.86) 100%); }
.cat-card-body { position: absolute; inset: auto 0 0 0; z-index: 1; padding: 20px; color: #fff; }
.cat-card-body h3 { color: #fff; font-size: 19px; margin: 0 0 4px; }
.cat-card-body p { margin: 0; font-size: 13.5px; color: rgba(255,255,255,.8); }
.cat-card-body .go { display: inline-flex; align-items: center; gap: 6px; margin-top: 10px; font-size: 14px; font-weight: 700; color: var(--brand); }
.cat-card:hover .go svg { transform: translateX(4px); }
.cat-card .go svg { transition: transform .2s ease; }

/* --- การ์ดผลงาน / แกลเลอรี --- */
.gallery-grid { display: grid; gap: 14px; grid-template-columns: repeat(4, 1fr); }
.gallery-item {
  position: relative; display: block; padding: 0; overflow: hidden;
  border-radius: var(--r); border: 1px solid var(--line); background: var(--bg-soft);
  aspect-ratio: 4 / 3; cursor: zoom-in;
}
.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.gallery-item:hover img { transform: scale(1.06); }
.gallery-item figcaption {
  position: absolute; inset: auto 0 0 0; padding: 26px 16px 12px;
  background: linear-gradient(transparent, rgba(11,28,46,.85));
  color: #fff; font-size: 14px; font-weight: 600; text-align: left;
  transform: translateY(6px); opacity: 0; transition: all .25s ease;
}
.gallery-item:hover figcaption, .gallery-item:focus-visible figcaption { transform: none; opacity: 1; }

/* --- การ์ดรีวิว --- */
.review { padding: 24px; background: #fff; border-radius: var(--r-lg); border: 1px solid var(--line); }
.review p { font-size: 15px; color: var(--text); margin: 12px 0 16px; }
.review-top { display: flex; align-items: center; gap: 12px; }
.avatar {
  display: grid; place-items: center; width: 44px; height: 44px; flex: none;
  border-radius: 50%; background: var(--ink); color: #fff; font-weight: 700; font-size: 16px;
}
.review-top b { display: block; font-size: 15px; color: var(--ink); }
.review-top span { font-size: 13px; color: var(--text-3); }
.stars { color: #f59e0b; letter-spacing: 2px; font-size: 15px; }

/* --- การ์ดขั้นตอน --- */
.steps { counter-reset: step; display: grid; gap: 18px; grid-template-columns: repeat(4, 1fr); }
.step { position: relative; padding: 26px 22px; background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); }
.step::before {
  counter-increment: step; content: counter(step, decimal-leading-zero);
  position: absolute; top: -14px; left: 20px;
  display: grid; place-items: center; width: 40px; height: 40px;
  background: var(--brand); color: #fff; font-weight: 800; font-size: 15px;
  border-radius: 12px; box-shadow: var(--sh-1);
}
.step h3 { font-size: 17px; margin: 8px 0 6px; }
.step p { font-size: 14.5px; color: var(--text-2); margin: 0; }

/* --- FAQ --- */
.faq { max-width: 820px; margin-inline: auto; }
.faq-item { background: #fff; border: 1px solid var(--line); border-radius: var(--r); margin-bottom: 10px; overflow: hidden; }
.faq-q {
  display: flex; align-items: center; gap: 14px; width: 100%;
  padding: 16px 18px; background: none; border: 0; cursor: pointer;
  font-family: inherit; font-size: 16px; font-weight: 600; color: var(--ink); text-align: left;
}
.faq-q:hover { background: var(--bg-soft); }
.faq-q .caret { margin-left: auto; flex: none; width: 20px; height: 20px; color: var(--brand-dark); transition: transform .2s ease; }
.faq-item.open .faq-q .caret { transform: rotate(180deg); }
.faq-a { display: none; padding: 0 18px 18px; font-size: 15px; color: var(--text-2); }
.faq-item.open .faq-a { display: block; }

/* --- CTA band --- */
.cta-band {
  position: relative; overflow: hidden; border-radius: var(--r-xl);
  padding: clamp(30px, 5vw, 56px);
  background: linear-gradient(120deg, var(--ink) 0%, var(--ink-3) 100%);
  color: #fff; text-align: center;
}
.cta-band::before {
  content: ""; position: absolute; inset: 0;
  background-image:
    repeating-linear-gradient( 45deg,  transparent 0 24px, rgba(255,255,255,.55) 24px 26px, transparent 26px 50px),
    repeating-linear-gradient(135deg,  transparent 0 24px, rgba(255,255,255,.55) 24px 26px, transparent 26px 50px);
  background-size: 420px 420px; opacity: .06;
}
.cta-band > * { position: relative; z-index: 1; }
.cta-band h2 { color: #fff; }
.cta-band p { color: rgba(238,244,250,.82); max-width: 60ch; margin-inline: auto; }
.cta-band .btn-row { justify-content: center; }
.cta-contact { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px 28px; margin-top: 26px; font-size: 15px; }
.cta-contact span { display: inline-flex; align-items: center; gap: 8px; color: rgba(238,244,250,.9); }
.cta-contact svg { width: 18px; height: 18px; color: var(--brand); }

/* ==========================================================================
   7. หน้าแคตตาล็อก (products.html)
   ========================================================================== */
.page-head {
  padding-block: clamp(32px, 5vw, 56px);
  background: linear-gradient(180deg, var(--bg-soft) 0%, #fff 100%);
  border-bottom: 1px solid var(--line);
}
.page-head h1 { margin-bottom: 10px; }
.page-head p { font-size: 17px; color: var(--text-2); max-width: 65ch; margin: 0; }

.breadcrumb { display: flex; flex-wrap: wrap; gap: 8px; font-size: 13.5px; color: var(--text-3); margin-bottom: 14px; }
.breadcrumb a { color: var(--text-3); }
.breadcrumb a:hover { color: var(--brand-dark); }
.breadcrumb span[aria-current] { color: var(--ink); font-weight: 600; }

.catalog-layout { display: grid; grid-template-columns: 268px 1fr; gap: 28px; align-items: start; }

.filters {
  position: sticky; top: calc(var(--header-h) + 16px);
  background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 20px; box-shadow: var(--sh-1);
}
.filter-group { padding-bottom: 18px; margin-bottom: 18px; border-bottom: 1px solid var(--line); }
.filter-group:last-child { border-bottom: 0; margin-bottom: 0; padding-bottom: 0; }
.filter-title { display: flex; align-items: center; justify-content: space-between; font-size: 14px; font-weight: 800; color: var(--ink); margin-bottom: 12px; }
.filter-title svg { width: 16px; height: 16px; color: var(--brand); }
.check { display: flex; align-items: center; gap: 10px; padding: 6px 0; font-size: 14.5px; color: var(--text-2); cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--brand); cursor: pointer; flex: none; }
.check .count { margin-left: auto; font-size: 12.5px; color: var(--text-3); }

.filter-tags { display: flex; flex-wrap: wrap; gap: 7px; }
.tag-btn {
  padding: 6px 13px; font-family: inherit; font-size: 13.5px; font-weight: 600;
  color: var(--text-2); background: var(--bg-soft); border: 1px solid var(--line);
  border-radius: var(--r-full); cursor: pointer; transition: all .15s ease;
}
.tag-btn:hover { border-color: var(--ink); color: var(--ink); }
.tag-btn[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.tag-btn .swatch-dot { display: inline-block; width: 11px; height: 11px; border-radius: 50%; margin-right: 6px; vertical-align: -1px; border: 1px solid rgba(0,0,0,.15); }

.toolbar {
  display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between;
  margin-bottom: 18px; padding: 14px 16px;
  background: #fff; border: 1px solid var(--line); border-radius: var(--r);
}
.search-box { position: relative; flex: 1; min-width: 220px; }
.search-box svg { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: var(--text-3); }
.search-box input { width: 100%; padding-left: 40px; }
.toolbar select { min-width: 160px; }

.input, .select, .textarea {
  width: 100%; padding: 11px 14px;
  font-family: inherit; font-size: 15px; color: var(--text);
  background: #fff; border: 1.5px solid var(--line); border-radius: var(--r-sm);
  transition: border-color .15s ease, box-shadow .15s ease;
  -webkit-appearance: none; appearance: none;
}
.input::placeholder, .textarea::placeholder { color: #a8b6c4; }
.input:focus, .select:focus, .textarea:focus {
  outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(249,115,22,.15);
}
.input:invalid:not(:placeholder-shown) { border-color: var(--red); }
.textarea { min-height: 110px; resize: vertical; }
.select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%234b5f73' stroke-width='2.5' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; background-size: 16px;
  padding-right: 38px;
}
.result-info { font-size: 14px; color: var(--text-2); }
.result-info b { color: var(--ink); }

.empty-state { text-align: center; padding: 60px 20px; border: 1px dashed var(--line); border-radius: var(--r-lg); background: var(--bg-soft); }
.empty-state svg { width: 56px; height: 56px; color: var(--text-3); margin: 0 auto 12px; }

.pager { display: flex; justify-content: center; gap: 8px; margin-top: 34px; }
.pager button {
  min-width: 42px; height: 42px; padding: 0 12px;
  font-family: inherit; font-size: 15px; font-weight: 600; color: var(--text-2);
  background: #fff; border: 1px solid var(--line); border-radius: var(--r-sm); cursor: pointer;
}
.pager button:hover:not(:disabled) { border-color: var(--ink); color: var(--ink); }
.pager button[aria-current="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.pager button:disabled { opacity: .4; cursor: not-allowed; }

/* ==========================================================================
   8. Modal (รายละเอียดสินค้า / รูป)
   ========================================================================== */
.modal {
  position: fixed; inset: 0; z-index: 300;
  display: none; align-items: center; justify-content: center; padding: 20px;
  background: rgba(11, 28, 46, .62); backdrop-filter: blur(3px);
}
.modal.open { display: flex; }
.modal-box {
  position: relative; width: 100%; max-width: 940px; max-height: 90vh; overflow-y: auto;
  background: #fff; border-radius: var(--r-lg); box-shadow: var(--sh-3);
  animation: popIn .2s ease;
}
@keyframes popIn { from { transform: scale(.97) translateY(10px); opacity: 0; } }
.modal-close {
  position: absolute; top: 14px; right: 14px; z-index: 2;
  display: grid; place-items: center; width: 40px; height: 40px;
  background: rgba(255,255,255,.92); border: 0; border-radius: 50%;
  font-size: 22px; line-height: 1; color: var(--ink); cursor: pointer; box-shadow: var(--sh-1);
}
.modal-close:hover { background: #fff; }
.modal-media { aspect-ratio: 16 / 9; background: var(--bg-soft); }
.modal-media img { width: 100%; height: 100%; object-fit: cover; }
.modal-body { padding: clamp(20px, 3vw, 32px); }
.modal-title { font-size: clamp(21px, 2.6vw, 28px); margin-bottom: 6px; }
.modal-sub { color: var(--text-2); font-size: 15.5px; }
.modal-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 30px; align-items: start; }
.spec-table { width: 100%; border-collapse: collapse; font-size: 14.5px; margin-bottom: 18px; }
.spec-table th, .spec-table td { padding: 9px 12px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
.spec-table th { width: 34%; color: var(--text-3); font-weight: 600; }
.feature-list { list-style: none; padding: 0; margin: 0 0 18px; }
.feature-list li { display: flex; gap: 10px; align-items: flex-start; font-size: 14.5px; color: var(--text-2); }
.feature-list svg { width: 19px; height: 19px; color: var(--green); flex: none; margin-top: 3px; }
.lightbox-img { max-width: min(1100px, 94vw); max-height: 88vh; width: auto; border-radius: var(--r); box-shadow: var(--sh-3); }
.lightbox-cap { color: rgba(238,244,250,.9); text-align: center; margin-top: 12px; font-size: 14.5px; }

/* ==========================================================================
   9. ฟอร์ม / ส่งข้อความสั้น ๆ
   ========================================================================== */
.stepper { display: flex; gap: 8px; margin-bottom: 26px; }
.stepper-item {
  flex: 1; padding: 12px 14px; border-radius: var(--r); min-width: 0;
  background: #fff; border: 1px solid var(--line);
}
.stepper-item .n { display: block; font-size: 12px; font-weight: 800; color: var(--text-3); }
.stepper-item .t { display: block; font-size: 14.5px; font-weight: 600; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stepper-item.active { border-color: var(--brand); background: var(--brand-soft); }
.stepper-item.active .n, .stepper-item.active .t { color: var(--brand-dark); }
.stepper-item.done { border-color: var(--green); }
.stepper-item.done .n { color: var(--green); }

.quote-layout { display: grid; grid-template-columns: 1fr 340px; gap: 28px; align-items: start; }
.form-panel { background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); padding: clamp(20px, 3vw, 30px); }
.step { display: none; }
.step.active { display: block; animation: fadeUp .22s ease; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(8px); } }
.step-head { margin-bottom: 20px; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.step-head h2 { font-size: 21px; margin: 0 0 4px; }
.step-head p { font-size: 14.5px; color: var(--text-2); margin: 0; }

.form-grid { display: grid; gap: 16px; grid-template-columns: repeat(2, 1fr); }
.form-grid .col-full { grid-column: 1 / -1; }
.field label { display: block; font-size: 14px; font-weight: 700; color: var(--ink); margin-bottom: 6px; }
.field .req { color: var(--red); }
.field .tip { font-size: 12.5px; color: var(--text-3); margin-top: 5px; display: block; }
.field-error { font-size: 13px; color: var(--red); margin-top: 5px; display: none; }
.field.invalid .field-error { display: block; }
.field.invalid .input, .field.invalid .select, .field.invalid .textarea { border-color: var(--red); }

.choice-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
.choice {
  position: relative; display: flex; gap: 12px; align-items: flex-start;
  padding: 15px; background: #fff; border: 1.5px solid var(--line); border-radius: var(--r);
  cursor: pointer; transition: all .15s ease;
}
.choice:hover { border-color: #c3d0dc; background: var(--bg-soft); }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice-mark { display: grid; place-items: center; width: 20px; height: 20px; flex: none; margin-top: 1px; border: 2px solid var(--line); border-radius: 50%; transition: all .15s ease; }
.choice input[type="checkbox"] ~ .choice-mark { border-radius: 5px; }
.choice input:checked ~ .choice-mark { background: var(--brand); border-color: var(--brand); }
.choice input:checked ~ .choice-mark::after { content: "✓"; color: #fff; font-size: 13px; font-weight: 800; line-height: 1; }
.choice:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); }
.choice-ico { flex: none; }
.choice-ico svg { width: 22px; height: 22px; color: var(--brand-dark); }
.choice b { display: block; font-size: 15px; color: var(--ink); }
.choice span { font-size: 13px; color: var(--text-2); }

.pick-product { display: grid; gap: 10px; max-height: 340px; overflow-y: auto; padding-right: 4px; }

.summary-card {
  position: sticky; top: calc(var(--header-h) + 16px);
  background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden;
  box-shadow: var(--sh-1);
}
.summary-head { padding: 16px 18px; background: var(--ink); color: #fff; }
.summary-head b { font-size: 16px; }
.summary-head span { font-size: 12.5px; color: rgba(255,255,255,.7); display: block; }
.summary-body { padding: 18px; }
.summary-row { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; font-size: 14.5px; border-bottom: 1px dashed var(--line); }
.summary-row:last-of-type { border-bottom: 0; }
.summary-row .k { color: var(--text-3); }
.summary-row .v { color: var(--ink); font-weight: 600; text-align: right; }
.summary-est { margin-top: 14px; padding: 14px; background: var(--brand-soft); border-radius: var(--r); }
.summary-est .lbl { font-size: 12.5px; color: var(--brand-dark); font-weight: 700; }
.summary-est .val { font-size: 24px; font-weight: 800; color: var(--ink); line-height: 1.25; }
.summary-est .note { font-size: 12px; color: var(--text-2); margin: 6px 0 0; }
.summary-contact { margin-top: 16px; display: grid; gap: 8px; }
.summary-contact a { display: flex; align-items: center; gap: 10px; padding: 10px 12px; background: var(--bg-soft); border-radius: var(--r-sm); font-size: 14.5px; font-weight: 600; color: var(--ink); }
.summary-contact a:hover { background: var(--brand-soft); color: var(--brand-dark); }
.summary-contact svg { width: 18px; height: 18px; color: var(--brand-dark); flex: none; }

.form-nav { display: flex; justify-content: space-between; gap: 12px; margin-top: 26px; padding-top: 22px; border-top: 1px solid var(--line); }

.alert {
  display: none; gap: 12px; align-items: flex-start;
  padding: 14px 16px; border-radius: var(--r); font-size: 14.5px; margin-bottom: 20px;
}
.alert.show { display: flex; }
.alert-warn { background: #fff8e6; border: 1px solid #f5d999; color: #8a5a00; }
.alert-ok { background: #e9f9ef; border: 1px solid #a8e0bf; color: #10753a; }
.alert svg { width: 20px; height: 20px; flex: none; margin-top: 2px; }

.success-view { text-align: center; padding: 30px 10px; }
.success-icon { display: grid; place-items: center; width: 76px; height: 76px; margin: 0 auto 20px; background: #e6f7ee; color: var(--green); border-radius: 50%; }
.success-icon svg { width: 40px; height: 40px; }
.ref-code { display: inline-block; padding: 10px 20px; margin: 8px 0 20px; background: var(--bg-soft); border: 1px dashed var(--line); border-radius: var(--r); font-size: 18px; font-weight: 800; letter-spacing: 1px; color: var(--ink); }
.copy-area {
  width: 100%; min-height: 190px; margin-top: 16px; padding: 14px;
  font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: 13px; line-height: 1.65;
  color: var(--text); background: var(--bg-soft); border: 1px solid var(--line); border-radius: var(--r-sm);
  white-space: pre; overflow: auto;
}
.history-list { margin-top: 20px; text-align: left; }
.history-item { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--r); margin-bottom: 8px; font-size: 14px; }
.history-item b { display: block; color: var(--ink); }
.history-item span { color: var(--text-3); font-size: 12.5px; }
.history-item button { margin-left: auto; }

/* ==========================================================================
   10. ติดต่อ
   ========================================================================== */
.contact-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; align-items: start; }
.contact-list { display: grid; gap: 14px; }
.contact-item { display: flex; gap: 16px; padding: 20px; background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); transition: all .2s ease; }
.contact-item:hover { box-shadow: var(--sh-2); transform: translateY(-2px); }
.contact-item .ico { display: grid; place-items: center; width: 46px; height: 46px; flex: none; background: var(--brand-soft); color: var(--brand-dark); border-radius: var(--r); }
.contact-item .ico svg { width: 23px; height: 23px; }
.contact-item b { display: block; font-size: 13px; color: var(--text-3); font-weight: 700; letter-spacing: .4px; }
.contact-item span, .contact-item a { display: block; font-size: 17px; font-weight: 700; color: var(--ink); margin-top: 2px; }
.contact-item a:hover { color: var(--brand-dark); }

.map-frame { aspect-ratio: 16 / 10; border-radius: var(--r-lg); overflow: hidden; border: 1px solid var(--line); background: var(--bg-soft); }
.map-frame iframe { width: 100%; height: 100%; border: 0; display: block; }

.map-placeholder { display: grid; place-items: center; height: 100%; text-align: center; padding: 30px; background: repeating-linear-gradient(45deg, #f6f8fb, #f6f8fb 14px, #eef2f7 14px, #eef2f7 28px); }
.map-placeholder svg { width: 48px; height: 48px; color: var(--text-3); margin-bottom: 10px; }
.map-placeholder p { font-size: 14px; color: var(--text-2); max-width: 42ch; margin: 0 auto 12px; }

.hours-table { width: 100%; border-collapse: collapse; font-size: 15px; }
.hours-table td { padding: 11px 0; border-bottom: 1px solid var(--line); }
.hours-table td:last-child { text-align: right; font-weight: 700; color: var(--ink); }
.hours-table tr:last-child td { border-bottom: 0; }
.hours-table .closed { color: var(--red); }

/* ==========================================================================
   11. Footer
   ========================================================================== */
.footer { background: var(--bg-dark); color: rgba(238,244,250,.72); padding-block: clamp(40px, 6vw, 68px) 0; font-size: 14.5px; }
.footer h4 { color: #fff; font-size: 15.5px; margin-bottom: 16px; }
.footer a { color: rgba(238,244,250,.72); }
.footer a:hover { color: var(--brand); }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1.3fr; gap: 34px; padding-bottom: 40px; }
.footer p { font-size: 14.5px; }
.footer ul { list-style: none; padding: 0; margin: 0; }
.footer li { margin-bottom: 10px; }
.footer-contact li { display: flex; gap: 10px; align-items: flex-start; }
.footer-contact svg { width: 17px; height: 17px; color: var(--brand); flex: none; margin-top: 4px; }
.footer-social { display: flex; gap: 10px; margin-top: 18px; }
.footer-social a { display: grid; place-items: center; width: 40px; height: 40px; background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.12); border-radius: 50%; color: #fff; }
.footer-social a:hover { background: var(--brand); border-color: var(--brand); color: #fff; transform: translateY(-2px); }
.footer-bottom { display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; align-items: center; padding-block: 22px; border-top: 1px solid rgba(255,255,255,.1); font-size: 13.5px; }

/* ==========================================================================
   12. ปุ่มลอย / สแต็กแบง
   ========================================================================== */
.floating { position: fixed; right: 16px; bottom: 16px; z-index: 90; display: grid; gap: 10px; }
.floating a {
  display: grid; place-items: center; width: 54px; height: 54px;
  border-radius: 50%; box-shadow: var(--sh-2); color: #fff;
  transition: transform .2s ease;
}
.floating a:hover { transform: scale(1.08); color: #fff; }
.floating svg { width: 26px; height: 26px; }
.fab-line { background: #06c755; }
.fab-call { background: var(--brand); }
.fab-top { background: var(--ink); width: 44px; height: 44px; }
.fab-top svg { width: 20px; height: 20px; }
.fab-top.hidden { display: none; }

.toast-wrap { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 400; display: grid; gap: 8px; width: min(420px, calc(100vw - 32px)); }
.toast {
  display: flex; align-items: center; gap: 12px; padding: 13px 18px;
  background: var(--ink); color: #fff; border-radius: var(--r); box-shadow: var(--sh-3);
  font-size: 14.5px; animation: toastIn .22s ease;
}
@keyframes toastIn { from { opacity: 0; transform: translateY(12px); } }
.toast.out { animation: toastOut .2s ease forwards; }
.toast svg { width: 19px; height: 19px; flex: none; }
.toast-ok svg { color: #4ade80; }
.toast-err svg { color: #fca5a5; }

/* ==========================================================================
   13. กริดรูปแบบอื่น ๆ
   ========================================================================== */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 5vw, 60px); align-items: center; }
.split-img { border-radius: var(--r-xl); overflow: hidden; box-shadow: var(--sh-3); }
.check-list { list-style: none; padding: 0; margin: 0 0 24px; display: grid; gap: 12px; }
.check-list li { display: flex; gap: 12px; align-items: flex-start; margin: 0; font-size: 15.5px; color: var(--text-2); }
.check-list svg { width: 22px; height: 22px; color: var(--green); flex: none; margin-top: 2px; }
.check-list b { color: var(--ink); }

.stat-band { display: grid; gap: 18px; grid-template-columns: repeat(4, 1fr); }
.stat {
  padding: 24px 20px; text-align: center; background: #fff;
  border: 1px solid var(--line); border-radius: var(--r-lg);
}
.stat b { display: block; font-size: clamp(28px, 3.4vw, 40px); font-weight: 800; color: var(--brand); line-height: 1.1; }
.stat span { font-size: 14px; color: var(--text-2); }

.color-picker { display: flex; flex-wrap: wrap; gap: 12px; }
.color-opt {
  display: flex; align-items: center; gap: 9px; padding: 8px 14px 8px 9px;
  background: #fff; border: 1.5px solid var(--line); border-radius: var(--r-full);
  font-family: inherit; font-size: 14px; font-weight: 600; color: var(--text-2); cursor: pointer;
  transition: all .15s ease;
}
.color-opt:hover { border-color: var(--ink); }
.color-opt[aria-pressed="true"] { border-color: var(--brand); background: var(--brand-soft); color: var(--brand-dark); }
.color-opt .swatch-dot { width: 24px; height: 24px; border-radius: 50%; border: 1px solid rgba(0,0,0,.15); flex: none; }

.area-calc { display: grid; gap: 14px; padding: 18px; background: var(--bg-soft); border: 1px dashed var(--line); border-radius: var(--r); }
.area-calc .out { display: flex; flex-wrap: wrap; gap: 8px 22px; align-items: baseline; padding-top: 12px; border-top: 1px dashed #d3dde7; }
.area-calc .out b { font-size: 26px; color: var(--brand-dark); }

/* ==========================================================================
   14. Responsive
   ========================================================================== */
@media (max-width: 1100px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .stat-band { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: repeat(2, 1fr); gap: 28px; }
  .quote-layout { grid-template-columns: 1fr; }
  .summary-card { position: static; }
}

@media (max-width: 980px) {
  :root { --header-h: 64px; }
  .nav { display: none; }
  .hamburger { display: block; }
  .header-cta .btn-outline { display: none; }
  .hero-inner { grid-template-columns: 1fr; }
  .catalog-layout { grid-template-columns: 1fr; }
  .filters { position: static; }
  .modal-grid { grid-template-columns: 1fr; }
  .contact-layout, .split { grid-template-columns: 1fr; }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 720px) {
  body { font-size: 15.5px; }
  .topbar-right { display: none; }
  .grid-2, .grid-3, .grid-4, .steps, .stat-band, .footer-grid { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .quick-form .qf-row { grid-template-columns: 1fr; }
  .gallery-grid { grid-template-columns: 1fr; }
  .stepper { overflow-x: auto; padding-bottom: 4px; }
  .stepper-item { min-width: 116px; }
  .floating { right: 12px; bottom: 12px; }
  .fab-line, .fab-call { width: 48px; height: 48px; }
  .footer-bottom { justify-content: center; text-align: center; }
  .toolbar { padding: 12px; }
  .toolbar select { flex: 1; }
  .product-actions { flex-direction: column; }
}

@media (max-width: 420px) {
  .container { padding-inline: 14px; }
  .btn { padding: 11px 18px; }
  .btn-lg { padding: 13px 24px; font-size: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important; animation-iteration-count: 1 !important;
    transition-duration: .01ms !important; scroll-behavior: auto !important;
  }
}

@media print {
  .header, .topbar, .footer, .floating, .cta-band, .toolbar, .filters, .form-nav, .hero::after { display: none !important; }
  body { color: #000; }
  .container { max-width: none; }
  .card, .form-panel, .summary-card { break-inside: avoid; box-shadow: none; }
}

/* ==========================================================================
   ทีมงานขาย (กดชื่อ = โทรทันที)
   ========================================================================== */
.staff-lead {
  text-align: center; color: var(--text-2); margin: 0 0 22px; font-size: 15.5px;
}
.staff-lead b { color: var(--brand-dark); }
.staff-grid .staff-list {
  display: grid; gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(330px, 1fr));
}
.staff-card {
  display: flex; align-items: center; gap: 12px 14px; flex-wrap: wrap;
  background: #fff; border: 2px solid var(--line); border-radius: var(--r);
  padding: 14px 16px; text-decoration: none; color: var(--text);
  box-shadow: var(--sh-1); transition: transform .18s, box-shadow .18s, border-color .18s;
}
.staff-card:hover, .staff-card:focus-visible {
  transform: translateY(-3px); border-color: var(--brand);
  box-shadow: var(--sh-2); outline: none;
}
.staff-ico {
  flex: 0 0 auto; width: 46px; height: 46px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--brand-soft); color: var(--brand-dark);
}
.staff-ico svg { width: 22px; height: 22px; }
.staff-txt { display: flex; flex-direction: column; line-height: 1.35; min-width: 0; flex: 1 1 130px; }
.staff-txt b { font-size: 16.5px; font-weight: 700; }
.staff-txt span { font-size: 13px; color: var(--text-3); }
.staff-act { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.staff-no {
  font-weight: 700; font-size: 15px; color: var(--ink);
  font-variant-numeric: tabular-nums; white-space: nowrap;
}
.staff-call {
  flex: 0 0 auto; font-size: 13px; font-weight: 700; color: #fff;
  background: var(--brand); border-radius: var(--r-full);
  padding: 6px 13px; box-shadow: 0 2px 6px rgba(249, 115, 22, .35);
}
.staff-card:hover .staff-call { background: var(--brand-dark); }
.staff-card.is-primary {
  border-color: var(--brand);
  background: linear-gradient(180deg, var(--brand-soft), #fff 70%);
}
.staff-card.is-primary .staff-ico { background: var(--brand); color: #fff; }
.staff-card.is-primary .staff-txt b { color: var(--brand-dark); }

/* --- ป้ายฟรี --- */
.freebie-row { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.freebie {
  display: inline-flex; align-items: center; gap: 8px;
  background: #ecfdf5; color: #15803d; border: 1px solid #a7f3d0;
  border-radius: var(--r-full); padding: 8px 16px; font-size: 14.5px; font-weight: 600;
}
.freebie svg { width: 18px; height: 18px; flex: 0 0 auto; }
.hero .freebie-row { margin-top: 22px; }
.hero .freebie {
  background: rgba(255, 255, 255, .12); color: #fff;
  border-color: rgba(255, 255, 255, .3); backdrop-filter: blur(4px);
}
.hero .freebie svg { color: #4ade80; }

/* ==========================================================================
   โชว์เด่น: โกดัง / รถขนส่ง / ภายในโกดัง
   ========================================================================== */
.showcase {
  display: grid; gap: 16px;
  grid-template-columns: 1.35fr 1fr;
  grid-template-areas: "big small1" "big small2";
}
.showcase-item {
  grid-area: auto; margin: 0; position: relative; overflow: hidden;
  border-radius: var(--r-lg); background: var(--ink);
  box-shadow: var(--sh-2); cursor: zoom-in;
}
.showcase-item.is-big { grid-area: big; }
.showcase-item img {
  display: block; width: 100%; height: 100%; min-height: 210px;
  object-fit: cover; transition: transform .5s ease;
}
.showcase-item:hover img { transform: scale(1.05); }
.showcase-item figcaption {
  position: absolute; inset: auto 0 0 0; padding: 34px 20px 16px;
  background: linear-gradient(to top, rgba(6, 20, 34, .92), rgba(6, 20, 34, 0));
  color: #fff; display: flex; flex-direction: column; gap: 2px;
}
.showcase-item figcaption b { font-size: 18px; font-weight: 700; }
.showcase-item figcaption span { font-size: 13.5px; color: rgba(238, 244, 250, .82); }
.showcase-item::after {
  content: "\219F"; position: absolute; top: 12px; right: 14px;
  width: 34px; height: 34px; border-radius: 50%;
  background: rgba(255, 255, 255, .9); color: var(--ink);
  display: grid; place-items: center; font-size: 16px; font-weight: 700;
  opacity: 0; transform: scale(.7); transition: .2s;
}
.showcase-item:hover::after { opacity: 1; transform: scale(1); }

@media (max-width: 860px) {
  .showcase { grid-template-columns: 1fr; grid-template-areas: none; }
  .showcase-item img { min-height: 190px; }
  .showcase-item.is-big { grid-area: auto; }
}

@media (max-width: 560px) {
  .staff-card { padding: 12px 14px; }
  .staff-no { font-size: 14px; }
  .staff-act { width: 100%; justify-content: space-between; }
  .freebie { font-size: 13px; padding: 7px 13px; }
}
/* --- ทีมงานขายแบบย่อในการ์ด Hero --- */
.staff-mini { display: flex; flex-wrap: wrap; gap: 8px; }
.staff-mini-item {
  display: inline-flex; align-items: center; gap: 7px;
  border: 1.5px solid var(--line); border-radius: var(--r-full);
  background: #fff; color: var(--ink); text-decoration: none;
  padding: 7px 14px 7px 10px; font-size: 14px; font-weight: 600;
  transition: .16s;
}
.staff-mini-item svg { width: 16px; height: 16px; color: var(--brand); flex: 0 0 auto; }
.staff-mini-item:hover, .staff-mini-item:focus-visible {
  border-color: var(--brand); background: var(--brand-soft); color: var(--brand-dark);
  transform: translateY(-1px); outline: none;
}
/* --- ซ่อนอัตโนมัติตอนยังไม่มีข้อมูล (LINE / อีเมล) --- */
.hidden { display: none !important; }
/* ==========================================================================
   ชุดเคลือบสี PRIMO + วิธีการติดตั้ง (ข้อมูลจากใบปลิวผู้ผลิต)
   ========================================================================== */

/* --- วิธีการติดตั้ง (ใน modal สินค้า) --- */
.install-list { list-style: none; margin: 0; padding: 0; counter-reset: st; }
.install-list li {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 9px 0; border-bottom: 1px dashed var(--line);
  font-size: 14.5px; color: var(--text-2); line-height: 1.65;
}
.install-list li:last-child { border-bottom: 0; }
.install-list .step-no {
  flex: 0 0 26px; width: 26px; height: 26px; border-radius: 50%;
  background: var(--brand-soft); color: var(--brand-dark);
  display: grid; place-items: center;
  font-size: 12.5px; font-weight: 800; margin-top: 2px;
}
.install-list li span { flex: 1; }

/* --- กล่อง PRIMO ใน modal --- */
.primo-box {
  margin-top: 24px; padding: 20px;
  border: 1.5px solid var(--line); border-left: 5px solid var(--brand);
  border-radius: var(--r); background: var(--bg-soft);
}
.primo-box h4 { margin-bottom: 4px; }
.primo-box h3, .primo-box h4 { margin-top: 20px; }
.primo-box > h4:first-of-type { margin-top: 6px; }
.primo-tag {
  font-size: 13px; color: var(--text-3); font-style: italic;
  margin-bottom: 14px;
}

/* --- โครงสร้างชั้นเคลือบ --- */
.layer-list { list-style: none; margin: 0; padding: 0; }
.layer-list li {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 9px 0; border-bottom: 1px dashed var(--line);
}
.layer-list li:last-child { border-bottom: 0; }
.layer-list li > div { flex: 1; }
.layer-list b { display: block; font-size: 14.5px; font-weight: 700; }
.layer-list p { font-size: 13.5px; color: var(--text-2); margin: 2px 0 0; line-height: 1.6; }
.layer-list .ml-code {
  display: inline-block; margin-top: 3px;
  font-size: 11.5px; font-weight: 700; letter-spacing: .02em;
  color: var(--accent); background: #e0f2fe;
  border-radius: var(--r-full); padding: 2px 9px;
}
.pl-no {
  flex: 0 0 24px; width: 24px; height: 24px; border-radius: 50%;
  background: var(--ink); color: #fff;
  display: grid; place-items: center; font-size: 12px; font-weight: 800;
  margin-top: 2px;
}

/* --- สวิตช์สี PRIMO --- */
.primo-chips, .pg-colors {
  display: flex; flex-wrap: wrap; gap: 8px;
}
.primo-chip {
  display: inline-flex; align-items: center; gap: 7px;
  border: 1.5px solid var(--line); border-radius: var(--r-full);
  background: #fff; padding: 5px 13px 5px 6px;
  font-size: 13px; font-weight: 600; color: var(--text);
}
.primo-chip i {
  width: 20px; height: 20px; border-radius: 50%; flex: 0 0 auto;
  box-shadow: inset 0 0 0 1px rgba(15, 41, 66, .14);
}
.primo-chip em {
  font-style: normal; font-size: 11.5px; color: var(--text-3); font-weight: 500;
  margin-left: 3px;
}

/* --- หน้าสินค้า: ทั้งบล็อก --- */
.primo-top {
  display: grid; grid-template-columns: 1.05fr 1fr;
  gap: 30px; align-items: center; margin-bottom: 30px;
}
.primo-intro h2 { margin: 6px 0 8px; }
.primo-intro > p:last-child { margin: 0; color: var(--text-2); }
.primo-hls { display: grid; gap: 12px; }
.primo-hl {
  background: #fff; border: 1.5px solid var(--line);
  border-left: 5px solid var(--accent);
  border-radius: var(--r); padding: 14px 18px;
  box-shadow: var(--sh-1);
}
.primo-hl b {
  display: block; font-size: 13px; letter-spacing: .06em;
  color: var(--accent); margin-bottom: 3px;
}
.primo-hl p { margin: 0; font-size: 14px; color: var(--text-2); }

.primo-cols {
  display: grid; grid-template-columns: 1.1fr 1fr; gap: 30px; align-items: start;
}
.primo-cols h3 { margin-bottom: 12px; }
.primo-stack li { align-items: flex-start; }
.primo-chart-title { margin: 32px 0 14px; }

.primo-groups {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px;
}
.primo-group {
  background: #fff; border: 1.5px solid var(--line);
  border-radius: var(--r); padding: 15px 17px;
}
.pg-head { margin-bottom: 11px; }
.pg-head b { display: block; font-size: 14.5px; }
.pg-head span { font-size: 11.5px; color: var(--text-3); }
.primo-extra { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.primo-note {
  margin-top: 16px; font-size: 12.5px; color: var(--text-3);
  border-top: 1px solid var(--line); padding-top: 12px;
}

/* ---------- ภาพชาร์จสีจริงจากใบปลิว ---------- */
.primo-chart-img {
  margin-top: 30px; padding: 20px; background: #fff;
  border: 1.5px solid var(--line); border-radius: var(--r);
}
.primo-chart-img .eyebrow { display: block; margin-bottom: 12px; }
.primo-chart-img img {
  display: block; width: 100%; height: auto; border-radius: 8px;
  border: 1px solid var(--line);
}
.pci-cap { display: block; margin-top: 10px; font-size: 12.5px; color: var(--text-3); }

/* ================= ปุ่ม / ป้ายเอกสาร PDF ================= */
/* รูปที่เป็นหน้าเอกสาร (A4 แนวตั้ง) ให้แสดงเต็มใบ ไม่ให้ถูกครอป */
.product-media.is-doc, .modal-media.is-doc { background: #fff; }
.product-media.is-doc img, .modal-media.is-doc img { object-fit: contain; }

.btn-pdf {
  --btn-bg: #fff; --btn-fg: var(--brand-dark);
  border-color: var(--brand); color: var(--brand-dark);
}
.btn-pdf:hover { --btn-bg: var(--brand-soft); border-color: var(--brand-dark); }
.btn-pdf svg { width: 16px; height: 16px; }

.doc-flag {
  position: absolute; left: 12px; bottom: 12px; z-index: 2;
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 11px; border-radius: 999px;
  background: rgba(15,41,66,.86); color: #fff;
  font-size: 12px; font-weight: 600; backdrop-filter: blur(4px);
}
.doc-flag svg { width: 15px; height: 15px; }

/* ---------- ข้อมูลสรุปสั้น ๆ บนการ์ดสินค้า ---------- */
.product-model {
  display: inline-block; margin-top: 4px;
  font-size: 12.5px; color: var(--text-3); letter-spacing: .2px;
}
.product-facts {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px;
  margin: 14px 0 2px; padding: 12px 14px;
  background: var(--bg-soft); border-radius: 10px;
}
.product-facts > div { min-width: 0; }
.product-facts .label {
  display: block; font-size: 11.5px; color: var(--text-3);
  margin-bottom: 3px; line-height: 1.3;
}
.product-facts b {
  display: block; font-size: 13.5px; font-weight: 700; color: var(--ink);
  line-height: 1.35;
}

/* ---------- ปุ่มเปิด PDF ใน modal ---------- */
.modal-doc-btn {
  display: inline-flex; align-items: center; gap: 9px;
  margin-top: 14px; padding: 12px 18px; cursor: pointer;
  background: var(--brand-soft); color: var(--brand-dark);
  border: 1.5px solid var(--brand); border-radius: var(--r);
  font: inherit; font-weight: 700; font-size: 14.5px;
  transition: background .18s ease;
}
.modal-doc-btn:hover { background: #dceaf7; }
.modal-doc-btn svg { width: 19px; height: 19px; flex: none; }

/* ---------- การ์ดเอกสารใน modal ---------- */
.doc-card {
  display: flex; gap: 14px; align-items: flex-start;
  padding: 16px; margin-bottom: 12px;
  background: var(--bg-soft); border: 1.5px solid var(--line); border-radius: var(--r);
}
.doc-card .dc-ico {
  flex: none; width: 42px; height: 42px; border-radius: 10px;
  display: grid; place-items: center;
  background: #fff; border: 1.5px solid var(--brand); color: var(--brand);
}
.doc-card .dc-ico svg { width: 22px; height: 22px; }
.doc-card .dc-txt b { display: block; font-size: 15px; margin-bottom: 3px; }
.doc-card .dc-txt span { display: block; font-size: 13px; color: var(--text-2); line-height: 1.55; }

/* ================= ตัวดู PDF แบบเต็มหน้าจอ ================= */
.pdf-viewer {
  position: fixed; inset: 0; z-index: 300;
  display: none; padding: 22px;
  background: rgba(9,20,32,.72); backdrop-filter: blur(3px);
}
.pdf-viewer.open { display: grid; place-items: center; }
.pdf-panel {
  width: min(1080px, 100%); height: min(88vh, 900px);
  display: flex; flex-direction: column; overflow: hidden;
  background: #fff; border-radius: 14px; box-shadow: var(--sh-3);
}
.pdf-head {
  display: flex; align-items: center; gap: 13px; flex-wrap: wrap;
  padding: 14px 18px; border-bottom: 1px solid var(--line); background: var(--bg-soft);
}
.pdf-ico {
  flex: none; width: 38px; height: 38px; border-radius: 9px;
  display: grid; place-items: center;
  background: var(--brand); color: #fff;
}
.pdf-ico svg { width: 20px; height: 20px; }
.pdf-ttl { flex: 1; min-width: 180px; }
.pdf-ttl b { display: block; font-size: 15.5px; }
.pdf-ttl span { display: block; font-size: 12.5px; color: var(--text-3); margin-top: 2px; }
.pdf-x {
  flex: none; width: 36px; height: 36px; border-radius: 9px; cursor: pointer;
  display: grid; place-items: center;
  background: #fff; border: 1px solid var(--line); color: var(--ink);
}
.pdf-x:hover { border-color: var(--ink); }
.pdf-x svg { width: 18px; height: 18px; }
.pdf-frame { flex: 1; min-height: 0; }
.pdf-frame iframe { width: 100%; height: 100%; border: 0; display: block; }

/* ================= รายการเอกสารประกอบผลิตภัณฑ์ ================= */
.doc-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: 14px; }
.doc-item {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 16px; background: #fff;
  border: 1.5px solid var(--line); border-radius: var(--r);
  color: var(--ink); transition: border-color .18s ease, transform .18s ease, box-shadow .18s ease;
}
.doc-item:hover { border-color: var(--brand); transform: translateY(-2px); box-shadow: var(--sh-2); }
.doc-item img {
  flex: none; width: 62px; height: 62px; object-fit: cover;
  border-radius: 9px; border: 1px solid var(--line);
}
.doc-item-ico {
  flex: none; width: 62px; height: 62px; border-radius: 9px;
  display: grid; place-items: center;
  background: var(--brand-soft); color: var(--brand);
}
.doc-item-ico svg { width: 26px; height: 26px; }
.doc-item-txt { flex: 1; min-width: 0; }
.doc-item-txt b { display: block; font-size: 15px; line-height: 1.4; }
.doc-item-txt span {
  display: block; font-size: 12.5px; color: var(--text-3);
  margin-top: 3px; line-height: 1.5;
  overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
}
.doc-item-go {
  flex: none; display: inline-flex; align-items: center; gap: 5px;
  font-size: 12.5px; font-weight: 700; color: var(--brand);
}
.doc-item-go svg { width: 15px; height: 15px; }

@media (max-width: 900px) {
  .primo-top { grid-template-columns: 1fr; gap: 20px; }
  .primo-cols { grid-template-columns: 1fr; gap: 24px; }
  .product-facts { grid-template-columns: 1fr 1fr; }
  .pdf-viewer { padding: 0; }
  .pdf-panel { height: 100%; border-radius: 0; }
  .pdf-head { padding: 12px 14px; }
  .doc-item-go { display: none; }
}

/* --- Google Maps (data-render="map") --- */
.map-embed { position: relative; width: 100%; height: 100%; }
.map-embed iframe { width: 100%; height: 100%; border: 0; display: block; filter: saturate(1.05); }
.map-open { position: absolute; left: 14px; bottom: 14px; z-index: 2; display: inline-flex; align-items: center; gap: 7px; padding: 9px 16px; border-radius: 999px; background: #fff; color: var(--text-1); font-size: 13.5px; font-weight: 700; box-shadow: 0 6px 22px rgba(15,23,42,.24); transition: background .18s, color .18s, transform .18s; }
.map-open:hover { background: var(--brand); color: #fff; transform: translateY(-2px); }
.map-open svg { width: 17px; height: 17px; flex: 0 0 auto; }
.branch-map { display: inline-flex; align-items: center; gap: 7px; color: var(--brand); font-weight: 600; }
.branch-map svg { width: 16px; height: 16px; }
