/* ══════════════════════════════════════════════════════════════════════
   scpgroupthailand.com — ชั้นปรับระบบดีไซน์ทั้งเว็บ · 14 พ.ย. 2026

   ที่มา: ถอดรูปแบบร่วมจากเว็บรางวัล Site of the Day (Bürocratik, Widelab)
          + ตรวจวัด 11 เทมเพลตของเว็บเราเอง พบว่าแต่ละหน้าใช้คนละระบบ
          รายละเอียดการวัดอยู่ใน knowledge/design-reference-method.md

   หลักการ: ไม่ไล่แก้ทีละหน้า แต่แก้ที่ชั้นระบบดีไซน์ ให้ทุกหน้ารับไปเอง
   โหลดต่อท้าย CSS เดิมทั้งหมด ไม่แก้ไฟล์เดิมสักไฟล์
   ══════════════════════════════════════════════════════════════════════ */

:root{
  /* ชุดมุมโค้ง เดิมทั้งเว็บใช้ 4–11 ค่าต่อหน้า เว็บรางวัลใช้ 2–4 */
  --ds-r-sm:3px;
  --ds-r:8px;
  --ds-r-lg:18px;
  --ds-r-pill:999px;

  /* จังหวะการเคลื่อนไหวชุดเดียวทั้งเว็บ */
  --ds-ease:cubic-bezier(.22,.61,.36,1);
  --ds-fast:.26s;
  --ds-slow:.6s;
  --ds-lift:-2px;
}

/* ── 1. ระบบตัวอักษรชุดเดียวทั้งเว็บ ────────────────────────────────
   ก่อนหน้านี้ h1 มีตั้งแต่ w600 ถึง w700 · ระยะบรรทัด 0.78 ถึง 1.18
   · ระยะตัวอักษร 0 ถึง −1.8px แล้วแต่หน้า ทำให้เว็บดูเหมือนคนละเว็บ
   เว็บรางวัลใช้ดิสเพลย์น้ำหนักเดียวและระยะตัวอักษรติดลบเสมอ        */
.ui26 h1,.ui26 .h1{
  font-weight:600;
  line-height:1.03;
  letter-spacing:-.03em;
}
.ui26 h2,.ui26 .h2{
  font-weight:600;
  line-height:1.12;
  letter-spacing:-.025em;
}
.ui26 h3{
  font-weight:600;
  line-height:1.22;
  letter-spacing:-.015em;
}
/* พาดหัวที่ใหญ่มากต้องแน่นขึ้นอีก ไม่งั้นบรรทัดลอยห่างกัน */
@media(min-width:900px){
  .ui26 h1,.ui26 .h1{line-height:1.0}
}

/* ── 2. การเคลื่อนไหว ใช้ translate เผยตัว ปล่อย transform ให้ hover ──
   เดิมบางหน้ามี transform 33 ชิ้น บางหน้ามี 0 ชิ้น ทั้งที่เป็นเว็บเดียวกัน */
@supports (animation-timeline:view()){
  @media (prefers-reduced-motion:no-preference){
    @keyframes ds-rise{from{opacity:0;translate:0 18px}to{opacity:1;translate:0 0}}

    .ui26 .np-model,.ui26 .np-line,.ui26 .np-tint,.ui26 .np-pcard,
    .ui26 a.np-shop,.ui26 details.np-faq,.ui26 .np-yt,.ui26 .np-region,
    .ui26 .pp-card,.ui26 .pp-item,.ui26 .sc-card,
    .ui26 .ar-card,.ui26 .ar-item,
    .ui26 .lc-card,.ui26 .lc-item{
      animation:ds-rise linear both;
      animation-timeline:view();
      animation-range:entry 0% entry 40%;
    }
  }
}

/* ── 3. สถานะชี้เมาส์ขยับจริง ไม่ใช่เปลี่ยนสีอย่างเดียว ─────────────── */
@media (prefers-reduced-motion:no-preference){
  .ui26 .np-line,.ui26 .np-pcard,.ui26 a.np-shop,
  .ui26 .pp-card,.ui26 .pp-item,.ui26 .sc-card,
  .ui26 .ar-card,.ui26 .ar-item,
  .ui26 .lc-card,.ui26 .lc-item,
  .ui26 .np-btn-solid,.ui26 .np-btn-ghost{
    transition:transform var(--ds-fast) var(--ds-ease),
               border-color var(--ds-fast) ease,
               background-color var(--ds-fast) ease,
               box-shadow var(--ds-fast) ease;
  }
  .ui26 .np-line:hover,.ui26 .np-line:focus-visible,
  .ui26 .np-pcard:hover,
  .ui26 a.np-shop:hover,.ui26 a.np-shop:focus-visible,
  .ui26 .pp-card:hover,.ui26 .pp-item:hover,.ui26 .sc-card:hover,
  .ui26 .ar-card:hover,.ui26 .ar-item:hover,
  .ui26 .lc-card:hover,.ui26 .lc-item:hover,
  .ui26 .np-btn-solid:hover,.ui26 .np-btn-ghost:hover{
    transform:translateY(var(--ds-lift));
  }

  /* ลูกศรเลื่อนตามทิศที่มันพาไป */
  .ui26 .go,.ui26 .np-line .go{transition:transform var(--ds-fast) var(--ds-ease)}
  .ui26 .np-line:hover .go,.ui26 a.np-shop:hover .go,
  .ui26 .pp-card:hover .go,.ui26 .ar-card:hover .go{transform:translateX(4px)}
}

/* ── 4. โฟกัสที่มองเห็นได้ ใช้สีแบรนด์ของแต่ละหน้า ───────────────────
   เดิมหลายหน้าใช้โฟกัสเริ่มต้นของเบราว์เซอร์ซึ่งบนพื้นดำแทบมองไม่เห็น */
.ui26 a:focus-visible,.ui26 button:focus-visible,
.ui26 summary:focus-visible,.ui26 [tabindex]:focus-visible{
  outline:2px solid var(--ds-brand,currentColor);
  outline-offset:3px;
  border-radius:var(--ds-r-sm);
}

/* ── 5. ปิดการเคลื่อนไหวทั้งชุดเมื่อผู้ใช้ตั้งค่าไว้ ──────────────────── */
@media (prefers-reduced-motion:reduce){
  .ui26 *{
    animation:none!important;
    transition:none!important;
    transform:none!important;
  }
  .ui26 html{scroll-behavior:auto}
}

/* ── 6. ช่องว่างระหว่างแถบ ───────────────────────────────────────────
   เดิมทุกแถบตั้ง padding บน 96px ล่าง 96px เท่ากันหมด พอวางต่อกัน
   ช่องว่างระหว่างแถบจึงเป็น 192px ซึ่งมากเกินจนเนื้อหาดูขาดจากกัน
   แก้โดยไม่ซ้อน padding สองชั้น: แถบที่ตามหลังแถบอื่นลดด้านบนลง
   แถบที่มีพื้นหลังของตัวเอง (แถบปิดท้าย) คงระยะเดิมไว้ ไม่งั้นสีจะบีบ  */
.ui26 section{padding-block-end:clamp(38px,4.4vw,64px)}
.ui26 section + section{padding-block-start:clamp(26px,3.2vw,44px)}

/* แถบที่มีพื้นหลังทึบต้องมีระยะหายใจของตัวเอง */
.ui26 section[class*="cta"],
.ui26 section[id="contact"],
.ui26 section[class*="band"]{
  padding-block-start:clamp(44px,5vw,78px);
  padding-block-end:clamp(44px,5vw,78px);
}

/* แถบแรกใต้ฮีโร่ไม่ต้องบีบ ให้หายใจตามเดิม */
.ui26 .np-hero + section,
.ui26 header + section{padding-block-start:clamp(36px,4.2vw,60px)}

/* แถบที่วางตรงใน <main> ใช้กฎที่เจาะจงกว่า เพราะกฎเดิมของหน้าสินค้า
   เขียนไว้แน่นกว่า .ui26 section จึงยังชนะอยู่ */
body.ui26 main > section{padding-block-end:clamp(38px,4.4vw,64px)}
body.ui26 main > section + section{padding-block-start:clamp(26px,3.2vw,44px)}
body.ui26 main > section#contact,
body.ui26 main > section[class*="cta"]{
  padding-block-start:clamp(44px,5vw,78px);
  padding-block-end:clamp(44px,5vw,78px);
}

/* ── 7. ต้นตอของช่องว่างที่มากเกิน ─────────────────────────────────
   tokens.css ตั้ง --sec-y:96px แล้วบังคับด้วย !important กับ id ของแถบ
   (#what-is-ppf #types #ironseal #warranty #partner-finder ...)
   จะไปสู้ด้วยกฎใหม่ไม่ได้เพราะเป็น id + !important
   ทางที่สะอาดกว่าคือ **แก้ที่โทเคน** ปล่อยกฎเดิมไว้ทั้งหมด
   96 บน + 96 ล่าง = ช่องว่างระหว่างแถบ 192px ลดเหลือราว 110px        */
:root{--sec-y:clamp(44px,5.2vw,68px)}
@media (max-width:640px){:root{--sec-y:38px}}

/* ── 8. สีแบรนด์ระดับหน้า ────────────────────────────────────────────
   เว็บมีโทเคน --brand อยู่แล้ว แต่ประกาศไว้เฉพาะในรายการแบรนด์ของหน้า
   partner-program เท่านั้น ไม่ใช่โทเคนระดับหน้า เวลาอยู่หน้า Iron Seal
   หรือ Glanzend จึงไม่มีสีแบรนด์ให้ component กลางหยิบไปใช้

   ตรงนี้ประกาศให้ครบทุกแบรนด์ โดยอ่านค่าจากสีที่หน้านั้นใช้จริง
   (นับจำนวนครั้งที่ปรากฏบน production 17 พ.ย. 2026)

     หน้าแรก / กลุ่ม  ทอง   #C9A24B  95 จุด   อ่อน #E8CC7A  15 จุด
     Glanzend        ทอง   #C9A24B  57 จุด   อ่อน #E8CC7A  27 จุด
     Iron Seal       ทองเหลือง #C99A3A 27 จุด อ่อน #E8CC7A
     SCP             แดง   #C0392F  10 จุด   อ่อน #D9594C   4 จุด

   ตัว "อ่อน" มีไว้ใช้กับตัวอักษรเล็กบนพื้นดำ ซึ่งเป็นกติกาที่เว็บจริง
   ใช้อยู่แล้ว เพราะสีฐานบนพื้น #07080A อ่านยาก                      */
.ui26{
  --ds-brand:#C9A24B;
  --ds-brand-soft:#E8CC7A;
  --ds-brand-rgb:201,162,75;
}
.ui26-brand-scp,.ui26 .ar-b-scp,.ui26-brand-scp-ppf{
  --ds-brand:#C53931;
  --ds-brand-soft:#D9594C;
  --ds-brand-rgb:197,57,49;
}
.ui26-brand-ironseal,.ui26-brand-iron-seal,.ui26 .ar-b-iron-seal{
  --ds-brand:#C99A3A;
  --ds-brand-soft:#E8CC7A;
  --ds-brand-rgb:201,154,58;
}
.ui26-brand-glanzend,.ui26 .ar-b-glanzend{
  --ds-brand:#C9A24B;
  --ds-brand-soft:#E8CC7A;
  --ds-brand-rgb:201,162,75;
}

/* ── 9. ให้ component กลางใช้สีแบรนด์ของหน้านั้นเอง ──────────────────
   เดิมกรอบโฟกัสใช้ currentColor ซึ่งบนพื้นดำแทบมองไม่เห็น            */
.ui26 a:focus-visible,.ui26 button:focus-visible,
.ui26 summary:focus-visible,.ui26 [tabindex]:focus-visible{
  outline:2px solid var(--ds-brand,currentColor);
  outline-offset:3px;
  border-radius:var(--ds-r-sm);
}

@media (prefers-reduced-motion:no-preference){
  /* ชี้เมาส์แล้วขอบเรืองเป็นสีแบรนด์ของหน้านั้น ไม่ใช่แดงของ SCP เสมอ */
  .ui26 .np-line:hover,.ui26 .np-pcard:hover,
  .ui26 a.np-shop:hover,.ui26 .pp-card:hover,
  .ui26 .sc-card:hover,.ui26 .ar-card:hover,.ui26 .lc-card:hover{
    border-color:rgba(var(--ds-brand-rgb),.45);
  }
}

/* ป้ายกำกับเล็ก ๆ เหนือหัวข้อ ใช้สีแบรนด์เฉดอ่อนให้อ่านออกบนพื้นดำ */
.ui26 .np-h,.ui26 .sec-kicker,.ui26 .eyebrow,.ui26 .kicker{
  color:var(--ds-brand-soft,inherit);
}

/* -- 10. ระยะใต้โลโก้ท้ายเว็บ --------------------------------------
   หลังเอาบรรทัด A PROTECTION BRAND OF ออก ย่อหน้าคำบรรยายขยับขึ้นไป
   ชิดโลโก้พอดี 0px เลยต้องคืนระยะหายใจให้
   เลือกเงื่อนไข a + p จึงมีผลเฉพาะหน้าที่เอาบรรทัดนั้นออกแล้ว
   หน้าที่ยังมีบรรทัดเดิมอยู่ (Glanzend / Iron Seal) ไม่ได้รับผล    */
.ui26 .ui26-brand-footer-intro > a + p{
  margin-top:var(--sp-lg);
}

/* == หัวเว็บบนมือถือ ทั้งเว็บ ==========================================
   วัดที่ 375px ก่อนแก้: แถบแบรนด์ด้านบนห่อเป็นหลายแถวเกือบทุกเทมเพลต
     หน้าแรก 90px 5 แถว · Iron Seal 64px 5 แถว · บทความ 108px 4 แถว
     ร้านตัวแทนรวม 64px 2 แถว · Glanzend 75px 3 แถว
   กินพื้นที่จอก่อนเห็นเนื้อหา และดูไม่เป็นระเบียบ

   แก้ให้เหลือแถวเดียว โดยไม่ลบลิงก์ใดทิ้ง แค่ย่อโลโก้ ซ่อนบรรทัดรอง
   ของชื่อกลุ่ม และเปิดให้เลื่อนแนวนอนเป็นทางออกสุดท้าย
   แต่ละเทมเพลตใช้คลาสคนละชุด จึงต้องไล่ให้ครบทุกแบบ                   */
@media (max-width:760px){
  .ui26 nav.u-13af59b,
  .ui26 nav.site-nav,
  .ui26 nav.ar-nav,
  .ui26 nav.ui26-nav,
  body.ui26 > nav{
    flex-wrap:nowrap !important;
    align-items:center;
    gap:8px;
    min-height:0;
    padding-left:var(--sp-sm);
    padding-right:var(--sp-sm);
  }

  /* กลุ่มโลโก้แบรนด์ ใช้ร่วมกันในหน้าแรก Glanzend Iron Seal และ SCP */
  .ui26 nav .u-447a079{min-width:0;flex:1 1 auto;gap:var(--sp-xs);overflow:hidden}
  .ui26 nav .u-447a079 > span{display:none}
  .ui26 nav .u-447a079 > a:first-child{flex:0 0 auto;font-size:13px}
  .ui26 nav .u-447a079 > a:first-child span + span{display:none}
  .ui26 nav .u-447a079 > div{gap:6px;min-width:0}
  .ui26 nav .u-447a079 img:not(.nbl){height:17px;width:auto;max-width:38px;object-fit:contain}

  /* หัวเว็บของหน้าบทความ
     ar-nav-r ใช้ display:contents ลูกจึงกลายเป็นสมาชิกแถวเดียวกับ ar-nav-l
     ถ้าให้ ar-nav-l ยืดได้ มันจะถูกบีบจนชื่อกลุ่มห่อเป็น 3 บรรทัด สูง 79px
     จึงต้องล็อกไม่ให้ยืด แล้วปล่อยให้แถวลิงก์เป็นตัวเลื่อนแทน */
  .ui26 nav.ar-nav{align-items:center}
  .ui26 nav.ar-nav .ar-nav-l{flex:0 0 auto;min-width:0;gap:8px}
  .ui26 nav.ar-nav .ar-wordmark{white-space:nowrap;flex:0 0 auto}
  .ui26 nav.ar-nav .ar-nav-l img:not(.nbl){height:17px;width:auto;max-width:38px;object-fit:contain}
  .ui26 nav.ar-nav .ar-nav-links{min-width:0;flex:1 1 auto;overflow-x:auto;
    scrollbar-width:none;white-space:nowrap}
  .ui26 nav.ar-nav .ar-nav-links::-webkit-scrollbar{display:none}
  .ui26 nav.ar-nav .ar-nav-cta{flex:0 0 auto}

  /* ฝั่งขวาของทุกแบบ ปุ่มกะทัดรัดแต่ยังแตะง่าย */
  .ui26 nav .u-702b6cc,
  .ui26 nav .site-nav-links{flex:0 0 auto}
  .ui26 nav .u-702b6cc > a:last-child{min-height:40px;padding:0 var(--sp-xs);font-size:12.5px;white-space:nowrap}

  /* ทางออกสุดท้าย ถ้ายังยาวเกิน ให้เลื่อนแนวนอนแทนการห่อบรรทัด */
  .ui26 nav.u-13af59b,
  .ui26 nav.site-nav,
  .ui26 nav.ar-nav{overflow-x:auto;scrollbar-width:none}
  .ui26 nav.u-13af59b::-webkit-scrollbar,
  .ui26 nav.site-nav::-webkit-scrollbar,
  .ui26 nav.ar-nav::-webkit-scrollbar{display:none}
}

/* == ปุ่มติดต่อเราที่แถบบน ทั้งเว็บ ====================================
   เดิมทุกหน้าใช้ทองของกลุ่ม (ขอบ #C9A24B ตัวอักษร #E8CC7A) ซึ่งเป็นโทนของ
   Glanzend จึงดูไม่เข้ากับหน้าที่เป็นแบรนด์อื่น
   เปลี่ยนให้ใช้สีแบรนด์ของหน้านั้นเอง ผ่านโทเคน --ds-brand ที่ประกาศไว้แล้ว
     SCP แดง #C53931 · Iron Seal ทองเหลือง #C99A3A · Glanzend และหน้ากลุ่ม ทอง #C9A24B
   ตัวอักษรใช้เฉดอ่อนเพราะอ่านบนพื้นดำได้ชัดกว่า ชี้เมาส์แล้วพื้นเต็มสี

   ต้องใช้ !important เพราะปุ่มถูกกำหนดสีด้วยคลาสที่เครื่องสร้าง
   (html:not(#x):not(#x) body .u-xxxx) ซึ่งมีค่าความจำเพาะระดับ id      */
.ui26 nav .u-702b6cc > a:last-child,
.ui26 nav.ar-nav .ar-nav-cta > a:last-child{
  border-color:var(--ds-brand, #C9A24B) !important;
  color:var(--ds-brand-soft, #E8CC7A) !important;
  transition:background-color .22s ease, color .22s ease, border-color .22s ease;
}
.ui26 nav .u-702b6cc > a:last-child:hover,
.ui26 nav .u-702b6cc > a:last-child:focus-visible,
.ui26 nav.ar-nav .ar-nav-cta > a:last-child:hover,
.ui26 nav.ar-nav .ar-nav-cta > a:last-child:focus-visible{
  background:var(--ds-brand, #C9A24B) !important;
  border-color:var(--ds-brand, #C9A24B) !important;
  color:#fff !important;
}

/* คลิปของร้านในหน้าพาร์ทเนอร์ (20 พ.ย. 2026)
   ใช้ facade เดียวกับทั้งเว็บ (.js-video-facade + site.js) จึงยังเป็น youtube-nocookie
   และโหลด YouTube ต่อเมื่อผู้เข้าชมกดเล่นเท่านั้น */
.pp-video-frame{max-width:860px;margin:0 auto;text-align:center}
.pp-video-head{margin-bottom:var(--sp-md);text-align:center}
/* หน้าพาร์ทเนอร์มีสคริปต์เติมคลาส .ui26-partner-heading ให้หัวข้อทุกส่วนอัตโนมัติ
   แล้วบังคับ text-align:left !important จึงต้องทับเฉพาะในบล็อกคลิปนี้ */
#shop-video .pp-video-head,#shop-video .pp-video-head h2,#shop-video .pp-video-head p,
#shop-video .pp-video-head a,#shop-video .pp-video-fig figcaption{text-align:center!important}
#shop-video .pp-video-head h2{margin-left:auto!important;margin-right:auto!important}
.pp-video-lead{margin-left:auto;margin-right:auto;max-width:56ch}
.pp-video-eyebrow{margin:0;font:600 12px/1 "Saira",sans-serif;letter-spacing:.2em;
  color:rgba(255,255,255,.45)}
.pp-video-head h2{margin:var(--sp-sm) 0 0}
.pp-video-lead{margin:var(--sp-xs) auto 0;font:400 15px/1.7 "Anuphan",sans-serif;color:rgba(255,255,255,.72)}
.pp-video-link{display:inline-block;margin-top:var(--sp-md);font:600 14px/1.4 "Anuphan",sans-serif;
  color:#fff;text-decoration:none;border-bottom:1px solid #b10f0f;padding-bottom:3px}
.pp-video-link:hover{color:#ff4b4b}
.pp-video-fig{margin:0}
.pp-video-facade{position:relative;display:block;width:100%;aspect-ratio:16/9;cursor:pointer;
  overflow:hidden;border-radius:4px;background:#0d0e10}
.pp-video-facade img{width:100%;height:100%;object-fit:cover;transition:opacity .25s ease}
.pp-video-facade:hover img{opacity:.8}
.pp-video-play{position:absolute;inset:50% auto auto 50%;translate:-50% -50%;
  width:70px;height:50px;border:1px solid rgba(255,255,255,.7);border-radius:6px;
  background:rgba(8,9,10,.55);transition:background .25s ease,border-color .25s ease}
.pp-video-play::after{content:"";position:absolute;inset:50% auto auto 50%;translate:-40% -50%;
  border-style:solid;border-width:9px 0 9px 15px;border-color:transparent transparent transparent #fff}
.pp-video-facade:hover .pp-video-play{background:#b10f0f;border-color:transparent}
.pp-video-facade:focus-visible{outline:2px solid #fff;outline-offset:3px}
.pp-video-fig figcaption{margin-top:var(--sp-xs);text-align:center;font:400 13.5px/1.6 "Anuphan",sans-serif;
  color:rgba(255,255,255,.55)}

@media(prefers-reduced-motion:reduce){.pp-video-facade img{transition:none}}

