/* Innovalue Store — theme.css (ธีมกลางของทั้งเว็บ)
 * ม่วง #652F80 · เหลือง #FDCA00 · พื้นขาว — ยกมาจาก mockup/ เดิม (ลบโฟลเดอร์นั้นแล้ว 2026-09-28)
 * ฟอนต์ Anuphan (SIL OFL 1.1) self-host แยกตาม unicode-range ไม่พึ่ง CDN
 * ย้ายเข้า Laravel แล้วตั้งแต่ TASK-010/011/012 — แก้หน้าตาทั้งเว็บที่ไฟล์นี้
 */

/* กติกาบังคับ — [hidden] ต้องซ่อนได้จริงเสมอ (คลาสที่ตั้ง display จะชนะ UA stylesheet) */
[hidden] { display: none !important; }

/* ★ ปิดไว้ก่อน (2026-09-22) — ไฟล์ fonts/anuphan-*.woff2 ไม่เคยถูกเพิ่มเข้ามาจริง (ไม่มีทั้งโฟลเดอร์
   public/css/fonts/) ทุกหน้าเลยยิง request 3 ไฟล์แล้วเจอ 404 ทุกครั้ง ผ่าน Cloudflare Tunnel
   จะยิ่งช้าเพราะ roundtrip ไกล กว่าจะ fallback ไปฟอนต์ระบบ (font-family ด้านล่างมี fallback
   อยู่แล้ว ปิด @font-face ไม่ทำให้ตัวอักษรหายไปไหน แค่ไม่ใช้ Anuphan) ถ้าจะเปิดใช้จริง
   ต้องโหลดไฟล์ anuphan-thai.woff2 / anuphan-latin.woff2 / anuphan-latin-ext.woff2 มาวางใน
   public/css/fonts/ ก่อน แล้วค่อยเอาคอมเมนต์นี้ออก
@font-face {
  font-family: "Anuphan"; font-style: normal; font-weight: 400 700; font-display: swap;
  src: url("fonts/anuphan-thai.woff2") format("woff2");
  unicode-range: U+02D7, U+0303, U+0331, U+0E01-0E5B, U+200C-200D, U+25CC;
}
@font-face {
  font-family: "Anuphan"; font-style: normal; font-weight: 400 700; font-display: swap;
  src: url("fonts/anuphan-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2212, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Anuphan"; font-style: normal; font-weight: 400 700; font-display: swap;
  src: url("fonts/anuphan-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+1E00-1E9F, U+20A0-20AB, U+2C60-2C7F, U+A720-A7FF;
}
*/

:root {
  color-scheme: light;

  --purple:     #652F80;
  --purple-dk:  #4C2261;
  --purple-lt:  #F6F2F8;
  --purple-br:  #E3D7EA;
  --yellow:     #FDCA00;
  --yellow-dk:  #D9AC00;

  --bg:         #FFFFFF;
  --surface:    #FFFFFF;
  --surface-2:  #FAF8FB;
  --ink:        #241B2B;
  --ink-soft:   #5C5266;
  --ink-mute:   #8A8092;
  --line:       #E7E2EB;
  --ok:         #1E7A46;
  --warn:       #8A5A00;
  --warn-bg:    #FFF7E0;
  --danger:     #B91C1C;
  --danger-bg:  #FEE2E2;

  --r-sm: 8px;  --r-md: 14px;  --r-lg: 20px;
  --shadow:    0 1px 2px rgba(36,27,43,.06), 0 8px 24px rgba(36,27,43,.06);
  --shadow-lg: 0 2px 4px rgba(36,27,43,.08), 0 16px 40px rgba(36,27,43,.12);
  --wrap: 1400px;   /* 2026-09-28 (เจ้าของขอ) — เดิม 1180px แคบไป จอกว้างเหลือขอบเยอะ · ไม่กระทบมือถือ (แค่ max-width) */
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: "Anuphan", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 16px; line-height: 1.6;
}
img { max-width: 100%; display: block; }
a { color: var(--purple); }

.wrap { max-width: var(--wrap); margin-inline: auto; padding-inline: 24px; }

/* ───────── หัวเว็บ ───────── */
.topbar { background: var(--purple); color: #fff; font-size: 13.5px; }
.topbar .wrap {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; padding-block: 7px;
  flex-wrap: wrap;
}
.topbar-contact { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.topbar a {
  display: inline-flex; align-items: center; gap: 7px;
  color: #fff; text-decoration: none; font-weight: 600;
}
.topbar a:hover { color: var(--yellow); }
.topbar svg { width: 15px; height: 15px; fill: currentColor; }
.topbar-iso img { width: 18px; height: 18px; }
.site-head { background: #fff; border-bottom: 1px solid var(--line); }
.site-head .wrap { display: flex; align-items: center; gap: 16px; padding-block: 12px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand img { height: 48px; width: auto; }
.brand span { font-weight: 700; font-size: 19px; letter-spacing: .04em; color: var(--purple); }
.nav { margin-left: auto; display: flex; gap: 4px; align-items: center; }
.nav a {
  text-decoration: none; color: var(--ink-soft); font-weight: 600; font-size: 14.5px;
  padding: 8px 12px; border-radius: var(--r-sm);
}
.nav a:hover { background: var(--purple-lt); color: var(--purple); }
.nav a.on { color: var(--purple); background: var(--purple-lt); }
.nav-toggle {
  display: none; margin-left: auto; place-items: center;
  width: 44px; height: 44px; padding: 0; cursor: pointer;
  background: transparent; color: var(--ink); border: 1px solid var(--line); border-radius: var(--r-sm);
}
.nav-toggle svg { width: 22px; height: 22px; }
.cart-btn {
  display: inline-flex; align-items: center; gap: 8px; text-decoration: none;
  background: var(--purple); color: #fff !important; font-weight: 700; font-size: 14.5px;
  padding: 9px 16px; border-radius: 999px;
}
.cart-btn .count {
  background: var(--yellow); color: var(--ink); border-radius: 999px;
  min-width: 21px; height: 21px; display: grid; place-items: center; font-size: 12.5px; font-weight: 700;
}

/* ───────── แบนเนอร์โหมดทดสอบ ───────── */
.testbar {
  background: var(--warn-bg); color: var(--warn); border-bottom: 1px solid #F0DFAF;
  font-size: 14px; font-weight: 600; text-align: center; padding: 9px 16px;
}

/* ───────── ปุ่ม ───────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: inherit; font-weight: 700; border: 1px solid transparent; border-radius: 999px;
  padding: 12px 24px; cursor: pointer; text-decoration: none; transition: .15s;
}
.btn-primary { background: var(--purple); color: #fff; }
.btn-primary:hover { background: var(--purple-dk); }
.btn-accent { background: var(--yellow); color: var(--ink); }
.btn-accent:hover { background: var(--yellow-dk); }
.btn-ghost { background: #fff; color: var(--purple); border-color: var(--purple-br); }
.btn-ghost:hover { background: var(--purple-lt); }
.btn-lg { padding: 15px 32px; font-size: 17px; }
.btn-block { width: 100%; }
.btn:disabled { opacity: .45; cursor: not-allowed; }

/* ───────── Hero ───────── */
/* ★ 2026-09-28 (เจ้าของขอ) — เดิมแบ่ง 2 คอลัมน์ (ข้อความซ้าย + กล่องรูปเปล่าขวา)
   เปลี่ยนเป็นคอลัมน์เดียวจัดกลางเต็มจอ ไม่มีกล่องรูปฝั่งขวาแล้ว (.hero-art เลิกใช้) */
.hero { background: linear-gradient(180deg, var(--purple-lt), #fff); border-bottom: 1px solid var(--line); text-align: center; }
.hero .wrap { display: flex; flex-direction: column; align-items: center; padding-block: 72px; }
.hero h1 { font-size: 48px; line-height: 1.15; margin: 8px 0 14px; letter-spacing: -.01em; }
.hero h1 em { font-style: normal; color: var(--purple); }
.hero p { color: var(--ink-soft); font-size: 17px; margin: 0 auto 26px; max-width: 56ch; }
.eyebrow {
  display: inline-block; background: var(--yellow); color: var(--ink);
  font-weight: 700; font-size: 13px; letter-spacing: .06em; padding: 5px 12px; border-radius: 999px;
}
.hero-actions { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; }

/* ───────── แถบสถิติ ───────── */
.stats { background: var(--purple); color: #fff; border-bottom: 4px solid var(--yellow); }
.stats .wrap { display: grid; grid-template-columns: repeat(4, 1fr); padding-block: 26px; text-align: center; }
.stats .it + .it { border-left: 1px solid rgba(255,255,255,.22); }
.stats b { display: block; font-size: 30px; line-height: 1.2; font-style: italic; }
.stats span { font-size: 13.5px; opacity: .88; }

/* ───────── section ───────── */
section { padding-block: 56px; }
.sec-head { text-align: center; max-width: 62ch; margin: 0 auto 36px; }
.sec-head h2 { font-size: 32px; margin: 0 0 10px; }
.sec-head h2 b { color: var(--purple); }
.sec-head p { color: var(--ink-soft); margin: 0; }

/* ───────── การ์ดสินค้า ───────── */
.grid { display: grid; gap: 22px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md);
  overflow: hidden; display: flex; flex-direction: column; transition: .18s;
}
.card:hover { border-color: var(--purple-br); box-shadow: var(--shadow-lg); transform: translateY(-2px); }
.card .thumb {
  aspect-ratio: 1/1; background: var(--purple-lt); display: grid; place-items: center;
  color: var(--ink-mute); font-size: 13px; border-bottom: 1px solid var(--line);
}
.card .body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.card h3 { margin: 0; font-size: 18.5px; }
.card .desc { color: var(--ink-soft); font-size: 14.5px; margin: 0; flex: 1; }
.card .price { font-size: 14.5px; color: var(--ink-soft); }
.card .price b { color: var(--purple); font-size: 21px; }
.tag {
  display: inline-block; font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 999px;
  background: var(--purple-lt); color: var(--purple); border: 1px solid var(--purple-br); width: fit-content;
}
.tag-contact { background: #FFF7E0; color: var(--warn); border-color: #F0DFAF; }

/* ───────── ขั้นตอน 4 ช่อง ───────── */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.step { text-align: center; padding: 22px 16px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface-2); }
.step .n {
  width: 40px; height: 40px; border-radius: 999px; background: var(--purple); color: #fff;
  display: grid; place-items: center; font-weight: 700; margin: 0 auto 10px;
}
.step h4 { margin: 0 0 4px; font-size: 16.5px; }
.step p { margin: 0; font-size: 14px; color: var(--ink-soft); }

/* ───────── footer ─────────
 * รูปแบบเดียวกับเว็บหลัก innovalue.co.th — พื้นม่วง เส้นคั่นเหลือง
 * เนื้อหาทั้งหมดมาจากตาราง settings (contact + footer_services)
 */
.site-foot { background: var(--purple); color: #fff; padding-block: 44px 24px; margin-top: 40px; }
.site-foot h5 { margin: 0 0 14px; font-size: 27px; font-weight: 700; color: #fff; }
.site-foot p, .site-foot li { color: rgba(255,255,255,.88); font-size: 14.5px; line-height: 1.75; }
.site-foot ul { list-style: none; padding: 0; margin: 0; }
.site-foot a { color: rgba(255,255,255,.88); text-decoration: none; }
.site-foot a:hover { color: var(--yellow); }

/* แถวบน: ข้อความบริษัท | ติดต่อเรา — เส้นเหลืองคั่นทั้งสองข้างเหมือนเว็บหลัก */
.foot-top {
  display: grid; grid-template-columns: 1.35fr 1fr; gap: 40px;
  align-items: start;
}
.foot-about { border-left: 2px solid var(--yellow); padding-left: 26px; }
.foot-about p { margin: 0 0 14px; }
.foot-logo { display: block; height: auto; max-width: 220px; margin-bottom: 18px; }
.foot-contact { border-left: 2px solid var(--yellow); padding-left: 26px; }
.foot-company { font-weight: 700; font-size: 17px; margin: 0 0 16px; color: #fff; }
/* รายการติดต่อ — ไอคอนคอลัมน์ซ้าย ข้อความคอลัมน์ขวา ไม่ใช้ float */
.foot-list li {
  display: grid; grid-template-columns: 26px 1fr; gap: 10px;
  align-items: start; margin-bottom: 12px;
}
.foot-list svg { width: 20px; height: 20px; fill: rgba(255,255,255,.75); margin-top: 3px; }
.map-link { display: block; color: var(--yellow); font-size: 14px; }
.map-link:hover { text-decoration: underline; }

.foot-line-icon { width:20px; height:20px; border-radius:4px; margin-top:3px; }
/* แถวล่าง: บริการของเรา */
.foot-services { margin-top: 46px; text-align: center; }
.foot-services h4 { margin: 0 0 26px; font-size: 27px; font-weight: 700; }
.foot-services-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 24px; }
.foot-services-grid h6 { margin: 0 0 10px; font-size: 16px; font-weight: 700; color: #fff; }
.foot-services-grid li { font-size: 14px; line-height: 1.9; color: rgba(255,255,255,.8); }
.foot-btm {
  border-top: 1px solid rgba(255,255,255,.18); margin-top: 34px; padding-top: 16px;
  font-size: 13px; color: rgba(255,255,255,.62); text-align: center;
}

/* ───────── ปุ่มไลน์ลอยมุมขวาล่าง ─────────
 * z-index สูงกว่าทุกอย่างในหน้า แต่ต่ำกว่า modal ถ้ามีในอนาคต
 */
.line-fab {
  position: fixed; right: 20px; bottom: 20px; z-index: 900;
  /* display: flex; align-items: center; gap: 10px; */
  text-decoration: none;
}
.line-fab-text {
  position: absolute;
  right: 100%;
  top: 50%;
  margin-right: 10px;

  background: #fff; color: var(--ink);
  font-size: 14.5px; font-weight: 600;
  padding: 9px 16px; border-radius: 6px;
  box-shadow: 0 2px 10px rgba(0,0,0,.18);
  white-space: nowrap;

  opacity: 0;
  visibility: hidden;
  transform: translate(8px, -50%);
  transition: opacity .2s ease, transform .2s ease, visibility .2s;
}

/* ชี้ที่ปุ่ม → ป้ายโผล่ */
.line-fab:hover .line-fab-text,
.line-fab:focus-visible .line-fab-text {
  opacity: 1;
  visibility: visible;
  transform: translateX(0);
}

.line-fab-btn {
  position: relative;
  width: 56px; height: 56px; border-radius: 50%;
  overflow: hidden;
  display: block;
  box-shadow: 0 4px 14px rgba(0,0,0,.28);
  transition: transform .15s ease;
}
.line-fab-btn img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}
.line-fab:hover .line-fab-text,
.line-fab:focus-visible .line-fab-text {
  opacity: 1;
  visibility: visible;
  transform: translate(0, -50%);
}

.line-fab-dot {
  position: absolute; top: -2px; right: -2px;
  min-width: 20px; height: 20px; padding: 0 5px;
  border-radius: 999px; background: #E8342A; color: #fff;
  font-size: 12px; font-weight: 700;
  display: grid; place-items: center;
}

/* ───────── mobile ───────── */
@media (max-width: 880px) {
  .hero .wrap { padding-block: 36px; }
  .hero h1 { font-size: 32px; }
  .stats .wrap { grid-template-columns: repeat(2, 1fr); gap: 18px 0; }
  .stats .it:nth-child(odd) { border-left: 0; }
  .stats .it:nth-child(3) { border-left: 0; }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .foot-top { grid-template-columns: 1fr; gap: 30px; }
  .foot-services-grid { grid-template-columns: repeat(2, 1fr); gap: 22px; text-align: left; }
  .site-foot h5, .foot-services h4 { font-size: 22px; }
  /* จอแคบ: เหลือแค่ปุ่มกลม ตัดป้ายข้อความออก ไม่งั้นบังเนื้อหา */
  .line-fab-text { display: none; }
  .line-fab { right: 14px; bottom: 14px; }
  .site-head .wrap { flex-wrap: wrap; }
  .nav-toggle { display: grid; }
  .nav { display: none; }
  .nav-open .nav {
    display: flex; flex-direction: column; align-items: stretch; gap: 2px;
    flex-basis: 100%; margin-left: 0; padding-top: 8px; border-top: 1px solid var(--line);
  }
  .nav-open .nav a { padding: 12px; font-size: 16px; }
  section { padding-block: 40px; }
  .sec-head h2 { font-size: 26px; }
}
