/* ==========================================================
   responsive.css — หน้าแรกบนแท็บเล็ต / มือถือ
   โหลดเป็นไฟล์สุดท้ายของหน้าแรก (ทับค่าจอคอมของแต่ละเซกชัน)
   ========================================================== */

/* กันทั้งหน้าไม่ให้เลื่อนซ้าย-ขวา (ลายน้ำ/แสงที่ตั้งใจให้ล้นขอบถูกตัด) */
/* เดิม html, body{overflow-x:hidden} — ทำให้ body กลายเป็นกล่องเลื่อนเองในบาง Safari
   ปุ่มกลับขึ้นด้านบนจึงอ่านตำแหน่งเลื่อนไม่ได้ → ให้ html ตัดขอบ และ body ใช้ clip (ไม่สร้างกล่องเลื่อน) */
html{overflow-x:hidden;}
body{overflow-x:clip;}
img{max-width:100%;}

/* ---------- แท็บเล็ต ≤ 1024px ---------- */
@media (max-width:1024px){
  .hero{padding-block:72px 80px;gap:32px;}
  .hero__visual{width:340px;height:340px;}
  .hero__glow{width:340px;height:340px;}
  .pricing{grid-template-columns:repeat(2,minmax(0,1fr));}
  .steps{grid-template-columns:repeat(2,minmax(0,1fr));gap:28px 24px;}
  .about{gap:40px;}
  .footer-grid{grid-template-columns:1fr 1fr;}
}

/* ---------- มือถือแนวนอน / แท็บเล็ตเล็ก ≤ 820px ---------- */
@media (max-width:820px){
  /* Hero: ข้อความก่อน รูปโลโก้ลงไปข้างล่างแบบย่อ */
  .hero{flex-direction:column;align-items:flex-start;padding-block:48px 56px;}
  .hero__content{max-width:none;gap:20px;}
  .hero h1, .hero__title{font-size:clamp(32px,8.6vw,48px) !important;line-height:1.25;}
  .hero__lead{font-size:15px;}
  .hero__actions{flex-wrap:wrap;width:100%;}
  .hero__actions .btn{flex:1 1 200px;text-align:center;}
  .hero__visual{align-self:center;width:280px;height:280px;}
  .hero__glow{width:280px;height:280px;}
  .hero__ring{width:220px;height:220px;}
  .hero__core{width:160px;height:160px;}
  .hero__core img{width:84px;height:84px;}
  .float-card--lab{left:-24px;bottom:-6px;}
  .hero__watermark{width:420px;height:420px;right:-180px;top:-120px;}

  /* หัวเซกชัน */
  .section-title{font-size:clamp(26px,6.6vw,34px);}
  .products, .about, .process, .certificate{padding-block:64px;}

  /* สินค้า */
  .products{gap:48px;}
  .retail__grid{grid-template-columns:1fr;gap:20px;}
  .flagship{padding:28px 20px;gap:28px;border-radius:22px;}
  .flagship__title{font-size:24px;}
  .features{grid-template-columns:1fr;gap:10px;}
  .pricing{grid-template-columns:1fr;gap:24px;}
  .flagship__footer .btn{flex:1 1 220px;text-align:center;}

  /* เกี่ยวกับเรา */
  .about{flex-direction:column;align-items:stretch;}
  .about__media, .about__image{width:100%;height:300px !important;flex:none;}

  /* กระบวนการ */
  .steps{grid-template-columns:1fr 1fr;}

  /* ใบอนุญาต */
  .certificate{flex-direction:column;gap:36px;}
  .cert-docs, .cert-content{width:100%;}
  .cert-content .section-title{font-size:clamp(24px,6.4vw,30px);}

  /* แบนเนอร์ทอง */
  .cta-banner{flex-direction:column;align-items:flex-start;padding-block:48px;}
  .cta-banner__btn{width:100%;text-align:center;}
  .cta-banner h2, .cta-banner__title{font-size:clamp(22px,6vw,28px) !important;}
}

/* ---------- มือถือ ≤ 520px ---------- */
@media (max-width:520px){
  .steps{grid-template-columns:1fr;gap:20px;}
  .cert-docs__grid{gap:12px;}
  .doc-preview{padding:8px;border-radius:12px;}
  .doc-preview__label{font-size:11.5px;}
  .cert-facts div{grid-template-columns:1fr;gap:2px;padding:10px 0;}
  .footer-grid{grid-template-columns:1fr;gap:32px;}
  .product-card__footer .btn{flex:1 1 100%;}
}

/* header มือถือ: ไม่ให้ปุ่ม/ชื่อแบรนด์ตัดบรรทัด */
.header-actions__order{white-space:nowrap;}
@media (max-width:520px){
  .brand__name{font-size:14px;white-space:nowrap;}
  .brand__logo{width:36px;height:36px;}
  .header-actions__order{padding:9px 14px;font-size:12.5px;}
}
