/* ============================================================
   ระบบดีไซน์ — ของพรีเมียมองค์กร
   สีหลัก เขียวสน (ล้อวัสดุไม้ไผ่/คอร์กของสินค้า) บนกระดาษออกเทา
   ตัวอักษร Anuphan (หัวเรื่อง) + Sarabun (เนื้อความ) + IBM Plex Mono (รหัส/ตัวเลข)
   ============================================================ */

:root {
  --paper:      #FAFAF9;
  --surface:    #FFFFFF;
  --sunk:       #F1F2F0;
  --ink:        #15181A;
  --muted:      #6B7378;
  --line:       #E3E5E2;
  --line-soft:  #EDEEEC;
  /* สีแบรนด์จริง อ่านจากแผ่น CI ของนักออกแบบ
     PhotoAll/10-โลโก้แบรนด์/SIMPLYGIFT_LOGO_AW.ai — เขียวเข้ม #123c2e + ไลม์ #d1dd26
     ⚠️ ไลม์สว่างมาก **ห้ามใช้เป็นสีตัวหนังสือบนพื้นขาว** อ่านไม่ออก
        ใช้เป็นพื้นหลังแล้ววางตัวหนังสือเขียวเข้มทับ ถึงจะอ่านสบาย */
  --pine:       #123C2E;
  --pine-wash:  #E7EFEA;
  --brass:      #5F6D0C;
  --lime:       #D1DD26;

  /* กระเบื้องรูปสินค้า — คงพื้นขาวไว้ทั้งสองธีม เพราะรูปสินค้าพื้นขาว */
  --tile:       #FFFFFF;
  --tile-line:  #E6E7E5;

  /* 01/10/2569 เปลี่ยนหัวเรื่องจาก Anuphan (ไม่มีหัว) เป็นฟอนต์มีหัว
     เพราะตัวหนังสือในภาพแบนเนอร์ที่กราฟฟิกทำมาเป็นแบบมีหัวทั้งหมด
     เอามาวางเทียบกันแล้ว Noto Sans Thai Looped ใกล้ที่สุด (หัวกลมเล็ก ตัวกว้าง)
     เนื้อความเป็น Sarabun ซึ่งมีหัวอยู่แล้ว ตอนนี้จึงเป็นแบบมีหัวทั้งเว็บ เข้าชุดกับภาพ
     ⚠️ เปลี่ยนตรงนี้ต้องไปแก้ลิงก์ Google Fonts ในไฟล์ .html ทุกหน้าด้วย ไม่งั้นฟอนต์ไม่ถูกโหลด */
  --display: "Noto Sans Thai Looped", "Segoe UI", system-ui, sans-serif;
  --body:    "Sarabun", "Segoe UI", system-ui, sans-serif;
  --mono:    "IBM Plex Mono", ui-monospace, monospace;

  --r:  6px;
  --rl: 10px;
  --wrap: 1240px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper:     #101314;
    --surface:   #181C1D;
    --sunk:      #1F2425;
    --ink:       #E9ECEA;
    --muted:     #97A19D;
    --line:      #272C2D;
    --line-soft: #222728;
    /* โหมดมืด: เขียวเข้มจมหายไปกับพื้น เลยสลับให้ "ไลม์" ขึ้นมาเป็นสีหลักแทน
       ปุ่มใช้ `color: var(--paper)` อยู่แล้ว ตัวหนังสือบนปุ่มจึงกลายเป็นสีเกือบดำเอง อ่านชัด */
    --pine:      #D1DD26;
    --pine-wash: #1B2714;
    --brass:     #C3D24A;
    --lime:      #D1DD26;
    --tile:      #F7F7F6;
    --tile-line: #2A2F30;
  }
}

:root[data-theme="dark"] {
  --paper:     #101314;
  --surface:   #181C1D;
  --sunk:      #1F2425;
  --ink:       #E9ECEA;
  --muted:     #97A19D;
  --line:      #272C2D;
  --line-soft: #222728;
  --pine:      #D1DD26;
  --pine-wash: #1B2714;
  --brass:     #C3D24A;
  --lime:      #D1DD26;
  --tile:      #F7F7F6;
  --tile-line: #2A2F30;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: 15.5px;
  line-height: 1.7;
  -webkit-text-size-adjust: 100%;
}

img { max-width: 100%; display: block; }
a { color: inherit; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 22px; }
.narrow { max-width: 820px; }

h1, h2, h3, h4 { font-family: var(--display); font-weight: 600; margin: 0; text-wrap: balance; line-height: 1.25; }

.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }

/* ---------------- แถบบน ---------------- */

.topbar {
  background: var(--pine);
  color: var(--paper);
  font-size: 12.5px;
  letter-spacing: .02em;
}
.topbar .wrap { display: flex; gap: 18px; align-items: center; justify-content: center; padding-block: 7px; flex-wrap: wrap; }

header.site {
  position: sticky; top: 0; z-index: 40;
  background: color-mix(in srgb, var(--paper) 93%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
header.site .wrap { display: flex; align-items: center; gap: 22px; padding-block: 13px; }

/* โลโก้จริงของแบรนด์ (30/09/2569 — เดิมเป็นตัวอักษร S ในกล่องสี)

   🔴 ใช้ mask ไม่ใช่ <img> โดยตั้งใจ
   <img> โหลดไฟล์ SVG แยกจากหน้าเว็บ คำสั่งสีของเราส่งผลข้ามเข้าไปไม่ได้
   -> พื้นเข้มแล้วโลโก้ยังดำอยู่ มองไม่เห็น (ลองมาแล้ว)
   วิธีนี้โลโก้รับสีจาก `color` ของตัวมันเอง ไฟล์เดียวใช้ได้ทั้งโหมดสว่างและมืด

   สัดส่วนต้นฉบับ 330 x 62 จุด ถ้านักออกแบบส่งโลโก้ทรงใหม่มา ต้องมาแก้ width/height ให้ตรงส่วน */
.brand {
  display: flex; flex-direction: column; align-items: flex-start; gap: 3px;
  text-decoration: none; flex: none; color: var(--ink);
}
.brand .logo {
  display: block; width: 122px; height: 23px; background: currentColor;
  -webkit-mask: url(brand/wordmark.svg) no-repeat center / contain;
          mask: url(brand/wordmark.svg) no-repeat center / contain;
}
.brand .tagline { display: block; font-size: 11px; color: var(--muted); line-height: 1.2; letter-spacing: .04em; }
footer.site .brand .logo { width: 138px; height: 26px; }

nav.main { display: flex; gap: 4px; margin-inline-start: auto; }
nav.main a {
  text-decoration: none; font-size: 14.5px; padding: 7px 13px; border-radius: 100px; color: var(--muted);
  transition: background .15s, color .15s;
}
nav.main a:hover, nav.main a.on { color: var(--ink); background: var(--sunk); }
nav.main a.on { font-weight: 600; }

.btn {
  display: inline-flex; align-items: center; gap: 8px; justify-content: center;
  font-family: var(--body); font-size: 14.5px; font-weight: 500;
  padding: 9px 18px; border-radius: 100px; border: 1px solid transparent;
  text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: filter .15s, background .15s, border-color .15s;
}
.btn-pine { background: var(--pine); color: var(--paper); }
.btn-pine:hover { filter: brightness(1.12); }
.btn-line { border-color: var(--line); color: var(--ink); background: var(--surface); }
.btn-line:hover { border-color: var(--ink); }
.btn-lg { padding: 13px 26px; font-size: 15.5px; }

.menu-btn { display: none; background: none; border: 1px solid var(--line); border-radius: 8px; padding: 7px 10px; cursor: pointer; color: var(--ink); }

@media (max-width: 860px) {
  nav.main { display: none; position: absolute; top: 100%; left: 0; right: 0; background: var(--surface); border-bottom: 1px solid var(--line); flex-direction: column; padding: 10px 16px 16px; gap: 2px; }
  nav.main.open { display: flex; }
  .menu-btn { display: block; margin-inline-start: auto; }
  header.site .btn { display: none; }
}

/* ---------------- หน้าแรก ---------------- */

.hero { padding: 68px 0 56px; border-bottom: 1px solid var(--line); }
/* หัวเรื่องเหลือคอลัมน์เดียว เพราะแบนเนอร์ย้ายลงไปเต็มความกว้างข้างล่าง */
/* หัวเรื่องจัดเป็นแนวนอน: ซ้าย = ข้อความ · ขวา = ปุ่มกับตัวเลข
   ให้ทรงรับกับแบนเนอร์แนวนอนข้างล่าง และเตี้ยลงจนแบนเนอร์ขึ้นมาอยู่ในจอแรก */
.hero .herotop { display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: end; }
.hero .hero-copy .lede { max-width: 46ch; margin-bottom: 0; }
.hero .hero-side { padding-bottom: 4px; }
.hero .hero-side .cta { margin-bottom: 28px; }
.hero .hero-side .stats { margin-top: 0; }
.herobanner { margin-top: 40px; }

@media (max-width: 980px) {
  .hero .herotop { grid-template-columns: 1fr; gap: 24px; align-items: start; }
  .hero .hero-side .cta { margin-bottom: 22px; }
  .herobanner { margin-top: 28px; }
}
@media (max-width: 900px) { .hero { padding: 44px 0 40px; } }

.eyebrow {
  font-family: var(--mono); font-size: 11.5px; letter-spacing: .16em; text-transform: uppercase;
  color: var(--pine); display: flex; align-items: center; gap: 11px; margin-bottom: 18px;
}
.eyebrow::after { content: ""; flex: 1; height: 1px; background: var(--line); }

.hero h1 { font-size: clamp(32px, 5.4vw, 52px); font-weight: 700; letter-spacing: -.015em; }
.hero p.lede { color: var(--muted); font-size: 17px; margin: 18px 0 28px; max-width: 46ch; }
.hero .cta { display: flex; gap: 12px; flex-wrap: wrap; }

.hero-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.hero-grid .tile:first-child { grid-row: span 2; }

.tile {
  background: var(--tile); border: 1px solid var(--tile-line); border-radius: var(--rl);
  overflow: hidden; aspect-ratio: 1; display: grid; place-items: center;
}
.tile img { width: 100%; height: 100%; object-fit: contain; }

.stats { display: flex; gap: 34px; margin-top: 34px; flex-wrap: wrap; }
.stats div { display: flex; flex-direction: column; }
.stats b { font-family: var(--display); font-size: 26px; font-weight: 700; letter-spacing: -.01em; }
.stats span { font-size: 13px; color: var(--muted); }

/* ---------------- ส่วนย่อย ---------------- */

section.block { padding: 60px 0; }
.head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 28px; flex-wrap: wrap; }
.head h2 { font-size: clamp(22px, 3.4vw, 30px); font-weight: 700; letter-spacing: -.01em; }
.head p { color: var(--muted); margin: 6px 0 0; font-size: 14.5px; }
.head a { color: var(--pine); text-decoration: none; font-size: 14.5px; font-weight: 500; white-space: nowrap; }
.head a:hover { text-decoration: underline; }

/* ---------------- การ์ดหมวด ---------------- */

.cats { display: grid; grid-template-columns: repeat(auto-fill, minmax(178px, 1fr)); gap: 14px; padding: 6px; margin: -6px; }
.cat {
  text-decoration: none; background: var(--surface); border: 1px solid var(--line-soft);
  border-radius: var(--rl); overflow: hidden; display: flex; flex-direction: column;
  transition: border-color .16s, transform .16s;
}
.cat:hover { border-color: var(--pine); transform: translateY(-2px); }
.cat .ph { background: var(--tile); border-bottom: 1px solid var(--tile-line); aspect-ratio: 4/3; }
.cat .ph img { width: 100%; height: 100%; object-fit: contain; padding: 10px; }
.cat .tx { padding: 12px 14px 14px; }
.cat .tx b { font-family: var(--display); font-weight: 600; font-size: 15.5px; display: block; }
.cat .tx span { font-family: var(--mono); font-size: 11.5px; color: var(--muted); }

/* ---------------- ตารางสินค้า ---------------- */

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(232px, 1fr)); gap: 16px; padding: 6px; margin: -6px; }
@media (max-width: 560px) { .grid { grid-template-columns: repeat(2, 1fr); gap: 11px; } }

.card {
  text-decoration: none; background: var(--surface); border: 1px solid var(--line-soft);
  border-radius: var(--rl); overflow: hidden; display: flex; flex-direction: column;
  transition: border-color .16s, transform .16s, box-shadow .16s;
}
.card:hover { border-color: var(--pine); transform: translateY(-3px); box-shadow: 0 8px 22px rgb(0 0 0 / .06); }
.card .ph { position: relative; background: var(--tile); border-bottom: 1px solid var(--tile-line); aspect-ratio: 1; }
.card .ph img { width: 100%; height: 100%; object-fit: contain; }
.card .shots {
  position: absolute; right: 8px; bottom: 8px;
  background: color-mix(in srgb, var(--ink) 78%, transparent); color: var(--paper);
  font-family: var(--mono); font-size: 10.5px; padding: 2px 7px; border-radius: 100px;
}
.card .tx { padding: 13px 14px 15px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.card .sku { font-family: var(--mono); font-size: 10.5px; color: var(--muted); letter-spacing: .06em; }
.card .nm { font-family: var(--display); font-weight: 600; font-size: 15px; line-height: 1.4; }
.card .pr { margin-top: auto; padding-top: 8px; font-family: var(--mono); font-size: 13.5px; color: var(--brass); font-weight: 500; }
.card .pr.ask { color: var(--muted); }

/* ---------------- แถบกรอง ---------------- */

.filters { position: sticky; top: 58px; z-index: 30; background: color-mix(in srgb, var(--paper) 94%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); padding: 12px 0; margin-bottom: 26px; }
.filters .row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }

.search { flex: 1; min-width: 210px; position: relative; display: flex; align-items: center; }
.search svg { position: absolute; inset-inline-start: 13px; color: var(--muted); pointer-events: none; }
.search input {
  width: 100%; font-family: var(--body); font-size: 15px; color: var(--ink);
  background: var(--surface); border: 1px solid var(--line); border-radius: 100px;
  padding: 10px 16px 10px 40px; outline: none;
}
.search input:focus { border-color: var(--pine); }

.chips { display: flex; gap: 7px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  font-family: var(--body); font-size: 13.5px; white-space: nowrap; cursor: pointer;
  background: var(--surface); border: 1px solid var(--line); color: var(--muted);
  border-radius: 100px; padding: 6px 14px; transition: .15s;
}
.chip:hover { color: var(--ink); }
.chip.on { background: var(--pine); border-color: var(--pine); color: var(--paper); font-weight: 500; }

.count { font-family: var(--mono); font-size: 12.5px; color: var(--muted); }

/* ---------------- หน้ารายละเอียด ---------------- */

.detail { display: grid; grid-template-columns: 1.1fr .9fr; gap: 46px; padding: 34px 0 20px; align-items: start; }
@media (max-width: 900px) { .detail { grid-template-columns: 1fr; gap: 26px; } }

.gal { display: flex; flex-direction: column; gap: 11px; position: sticky; top: 78px; }
@media (max-width: 900px) { .gal { position: static; } }
.gal .main { background: var(--tile); border: 1px solid var(--tile-line); border-radius: var(--rl); aspect-ratio: 1; overflow: hidden; }
.gal .main img { width: 100%; height: 100%; object-fit: contain; }
.gal .strip { display: grid; grid-template-columns: repeat(auto-fill, minmax(72px, 1fr)); gap: 8px; }
.gal .strip button {
  padding: 0; background: var(--tile); border: 1px solid var(--tile-line); border-radius: var(--r);
  aspect-ratio: 1; overflow: hidden; cursor: pointer; transition: border-color .15s;
}
.gal .strip button.on { border-color: var(--pine); border-width: 2px; }
.gal .strip img { width: 100%; height: 100%; object-fit: contain; }

.info h1 { font-size: clamp(24px, 3.6vw, 33px); font-weight: 700; letter-spacing: -.012em; margin-bottom: 10px; }
.crumb { font-size: 13px; color: var(--muted); margin-bottom: 14px; }
.crumb a { color: var(--muted); text-decoration: none; }
.crumb a:hover { color: var(--pine); }

.specs { list-style: none; margin: 22px 0; padding: 0; border-top: 1px solid var(--line-soft); }
.specs li { display: flex; gap: 16px; padding: 11px 0; border-bottom: 1px solid var(--line-soft); font-size: 14.5px; }
.specs .k { color: var(--muted); width: 118px; flex: none; }
.specs .v { font-weight: 500; }

.ask-box { background: var(--pine-wash); border: 1px solid color-mix(in srgb, var(--pine) 26%, transparent); border-radius: var(--rl); padding: 20px; }
.ask-box b { font-family: var(--display); font-size: 17px; display: block; margin-bottom: 4px; }
.ask-box p { color: var(--muted); font-size: 14px; margin: 0 0 15px; }
.ask-box .btns { display: flex; gap: 10px; flex-wrap: wrap; }

/* ---------------- ท้ายเว็บ ---------------- */

footer.site { border-top: 1px solid var(--line); background: var(--surface); margin-top: 40px; padding: 44px 0 30px; }
footer.site .cols { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 34px; }
@media (max-width: 760px) { footer.site .cols { grid-template-columns: 1fr; gap: 26px; } }
footer.site h4 { font-size: 13px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); font-family: var(--mono); font-weight: 500; margin-bottom: 12px; }
footer.site ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; }
footer.site a { text-decoration: none; font-size: 14.5px; color: var(--muted); }
footer.site a:hover { color: var(--pine); }
footer.site .end { margin-top: 32px; padding-top: 18px; border-top: 1px solid var(--line-soft); font-size: 13px; color: var(--muted); display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap; }

.empty { text-align: center; padding: 70px 20px; color: var(--muted); }
.empty b { font-family: var(--display); font-size: 19px; color: var(--ink); display: block; margin-bottom: 6px; }

.draft {
  background: #FEF6E0; border: 1px solid #E8CE86; color: #6B4E10;
  border-radius: var(--r); padding: 10px 14px; font-size: 13.5px; margin: 14px 0;
}
:root[data-theme="dark"] .draft,
:root:not([data-theme="light"]) .draft { background: #2A2312; border-color: #5C4A1C; color: #E6CE93; }
@media (prefers-color-scheme: light) { :root:not([data-theme="dark"]) .draft { background: #FEF6E0; border-color: #E8CE86; color: #6B4E10; } }

:focus-visible { outline: 2px solid var(--pine); outline-offset: 2px; border-radius: 4px; }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }

/* ---------------- ปุ่มใบขอราคาที่แถบบน ---------------- */
.qlink { position: relative; }
.qbadge {
  background: var(--pine); color: var(--paper);
  font-family: var(--mono); font-size: 11px; font-weight: 500;
  min-width: 19px; height: 19px; border-radius: 100px;
  display: inline-grid; place-items: center; padding: 0 5px; margin-inline-start: 2px;
}
@media (max-width: 860px) { header.site .qlink { display: inline-flex !important; padding: 8px 13px; font-size: 13.5px; } }

/* ---------------- หน้าใบขอราคา ---------------- */
.qrow { display: grid; grid-template-columns: 84px 1fr auto; gap: 16px; align-items: center; padding: 15px 0; border-bottom: 1px solid var(--line-soft); }
.qrow .ph { background: var(--tile); border: 1px solid var(--tile-line); border-radius: var(--r); aspect-ratio: 1; overflow: hidden; }
.qrow .ph img { width: 100%; height: 100%; object-fit: contain; }
.qrow .nm { font-family: var(--display); font-weight: 600; font-size: 15.5px; }
.qrow .nm a { text-decoration: none; }
.qrow .nm a:hover { color: var(--pine); }
.qrow .sku { font-family: var(--mono); font-size: 11px; color: var(--muted); letter-spacing: .05em; }
.qrow .ctl { display: flex; align-items: center; gap: 8px; }
.qrow input[type=number] {
  width: 92px; font-family: var(--mono); font-size: 14px; text-align: right;
  padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--r);
  background: var(--surface); color: var(--ink); outline: none;
}
.qrow input[type=number]:focus { border-color: var(--pine); }
.qrow .del { background: none; border: 0; color: var(--muted); cursor: pointer; font-size: 19px; line-height: 1; padding: 4px 6px; }
.qrow .del:hover { color: #C0392B; }
@media (max-width: 600px) {
  .qrow { grid-template-columns: 64px 1fr; row-gap: 10px; }
  .qrow .ctl { grid-column: 1 / -1; justify-content: flex-end; }
}

.qnote textarea {
  width: 100%; font-family: var(--body); font-size: 14.5px; line-height: 1.6;
  padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--r);
  background: var(--surface); color: var(--ink); resize: vertical; min-height: 84px; outline: none;
}
.qnote textarea:focus { border-color: var(--pine); }

@media print {
  header.site, footer.site, .hdr-tools, .noprint, .filters { display: none !important; }
  body { background: #fff; color: #000; }
  .qrow { break-inside: avoid; }
}

/* ---------------- ช่องรอใส่รูปจริง (เกี่ยวกับเรา) ---------------- */
.about-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 14px; }
.ph-slot {
  aspect-ratio: 4/3; border: 2px dashed var(--line); border-radius: var(--rl);
  background: var(--sunk); display: grid; place-items: center;
  font-family: var(--mono); font-size: 12.5px; color: var(--muted); text-align: center; padding: 12px;
}
.ph-slot::after { content: attr(data-slot) " · รอใส่รูปจริง"; }

.logo-row { display: flex; flex-wrap: wrap; gap: 12px; }
.ph-logo {
  flex: 1 1 148px; min-height: 62px; border: 1px dashed var(--line); border-radius: var(--r);
  background: var(--surface); display: grid; place-items: center;
  font-family: var(--mono); font-size: 11.5px; color: var(--muted);
}

.contact-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; margin-top: 30px; text-align: start; }
.cbox { background: var(--paper); border: 1px solid var(--line-soft); border-radius: var(--rl); padding: 18px; }
.cbox h4 { font-family: var(--mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); font-weight: 500; margin-bottom: 8px; }
.cbox p { margin: 0; font-size: 14.5px; }
.cbox a { color: var(--pine); text-decoration: none; }
.cbox a:hover { text-decoration: underline; }

/* ---------------- แถบบน: ไลน์ + เบอร์โทร กดติดต่อได้ทันที ---------------- */
.topbar .wrap { justify-content: space-between; }
.tb-msg { opacity: .9; }
.tb-right { display: inline-flex; align-items: center; gap: 12px; margin-inline-start: auto; }
.tb-c { text-decoration: none; display: inline-flex; gap: 5px; align-items: center; white-space: nowrap; opacity: .95; }
.tb-c:hover { opacity: 1; text-decoration: underline; }
.tb-c b { font-family: var(--mono); font-weight: 500; letter-spacing: .02em; }
@media (max-width: 700px) {
  .tb-msg { display: none; }
  .topbar .wrap { justify-content: center; gap: 12px; }
  .tb-right { margin-inline-start: 0; gap: 10px; }
}

/* ---------------- ปุ่มไลน์ลอยมุมจอ ---------------- */
.line-float {
  position: fixed; left: 16px; bottom: 16px; z-index: 85;
  display: inline-flex; align-items: center; gap: 8px;
  background: #06C755; color: #fff; text-decoration: none;
  padding: 11px 18px 11px 15px; border-radius: 100px; font-weight: 600; font-size: 14.5px;
  box-shadow: 0 6px 20px rgb(6 199 85 / .34);
  transition: transform .16s, box-shadow .16s;
}
.line-float:hover { transform: translateY(-2px); box-shadow: 0 10px 26px rgb(6 199 85 / .42); }
@media (max-width: 560px) { .line-float { padding: 12px; } .line-float span { display: none; } }
@media print { .line-float { display: none; } }

/* ============================================================
   แบนเนอร์ชุดของขวัญ (เลื่อนเอง)
   ============================================================ */
.showcase { position: relative; border-radius: var(--rl); overflow: hidden; background: var(--sunk); border: 1px solid var(--line-soft); }
.showcase .frames { position: relative; aspect-ratio: 16 / 9; }
.showcase .frames img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  opacity: 0; transition: opacity .7s ease;
}
.showcase .frames img.on { opacity: 1; }

.showcase .snav {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 36px; height: 36px; border-radius: 50%; cursor: pointer;
  background: rgb(255 255 255 / .82); color: #1a1a1a; border: 0;
  font-size: 22px; line-height: 1; display: grid; place-items: center;
  opacity: 0; transition: opacity .2s, background .2s;
}
.showcase:hover .snav, .showcase:focus-within .snav { opacity: 1; }
.showcase .snav:hover { background: #fff; }
.showcase .snav.prev { left: 10px; }
.showcase .snav.next { right: 10px; }

.showcase .dots { position: absolute; left: 0; right: 0; bottom: 12px; display: flex; gap: 6px; justify-content: center; }
.showcase .dots button {
  width: 7px; height: 7px; padding: 0; border-radius: 50%; cursor: pointer; border: 0;
  background: rgb(255 255 255 / .5); transition: width .2s, background .2s;
}
.showcase .dots button.on { width: 20px; border-radius: 100px; background: #fff; }

/* ============================================================
   ขยายรูปเล็กน้อยตอนเอาเมาส์ชี้
   ============================================================ */
/* การ์ดโตขึ้นพร้อมกับรูปข้างใน รวมแล้วสินค้าดูใหญ่ขึ้นราว 50%
   ทำสองชั้นแบบนี้เพื่อไม่ให้ขอบสินค้าโดนกรอบตัด */
.card .ph, .cat .ph, .tile { overflow: hidden; }
.card, .cat { position: relative; z-index: 0; }
.card .ph img, .cat .ph img, .tile img {
  transition: transform .3s cubic-bezier(.2,.7,.3,1);
  transform-origin: center center;   /* ซูมออกจากกลางรูป สินค้าจะไม่เลื่อนไปด้านใดด้านหนึ่ง */
  object-position: center center;    /* สินค้าอยู่กลางกรอบเสมอ */
}

.card:hover, .card:focus-visible {
  transform: scale(1.10) translateY(-2px);
  z-index: 6;
  box-shadow: 0 14px 34px rgb(0 0 0 / .15);
}
/* 1.15 คือเพดานที่ขอบสินค้ายังไม่ชนกรอบ (รูปมีพื้นที่ว่างรอบ 10% ต่อด้าน) */
.card:hover .ph img { transform: scale(1.15); }

.cat:hover { transform: scale(1.06) translateY(-2px); z-index: 6; box-shadow: 0 12px 28px rgb(0 0 0 / .12); }
.cat:hover .ph img { transform: scale(1.12); }

@media (prefers-reduced-motion: reduce) {
  .card:hover, .cat:hover { transform: none; }
  .card:hover .ph img, .cat:hover .ph img { transform: none; }
}
/* มือถือ/แท็บเล็ตไม่มีเมาส์ ไม่ต้องขยาย */
@media (hover: none) {
  .card:hover, .cat:hover { transform: none; box-shadow: none; }
  .card:hover .ph img, .cat:hover .ph img { transform: none; }
}

/* ============================================================
   เกี่ยวกับเรา
   ============================================================ */
.about { background: var(--surface); border-block: 1px solid var(--line); }
.about-top { display: grid; grid-template-columns: .85fr 1.15fr; gap: 46px; align-items: center; }
@media (max-width: 900px) { .about-top { grid-template-columns: 1fr; gap: 28px; } }
.about-text { color: var(--muted); font-size: 16px; margin: 14px 0 24px; max-width: 46ch; }

.about-pics { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.apic { border-radius: var(--rl); overflow: hidden; background: var(--sunk); aspect-ratio: 3/2; }
.apic.big { grid-column: 1 / -1; aspect-ratio: 16/9; }
.apic img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.apic:hover img { transform: scale(1.04); }

/* ============================================================
   โลโก้ลูกค้า
   ============================================================ */
.clogo {
  flex: 0 0 auto; width: 96px; height: 96px; border-radius: var(--rl); overflow: hidden;
  background: var(--surface); border: 1px solid var(--line-soft);
  display: grid; place-items: center; transition: transform .2s, border-color .2s;
}
.clogo:hover { transform: translateY(-3px); border-color: var(--pine); }
.clogo img { width: 100%; height: 100%; object-fit: cover; }
.logo-row { align-items: center; }

/* ============================================================
   ขั้นตอน
   ============================================================ */
/* 12/10/2569 ออกแบบใหม่ (user ขอ "ให้ดูสวยๆ มีภาพประกอบยิ่งดี")
   เดิมเป็นกล่องสี่เหลี่ยม 3 ใบเรียงกัน ไม่มีอะไรนำสายตา และไม่สื่อว่าเป็น "ลำดับ"
   ของใหม่: ไอคอนวงกลม + เลขขั้นตอน + เส้นประโยงระหว่างใบ (เฉพาะจอกว้าง)

   ⚠️ ไอคอนเป็น SVG เขียนในหน้าเลย ไม่ใช่ไฟล์รูป
      - คมทุกความละเอียด ไม่ต้องทำ @2x
      - เปลี่ยนสีตามตัวแปรธีมได้ (ใช้ currentColor)
      - ไม่มีไฟล์ให้โหลดเพิ่ม = ไม่ถ่วงหน้าแรก
      ห้ามเอาไปแทนด้วยไฟล์ .png เด็ดขาด จะเสียข้อดีทั้ง 3 ข้อ */
.steps { background: var(--surface); border-block: 1px solid var(--line); }
.steplist {
  list-style: none; margin: 34px 0 0; padding: 0; text-align: start;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 16px;
}
.steplist li {
  background: var(--paper); border: 1px solid var(--line-soft);
  border-radius: var(--rl); padding: 26px 20px 22px; position: relative;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
@media (hover: hover) {
  .steplist li:hover {
    transform: translateY(-3px); border-color: color-mix(in srgb, var(--pine) 34%, transparent);
    box-shadow: 0 10px 24px -12px color-mix(in srgb, var(--pine) 45%, transparent);
  }
}

.steplist .st-ico {
  width: 50px; height: 50px; border-radius: 15px; display: grid; place-items: center;
  background: var(--pine-wash); color: var(--pine); margin-bottom: 16px;
  border: 1px solid color-mix(in srgb, var(--pine) 16%, transparent);
}
.steplist .st-ico svg { width: 25px; height: 25px; display: block; }

/* เลขขั้นตอน — เล็กลงกว่าเดิมมาก ของเดิมตัวใหญ่จนแย่งความสนใจจากหัวข้อ */
.steplist .st-no {
  position: absolute; top: 22px; inset-inline-end: 20px;
  font-family: var(--mono); font-size: 12px; font-weight: 500; line-height: 1;
  color: var(--pine); background: var(--pine-wash);
  border: 1px solid color-mix(in srgb, var(--pine) 18%, transparent);
  border-radius: 100px; padding: 5px 9px;
}
.steplist b { font-family: var(--display); font-size: 17px; display: block; margin-bottom: 7px; padding-inline-end: 34px; }
.steplist .st-d { color: var(--muted); font-size: 14px; line-height: 1.6; display: block; }

/* เส้นประโยงระหว่างขั้นตอน — บอกว่าเป็นลำดับ ไม่ใช่ 3 อย่างที่ไม่เกี่ยวกัน
   โชว์เฉพาะตอนเรียง 3 ใบจริง ๆ · พอจอแคบแล้วการ์ดตกลงมาเรียงแนวตั้ง เส้นจะชี้ผิดทาง */
@media (min-width: 780px) {
  .steplist li:not(:last-child)::after {
    content: ''; position: absolute; top: 47px; inset-inline-end: -16px; width: 16px;
    border-top: 2px dashed color-mix(in srgb, var(--pine) 30%, transparent);
  }
}

/* ============================================================
   ติดต่อ + ทีมขาย
   ============================================================ */


/* ============================================================
   ฟอร์มข้อมูลผู้ติดต่อในใบขอราคา
   ============================================================ */
.qform { margin-top: 30px; padding-top: 26px; border-top: 1px solid var(--line); }
.fgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 620px) { .fgrid { grid-template-columns: 1fr; } }

.f { display: flex; flex-direction: column; gap: 6px; }
.f > span { font-size: 14px; font-weight: 500; }
.f > span i { font-style: normal; color: #C0392B; }
.f input, .f textarea {
  font-family: var(--body); font-size: 15px; color: var(--ink);
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r);
  padding: 10px 13px; outline: none; width: 100%;
  transition: border-color .15s, box-shadow .15s;
}
.f textarea { resize: vertical; line-height: 1.6; }
.f input:focus, .f textarea:focus { border-color: var(--pine); box-shadow: 0 0 0 3px color-mix(in srgb, var(--pine) 16%, transparent); }
.f input.bad { border-color: #C0392B; background: color-mix(in srgb, #C0392B 6%, var(--surface)); }

.formerr {
  background: color-mix(in srgb, #C0392B 9%, var(--surface));
  border: 1px solid color-mix(in srgb, #C0392B 35%, transparent);
  color: #A5281C; border-radius: var(--r); padding: 11px 14px; font-size: 14px; margin-bottom: 14px;
}
:root[data-theme="dark"] .formerr,
:root:not([data-theme="light"]) .formerr { color: #F0968C; }
@media (prefers-color-scheme: light) { :root:not([data-theme="dark"]) .formerr { color: #A5281C; } }

.okmsg {
  margin-top: 16px; background: var(--pine-wash);
  border: 1px solid color-mix(in srgb, var(--pine) 34%, transparent);
  border-radius: var(--r); padding: 13px 16px; font-size: 14.5px; font-weight: 500;
}

/* ตั้งขอบกระดาษเอง -> Chrome/Edge จะไม่ใส่วันที่/ชื่อหน้า/URL ให้ */
@page { size: A4; margin: 0; }

/* หัวกระดาษ เห็นเฉพาะตอนสั่งพิมพ์ / บันทึก PDF */
.printhead { display: none; }
@media print {
  .printhead {
    display: flex; justify-content: space-between; align-items: flex-end; gap: 20px;
    padding: 0 0 12px; margin: 0 0 14px; border-bottom: 2px solid #111;
  }
  .printhead b { font-family: var(--display); font-size: 20px; display: block; }
  .printhead span { font-size: 12px; }
  .printhead .legal { display: block; font-size: 9.5px; color: #555; margin-top: 3px;
                      line-height: 1.5; max-width: 62ch; }
  .printhead .mono { text-align: end; }
  body { background: #fff !important; color: #000 !important; padding: 14mm 12mm; }
  main.wrap { padding: 0 !important; max-width: none !important; }
  .qform { border-top: 1px solid #ccc; }
  .f input, .f textarea { border: 0; padding: 2px 0; background: none; }
  .f > span { font-size: 11px; color: #555; }
  a[href]::after { content: none !important; }
}

/* ============================================================
   บล็อกติดต่อ + ทีมขาย (ไอคอนวงกลม)
   ============================================================ */
.contact { background: var(--surface); border-top: 1px solid var(--line); }
.contact-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: 14px; align-items: stretch; }
.ccard {
  background: var(--paper); border: 1px solid var(--line-soft); border-radius: var(--rl);
  padding: 20px 20px 22px; display: flex; flex-direction: column; gap: 12px;
}
.ccard h4 {
  font-family: var(--mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase;
  color: var(--muted); font-weight: 500; margin: 0;
}

.team-card { align-items: center; text-align: center; justify-content: center; }
.team-card h4 { align-self: flex-start; }

.person { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.person img, .person .avatar-ph {
  width: 168px; height: 168px; border-radius: 50%; object-fit: cover; flex: none;
  border: 3px solid var(--surface); box-shadow: 0 0 0 3px var(--pine), 0 6px 18px rgb(0 0 0 / .12);
}
.person .avatar-ph {
  display: grid; place-items: center; background: var(--pine-wash); color: var(--pine);
  font-family: var(--display); font-size: 46px; font-weight: 700;
}
.person .pmeta b { font-family: var(--display); font-size: 18px; display: block; line-height: 1.35; }
.person .pmeta span { color: var(--muted); font-size: 14px; }

@media (max-width: 520px) {
  .person img, .person .avatar-ph { width: 132px; height: 132px; }
}

.contact-btns { display: flex; gap: 9px; flex-wrap: wrap; }
.contact-btns .btn b { margin-inline-start: 3px; }

.hours { display: flex; flex-direction: column; gap: 3px; font-size: 14px; color: var(--muted); }

.addr { margin: 0; font-size: 14.5px; line-height: 1.7; display: flex; flex-direction: column; gap: 5px; }
.addr b { font-family: var(--display); font-weight: 600; font-size: 15.5px; }
.addr .taxid { font-size: 12.5px; color: var(--muted); margin-top: 3px; }

/* ที่อยู่บริษัทท้ายเว็บ */
footer.site .legal { font-size: 12.5px; color: var(--muted); line-height: 1.7; margin-top: 10px; }

/* ตอนพิมพ์: ไม่ต้องโชว์ข้อความตัวอย่างในช่องที่เว้นว่าง */
@media print {
  .f input::placeholder, .f textarea::placeholder { color: transparent !important; }
  .f input, .f textarea { min-height: 0; }

  /* บังคับ 2 คอลัมน์ตอนพิมพ์
     ตอนพิมพ์ Chrome คิดความกว้างจากขนาดกระดาษ บางเครื่องตกต่ำกว่า 620px
     แล้วไปเข้ากฎมือถือ ทำให้ข้อมูลผู้ติดต่อเรียงลงมาทีละบรรทัดยาวเหยียด */
  .fgrid { grid-template-columns: 1fr 1fr !important; gap: 7px 26px !important; }

  /* หัวข้อกับค่าอยู่บรรทัดเดียวกัน อ่านเหมือนเอกสาร ไม่ใช่ฟอร์มที่รอกรอก */
  .f { flex-direction: row !important; align-items: baseline; gap: 8px !important;
       border-bottom: 1px dotted #ccc; padding-bottom: 3px; }
  .f > span { flex: 0 0 34%; font-size: 11px !important; color: #555 !important; }
  .f > span i { display: none; }             /* ดอกจันบังคับกรอก ไม่ใช่เนื้อหาเอกสาร */
  .f input, .f textarea { flex: 1; text-align: start; font-weight: 600; }
  .f.wide { grid-column: 1 / -1; }
  .f.is-empty { display: none !important; }
  .f .thdate { flex: 1; font-weight: 600; }
  .qform h2 { font-size: 15px; }
  /* แถวสินค้า: บรรทัดต้องสูงเท่าๆ กัน ไม่งั้นอ่านแล้วสะดุด
     (ชื่อสินค้าเดิม 15.5px ขณะที่บรรทัดอื่น 11-12.5px กระโดดเกินไป) */
  .qrow { padding: 7px 0 !important; gap: 11px !important;
          grid-template-columns: 42px 1fr auto !important; align-items: start; }
  .qrow .ph { width: 42px !important; height: 42px !important; }
  .qrow .nm { font-size: 12.5px !important; line-height: 1.45; }
  .qrow .sku, .qrow .unit, .qrow .variant, .qrow .optline {
    font-size: 10.5px !important; line-height: 1.5 !important; margin: 0 !important;
  }
  .qrow .unit { color: #444 !important; }
  .qrow .optline { color: #555 !important; }
  .qrow .variant a { display: none; }          /* ลิงก์ "เปลี่ยนสี" ไม่ใช่เนื้อหาเอกสาร */
  .qrow .ctl { align-items: baseline; gap: 6px; }
  .qrow .linesum { font-size: 12.5px; font-weight: 600; }
  #okmsg, .okmsg { display: none !important; }
}

/* ---------------- ราคาและยอดรวมในใบขอราคา ---------------- */
.qrow .unit { font-family: var(--mono); font-size: 12.5px; color: var(--brass); margin-top: 3px; }
.qrow .linesum {
  font-family: var(--mono); font-size: 14px; font-weight: 500;
  min-width: 96px; text-align: right; font-variant-numeric: tabular-nums;
}
.qsum { margin-top: 18px; padding-top: 16px; border-top: 2px solid var(--line); }
.qsum .sumrow {
  display: flex; justify-content: space-between; align-items: baseline; gap: 16px;
  font-size: 16px; font-weight: 600;
}
.qsum .sumrow b { font-family: var(--mono); font-size: 21px; color: var(--brass); font-variant-numeric: tabular-nums; }
.qsum .sumnote { color: var(--muted); font-size: 13px; margin-top: 7px; line-height: 1.6; }
@media (max-width: 600px) { .qrow .linesum { min-width: 0; } }

/* ============================================================
   สินค้าพร้อมส่ง
   ============================================================ */
.tagpill {
  position: absolute; left: 8px; top: 8px;
  background: var(--pine); color: var(--paper);
  font-family: var(--body); font-size: 11px; font-weight: 600;
  padding: 3px 10px; border-radius: 100px; letter-spacing: .01em;
  box-shadow: 0 2px 8px rgb(0 0 0 / .18);
}

.readyband { position: relative; }
.readyband .head h2 { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.hot {
  background: var(--pine); color: var(--paper);
  font-family: var(--body); font-size: 12.5px; font-weight: 600;
  padding: 4px 12px; border-radius: 100px; letter-spacing: .02em;
}

.readyhead {
  padding: 54px 0 40px;
  background: var(--pine-wash);
  border-bottom: 1px solid var(--line);
}
.readyhead h1 { font-size: clamp(28px, 4.6vw, 42px); font-weight: 700; letter-spacing: -.015em; }
.readyhead .lede { color: var(--muted); font-size: 16.5px; margin: 14px 0 0; max-width: 54ch; }

.perks {
  list-style: none; margin: 28px 0 0; padding: 0;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(215px, 1fr)); gap: 12px;
}
.perks li {
  background: var(--surface); border: 1px solid var(--line-soft); border-radius: var(--rl);
  padding: 15px 17px; display: flex; flex-direction: column; gap: 3px;
}
.perks b { font-family: var(--display); font-size: 15.5px; }
.perks span { color: var(--muted); font-size: 13.5px; }


/* ---------------- ปุ่มเปลี่ยนภาษา ---------------- */
.langsw { display: inline-flex; gap: 2px; background: rgb(255 255 255 / .16); border-radius: 100px; padding: 2px; }
.langsw button {
  font-family: var(--body); font-size: 11.5px; font-weight: 600; letter-spacing: .02em;
  color: inherit; background: none; border: 0; cursor: pointer;
  padding: 3px 9px; border-radius: 100px; opacity: .78; line-height: 1.5;
  transition: background .15s, opacity .15s;
}
.langsw button:hover { opacity: 1; }
.langsw button.on { background: var(--paper); color: var(--pine); opacity: 1; }
@media (max-width: 700px) { .langsw button { padding: 3px 7px; font-size: 11px; } }
@media print { .langsw { display: none; } }

/* แบบ/สีที่ลูกค้าเลือกไว้ในใบขอราคา */
.qrow .variant {
  font-size: 12.5px; color: var(--muted); margin-top: 3px;
  display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap;
}
.qrow .variant a { color: var(--pine); text-decoration: none; font-size: 12px; }
.qrow .variant a:hover { text-decoration: underline; }

/* ---------------- แถบเลือกสีสินค้า ---------------- */
.vpick { margin-top: 18px; }
.vlabel { font-size: 14px; color: var(--muted); margin-bottom: 9px; }
.vlabel b { color: var(--ink); font-family: var(--display); font-weight: 600; font-size: 15px; }
.vrow { display: flex; gap: 9px; flex-wrap: wrap; }
.vsw {
  width: 58px; height: 58px; padding: 0; cursor: pointer; overflow: hidden;
  background: var(--tile); border: 2px solid var(--tile-line); border-radius: var(--rl);
  transition: border-color .15s, transform .15s;
}
.vsw:hover { transform: translateY(-2px); }
.vsw.on { border-color: var(--pine); box-shadow: 0 0 0 2px color-mix(in srgb, var(--pine) 26%, transparent); }
.vsw img { width: 100%; height: 100%; object-fit: contain; }


/* คิวอาร์ไลน์ในการ์ดช่องทางติดต่อ — ลูกค้าเปิดจากคอมแล้วสแกนด้วยมือถือได้ */
/* คิวอาร์ไลน์ในหน้าติดต่อ — ทำเป็นการ์ดเล็ก ๆ ไม่ใช่รูปลอย ๆ
   พื้นขาวรอบคิวอาร์จำเป็นจริง ๆ ไม่ใช่แค่ความสวย กล้องต้องมีพื้นสว่างตัดกับลายถึงจะจับติด */
.lineqr {
  margin: 16px 0 0; display: flex; align-items: center; gap: 14px;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--rl); padding: 12px 15px 12px 12px; width: fit-content;
}
.lineqr img {
  width: 96px; height: 96px; flex: none; background: #fff;
  border: 1px solid var(--line); border-radius: var(--r); padding: 5px;
}
.lineqr figcaption { font-size: 12.5px; color: var(--muted); line-height: 1.75; }
.lineqr figcaption b { display: block; font-size: 14px; color: var(--ink); font-weight: 500; margin-top: 3px; }

/* จอแคบ: คิวอาร์ไม่มีประโยชน์เท่าไหร่ (สแกนจอตัวเองไม่ได้) แต่ยังมีคนส่งต่อให้เพื่อนสแกน
   เลยไม่ซ่อน แค่ย่อลงให้ไม่กินที่ปุ่มทักไลน์ซึ่งเป็นของที่ใช้จริงบนมือถือ */
@media (max-width: 560px) {
  .lineqr { gap: 12px; padding: 10px 12px; }
  .lineqr img { width: 78px; height: 78px; }
}

/* ---------------- หน้าส่งใบขอราคาสำเร็จ ---------------- */
.qdone {
  text-align: center; padding: 54px 24px 44px;
  background: var(--pine-wash);
  border: 1px solid color-mix(in srgb, var(--pine) 26%, transparent);
  border-radius: var(--rl); margin-top: 24px;
}
.qdone-tick {
  width: 62px; height: 62px; border-radius: 50%; margin: 0 auto 18px;
  background: var(--pine); color: var(--paper);
  display: grid; place-items: center; font-size: 32px; line-height: 1;
}
.qdone b { font-family: var(--display); font-size: clamp(20px, 3vw, 26px); display: block; }
.qdone-no { font-size: 14px; color: var(--muted); margin-top: 8px; }
.qdone-no span { color: var(--ink); font-weight: 500; }
.qdone p { color: var(--muted); max-width: 46ch; margin: 14px auto 0; }
.qdone-btns { display: flex; gap: 11px; justify-content: center; flex-wrap: wrap; margin-top: 24px; }
.qdone-undo {
  background: none; border: 0; cursor: pointer; margin-top: 18px;
  font-family: var(--body); font-size: 13.5px; color: var(--muted); text-decoration: underline;
}
.qdone-undo:hover { color: var(--ink); }

/* คำอธิบายใต้ช่องกรอก */
.f .fhint { font-style: normal; font-size: 12.5px; color: var(--muted); margin-top: -2px; }
@media print { .qdone-undo, .qdone-btns, .qpaste { display: none; } }

/* คำแนะนำหลังส่งใบ — ต่างกันตามเครื่องที่ลูกค้าใช้
   มือถือ: ไลน์เปิดให้แล้ว กดส่งเลย · คอม: ไลน์เปิดแชทไม่ได้ บอกให้สบายใจว่าใบถึงแล้ว */
/* ปุ่มคัดลอกลิงก์สินค้า — ทำเป็นตัวหนังสือ ไม่ใช่ปุ่มทึบ
   เพราะเป็นของ "เผื่อใช้" ไม่ควรแย่งสายตาไปจากปุ่มขอราคา */
.pdcopy {
  margin-top: 11px; width: 100%; padding: 9px 10px; font: inherit; font-size: 13.5px;
  color: var(--muted); background: none;
  /* เส้นขอบใช้สีผสมจากเขียวแบรนด์ ไม่ใช้ --line เฉย ๆ เพราะจาง
     จนมองไม่ออกว่าเป็นปุ่ม (ตรวจบนจอจริงแล้วเห็นเป็นข้อความลอย ๆ) */
  border: 1px dashed color-mix(in srgb, var(--pine) 28%, transparent);
  border-radius: var(--r); cursor: pointer; transition: .15s;
}
.pdcopy:hover { color: var(--pine); border-color: var(--pine); }
.pdcopy.ok { color: var(--pine); border-style: solid; border-color: var(--pine); background: var(--pine-wash); }

.asklinebtn { margin-top: 11px; width: 100%; justify-content: center; }

.qdone .qtip {
  margin: 18px auto 0 !important; max-width: 44ch; font-size: 14px; line-height: 1.65;
  color: var(--ink); background: var(--pine-wash); border-radius: var(--r); padding: 13px 16px;
  border: 1px solid color-mix(in srgb, var(--pine) 20%, transparent);
}
.qdone .qtip.pc { text-align: start; }
.qdone .qtip ul { margin: 9px 0 0; padding-inline-start: 19px; color: var(--muted); font-size: 13.5px; }
.qdone .qtip li + li { margin-top: 5px; }

/* กล่อง "ก๊อปข้อความไปวางในไลน์" — โผล่เฉพาะตอนไลน์ร้านเป็นไอดีส่วนตัว
   (ไลน์ OA แนบข้อความไปให้ได้เลย ไม่ต้องมีกล่องนี้) */
.qpaste {
  margin: 26px auto 0; max-width: 46ch; text-align: start;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r); padding: 16px 17px 17px;
}
.qpaste-h { font-size: 13px; color: var(--muted); margin: 0 0 11px !important; max-width: none !important; }
.qpaste-tx {
  font-family: var(--body); font-size: 13.5px; line-height: 1.65; color: var(--ink);
  white-space: pre-wrap; word-break: break-word; margin: 0 0 12px;
  background: var(--sunk); border-radius: var(--r); padding: 12px 13px;
  max-height: 190px; overflow: auto;
}
.qpaste-qr { margin: 15px 0 0; text-align: center; }
.qpaste-qr img {
  width: 180px; height: 180px; display: block; margin: 0 auto 8px;
  border: 1px solid var(--line); border-radius: var(--r); background: #fff;
}
.qpaste-qr figcaption { font-size: 12.5px; color: var(--muted); }
/* กันสไตล์ .qdone b (ตัวใหญ่หัวข้อ) เล็ดมาโดนไอดีไลน์ใต้คิวอาร์ */
.qpaste-qr figcaption b { font-family: var(--mono); font-size: 15px; font-weight: 500; color: var(--ink); display: block; margin-top: 2px; }


/* ตัวเลขบนปุ่มใบขอราคา — พอปุ่มเป็นสีหลักแล้ว ต้องกลับสีให้อ่านออก */
.btn-pine .qbadge { background: var(--paper); color: var(--pine); }
:root[data-palette="sun"] .btn-pine .qbadge { background: #171717; color: #FACC15; }


/* ---------------- ตัวเลือกสกรีนโลโก้ + แนบไฟล์ ---------------- */
.radiorow { display: flex; gap: 7px; flex-wrap: wrap; }
.rad {
  display: inline-flex; align-items: center; gap: 6px; cursor: pointer;
  white-space: nowrap;                 /* กันข้อความตกบรรทัดจนปุ่มบวม */
  border: 1px solid var(--line); border-radius: var(--r); padding: 7px 13px;
  background: var(--surface); font-size: 13.5px; line-height: 1.5;
  transition: border-color .15s, background .15s;
}
.rad input { margin: 0; accent-color: var(--pine); }
.rad:hover { border-color: var(--ink); }
.rad:has(input:checked) { border-color: var(--pine); background: var(--pine-wash); font-weight: 500; }

.logobox { background: var(--pine-wash); border: 1px solid color-mix(in srgb, var(--pine) 26%, transparent);
  border-radius: var(--r); padding: 14px 16px; }
.logorow { display: flex; gap: 11px; align-items: center; flex-wrap: wrap; margin: 4px 0 2px; }
.logoname { font-family: var(--mono); font-size: 12.5px; color: var(--ink); }
.logoclear { background: none; border: 0; cursor: pointer; color: var(--muted);
  font-family: var(--body); font-size: 13px; text-decoration: underline; }
.logoclear:hover { color: #C0392B; }

.f input[type="date"] { font-family: var(--body); }
.f input.bad { border-color: #C0392B; }
@media print { .radiorow, .logobox { break-inside: avoid; } }


/* ช่องสกรีนโลโก้ให้กว้างเต็มแถว ปุ่มจะได้ไม่ถูกบีบ */
.fgrid > .f.wide { grid-column: 1 / -1; }
.editnote {
  background: var(--pine-wash); border: 1px solid color-mix(in srgb, var(--pine) 30%, transparent);
  color: var(--ink); border-radius: var(--r); padding: 10px 14px; font-size: 13.5px; margin-bottom: 14px;
}


/* ---------------- ขั้นต่ำในใบขอราคา ---------------- */
.qrow .moqnote { font-family: var(--mono); font-size: 11.5px; color: var(--muted); margin-top: 3px; }
.qrow input[type=number].fixed {
  border-color: var(--pine);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--pine) 20%, transparent);
}
.moqmsg {
  margin-top: 12px; padding: 9px 14px; font-size: 13.5px;
  background: var(--pine-wash); color: var(--ink);
  border: 1px solid color-mix(in srgb, var(--pine) 30%, transparent);
  border-radius: var(--r);
}
@media print { .moqmsg { display: none !important; } }


/* ---------------- สถานะสต็อกในใบขอราคา ---------------- */
.qrow .stocknote {
  font-size: 12.5px; color: var(--pine); margin-top: 3px; line-height: 1.5;
}
.qrow .stocknote.over {
  color: #A5281C;
  background: color-mix(in srgb, #C0392B 8%, transparent);
  border-radius: 4px; padding: 3px 8px; display: inline-block;
}
:root[data-theme="dark"] .qrow .stocknote.over,
:root:not([data-theme="light"]) .qrow .stocknote.over { color: #F0968C; }
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) .qrow .stocknote.over { color: #A5281C; }
}


/* ---------------- เช็ควันที่ต้องการ vs เวลาผลิต ---------------- */
.datenote {
  font-size: 12.5px; line-height: 1.55; margin-top: 6px;
  padding: 7px 11px; border-radius: var(--r);
}
.datenote.ok    { background: var(--pine-wash); color: var(--pine);
                  border: 1px solid color-mix(in srgb, var(--pine) 26%, transparent); }
.datenote.tight { background: #FEF6E0; color: #6B4E10; border: 1px solid #E8CE86; }
.datenote.late  { background: #FDECEA; color: #A5281C; border: 1px solid #F0BDB6; font-weight: 500; }

:root[data-theme="dark"] .datenote.tight,
:root:not([data-theme="light"]) .datenote.tight { background: #2A2312; color: #E6CE93; border-color: #5C4A1C; }
:root[data-theme="dark"] .datenote.late,
:root:not([data-theme="light"]) .datenote.late { background: #2C1D1B; color: #F0968C; border-color: #6B2A22; }
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) .datenote.tight { background: #FEF6E0; color: #6B4E10; border-color: #E8CE86; }
  :root:not([data-theme="dark"]) .datenote.late { background: #FDECEA; color: #A5281C; border-color: #F0BDB6; }
}
@media print { .datenote { border: 0; padding: 0; background: none !important; } }

/* ---- หน้านโยบายความเป็นส่วนตัว ---- */
.pv h2 { font-family: var(--display); font-size: 19px; margin: 30px 0 8px; padding-top: 18px;
         border-top: 1px solid var(--line-soft); }
.pv h3 { font-size: 15px; margin: 20px 0 6px; }
.pv p, .pv li { font-size: 14.5px; line-height: 1.75; color: var(--ink); }
.pv ul { padding-inline-start: 20px; margin: 8px 0; }
.pv li { margin-bottom: 5px; }
.pv-ok { background: var(--tile); border: 1px solid var(--tile-line); border-inline-start: 3px solid var(--pine);
         border-radius: var(--r); padding: 12px 15px; }
.pvt { width: 100%; border-collapse: collapse; margin: 10px 0 4px; font-size: 14px; }
.pvt th { text-align: start; font-weight: 600; padding: 8px 12px 8px 0; vertical-align: top;
          width: 38%; border-bottom: 1px solid var(--line-soft); }
.pvt td { padding: 8px 0; color: var(--muted); border-bottom: 1px solid var(--line-soft); }
@media (max-width: 560px) {
  .pvt th, .pvt td { display: block; width: auto; border: 0; padding: 2px 0; }
  .pvt tr { display: block; padding: 9px 0; border-bottom: 1px solid var(--line-soft); }
}

.pdpa-note { color: var(--muted); font-size: 12.5px; line-height: 1.65; margin: 14px 0 0;
             max-width: 68ch; }
.pdpa-note a { color: var(--pine); text-decoration: underline; text-underline-offset: 2px; }

/* ช่องกรอกจำนวนในหน้าสินค้า */
.qtybox { display: inline-flex; align-items: center; gap: 8px;
          border: 1px solid var(--line); border-radius: 100px; padding: 6px 14px 6px 16px;
          background: var(--surface); }
.qtybox > span { font-size: 13.5px; color: var(--muted); }
.qtybox > b { font-size: 13px; color: var(--muted); font-weight: 500; }
.qtybox .qty-in { width: 5.5ch; border: 0; background: none; color: var(--ink);
                  font-family: var(--mono); font-size: 16px; font-weight: 600; text-align: end;
                  padding: 4px 0; }
.qtybox .qty-in:focus { outline: none; }
.qty-note { color: #C0392B; font-size: 13px; margin: 10px 0 0; min-height: 1em; }

.thdate { font-family: var(--mono); font-size: 12px; color: var(--pine); display: block; margin-top: 4px; }

/* ============================================================
   ใบขอราคาตอนพิมพ์/บันทึก PDF — ให้อ่านเหมือนเอกสาร ไม่ใช่ฟอร์ม
   ============================================================ */
@media print {
  /* ทุกช่องกรอกกลายเป็นข้อความธรรมดา ไม่มีกรอบ ไม่มีพื้น */
  .qform input, .qform textarea, .qform select,
  .qrow .ctl input {
    border: 0 !important; background: none !important; box-shadow: none !important;
    padding: 0 !important; color: #000 !important; -webkit-appearance: none; appearance: none;
  }
  /* ไอคอนปฏิทินของช่องวันที่ ไม่ต้องติดไปในกระดาษ */
  input[type="date"]::-webkit-calendar-picker-indicator { display: none !important; }
  .qrow .ctl input { width: auto !important; min-width: 0; text-align: end; font-weight: 700; }
  .qform textarea { resize: none; height: auto; min-height: 0; overflow: visible; }

  /* ตัวเลือกสกรีนโลโก้ — โชว์เฉพาะข้อที่ลูกค้าเลือก */
  .radiorow label:not(:has(input:checked)) { display: none !important; }
  .radiorow input[type="radio"] { display: none !important; }
  .radiorow label { border: 0 !important; padding: 0 !important; background: none !important; }

  /* กันข้อมูลผู้ติดต่อถูกดันข้ามหน้าแบบครึ่งๆ กลางๆ */
  .qform, .fgrid, .f { break-inside: avoid; }
  .qform { page-break-inside: avoid; }

  /* บีบระยะให้กระชับ ใส่ได้หลายรายการต่อหน้า */
  .qrow { padding: 8px 0 !important; }
  .qrow .ph { width: 46px !important; height: 46px !important; }
  .qsum { margin: 10px 0 !important; padding: 10px 0 !important; }
  .fgrid { gap: 8px 22px !important; }
  .f { margin: 0 !important; }
  .f > span { font-size: 10px !important; color: #666 !important; margin-bottom: 1px !important; }
  .f input, .f textarea { font-size: 12.5px !important; }

  /* ข้อความช่วยเหลือระหว่างกรอก ไม่ใช่เนื้อหาเอกสาร */
  .fhint, .datenote, .moqmsg, .stocknote, .moqnote { display: none !important; }

  /* ช่องวันที่ของเบราว์เซอร์พิมพ์ออกมาเป็นรูปแบบตามภาษาเครื่อง (เช่น 09/19/2026)
     ตอนพิมพ์จึงซ่อนช่องนั้น แล้วใช้วันที่แบบ วัน/เดือน/ปี พ.ศ. ที่เราเขียนไว้แทน */
  #c-needby { display: none !important; }
  .thdate { display: block !important; font-size: 12.5px !important; font-weight: 400 !important;
            color: #000 !important; padding: 2px 0 !important; }
}

/* แถบภาพคั่นระหว่างส่วนบนหน้าแรก — ไม่ครอปรูป ใช้สัดส่วนตามไฟล์ที่ใส่มา */
.bandslot { display: none; }
.bandslot.on { display: block; padding: 6px 0 34px; }
.bandbox { position: relative; }
.bandslot img { width: 100%; height: auto; border-radius: var(--rl); display: block; }
/* หลายใบซ้อนกัน สลับด้วยความโปร่งใส — ใบแรกเป็นตัวกำหนดความสูงของกล่อง */
.bandbox img:not(:first-child) { position: absolute; inset: 0; height: 100%; object-fit: cover; }
.bandbox img { opacity: 0; transition: opacity .5s ease; }
.bandbox img.on { opacity: 1; }
.banddots { position: absolute; left: 0; right: 0; bottom: 12px; display: flex; gap: 6px; justify-content: center; }
.banddots button { width: 7px; height: 7px; padding: 0; border: 0; border-radius: 100px; cursor: pointer;
                   background: rgb(255 255 255 / .55); transition: width .2s; }
.banddots button.on { width: 20px; background: #fff; }
@media (prefers-reduced-motion: reduce) { .bandbox img { transition: none; } }
@media (max-width: 860px) { .bandslot.on { padding: 2px 0 24px; } }

/* ปุ่มเลือกสีที่ยังไม่มีรูปสินค้า — โชว์เป็นสีทึบจากค่าสีที่แยกมาจากรูปจริง
   (สินค้าหนึ่งตัวมีได้ถึง 14 สี แต่รูปถ่ายมีไม่ครบทุกสี) */
.vsw.flat { background: var(--c); box-shadow: inset 0 0 0 1px rgb(0 0 0 / .14); }
.vsw.flat.on { box-shadow: inset 0 0 0 1px rgb(0 0 0 / .14),
                           0 0 0 2px color-mix(in srgb, var(--pine) 26%, transparent); }

/* กล่องเลือกฟังก์ชั่นเสริม (สกรีน/เลเซอร์/UV) ในหน้าสินค้า
   ชื่อคลาสต้องไม่ใช่ .logobox เพราะชื่อนั้นใช้กับกล่องอัปโหลดไฟล์โลโก้ในหน้าใบขอราคาอยู่แล้ว */
.logopick { margin-top: 18px; padding: 14px 16px; border: 1px solid var(--line);
            border-radius: var(--rl); }
.logopick .lhead { font-weight: 600; font-size: 14px; margin-bottom: 8px; }
.logopick .lhead span { display: block; font-weight: 400; font-size: 12.5px;
                        color: var(--muted); margin-top: 2px; }
.logopick .lgrp { border-top: 1px solid var(--line); padding: 9px 0 6px; }
.logopick .lgrp:first-of-type { border-top: 0; padding-top: 2px; }
.logopick .gname { font-size: 12px; font-weight: 600; letter-spacing: .04em;
                   color: var(--muted); text-transform: uppercase; margin-bottom: 3px; }
.logopick .lopt { display: flex; align-items: center; gap: 10px; padding: 5px 0;
                  cursor: pointer; font-size: 14px; }
/* กลุ่มที่ติ๊กให้ตายตัว = ได้ฟรี ทำสีเขียวให้เห็นชัดว่าไม่ต้องจ่ายเพิ่ม */
.logopick .lgrp.free { background: var(--pine-wash); border-radius: 10px;
                       padding: 9px 11px; margin-top: 6px; border-top: 0; }
.logopick .lgrp.free .gname, .logopick .lgrp.free .lp { color: var(--pine); }
.logopick .lopt.fixed { cursor: default; }
.logopick .lopt.fixed input[disabled] { accent-color: var(--pine); opacity: 1; }
.logopick .lopt input { width: 17px; height: 17px; accent-color: var(--pine);
                        cursor: pointer; flex: none; }
.logopick .ln { flex: 1; }
.logopick .lp { font-family: var(--mono); font-size: 13px; color: var(--muted); white-space: nowrap; }
.logopick .lsum:not(:empty) { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line);
                              font-size: 14px; color: var(--muted); }
.logopick .lsum b { font-family: var(--mono); font-size: 17px; color: var(--brass); }
@media print { .logopick { break-inside: avoid; } }

/* บรรทัดบอกเทคนิคตกแต่งโลโก้ในแถวใบขอราคา */
.qrow .optline { font-size: 12.5px; color: var(--muted); margin-top: 3px; }
.qrow .optline b { color: var(--ink); font-weight: 600; }

/* ป้าย "ไม่บังคับ" ข้างหัวข้อแนบไฟล์โลโก้ — กันลูกค้าเข้าใจว่าไม่แนบแล้วส่งไม่ได้ */
.logobox .optional { font-style: normal; font-size: 11px; font-weight: 400;
                     color: var(--muted); border: 1px solid var(--line);
                     border-radius: 100px; padding: 1px 8px; margin-inline-start: 6px; }

/* ข้อความช่วยเหลือในกล่องตกแต่ง — ใช้แดงของโปรเจค ไม่ใช่แดงสด
   เพราะแดงสดอ่านแล้วเหมือนแจ้งข้อผิดพลาด ทั้งที่เป็นข้อความชวนให้สบายใจ */
.logopick .lask { display: block; font-weight: 400; font-size: 12.5px; line-height: 1.55;
                  color: #C0392B; margin-top: 6px; }
:root:not([data-theme="light"]) .logopick .lask { color: #FF8A7A; }
@media (prefers-color-scheme: dark) { .logopick .lask { color: #FF8A7A; } }
:root[data-theme="light"] .logopick .lask { color: #C0392B; }

/* ข้อความบอกว่าสินค้ารุ่นนี้ทำลายรอบตัวไม่ได้ (มีหูจับขวางเส้นรอบวง) */
.logopick .lno { display: block; font-weight: 400; font-size: 12.5px; line-height: 1.55;
                 color: var(--muted); margin-top: 4px; }

/* ============================================================
   แบนเนอร์ใหญ่เต็มจอหลังเมนู (Head Theme)
   มีรูปเมื่อไหร่ body จะได้คลาส .has-headhero · ไม่มีรูปก็ไม่มีอะไรเปลี่ยน
   ============================================================ */
.headhero {
  position: relative;
  width: 100vw;                      /* เต็มซ้ายขวาจริง ไม่ติด max-width ของ .wrap */
  margin-inline-start: calc(50% - 50vw);
  height: clamp(210px, 33.33vw, 620px);
  overflow: hidden;
  background: var(--tile);
}
.headhero .hhwrap { position: absolute; inset: 0; }
.headhero img {
  position: absolute; inset: 0;
  width: 100%; height: 100%; object-fit: cover;
  opacity: 0; transition: opacity .7s ease;
}
.headhero img.on { opacity: 1; }


.headhero .hharrow {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 3;
  width: 44px; height: 44px; border-radius: 50%; cursor: pointer;
  border: 0; background: rgb(0 0 0 / .28); color: #fff;
  box-shadow: 0 2px 10px rgb(0 0 0 / .18);
  font-size: 26px; line-height: 1; display: grid; place-items: center;
  backdrop-filter: blur(4px); transition: background .15s;
}
.headhero .hharrow:hover { background: rgb(0 0 0 / .45); }
.headhero .hharrow.prev { inset-inline-start: 18px; }
.headhero .hharrow.next { inset-inline-end: 18px; }

.headhero .hhdots {
  position: absolute; inset-inline: 0; bottom: 18px; z-index: 3;
  display: flex; gap: 7px; justify-content: center; align-items: center;
}
/* รูปแบนเนอร์มีข้อความของตัวเองเต็มใบ จุดลอยเปล่าๆ จะไปทับจนอ่านยาก
   ใส่แถบมนสีเข้มรองไว้ ให้ดูเป็นของที่ตั้งใจวาง ไม่ใช่จุดหลงมา */
.headhero .hhdots::before {
  content: ''; position: absolute; top: -7px; bottom: -7px;
  left: 50%; transform: translateX(-50%);
  width: calc(100% + 0px);        /* จะถูกจำกัดด้วย .hhdots ที่กว้างเท่ากลุ่มจุด */
  background: rgb(0 0 0 / .3); border-radius: 100px; backdrop-filter: blur(3px);
}
/* ตัวกลุ่มจุดต้องกว้างเท่าจุดจริง ไม่ใช่เต็มแถว แถบรองถึงจะหุ้มพอดี */
.headhero .hhdots { inset-inline: auto; left: 50%; transform: translateX(-50%);
                    padding-inline: 12px; width: max-content; }
.headhero .hhdots button { position: relative; z-index: 1; }
.headhero .hhdots button {
  width: 9px; height: 9px; padding: 0; border: 0; border-radius: 100px; cursor: pointer;
  background: rgb(255 255 255 / .55); transition: width .2s;
  /* รูปแบนเนอร์บางใบพื้นสว่างมาก จุดขาวล้วนจะจมหายไป ต้องมีขอบเข้มรอบจุด */
  box-shadow: 0 0 0 1px rgb(0 0 0 / .28), 0 1px 4px rgb(0 0 0 / .25);
}
.headhero .hhdots button.on { width: 26px; background: #fff; }

/* หมายเหตุ: ไม่ให้เมนูลอยทับรูป เพราะรูปที่ทำมามีโลโก้กับหัวเรื่องอยู่มุมซ้ายบนแล้ว
   ถ้าวันหลังทำรูปที่เว้นที่ว่างด้านบนไว้ ค่อยเปิดโหมดทับ (ดันด้วย margin-top ติดลบ
   + ทำเมนูโปร่งใส + ตัวหนังสือขาว + ใส่ฟิล์มไล่เฉดกันอ่านไม่ออก) */

/* แบนเนอร์กินพื้นที่ด้านบนไปแล้ว หัวเรื่องข้างล่างไม่ต้องเว้นห่างเท่าเดิม */
body.has-headhero .hero { padding-top: 48px; }

@media (max-width: 860px) {
  .headhero { height: min(46vh, 330px); }
  .headhero .hharrow { width: 36px; height: 36px; font-size: 21px; }
  .headhero .hharrow.prev { inset-inline-start: 8px; }
  .headhero .hharrow.next { inset-inline-end: 8px; }

  /* ไม่มีรูปเฉพาะมือถือ = ใช้รูปแนวนอนเดิม ต้องยึดขอบซ้ายไว้
     เพราะข้อความกับโลโก้อยู่ซ้ายมือ ถ้าครอปจากกลางจะหายหมด */
  body:not(.head-mobile-art) .headhero img { object-position: left center; }
}

/* มีรูปที่ทำมาสำหรับมือถือโดยเฉพาะ = โชว์ทั้งใบ ไม่ต้องครอป */
@media (max-width: 700px) {
  body.head-mobile-art .headhero { height: auto; aspect-ratio: 4 / 5; }
  body.head-mobile-art .headhero img { object-fit: cover; object-position: center; }
}
@media (prefers-reduced-motion: reduce) { .headhero img { transition: none; } }

/* แถบบอกว่ากำลัง "เปลี่ยนแบบ" ของรายการที่อยู่ในใบขอราคาแล้ว
   ต้องเห็นชัดพอที่ลูกค้าจะรู้ว่าไม่ได้กำลังสั่งเพิ่ม แต่ไม่ตะโกนจนกลบตัวสินค้า
   ใช้เส้นขอบ + พื้นจางๆ ที่คุมค่าคอนทราสต์ได้ทั้งธีมสว่างและธีมมืด */
.fromnote {
  margin: 0 0 14px;
  padding: 9px 13px;
  border: 1px solid var(--pine);
  border-inline-start-width: 3px;
  border-radius: 8px;
  color: var(--ink);
  background: color-mix(in srgb, var(--pine) 8%, transparent);
  font-size: 13.5px;
  line-height: 1.5;
}

/* ช่องเลือกสีในหน้าต่างตั้งตัวเลือกสี (หลังบ้าน)
   วางคู่กับจำนวนรูป เพราะสองอย่างนี้คือ "สถานะ" ของสีนั้น */
.vcount { display: flex; align-items: center; gap: 10px; justify-content: space-between; }
.vhex { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.vhex input[type="color"] {
  inline-size: 30px; block-size: 22px; padding: 0; cursor: pointer;
  border: 1px solid var(--line); border-radius: 5px; background: none;
}
.vhex span { font-size: 11.5px; color: var(--muted); }

/* ============================================================
   แถบเครื่องมือมุมขวาบน — สลับโหมดสว่าง/มืด + ความเป็นส่วนตัว
   30/09/2569 ย้ายมาจาก themes.css ตอนเลิกใช้ระบบเลือกโทนสี
   ⚠️ ถ้าไม่มีส่วนนี้ กล่องป๊อปอัปจะกางค้างทับหน้าเว็บ (เคยพลาดมาแล้ว)
   (เดิมเป็นแถบลอยมุมขวาล่าง ย้ายขึ้นมาเพื่อไม่ให้บังเนื้อหาบนมือถือ)
   ============================================================ */
.hdr-tools { display: flex; align-items: center; gap: 4px; margin-inline-start: auto; }
header.site .wrap .qlink { margin-inline-start: 8px; }

.qico { display: none; flex: none; }
@media (max-width: 520px) { .qico { display: inline-block; } }

.tool { position: relative; }
.tool-btn {
  display: inline-grid; place-items: center;
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--sunk); color: var(--ink);
  border: 1px solid var(--line); cursor: pointer; padding: 0;
  transition: border-color .18s, background .18s;
}

/* ---- อยู่บนแถบบนสุด ต่อท้ายปุ่มภาษา (30/09/2569) ----
   แถบบนเตี้ยและพื้นเป็นสีแบรนด์ ปุ่มกลมเทา ๆ แบบในหัวเว็บใส่ตรงนี้ไม่ได้
   เลยทำให้เป็นไอคอนเปล่า ๆ กลืนไปกับแถบ และย่อขนาดลงให้แถบไม่สูงขึ้น
   ⚠️ `white-space: nowrap` สำคัญ ไม่งั้นพอที่ไม่พอ ไอคอนจะตกลงมาเรียงแนวตั้ง (อาการที่ user เจอ) */
.tb-right .hdr-tools { gap: 2px; margin-inline-start: 0; white-space: nowrap; }
.tb-right .tool-btn {
  width: 26px; height: 26px; background: transparent;
  border-color: transparent; color: inherit; opacity: .8;
}
.tb-right .tool-btn:hover,
.tb-right .tool.open .tool-btn { opacity: 1; background: rgb(255 255 255 / .16); border-color: transparent; }
.tb-right .tool-btn svg { width: 15px; height: 15px; }
/* กล่องที่กางออกมาใช้สีของเนื้อหา ไม่ใช่สีแถบบน ไม่งั้นตัวหนังสือในกล่องจะเพี้ยนตามแถบ */
.tb-right .tool-pop { color: var(--ink); }
.tool-btn:hover { border-color: var(--pine); }
.tool.open .tool-btn { border-color: var(--pine); background: var(--surface); }

.tool-pop {
  position: absolute; inset-inline-end: 0; top: calc(100% + 9px); z-index: 120;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r);
  box-shadow: 0 14px 38px rgb(0 0 0 / .18);
  padding: 13px 15px; width: max-content; max-width: min(300px, calc(100vw - 24px));
  display: none;
}
.tool.open .tool-pop { display: block; }
.tool-pop.pop-wide { max-width: min(330px, calc(100vw - 24px)); }

.pop-title { font-family: var(--display); font-size: 14px; display: block; margin-bottom: 9px; }
.pop-mode {
  width: 100%; border-radius: 100px; padding: 7px 12px; cursor: pointer;
  font-family: var(--body); font-size: 12.5px;
  background: var(--sunk); color: var(--ink); border: 1px solid var(--line);
}
.pop-mode:hover { border-color: var(--ink); }

.pop-lead { font-size: 13px; line-height: 1.6; margin: 0 0 10px; color: var(--ink); }
.pop-sub { font-size: 12px; line-height: 1.6; margin: 10px 0 6px; color: var(--muted); }
.pop-list { list-style: none; padding: 0; margin: 0; }
.pop-list li {
  display: flex; justify-content: space-between; gap: 12px;
  font-size: 12px; padding: 5px 0; border-bottom: 1px solid var(--line-soft);
}
.pop-list li span { color: var(--muted); text-align: end; flex: none; max-width: 55%; }
.pop-act { display: flex; align-items: center; gap: 12px; margin-top: 12px; flex-wrap: wrap; }
.pop-clear {
  border-radius: 100px; padding: 7px 14px; cursor: pointer;
  font-family: var(--body); font-size: 12.5px;
  background: var(--sunk); color: var(--ink); border: 1px solid var(--line);
}
.pop-clear:hover { border-color: #C0392B; color: #C0392B; }
.pop-act a { font-size: 12.5px; color: var(--pine); }

@media (max-width: 520px) {
  .tool-btn { width: 33px; height: 33px; }
  .hdr-tools { gap: 3px; }
  /* จอแคบใส่ทุกอย่างในแถวเดียวไม่พอ — ย่อชื่อแบรนด์ลงก่อน เพราะปุ่มอื่นตัดไม่ได้
     (เดิมหัวเว็บล้นขอบอยู่แล้ว 417px บนจอ 375px ตั้งแต่ก่อนย้ายปุ่มขึ้นมา) */
  /* ระยะห่างเดิม (padding 22 + gap 22 ×4) กินไป 132px จาก 375 — บีบเฉพาะหัวเว็บ
     ไม่แตะ .wrap ของส่วนอื่น เพราะจะทำให้ทั้งหน้าชิดขอบเกินไป */
  header.site .wrap { padding-inline: 14px; gap: 11px; }
  header.site .brand span span { display: none; }        /* ซ่อนคำโปรย เหลือชื่อร้าน */
  header.site .brand b { font-size: 15px; }
  /* เหลือไอคอน + ตัวเลข ตัดข้อความออก ประหยัดได้ ~70px */
  header.site .wrap .qlink { padding-inline: 12px; margin-inline-start: 4px; gap: 5px; }
  header.site .wrap .qlink [data-i18n] { display: none; }
  /* บนจอแคบ ให้กล่องกางจากขอบจอ ไม่ยื่นออกนอกหน้า */
  .tool-pop { position: fixed; inset-inline: 12px; inset-inline-end: 12px; width: auto; max-width: none; top: auto; }
}

@media (prefers-reduced-motion: reduce) {
  .tool-pop { transition: none; }
}
@media print { .hdr-tools { display: none; } }
