/* ส่วนเพิ่มจาก prototype K สำหรับเว็บจริง (หน้าหมวด หน้าสินค้าแบบกดเลือกขนาด) */
[hidden] { display: none !important; }
body { overflow-x: clip; }

/* รูปที่ยังไม่มี */
.noimg { display: grid; place-content: center; gap: 4px; width: 100%; height: 100%; padding: 12px; text-align: center; background: repeating-linear-gradient(135deg, var(--paper) 0 14px, var(--paper) 14px 28px); color: var(--ink-soft); }
.noimg span { font-family: var(--head); font-weight: 600; font-size: 15px; line-height: 1.35; color: var(--ink); }
.noimg em { font-style: normal; font-size: 13px; }
.card .pic { aspect-ratio: 1 / 1; }
.gallery .main .noimg { min-height: 100%; }
.r-noimg { width: 60px; height: 60px; border-radius: 10px; background: var(--white); }
.k-tab-blank { width: 38px; height: 38px; border-radius: 50%; background: var(--paper); flex: none; }

/* ป้ายเกรด MK/TK บนการ์ด */
.grade { position: absolute; top: 8px; right: 8px; z-index: 1; font-family: var(--head); font-weight: 700; font-size: 13px; line-height: 1; padding: 6px 8px; border-radius: 8px; background: var(--white); color: var(--ink); border: 1.5px solid var(--ink); }
.grade-MK { background: var(--ink); color: var(--white); }

/* เส้นทาง */
.crumbs { padding: 14px 0 6px; font-size: 15px; color: var(--ink-soft); }
.crumbs a { font-family: var(--head); font-weight: 600; color: var(--ink); text-decoration: none; }
.crumbs a:hover { color: var(--red); }

/* หน้าหมวด */
.cat-head { padding: 6px 0 4px; }
.cat-head h1 { font-size: clamp(28px, 7.4vw, 42px); font-weight: 700; }
.cat-head .blurb { margin-top: 6px; font-size: 18px; max-width: 40em; }
.cat-count { margin-top: 6px; font-family: var(--head); font-weight: 600; color: var(--red); }
.cat-note { padding-bottom: 32px; }

/* หน้าสินค้า */
.pdetail { padding-top: 6px; }
.pinfo h1 { font-size: clamp(26px, 7vw, 38px); font-weight: 700; }
.opts { margin-top: 14px; display: flex; flex-wrap: wrap; gap: 8px; }
.opts-title { width: 100%; font-family: var(--head); font-weight: 600; font-size: 16px; color: var(--ink-soft); }
.opt { min-height: 48px; min-width: 64px; padding: 8px 16px; display: inline-flex; align-items: center; justify-content: center; border: 2px solid var(--rule); border-radius: 12px; background: var(--white); font-family: var(--head); font-weight: 600; font-size: 17px; text-decoration: none; color: var(--ink); line-height: 1.3; }
.opt:hover { border-color: var(--ink); }
.opt[aria-checked="true"] { border-color: var(--red); background: var(--red); color: var(--white); }
.opt-one { margin-top: 10px; font-family: var(--head); font-weight: 600; font-size: 18px; }
.pricebox { margin-top: 16px; background: var(--white); border-radius: 16px; padding: 16px 18px; border-left: 6px solid var(--red); }
.pb-main { font-family: var(--head); font-weight: 700; font-size: clamp(30px, 8vw, 40px); color: var(--red); line-height: 1.2; }
.pb-main small { font-size: 18px; font-weight: 600; color: var(--ink); }
.pb-sub { font-family: var(--head); font-weight: 600; font-size: 19px; margin-top: 2px; }
.pb-pack { margin-top: 6px; color: var(--ink-soft); }
.pb-unit { color: var(--ink-soft); font-size: 15px; }
.pb-sub:empty, .pb-unit:empty, .pb-pack:empty { display: none; }
.pinfo .buy-now { margin-top: 18px; display: flex; width: 100%; }
.variants { margin-bottom: 36px; }
a.vrow { text-decoration: none; color: inherit; border-radius: 10px; margin: 0 -10px; padding-left: 10px; padding-right: 10px; }
a.vrow:hover { background: var(--paper); }
a.vrow.is-on { background: var(--paper); box-shadow: inset 4px 0 0 var(--red); }
.nf { padding: 48px var(--gutter) 64px; }
.nf h1 { font-size: 34px; }
.nf p { margin-top: 10px; }

@media (min-width: 860px) {
  .pdetail { align-items: start; }
  .pinfo .buy-now { width: auto; display: inline-flex; }
  .pdetail ~ .variants .vrow { grid-template-columns: minmax(0, 3fr) minmax(0, 3fr) 150px 150px; gap: 24px; }
  .gallery .main { aspect-ratio: 1 / 1; }
}

/* ปุ่มกลับหน้าแรก (มือถือ) */
.head-home { display: inline-grid; place-items: center; width: 44px; height: 44px; border: 2px solid var(--rule); border-radius: 50%; background: var(--paper); color: var(--ink); text-decoration: none; flex: none; }
.head-home svg { width: 22px; height: 22px; }
.head-home span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.head-home:hover { border-color: var(--red); color: var(--red); background: var(--white); }
.head-tools { gap: 8px; }
@media (max-width: 459px) { .logo-text { display: none; } }

/* ปุ่มย้อนกลับ ทุกหน้าที่ไม่ใช่หน้าแรก */
.backrow { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 12px 0 4px; }
.backrow .crumbs { padding: 0; }
.back-btn { display: inline-flex; align-items: center; gap: 6px; min-height: 46px; padding: 6px 18px 6px 12px; border-radius: 999px; background: var(--white); border: 2px solid var(--ink); color: var(--ink); text-decoration: none; font-family: var(--head); font-weight: 700; font-size: 17px; }
.back-btn svg { width: 22px; height: 22px; flex: none; }
.back-btn:hover { background: var(--ink); color: var(--white); }
@media (max-width: 559px) { .backrow .crumbs { display: none; } }

/* เกรด MK / TK — ปุ่มสลับแบบเรียบ */
.grade { font-size: 12px; padding: 6px 9px; }
.gradebox { margin-top: 16px; }
.cat-head + .gradebox { margin: 14px 0 0; }
.gb-label { font-family: var(--head); font-weight: 600; font-size: 16px; color: var(--ink-soft); }
.gb-seg { margin-top: 6px; display: inline-flex; padding: 4px; gap: 4px; background: var(--white); border: 2px solid var(--rule); border-radius: 14px; }
.gb { display: inline-flex; align-items: baseline; gap: 6px; min-height: 44px; padding: 8px 16px; border-radius: 10px; color: var(--ink); text-decoration: none; line-height: 1.2; }
.gb b { font-family: var(--head); font-weight: 700; font-size: 20px; }
.gb em { font-style: normal; font-family: var(--head); font-weight: 600; font-size: 15px; color: var(--ink-soft); }
a.gb { cursor: pointer; }
a.gb:hover { background: var(--paper); }
.gb.is-on { background: var(--ink); color: var(--white); cursor: default; }
.gb.is-on em { color: var(--paper); }
.gb-all { align-items: center; }
.gb-all b { font-size: 16px; }
.gb-desc { margin-top: 8px; font-size: 15px; color: var(--ink-soft); }
.gb-away { margin-top: 2px; font-size: 14px; color: var(--ink-soft); }
.grade-filter { margin-top: 10px; }
.grade-filter b { color: var(--red); font-family: var(--head); }
.grade-note { margin-top: 14px; display: table; background: var(--white); border: 2px solid var(--rule); color: var(--ink); font-family: var(--body); font-size: 15px; padding: 6px 12px; border-radius: 10px; }
.grade-note b { font-family: var(--head); margin-right: 4px; }

/* เมนูหัวเว็บไม่ตัดบรรทัดบนจอคอมแคบ */
.head-nav a { white-space: nowrap; }
@media (min-width: 860px) and (max-width: 1099px) {
  .head-nav { gap: 14px; font-size: 16px; }
  .head-nav .head-search span { display: none; }
  .head-nav .head-search { padding: 0 11px; }
  .logo-text > span { display: none; }
}

/* ขั้นตอนสั่งซื้อแบบรูป (ข้อความจริงยังอยู่ใน ol.sr-only ให้ Google และโปรแกรมอ่านหน้าจอ) */
.steps-img { display: block; margin: 20px auto 0; max-width: 560px; }
.steps-img img { display: block; width: 100%; height: auto; }
@media (min-width: 860px) { .steps-img { max-width: 1200px; margin-top: 28px; } }

/* ไอคอน LINE (รูปฟองแชท LINE จริง ตัวอักษรเจาะเห็นสีปุ่ม) */
.btn-line svg.line-ico { width: 28px; height: 28px; color: #fff; }
.btn-line svg.line-ico path { fill: currentColor; }

/* ---------- รีวิวจาก Shopee: แถบเลื่อนอัตโนมัติ (ปัด/ลากเองได้ หยุดเมื่อชี้หรือแตะ) ---------- */
.rv { margin: 22px -16px 0; padding: 4px 16px 14px; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.rv::-webkit-scrollbar { display: none; }
.rv:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; }
.rv-track { display: flex; gap: 14px; width: max-content; }
.rv-card { margin: 0; width: 270px; flex: none; display: flex; flex-direction: column; gap: 10px;
  background: var(--paper); border-radius: var(--radius); padding: 18px 18px 16px; }
.rv-stars { color: #f2a900; font-size: 19px; letter-spacing: 2px; line-height: 1; }
.rv-stars span { color: #d9cfc1; }
.rv-card blockquote { margin: 0; font-size: 16px; line-height: 1.55; color: var(--ink);
  display: -webkit-box; -webkit-line-clamp: 5; -webkit-box-orient: vertical; overflow: hidden; }
.rv-card figcaption { margin-top: auto; display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--ink-soft); }
.rv-card figcaption img { width: 44px; height: 44px; border-radius: 8px; object-fit: cover; flex: none; }
.rv-card figcaption span { display: flex; flex-direction: column; min-width: 0; }
.rv-card figcaption b { color: var(--ink); font-weight: 600; }
.rv-card figcaption em { font-style: normal; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (min-width: 860px) {
  .rv { margin: 30px 0 0; padding: 4px 0 14px; }
  .rv-card { width: 300px; }
  .proof-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* ราคาต่อลังขึ้นก่อนราคาต่อแพ็ก (ร้านเน้นขายยกลัง) */
@media (max-width: 859px) { .vrow .pc { grid-row: 1; } .vrow .pp { grid-row: 2; } }

/* ---------- หน้าหมวด: รู้ตลอดว่าอยู่หมวดไหน ---------- */
.cat-zone { position: relative; }
.cat-sticky { position: sticky; top: 64px; z-index: 15; height: 0; }
.cs-bar { position: absolute; top: 0; left: -16px; right: -16px; display: flex; align-items: baseline; gap: 8px;
  padding: 10px 16px; background: var(--red); color: #fff; font-family: var(--head); box-shadow: 0 6px 16px rgba(0,0,0,.12);
  opacity: 0; visibility: hidden; transform: translateY(-6px); transition: opacity .15s, transform .15s, visibility .15s; }
.cat-sticky.show .cs-bar { opacity: 1; visibility: visible; transform: none; }
.cs-bar span { font-size: 14px; opacity: .85; flex: none; }
.cs-bar b { font-size: 17px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.cs-bar em { font-style: normal; font-size: 14px; opacity: .9; flex: none; }
.cs-bar a { margin-left: auto; color: #fff; font-size: 14px; text-decoration: none; flex: none; white-space: nowrap; }
.cat-end { display: flex; align-items: center; gap: 14px; margin: 28px 0 0; color: var(--ink-soft); font-family: var(--head); font-weight: 600; font-size: 15px; text-align: center; }
.cat-end::before, .cat-end::after { content: ""; flex: 1; height: 1px; background: var(--rule); }
.other-cats { border-top: 6px solid var(--paper); }
@media (max-width: 520px) { .cs-bar a { display: none; } }
@media (min-width: 860px) {
  .cat-sticky { top: 76px; }
  .cs-bar { left: 0; right: 0; border-radius: 0 0 12px 12px; padding: 12px 20px; }
}

/* ---------- ช่องค้นหาในหัวเว็บ (จอคอม) + ปุ่มไอคอนบนมือถือ: เรียบ สะอาด ---------- */
.head-find { position: relative; display: flex; align-items: center; }
.head-find svg { position: absolute; left: 14px; width: 18px; height: 18px; color: var(--ink-soft); pointer-events: none; }
.head-find input { width: 210px; height: 44px; padding: 0 16px 0 40px; border: 1px solid var(--rule); border-radius: 999px;
  background: var(--paper); font: 500 15px var(--body); color: var(--ink); outline: none; transition: border-color .15s, background-color .15s, box-shadow .15s, width .2s; }
.head-find input::placeholder { color: #8a8178; }
.head-find input:hover { border-color: #cfc5b8; }
.head-find input:focus { background: #fff; border-color: var(--red); box-shadow: 0 0 0 3px rgba(195, 0, 47, .12); width: 240px; }
.head-find input::-webkit-search-cancel-button { cursor: pointer; }
@media (min-width: 860px) and (max-width: 1099px) {
  .head-find input { width: 150px; }
  .head-find input:focus { width: 180px; }
}
/* มือถือ: ปุ่มค้นหา/หน้าแรกเป็นวงกลมเรียบ ขอบบาง */
.head-tools .head-search, .head-home { width: 44px; height: 44px; min-height: 44px; padding: 0; justify-content: center; border: 1px solid var(--rule); background: #fff; }
.head-tools .head-search span { display: none; }
.head-tools .head-search:hover, .head-home:hover { border-color: var(--red); color: var(--red); background: #fff; }

/* ---------- กล่องแนะนำสินค้าใต้ช่องค้นหา (ขึ้นทันทีที่พิมพ์) ---------- */
.head-sug { position: absolute; top: calc(100% + 8px); right: 0; width: 380px; max-width: calc(100vw - 32px); z-index: 40;
  background: #fff; border: 1px solid var(--rule); border-radius: 14px; box-shadow: 0 14px 34px rgba(0,0,0,.14); padding: 6px; }
.hs-item { display: flex; align-items: center; gap: 12px; padding: 8px 10px; border-radius: 10px; text-decoration: none; color: var(--ink); }
.hs-item img, .hs-item .hs-noimg { width: 48px; height: 48px; border-radius: 8px; object-fit: cover; flex: none; background: var(--paper); }
.hs-item span { display: flex; flex-direction: column; min-width: 0; }
.hs-item b { font-family: var(--head); font-weight: 600; font-size: 15px; line-height: 1.35; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hs-item b mark { background: var(--paper); color: var(--red); border-radius: 3px; padding: 0 1px; }
.hs-item em { font-style: normal; font-size: 13px; color: var(--ink-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hs-item i { font-style: normal; font-family: var(--head); font-weight: 600; font-size: 13px; color: var(--red); }
.hs-item:hover, .hs-item.is-active { background: var(--paper); }
.hs-all { display: block; margin-top: 4px; padding: 10px; border-top: 1px solid var(--rule); text-align: center; font-family: var(--head); font-weight: 600; font-size: 14px; color: var(--red); text-decoration: none; border-radius: 0 0 10px 10px; }
.hs-all:hover, .hs-all.is-active { background: var(--paper); }
.hs-empty { padding: 14px 12px; font-size: 14px; color: var(--ink-soft); }

/* มือถือ: แถวช่องค้นหาใต้หัวเว็บ (เปิดด้วยปุ่มแว่นขยาย) */
.head-mrow { border-top: 1px solid var(--rule); background: #fff; padding: 10px 0 12px; }
.head-mrow .wrap { display: flex; align-items: center; gap: 10px; min-height: 0; }
.head-mrow .head-find { flex: 1; min-width: 0; }
.head-mrow .head-find input, .head-mrow .head-find input:focus { width: 100%; font-size: 16px; }
.head-mrow .head-sug { left: 0; right: 0; width: auto; max-width: none; }
.head-mclose { flex: none; border: 0; background: none; font: 600 15px var(--head); color: var(--ink-soft); padding: 8px 4px; cursor: pointer; }
.head-tools .head-search[aria-expanded="true"] { border-color: var(--red); color: var(--red); }
@media (min-width: 860px) { .head-mrow { display: none !important; } }
/* หน้าแรก: ปุ่มล้างคำค้นในบรรทัดผลค้นหา */
.k-unq { margin-left: 8px; border: 1px solid var(--rule); background: #fff; border-radius: 999px; padding: 2px 10px; font: 600 13px var(--head); color: var(--ink-soft); cursor: pointer; }
.k-unq:hover { border-color: var(--red); color: var(--red); }
/* กันจอกระโดดตอนคลิกช่องค้นหาบนหัวเว็บ: เลิกใช้ scroll-padding ทั้งหน้า (ทำให้เบราว์เซอร์เลื่อนหาช่องในหัวเว็บที่ติดด้านบน)
   แล้วเผื่อระยะหัวเว็บเฉพาะจุดที่ลิงก์ # กระโดดไปแทน */
html { scroll-padding-top: 0; }
main [id] { scroll-margin-top: 84px; }

/* ---------- หัวเว็บ: เว้นระยะให้หายใจ (รูปโลโก้มีชื่อร้านอยู่แล้ว จอคอมไม่กว้างพอ = ซ่อนตัวหนังสือข้างโลโก้) ---------- */
@media (min-width: 860px) {
  .site-head .wrap { gap: 32px; }
  .head-nav { gap: 30px; }
  .head-nav > a:not(.btn) { font-size: 16px; font-weight: 500; color: var(--ink); padding: 8px 0; position: relative; }
  .head-nav > a:not(.btn):hover { color: var(--red); }
  .head-nav .head-find { margin-left: 10px; }
  .head-nav .btn-line { margin-left: -12px; }
}
@media (min-width: 860px) and (max-width: 1279px) {
  .logo-text { display: none; }
  .site-head .wrap { gap: 20px; }
  .head-nav { gap: 22px; }
  .head-find input { width: 170px; }
  .head-find input:focus { width: 200px; }
}

/* ---------- ปุ่มย้อนกลับ: เรียบ ขอบบาง ---------- */
.backrow { gap: 12px; padding: 14px 0 2px; }
.back-btn { min-height: 38px; padding: 4px 14px 4px 8px; gap: 4px; border: 1px solid var(--rule); background: #fff;
  font-weight: 600; font-size: 15px; color: var(--ink); transition: border-color .15s, color .15s; }
.back-btn svg { width: 18px; height: 18px; }
.back-btn:hover { background: #fff; border-color: var(--red); color: var(--red); }
.backrow .crumbs { font-size: 14px; padding-left: 12px; border-left: 1px solid var(--rule); }
.crumbs a { font-weight: 500; color: var(--ink-soft); }
.crumbs span { color: var(--ink); }
@media (min-width: 860px) { .logo-text > span { display: none; } .logo { flex: none; } }

/* ---------- กล่องราคา: เรียบ ขอบบาง ราคาลังเด่น รายละเอียดเล็กลง ---------- */
.pricebox { margin-top: 18px; padding: 20px 22px 18px; border: 1px solid var(--rule); border-left: 1px solid var(--rule); border-radius: 16px; background: #fff; }
.pb-main { font-size: clamp(34px, 8vw, 44px); line-height: 1.1; letter-spacing: -.5px; }
.pb-main small { font-size: 17px; font-weight: 600; color: var(--ink-soft); letter-spacing: 0; margin-left: 2px; }
.pb-sub { margin-top: 6px; font-size: 16px; font-weight: 500; color: var(--ink); }
.pb-sub::before { content: "หรือ "; color: var(--ink-soft); font-weight: 400; }
.pb-meta { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--paper); display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 14px; color: var(--ink-soft); }
.pb-meta p { margin: 0; }
.pb-meta .pb-pack { margin: 0; }
.pb-meta .pb-unit { font-size: 14px; }
.pb-meta:has(.pb-pack:empty):has(.pb-unit:empty) { display: none; }

/* ---------- เลือกเกรด MK/TK: แถบสลับแบบเรียบ ---------- */
.gradebox { margin-top: 20px; }
.gb-label { font-size: 14px; font-weight: 600; color: var(--ink-soft); }
.gb-seg { margin-top: 8px; padding: 4px; gap: 2px; background: var(--paper); border: 0; border-radius: 12px; }
.gb { min-height: 40px; padding: 7px 16px; border-radius: 9px; align-items: center; color: var(--ink-soft); transition: background-color .15s, color .15s; }
.gb b { font-size: 17px; }
.gb em { font-size: 13px; font-weight: 500; color: inherit; opacity: .85; }
a.gb:hover { background: rgba(255,255,255,.6); color: var(--ink); }
.gb.is-on { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.10), 0 0 0 1px rgba(0,0,0,.03); }
.gb.is-on em { color: var(--red); opacity: 1; }
.gb-all b { font-size: 15px; }
.gb-desc { margin-top: 8px; font-size: 14px; }
.gb-away { font-size: 13px; }
.grade-note { margin-top: 18px; padding: 8px 14px; border: 0; border-radius: 10px; background: var(--paper); font-size: 14px; color: var(--ink-soft); }
.grade-note b { color: var(--ink); }
/* พื้นหน้าเป็นสีครีม: แถบเกรดใช้พื้นขาวขอบบาง ตัวที่เลือกเป็นสีเข้ม */
.gb-seg { background: #fff; box-shadow: inset 0 0 0 1px var(--rule); }
a.gb:hover { background: var(--paper); }
.gb.is-on { background: var(--ink); color: #fff; box-shadow: none; }
.gb.is-on em { color: var(--paper); }
.grade-note { background: #fff; box-shadow: inset 0 0 0 1px var(--rule); }
.gb.is-on, a.gb.is-on:hover { background: var(--ink); color: #fff; }

/* ---------- จุดเด่นร้าน: แถบใต้แบนเนอร์ ---------- */
.perks { background: var(--paper); padding: 0 0 28px; }
.pk-list { list-style: none; margin: 0; padding: 6px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0;
  background: #fff; border-radius: 18px; box-shadow: 0 1px 0 rgba(0,0,0,.03), 0 8px 24px rgba(51,51,51,.06); }
.pk-list li { display: flex; align-items: flex-start; gap: 12px; padding: 14px 12px; }
.pk-ico { flex: none; width: 42px; height: 42px; border-radius: 12px; background: var(--paper); color: var(--red); display: grid; place-items: center; }
.pk-ico svg { width: 22px; height: 22px; }
.pk-list b { display: block; font-family: var(--head); font-weight: 700; font-size: 16px; line-height: 1.3; color: var(--ink); }
.pk-list span:not(.pk-ico) { display: block; margin-top: 2px; font-size: 13px; line-height: 1.45; color: var(--ink-soft); }
@media (max-width: 380px) { .pk-list { grid-template-columns: 1fr; } }
@media (min-width: 860px) {
  .perks { padding: 0 0 40px; }
  .pk-list { grid-template-columns: repeat(4, minmax(0, 1fr)); padding: 10px; }
  .pk-list li { padding: 16px 18px; align-items: center; }
  .pk-list li + li { border-left: 1px solid var(--paper); }
  .pk-ico { width: 48px; height: 48px; }
  .pk-list b { font-size: 17px; }
  .pk-list span:not(.pk-ico) { font-size: 14px; }
}
.hero { padding-bottom: 18px; }
@media (min-width: 860px) { .hero { padding-bottom: 36px; } }

/* ---------- แท็บเลือกประเภทร้าน (หน้าแรก): ชิปตัวหนังสือเรียบ ไม่มีรูป ขอบบาง ---------- */
.k-tabs { gap: 8px; }
.k-tabs img, .k-tabs .k-tab-all, .k-tabs .k-tab-blank { display: none; }
.k-tabs button { min-height: 40px; padding: 7px 16px; gap: 6px; border: 1px solid var(--rule); background: #fff; border-radius: 999px;
  font-family: var(--head); font-weight: 600; font-size: 15px; color: var(--ink); transition: border-color .15s, background-color .15s, color .15s; }
.k-tabs button:hover { border-color: #cfc5b8; background: var(--paper); }
.k-tabs em { font-size: 13px; font-weight: 500; color: var(--ink-soft); margin-left: 0; }
.k-tabs button[aria-selected="true"], .k-tabs button[aria-selected="true"]:hover { background: var(--ink); border-color: var(--ink); color: #fff; }
.k-tabs button[aria-selected="true"] em { color: #d8cfc2; }
@media (min-width: 860px) { .k-tabs { margin-top: 18px; gap: 10px; } .k-tabs button { padding: 8px 18px; } }

/* ---------- ภาพรีวิวจาก Shopee: การ์ดรูปเลื่อนได้ (โชว์มุมซ้ายบนให้อ่านได้) กดแล้วดูเต็ม ---------- */
.rv-shots .rv-track { gap: 14px; }
.rv-shot { flex: none; display: block; width: 280px; height: 230px; border-radius: 14px; overflow: hidden; background: #fff;
  box-shadow: inset 0 0 0 1px var(--rule), 0 4px 14px rgba(51,51,51,.06); position: relative; cursor: zoom-in; }
.rv-shot img { width: 100%; height: 100%; object-fit: cover; object-position: left top; display: block; }
.rv-shot::after { content: ""; position: absolute; inset: auto 0 0 0; height: 48px; background: linear-gradient(transparent, #fff); pointer-events: none; }
.rv-shot:hover { box-shadow: inset 0 0 0 1px var(--red), 0 6px 18px rgba(51,51,51,.10); }
.rv-shots + .rv { margin-top: 8px; }
@media (min-width: 860px) { .rv-shot { width: 320px; height: 250px; } }
.zoom { border: 0; padding: 0; background: transparent; max-width: min(96vw, 1100px); max-height: 92vh; overflow: visible; }
.zoom::backdrop { background: rgba(20,20,20,.72); }
.zoom img { display: block; max-width: min(96vw, 1100px); max-height: 88vh; width: auto; height: auto; border-radius: 12px; background: #fff; }
.zoom-x { position: absolute; top: -14px; right: -6px; width: 40px; height: 40px; border-radius: 50%; border: 0; background: #fff; color: var(--ink); font-size: 18px; cursor: pointer; box-shadow: 0 2px 8px rgba(0,0,0,.25); }
/* เส้นกรอบดำ = เส้นบอกโฟกัสของเบราว์เซอร์ (ขึ้นหลังปิดรูปรีวิว) — ซ่อนกรอบใหญ่ ใช้เงาเบา ๆ ที่การ์ดแทนสำหรับคนใช้คีย์บอร์ด */
.rv:focus, .rv:focus-visible { outline: none; }
.rv-shot:focus { outline: none; }
.rv-shot:focus-visible { box-shadow: inset 0 0 0 2px var(--red); }
.zoom-x:focus { outline: none; }
.zoom-x:focus-visible { box-shadow: 0 0 0 3px rgba(195,0,47,.35); }
/* ปุ่มปิดรูปรีวิว: แค่ตัว × สีขาว มุมขวาบนเหนือรูป ไม่มีวงกลม */
.zoom-x, .zoom-x:focus, .zoom-x:focus-visible { top: -46px; right: -4px; width: 40px; height: 40px; padding: 0; border-radius: 0; background: none; box-shadow: none; outline: none;
  color: #fff; font-size: 30px; line-height: 40px; text-align: center; opacity: .9; }
.zoom-x:hover { opacity: 1; }
/* × อยู่ในรูป มุมขวาบน (รูปรีวิวพื้นขาว → ใช้สีเข้ม) */
.zoom-x, .zoom-x:focus, .zoom-x:focus-visible { top: 6px; right: 8px; width: 36px; height: 36px; line-height: 36px; font-size: 24px; color: var(--ink); opacity: .55; }
.zoom-x:hover { opacity: 1; }

/* ---------- การ์ดสินค้า/หมวด แบบกล่อง (คล้าย Shopee): พื้นขาว ขอบบาง รูปเต็มด้านบน ราคาอยู่ล่างสุด ---------- */
.shelf { gap: 14px; align-items: stretch; }
.card { display: flex; flex-direction: column; background: #fff; border-radius: 14px; overflow: hidden;
  box-shadow: 0 0 0 1px var(--paper), 0 2px 8px rgba(51,51,51,.05); transition: box-shadow .15s, transform .15s; }
.card:hover { box-shadow: 0 0 0 1px var(--red), 0 8px 20px rgba(51,51,51,.10); transform: translateY(-2px); }
.card .pic { border-radius: 0; background: #fff; }
.card:hover .pic img { transform: none; }
.card h3 { margin: 0; padding: 10px 12px 0; font-size: 16px; font-weight: 600; line-height: 1.35;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: calc(1.35em * 2 + 10px); }
.card .meta { padding: 4px 12px 0; margin: 0; font-size: 13px; line-height: 1.45; color: var(--ink-soft);
  display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.card .price { margin-top: auto; padding: 8px 12px 12px; font-size: 17px; font-weight: 700; color: var(--red); }
.card .badge { top: 8px; left: 8px; font-size: 12px; padding: 5px 9px; }
.card .noimg { background: repeating-linear-gradient(135deg, var(--paper) 0 14px, #f0e9df 14px 28px); }
@media (min-width: 860px) {
  .shelf { gap: 18px; }
  .card h3 { font-size: 17px; padding: 12px 14px 0; }
  .card .meta { padding: 4px 14px 0; font-size: 14px; }
  .card .price { padding: 10px 14px 14px; font-size: 18px; }
}
@media (max-width: 859px) { .card .price { font-size: 15px; letter-spacing: -.1px; } .card h3 { font-size: 15px; } }
.card .price small { display: block; font-size: 12px; font-weight: 500; color: var(--ink-soft); line-height: 1.2; margin-bottom: 1px; }
@media (min-width: 860px) { .card .price small { font-size: 13px; } }
/* แถบแท็บประเภทร้าน: ไม่ดูดปุ่มไปชิดซ้ายเอง */
.k-tabs { scroll-snap-type: none; }

/* ---------- แบนเนอร์หน้าแรก: รูปหมวดไหลเป็นฉากหลัง + กล่องข้อความกลาง (แบบ 10) ---------- */
.hero.hero-mq { position: relative; overflow: hidden; padding: 0; background: var(--paper); }
.hm-bg { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: center; gap: 10px; }
.hm-row { display: flex; gap: 10px; padding-right: 10px; width: max-content; animation: hm-flow 70s linear infinite; }
.hm-row.rev { animation-direction: reverse; }
.hm-row img { width: 112px; height: 112px; flex: none; border-radius: 14px; object-fit: cover; background: var(--white); }
@keyframes hm-flow { to { transform: translateX(-50%); } }
.hm-over { position: relative; z-index: 1; display: grid; place-items: center; padding: 44px 16px; background: rgba(238, 230, 219, .5); }
.hm-card { width: 100%; max-width: 460px; background: var(--white); border-radius: 22px; padding: 24px 18px 20px; text-align: center; box-shadow: 0 12px 32px rgba(51, 51, 51, .16); }
.hm-card h1 { font-size: clamp(25px, 6.8vw, 46px); line-height: 1.2; }
.hm-card .lead { margin: 8px auto 0; font-size: 15px; }
.hero-mq .hero-actions { margin-top: 16px; display: grid; gap: 10px; }
.hero-mq .hero-more { display: inline-flex; justify-content: center; }
.hero-mq + .perks { padding-top: 16px; }
@media (min-width: 860px) {
  .hm-bg { gap: 14px; }
  .hm-row { gap: 14px; padding-right: 14px; }
  .hm-row img { width: 168px; height: 168px; border-radius: 18px; }
  .hm-over { padding: 72px 24px; }
  .hm-card { max-width: 660px; padding: 38px 40px 34px; border-radius: 26px; }
  .hm-card .lead { font-size: 19px; }
  .hero-mq .hero-actions { display: flex; justify-content: center; flex-wrap: wrap; gap: 12px; margin-top: 22px; }
  .hero-mq + .perks { padding-top: 28px; }
}

/* ---------- แถบรูปหมวดไหล ท้ายหน้าแรก (แบบ 5) ---------- */
.cat-flow { text-align: center; }
.cat-flow .sec-title em { font-style: normal; color: var(--red); white-space: nowrap; }
.cf-mq { overflow: hidden; margin-top: 18px; -webkit-mask: linear-gradient(90deg, transparent, #000 5%, #000 95%, transparent); mask: linear-gradient(90deg, transparent, #000 5%, #000 95%, transparent); }
.cf-row { display: flex; gap: 12px; padding-right: 12px; width: max-content; animation: hm-flow 55s linear infinite; }
.cf-mq:hover .cf-row, .cf-mq:focus-within .cf-row { animation-play-state: paused; }
.cf-it { flex: none; width: 128px; color: var(--ink); text-decoration: none; }
.cf-it span { display: block; aspect-ratio: 1; border-radius: 16px; overflow: hidden; background: var(--white); box-shadow: 0 0 0 1px var(--paper); }
.cf-it span img { width: 100%; height: 100%; object-fit: cover; }
.cf-it b { display: block; margin-top: 6px; font-family: var(--head); font-weight: 600; font-size: 14px; line-height: 1.3; }
.cf-it:hover b { color: var(--red); }
@media (min-width: 860px) { .cf-it { width: 168px; } .cf-it b { font-size: 16px; } .cf-row { gap: 16px; padding-right: 16px; } }

/* คนที่ตั้งเครื่องให้ลดภาพเคลื่อนไหว: ไม่ไหล ปัดดูเองได้ */
@media (prefers-reduced-motion: reduce) {
  .hm-row, .cf-row { animation: none; }
  .cf-mq { overflow-x: auto; -webkit-mask: none; mask: none; }
  .cf-it[aria-hidden="true"] { display: none; }
}

/* ---------- แถบจุดเด่น 4 ข้อ แบบคลีน: ไม่มีไอคอน ข้อความสั้น เส้นแดงเล็กด้านบน ---------- */
.pk-list.pk-clean { padding: 0; border-radius: 18px; box-shadow: 0 1px 3px rgba(51,51,51,.06); }
.pk-clean li { position: relative; display: block; text-align: center; padding: 24px 10px 16px; min-width: 0; }
.pk-clean li::before { content: ""; position: absolute; top: 12px; left: 50%; width: 22px; height: 3px; margin-left: -11px; border-radius: 3px; background: var(--red); }
.pk-clean li:nth-child(n+3) { border-top: 1px solid var(--paper); }
.pk-clean li:nth-child(even) { border-left: 1px solid var(--paper); }
.pk-clean b { font-size: 15px; white-space: nowrap; }
.pk-clean span { font-size: 13px; white-space: nowrap; }
@media (max-width: 380px) { .pk-clean li:nth-child(even) { border-left: 1px solid var(--paper); } .pk-list.pk-clean { grid-template-columns: repeat(2, minmax(0, 1fr)); } .pk-clean b { font-size: 14px; } .pk-clean span { font-size: 12px; } }
@media (min-width: 860px) {
  .pk-list.pk-clean { padding: 0; }
  .pk-clean li { padding: 30px 16px 22px; }
  .pk-clean li::before { top: 16px; }
  .pk-clean li:nth-child(n+3) { border-top: 0; }
  .pk-clean li + li { border-left: 1px solid var(--paper); }
  .pk-clean b { font-size: 18px; }
  .pk-clean span { font-size: 14px; }
}
/* รูปฉากหลังแบนเนอร์ค่อย ๆ จางหายบน-ล่าง กลืนกับพื้นครีม ไม่เห็นขอบตัด */
.hm-bg { -webkit-mask-image: linear-gradient(180deg, transparent 0%, #000 14%, #000 72%, transparent 100%); mask-image: linear-gradient(180deg, transparent 0%, #000 14%, #000 72%, transparent 100%); }
.hm-over { background: rgba(238, 230, 219, .42); }
.hero-mq + .perks { padding-top: 4px; }
@media (min-width: 860px) { .hero-mq + .perks { padding-top: 8px; } }
/* ปุ่ม "ดูสินค้าทั้ง N หมวด" ในแบนเนอร์: พื้นชมพูอ่อน ตัวแดง มีลูกศร (แทนกรอบดำหนา) */
.hero-mq .hero-more { background: var(--paper); color: var(--red); border: 0; box-shadow: none; gap: 8px; transition: background .15s, color .15s; }
.hero-mq .hero-more::after { content: "→"; font-weight: 700; transition: transform .15s; }
.hero-mq .hero-more:hover { background: var(--red); color: #fff; }
.hero-mq .hero-more:hover::after { transform: translateX(3px); }

/* ---------- หน้าหมวด แบบคลีน: พื้นขาว หัวกระชับ การ์ดมีขอบ+เงา แถบราคาชมพู ---------- */
body[data-page="category"] main { background: var(--white); }
body[data-page="category"] .back-btn { box-shadow: inset 0 0 0 1px var(--rule); }
body[data-page="category"] .cat-head { padding: 4px 0 0; }
body[data-page="category"] .cat-head h1 { font-size: clamp(26px, 6.6vw, 38px); line-height: 1.2; }
body[data-page="category"] .cat-head .blurb { margin-top: 6px; font-size: 15px; line-height: 1.55; color: var(--ink-soft); max-width: 46em; }
body[data-page="category"] .cat-count { margin-top: 10px; display: flex; flex-wrap: wrap; gap: 6px; font-size: 14px; color: var(--ink); }
body[data-page="category"] .cat-count span { display: inline-flex; align-items: center; padding: 4px 11px; border-radius: 999px; background: var(--paper); font-weight: 600; }
body[data-page="category"] .cat-count span.pr { background: var(--paper); color: var(--red); }
/* ตัวเลือกเกรด: ไม่มีหัวข้อซ้ำ คำอธิบายเล็กลง */
body[data-page="category"] .gradebox { margin-top: 18px; }
body[data-page="category"] .gb-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
body[data-page="category"] .gb-seg { margin-top: 0; background: var(--paper); box-shadow: none; }
body[data-page="category"] .gb-desc { margin-top: 8px; font-size: 13px; }
body[data-page="category"] #c-shelf { margin-top: 20px; }
/* การ์ดสินค้า */
body[data-page="category"] .card { box-shadow: 0 0 0 1px var(--rule), 0 4px 14px rgba(0,0,0,.07); }
body[data-page="category"] .card:hover { box-shadow: 0 0 0 1.5px var(--red), 0 8px 20px rgba(0,0,0,.10); }
body[data-page="category"] .card .price { margin-top: 10px; padding-top: 8px; background: var(--paper); border-top: 1px solid var(--paper); }
body[data-page="category"] .cat-sticky .cs-bar { box-shadow: 0 2px 8px rgba(0,0,0,.08); }
@media (min-width: 860px) {
  body[data-page="category"] .cat-head .blurb { font-size: 17px; }
  body[data-page="category"] #c-shelf { margin-top: 26px; }
}
/* หน้าหมวด: หัวกระชับ — จำนวน/ราคา กับตัวเลือก MK/TK อยู่แถวเดียวกัน คำอธิบายหมวดย้ายไปใต้สินค้า */
body[data-page="category"] .cat-bar { margin-top: 10px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; }
body[data-page="category"] .cat-bar .cat-count { margin: 0; }
body[data-page="category"] .cat-bar .gradebox { margin: 0; }
body[data-page="category"] .gb-desc { display: none; }
body[data-page="category"] #c-shelf { margin-top: 16px; }
body[data-page="category"] .cat-count span.pr { background: var(--paper); color: var(--ink); }
.cat-about { margin: 22px 0 0; font-size: 15px; line-height: 1.6; color: var(--ink-soft); }
.cat-about b { color: var(--ink); margin-right: 4px; }
@media (min-width: 860px) { body[data-page="category"] #c-shelf { margin-top: 20px; } }
/* ราคาในการ์ด: สีเข้มปกติ ไม่ใช่สีแดง · หน้าหมวดไม่มีแถบชมพู */
.card .price { color: var(--ink); }
body[data-page="category"] .card .price { background: none; border-top: 1px solid var(--paper); }
/* ท้ายหมวด: ไม่มีข้อความแล้ว เหลือจุดอ้างอิงที่มองไม่เห็นให้แถบชื่อหมวดรู้ว่าหมวดจบตรงไหน */
.cat-end:empty { display: block; height: 0; margin: 0; }
.cat-end:empty::before, .cat-end:empty::after { content: none; }
body[data-page="category"] .cat-zone { padding-bottom: 36px; }
@media (min-width: 860px) { body[data-page="category"] .cat-zone { padding-bottom: 56px; } }
/* "ดูหมวดอื่นในร้าน" ในหน้าหมวด: แยกส่วนด้วยพื้นสีอ่อน + มุมโค้งด้านบน แทนเส้นแบ่งหนา */
body[data-page="category"] .other-cats { border-top: 0; background: var(--paper); border-radius: 28px 28px 0 0; }
body[data-page="category"] .other-cats .sec-title { font-size: clamp(22px, 5.6vw, 30px); }
body[data-page="category"] .other-cats .card { box-shadow: 0 1px 3px rgba(0,0,0,.06); }

/* ---------- แถบรีวิว: ไหลต่อเนื่องแบบเดียวกับแถบหมวดท้ายเว็บ ---------- */
.rv.rv-flow { overflow: hidden; -webkit-mask: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent); mask: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent); }
.rv-flow .rv-track { padding-right: 14px; animation: hm-flow var(--rv-dur, 60s) linear infinite; }
.rv-flow:hover .rv-track, .rv-flow:focus-within .rv-track, .rv-flow:active .rv-track { animation-play-state: paused; }
body:has(dialog#zoom[open]) .rv-flow .rv-track { animation-play-state: paused; }

/* ---------- หน้าสินค้า แบบคลีน ให้เข้ากับหน้าหมวด: พื้นขาว ปุ่มเลือกสีเข้ม ราคาสีปกติ ---------- */
body[data-page="product"] main { background: var(--white); }
body[data-page="product"] .back-btn { box-shadow: inset 0 0 0 1px var(--rule); }
body[data-page="product"] .gallery .main { background: #fff; box-shadow: 0 0 0 1px var(--paper); border-radius: 18px; }
body[data-page="product"] .pinfo h1 { font-size: clamp(24px, 6.2vw, 34px); line-height: 1.25; }
body[data-page="product"] .opts-title { font-size: 14px; }
body[data-page="product"] .opt { border: 1.5px solid var(--rule); background: #fff; border-radius: 12px; min-height: 44px; }
body[data-page="product"] .opt:hover { border-color: var(--ink); }
body[data-page="product"] .opt[aria-checked="true"] { border-color: var(--ink); background: var(--ink); color: #fff; }
body[data-page="product"] .pricebox { background: var(--paper); border: 0; box-shadow: none; border-radius: 16px; }
body[data-page="product"] .pb-main { color: var(--ink); }
body[data-page="product"] .pb-meta { border-top-color: var(--paper); }
body[data-page="product"] .grade-note { background: var(--paper); }
body[data-page="product"] .pinfo .note { font-size: 14px; color: var(--ink-soft); }
body[data-page="product"] .variants { background: #fff; box-shadow: 0 0 0 1px var(--paper); border-radius: 18px; }
body[data-page="product"] a.vrow:hover { background: var(--paper); }
body[data-page="product"] a.vrow.is-on { background: var(--paper); box-shadow: inset 4px 0 0 var(--ink); }
body[data-page="product"] .vrow .pp, body[data-page="product"] .vrow .pc { color: var(--ink); }

/* ---------- สีทั้งเว็บตาม 3 สีของร้าน: แดง #c3002f (จุดเน้น) · เทาเข้ม #333 (ตัวหนังสือ/ปุ่มที่เลือก) · ครีม #eee6db (พื้นรอง/เส้น) ---------- */
/* ปุ่มที่เลือกอยู่ = แดงของร้าน ทั้งปุ่มขนาด ปุ่มเกรด และแท็บหมวด */
body[data-page="product"] .opt[aria-checked="true"] { border-color: var(--red); background: var(--red); color: #fff; }
body[data-page="product"] a.vrow.is-on { box-shadow: inset 4px 0 0 var(--red); }
.gb.is-on, .gb.is-on:hover, a.gb.is-on:hover { background: var(--red); color: #fff; }
.gb.is-on em { color: rgba(255,255,255,.85); }
.k-tabs button[aria-selected="true"], .k-tabs button[aria-selected="true"]:hover { background: var(--red); border-color: var(--red); color: #fff; }
.k-tabs button[aria-selected="true"] em { color: rgba(255,255,255,.85); }

/* ---------- กำลังโหลดหน้า ---------- */
.pl-bar { position: fixed; top: 0; left: 0; z-index: 1000; height: 3px; width: 0; background: var(--red); box-shadow: 0 0 8px rgba(195, 0, 47, .45); opacity: 0; pointer-events: none; }
body.pl-on .pl-bar { opacity: 1; animation: pl-grow 6s cubic-bezier(.1, .7, .2, 1) forwards; }
@keyframes pl-grow { 0% { width: 0; } 20% { width: 55%; } 100% { width: 92%; } }
.pl-pill { position: fixed; left: 50%; bottom: 96px; z-index: 1000; transform: translate(-50%, 12px); display: inline-flex; align-items: center; gap: 10px;
  padding: 10px 18px; border-radius: 999px; background: var(--ink); color: #fff; font-family: var(--head); font-weight: 600; font-size: 15px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .2); opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; }
body.pl-slow .pl-pill { opacity: 1; transform: translate(-50%, 0); }
.pl-spin { width: 18px; height: 18px; border-radius: 50%; border: 2.5px solid rgba(255, 255, 255, .3); border-top-color: #fff; animation: pl-spin .8s linear infinite; }
@keyframes pl-spin { to { transform: rotate(360deg); } }
/* กดแล้วการ์ด/ปุ่มยุบลงนิดหนึ่ง เห็นว่ากดติด */
.card:active, .cf-it:active, .k-tabs button:active, .btn:active { transform: scale(.97); }
body.pl-on main { opacity: .55; transition: opacity .3s .15s; }
@media (min-width: 860px) { .pl-pill { bottom: 40px; } }
@media (prefers-reduced-motion: reduce) { body.pl-on .pl-bar { animation: none; width: 70%; } .pl-spin { animation-duration: 2s; } }
/* Safari หยุดแอนิเมชัน/การจางทันทีที่เริ่มเปิดหน้าใหม่ → ให้แถบและป้ายโผล่ทันที ไม่พึ่งการจาง */
.pl-bar { width: 38%; }
body.pl-on .pl-bar { opacity: 1; }
@keyframes pl-grow { 0% { width: 38%; } 100% { width: 92%; } }
.pl-pill { transition: none; }
body.pl-slow .pl-pill { opacity: 1; transform: translate(-50%, 0); }
body.pl-on main { transition: none; }

/* ---------- หน้าโหลด 4 แบบ (ทดสอบ) — html[data-pl] ---------- */
.pl-ov { position: fixed; inset: 0; z-index: 999; pointer-events: none; opacity: 0; }

/* ข. กล่องกลางจอ + พื้นครีมโปร่ง */
html[data-pl="b"] body.pl-on main { opacity: 1; }
html[data-pl="b"] body.pl-slow .pl-ov { opacity: 1; background: rgba(238, 230, 219, .7); }
html[data-pl="b"] .pl-pill { top: 50%; bottom: auto; transform: translate(-50%, -50%); flex-direction: column; gap: 12px; padding: 26px 34px 22px; border-radius: 22px; background: #fff; color: var(--ink); box-shadow: 0 16px 40px rgba(51, 51, 51, .18); }
html[data-pl="b"] body.pl-slow .pl-pill { transform: translate(-50%, -50%); }
html[data-pl="b"] .pl-spin { width: 34px; height: 34px; border-width: 3.5px; border-color: var(--paper); border-top-color: var(--red); }
html[data-pl="b"] .pl-txt { font-size: 16px; }

/* ค. เต็มจอสีครีม + โลโก้ร้าน + จุดแดง 3 จุด */










/* ง. ไม่บังจอ: แถบแดงหนาขึ้น + ของที่กดมีกรอบแดงและวงหมุนบนตัวมันเอง */








/* ---------- ตัวอย่าง: การ์ดหมวดให้ต่างจากการ์ดสินค้า (html[data-cc]) + แถบหัวหมวด (html[data-ch]) ---------- */
.cc-go, .ch-thumb { display: none; }

/* ก. แถวยาวแบบเมนู: รูปเล็กซ้าย ชื่อ + จำนวน + ลูกศร */












/* ข. รูปเต็มการ์ด ชื่ออยู่บนรูป ไม่มีราคา */









/* แถบหัวหมวด: พื้นครีม รูปปกหมวด ชื่อใหญ่ — เข้ามาแล้วเห็นว่าเป็นหน้าใหม่ */









/* ค. การ์ดรูปใหญ่ + ฐานสีครีม ไม่มีราคา + ปุ่มเม็ดยาแดง "ดู N สินค้า ›" */







/* ง. แถวใหญ่: รูปครึ่งการ์ดซ้าย ข้อความขวา (1 หมวดต่อแถว) */









/* จ. ไอคอนวงกลม 3 คอลัมน์ แบบเมนูหมวดในแอปช้อปปิ้ง */











/* ---------- แบบคลีน 3 แบบ (f g h) ---------- */
/* f. รายการในกล่องเดียว (แบบหน้าตั้งค่า iPhone): ขาว เส้นคั่นครีมบาง รูปเล็ก ลูกศรเทา */














/* g. การ์ดรูปบนพื้นครีม ชื่อใต้รูป "4 สินค้า →" ไม่มีราคา ไม่มีเงา */
html[data-cc="g"] .card-cat { background: none; box-shadow: none; border-radius: 0; }
html[data-cc="g"] .card-cat:hover { box-shadow: none; transform: none; }
html[data-cc="g"] .card-cat .pic { border-radius: 16px; overflow: hidden; background: var(--paper); }
html[data-cc="g"] .card-cat:hover .pic { box-shadow: 0 0 0 2px var(--red); }
html[data-cc="g"] .card-cat h3 { padding: 10px 2px 0; min-height: 0; font-size: 15px; -webkit-line-clamp: 2; }
html[data-cc="g"] .card-cat .meta, html[data-cc="g"] .card-cat .price { display: none; }
html[data-cc="g"] .card-cat .cc-go { display: block; padding: 3px 2px 0; font-size: 13px; color: var(--ink-soft); }
html[data-cc="g"] .card-cat .cc-go::after { content: ""; }
html[data-cc="g"] .card-cat:hover .cc-go { color: var(--red); }
@media (min-width: 860px) { html[data-cc="g"] .card-cat h3 { font-size: 17px; } html[data-cc="g"] .card-cat .cc-go { font-size: 14px; } }

/* h. แถวพื้นครีม รูปสี่เหลี่ยมใหญ่ซ้าย ชื่อ + จำนวน + ลูกศรแดงเล็ก */













/* ---------- แบบคลีนเพิ่ม (i k l) ---------- */
/* i. ปุ่มเม็ดยา 2 คอลัมน์: รูปกลมเล็ก + ชื่อ (แบบปุ่มเลือกหมวด) */










/* k. แบนเนอร์ยาว: รูปกว้างเต็มแถว ป้ายชื่อขาวมุมซ้ายล่าง */









/* l. การ์ดขาวขอบบาง รูปวางในกรอบครีม ชื่อ + จำนวน ไม่มีราคา */









/* ---------- หัวหน้าหมวด: แบบที่ลูกค้าเลือก (แท็บขีดเส้นใต้) ---------- */
html[data-ch] body[data-page="category"] .cat-head .ch-thumb img { width: 100%; height: 100%; object-fit: cover; }
/* 2. เรียบสุด: รูปเล็กข้างชื่อ ไม่มีกล่อง เส้นบางคั่นก่อนสินค้า */




/* 3. รูปปกเป็นแบนเนอร์ ชื่ออยู่ในกล่องขาวทับขอบล่าง */




/* 4. จัดกลาง: รูปวงกลม ชื่อ ป้าย ปุ่มเกรด อยู่กลางทั้งหมด */




/* 5. เส้นแดงหน้าชื่อ ตัวเลขเป็นข้อความเทาบรรทัดเดียว */




/* 6. แท็บขีดเส้นใต้ แทนปุ่มเกรด */
html[data-ch="6"] body[data-page="category"] .cat-head { display: grid; grid-template-columns: 40px 1fr; column-gap: 10px; align-items: center; }
html[data-ch="6"] .ch-thumb { display: block; width: 40px; height: 40px; border-radius: 10px; overflow: hidden; }
html[data-ch="6"] body[data-page="category"] .cat-head h1 { font-size: clamp(22px, 6vw, 32px); }
html[data-ch="6"] body[data-page="category"] .cat-head .cat-bar { grid-column: 1 / -1; flex-direction: column; align-items: stretch; }
html[data-ch="6"] body[data-page="category"] .gb-seg { display: flex; width: 100%; padding: 0; gap: 0; background: none !important; border-radius: 0; box-shadow: inset 0 -1px 0 var(--paper) !important; }
html[data-ch="6"] body[data-page="category"] .gb { flex: 1; justify-content: center; border-radius: 0; background: none !important; color: var(--ink-soft) !important; }
html[data-ch="6"] body[data-page="category"] .gb.is-on { color: var(--red) !important; box-shadow: inset 0 -3px 0 var(--red) !important; }
html[data-ch="6"] body[data-page="category"] .gb.is-on em { color: var(--red) !important; }
@media (min-width: 860px) { html[data-ch="6"] body[data-page="category"] .gb-seg { width: 420px; } }
/* 7. แถบครีมเต็มความกว้างจอ (ไม่มีมุมโค้ง) รูปใหญ่ขวา */







/* หน้าโหลดยังไม่เลือกแบบ: ปิดไว้จนกว่าลูกค้าจะเลือก (ทดสอบด้วย ?pl=a..d) */



/* ---------- ปุ่ม/ลิงก์ไปหน้าเทียบ ---------- */
.cmp-btn { display: inline-flex; align-items: center; gap: 8px; margin-top: 14px; padding: 9px 16px; border-radius: 999px; background: var(--paper); color: var(--red); font-family: var(--head); font-weight: 700; font-size: 15px; text-decoration: none; }
.cmp-btn:hover { background: var(--red); color: #fff; }
.cmp-link { display: inline-block; margin-top: 12px; color: var(--red); font-family: var(--head); font-weight: 600; font-size: 15px; text-decoration: none; }
.cmp-link:hover { text-decoration: underline; }

/* ---------- หน้าเทียบสินค้า ---------- */
body[data-page="compare"] main { background: var(--white); }
.cmp { padding-bottom: 40px; }
.cmp h1 { margin: 6px 0 4px; font-size: clamp(24px, 6.4vw, 36px); line-height: 1.2; }
.cmp h1 em { font-style: normal; color: var(--red); }
.cmp-sub { margin: 0; color: var(--ink-soft); font-size: 15px; }
.cmp-lab { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 20px 0 10px; font-family: var(--head); font-weight: 700; font-size: 16px; }
.cmp-clear { border: 0; background: none; color: var(--red); font: 600 14px var(--head); cursor: pointer; padding: 4px 0; }
.cmp-diff { display: inline-flex; align-items: center; gap: 6px; font-weight: 500; font-size: 14px; color: var(--ink-soft); cursor: pointer; }
.cmp-pick { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.cmp-tile { position: relative; display: grid; grid-template-columns: 56px 1fr; gap: 10px; align-items: center; padding: 8px; border: 1.5px solid var(--rule); border-radius: 14px; background: #fff; font-family: var(--body); color: var(--ink); text-align: left; cursor: pointer; }
.cmp-tile img, .cmp-tile .ni { width: 56px; height: 56px; border-radius: 10px; object-fit: cover; background: var(--paper); }
.cmp-tile .ni { display: grid; place-items: center; font-size: 11px; color: var(--ink-soft); }
.cmp-tile b { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-family: var(--head); font-size: 14px; line-height: 1.3; }
.cmp-tile > span > span { display: block; margin-top: 2px; font-size: 12px; color: var(--ink-soft); }
.cmp-tile em { position: absolute; top: -8px; right: -8px; width: 24px; height: 24px; border-radius: 50%; background: #fff; border: 1.5px solid var(--rule); display: grid; place-items: center; font-style: normal; font-weight: 700; font-size: 13px; color: #fff; }
.cmp-tile.on { border-color: var(--red); background: #fbeef1; }
.cmp-tile.on em { background: var(--red); border-color: var(--red); }
.cmp-status { margin: 10px 0 0; font-size: 14px; color: var(--ink-soft); }
.cmp-status b { color: var(--ink); }
.cmp-tbl { border-radius: 18px; box-shadow: 0 0 0 1px var(--rule); overflow: clip; }
.cr { display: grid; grid-template-columns: var(--cols); border-top: 1px solid var(--paper); }
.cr .cc { padding: 11px 10px; font-size: 14px; line-height: 1.4; border-left: 1px solid var(--paper); min-width: 0; overflow-wrap: anywhere; }
.cr .cc:first-child { border-left: 0; color: var(--ink-soft); font-size: 13px; }
.cr .cc.v { font-weight: 600; }
.cr.df .cc.v { background: #fdf7f8; }
.ch { position: sticky; top: var(--top, 0); z-index: 5; background: var(--ink); color: #fff; border-top: 0; }
.ch .cc { display: flex; flex-direction: column; border-left-color: rgba(255,255,255,.12); padding: 12px 10px; }
.ch .cc:first-child { justify-content: center; color: #fff; font-size: 15px; }
.ch .cc:first-child span { font-size: 12px; opacity: .7; margin-top: 2px; }
.ch img, .ch .ni { width: 100%; aspect-ratio: 4 / 3; border-radius: 10px; object-fit: cover; background: rgba(255,255,255,.1); margin-bottom: 8px; }
.ch .ni { display: grid; place-items: center; font-size: 12px; opacity: .7; }
.ch .pn { font-family: var(--head); font-size: 14px; line-height: 1.3; }
.ch .pp { margin-top: 4px; font-size: 12px; opacity: .8; }
.cmp-go { margin-top: auto; padding-top: 10px; }
.ch .cmp-go { display: block; margin-top: 10px; padding: 8px 6px; border-radius: 999px; background: #fff; color: var(--ink); text-align: center; font-family: var(--head); font-weight: 700; font-size: 13px; text-decoration: none; }
.cg { display: flex; align-items: center; gap: 10px; width: 100%; padding: 11px 12px; border: 0; border-top: 1px solid var(--rule); background: var(--paper); font: 700 15px var(--head); color: var(--ink); text-align: left; cursor: pointer; }
.cg i { width: 22px; height: 22px; border-radius: 6px; background: #fff; display: grid; place-items: center; font-style: normal; color: var(--red); line-height: 1; }
.cmp-empty { padding: 36px 16px; text-align: center; color: var(--ink-soft); }
.cmp-note { margin-top: 14px; font-size: 13px; color: var(--ink-soft); }
@media (min-width: 860px) {
  .cmp-pick { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .cr .cc { padding: 12px 16px; font-size: 15px; } .cr .cc:first-child { font-size: 14px; }
  .ch .cc { padding: 16px; } .ch .pn { font-size: 16px; }
}
.cat-head .cmp-btn { grid-column: 1 / -1; justify-self: start; white-space: nowrap; }
/* โน้ต "ไม่รวมค่าจัดส่ง" */
.pb-ship { margin: 10px 0 0; font-size: 13px; color: var(--ink-soft); }
body[data-page="category"] .cat-count span.ship { background: none !important; padding: 4px 2px; font-weight: 500; color: var(--ink-soft); font-size: 13px; }
.ch .pp small { display: block; margin-top: 2px; font-size: 11px; opacity: .8; }
.cmp-empty b { color: var(--ink); }
/* หัวตารางเทียบ: ไม่ติดด้านบน (Safari วาดหัวตารางแบบติดในกล่องมุมโค้งไม่ขึ้น เหลือช่องว่าง) */
.cmp-tbl { overflow: visible; }
.ch { position: static; border-radius: 18px 18px 0 0; }
.cmp-tbl > :last-child { border-radius: 0 0 18px 18px; }
