/* ============================================================
   กรุทอง — ธีม "ห้องแสดงพระ" : พื้นสว่างอุ่น การ์ดขาว หมึกเข้ม
   ทองคำเปลวเป็นสีเน้น / ตู้กรุกำมะหยี่เขียวเป็นจุดจำ (signature)
   Palette: E-commerce Luxury (bg #FAFAF9, ink #0C0A09, gold #A16207)
   ============================================================ */
:root {
  --paper: #fafaf9;
  --surface: #ffffff;
  --surface-2: #f5f4f0;
  --velvet-900: #0c1512;
  --velvet-700: #1b3a2d;
  --ink: #0c0a09;
  --ink-2: #44403c;
  --ink-3: #6d675f;
  --gold: #a16207;
  --gold-strong: #8a6508;
  --gold-2: #c9a227;
  --gold-3: #e9c766;
  --dark: #1c1917;
  --dark-2: #292524;
  --lacquer: #b02e3c;
  --lacquer-deep: #8f1d2c;
  --jade: #15803d;
  --line: #e7e5e4;
  --line-2: #d6d3d1;
  --shadow-sm: 0 1px 2px rgba(28, 25, 23, 0.06);
  --shadow: 0 16px 40px rgba(28, 25, 23, 0.12);
  --r-lg: 18px;
  --r-md: 12px;
  --disp: "Trirong", serif;
  --body: "Sarabun", sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--body);
  background:
    radial-gradient(1100px 420px at 82% -120px, rgba(201, 162, 39, 0.10), transparent 62%),
    var(--paper);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.65;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  overflow-wrap: anywhere;
  -webkit-tap-highlight-color: transparent;
}
button, a, input, select, textarea, label { touch-action: manipulation; }
main { flex: 1; width: 100%; }
img, svg { display: block; }
a { color: var(--gold-strong); text-decoration: none; cursor: pointer; }
a:hover { color: var(--ink); }
button { font-family: inherit; cursor: pointer; }
input, select, textarea { font-family: inherit; font-size: 15px; }

:focus-visible { outline: 2px solid var(--gold-strong); outline-offset: 2px; border-radius: 4px; }
.skip-link {
  position: absolute; left: -999px; top: 8px; z-index: 200;
  background: var(--dark); color: #fff; padding: 8px 14px; border-radius: 8px;
}
.skip-link:focus { left: 8px; }

.wrap { width: min(1180px, 100% - 40px); margin-inline: auto; }
.wrap--narrow { width: min(920px, 100% - 40px); }

h1, h2, h3 { font-family: var(--disp); font-weight: 600; line-height: 1.25; color: var(--ink); }
.gold-text {
  background: linear-gradient(105deg, #7c5303 0%, #b8860b 40%, #8a6508 70%, #a16207 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* ---------- ปุ่ม ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 1px solid transparent; border-radius: 999px;
  padding: 11px 22px; font-size: 15px; font-weight: 600; line-height: 1.2;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, border-color 0.18s, color 0.18s;
  white-space: nowrap;
}
.btn svg { width: 18px; height: 18px; }
.btn--gold {
  background: linear-gradient(180deg, #ecd07c, #d3ad3e 45%, #b98d1e);
  color: var(--ink);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5), var(--shadow-sm);
}
.btn--gold:hover { transform: translateY(-1px); box-shadow: inset 0 1px 0 rgba(255,255,255,.5), 0 10px 22px rgba(161, 98, 7, 0.28); }
.btn--gold:active { transform: translateY(0); }
.btn--dark { background: var(--dark); color: #f5f5f4; box-shadow: var(--shadow-sm); }
.btn--dark:hover { background: var(--dark-2); transform: translateY(-1px); box-shadow: 0 10px 22px rgba(28, 25, 23, 0.25); }
.btn--outline { border-color: var(--line-2); color: var(--ink); background: var(--surface); }
.btn--outline:hover { border-color: var(--ink-3); background: var(--surface-2); }
.btn--lacquer { background: linear-gradient(180deg, #c23a48, var(--lacquer) 55%, #96202e); color: #fff; box-shadow: 0 6px 18px rgba(176, 46, 60, 0.28); }
.btn--lacquer:hover { transform: translateY(-1px); }
.btn--ghost { color: var(--ink-3); background: none; border-color: transparent; }
.btn--ghost:hover { color: var(--ink); background: var(--surface-2); }
.btn--danger { border-color: #fecaca; color: #b91c1c; background: var(--surface); }
.btn--danger:hover { background: #fef2f2; border-color: #fca5a5; }
.btn--full { width: 100%; }
.btn--sm { padding: 7px 14px; font-size: 13.5px; }
.btn--lg { padding: 14px 30px; font-size: 16.5px; }
.btn[disabled] { opacity: 0.45; cursor: not-allowed; transform: none !important; }
.linkbtn { background: none; border: 0; color: var(--gold-strong); font-size: inherit; text-decoration: underline; text-underline-offset: 3px; }
.linkbtn:hover { color: var(--ink); }

/* ---------- เฮดเดอร์ ---------- */
.hd {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.hd__in {
  width: min(1280px, 100% - 28px); margin-inline: auto;
  display: flex; align-items: center; gap: 18px; height: 66px;
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); flex-shrink: 0; }
.brand__mark { width: 34px; height: 34px; color: var(--gold-strong); filter: drop-shadow(0 2px 4px rgba(161, 98, 7, 0.25)); }
.brand__txt { font-family: var(--disp); font-weight: 700; font-size: 24px; letter-spacing: 0.5px; line-height: 1.05; display: flex; flex-direction: column; color: var(--ink); }
.brand__txt small { font-family: var(--body); font-size: 10px; font-weight: 600; color: var(--ink-3); letter-spacing: 2.5px; }
.hd__nav { display: flex; gap: 4px; }
.hd__nav a {
  color: var(--ink-2); padding: 8px 13px; border-radius: 999px; font-size: 15px; font-weight: 600;
  transition: color 0.15s, background 0.15s;
}
.hd__nav a:hover { color: var(--ink); background: var(--surface-2); }
.hd__nav a.is-active { color: var(--gold-strong); background: rgba(201, 162, 39, 0.14); }
.hd__search { flex: 1; max-width: 330px; margin-left: auto; position: relative; display: flex; align-items: center; }
.hd__search svg { position: absolute; left: 13px; width: 17px; height: 17px; fill: none; stroke: var(--ink-3); stroke-width: 1.8; stroke-linecap: round; }
.hd__search input {
  width: 100%; background: var(--surface); border: 1px solid var(--line-2); border-radius: 999px;
  color: var(--ink); padding: 9px 16px 9px 38px; transition: border-color 0.15s, box-shadow 0.15s;
}
.hd__search input::placeholder { color: var(--ink-3); }
.hd__search input:focus { outline: none; border-color: var(--gold-strong); box-shadow: 0 0 0 3px rgba(161, 98, 7, 0.12); }
.hd__acts { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.iconbtn {
  position: relative; width: 40px; height: 40px; border-radius: 12px; border: 1px solid transparent;
  background: none; color: var(--ink-2); display: grid; place-items: center; transition: color .15s, border-color .15s, background .15s;
}
.iconbtn svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linejoin: round; stroke-linecap: round; }
.iconbtn:hover { color: var(--gold-strong); border-color: var(--line); background: var(--surface); }
.iconbtn .badge {
  position: absolute; top: 1px; right: 0; min-width: 17px; height: 17px; padding: 0 4px;
  background: var(--lacquer); color: #fff; font-size: 10.5px; font-weight: 700; font-style: normal;
  border-radius: 999px; display: grid; place-items: center; border: 1px solid #fff;
}
.hd__user {
  display: flex; align-items: center; gap: 9px; background: var(--surface); border: 1px solid var(--line-2);
  border-radius: 999px; padding: 4px 14px 4px 5px; color: var(--ink); margin-left: 4px;
  transition: border-color .15s, box-shadow .15s;
}
.hd__user:hover { border-color: var(--gold-strong); box-shadow: var(--shadow-sm); }
.avatar {
  width: 30px; height: 30px; border-radius: 999px; background: linear-gradient(160deg, var(--gold-3), var(--gold-2));
  display: grid; place-items: center; color: var(--ink);
}
.avatar svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.avatar.is-init { font-weight: 700; font-size: 13px; }
.hd__username { font-size: 14px; font-weight: 600; max-width: 110px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hd__burger { display: none; width: 40px; height: 40px; border: 1px solid var(--line-2); border-radius: 12px; background: var(--surface); color: var(--ink); place-items: center; }
.hd__burger svg { width: 20px; height: 20px; stroke: currentColor; stroke-width: 1.8; fill: none; stroke-linecap: round; }

.hd__menu {
  position: absolute; right: max(14px, calc((100% - 1280px) / 2)); top: 64px;
  min-width: 230px; background: var(--surface); border: 1px solid var(--line);
  border-radius: 14px; box-shadow: var(--shadow); padding: 6px; z-index: 110;
}
.hd__menu a, .hd__menu button {
  display: flex; width: 100%; align-items: center; gap: 10px; padding: 10px 13px;
  background: none; border: 0; color: var(--ink); font-size: 14.5px; border-radius: 9px; text-align: left;
}
.hd__menu a:hover, .hd__menu button:hover { background: var(--surface-2); }
.hd__menu .sep { height: 1px; background: var(--line); margin: 5px 8px; }
.hd__menu .menu-note { padding: 8px 13px; font-size: 12.5px; color: var(--ink-3); }

.hd__mobile { display: none; border-top: 1px solid var(--line); padding: 10px 16px 14px; flex-direction: column; gap: 2px; background: var(--surface); }
.hd__mobile a { padding: 12px 10px; color: var(--ink); border-radius: 10px; font-size: 15.5px; font-weight: 500; }
.hd__mobile a:hover { background: var(--surface-2); }
.hd__msearch { position: relative; display: flex; align-items: center; margin: 2px 0 8px; }
.hd__msearch svg { position: absolute; left: 13px; width: 17px; height: 17px; fill: none; stroke: var(--ink-3); stroke-width: 1.8; stroke-linecap: round; }
.hd__msearch input {
  width: 100%; background: var(--surface-2); border: 1px solid var(--line-2); border-radius: 999px;
  color: var(--ink); padding: 11px 16px 11px 38px; font-size: 15px;
}
.hd__msearch input::placeholder { color: var(--ink-3); }
.hd__msearch input:focus { outline: none; border-color: var(--gold-strong); background: var(--surface); }

/* ---------- ตัววิ่งตลาด ---------- */
.ticker {
  background: linear-gradient(90deg, var(--lacquer-deep), #a02836 45%, var(--lacquer-deep));
  overflow: hidden; white-space: nowrap; font-size: 13px; color: #f7e3c2;
}
.ticker__track { display: inline-flex; gap: 0; padding: 7px 0; animation: ticker 46s linear infinite; }
.ticker:hover .ticker__track { animation-play-state: paused; }
.ticker__track span { padding: 0 26px; position: relative; }
.ticker__track span::after { content: "✦"; position: absolute; right: -5px; color: var(--gold-3); opacity: 0.8; }
@keyframes ticker { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ---------- ฮีโร่ ---------- */
.hero { padding: 58px 0 46px; position: relative; overflow: hidden; }
.hero__grid { display: grid; grid-template-columns: 1.04fr 1fr; gap: 54px; align-items: center; }
.hero__eyebrow {
  display: inline-flex; align-items: center; gap: 9px; color: var(--gold-strong);
  font-size: 13px; letter-spacing: 3px; font-weight: 700; margin-bottom: 16px;
}
.hero__eyebrow::before { content: ""; width: 34px; height: 2px; background: var(--gold-2); }
.hero h1 { font-size: clamp(2.1rem, 4.4vw, 3.5rem); margin-bottom: 18px; font-weight: 700; }
.hero__sub { color: var(--ink-2); font-size: 17px; max-width: 46ch; margin-bottom: 28px; }
.hero__cta { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 34px; }
.hero__trust { display: flex; flex-direction: column; gap: 10px; }
.hero__trust li { list-style: none; display: flex; gap: 11px; align-items: center; color: var(--ink-2); font-size: 14.5px; }
.hero__trust li b { color: var(--ink); font-weight: 700; }
.hero__trust svg { width: 19px; height: 19px; stroke: var(--gold-strong); fill: none; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }

/* ตู้กรุ — จุดจำของเว็บ: ตู้กำมะหยี่เขียวบนหน้าขาว */
.cabinet {
  position: relative; background:
    linear-gradient(180deg, rgba(233, 199, 102, 0.16), rgba(233, 199, 102, 0.03) 30%, transparent),
    linear-gradient(180deg, var(--velvet-700), var(--velvet-900));
  border: 1px solid rgba(201, 162, 39, 0.5); border-radius: 26px; padding: 30px 26px 22px;
  box-shadow: var(--shadow);
}
.cabinet::before, .cabinet::after {
  content: ""; position: absolute; left: 16px; right: 16px; height: 1px; background: rgba(201, 162, 39, 0.4);
}
.cabinet::before { top: 9px; }
.cabinet::after { bottom: 9px; }
.cabinet__row { display: flex; align-items: flex-end; justify-content: center; gap: 14px; }
.cabinet__cell { width: 31%; }
.cabinet__cell--mid { width: 38%; margin-bottom: -6px; }
.cabinet__cap {
  display: flex; justify-content: space-between; align-items: baseline; gap: 8px;
  border-top: 1px solid rgba(201, 162, 39, 0.25); margin-top: 20px; padding-top: 14px;
}
.cabinet__cap span { color: rgba(247, 227, 194, 0.66); font-size: 12.5px; letter-spacing: 1px; }
.cabinet__cap a { color: var(--gold-3); font-size: 13.5px; }
.cabinet__cap a:hover { color: #fff; }
.niche-link { display: block; text-align: center; transition: transform 0.25s ease; }
.niche-link:hover { transform: translateY(-5px); }
.niche-link .amulet-art { width: 100%; max-width: 240px; height: auto; margin-inline: auto; }
.niche-name { display: block; font-family: var(--disp); font-size: 14.5px; color: #f5efe0; line-height: 1.35; margin-top: 7px; }
.niche-price { display: block; font-size: 13px; color: var(--gold-3); font-weight: 700; }
.cabinet__cell .niche-price { margin-bottom: 4px; }

/* ---------- แถบความเชื่อมั่น ---------- */
.trustbar { border-block: 1px solid var(--line); background: var(--surface); }
.trustbar__in { display: grid; grid-template-columns: repeat(4, 1fr); }
.trustbar__item {
  display: flex; gap: 13px; align-items: center; padding: 20px 18px;
  border-left: 1px solid var(--line);
}
.trustbar__item:first-child { border-left: 0; }
.trustbar__item svg { width: 26px; height: 26px; stroke: var(--gold-strong); fill: none; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.trustbar__item b { display: block; font-size: 14.5px; color: var(--ink); }
.trustbar__item span { font-size: 12.5px; color: var(--ink-3); }

/* ---------- หัวเรื่อง + หมวด ---------- */
.sect { padding: 52px 0 10px; }
.sect__head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 26px; }
.sect__eyebrow { font-size: 12.5px; letter-spacing: 3px; color: var(--gold-strong); font-weight: 700; margin-bottom: 6px; }
.sect__head h2 { font-size: clamp(1.55rem, 2.6vw, 2.1rem); }
.sect__more { font-size: 14px; flex-shrink: 0; padding-bottom: 4px; }

.cats { display: flex; gap: 12px; overflow-x: auto; padding: 2px 2px 14px; scrollbar-width: none; }
.cats::-webkit-scrollbar { display: none; }
.cat {
  flex: 0 0 auto; display: flex; align-items: center; gap: 12px;
  border: 1px solid var(--line-2); border-radius: 16px; padding: 13px 18px;
  background: var(--surface); color: var(--ink); transition: border-color .18s, transform .18s, box-shadow .18s;
  min-width: 196px; box-shadow: var(--shadow-sm);
}
.cat:hover { border-color: var(--gold-strong); transform: translateY(-2px); box-shadow: var(--shadow); }
.cat b { display: block; font-size: 15px; }
.cat small { color: var(--ink-3); font-size: 11.5px; display: block; line-height: 1.4; }
.cat__n { margin-left: auto; font-size: 12px; color: var(--gold-strong); font-weight: 700; background: rgba(201, 162, 39, 0.16); padding: 2px 9px; border-radius: 999px; flex-shrink: 0; }

/* ---------- การ์ดพระ (ซุ้มโค้ง) ---------- */
.grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.grid--5 { grid-template-columns: repeat(5, 1fr); gap: 16px; }
.hscroll { display: grid; grid-auto-flow: column; grid-auto-columns: 232px; gap: 18px; overflow-x: auto; padding: 4px 2px 18px; scrollbar-width: thin; scrollbar-color: var(--line-2) transparent; }

.pc {
  position: relative; display: flex; flex-direction: column;
  border: 1px solid var(--line); border-radius: 120px 120px 16px 16px;
  background: var(--surface);
  overflow: hidden; color: var(--ink);
  transition: transform 0.25s ease, border-color 0.25s, box-shadow 0.25s;
  box-shadow: var(--shadow-sm);
}
.pc:hover { transform: translateY(-5px); border-color: rgba(161, 98, 7, 0.45); box-shadow: var(--shadow); }
.pc__art { position: relative; padding: 16px 12px 6px; display: flex; justify-content: center; border-radius: 120px 120px 0 0; }
.pc__art > a { display: block; }
.pc__art .amulet-art { width: 100%; max-width: 190px; height: auto; transition: transform 0.3s ease; }
.pc:hover .pc__art .amulet-art { transform: scale(1.035) rotate(-0.6deg); }
.pc__info { border-top: 1px solid var(--line); padding: 13px 16px 15px; display: flex; flex-direction: column; gap: 5px; flex: 1; }
.pc__cat { font-size: 11px; letter-spacing: 1.6px; color: var(--ink-3); text-transform: uppercase; font-weight: 600; }
.pc__name { font-family: var(--disp); font-weight: 600; font-size: 15.5px; line-height: 1.4; color: var(--ink); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 43px; }
.pc__name:hover { color: var(--gold-strong); }
.pc__meta { font-size: 12.5px; color: var(--ink-2); display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.pc__foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: auto; padding-top: 9px; }
.pc__price { font-weight: 700; font-size: 16.5px; color: var(--gold-strong); }
.pc__price small { display: block; font-size: 10.5px; font-weight: 500; color: var(--ink-3); }
.pc__add { width: 34px; height: 34px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--surface); color: var(--ink); display: grid; place-items: center; transition: all .18s; flex-shrink: 0; }
.pc__add svg { width: 17px; height: 17px; stroke: currentColor; stroke-width: 2; fill: none; stroke-linecap: round; }
.pc__add:hover { background: var(--dark); color: var(--gold-3); border-color: var(--dark); }
.pc__add[disabled] { opacity: .4; cursor: not-allowed; }
.pc__flag { margin: 0 0 3px; }
.pc__heart { position: absolute; right: 10px; bottom: 10px; z-index: 2; width: 32px; height: 32px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, 0.25); background: rgba(12, 21, 18, 0.55); color: #f5efe0; display: grid; place-items: center; backdrop-filter: blur(4px); transition: all .18s; }
.pc__heart svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.pc__heart:hover { color: #fecaca; border-color: rgba(254, 202, 202, 0.6); }
.pc__heart.is-on { color: #f87171; }
.pc__heart.is-on svg { fill: currentColor; }
.pc.is-sold { opacity: 0.72; }
.pc.is-sold .pc__art .amulet-art { filter: grayscale(0.4) brightness(0.9); }

/* ป้ายสถานะ */
.flag { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 700; padding: 4px 10px; border-radius: 999px; letter-spacing: 0.4px; }
.flag--cert { background: linear-gradient(180deg, #ecd07c, var(--gold-2)); color: var(--ink); box-shadow: 0 2px 8px rgba(161, 98, 7, 0.3); }
.flag--sold { background: var(--ink); color: #fecaca; }
.flag--reserved { background: var(--dark); color: var(--gold-3); }
.flag--new { background: var(--lacquer); color: #fff; }
.flag svg { width: 11px; height: 11px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ดาวสภาพ */
.stars { display: inline-flex; align-items: center; gap: 2px; color: var(--gold-strong); }
.stars svg { width: 12.5px; height: 12.5px; fill: currentColor; }
.stars svg.half { opacity: 0.45; }
.stars b { font-size: 12px; color: var(--ink-3); font-weight: 500; margin-left: 4px; }

/* ---------- หน้าตลาด ---------- */
.shop { display: grid; grid-template-columns: 258px 1fr; gap: 34px; padding: 40px 0 70px; align-items: start; }
.filters {
  position: sticky; top: 86px; display: flex; flex-direction: column; gap: 0;
  border: 1px solid var(--line); border-radius: 16px; padding: 20px; background: var(--surface); box-shadow: var(--shadow-sm);
}
.filters__toggle { display: none; }
.filters__body { display: flex; flex-direction: column; gap: 20px; }
.filters__body::before { content: "ตัวกรอง"; font-family: var(--disp); font-size: 17px; font-weight: 600; color: var(--ink); margin-bottom: 2px; }
.fgroup { display: flex; flex-direction: column; gap: 8px; }
.fgroup > label { font-size: 12.5px; letter-spacing: 1.6px; color: var(--ink-3); font-weight: 700; text-transform: uppercase; }
.fgroup select, .fgroup input[type="number"], .input {
  background: var(--surface); border: 1px solid var(--line-2); color: var(--ink);
  border-radius: 10px; padding: 9px 12px; width: 100%;
}
.fgroup select:focus, .fgroup input:focus, .input:focus { outline: none; border-color: var(--gold-strong); box-shadow: 0 0 0 3px rgba(161, 98, 7, 0.12); }
.frow { display: flex; gap: 8px; align-items: center; }
.frow input { flex: 1; }
.fcheck { display: flex; align-items: center; gap: 9px; color: var(--ink); font-size: 14.5px; cursor: pointer; }
.fcheck input { width: 17px; height: 17px; accent-color: var(--gold-strong); }
.fgroup .mini { font-size: 12.5px; color: var(--ink-3); }
.shop__bar { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 20px; flex-wrap: wrap; }
.shop__bar p { color: var(--ink-2); font-size: 14.5px; }
.shop__bar p b { color: var(--ink); }
.chiprow { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 22px; }
.chip {
  border: 1px solid var(--line-2); background: var(--surface); color: var(--ink-2);
  padding: 7px 15px; border-radius: 999px; font-size: 13.5px; font-weight: 600; transition: all .15s;
}
.chip:hover { color: var(--ink); border-color: var(--ink-3); }
.chip.is-active { background: var(--dark); color: #f5f5f4; border-color: var(--dark); }

/* ---------- หน้าพระองค์เดี่ยว ---------- */
.prod { padding: 30px 0 70px; }
.crumbs { font-size: 13.5px; color: var(--ink-3); margin-bottom: 26px; }
.crumbs a { color: var(--ink-2); }
.crumbs a:hover { color: var(--gold-strong); }
.prod__grid { display: grid; grid-template-columns: 440px 1fr; gap: 46px; align-items: start; }
.prod__stage {
  border: 1px solid rgba(201, 162, 39, 0.5); border-radius: 26px; padding: 28px 22px 16px;
  background: linear-gradient(180deg, var(--velvet-700), var(--velvet-900));
  box-shadow: var(--shadow); position: sticky; top: 96px;
}
.prod__stage .amulet-art { width: 100%; max-width: 380px; margin: 0 auto; }
.prod__stagecap { display: flex; justify-content: space-between; gap: 8px; border-top: 1px solid rgba(201, 162, 39, 0.25); margin-top: 14px; padding-top: 12px; font-size: 12px; color: rgba(247, 227, 194, 0.66); }
.prod__catline { font-size: 12px; letter-spacing: 2.4px; color: var(--gold-strong); font-weight: 700; text-transform: uppercase; margin-bottom: 8px; }
.prod__info h1 { font-size: clamp(1.5rem, 2.6vw, 2.05rem); margin-bottom: 10px; }
.prod__seller { display: flex; align-items: center; gap: 9px; color: var(--ink-2); font-size: 14px; margin-bottom: 16px; flex-wrap: wrap; }
.prod__seller b { color: var(--ink); font-weight: 700; }
.prod__seller .dot { width: 3px; height: 3px; border-radius: 99px; background: var(--ink-3); }
.prod__desc { color: var(--ink-2); font-size: 15px; border-left: 3px solid var(--gold-2); padding-left: 16px; margin: 18px 0 22px; }
.spec { border: 1px solid var(--line); border-radius: 14px; overflow: hidden; margin-bottom: 24px; }
.spec__row { display: grid; grid-template-columns: 130px 1fr; border-bottom: 1px solid var(--line); }
.spec__row:last-child { border-bottom: 0; }
.spec__row dt { padding: 10px 16px; font-size: 13.5px; color: var(--ink-3); background: var(--surface-2); }
.spec__row dd { padding: 10px 16px; font-size: 14.5px; color: var(--ink); }
.buybox { border: 1px solid var(--line-2); border-radius: 18px; padding: 20px 22px; background: var(--surface); box-shadow: var(--shadow-sm); }
.buybox__price { font-family: var(--disp); font-size: 30px; font-weight: 700; color: var(--gold-strong); margin-bottom: 4px; }
.buybox__note { font-size: 13px; color: var(--ink-3); margin-bottom: 16px; }
.buybox__acts { display: flex; gap: 11px; margin-bottom: 13px; flex-wrap: wrap; }
.buybox__acts .btn { flex: 1; min-width: 140px; }
.buybox__foot { display: flex; gap: 14px; font-size: 12.5px; color: var(--ink-3); flex-wrap: wrap; }
.buybox__foot span { display: inline-flex; gap: 6px; align-items: center; }
.buybox__foot svg { width: 14px; height: 14px; stroke: var(--gold-strong); fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- ขั้นตอนการซื้อ ---------- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; counter-reset: step; }
.step { border: 1px solid var(--line); border-radius: var(--r-lg); padding: 26px 24px; background: var(--surface); position: relative; box-shadow: var(--shadow-sm); }
.step__n { font-family: var(--disp); font-size: 15px; color: var(--gold-strong); border: 1px solid rgba(201, 162, 39, 0.5); width: 34px; height: 34px; border-radius: 999px; display: grid; place-items: center; margin-bottom: 15px; background: rgba(201, 162, 39, 0.12); }
.step h3 { font-size: 18px; margin-bottom: 7px; }
.step p { color: var(--ink-2); font-size: 14px; }

/* ---------- แถบชวนขาย ---------- */
.sellband { margin: 60px 0 70px; border: 1px solid rgba(201, 162, 39, 0.5); border-radius: 26px; padding: 44px 46px; display: flex; align-items: center; justify-content: space-between; gap: 30px; background: radial-gradient(600px 260px at 12% 0%, rgba(233, 199, 102, 0.22), transparent 60%), linear-gradient(160deg, var(--velvet-700), var(--velvet-900)); box-shadow: var(--shadow); }
.sellband h2 { font-size: clamp(1.5rem, 2.6vw, 2.1rem); margin-bottom: 8px; color: #f5efe0; }
.sellband p { color: rgba(247, 227, 194, 0.8); max-width: 52ch; }
.sellband .btn--dark { background: var(--gold-2); color: var(--ink); }
.sellband .btn--dark:hover { background: var(--gold-3); }

/* ---------- ตะกร้า / สั่งซื้อ ---------- */
.pagehead { padding: 40px 0 8px; }
.pagehead h1 { font-size: clamp(1.6rem, 3vw, 2.2rem); }
.pagehead p { color: var(--ink-2); margin-top: 6px; }
.cartpage { display: grid; grid-template-columns: 1fr 360px; gap: 34px; align-items: start; padding-bottom: 70px; }
.cartlist { display: flex; flex-direction: column; }
.cartrow { display: grid; grid-template-columns: 92px 1fr auto auto; gap: 16px; align-items: center; padding: 16px 4px; border-bottom: 1px solid var(--line); }
.cartrow:first-child { border-top: 1px solid var(--line); }
.cartrow__art { width: 92px; border-radius: 60px 60px 10px 10px; overflow: hidden; border: 1px solid var(--line); }
.cartrow__art .amulet-art { width: 100%; height: auto; }
.cartrow__t { font-family: var(--disp); font-size: 16px; color: var(--ink); }
.cartrow__t:hover { color: var(--gold-strong); }
.cartrow__seller { font-size: 12.5px; color: var(--ink-3); margin-top: 3px; }
.cartrow__price { font-weight: 700; color: var(--gold-strong); font-size: 16px; text-align: right; }
.cartrow .x { background: none; border: 0; color: var(--ink-3); font-size: 17px; width: 32px; height: 32px; border-radius: 999px; transition: all .15s; }
.cartrow .x:hover { color: #b91c1c; background: #fef2f2; }
.summary { border: 1px solid var(--line); border-radius: var(--r-lg); padding: 24px; background: var(--surface); position: sticky; top: 96px; box-shadow: var(--shadow-sm); }
.summary h3 { font-size: 19px; margin-bottom: 16px; }
.sumrow { display: flex; justify-content: space-between; font-size: 14.5px; color: var(--ink-2); padding: 7px 0; }
.sumrow.total { border-top: 1px solid var(--line-2); margin-top: 10px; padding-top: 14px; color: var(--ink); font-size: 16px; }
.sumrow.total b { font-family: var(--disp); font-size: 24px; color: var(--gold-strong); }
.summary .btn { margin-top: 16px; }
.summary .fine { font-size: 12px; color: var(--ink-3); margin-top: 12px; text-align: center; }

.form { display: flex; flex-direction: column; gap: 15px; }
.form > h3 { color: var(--ink); }
.form label { display: flex; flex-direction: column; gap: 6px; font-size: 13.5px; color: var(--ink-2); font-weight: 600; }
.form label:has(input, select, textarea) { color: var(--ink); }
.form input:not([type="radio"]):not([type="checkbox"]), .form select, .form textarea, .input {
  background: var(--surface); border: 1px solid var(--line-2); border-radius: 10px;
  color: var(--ink); padding: 11px 13px; font-size: 15px; width: 100%;
}
.radio input, .fcheck input { width: auto; }
.form textarea { min-height: 90px; resize: vertical; }
.form input:focus, .form select:focus, .form textarea:focus { outline: none; border-color: var(--gold-strong); box-shadow: 0 0 0 3px rgba(161, 98, 7, 0.12); }
.form .row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form .err { color: #b91c1c; font-size: 13px; }
fieldset.radio-cards { border: 0; display: grid; gap: 10px; }
fieldset.radio-cards legend { font-size: 13.5px; font-weight: 700; color: var(--ink); margin-bottom: 9px; }
.radio { display: flex; flex-direction: row; align-items: center; justify-content: flex-start; text-align: left; gap: 10px; border: 1px solid var(--line-2); border-radius: 12px; padding: 12px 14px; cursor: pointer; font-size: 14px; color: var(--ink); background: var(--surface); transition: border-color .15s, background .15s, box-shadow .15s; }
.radio > span { flex: 1; }
.radio:hover { border-color: var(--ink-3); }
.radio:has(input:checked) { border-color: var(--gold-strong); background: rgba(201, 162, 39, 0.07); box-shadow: 0 0 0 1px var(--gold-strong); }
.radio input { accent-color: var(--gold-strong); flex-shrink: 0; }
.radio small { display: block; color: var(--ink-3); font-size: 12.5px; font-weight: 400; }
.form label.radio, .auth__form label.radio { display: flex; flex-direction: row; align-items: center; gap: 10px; }

.paybox { border: 1px solid var(--line); border-radius: 16px; padding: 18px; background: var(--surface-2); }
.paybox__qr { display: flex; gap: 16px; align-items: center; }
.paybox__qr .qr { background: #fff; padding: 7px; border-radius: 10px; border: 1px solid var(--line); }
.paybox__num { font-size: 15px; color: var(--ink); }
.paybox__num b { letter-spacing: 1px; }
.paybox .mini { font-size: 12px; color: var(--ink-3); margin-top: 10px; }

/* ---------- คำสั่งซื้อ ---------- */
.orders { display: flex; flex-direction: column; gap: 16px; padding: 24px 0 70px; }
.ordcard { border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); overflow: hidden; box-shadow: var(--shadow-sm); }
.ordcard__head { display: flex; flex-wrap: wrap; gap: 8px 20px; align-items: center; justify-content: space-between; padding: 15px 20px; border-bottom: 1px solid var(--line); background: var(--surface-2); }
.ordcard__head .oid { font-weight: 700; color: var(--ink); letter-spacing: 0.6px; }
.ordcard__head .odate { color: var(--ink-3); font-size: 13px; }
.ordcard__body { padding: 14px 20px 18px; display: flex; flex-direction: column; gap: 12px; }
.orditems { display: flex; flex-direction: column; gap: 9px; }
.orditem { display: flex; gap: 13px; align-items: center; }
.orditem .thumb { width: 56px; flex-shrink: 0; border-radius: 34px 34px 8px 8px; overflow: hidden; border: 1px solid var(--line); }
.orditem .thumb .amulet-art { width: 100%; height: auto; }
.orditem b { font-size: 14.5px; color: var(--ink); font-weight: 600; display: block; }
.orditem span { font-size: 12.5px; color: var(--ink-3); }
.orditem .oprice { margin-left: auto; color: var(--gold-strong); font-weight: 700; font-size: 14.5px; white-space: nowrap; }
.ordcard__foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.ordcard__total { font-size: 14px; color: var(--ink-2); }
.ordcard__total b { color: var(--gold-strong); font-size: 17px; font-family: var(--disp); }
.ordcard__acts { display: flex; gap: 9px; flex-wrap: wrap; }

.status { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; font-weight: 700; padding: 5px 12px; border-radius: 999px; letter-spacing: 0.3px; }
.status::before { content: ""; width: 7px; height: 7px; border-radius: 99px; background: currentColor; }
.status--pending { color: #92400e; background: #fef3c7; border: 1px solid #fcd34d; }
.status--paid { color: #1d4ed8; background: #dbeafe; border: 1px solid #93c5fd; }
.status--shipped { color: var(--ink-2); background: var(--surface-2); border: 1px solid var(--line-2); }
.status--done { color: #166534; background: #dcfce7; border: 1px solid #86efac; }
.status--cancelled { color: #b91c1c; background: #fee2e2; border: 1px solid #fca5a5; }

.timeline { list-style: none; display: flex; flex-direction: column; gap: 0; margin: 8px 0 4px; }
.timeline li { position: relative; padding: 0 0 18px 26px; font-size: 13.5px; color: var(--ink-2); }
.timeline li::before { content: ""; position: absolute; left: 5px; top: 5px; width: 9px; height: 9px; border-radius: 99px; background: var(--gold-2); box-shadow: 0 0 0 3px rgba(201, 162, 39, 0.25); }
.timeline li::after { content: ""; position: absolute; left: 9px; top: 17px; bottom: 0; width: 1px; background: var(--line); }
.timeline li:last-child { padding-bottom: 2px; }
.timeline li:last-child::after { display: none; }
.timeline li.is-now { color: var(--ink); }
.timeline li.is-now::before { background: var(--gold-strong); }
.timeline li b { display: block; color: inherit; }
.timeline li span { font-size: 12px; color: var(--ink-3); }

/* ---------- บัญชี / ผู้ขาย ---------- */
.dashgrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-bottom: 30px; }
.stat { border: 1px solid var(--line); border-radius: var(--r-lg); padding: 20px 22px; background: var(--surface); box-shadow: var(--shadow-sm); }
.stat span { font-size: 13px; color: var(--ink-3); display: block; font-weight: 600; }
.stat b { font-family: var(--disp); font-size: 27px; color: var(--gold-strong); display: block; margin-top: 4px; }
.stat small { font-size: 12px; color: var(--ink-2); }

.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 24px; overflow-x: auto; }
.tabs button { background: none; border: 0; color: var(--ink-2); padding: 11px 18px; font-size: 15px; font-weight: 600; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tabs button:hover { color: var(--ink); }
.tabs button.is-active { color: var(--gold-strong); border-bottom-color: var(--gold-strong); }

.tblwrap { border: 1px solid var(--line); border-radius: var(--r-lg); overflow: auto; background: var(--surface); box-shadow: var(--shadow-sm); }
table.tbl { width: 100%; border-collapse: collapse; min-width: 640px; }
.tbl th { text-align: left; font-size: 11.5px; letter-spacing: 1.6px; text-transform: uppercase; color: var(--ink-3); font-weight: 700; padding: 13px 16px; border-bottom: 1px solid var(--line-2); background: var(--surface-2); }
.tbl td { padding: 12px 16px; border-bottom: 1px solid var(--line); font-size: 14px; vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl .titem { display: flex; align-items: center; gap: 12px; }
.tbl .titem .thumb { width: 46px; border-radius: 28px 28px 7px 7px; overflow: hidden; border: 1px solid var(--line); flex-shrink: 0; }
.tbl .titem .thumb .amulet-art { width: 100%; height: auto; }
.tbl .titem b { font-weight: 600; color: var(--ink); font-size: 14px; }
.tbl .titem span { display: block; font-size: 12px; color: var(--ink-3); }
.tbl .price { color: var(--gold-strong); font-weight: 700; white-space: nowrap; }
.tbl select { background: var(--surface); border: 1px solid var(--line-2); color: var(--ink); border-radius: 8px; padding: 6px 9px; font-size: 13px; }
.tbl .rowacts { display: flex; gap: 6px; }
.icon-x { width: 30px; height: 30px; border-radius: 8px; border: 1px solid transparent; background: none; color: var(--ink-3); display: grid; place-items: center; }
.icon-x:hover { color: #b91c1c; background: #fef2f2; }
.icon-x svg { width: 15px; height: 15px; stroke: currentColor; stroke-width: 2; fill: none; stroke-linecap: round; }

.accgrid { display: grid; grid-template-columns: 340px 1fr; gap: 34px; align-items: start; padding: 24px 0 70px; }
.panel { border: 1px solid var(--line); border-radius: var(--r-lg); padding: 24px; background: var(--surface); box-shadow: var(--shadow-sm); }
.panel h3 { font-size: 18px; margin-bottom: 16px; }
.panel + .panel { margin-top: 20px; }

/* ---------- โมดัล ---------- */
.modal { position: fixed; inset: 0; z-index: 300; display: grid; place-items: center; padding: 18px; }
.modal__scrim { position: absolute; inset: 0; background: rgba(28, 25, 23, 0.5); backdrop-filter: blur(4px); }
.modal__box {
  position: relative; width: min(430px, 100%); max-height: min(86vh, 720px); overflow: auto;
  background: var(--surface);
  border: 1px solid var(--line); border-radius: 22px; padding: 30px 30px 28px;
  box-shadow: var(--shadow); animation: pop 0.28s ease;
}
.modal__box--wide { width: min(640px, 100%); }
@keyframes pop { from { opacity: 0; transform: translateY(14px) scale(0.98); } }
.modal__x { position: absolute; top: 13px; right: 13px; width: 34px; height: 34px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink-3); font-size: 14px; }
.modal__x:hover { color: var(--ink); border-color: var(--ink-3); }
.auth__tabs { display: grid; grid-template-columns: 1fr 1fr; border: 1px solid var(--line); border-radius: 12px; padding: 4px; margin-bottom: 22px; gap: 4px; background: var(--surface-2); }
.auth__tab { border: 0; background: none; color: var(--ink-2); padding: 9px; border-radius: 9px; font-size: 14.5px; font-weight: 700; }
.auth__tab.is-active { background: var(--dark); color: #f5f5f4; }
.auth__form { display: flex; flex-direction: column; gap: 14px; }
.auth__form h3 { font-size: 21px; }
.auth__form label { display: flex; flex-direction: column; gap: 6px; font-size: 13.5px; color: var(--ink-2); font-weight: 600; }
.auth__form input:not([type="radio"]) { background: var(--surface); border: 1px solid var(--line-2); border-radius: 10px; color: var(--ink); padding: 11px 13px; font-size: 15px; }
.auth__form input:focus { outline: none; border-color: var(--gold-strong); box-shadow: 0 0 0 3px rgba(161, 98, 7, 0.12); }
.auth__role { border: 0; display: flex; flex-direction: column; gap: 8px; }
.auth__role legend { font-size: 13.5px; color: var(--ink-2); font-weight: 700; margin-bottom: 4px; }
.auth__hint { border: 1px dashed rgba(161, 98, 7, 0.45); border-radius: 12px; padding: 11px 14px; font-size: 13px; color: var(--ink-2); display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; background: rgba(201, 162, 39, 0.06); }
.auth__hint b { color: var(--gold-strong); }

/* ---------- ทสต ---------- */
.toasts { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%); z-index: 400; display: flex; flex-direction: column; gap: 9px; align-items: center; pointer-events: none; }
.toast {
  background: var(--dark); color: #f5f5f4; border: 1px solid var(--dark-2);
  border-radius: 12px; padding: 11px 20px 11px 16px; font-size: 14.5px; box-shadow: var(--shadow);
  display: flex; gap: 10px; align-items: center; animation: toastin 0.3s ease; max-width: min(480px, 90vw);
}
.toast::before { content: ""; width: 4px; height: 22px; border-radius: 4px; background: var(--gold-3); flex-shrink: 0; }
.toast--err::before { background: #f87171; }
.toast--ok::before { background: #4ade80; }
@keyframes toastin { from { opacity: 0; transform: translateY(12px); } }
.toast.is-out { opacity: 0; transition: opacity 0.3s; }

/* ---------- อื่น ๆ ---------- */
.empty { text-align: center; padding: 70px 20px; color: var(--ink-2); border: 1px dashed var(--line-2); border-radius: var(--r-lg); background: var(--surface-2); }
.empty svg { width: 44px; height: 44px; stroke: var(--gold-strong); fill: none; stroke-width: 1.4; margin: 0 auto 14px; stroke-linecap: round; stroke-linejoin: round; }
.empty h3 { color: var(--ink); margin-bottom: 6px; font-size: 19px; }
.empty p { font-size: 14.5px; margin-bottom: 18px; }
.reveal { opacity: 0; transform: translateY(16px); }
.reveal.in { opacity: 1; transform: none; transition: opacity 0.65s ease, transform 0.65s ease; }
.sectionline { height: 1px; background: var(--line); margin: 40px 0 0; }

/* ---------- ฟุตเตอร์: ตู้กรุเขียวเข้ม ---------- */
.ft { border-top: 1px solid var(--line); background: linear-gradient(180deg, var(--velvet-700), var(--velvet-900)); color: #e7e0cd; margin-top: 30px; }
.ft__in { width: min(1180px, 100% - 40px); margin-inline: auto; display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 40px; padding: 46px 0 34px; }
.ft__col h4 { font-size: 13px; letter-spacing: 2px; color: var(--gold-3); text-transform: uppercase; margin-bottom: 15px; font-weight: 700; }
.ft__col a { display: block; color: rgba(231, 224, 205, 0.78); font-size: 14px; padding: 4.5px 0; }
.ft__col a:hover { color: #fff; }
.ft__col p { color: rgba(231, 224, 205, 0.6); font-size: 13.5px; }
.ft__brand .brand__txt { font-size: 21px; color: #f5efe0; }
.ft__brand .brand__mark { color: var(--gold-3); }
.ft__brand p { margin-top: 12px; max-width: 34ch; }
.ft__bar { border-top: 1px solid rgba(201, 162, 39, 0.25); }
.ft__bar span { display: block; width: min(1180px, 100% - 40px); margin-inline: auto; padding: 15px 0; font-size: 12px; color: rgba(231, 224, 205, 0.55); }

/* ---------- เมนูล่าง (มือถือ) ---------- */
.bnav { display: none; }

/* ---------- เรสปอนซีฟ ---------- */
@media (max-width: 1080px) {
  .hero__grid { grid-template-columns: 1fr; gap: 40px; }
  .prod__grid { grid-template-columns: 1fr; gap: 28px; }
  .prod__stage { position: static; max-width: 480px; margin-inline: auto; width: 100%; }
  .grid { grid-template-columns: repeat(3, 1fr); }
  .grid--5 { grid-template-columns: repeat(3, 1fr); }
  .accgrid { grid-template-columns: 1fr; }
  .hd__search { max-width: 250px; }
}
@media (max-width: 900px) {
  body { padding-bottom: calc(70px + env(safe-area-inset-bottom)); }
  .bnav {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 140;
    display: grid; grid-template-columns: repeat(5, 1fr);
    background: rgba(255, 255, 255, 0.96); backdrop-filter: blur(14px);
    border-top: 1px solid var(--line);
    padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
  }
  .bnav a {
    position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 3px; padding: 7px 0 5px; min-height: 50px;
    color: var(--ink-3); font-size: 11px; font-weight: 700; border-radius: 12px;
  }
  .bnav a svg { width: 23px; height: 23px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
  .bnav a:active { background: var(--surface-2); }
  .bnav a.is-active { color: var(--gold-strong); }
  .bnav a.is-active svg { stroke-width: 2; }
  .bnav .badge {
    position: absolute; top: 2px; right: calc(50% - 26px); min-width: 16px; height: 16px; padding: 0 4px;
    background: var(--lacquer); color: #fff; font-size: 10px; font-weight: 700; font-style: normal;
    border-radius: 999px; display: grid; place-items: center; border: 1px solid #fff;
  }
  .toasts { bottom: calc(84px + env(safe-area-inset-bottom)); }
  .hd__nav, .hd__search { display: none; }
  .hd__burger { display: grid; }
  .hd__mobile { display: flex; }
  .hd__mobile[hidden] { display: none; }
  .shop { grid-template-columns: 1fr; }
  .filters { position: static; padding: 0; border: 0; background: none; box-shadow: none; gap: 10px; }
  .filters__toggle {
    display: flex; align-items: center; gap: 10px; width: 100%;
    background: var(--surface); border: 1px solid var(--line-2); border-radius: 12px;
    padding: 13px 16px; font-size: 15px; font-weight: 700; color: var(--ink);
  }
  .filters__toggle svg { width: 19px; height: 19px; stroke: var(--ink-2); fill: none; stroke-width: 1.8; stroke-linecap: round; }
  .filters__toggle b { background: rgba(201, 162, 39, 0.16); color: var(--gold-strong); border-radius: 999px; padding: 1px 9px; font-size: 12.5px; }
  .filters__toggle .chev { margin-left: auto; font-style: normal; color: var(--ink-3); transition: transform 0.2s; }
  .filters.is-open .filters__toggle .chev { transform: rotate(180deg); }
  .filters__body { display: none; padding: 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
  .filters.is-open .filters__body { display: flex; flex-direction: column; gap: 18px; }
  .filters__body::before { content: none; }
  .fgroup { min-width: 0; flex: none; }
  .cartpage { grid-template-columns: 1fr; }
  .summary { position: static; }
  .steps { grid-template-columns: 1fr; }
  .trustbar__in { grid-template-columns: 1fr 1fr; }
  .trustbar__item:nth-child(3) { border-left: 0; border-top: 1px solid var(--line); }
  .trustbar__item:nth-child(4) { border-top: 1px solid var(--line); }
  .ft__in { grid-template-columns: 1fr 1fr; gap: 26px; }
  .sellband { flex-direction: column; text-align: center; padding: 36px 24px; }
  .dashgrid { grid-template-columns: 1fr; }
  .grid { grid-template-columns: repeat(2, 1fr); }
  .grid--5 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .wrap { width: calc(100% - 28px); }
  .iconbtn, .hd__burger { width: 44px; height: 44px; }
  .hd__in { gap: 9px; }
  .hd__username { display: none; }
  .brand__txt { font-size: 20px; }
  .brand__txt small { display: none; }
  .hero { padding: 26px 0 26px; }
  .cabinet { padding: 20px 14px 16px; }
  .cabinet__row { gap: 10px; overflow-x: auto; scroll-snap-type: x proximity; padding-bottom: 6px; }
  .cabinet__cell { flex: 0 0 78%; min-width: 0; scroll-snap-align: center; }
  .cabinet__cell--mid { flex-basis: 84%; }
  .grid { gap: 12px; }
  .pc { border-radius: 84px 84px 14px 14px; }
  .pc__info { padding: 11px 13px 13px; }
  .pc__name { font-size: 14.5px; min-height: 41px; }
  .pc__price { font-size: 15.5px; }
  .spec__row { grid-template-columns: 108px 1fr; }
  .buybox__acts .btn { min-width: 100%; }
  .form .row2 { grid-template-columns: 1fr; }
  .cartrow { grid-template-columns: 66px 1fr auto auto; gap: 10px; }
  .cartrow__art { width: 66px; }
  .pagehead { padding-top: 28px; }
  .sect { padding-top: 36px; }
  .ft__in { grid-template-columns: 1fr; gap: 22px; padding: 34px 0 24px; }
}

/* ---------- มือถือ: ตาราง → การ์ดแนวตั้ง ---------- */
@media (max-width: 700px) {
  .tblwrap { border: 0; background: none; overflow: visible; box-shadow: none; }
  .tbl { min-width: 0; display: block; }
  .tbl thead { display: none; }
  .tbl tbody { display: block; }
  .tbl tr {
    display: block; border: 1px solid var(--line); border-radius: 14px;
    background: var(--surface); padding: 12px 14px; margin-bottom: 12px; box-shadow: var(--shadow-sm);
  }
  .tbl td {
    display: flex; align-items: center; justify-content: space-between; gap: 16px;
    border-bottom: 1px dashed var(--line); padding: 8px 0; font-size: 14px;
  }
  .tbl tr td:first-child { padding-top: 0; }
  .tbl td:last-child { border-bottom: 0; padding-bottom: 0; }
  .tbl td::before {
    content: attr(data-label); color: var(--ink-3); font-size: 12px; letter-spacing: 0.8px;
    flex-shrink: 0; font-weight: 700;
  }
  .tbl td[data-nolabel]::before { content: none; }
  .tbl td[data-nolabel] { justify-content: flex-start; }
  .tbl select { max-width: 150px; }
  .tbl .rowacts { margin-left: auto; }
  /* ลิสต์เลื่อนแนวนอน: snap แบบ proximity เลื่อนลื่น ไม่ติด/เด้ง */
  .hscroll { grid-auto-columns: 47%; gap: 12px; scroll-snap-type: x proximity; -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain; }
  .hscroll .pc { scroll-snap-align: start; }
  .cats { -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain; }
  .cats .cat { min-width: 178px; }
  .chiprow { -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain; }
  .cabinet__row { scroll-snap-type: x proximity; -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain; }
  /* ช่องกรอก ≥16px กัน iOS ซูมหน้าเองตอนแตะ */
  input, select, textarea { font-size: 16px !important; }
  /* โมดัลเป็น bottom sheet */
  .modal { place-items: end stretch; padding: 0; }
  .modal__box {
    width: 100%; max-width: none; border-radius: 20px 20px 0 0; border-left: 0; border-right: 0; border-bottom: 0;
    padding: 26px 18px calc(22px + env(safe-area-inset-bottom)); max-height: 92dvh;
    animation: sheetup 0.32s ease;
  }
  @keyframes sheetup { from { transform: translateY(48px); opacity: 0.4; } }
  .tabs { gap: 0; }
  .tabs button { padding: 12px 14px; }
  .chiprow { overflow-x: auto; flex-wrap: nowrap; padding-bottom: 6px; margin-bottom: 16px; scrollbar-width: none; }
  .chiprow::-webkit-scrollbar { display: none; }
  .chip { flex: 0 0 auto; padding: 9px 16px; }
  .paybox__qr { flex-wrap: wrap; }
  .hero__cta .btn { flex: 1; }
  .pc__add { width: 40px; height: 40px; }
  .pc__heart { width: 38px; height: 38px; }
  .cartrow { grid-template-columns: 66px 1fr auto auto; }
  .cartrow .x { width: 40px; height: 40px; }
}

/* จอสัมผัส: ล้าง hover ที่ติดค้างหลังแตะ */
@media (hover: none) {
  .pc:hover, .cat:hover, .niche-link:hover { transform: none; }
  .pc:hover { box-shadow: var(--shadow-sm); }
  .pc:hover .pc__art .amulet-art { transform: none; }
  .btn:hover { transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; }
  .ticker__track { animation: none; }
}
