/* BigMK prototype — แนว A "ชั้นวางสินค้า" */
:root {
  --red: #c3002f;
  --ink: #333333;
  --paper: #eee6db;
  --white: #ffffff;
  --ink-soft: #5f5850;      /* ข้อความรอง บนพื้นขาวและพื้นเนื้อ */
  --rule: #d9cdbb;          /* เส้นแบ่ง */
  --line: #06c755;          /* ใช้กับปุ่ม LINE เท่านั้น */
  --line-ink: #fff;         /* ตัวหนังสือบนปุ่ม LINE (ขาว ตามที่ลูกค้าขอ) */
  --radius: 14px;
  --gutter: 16px;
  --max: 1120px;
  --head: "IBM Plex Sans Thai Looped", "Noto Sans Thai Looped", sans-serif; /* หัวข้อใช้ฟอนต์มีหัวด้วย (ตามที่ลูกค้าขอ 20 พ.ย.) */
  --body: "IBM Plex Sans Thai Looped", "Noto Sans Thai Looped", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.7;
  -webkit-text-size-adjust: 100%;
}
img { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--head); line-height: 1.3; margin: 0; }
p { margin: 0; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.nowrap { white-space: nowrap; }

/* ---------- ปุ่ม ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 54px; padding: 10px 24px;
  border-radius: 12px; border: 2px solid transparent;
  font-family: var(--head); font-weight: 700; font-size: 18px; line-height: 1.3;
  text-decoration: none; cursor: pointer;
  transition: transform .12s ease, background-color .15s ease, border-color .15s ease;
}
.btn:active { transform: translateY(1px) scale(.99); }
.btn:focus-visible, a:focus-visible, button:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }
.btn-line { background: var(--line); color: var(--line-ink); }
.btn-line:hover { background: #05b54c; }
.btn-line svg { width: 26px; height: 26px; flex: none; }
.btn-ghost { background: transparent; border-color: var(--ink); color: var(--ink); }
.btn-ghost:hover { background: var(--ink); color: var(--white); }
.btn-block { display: flex; width: 100%; }
.btn span { white-space: nowrap; }

/* ---------- ส่วนหัว ---------- */
.site-head { position: sticky; top: 0; z-index: 20; background: var(--white); border-bottom: 1px solid var(--rule); }
.site-head .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; }
.logo { display: flex; flex-direction: column; text-decoration: none; line-height: 1.2; }
.logo b { font-family: var(--head); font-size: 24px; font-weight: 700; color: var(--red);
  text-decoration: underline; text-decoration-thickness: 3px; text-underline-offset: 5px; }
.logo span { font-size: 14px; color: var(--ink); margin-top: 6px; }
.head-nav { display: none; align-items: center; gap: 28px; font-family: var(--head); font-weight: 500; font-size: 17px; }
.head-nav a { text-decoration: none; }
.head-nav a:hover { color: var(--red); }
.head-nav .btn { min-height: 46px; font-size: 16px; padding: 6px 18px; }
.head-link { font-family: var(--head); font-weight: 600; font-size: 16px; text-decoration: none; color: var(--red); padding: 10px 0; }

/* ---------- แบนเนอร์ ---------- */
.hero { padding: 20px 0 24px; }
.hero h1 { font-size: clamp(30px, 8.2vw, 54px); font-weight: 700; letter-spacing: -.01em; }
.hero h1 em { font-style: normal; color: var(--red); }
.hero .lead { margin-top: 10px; font-size: 18px; color: var(--ink-soft); max-width: 30em; }
.hero-pick { display: block; margin-top: 20px; background: var(--white); border-radius: 20px; overflow: hidden; text-decoration: none; position: relative; }
.hero-pick img { width: 100%; aspect-ratio: 552 / 317; object-fit: cover; transition: transform .4s ease; }
.hero-pick:hover img { transform: scale(1.03); }
.hero-pick .cap { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px; }
.hero-pick .cap b { font-family: var(--head); font-size: 20px; }
.hero-pick .cap span { font-family: var(--head); font-weight: 600; color: var(--red); font-size: 16px; white-space: nowrap; }
.badge { position: absolute; top: 14px; left: 14px; z-index: 1; background: var(--red); color: var(--white);
  font-family: var(--head); font-weight: 700; font-size: 15px; line-height: 1; padding: 8px 12px; border-radius: 999px; }
.hero-actions { margin-top: 16px; display: grid; gap: 12px; }
.hero-more { display: none; }

/* ---------- หัวข้อ section ---------- */
.band { padding: 36px 0 44px; }
.band-white { background: var(--white); }
.band-dark { background: var(--ink); color: var(--paper); }
.band-red { background: var(--red); color: var(--white); }
.sec-title { font-size: clamp(26px, 6.4vw, 36px); font-weight: 700; }
.sec-sub { margin-top: 6px; color: var(--ink-soft); }
.band-dark .sec-sub { color: #d8cfc2; }

/* ---------- ชั้นวางสินค้า ---------- */
.shelf { margin-top: 24px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 14px; }
.card { position: relative; display: block; text-decoration: none; }
.card .pic { position: relative; border-radius: var(--radius); overflow: hidden; background: var(--paper); aspect-ratio: 3 / 2; }
.card .pic img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.card .pic img.contain { object-fit: contain; }
.card:hover .pic img { transform: scale(1.04); }
.card .badge { top: 8px; left: 8px; font-size: 14px; padding: 6px 10px; }
.card h3 { margin-top: 10px; font-size: 18px; font-weight: 600; }
.card:hover h3 { color: var(--red); }
.card .meta { font-size: 15px; color: var(--ink-soft); line-height: 1.5; margin-top: 2px; }
.card .price { font-family: var(--head); font-weight: 600; color: var(--red); font-size: 16px; margin-top: 2px; }

/* ---------- ขั้นตอนสั่งซื้อ ---------- */
.steps { list-style: none; margin: 24px 0 0; padding: 0; display: grid; gap: 14px; }
.steps li { display: grid; grid-template-columns: 56px 1fr; gap: 14px; align-items: start; background: var(--white); border-radius: var(--radius); padding: 18px; }
.steps .ico { width: 56px; height: 56px; border-radius: 50%; background: var(--paper); display: grid; place-items: center; color: var(--red); }
.steps .ico svg { width: 30px; height: 30px; }
.steps h3 { font-size: 19px; font-weight: 700; }
.steps h3 i { font-style: normal; color: var(--red); margin-right: 6px; }
.steps p { color: var(--ink-soft); font-size: 16px; line-height: 1.6; margin-top: 2px; }

/* ---------- จุดขาย ---------- */
.points { margin-top: 24px; display: grid; gap: 24px; }
.points h3 { font-size: 24px; font-weight: 700; color: var(--white); }
.points p { color: #d8cfc2; margin-top: 4px; }
.points > div { border-top: 2px solid var(--red); padding-top: 14px; }

/* ---------- รีวิว ---------- */
.proof { margin-top: 24px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.slot { aspect-ratio: 3 / 4; border-radius: var(--radius); background: var(--paper); border: 2px dashed var(--rule);
  display: grid; place-items: center; text-align: center; padding: 12px; font-family: var(--head); font-weight: 600; font-size: 16px; line-height: 1.4; color: var(--ink-soft); }

/* ---------- จัดส่ง ---------- */
.info { margin-top: 24px; display: grid; gap: 14px; }
.info > div { background: var(--white); border-radius: var(--radius); padding: 20px; }
.info h3 { font-size: 20px; font-weight: 700; }
.info p { margin-top: 6px; }
.info strong { color: var(--red); font-family: var(--head); }

/* ---------- ติดต่อ ---------- */
.contact h2 { font-size: clamp(28px, 7vw, 40px); font-weight: 700; }
.contact p { margin-top: 8px; font-size: 18px; }
.contact .btn { margin-top: 20px; }
.contact dl { margin: 28px 0 0; display: grid; gap: 14px; }
.contact dt { font-size: 15px; opacity: .85; }
.contact dd { margin: 0; font-family: var(--head); font-weight: 600; font-size: 20px; }
.foot { background: var(--ink); color: #d8cfc2; font-size: 15px; padding: 18px 0 calc(18px + 76px); }

/* ---------- แถบ LINE ติดขอบล่าง (มือถือ) ---------- */
.linebar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; background: var(--white); border-top: 1px solid var(--rule);
  padding: 10px var(--gutter) calc(10px + env(safe-area-inset-bottom)); transform: translateY(110%); transition: transform .28s cubic-bezier(.2,.8,.2,1); }
.linebar.show { transform: none; }

/* ---------- หน้ารายละเอียดสินค้า ---------- */
.back { display: inline-flex; align-items: center; gap: 6px; padding: 14px 0; font-family: var(--head); font-weight: 600; text-decoration: none; }
.back:hover { color: var(--red); }
.detail { padding-bottom: 40px; display: grid; gap: 24px; }
.gallery .main { border-radius: 20px; overflow: hidden; background: var(--white); aspect-ratio: 4 / 3; }
.gallery .main img { width: 100%; height: 100%; object-fit: contain; }
.thumbs { margin-top: 10px; display: flex; gap: 10px; overflow-x: auto; padding-bottom: 4px; }
.thumbs button { flex: none; width: 76px; height: 76px; padding: 0; border-radius: 10px; overflow: hidden; background: var(--white); border: 2px solid transparent; cursor: pointer; }
.thumbs button[aria-pressed="true"] { border-color: var(--red); }
.thumbs img { width: 100%; height: 100%; object-fit: cover; }
.detail h1 { font-size: clamp(28px, 7.4vw, 40px); font-weight: 700; }
.detail .blurb { margin-top: 8px; font-size: 18px; }
.facts { list-style: none; padding: 0; margin: 14px 0 0; display: flex; flex-wrap: wrap; gap: 8px; }
.facts li { background: var(--white); border-radius: 999px; padding: 6px 14px; font-size: 15px; font-family: var(--head); font-weight: 500; }
.detail .buy { margin-top: 20px; display: none; }
.note { margin-top: 12px; font-size: 15px; color: var(--ink-soft); }

.variants { background: var(--white); border-radius: 20px; padding: 6px 18px 10px; }
.variants-title { font-size: 22px; font-weight: 700; margin: 0 0 12px; padding-top: 14px; }
.variants-title span { font-weight: 500; color: var(--ink-soft); font-size: 17px; margin-left: 4px; }
.vrow i { font-style: normal; }
.vhead { display: none; }
.vrow { display: grid; grid-template-columns: 1fr auto; gap: 2px 14px; padding: 14px 0; border-top: 1px solid var(--rule); }
.vrow:first-of-type { border-top: 0; }
.vrow .n { font-family: var(--head); font-weight: 600; font-size: 17px; line-height: 1.4; }
.vrow .s, .vrow .p { font-size: 15px; color: var(--ink-soft); line-height: 1.5; grid-column: 1; }
.vrow .pp, .vrow .pc { font-family: var(--head); font-weight: 600; color: var(--red); text-align: right; white-space: nowrap; font-size: 16px; line-height: 1.5; grid-column: 2; }
.vrow .pp { grid-row: 1; }
.vrow .pc { grid-row: 2; }
.vrow .pp small, .vrow .pc small { font-weight: 400; color: var(--ink-soft); font-size: 14px; }

/* ---------- จอกว้าง ---------- */
@media (min-width: 860px) {
  :root { --gutter: 32px; }
  body { font-size: 18px; }
  .head-nav { display: flex; }
  .head-link { display: none; }
  .site-head .wrap { min-height: 76px; }
  .hero { padding: 56px 0 64px; }
  .hero .wrap { display: grid; grid-template-columns: 5fr 6fr; gap: 56px; align-items: center; }
  .hero .lead { font-size: 20px; margin-top: 16px; }
  .hero-pick { margin-top: 0; grid-column: 2; grid-row: 1 / span 2; }
  .hero-text { align-self: end; }
  .hero-actions { align-self: start; margin-top: 0; display: flex; flex-wrap: wrap; }
  .hero-more { display: inline-flex; }
  .band { padding: 72px 0; }
  .shelf { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 40px 24px; margin-top: 36px; }
  .card h3 { font-size: 20px; }
  .steps { grid-template-columns: repeat(4, 1fr); gap: 20px; margin-top: 36px; }
  .steps li { grid-template-columns: 1fr; padding: 24px; }
  .points { grid-template-columns: repeat(3, 1fr); gap: 40px; margin-top: 36px; }
  .proof { grid-template-columns: repeat(4, 1fr); gap: 24px; margin-top: 36px; }
  .info { grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 36px; }
  .contact .wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
  .contact dl { margin-top: 0; }
  .foot { padding-bottom: 18px; }
  .linebar { display: none; }
  .detail { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 40px 48px; align-items: center; }
  .variants { grid-column: 1 / -1; }
  .detail .buy { display: inline-flex; }
  .variants { padding: 10px 28px 14px; }
  .vhead, .vrow { grid-template-columns: minmax(0, 4fr) minmax(0, 2fr) minmax(0, 2fr) 130px 130px; gap: 24px; align-items: baseline; }
  .vrow i { display: none; }
  .vhead { display: grid; padding: 12px 0; font-family: var(--head); font-weight: 600; font-size: 15px; color: var(--ink-soft); border-bottom: 2px solid var(--ink); }
  .vhead span:nth-child(n+4) { text-align: right; }
  .vrow .s, .vrow .p, .vrow .pp, .vrow .pc { grid-column: auto; grid-row: auto; font-size: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}

/* ================= แนว B — โชว์ทีละชิ้น ================= */
.b-hero { background: var(--ink); color: var(--paper); text-align: center; padding-top: 36px; overflow: hidden; }
.b-hero h1 { color: var(--white); font-size: clamp(32px, 9vw, 64px); font-weight: 700; }
.b-hero .lead { margin: 12px auto 0; color: #d8cfc2; font-size: 18px; max-width: 32em; }
.b-hero .hero-actions { margin-top: 22px; display: flex; justify-content: center; }
.b-hero-pic { display: block; position: relative; max-width: 920px; margin: 32px auto 0; padding: 0 var(--gutter); text-decoration: none; }
.b-hero-pic img { width: 100%; aspect-ratio: 552 / 317; object-fit: cover; border-radius: 20px 20px 0 0; }
.b-hero-pic .badge { left: calc(var(--gutter) + 14px); }
.b-hero-pic .cap { display: none; }
.b-index { margin-top: 18px; display: flex; flex-wrap: wrap; gap: 8px; }
.b-index a { background: var(--white); border-radius: 999px; padding: 8px 14px; font-family: var(--head); font-weight: 500; font-size: 15px; line-height: 1.3; text-decoration: none; }
.b-index a:hover { background: var(--ink); color: var(--white); }
.show-list { margin-top: 28px; display: grid; gap: 18px; }
.show-panel > a { display: grid; background: var(--white); border-radius: 20px; overflow: hidden; text-decoration: none; }
.show-pic { position: relative; aspect-ratio: 4 / 3; background: var(--white); }
.show-pic img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.show-pic img.contain { object-fit: contain; }
.show-panel > a:hover .show-pic img { transform: scale(1.03); }
.show-text { padding: 18px 20px 22px; }
.show-text h3 { font-size: 26px; font-weight: 700; }
.show-text p { margin-top: 6px; }
.show-meta { color: var(--ink-soft); font-size: 16px; }
.show-meta b { color: var(--red); font-family: var(--head); font-weight: 600; }
.show-more { display: inline-block; margin-top: 14px; font-family: var(--head); font-weight: 700; color: var(--red); }

/* ================= แนว C — ใบราคา ================= */
.c-hero { padding: 22px 0 18px; }
.c-hero h1 { font-size: clamp(28px, 7.6vw, 48px); font-weight: 700; }
.c-hero h1 em { font-style: normal; color: var(--red); }
.c-hero .lead { margin-top: 8px; font-size: 17px; color: var(--ink-soft); max-width: 36em; }
.c-hero .lead b { color: var(--ink); font-family: var(--head); }
.c-nav { position: sticky; top: 64px; z-index: 15; background: var(--paper); border-bottom: 1px solid var(--rule); }
.c-nav-in { max-width: var(--max); margin: 0 auto; display: flex; gap: 8px; overflow-x: auto; padding: 10px var(--gutter); scrollbar-width: none; }
.c-nav-in::-webkit-scrollbar { display: none; }
.c-nav-in a { flex: none; background: var(--white); border-radius: 999px; padding: 8px 14px; font-family: var(--head); font-weight: 500; font-size: 15px; line-height: 1.3; text-decoration: none; white-space: nowrap; }
.c-nav-in a.is-active { background: var(--ink); color: var(--white); }
#products.band-white:has(#pricelist) { padding-top: 8px; }
.c-cat { padding: 28px 0 8px; }
.c-cat + .c-cat { border-top: 1px solid var(--rule); }
.c-cat-head { display: grid; grid-template-columns: 92px 1fr; gap: 14px; align-items: center; }
.c-thumb { display: block; width: 92px; height: 92px; border-radius: 14px; overflow: hidden; background: var(--paper); }
.c-thumb img { width: 100%; height: 100%; object-fit: cover; }
.c-thumb img.contain { object-fit: contain; }
.c-cat-head h2 { font-size: 22px; font-weight: 700; }
.c-cat-head p { font-size: 15px; color: var(--ink-soft); line-height: 1.55; margin-top: 2px; }
.c-photos { display: inline-block; margin-top: 4px; font-family: var(--head); font-weight: 600; font-size: 15px; color: var(--red); text-decoration: none; }
.badge-inline { display: inline-block; vertical-align: middle; background: var(--red); color: var(--white); font-size: 13px; line-height: 1; padding: 5px 8px; border-radius: 999px; margin-left: 4px; }
.c-table { margin-top: 14px; }
.c-head { display: none; }
.c-row { display: grid; grid-template-columns: 1fr auto; gap: 0 12px; padding: 12px 0; border-top: 1px solid var(--rule); text-decoration: none; align-items: center; }
.c-row:hover .n { color: var(--red); }
.c-row i { font-style: normal; }
.c-row .n { font-family: var(--head); font-weight: 600; font-size: 17px; line-height: 1.4; grid-column: 1; }
.c-row .s, .c-row .p { font-size: 15px; color: var(--ink-soft); line-height: 1.5; grid-column: 1; }
.c-row .pp { grid-column: 2; grid-row: 1; text-align: right; font-family: var(--head); font-weight: 600; color: var(--red); white-space: nowrap; }
.c-row .pc { grid-column: 2; grid-row: 2; text-align: right; font-family: var(--head); font-weight: 600; color: var(--red); white-space: nowrap; font-size: 15px; }
.c-row small { font-weight: 400; color: var(--ink-soft); font-size: 13px; }
.c-row .go { grid-column: 2; grid-row: 3; justify-self: end; display: inline-flex; align-items: center; gap: 4px; background: var(--line); color: var(--line-ink); font-family: var(--head); font-weight: 700; font-size: 14px; line-height: 1; padding: 6px 10px; border-radius: 999px; }
.c-row .go svg { width: 16px; height: 16px; }
.c-after { padding-top: 28px; }

@media (min-width: 860px) {
  .b-hero { padding-top: 72px; }
  .b-hero .lead { font-size: 20px; }
  .b-index { margin-top: 24px; }
  .show-list { gap: 28px; margin-top: 40px; }
  .show-panel > a { grid-template-columns: 1fr 1fr; align-items: center; }
  .show-panel:nth-child(even) .show-pic { order: 2; }
  .show-pic { aspect-ratio: 5 / 4; }
  .show-text { padding: 40px 48px; }
  .show-text h3 { font-size: 34px; }
  .show-text p { font-size: 18px; }
  .c-hero { padding: 48px 0 28px; }
  .c-nav { top: 76px; }
  .c-cat { padding: 40px 0 12px; }
  .c-cat-head { grid-template-columns: 120px 1fr; gap: 20px; }
  .c-thumb { width: 120px; height: 120px; }
  .c-cat-head h2 { font-size: 26px; }
  .c-head, .c-row { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr) minmax(0, 2fr) 120px 120px 84px; gap: 20px; align-items: center; }
  .c-head { display: grid; padding: 10px 0; font-family: var(--head); font-weight: 600; font-size: 15px; color: var(--ink-soft); border-bottom: 2px solid var(--ink); }
  .c-head span:nth-child(4), .c-head span:nth-child(5) { text-align: right; }
  .c-row { border-top: 0; border-bottom: 1px solid var(--rule); }
  .c-row i { display: none; }
  .c-row .n, .c-row .s, .c-row .p, .c-row .pp, .c-row .pc, .c-row .go { grid-column: auto; grid-row: auto; font-size: 16px; }
  .c-row .go { font-size: 14px; }
}

/* ================= แนว D — รายการแบบแอป ================= */
.d-hero { padding: 22px 0 28px; }
.d-hero h1 { font-size: clamp(28px, 7.6vw, 48px); font-weight: 700; }
.d-hero h1 em { font-style: normal; color: var(--red); }
.d-hero .lead { margin-top: 8px; color: var(--ink-soft); }
.d-best-row { margin-top: 18px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.d-best { display: block; background: var(--white); border-radius: var(--radius); overflow: hidden; text-decoration: none; }
.d-best img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.d-best span { display: block; padding: 10px 12px 12px; }
.d-best b { display: block; font-family: var(--head); font-size: 17px; line-height: 1.35; }
.d-best em { font-style: normal; color: var(--red); font-family: var(--head); font-weight: 600; font-size: 15px; }
.d-list { margin-top: 18px; }
.d-row { display: grid; grid-template-columns: 84px 1fr 24px; gap: 14px; align-items: center; padding: 12px 0; border-top: 1px solid var(--rule); text-decoration: none; }
.d-row:last-child { border-bottom: 1px solid var(--rule); }
.d-thumb { width: 84px; height: 84px; border-radius: 14px; overflow: hidden; background: var(--paper); }
.d-thumb img { width: 100%; height: 100%; object-fit: cover; }
.d-thumb img.contain { object-fit: contain; }
.d-text b { display: block; font-family: var(--head); font-weight: 600; font-size: 18px; line-height: 1.35; }
.d-text > span { display: block; font-size: 15px; color: var(--ink-soft); line-height: 1.5; margin-top: 2px; }
.d-text em { font-style: normal; color: var(--red); font-family: var(--head); font-weight: 600; }
.d-go { font-size: 30px; line-height: 1; color: var(--ink-soft); text-align: center; }
.d-row:hover b { color: var(--red); }
.d-after { margin-top: 24px; }

/* ================= แนว E — เลือกตามประเภทร้าน ================= */
.e-hero { padding: 24px 0 32px; }
.e-hero h1 { font-size: clamp(30px, 8.2vw, 54px); font-weight: 700; }
.e-hero h1 em { font-style: normal; color: var(--red); }
.e-hero .lead { margin-top: 8px; color: var(--ink-soft); max-width: 34em; }
.e-pick { margin-top: 20px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.e-pick a { position: relative; display: block; aspect-ratio: 4 / 5; border-radius: 18px; overflow: hidden; background: var(--ink); text-decoration: none; color: var(--white);
  box-shadow: 0 6px 18px rgba(51, 51, 51, .14); transition: transform .15s ease, box-shadow .2s ease; }
.e-pick img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.e-pick a::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(51,51,51,.94) 0%, rgba(51,51,51,.72) 34%, rgba(51,51,51,.08) 68%, rgba(51,51,51,0) 100%); }
.e-pick-text { position: absolute; left: 0; right: 0; bottom: 0; z-index: 1; padding: 14px; }
.e-pick-text b { display: block; font-family: var(--head); font-weight: 700; font-size: 19px; line-height: 1.3; }
.e-pick-text em { display: inline-block; margin-top: 8px; font-style: normal; font-family: var(--head); font-weight: 600; font-size: 14px; line-height: 1; background: var(--red); padding: 7px 10px; border-radius: 999px; }
.e-pick a:hover { transform: translateY(-3px); box-shadow: 0 12px 28px rgba(51, 51, 51, .22); }
.e-pick a:hover img { transform: scale(1.06); }
.e-pick a:active { transform: scale(.98); }
.e-banner { position: relative; border-radius: 20px; overflow: hidden; background: var(--ink); color: var(--white); min-height: 150px; display: flex; align-items: flex-end; }
.e-banner img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.e-banner::after { content: ""; position: absolute; inset: 0; background: linear-gradient(100deg, rgba(51,51,51,.95) 0%, rgba(51,51,51,.82) 45%, rgba(51,51,51,.28) 100%); }
.e-banner > div { position: relative; z-index: 1; padding: 20px; }
.e-banner h2 { font-size: clamp(24px, 6.4vw, 36px); font-weight: 700; }
.e-banner h2::before { content: ""; display: block; width: 44px; height: 4px; background: var(--red); border-radius: 2px; margin-bottom: 10px; }
.e-banner p { margin-top: 4px; color: #eee6db; font-size: 16px; }
.e-hero .hero-actions { margin-top: 18px; }
.e-group { scroll-margin-top: 84px; }
.e-group + .e-group { margin-top: 48px; }
.e-all-wrap { margin-top: 48px; padding-top: 40px; border-top: 1px solid var(--rule); }
.e-all-wrap .b-index a { background: var(--paper); }

@media (min-width: 860px) {
  .d-hero { padding: 48px 0 56px; }
  .d-hero .wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 20px 48px; align-items: center; }
  .d-hero h1 { align-self: end; }
  .d-hero .lead { grid-column: 1; align-self: start; margin-top: 0; }
  .d-best-row { grid-column: 2; grid-row: 1 / span 2; margin-top: 0; gap: 20px; }
  .d-list { display: grid; grid-template-columns: 1fr 1fr; column-gap: 48px; margin-top: 28px; }
  .d-row:nth-last-child(2) { border-bottom: 1px solid var(--rule); }
  .d-row { grid-template-columns: 100px 1fr 24px; }
  .d-thumb { width: 100px; height: 100px; }
  .e-hero { padding: 56px 0 64px; }
  .e-pick { grid-template-columns: repeat(4, 1fr); gap: 20px; margin-top: 32px; }
  .e-pick a { aspect-ratio: 4 / 4.6; border-radius: 22px; }
  .e-pick-text { padding: 22px; }
  .e-pick-text b { font-size: 23px; }
  .e-pick-text em { font-size: 15px; }
  .e-banner { min-height: 200px; }
  .e-banner > div { padding: 32px 36px; }
  .e-banner p { font-size: 18px; }
}

/* ================= ใช้ร่วม F–J ================= */
.vtable .vrow:first-child { border-top: 0; }

/* ================= แนว F — เลื่อนข้างแบบแอปช้อปปิ้ง ================= */
.f-hero { padding: 22px 0 28px; }
.f-hero h1 { font-size: clamp(28px, 7.6vw, 48px); font-weight: 700; }
.f-hero h1 em { font-style: normal; color: var(--red); }
.f-slides { margin-top: 18px; display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 0 var(--gutter) 6px; scroll-padding: 0 var(--gutter); scrollbar-width: none; }
.f-slides::-webkit-scrollbar, .f-strip::-webkit-scrollbar { display: none; }
.f-slide { flex: 0 0 86%; scroll-snap-align: start; position: relative; border-radius: 20px; overflow: hidden; background: var(--white); text-decoration: none; }
.f-slide img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.f-cap { display: block; padding: 12px 16px 16px; }
.f-cap b { font-family: var(--head); font-size: 20px; }
.f-cap em { display: block; font-style: normal; color: var(--red); font-family: var(--head); font-weight: 600; font-size: 16px; }
.f-hero .hero-actions { margin-top: 16px; }
.f-row { margin-top: 28px; }
.f-row-head { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.f-row-head h2 { font-size: 21px; font-weight: 700; }
.f-row-head a { flex: none; font-family: var(--head); font-weight: 600; font-size: 15px; color: var(--red); text-decoration: none; padding: 6px 0; }
.f-strip { margin-top: 10px; display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x proximity; padding: 0 var(--gutter) 4px; scroll-padding: 0 var(--gutter); scrollbar-width: none; }
.f-item { flex: 0 0 156px; scroll-snap-align: start; text-decoration: none; }
.f-pic { display: block; border-radius: 14px; overflow: hidden; background: var(--paper); aspect-ratio: 1; }
.f-pic img { width: 100%; height: 100%; object-fit: cover; }
.f-pic img.contain { object-fit: contain; }
.f-item b { display: block; margin-top: 8px; font-family: var(--head); font-weight: 600; font-size: 16px; line-height: 1.35; }
.f-item span:not(.f-pic) { display: block; font-size: 14px; color: var(--ink-soft); line-height: 1.45; }
.f-item em { display: block; font-style: normal; font-family: var(--head); font-weight: 600; color: var(--red); font-size: 15px; margin-top: 2px; }

/* ================= แนว G — แท็บหมวดสินค้า ================= */
.g-hero { padding: 22px 0 24px; }
.g-hero h1 { font-size: clamp(28px, 7.6vw, 48px); font-weight: 700; }
.g-hero h1 em { font-style: normal; color: var(--red); }
.g-hero .lead { margin-top: 8px; color: var(--ink-soft); }
.g-hidden { display: none; }
.g-tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.g-tabs button { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 8px 6px 10px; border: 2px solid var(--rule); border-radius: 14px; background: var(--white);
  font-family: var(--head); font-weight: 600; font-size: 14px; line-height: 1.3; color: var(--ink); cursor: pointer; text-align: center; transition: border-color .15s ease, background-color .15s ease; }
.g-tabs button[aria-selected="true"] { border-color: var(--red); background: #fbf2f4; color: var(--red); }
.g-ico { width: 100%; aspect-ratio: 4 / 3; border-radius: 8px; overflow: hidden; background: var(--paper); }
.g-ico img { width: 100%; height: 100%; object-fit: cover; }
.g-ico img.contain { object-fit: contain; }
.g-panel { margin-top: 24px; display: grid; gap: 18px; scroll-margin-top: 80px; background: var(--paper); border-radius: 20px; padding: 16px; }
.g-panel.is-switching { animation: g-in .25s ease; }
@keyframes g-in { from { opacity: 0; transform: translateY(6px); } }
.g-media { border-radius: 14px; overflow: hidden; background: var(--white); aspect-ratio: 4 / 3; }
.g-media img { width: 100%; height: 100%; object-fit: contain; }
.g-info h2 { font-size: 26px; font-weight: 700; }
.g-info p { margin-top: 6px; }
.g-info .btn { margin-top: 14px; }
.g-more { display: block; margin-top: 12px; font-family: var(--head); font-weight: 600; color: var(--red); text-decoration: none; }
.g-table { background: var(--white); border-radius: 14px; padding: 6px 16px 8px; }
.g-table h3 { font-size: 19px; padding: 12px 0 8px; }
.g-table h3 span { font-weight: 500; color: var(--ink-soft); font-size: 16px; }

/* ================= แนว H — แบรนด์สีแดงเด่น ================= */
.h-hero { background: var(--red); color: var(--white); padding: 28px 0 32px; }
.h-hero h1 { font-size: clamp(32px, 9vw, 58px); font-weight: 700; }
.h-hero .lead { margin-top: 10px; font-size: 18px; color: #fde9ec; }
.h-hero .hero-actions { margin-top: 18px; }
.h-hero .hero-pick .cap span { color: var(--red); }
.h-tiles { margin-top: 24px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.h-tile { position: relative; display: block; border-radius: 16px; overflow: hidden; aspect-ratio: 4 / 5; background: var(--white); text-decoration: none; }
.h-tile img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.h-tile img.contain { object-fit: contain; }
.h-tile:hover img { transform: scale(1.04); }
.h-tile .badge { top: 10px; left: 10px; font-size: 14px; padding: 6px 10px; }
.h-name { position: absolute; left: 0; right: 0; bottom: 0; padding: 36px 12px 12px; background: linear-gradient(to top, rgba(51,51,51,.92), rgba(51,51,51,.72) 60%, rgba(51,51,51,0)); color: var(--white); }
.h-name b { display: block; font-family: var(--head); font-size: 18px; line-height: 1.3; }
.h-name em { font-style: normal; font-size: 15px; color: #eee6db; }

/* ================= แนว I — เลือกทีละขั้น ================= */
.i-hero { padding: 22px 0 24px; }
.i-hero h1 { font-size: clamp(30px, 8.2vw, 52px); font-weight: 700; }
.i-hero h1 em { font-style: normal; color: var(--red); }
.i-hero .lead { margin-top: 6px; color: var(--ink-soft); }
.i-step { scroll-margin-top: 80px; }
.i-step + .i-step { margin-top: 36px; padding-top: 28px; border-top: 1px solid var(--rule); }
.i-step h2 { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 24px; font-weight: 700; }
.i-step h2 small { font-size: 16px; font-weight: 500; color: var(--ink-soft); }
.i-no { width: 36px; height: 36px; border-radius: 50%; background: var(--red); color: var(--white); display: inline-grid; place-items: center; font-size: 19px; flex: none; }
.i-cats { margin-top: 16px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.i-cats button, .i-items button { font: inherit; color: inherit; text-align: left; cursor: pointer; background: var(--white); border: 2px solid var(--rule); border-radius: 14px; transition: border-color .15s ease, background-color .15s ease; }
.i-cats button { display: grid; grid-template-columns: 56px 1fr; gap: 10px; align-items: center; padding: 8px; font-family: var(--head); font-weight: 600; font-size: 15px; line-height: 1.3; }
.i-cats button[aria-pressed="true"], .i-items button[aria-pressed="true"] { border-color: var(--red); background: #fbf2f4; }
.i-pic { width: 56px; height: 56px; border-radius: 10px; overflow: hidden; background: var(--paper); }
.i-pic img { width: 100%; height: 100%; object-fit: cover; }
.i-pic img.contain { object-fit: contain; }
.i-items { margin-top: 16px; display: grid; gap: 10px; }
.i-items button { padding: 12px 14px; display: grid; gap: 2px; }
.i-items b { font-family: var(--head); font-size: 17px; }
.i-items span { font-size: 15px; color: var(--ink-soft); line-height: 1.5; }
.i-items em { font-style: normal; font-family: var(--head); font-weight: 600; color: var(--red); font-size: 16px; }
.i-summary { margin: 16px 0 14px; display: grid; grid-template-columns: 84px 1fr; gap: 14px; align-items: center; background: var(--paper); border-radius: 14px; padding: 12px; }
.i-thumb { width: 84px; height: 84px; border-radius: 10px; overflow: hidden; background: var(--white); }
.i-thumb img { width: 100%; height: 100%; object-fit: cover; }
.i-summary b { display: block; font-family: var(--head); font-size: 17px; line-height: 1.35; }
.i-summary span { display: block; font-size: 15px; color: var(--ink-soft); }
.i-summary em { font-style: normal; font-family: var(--head); font-weight: 600; color: var(--red); }
.i-help { display: none; }

/* ================= แนว J — มินิมอลตัวหนังสือใหญ่ ================= */
body[data-layout="j"] { background: var(--white); }
.j-hero { padding: 40px 0 48px; border-bottom: 1px solid var(--rule); }
.j-hero h1 { font-size: clamp(46px, 14vw, 112px); font-weight: 700; line-height: 1.12; letter-spacing: -.01em; }
.j-hero h1 em { font-style: normal; color: var(--red); }
.j-hero .lead { margin-top: 16px; color: var(--ink-soft); font-size: 18px; max-width: 30em; }
.j-hero .hero-actions { margin-top: 22px; }
.j-products { padding: 40px 0 56px; }
.j-label { font-size: 16px; font-weight: 600; color: var(--ink-soft); }
.j-list { margin-top: 12px; }
.j-row { display: grid; grid-template-columns: 1fr auto 64px; gap: 14px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--rule); text-decoration: none; }
.j-row:first-child { border-top: 2px solid var(--ink); }
.j-name { font-family: var(--head); font-weight: 600; font-size: clamp(20px, 5.6vw, 34px); line-height: 1.25; transition: color .15s ease, transform .2s ease; }
.j-row:hover .j-name { color: var(--red); transform: translateX(6px); }
.j-meta { font-size: 15px; color: var(--ink-soft); white-space: nowrap; }
.j-thumb { width: 64px; height: 64px; border-radius: 10px; overflow: hidden; background: var(--paper); }
.j-thumb img { width: 100%; height: 100%; object-fit: cover; }
.j-thumb img.contain, .j-preview img.contain { object-fit: contain; }
.j-preview { display: none; }

@media (min-width: 860px) {
  .f-hero { padding: 48px 0 48px; }
  .f-slides { max-width: calc(var(--max)); margin: 24px auto 0; gap: 20px; }
  .f-slide { flex-basis: calc((100% - 40px) / 3); }
  .f-row { margin-top: 40px; }
  .f-strip { max-width: var(--max); margin: 12px auto 0; gap: 18px; }
  .f-item { flex-basis: 190px; }

  .g-hero { padding: 48px 0 40px; }
  .g-tabs { grid-template-columns: repeat(6, 1fr); gap: 12px; }
  .g-tabs button { font-size: 15px; }
  .g-panel { grid-template-columns: 5fr 6fr; gap: 28px 40px; padding: 28px; align-items: center; }
  .g-table { grid-column: 1 / -1; padding: 10px 28px 14px; }

  .h-hero { padding: 56px 0 64px; }
  .h-hero .wrap { display: grid; grid-template-columns: 5fr 6fr; gap: 56px; align-items: center; }
  .h-hero .hero-pick { margin-top: 0; }
  .h-hero .lead { font-size: 20px; }
  .h-tiles { grid-template-columns: repeat(4, 1fr); gap: 20px; margin-top: 36px; }
  .h-tile { aspect-ratio: 4 / 4.6; }
  .h-name b { font-size: 20px; }

  .i-hero { padding: 48px 0 36px; }
  .i-cats { grid-template-columns: repeat(4, 1fr); gap: 14px; }
  .i-items { grid-template-columns: repeat(3, 1fr); gap: 14px; }
  .i-step3-wrap, #i-step3 { max-width: 640px; }

  .j-hero { padding: 80px 0 72px; }
  .j-products { padding: 64px 0 88px; }
  .j-grid { display: grid; grid-template-columns: 7fr 5fr; gap: 56px; align-items: start; }
  .j-row { grid-template-columns: 1fr auto; }
  .j-thumb { display: none; }
  .j-preview { display: block; position: sticky; top: 110px; margin-top: 12px; border-radius: 20px; overflow: hidden; background: var(--paper); aspect-ratio: 4 / 5; }
  .j-preview img { width: 100%; height: 100%; object-fit: cover; }
}
.g-panel { grid-template-columns: minmax(0, 1fr); }
.g-info .btn span { white-space: normal; text-align: left; }
@media (min-width: 860px) { .g-panel { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); } }

/* ================= ที่คุณเพิ่งดู (แบบ E และหน้าสินค้า) ================= */
.recent { background: var(--white); padding: 14px 0 16px; border-bottom: 1px solid var(--rule); }
.r-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.r-head h2 { font-size: 20px; font-weight: 700; }
.r-head button { font: inherit; font-size: 15px; color: var(--ink-soft); background: none; border: 0; padding: 6px 0; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.r-head button:hover { color: var(--red); }
.r-strip { margin-top: 10px; display: flex; gap: 10px; overflow-x: auto; scrollbar-width: none; margin-right: calc(var(--gutter) * -1); padding-right: var(--gutter); }
.r-strip::-webkit-scrollbar { display: none; }
.r-item { flex: none; display: grid; grid-template-columns: 60px auto; gap: 12px; align-items: center; padding: 8px 16px 8px 8px; max-width: 250px; background: var(--paper); border-radius: 14px; text-decoration: none; transition: background-color .15s ease; }
.r-item:hover { background: #e6dccd; }
.r-item img { width: 60px; height: 60px; border-radius: 10px; object-fit: cover; background: var(--white); }
.r-item img.contain { object-fit: contain; }
.r-item b { display: block; font-family: var(--head); font-weight: 600; font-size: 16px; line-height: 1.3; }
.r-item em { font-style: normal; font-family: var(--head); font-weight: 600; font-size: 14px; color: var(--red); }

/* ================= สินค้าขายดี (แบบ E) — อยู่บนสุดของหน้า ================= */
.e-best { padding: 20px 0 24px; }
.e-best .sec-title { font-size: 22px; display: flex; align-items: center; gap: 10px; }
.e-best .sec-title::before { content: ""; width: 28px; height: 4px; background: var(--red); border-radius: 2px; }
.e-best-list { margin-top: 14px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.e-best-card { display: block; background: var(--white); color: var(--ink); border-radius: 16px; overflow: hidden; text-decoration: none; transition: transform .15s ease; }
.e-best-card:hover { transform: translateY(-3px); }
.e-best-pic { position: relative; display: block; aspect-ratio: 4 / 3; overflow: hidden; }
.e-best-pic img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.e-best-card:hover img { transform: scale(1.05); }
.e-best-pic .badge { top: 8px; left: 8px; font-size: 14px; padding: 6px 10px; }
.e-best-text { display: block; padding: 10px 12px 14px; }
.e-best-text b { display: block; font-family: var(--head); font-size: 17px; line-height: 1.3; }
.e-best-text > span, .e-best-text i { display: none; }
.e-best-text em { display: block; margin-top: 4px; font-style: normal; font-family: var(--head); font-weight: 600; font-size: 14px; line-height: 1.45; color: var(--red); }

@media (min-width: 860px) {
  .recent { padding: 24px 0 26px; }
  .e-best { padding: 36px 0 40px; }
  .e-best .sec-title { font-size: 26px; }
  .e-best-list { gap: 24px; margin-top: 20px; }
  .e-best-card { display: grid; grid-template-columns: 1fr 1fr; border-radius: 20px; }
  .e-best-pic { aspect-ratio: auto; min-height: 220px; }
  .e-best-pic .badge { top: 14px; left: 14px; font-size: 15px; padding: 8px 12px; }
  .e-best-text { padding: 22px 24px; align-self: center; }
  .e-best-text b { font-size: 24px; }
  .e-best-text > span { display: block; margin-top: 4px; font-size: 16px; line-height: 1.55; color: var(--ink-soft); }
  .e-best-text em { font-size: 16px; margin-top: 8px; }
  .e-best-text i { display: inline-block; margin-top: 12px; font-style: normal; font-family: var(--head); font-weight: 700; border-bottom: 2px solid var(--red); padding-bottom: 2px; }
}


/* ================= แนว K — ชั้นวาง (A) + ประเภทร้าน (E) + ค้นหา ================= */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.k-hero { padding: 22px 0 26px; }
.k-hero h1 { font-size: clamp(28px, 7.6vw, 48px); font-weight: 700; }
.k-hero h1 em, .k-em { font-style: normal; color: var(--red); }
.k-hero .lead { margin-top: 8px; color: var(--ink-soft); }
.k-search { margin-top: 18px; max-width: 760px; }
.k-box { display: flex; align-items: center; gap: 10px; min-height: 58px; padding: 0 8px 0 16px; background: var(--white); border: 2px solid var(--ink); border-radius: 14px; cursor: text; }
.k-box:focus-within { border-color: var(--red); box-shadow: 0 0 0 4px rgba(195, 0, 47, .14); }
.k-box svg { width: 24px; height: 24px; flex: none; color: var(--ink-soft); }
.k-box input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font-family: var(--body); font-size: 18px; color: var(--ink); padding: 14px 0; }
.k-box input::placeholder { color: #8a8178; }
.k-box input::-webkit-search-cancel-button { display: none; }
.k-clear { flex: none; width: 44px; height: 44px; border: 0; border-radius: 10px; background: var(--paper); color: var(--ink); font-size: 18px; cursor: pointer; }
.k-tags { margin-top: 10px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.k-tags span { font-size: 15px; color: var(--ink-soft); }
.k-tags button { font: inherit; font-family: var(--head); font-weight: 500; font-size: 15px; line-height: 1.3; padding: 7px 12px; border: 1px solid var(--rule); border-radius: 999px; background: var(--white); color: var(--ink); cursor: pointer; }
.k-tags button:hover { border-color: var(--red); color: var(--red); }
.k-results { margin-top: 14px; background: var(--white); border-radius: 16px; padding: 6px 14px 10px; scroll-margin-top: 84px; box-shadow: 0 8px 24px rgba(51, 51, 51, .1); }
.k-count { font-size: 15px; color: var(--ink-soft); padding: 8px 0 4px; }
.k-hit { display: grid; grid-template-columns: 56px 1fr; gap: 2px 12px; align-items: center; padding: 10px 0; border-top: 1px solid var(--rule); text-decoration: none; }
.k-hit img { grid-row: span 2; width: 56px; height: 56px; border-radius: 10px; object-fit: cover; background: var(--paper); }
.k-hit img.contain { object-fit: contain; }
.k-hit b { display: block; font-family: var(--head); font-weight: 600; font-size: 16px; line-height: 1.35; }
.k-hit small { display: block; font-size: 14px; color: var(--ink-soft); line-height: 1.45; }
.k-hit em { grid-column: 2; font-style: normal; font-family: var(--head); font-weight: 600; color: var(--red); white-space: nowrap; font-size: 16px; }
.k-hit em small { display: inline; font-weight: 400; font-size: 13px; }
.k-hit:hover b { color: var(--red); }
.k-more { width: 100%; margin-top: 6px; min-height: 48px; font: inherit; font-family: var(--head); font-weight: 700; font-size: 16px; color: var(--red); background: var(--paper); border: 0; border-radius: 12px; cursor: pointer; }
.k-empty { padding: 12px 0 8px; }
.k-empty b { font-family: var(--head); font-size: 18px; }
.k-empty p { color: var(--ink-soft); font-size: 16px; margin: 4px 0 14px; }
.k-pick { margin-top: 18px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.k-pick button { position: relative; display: block; aspect-ratio: 16 / 10; padding: 0; border: 3px solid transparent; border-radius: 16px; overflow: hidden; background: var(--ink); color: var(--white); cursor: pointer; text-align: left; transition: transform .15s ease, border-color .15s ease; }
.k-pick button::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(51,51,51,.94), rgba(51,51,51,.55) 55%, rgba(51,51,51,.1)); }
.k-pick img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.k-pick button:hover img { transform: scale(1.06); }
.k-pick button > span { position: absolute; left: 0; right: 0; bottom: 0; z-index: 1; padding: 10px 12px; }
.k-pick b { display: block; font-family: var(--head); font-weight: 700; font-size: 16px; line-height: 1.3; }
.k-pick em { font-style: normal; font-size: 13px; color: #eee6db; }
.k-pick button[aria-pressed="true"] { border-color: var(--red); transform: translateY(-2px); }
.k-pick button[aria-pressed="true"] em { color: var(--white); background: var(--red); padding: 2px 8px; border-radius: 999px; }
.k-shelf-head { margin-top: 28px; display: flex; align-items: baseline; justify-content: space-between; gap: 12px; scroll-margin-top: 84px; border-bottom: 2px solid var(--ink); padding-bottom: 8px; }
.k-shelf-head h3 { font-size: 22px; font-weight: 700; }
.k-shelf-head small { font-size: 16px; font-weight: 500; color: var(--ink-soft); margin-left: 4px; }
.k-reset { flex: none; font: inherit; font-family: var(--head); font-weight: 600; font-size: 15px; color: var(--red); background: none; border: 0; padding: 8px 0; cursor: pointer; }
#products .k-shelf-head + .shelf { margin-top: 18px; }

@media (min-width: 860px) {
  .k-hero { padding: 48px 0 44px; }
  .k-box { min-height: 64px; }
  .k-box input { font-size: 19px; }
  .k-results { padding: 8px 22px 14px; }
  .k-hit { grid-template-columns: 64px 1fr auto; }
  .k-hit em { grid-column: 3; grid-row: 1 / span 2; }
  .k-hit img { width: 64px; height: 64px; }
  .k-pick { grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 24px; }
  .k-pick b { font-size: 19px; }
  .k-pick em { font-size: 14px; }
  .k-pick button > span { padding: 14px 16px; }
  .k-shelf-head { margin-top: 40px; }
}

/* แบบ K ที่หน้าตาเหมือน A: ช่องค้นหาอยู่ในแบนเนอร์ใต้คำโปรย */
.hero .k-search { margin-top: 18px; }
.hero .k-results { position: relative; z-index: 2; }
.k-pick { scroll-margin-top: 84px; }
.k-shelf-head[hidden] { display: none; }
@media (min-width: 860px) {
  .hero .k-search { margin-top: 24px; }
}

/* แบบ K: แยก "เลือกตามประเภทร้าน" (พื้นขาว) กับ "สินค้าทั้งหมด" (พื้นสีเนื้อ) ให้เห็นเป็นคนละส่วน */
.k-cats { border-top: 1px solid var(--rule); }
.k-cats .k-pick { margin-top: 20px; }
.k-all { scroll-margin-top: 64px; }
.k-shelf-top { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 16px; }
#k-shelf-count { font-size: .6em; font-weight: 500; color: var(--ink-soft); margin-left: 4px; white-space: nowrap; }
.k-all .k-reset { font-size: 16px; padding: 10px 16px; border: 2px solid var(--red); border-radius: 999px; background: var(--white); }
.k-all .k-reset:hover { background: var(--red); color: var(--white); }
.k-all.is-filtered #k-shelf-title { color: var(--red); }
.k-all .shelf { margin-top: 22px; }
.k-all .card .pic { background: var(--white); }
@media (min-width: 860px) { .k-all { scroll-margin-top: 76px; } }

/* ===== แบบ K (ปรับตามแผน 13 พ.ย.): ค้นหาบนสุดบรรทัดเดียว + แท็บประเภทร้านติดกับตารางสินค้า ===== */
.k-searchbar { background: var(--white); border-bottom: 1px solid var(--rule); padding: 10px 0; }
.k-searchbar .k-search { margin: 0 auto; max-width: none; }
.k-searchbar .k-box { min-height: 50px; border-width: 2px; border-color: var(--rule); background: var(--paper); }
.k-searchbar .k-box:focus-within { background: var(--white); }
.k-searchbar .k-box input { font-size: 17px; padding: 10px 0; }
.k-searchbar .k-clear { width: 40px; height: 40px; background: var(--white); }
.k-searchbar .k-tags { display: none; }
.k-searchbar .k-search:focus-within:not(.has-q) .k-tags { display: flex; }
.k-searchbar .k-results { margin-top: 10px; box-shadow: none; border: 1px solid var(--rule); }
.k-tabs { margin: 16px calc(var(--gutter) * -1) 0; padding: 2px var(--gutter) 6px; display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; scroll-snap-type: x proximity; scroll-padding-inline: var(--gutter); }
.k-tabs::-webkit-scrollbar { display: none; }
.k-tabs button { flex: none; scroll-snap-align: start; display: inline-flex; align-items: center; gap: 8px; min-height: 52px; padding: 5px 16px 5px 5px; border: 2px solid var(--rule); border-radius: 999px; background: var(--white);
  font-family: var(--head); font-weight: 600; font-size: 16px; line-height: 1.2; color: var(--ink); cursor: pointer; white-space: nowrap; transition: border-color .15s ease, background-color .15s ease, color .15s ease; }
.k-tabs button:hover { border-color: var(--ink-soft); }
.k-tabs img, .k-tab-all { width: 38px; height: 38px; border-radius: 50%; object-fit: cover; flex: none; }
.k-tab-all { display: grid; place-items: center; background: var(--paper); color: var(--ink); font-size: 20px; }
.k-tabs em { font-style: normal; font-weight: 500; font-size: 14px; color: var(--ink-soft); margin-left: 2px; }
.k-tabs button[aria-selected="true"] { background: var(--ink); border-color: var(--ink); color: var(--white); }
.k-tabs button[aria-selected="true"] em { color: #d8cfc2; }
.k-tabs button[aria-selected="true"] .k-tab-all { background: var(--red); color: var(--white); }
.k-shelf-sub { margin-top: 10px; }
.k-shelf-sub b { color: var(--red); font-family: var(--head); margin: 0 4px; }
#products .k-shelf-sub + .shelf { margin-top: 18px; }
@media (min-width: 860px) {
  .k-searchbar { padding: 12px 0; }
  .k-searchbar .k-search { max-width: 720px; }
  .k-tabs { margin: 22px 0 0; padding: 2px 0 6px; flex-wrap: wrap; overflow: visible; }
}

/* ===== ปุ่มค้นหาในส่วนหัว (แบบ K) ===== */
.head-tools { display: flex; align-items: center; gap: 14px; }
.head-search { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 14px 0 12px; border: 2px solid var(--rule); border-radius: 999px; background: var(--paper);
  font-family: var(--head); font-weight: 600; font-size: 16px; color: var(--ink); text-decoration: none; transition: border-color .15s ease, background-color .15s ease; }
.head-search svg { width: 20px; height: 20px; flex: none; }
.head-search:hover { border-color: var(--red); color: var(--red); background: var(--white); }
.head-search-desk { display: none; }
@media (max-width: 370px) { .head-search span { display: none; } .head-search { padding: 0 11px; } }
@media (min-width: 860px) {
  .head-tools { display: none; }
  .head-nav .head-search-desk { display: inline-flex; min-height: 46px; }
  .head-nav .head-search-desk:hover { color: var(--red); }
}
.logo span { white-space: nowrap; }
.head-tools .head-search + .head-link .head-long { display: none; }

/* ===== แบบ K: ช่องค้นหาเล็กในส่วนสินค้า + แถบเพิ่งดูเหนือหัวข้อสินค้า ===== */
.k-phead { display: grid; gap: 12px; }
.k-psearch { margin: 0; max-width: none; }
.k-psearch .k-box { min-height: 46px; padding: 0 6px 0 14px; border-width: 2px; border-color: var(--rule); border-radius: 12px; background: var(--paper); gap: 8px; }
.k-psearch .k-box:focus-within { background: var(--white); }
.k-psearch .k-box svg { width: 20px; height: 20px; }
.k-psearch .k-box input { font-size: 16px; padding: 9px 0; }
.k-psearch .k-clear { width: 36px; height: 36px; font-size: 16px; background: var(--white); }
/* คำค้นบ่อย: โผล่ใต้ช่องเป็นแถวเดียวเฉพาะตอนแตะช่องและยังไม่ได้พิมพ์ (คุมด้วย JS ผ่านคลาส show-tags) */
.k-psearch .k-tags { display: none; margin: 8px calc(var(--gutter) * -1) 0 0; padding: 2px var(--gutter) 4px 0; flex-wrap: nowrap; gap: 8px; overflow-x: auto; scrollbar-width: none;
  animation: k-tags-in .18s ease; }
.k-psearch .k-tags::-webkit-scrollbar { display: none; }
.k-psearch.show-tags .k-tags { display: flex; }
.k-psearch .k-tags span, .k-psearch .k-tags button { flex: none; white-space: nowrap; }
@keyframes k-tags-in { from { opacity: 0; transform: translateY(-4px); } }
@media (min-width: 860px) { .k-psearch .k-tags { margin-right: 0; padding-right: 0; flex-wrap: wrap; overflow: visible; } }
.k-tags button[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--white); }
.k-psearch .k-results { margin-top: 10px; box-shadow: none; border: 1px solid var(--rule); }
#recent + #products { border-top: 0; }
.recent + .band { padding-top: 28px; }
@media (min-width: 860px) {
  .k-phead { grid-template-columns: 1fr minmax(320px, 420px); align-items: start; gap: 24px; }
  .k-phead .sec-title { padding-top: 2px; }
  .k-psearch .k-tags, .k-psearch .k-results { grid-column: 1 / -1; }
}
#search { scroll-margin-top: 12px; }

/* ผลค้นหาไม่พบ แสดงแทนตารางสินค้า */
.shelf > .k-empty { grid-column: 1 / -1; background: var(--paper); border-radius: var(--radius); padding: 20px; }
.k-shelf-sub b { color: var(--red); }

/* แก้หน้าเลื่อนข้างบนมือถือ: แถวคำค้นบ่อยยาวกว่าจอ ทำให้กริดของหัวข้อสินค้ายืดออกจนหน้าทั้งหน้ากว้างเกินจอ
   ล็อกคอลัมน์ไม่ให้ยืดตามเนื้อหา แถวคำค้นจึงเลื่อนข้างได้ในตัวเอง */
.k-phead { grid-template-columns: minmax(0, 1fr); }
.k-phead > * { min-width: 0; }
@media (min-width: 860px) { .k-phead { grid-template-columns: minmax(0, 1fr) minmax(320px, 420px); } }
/* กันหน้ากว้างเกินจอจากส่วนอื่นที่อาจล้นในอนาคต โดยไม่ทำให้ส่วนหัวที่ติดบนจอเสีย */
body { overflow-x: clip; }
/* ขอบขวาของแถวคำค้นบ่อยจางลง บอกใบ้ว่าเลื่อนดูคำต่อได้ (มือถือเท่านั้น) */
@media (max-width: 859px) {
  .k-psearch .k-tags { -webkit-mask-image: linear-gradient(to right, #000 82%, transparent); mask-image: linear-gradient(to right, #000 82%, transparent); }
}

/* ไอคอนแท็บ "ทั้งหมด" = รูปสินค้า 4 ช่องในวงกลม */
.k-tabs .k-tab-all { display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; gap: 1.5px; padding: 0; overflow: hidden; background: var(--white); border: 1.5px solid var(--white); }
.k-tabs .k-tab-all img { width: 100%; height: 100%; border-radius: 0; object-fit: cover; }
.k-tabs button[aria-selected="true"] .k-tab-all { background: var(--white); border-color: var(--white); }

/* ===== โลโก้ร้าน SPP Intertrade (ไฟล์ images/logo.png ตัดจากรูปที่ร้านส่งมา) ===== */
.logo { flex-direction: row; align-items: center; gap: 10px; }
.logo-img { flex: none; height: 46px; width: auto; aspect-ratio: 413 / 222; border-radius: 50%; display: block; }
.logo-text { display: flex; flex-direction: column; min-width: 0; }
.logo .logo-text b { font-family: var(--head); font-size: 19px; font-weight: 700; color: var(--ink); text-decoration: none; line-height: 1.2; }
.logo .logo-text span { font-size: 13px; color: var(--ink-soft); margin-top: 2px; white-space: nowrap; }
.logo:hover .logo-text b { color: var(--red); }
/* มือถือที่มีปุ่มค้นหาในส่วนหัว: ซ่อนคำโปรยใต้ชื่อ และปุ่มค้นหาเหลือแค่ไอคอน ให้พอดีบรรทัดเดียว */
@media (max-width: 480px) {
  .site-head:has(.head-tools .head-search) .logo .logo-text span { display: none; }
  .head-tools .head-search span { display: none; }
  .head-tools .head-search { width: 44px; padding: 0; justify-content: center; }
}
@media (min-width: 860px) { .logo-img { height: 54px; } .logo .logo-text b { font-size: 21px; } .logo .logo-text span { font-size: 14px; } }

/* ================= แนว L — ตามภาพตัวอย่างจาก Wix (หัวสีแดง การ์ดมีปุ่ม LINE ขั้นตอนตัวเลขใหญ่ รีวิว แถบวิ่ง) ================= */
body[data-layout="l"] { background: var(--white); }
body[data-layout="l"] .head-nav .btn-line { background: var(--red); color: var(--white); border-radius: 999px; }
body[data-layout="l"] .head-nav .btn-line svg path { fill: var(--white); }
body[data-layout="l"] .btn-line { background: var(--red); color: var(--white); border-radius: 999px; }
body[data-layout="l"] .btn-line:hover { background: #a30027; }
body[data-layout="l"] .linebar .btn-line { border-radius: 14px; }
.l-hero { padding: 16px 0 8px; }
.l-hero-box { display: grid; background: #e9e7e3; border-radius: 20px; overflow: hidden; }
.l-hero-text { padding: 28px 22px 24px; }
.l-hero-text h1 { font-size: clamp(30px, 8vw, 54px); font-weight: 700; line-height: 1.2; }
.l-hero-text h1 span { color: var(--red); }
.l-hero-text p { margin-top: 12px; color: var(--ink-soft); font-size: 17px; max-width: 30em; }
.l-hero-text .btn { margin-top: 20px; }
.l-hero-pic { display: block; position: relative; text-decoration: none; }
.l-hero-pic img { width: 100%; height: 100%; aspect-ratio: 552 / 317; object-fit: cover; }
.l-hero-pic .cap { display: none; }
.l-points { padding: 36px 0 28px; border-top: 1px solid var(--rule); margin-top: 28px; }
.l-points-row { margin-top: 20px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 18px; }
.l-points-row > div { padding-left: 14px; border-left: 2px solid var(--red); }
.l-points-row svg { width: 32px; height: 32px; color: var(--red); }
.l-points-row h3 { margin-top: 8px; font-size: 18px; font-weight: 700; }
.l-points-row p { font-size: 15px; color: var(--ink-soft); line-height: 1.55; margin-top: 2px; }
.l-products { background: #f3f2f0; }
.l-tabs button { background: var(--white); border-color: var(--red); color: var(--red); }
.l-tabs button em { color: var(--red); opacity: .75; }
.l-tabs button[aria-selected="true"] { background: var(--red); border-color: var(--red); color: var(--white); }
.l-tabs button[aria-selected="true"] em { color: var(--white); }
.l-shelf .card { background: var(--white); border-radius: 14px; overflow: hidden; padding-bottom: 14px; }
.l-shelf .card .pic { border-radius: 0; background: var(--white); }
.l-shelf .card h3, .l-shelf .card .meta, .l-shelf .card .price { padding: 0 12px; }
.l-shelf .card .price { font-size: 15px; color: var(--ink); }
@media (min-width: 860px) { .l-shelf .card .price { font-size: 18px; } }
.card-line { display: flex; align-items: center; justify-content: center; gap: 6px; margin: 12px 12px 0; min-height: 46px; border-radius: 999px; background: var(--red); color: var(--white);
  font-family: var(--head); font-weight: 600; font-size: 15px; line-height: 1.2; text-align: center; padding: 6px 10px; }
.card-line svg { width: 20px; height: 20px; flex: none; }
.card-line:hover { background: #a30027; }
.l-steps { padding: 44px 0; }
.l-steps-row { list-style: none; padding: 0; margin: 22px 0 0; display: grid; gap: 22px; }
.l-steps-row b { display: block; font-family: var(--head); font-size: 52px; line-height: 1; color: #c9c5bf; }
.l-steps-row h3 { margin-top: 8px; font-size: 20px; font-weight: 700; }
.l-steps-row p { color: var(--ink-soft); font-size: 16px; margin-top: 2px; }
.l-note { margin-top: 24px; padding: 14px 16px; background: var(--paper); border-radius: 12px; font-size: 15px; }
.l-reviews { background: #f3f2f0; padding: 44px 0; }
.l-reviews .sec-title { text-align: center; }
.l-review-grid { margin-top: 22px; display: grid; gap: 14px; }
.l-review-grid figure { margin: 0; background: var(--white); border: 1px solid var(--rule); border-radius: 12px; padding: 16px; }
.l-stars { color: var(--red); letter-spacing: 2px; font-size: 16px; }
.l-slot { margin-top: 10px; aspect-ratio: 16 / 9; border: 2px dashed var(--rule); border-radius: 10px; display: grid; place-items: center; text-align: center; padding: 10px;
  font-family: var(--head); font-weight: 600; color: var(--ink-soft); font-size: 15px; background: var(--paper); }
.l-review-grid figcaption { margin-top: 8px; font-size: 14px; color: var(--ink-soft); }
.l-contact { padding: 44px 0 36px; }
.l-contact .wrap { display: grid; gap: 30px; }
.l-qr { width: 132px; height: 132px; border: 2px dashed var(--rule); border-radius: 12px; display: grid; place-items: center; text-align: center; font-family: var(--head); font-weight: 600; color: var(--ink-soft); background: var(--paper); }
.l-contact-line h2 { margin-top: 16px; font-size: 28px; font-weight: 700; }
.l-line-id { font-family: var(--head); font-weight: 700; font-size: 26px; color: var(--red); }
.l-contact-btn { display: inline-flex; align-items: center; min-height: 48px; margin-top: 14px; padding: 0 22px; border-radius: 999px; background: var(--red); color: var(--white); font-family: var(--head); font-weight: 600; text-decoration: none; }
.l-contact-btn:hover { background: #a30027; }
.l-contact-info h3 { font-size: 18px; font-weight: 700; }
.l-contact-info h3 + p { margin: 6px 0 20px; color: var(--ink-soft); line-height: 1.8; }
.l-marquee { background: var(--red); color: var(--white); overflow: hidden; padding: 14px 0; }
.l-marquee-track { display: flex; gap: 40px; width: max-content; animation: l-marquee 28s linear infinite; font-family: var(--head); font-weight: 600; font-size: 16px; white-space: nowrap; }
.l-marquee-track span::after { content: "·"; margin-left: 40px; opacity: .6; }
@keyframes l-marquee { to { transform: translateX(-50%); } }
.l-foot { border-top: 1px solid var(--rule); padding: 18px 0 calc(18px + 76px); font-size: 14px; color: var(--ink-soft); }
.l-foot .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }
.l-foot-logo { display: inline-flex; align-items: center; gap: 8px; }
.l-foot-logo img { height: 32px; width: auto; aspect-ratio: 413 / 222; border-radius: 50%; }
.l-foot-logo b { font-family: var(--head); color: var(--ink); font-size: 16px; }
@media (min-width: 860px) {
  body[data-layout="l"] .head-nav { gap: 24px; }
  .l-hero { padding-top: 24px; }
  .l-hero-box { grid-template-columns: 1fr 1fr; align-items: stretch; min-height: 420px; }
  .l-hero-text { padding: 56px 48px; align-self: center; }
  .l-hero-pic img { aspect-ratio: auto; }
  .l-points { padding: 48px 0 44px; margin-top: 40px; }
  .l-points-row { grid-template-columns: repeat(4, 1fr); gap: 28px; }
  .l-shelf { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
  .l-steps { padding: 64px 0; }
  .l-steps-row { grid-template-columns: repeat(4, 1fr); gap: 32px; }
  .l-steps-row b { font-size: 64px; }
  .l-reviews { padding: 64px 0; }
  .l-review-grid { grid-template-columns: repeat(2, 1fr); gap: 20px; }
  .l-contact { padding: 64px 0 52px; }
  .l-contact .wrap { grid-template-columns: 1fr 1fr; }
  .l-foot { padding-bottom: 18px; }
}
@media (prefers-reduced-motion: reduce) { .l-marquee-track { animation: none; } }
