/* ============================================================
   หน้าเว็บลูกค้า — แบรนด์ในเครือ (decsepbrand · joungjinghouse · joungjing studio) · ข้อความภาษาลาว
   ทั้งสามแบรนด์ใช้เบอร์กันดีกับครีมจากโลโก้ร่วมกัน แต่ละแบรนด์มีสีรองของตัวเอง
   รูปจาก Instagram เป็นสัดส่วน 4:5 — การ์ดใช้สัดส่วนเดียวกันเพื่อไม่ตัดข้อความบนภาพ
   ============================================================ */
:root {
  --paper: #fcf7f4;
  --card: #ffffff;
  --ink: #26151a;
  --ink-soft: #634f55;          /* 7.3:1 บน paper */
  --brand: #5b0f1b;             /* เบอร์กันดีจากโลโก้ */
  --brand-hover: #470a15;
  --price: #7d1a2c;
  --tint-a: #f7e3e6;            /* ชมพูกล่อง Daily Mask */
  --tint-b: #e1edf7;            /* ฟ้ากล่อง HYA Blue */
  --tint-c: #e3efe5;            /* เขียวกล่อง Acne Green */
  --line: #eadcdc;
  --r: 20px;
  --shadow: 0 2px 6px rgba(60, 10, 20, .05), 0 22px 44px -16px rgba(60, 10, 20, .22);
  --serif: "Noto Serif Lao", "Noto Sans Lao", "Phetsarath OT", Georgia, serif;
  --sans: "Noto Sans Lao", "Phetsarath OT", "Lao Sangam MN", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --ease: cubic-bezier(.16, 1, .3, 1);
}
body[data-brand="joungjinghouse"] {
  --paper: #f8f4ec;             /* ครีมจากพื้นโลโก้ */
  --ink: #221a15;
  --ink-soft: #5e5047;
  --brand: #5a1a1f;
  --brand-hover: #461317;
  --price: #6a2b1c;
  --tint-a: #efe5d5;            /* ทราย */
  --tint-b: #e6e8ec;            /* เทาอะลูมิเนียม */
  --tint-c: #f3d9c4;            /* ส้มคอสมิก iPhone */
  --line: #e5dccd;
}
body[data-brand="joungjingstudio"] {
  --paper: #fffbfa;
  --ink: #1f1a1b;
  --ink-soft: #5d5356;
  --brand: #2a2426;             /* ดำจากโลโก้ */
  --brand-hover: #141112;
  --price: #8a2c4c;
  --tint-a: #f8e7ea;            /* ชมพูนู้ด */
  --tint-b: #ede8f6;            /* ม่วงลาเวนเดอร์ */
  --tint-c: #e3f0f3;            /* ฟ้าแคทอาย */
  --line: #efe2e4;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 88px; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font: 400 17px/1.7 var(--sans);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; margin: 0; text-wrap: balance; letter-spacing: -.01em; }
p { margin: 0; }
a { color: inherit; }
::selection { background: var(--tint-a); color: var(--brand); }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; border-radius: 6px; }
svg { flex: none; }

.wrap { width: 100%; max-width: 1200px; margin: 0 auto; padding-inline: max(20px, env(safe-area-inset-left)) max(20px, env(safe-area-inset-right)); }

/* ---------- แถบบน: แบรนด์นี้ + สลับไปแบรนด์ในเครือ ---------- */
.bar {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(14px);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid var(--line);
  padding-top: env(safe-area-inset-top);
}
.bar-in { display: flex; align-items: center; gap: 20px; min-height: 70px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; min-width: 0; }
.mark { width: 42px; height: 42px; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 1px var(--line); background: var(--card); }
.mark-letter, .mini.mark-letter {
  display: grid; place-items: center; background: var(--brand); color: #fff;
  font: 700 20px/1 var(--serif); box-shadow: none;
}
.brand-name { font-family: var(--serif); font-weight: 700; font-size: 21px; letter-spacing: -.01em; white-space: nowrap; }

.family { display: flex; gap: 4px; margin-left: auto; padding: 4px; border-radius: 999px; background: color-mix(in srgb, var(--ink) 5%, transparent); }
.family a {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 5px 13px 5px 5px; border-radius: 999px;
  text-decoration: none; font-size: 14px; font-weight: 500; color: var(--ink-soft);
  white-space: nowrap; transition: background .2s, color .2s;
}
.family a:hover { color: var(--ink); background: color-mix(in srgb, var(--card) 70%, transparent); }
.family a[aria-current="page"] { background: var(--card); color: var(--ink); font-weight: 600; box-shadow: 0 1px 3px rgba(40, 10, 20, .1); }
.mini { width: 26px; height: 26px; border-radius: 50%; object-fit: cover; background: var(--card); }
.mini.mark-letter { font-size: 13px; }

.bar-cta {
  text-decoration: none; font-weight: 600; font-size: 15px; white-space: nowrap;
  background: var(--brand); color: #fff; padding: 10px 20px; border-radius: 999px;
  transition: background .2s;
}
.bar-cta:hover { background: var(--brand-hover); }

/* ---------- หัวเว็บ ---------- */
.hero { padding-block: clamp(40px, 7vw, 92px) clamp(36px, 6vw, 80px); overflow: hidden; }
.hero-in { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: clamp(32px, 6vw, 88px); align-items: center; }
.hero-what { font-size: 15px; font-weight: 600; color: var(--price); margin-bottom: 14px; }
.hero h1 { font-size: clamp(2.3rem, 5.2vw, 4.3rem); line-height: 1.2; max-width: 15ch; }
.lede { margin-top: 20px; font-size: clamp(17px, 1.6vw, 19px); color: var(--ink-soft); max-width: 48ch; }
.facts { list-style: none; padding: 0; margin: 22px 0 0; display: flex; flex-wrap: wrap; gap: 8px 22px; color: var(--ink-soft); font-size: 15.5px; }
.facts li { display: flex; align-items: center; gap: 8px; }
.facts svg { width: 19px; height: 19px; color: var(--price); }
.facts a { text-decoration: underline; text-underline-offset: 4px; text-decoration-color: color-mix(in srgb, currentColor 40%, transparent); }
.facts a:hover { color: var(--ink); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.btn-main, .btn-ghost {
  display: inline-flex; align-items: center; gap: 10px; min-height: 52px; padding: 0 26px;
  border-radius: 999px; text-decoration: none; font-weight: 600; font-size: 16.5px;
  transition: background .2s, border-color .2s, transform .2s var(--ease);
}
.btn-main { background: var(--brand); color: #fff; }
.btn-main:hover { background: var(--brand-hover); }
.btn-main span { font-size: 13px; background: rgba(255, 255, 255, .18); border-radius: 999px; padding: 1px 9px; }
.btn-ghost { border: 1px solid color-mix(in srgb, var(--ink) 22%, transparent); color: var(--ink); background: var(--card); }
.btn-ghost:hover { border-color: var(--ink); }

/* รูปจริงจาก Instagram ซ้อนกัน 3 ใบ บนพื้นสีรองของแบรนด์ */
.hero-art { position: relative; aspect-ratio: 1 / 1.02; max-width: 540px; width: 100%; justify-self: end; }
.hero-art::before {
  content: ""; position: absolute; inset: 8% 2% 2% 8%;
  border-radius: 46% 54% 42% 58% / 54% 42% 58% 46%;
  background: linear-gradient(150deg, var(--tint-a), var(--tint-b) 60%, var(--tint-c));
}
.hero-art img {
  position: absolute; height: auto; aspect-ratio: 4 / 5; object-fit: cover; border-radius: var(--r);
  background: var(--card); box-shadow: var(--shadow);
  animation: rise 1s var(--ease) both;
}
.hero-art .art-0 { width: 54%; left: 3%; top: 6%; z-index: 2; }
.hero-art .art-1 { width: 40%; right: 1%; top: 0; animation-delay: .08s; }
.hero-art .art-2 { width: 42%; right: 7%; bottom: 0; z-index: 3; animation-delay: .16s; }
.hero-art .art-0:only-child { width: 66%; left: 17%; top: 4%; }
.art-mark { position: absolute; inset: 22%; width: 56%; height: auto; aspect-ratio: 1; border-radius: 50%; box-shadow: var(--shadow); font-size: clamp(90px, 14vw, 160px); }
@keyframes rise { from { opacity: 0; transform: translateY(20px) scale(.98); } }

/* ---------- รายการสินค้า/บริการ ---------- */
.catalog { padding-bottom: 12px; }
.cat-jump {
  display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none;
  padding-block: 4px 8px; margin-bottom: 4px;
}
.cat-jump::-webkit-scrollbar { display: none; }
.cat-jump a {
  display: inline-flex; align-items: center; gap: 8px; flex: none;
  text-decoration: none; font-size: 15px; font-weight: 500;
  padding: 9px 16px; border-radius: 999px; background: var(--card); border: 1px solid var(--line);
  transition: border-color .2s, color .2s;
}
.cat-jump a:hover { border-color: var(--brand); color: var(--brand); }
.cat-jump span { font-size: 12.5px; font-weight: 600; color: var(--ink-soft); background: var(--tint-a); border-radius: 999px; padding: 0 8px; line-height: 22px; }

.cat { padding-block: clamp(28px, 4.5vw, 52px); }
.cat + .cat { border-top: 1px solid var(--line); }
.cat h2 { font-size: clamp(1.6rem, 2.8vw, 2.2rem); line-height: 1.3; margin-bottom: 26px; }

.grid {
  list-style: none; padding: 0; margin: 0;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(232px, 1fr)); gap: clamp(22px, 3vw, 38px) clamp(16px, 2.2vw, 26px);
}
.card-hit {
  all: unset; box-sizing: border-box; cursor: pointer;
  display: flex; flex-direction: column; gap: 5px; width: 100%; height: 100%;
  border-radius: var(--r);
}
.card-hit:focus-visible { outline: 2px solid var(--brand); outline-offset: 6px; }
.shot {
  position: relative; display: block; aspect-ratio: 4 / 5; border-radius: var(--r); overflow: hidden;
  background: linear-gradient(160deg, var(--tint-a), var(--tint-b));
  margin-bottom: 10px;
}
.shot img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease); }
.card-hit:hover .shot img { transform: scale(1.035); }
.shot-empty {
  position: absolute; inset: 0; display: grid; place-items: center; padding: 16px; text-align: center;
  font: 700 22px/1.2 var(--serif); color: color-mix(in srgb, var(--brand) 30%, transparent);
}
.chip {
  display: inline-block; font: 600 12.5px/1 var(--sans); color: var(--ink);
  background: color-mix(in srgb, var(--card) 94%, transparent); border-radius: 999px; padding: 7px 11px;
  box-shadow: 0 1px 4px rgba(30, 10, 15, .12);
}
.shot .chip { position: absolute; left: 12px; top: 12px; }
.card-name { font-weight: 600; font-size: 17px; line-height: 1.45; }
.card-desc {
  color: var(--ink-soft); font-size: 14.5px; line-height: 1.6;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.card-foot { margin-top: auto; padding-top: 8px; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.price { font-weight: 700; font-size: 17.5px; color: var(--price); font-variant-numeric: tabular-nums; line-height: 1.4; }
.more {
  width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; flex: none;
  border: 1px solid var(--line); color: var(--ink); transition: background .2s, color .2s, border-color .2s;
}
.more svg { width: 18px; height: 18px; }
.card-hit:hover .more { background: var(--brand); border-color: var(--brand); color: #fff; }

.empty { text-align: center; padding-block: 72px; }
.empty h2 { font-size: 30px; }
.empty p { margin-top: 10px; color: var(--ink-soft); }

/* ---------- ติดต่อ / สั่งซื้อ / จองคิว ---------- */
.contact { padding-block: clamp(24px, 4vw, 44px); }
.contact-in {
  background: var(--brand); color: #fff; border-radius: calc(var(--r) + 10px);
  padding: clamp(30px, 5vw, 60px);
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 28px 56px; align-items: center;
}
.contact h2 { font-size: clamp(1.7rem, 3.2vw, 2.5rem); line-height: 1.3; }
.contact p { margin-top: 12px; color: rgba(255, 255, 255, .82); max-width: 52ch; }
.contact .facts { color: rgba(255, 255, 255, .85); }
.contact .facts svg { color: #fff; }
.contact .facts a:hover { color: #fff; }
.soon { font-weight: 600; }

.chats { display: flex; flex-wrap: wrap; gap: 10px; }
.chat {
  display: inline-flex; align-items: center; gap: 10px;
  min-height: 50px; padding: 0 20px 0 13px; border-radius: 999px;
  background: var(--card); border: 1px solid var(--line); color: var(--ink);
  text-decoration: none; font-weight: 600; font-size: 16px;
  transition: border-color .2s, box-shadow .2s, transform .2s var(--ease);
}
.chat svg { width: 26px; height: 26px; }
.chat:hover { border-color: var(--ink-soft); box-shadow: 0 8px 18px -10px rgba(40, 10, 20, .35); transform: translateY(-1px); }
.chats.big { flex-direction: column; min-width: 250px; }
.chats.big .chat { min-height: 58px; font-size: 17px; border-color: transparent; }

/* ---------- แบรนด์ในเครือ ---------- */
.family-more { padding-block: clamp(36px, 6vw, 72px) clamp(40px, 6vw, 80px); }
.family-more h2 { font-size: clamp(1.5rem, 2.6vw, 2rem); margin-bottom: 22px; }
.family-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.family-card {
  display: grid; grid-template-columns: 38% minmax(0, 1fr); text-decoration: none; color: var(--ink);
  background: var(--card); border: 1px solid var(--line); border-radius: calc(var(--r) + 4px); overflow: hidden;
  transition: box-shadow .3s var(--ease), transform .3s var(--ease);
}
.family-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.family-cover { background: var(--tint-a); min-height: 180px; }
.family-cover img { width: 100%; height: 100%; object-fit: cover; }
.family-body { padding: 22px 22px 20px; display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.family-body .mini { width: 38px; height: 38px; box-shadow: 0 0 0 1px var(--line); margin-bottom: 6px; }
.family-name { font: 700 20px/1.3 var(--serif); }
.family-what { color: var(--ink-soft); font-size: 15px; }
.family-go { margin-top: auto; padding-top: 14px; display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: 15px; color: var(--price); }
.family-go svg { width: 18px; height: 18px; transition: transform .25s var(--ease); }
.family-card:hover .family-go svg { transform: translateX(3px); }

/* ---------- ท้ายเว็บ ---------- */
.foot { border-top: 1px solid var(--line); padding-block: 26px calc(26px + env(safe-area-inset-bottom)); color: var(--ink-soft); font-size: 14.5px; }
.foot-in { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; }
.foot-brand { font: 700 18px/1 var(--serif); color: var(--ink); }
.foot a { text-underline-offset: 3px; }

/* ---------- หน้าต่างรายละเอียด ---------- */
.sheet {
  width: min(940px, calc(100% - 32px)); max-height: calc(100dvh - 48px);
  padding: 0; border: 0; border-radius: calc(var(--r) + 8px);
  background: var(--card); color: var(--ink);
  box-shadow: 0 30px 80px -20px rgba(40, 8, 18, .45);
  overflow: auto; overscroll-behavior: contain;
}
.sheet::backdrop { background: rgba(30, 12, 18, .45); backdrop-filter: blur(3px); }
.sheet[open] { animation: sheet-in .45s var(--ease); }
@keyframes sheet-in { from { opacity: 0; transform: translateY(24px) scale(.985); } }
.sheet-content { display: grid; grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr); }
.sheet-shot { position: relative; background: linear-gradient(160deg, var(--tint-a), var(--tint-b)); min-height: 420px; }
.sheet-shot img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.sheet-body { padding: clamp(24px, 4vw, 44px); display: flex; flex-direction: column; gap: 14px; }
.sheet-cat { font-size: 14px; font-weight: 600; color: var(--price); }
.sheet-title { font-size: clamp(1.6rem, 3vw, 2.1rem); line-height: 1.3; padding-right: 36px; }
.sheet-price { font-size: 22px; font-weight: 700; color: var(--price); display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.sheet-price .chip { font-size: 13px; }
.sheet-desc { color: var(--ink-soft); }
.sheet-how { font-size: 14.5px; color: var(--ink-soft); padding-top: 14px; border-top: 1px solid var(--line); margin-top: 6px; }
.sheet-close {
  position: sticky; top: 12px; float: right; margin: 12px 12px -56px 0; z-index: 2;
  width: 44px; height: 44px; border-radius: 50%; border: 0; cursor: pointer;
  background: rgba(255, 255, 255, .94); color: var(--ink); box-shadow: 0 2px 10px rgba(0, 0, 0, .14);
  display: grid; place-items: center;
}
.sheet-close svg { width: 20px; height: 20px; }

.bar-link {
  text-decoration: none; font-weight: 600; font-size: 15px; color: var(--ink-soft); white-space: nowrap;
  padding: 8px 4px; border-bottom: 2px solid transparent; transition: color .2s, border-color .2s;
}
.bar-link:hover, .bar-link[aria-current="page"] { color: var(--ink); border-bottom-color: var(--brand); }
.foot-links { display: flex; gap: 18px; }
.foot-links a { text-decoration: none; }
.foot-links a:hover { color: var(--ink); text-decoration: underline; }

.sheet-more, .sec-more {
  display: inline-flex; align-items: center; gap: 6px; align-self: flex-start;
  font-weight: 600; font-size: 15.5px; color: var(--price); text-decoration: none;
}
.sheet-more svg, .sec-more svg { width: 18px; height: 18px; transition: transform .25s var(--ease); }
.sheet-more:hover svg, .sec-more:hover svg { transform: translateX(3px); }

/* ---------- หน้าสินค้าแยก ---------- */
.crumbs {
  display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px;
  padding-block: 22px 6px; font-size: 14.5px; color: var(--ink-soft);
}
.crumbs a { text-decoration: none; }
.crumbs a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.crumbs [aria-current] { color: var(--ink); font-weight: 500; }
.item {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(28px, 5vw, 72px); align-items: start; padding-block: 18px clamp(36px, 6vw, 72px);
}
.item-shot {
  position: sticky; top: 96px; aspect-ratio: 4 / 5; border-radius: calc(var(--r) + 6px); overflow: hidden;
  background: linear-gradient(160deg, var(--tint-a), var(--tint-b)); box-shadow: var(--shadow);
}
.item-shot img { width: 100%; height: 100%; object-fit: cover; }
.item-shot .chip { position: absolute; left: 16px; top: 16px; }
.item-info { display: flex; flex-direction: column; gap: 14px; padding-top: 6px; }
.item-title { font-size: clamp(2rem, 4vw, 3rem); line-height: 1.22; }
.item-size { color: var(--ink-soft); font-size: 15.5px; }
.item-lede { font-size: 18px; color: var(--ink-soft); }
.item-order { padding: 20px; margin-top: 6px; border-radius: var(--r); background: var(--card); border: 1px solid var(--line); }
.item-order .sheet-how { border: 0; padding: 0; margin: 0 0 12px; }
.item-sec { padding-top: 22px; margin-top: 8px; border-top: 1px solid var(--line); }
.item-sec h2 { font-size: 1.35rem; margin-bottom: 10px; }
.item-sec .prose h2 { font-size: 1.1rem; margin-top: 1.2em; font-family: var(--sans); font-weight: 700; }
.item-sec .prose h3 { font-size: 1rem; font-family: var(--sans); font-weight: 700; }
.item-sec .prose > :first-child { margin-top: 0; }
.related { border-top: 1px solid var(--line); }

/* ---------- เนื้อหาที่ทีมพิมพ์ (รายละเอียดสินค้า / บทความ) ---------- */
.prose { color: var(--ink); }
.prose > * + * { margin-top: 1em; }
.prose h2 { font-size: 1.5rem; line-height: 1.35; margin-top: 1.6em; }
.prose h3 { font-size: 1.2rem; line-height: 1.4; margin-top: 1.4em; font-weight: 600; }
.prose ul, .prose ol { padding-left: 1.4em; margin-bottom: 0; }
.prose li + li { margin-top: .35em; }
.prose li::marker { color: var(--price); }
.prose a { color: var(--price); text-underline-offset: 3px; }
.prose strong { font-weight: 700; }
.prose blockquote {
  margin-inline: 0; padding: 14px 20px; border-radius: 14px;
  background: var(--tint-a); color: var(--ink); font-weight: 500;
}
.prose figure { margin: 1.6em 0; }
.prose figure img { width: auto; height: auto; max-width: 100%; max-height: min(80vh, 720px); margin-inline: auto; border-radius: var(--r); }
.prose figcaption { margin-top: 8px; font-size: 14px; color: var(--ink-soft); text-align: center; }

/* ---------- บล็อก ---------- */
.blog-latest { padding-block: clamp(32px, 5vw, 60px); border-top: 1px solid var(--line); }
.sec-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 24px; }
.sec-head h2 { font-size: clamp(1.6rem, 2.8vw, 2.2rem); line-height: 1.3; }
.posts {
  list-style: none; padding: 0; margin: 0;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: clamp(26px, 3vw, 40px) clamp(18px, 2.4vw, 30px);
}
.post-hit { display: flex; flex-direction: column; gap: 6px; text-decoration: none; color: var(--ink); border-radius: var(--r); }
.post-cover {
  display: block; aspect-ratio: 4 / 3; border-radius: var(--r); overflow: hidden; margin-bottom: 10px;
  background: linear-gradient(150deg, var(--tint-a), var(--tint-b) 60%, var(--tint-c));
}
.post-cover img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease); }
.post-hit:hover .post-cover img { transform: scale(1.035); }
.post-date { font-size: 14px; font-weight: 600; color: var(--price); }
.post-title { font-size: 1.3rem; line-height: 1.4; font-weight: 600; margin: 0; }
.post-hit:hover .post-title { text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; }
.post-excerpt {
  color: var(--ink-soft); font-size: 15.5px; line-height: 1.65;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.page-head { padding-block: clamp(36px, 6vw, 72px) 8px; }
.page-head h1 { font-size: clamp(2.3rem, 5vw, 3.6rem); line-height: 1.2; }
.blog-index { padding-block: 28px clamp(40px, 6vw, 72px); }

.article { max-width: 780px; padding-block: 18px clamp(36px, 6vw, 64px); }
.article-head h1 { font-size: clamp(2rem, 4.4vw, 3.1rem); line-height: 1.25; }
.article-meta { margin-top: 14px; color: var(--ink-soft); font-size: 15px; }
/* รูปปกแสดงตามสัดส่วนจริง (รูปจาก IG เป็นแนวตั้ง ครอปแล้วข้อความบนภาพจะขาด) */
.article-cover {
  display: block; width: auto; height: auto; max-width: 100%; max-height: min(72vh, 640px);
  margin: 28px auto 0; border-radius: calc(var(--r) + 4px); box-shadow: var(--shadow);
}
.article-body { margin-top: 32px; font-size: 18px; line-height: 1.85; }
.article-cta {
  margin-top: 44px; padding: 24px; border-radius: var(--r);
  background: var(--card); border: 1px solid var(--line);
}
.article-cta p { margin-bottom: 14px; }

.preview-banner {
  position: sticky; top: 0; z-index: 20; padding: 10px 20px; text-align: center;
  background: #fff4d6; color: #5c4200; font: 600 14px/1.5 var(--sans); border-bottom: 1px solid #f0d98c;
}
.preview-banner + .bar { top: 41px; }
.nf-title { font-size: clamp(2rem, 4vw, 2.6rem); }
.nf-back { margin-top: 28px !important; }

/* ============================================================
   ร้านออนไลน์: ตะกร้า / ชำระเงิน / ออเดอร์ / สมาชิก
   ============================================================ */
.bar-icon {
  position: relative; display: inline-flex; align-items: center; gap: 6px; flex: none;
  min-height: 42px; padding: 0 10px; border-radius: 999px; text-decoration: none;
  color: var(--ink); font-weight: 600; font-size: 14.5px; transition: background .2s;
}
.bar-icon:hover { background: color-mix(in srgb, var(--ink) 6%, transparent); }
.bar-icon svg { width: 22px; height: 22px; }
.bar-icon-text { max-width: 9em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cart-count {
  position: absolute; top: 2px; right: 0; min-width: 19px; height: 19px; padding: 0 5px; border-radius: 999px;
  background: var(--brand); color: #fff; font: 700 11.5px/19px var(--sans); text-align: center;
}
.cart-count[hidden] { display: none; }

.member-price { font-size: 15px; color: var(--ink-soft); }
.member-price b { color: var(--price); font-size: 17px; }
.member-price span { font-size: 12.5px; font-weight: 700; color: var(--brand); background: var(--tint-a); border-radius: 999px; padding: 2px 8px; }
.member-price a { color: var(--price); font-weight: 600; }
.buy { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.buy .btn-main { flex: 1 1 180px; justify-content: center; border: 0; cursor: pointer; font-family: inherit; }
.buy .btn-main svg { width: 20px; height: 20px; }
.buy-out { font-weight: 600; color: var(--price); }
.item-buy { display: flex; flex-direction: column; gap: 12px; padding: 20px; border-radius: var(--r); background: var(--card); border: 1px solid var(--line); }
.item-buy + .item-order { margin-top: 0; }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 999px; background: var(--card); height: 52px; }
.qty button {
  width: 44px; height: 100%; border: 0; background: none; cursor: pointer; font-size: 22px; color: var(--ink);
  border-radius: 999px; font-family: inherit;
}
.qty button:disabled { opacity: .35; cursor: default; }
.qty input {
  width: 44px; height: 100%; border: 0; background: none; text-align: center; font: 600 17px var(--sans); color: var(--ink);
  -moz-appearance: textfield;
}
.qty input::-webkit-outer-spin-button, .qty input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

.toast {
  position: fixed; left: 50%; bottom: calc(22px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 50;
  display: flex; align-items: center; gap: 16px; max-width: calc(100% - 32px);
  padding: 13px 20px; border-radius: 999px; background: var(--ink); color: #fff; font-weight: 500; font-size: 15.5px;
  box-shadow: 0 16px 40px -12px rgba(0, 0, 0, .45); animation: sheet-in .35s var(--ease);
}
.toast a { color: #fff; font-weight: 700; white-space: nowrap; }
.toast[hidden] { display: none; }

.shop-page { padding-block: clamp(26px, 5vw, 56px) clamp(48px, 7vw, 88px); }
.shop-title { font-size: clamp(2rem, 4.4vw, 3rem); line-height: 1.25; margin-bottom: 22px; }
.shop-loading { color: var(--ink-soft); padding: 40px 0; }
.order-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(300px, 380px); gap: 22px; align-items: start; }
.order-main { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: clamp(18px, 3vw, 26px); }
.panel h2 { font-size: 1.3rem; line-height: 1.35; margin-bottom: 12px; }
.panel h2:not(:first-child) { margin-top: 22px; }
.muted { color: var(--ink-soft); }
.small { font-size: 14px; }
.alert { background: #fff4e5; color: #6b3d00; border-radius: 12px; padding: 10px 14px; font-weight: 500; margin-bottom: 10px; }
.order-summary { position: sticky; top: 96px; }
.order-summary h2:not(:first-child) { margin-top: 20px; }
.sum { margin: 0; display: flex; flex-direction: column; gap: 8px; }
.sum div { display: flex; justify-content: space-between; gap: 12px; }
.sum dt { color: var(--ink-soft); }
.sum dd { margin: 0; font-weight: 600; font-variant-numeric: tabular-nums; text-align: right; }
.sum .disc dd { color: #1d7a4c; }
.sum .total { border-top: 1px solid var(--line); padding-top: 12px; margin-top: 4px; }
.sum .total dt { color: var(--ink); font-weight: 700; }
.sum .total dd { font-size: 1.45rem; color: var(--price); }
.sum-lines { list-style: none; padding: 0; margin: 0 0 14px; display: flex; flex-direction: column; gap: 8px; font-size: 15px; }
.sum-lines li { display: flex; justify-content: space-between; gap: 12px; }
.order-summary .btn-main.block, .btn-main.block { width: 100%; justify-content: center; margin-top: 14px; border: 0; cursor: pointer; font-family: inherit; }
.btn-main:disabled { opacity: .45; cursor: not-allowed; }
.order-summary .form-error:empty { display: none; }

.form { display: flex; flex-direction: column; gap: 14px; }
.form[hidden] { display: none; }
.form label { display: flex; flex-direction: column; gap: 6px; font-weight: 600; font-size: 15px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form select {
  font: 400 16px/1.5 var(--sans); color: var(--ink); background: var(--paper); width: 100%;
  border: 1px solid color-mix(in srgb, var(--ink) 18%, transparent); border-radius: 12px; padding: 11px 14px; min-height: 48px;
}
.form select:focus { outline: 2px solid var(--brand); outline-offset: 1px; border-color: transparent; }
.form input, .form textarea {
  font: 400 16px/1.5 var(--sans); color: var(--ink); background: var(--paper);
  border: 1px solid color-mix(in srgb, var(--ink) 18%, transparent); border-radius: 12px; padding: 11px 14px; width: 100%;
}
.form input:focus, .form textarea:focus { outline: 2px solid var(--brand); outline-offset: 1px; border-color: transparent; }
.form .btn-main, .form .btn-ghost { justify-content: center; border: 0; cursor: pointer; font-family: inherit; }
.form .btn-ghost { border: 1px solid color-mix(in srgb, var(--ink) 22%, transparent); }
.form-error { color: #b3261e; font-weight: 600; font-size: 15px; }
.form-error.ok { color: #1d7a4c; }
.form-error:empty { display: none; }
.pw-wrap { position: relative; display: block; }
.form .pw-wrap input { padding-right: 52px; }
.pw-toggle {
  position: absolute; right: 4px; top: 50%; transform: translateY(-50%);
  width: 44px; height: 42px; border: 0; background: none; border-radius: 10px;
  display: grid; place-items: center; color: var(--ink-soft); cursor: pointer;
}
.pw-toggle:hover { color: var(--ink); background: color-mix(in srgb, var(--ink) 6%, transparent); }
.pw-toggle[aria-pressed="true"] { color: var(--brand); }
.link-btn { border: 0; background: none; color: var(--ink-soft); text-decoration: underline; cursor: pointer; font: inherit; font-size: 14px; padding: 4px; }

.member-cta { padding: 14px 18px; border-radius: var(--r); background: var(--tint-a); }
.member-cta.ok { background: #e6f4ec; }
.member-cta a { color: var(--price); font-weight: 700; }

.cart-lines { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; }
.cart-line { display: grid; grid-template-columns: 72px minmax(0, 1fr) auto; gap: 14px; padding: 14px 0; border-top: 1px solid var(--line); align-items: center; }
.cart-line:first-child { border-top: 0; padding-top: 4px; }
.cart-line img, .cart-thumb { width: 72px; height: 90px; object-fit: cover; border-radius: 12px; background: var(--tint-a); display: block; }
.cart-name { font-weight: 600; line-height: 1.4; }
.cart-info .qty { height: 40px; margin-top: 6px; }
.cart-info .qty button { width: 36px; font-size: 19px; }
.cart-info .qty input { width: 36px; font-size: 15px; }
.cart-right { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }

.choices { display: flex; flex-direction: column; gap: 8px; }
.choice {
  display: flex !important; flex-direction: row !important; align-items: center; gap: 12px !important;
  padding: 13px 16px; border: 1px solid var(--line); border-radius: 14px; cursor: pointer; font-weight: 400 !important;
  transition: border-color .2s, background .2s;
}
.choice.on { border-color: var(--brand); background: color-mix(in srgb, var(--tint-a) 45%, var(--card)); }
.choice input { width: 20px; height: 20px; accent-color: var(--brand); flex: none; }
.choice-body { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.choice-body small { color: var(--ink-soft); font-size: 13.5px; }
.choice-right { font-weight: 700; white-space: nowrap; }

.steps { list-style: none; padding: 0; margin: 0 0 26px; display: flex; gap: 6px; flex-wrap: wrap; }
.steps li { display: flex; align-items: center; gap: 8px; padding: 6px 14px 6px 6px; border-radius: 999px; background: var(--card); border: 1px solid var(--line); color: var(--ink-soft); font-size: 14.5px; }
.steps li span { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--tint-a); font-weight: 700; font-size: 13px; }
.steps li.done span { background: #1d7a4c; color: #fff; }
.steps li.now { border-color: var(--brand); color: var(--ink); font-weight: 600; }
.steps li.now span { background: var(--brand); color: #fff; }
.pay-amount { font-size: 18px; }
.pay-amount b { display: block; font-size: clamp(2rem, 5vw, 2.6rem); color: var(--price); line-height: 1.3; font-variant-numeric: tabular-nums; }
.pay-hold { margin-top: 8px; color: var(--ink-soft); }
.pay-hold b { color: var(--ink); font-variant-numeric: tabular-nums; }
.accounts { display: flex; flex-direction: column; gap: 14px; margin-top: 18px; }
.account { display: flex; gap: 18px; align-items: center; padding: 16px; border-radius: 16px; background: var(--paper); border: 1px solid var(--line); }
.account-qr { width: 160px; height: 160px; object-fit: contain; border-radius: 12px; background: #fff; flex: none; }
.account-bank { font-weight: 700; color: var(--price); }
.account-no { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; font-size: 1.35rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.copy {
  display: inline-flex; align-items: center; gap: 5px; border: 1px solid var(--line); background: var(--card); border-radius: 999px;
  padding: 5px 12px; font: 600 13.5px var(--sans); color: var(--ink); cursor: pointer;
}
.copy svg { width: 16px; height: 16px; }
.account-name { font-weight: 600; }
.account-note { font-size: 14px; color: var(--ink-soft); }
.slip-form { margin-top: 12px; display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.slip-pick { cursor: pointer; }
.tracking b { font-variant-numeric: tabular-nums; }

.auth { max-width: 480px; margin: 0 auto; }
.auth-offer { margin: -10px 0 20px; color: var(--ink-soft); }
.auth-offer b { color: var(--price); }
.tabs { display: flex; gap: 4px; padding: 4px; border-radius: 999px; background: color-mix(in srgb, var(--ink) 6%, transparent); margin-bottom: 16px; }
.tabs button { flex: 1; border: 0; background: none; padding: 10px; border-radius: 999px; font: 600 15px var(--sans); color: var(--ink-soft); cursor: pointer; }
.tabs button[aria-selected="true"] { background: var(--card); color: var(--ink); box-shadow: 0 1px 3px rgba(40, 10, 20, .12); }
.chats.small .chat { min-height: 42px; font-size: 14.5px; }
.chats.center { justify-content: center; margin-top: 22px; }
.my-orders { list-style: none; padding: 0; margin: 0; }
.my-orders a { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 12px; align-items: center; padding: 12px 0; border-top: 1px solid var(--line); text-decoration: none; }
.my-orders li:first-child a { border-top: 0; }
.my-orders small { display: block; color: var(--ink-soft); font-size: 13px; }
.st { font-size: 13px; font-weight: 600; padding: 3px 10px; border-radius: 999px; background: var(--tint-b); white-space: nowrap; }
.st-pending_payment, .st-pending_review { background: #fff1d6; }
.st-confirmed, .st-shipped, .st-completed { background: #e6f4ec; }
.st-cancelled, .st-expired { background: #eee; color: #666; }
.logout { align-self: flex-start; cursor: pointer; font-family: inherit; }

/* ---------- แท็บเล็ต / มือถือ ---------- */
@media (max-width: 980px) {
  html { scroll-padding-top: 128px; }
  .bar-in { flex-wrap: wrap; row-gap: 0; }
  .family { order: 3; width: 100%; margin: 0 0 10px; overflow-x: auto; scrollbar-width: none; background: none; padding: 0; }
  .family::-webkit-scrollbar { display: none; }
  .family a { flex: none; border: 1px solid var(--line); background: var(--card); }
  .brand { margin-right: auto; }
  .family-grid { grid-template-columns: 1fr; }
}
@media (max-width: 820px) {
  .hero-in { grid-template-columns: 1fr; }
  .hero-art { max-width: min(360px, 82vw); justify-self: center; order: -1; }
  .hero-art.is-empty { display: none; }
  .contact-in { grid-template-columns: 1fr; }
  .chats.big { min-width: 0; }
  .sheet-content { grid-template-columns: 1fr; }
  .sheet-shot { min-height: 0; aspect-ratio: 4 / 4.2; }
  .sheet { width: 100%; max-width: 100%; max-height: 92dvh; margin: auto 0 0; border-radius: 26px 26px 0 0; }
  .sheet-body { padding-bottom: calc(28px + env(safe-area-inset-bottom)); }
  /* ปุ่มทักแชทติดขอบล่างเสมอ ไม่ต้องเลื่อนหา */
  .sheet-body .chats {
    position: sticky; bottom: 0; margin: 0 calc(-1 * clamp(24px, 4vw, 44px)) calc(-28px - env(safe-area-inset-bottom));
    padding: 12px clamp(24px, 4vw, 44px) calc(14px + env(safe-area-inset-bottom));
    background: var(--card); border-top: 1px solid var(--line);
  }
  .sheet-body .chat { flex: 1 1 auto; justify-content: center; }
  .item { grid-template-columns: 1fr; }
  .order-grid { grid-template-columns: 1fr; }
  .order-summary { position: static; }
  .item-shot { position: relative; top: 0; max-width: 520px; width: 100%; justify-self: center; }
}
@media (max-width: 560px) {
  body { font-size: 16px; }
  .bar-in { gap: 12px; min-height: 62px; }
  .mark { width: 36px; height: 36px; }
  .brand-name { font-size: 18px; }
  .bar-cta { padding: 8px 15px; font-size: 14px; }
  .family a { font-size: 13px; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 12px; }
  .card-name { font-size: 15px; }
  .card-desc { display: none; }
  .price { font-size: 15.5px; }
  .more { display: none; }
  .hero-actions a { flex: 1 1 auto; justify-content: center; }
  .family-card { grid-template-columns: 34% minmax(0, 1fr); }
  .family-cover { min-height: 150px; }
  .family-body { padding: 16px; }
  .chats.big .chat { width: 100%; }
  .bar-link { font-size: 14px; padding-inline: 2px; }
  /* มือถือ: มีตะกร้าแล้วซ่อนปุ่มแชทบนแถบบน (ยังมีในหน้าสินค้าและท้ายหน้า) */
  .has-shop .bar-cta, .has-shop .bar-link, .bar-icon-text { display: none; }
  .bar-icon { padding: 0 8px; }
  .account { flex-direction: column; align-items: flex-start; }
  .account-qr { width: 100%; max-width: 240px; height: auto; aspect-ratio: 1; }
  .cart-line { grid-template-columns: 60px minmax(0, 1fr) auto; }
  .cart-line img, .cart-thumb { width: 60px; height: 75px; }
  .item-order .chat { flex: 1 1 auto; justify-content: center; }
  .article-body { font-size: 17px; }
  .posts { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
