/* ละมุนผ้าม่านเดคคอร์ — ครีมอบอุ่น + น้ำเงินน่าเชื่อถือ + ทองจากโลโก้ (ใช้ประดับ) */
:root {
  --paper: #f7f1e6;
  --surface: #fffcf6;
  --tint: #efe6d6;
  --ink: #1c2633;
  --muted: #554d40;
  --navy: #1f3a5f;
  --navy-deep: #152a45;
  --gold: #85621c;        /* ทองเข้ม ใช้กับตัวหนังสือได้ */
  --gold-soft: #c9a45c;   /* ทองอ่อน ใช้ประดับเท่านั้น */
  --line: #e2d6c1;
  --danger: #a2321f;
  --success: #2e6a45;
  --line-green: #06c755;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgb(28 38 51 / .05), 0 6px 18px -8px rgb(28 38 51 / .14);
  --shadow-lift: 0 2px 4px rgb(28 38 51 / .06), 0 14px 30px -10px rgb(28 38 51 / .2);
  --ease: cubic-bezier(.2, .7, .2, 1);
  --gutter: 16px;
}
@media (min-width: 768px) { :root { --gutter: 32px; } }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font-family: 'IBM Plex Sans Thai', 'Noto Sans Thai', sans-serif; font-size: 17px; line-height: 1.7;
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
[hidden] { display: none !important; }
img { height: auto; }
a { color: var(--navy); text-decoration-thickness: 1px; text-underline-offset: 3px; }
h1, h2, h3 { line-height: 1.35; margin: 0 0 .5em; color: var(--navy-deep); font-weight: 700; text-wrap: balance; }
h1 { font-size: clamp(30px, 6vw, 52px); }
h2 { font-size: clamp(24px, 3.6vw, 34px); }
h3 { font-size: 19px; font-weight: 600; }
p { margin: 0 0 1em; }
button, input, select, textarea { font: inherit; color: inherit; }
input, select, textarea { font-size: 16px; }
:focus-visible { outline: 3px solid var(--gold-soft); outline-offset: 2px; border-radius: 4px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--navy); color: #fff; padding: 8px 14px; z-index: 100; border-radius: 8px; }
.skip:focus { left: 8px; }
.wrap { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 var(--gutter); }
.muted { color: var(--muted); }
.lead { font-size: 18px; color: var(--muted); max-width: 62ch; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; color: var(--gold); font-weight: 600; letter-spacing: .02em; margin-bottom: 10px; }
.ic { flex: none; }

/* ---------- ปุ่ม ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 10px 22px;
  border-radius: 999px; border: 1.5px solid transparent; font-weight: 600; text-decoration: none; cursor: pointer;
  transition: background-color .2s var(--ease), color .2s var(--ease), border-color .2s var(--ease), transform .2s var(--ease);
  -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: scale(.98); }
.btn[disabled] { background: #d9d2c5; color: #6e665a; border-color: #d9d2c5; cursor: not-allowed; transform: none; }
.btn-primary { background: var(--navy); color: #fff; }
.btn-primary:hover:not([disabled]) { background: var(--navy-deep); }
.btn-ghost { background: transparent; color: var(--navy); border-color: var(--navy); }
.btn-ghost:hover { background: rgb(31 58 95 / .07); }
.btn-light { background: #fff; color: var(--navy-deep); }
.btn-line { background: var(--line-green); color: #fff; }
.btn-line svg rect { fill: #fff; } .btn-line svg path:first-of-type { fill: var(--line-green); } .btn-line svg path:last-of-type { stroke: #fff; }
.btn-small { min-height: 40px; padding: 6px 14px; font-size: 15px; }
.btn-block { width: 100%; }
.link-more { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; text-decoration: none; }
.link-more:hover { text-decoration: underline; }

/* ---------- หัวเว็บ ---------- */
.site-header { position: sticky; top: 0; z-index: 40; background: rgb(247 241 230 / .94); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.header-row { display: flex; align-items: center; gap: 16px; min-height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--navy-deep); min-width: 0; }
.brand-logo { width: 48px; height: 48px; border-radius: 50%; }
.brand-text { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.brand-text strong { font-size: 17px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand-text small { color: var(--gold); font-size: 13px; }
.nav { display: none; margin-left: auto; gap: 4px; }
.nav a { padding: 8px 14px; border-radius: 999px; text-decoration: none; color: var(--ink); font-weight: 600; font-size: 16px; }
.nav a:hover { background: var(--tint); }
.nav a[aria-current="page"] { color: var(--navy); background: var(--tint); }
.header-actions { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.cart-link, .menu-btn { position: relative; display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; color: var(--navy-deep); background: none; border: 0; cursor: pointer; }
.cart-link:hover, .menu-btn:hover { background: var(--tint); }
.cart-count[hidden] { display: none; }
.cart-count { position: absolute; top: 4px; right: 2px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 999px; background: var(--navy); color: #fff; font-size: 12px; font-weight: 700; display: grid; place-items: center; line-height: 1; }
.mobile-nav { border-top: 1px solid var(--line); padding: 8px var(--gutter) 16px; display: grid; gap: 2px; background: var(--paper); }
.mobile-nav[hidden] { display: none; }
.mobile-nav a { display: flex; align-items: center; gap: 8px; padding: 12px 8px; text-decoration: none; color: var(--ink); font-weight: 600; border-radius: 8px; }
.mobile-nav a[aria-current="page"] { color: var(--navy); background: var(--tint); }
@media (min-width: 900px) {
  .nav { display: flex; }
  .header-actions { margin-left: 8px; }
  .menu-btn, .mobile-nav { display: none !important; }
  .brand-logo { width: 56px; height: 56px; }
  .header-row { min-height: 80px; }
}

/* ---------- แบนเนอร์ ---------- */
.hero-split { padding: 28px 0 36px; background: linear-gradient(180deg, var(--paper), var(--tint)); }
.hero-split-grid { display: grid; gap: 28px; align-items: center; }
.hero-title { margin-bottom: 14px; }
.hero-text { font-size: 18px; color: var(--muted); max-width: 46ch; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.hero-figure { margin: 0; justify-self: center; width: 100%; max-width: 512px; }
.hero-figure img { width: 100%; border-radius: 6px; }
@media (min-width: 900px) {
  .hero-split { padding: 64px 0 72px; }
  .hero-split-grid { grid-template-columns: 1.1fr .9fr; gap: 56px; }
  .hero-figure { justify-self: end; }
}
.hero-full { position: relative; height: min(70vh, 620px); min-height: 420px; overflow: hidden; color: #fff; background: var(--navy-deep); }
@media (min-width: 900px) { .hero-full { height: min(78vh, 720px); } }
.slides, .slide { position: absolute; inset: 0; }
.slide { opacity: 0; transition: opacity .8s var(--ease); }
.slide.is-active { opacity: 1; }
.slide-img { width: 100%; height: 100%; object-fit: cover; }
.hero-scrim { position: absolute; inset: 0; background: linear-gradient(90deg, rgb(21 42 69 / .82), rgb(21 42 69 / .35) 60%, transparent); }
.hero-full-content { position: relative; height: 100%; display: flex; flex-direction: column; justify-content: center; }
.hero-full .hero-title { color: #fff; max-width: 16ch; }
.hero-full .hero-text { color: rgb(255 255 255 / .88); }
.hero-full .eyebrow { color: #f0d9a8; }
.hero-full .btn-ghost { color: #fff; border-color: #fff; }
.slider-ctl { position: absolute; bottom: 18px; left: 50%; transform: translateX(-50%); display: flex; align-items: center; gap: 10px; }
.slider-btn { width: 44px; height: 44px; border-radius: 50%; border: 0; background: rgb(255 255 255 / .9); color: var(--navy-deep); display: grid; place-items: center; cursor: pointer; }
.slider-dots { display: flex; gap: 4px; }
.dot { width: 24px; height: 24px; border: 0; background: none; cursor: pointer; padding: 0; display: grid; place-items: center; }
.dot::after { content: ''; width: 8px; height: 8px; border-radius: 50%; background: rgb(255 255 255 / .55); transition: width .2s var(--ease); }
.dot.is-active::after { width: 20px; border-radius: 4px; background: #fff; }

/* ---------- ส่วนเนื้อหา ---------- */
.section { padding: 48px 0; }
.section-tight { padding: 24px 0 56px; }
.section-tint { background: var(--tint); }
@media (min-width: 900px) { .section { padding: 80px 0; } }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; }
.section-head h2 { margin: 0; }

.highlights-section { padding: 32px 0; border-bottom: 1px solid var(--line); }
.highlights { list-style: none; margin: 0 auto; display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px 12px; }
@media (min-width: 480px) { .highlights { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 768px) { .highlights { grid-template-columns: repeat(4, 1fr); gap: 24px; } }
.hl { text-align: center; }
.hl-icon { width: 60px; height: 60px; margin: 0 auto 10px; border-radius: 50%; display: grid; place-items: center; background: var(--surface); color: var(--gold); border: 1px solid var(--line); }
.hl h3 { font-size: 17px; margin-bottom: 4px; }
.hl p { font-size: 15px; color: var(--muted); margin: 0; }

.cat-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
@media (min-width: 480px) { .cat-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1024px) { .cat-grid { grid-template-columns: repeat(4, 1fr); gap: 16px; } }
.cat-tile {
  display: flex; flex-direction: column; gap: 6px; padding: 20px 16px; border-radius: var(--radius); background: var(--surface);
  text-decoration: none; color: var(--ink); box-shadow: var(--shadow); transition: transform .2s var(--ease), box-shadow .2s var(--ease);
}
.cat-icon { color: var(--navy); margin-bottom: 6px; }
.cat-name { font-weight: 700; font-size: 18px; color: var(--navy-deep); }
.cat-count { font-size: 14px; color: var(--muted); }

/* ---------- การ์ดสินค้า ---------- */
.product-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; align-items: start; }
@media (min-width: 768px) { .product-grid { grid-template-columns: repeat(3, 1fr); gap: 20px; } }
@media (min-width: 1024px) { .product-grid { grid-template-columns: repeat(4, 1fr); gap: 24px; } }
.card { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; transition: transform .2s var(--ease), box-shadow .2s var(--ease); }
.card-link { display: block; text-decoration: none; color: inherit; height: 100%; }
.card-media { position: relative; background: var(--tint); }
.card-media img { width: 100%; }
.badge { position: absolute; top: 10px; left: 10px; background: var(--navy); color: #fff; font-size: 13px; font-weight: 600; padding: 2px 10px; border-radius: 999px; }
.badge-out { background: #5d564b; }
.card-body { padding: 12px 12px 16px; }
@media (min-width: 768px) { .card-body { padding: 16px 18px 20px; } }
.card-cat { font-size: 13px; color: var(--gold); font-weight: 600; margin: 0 0 2px; }
.card-title { font-size: 16px; margin: 0 0 4px; line-height: 1.45; color: var(--ink); }
.card-sum { font-size: 14px; color: var(--muted); margin: 0 0 8px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-price { margin: 0; display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.price { font-weight: 700; color: var(--navy-deep); font-size: 17px; }
.price-old { color: var(--muted); font-size: 14px; }
@media (hover: hover) and (pointer: fine) {
  .card:hover, .cat-tile:hover { transform: translateY(-3px); box-shadow: var(--shadow-lift); }
}

/* ---------- แถบนัดวัดพื้นที่ ---------- */
.consult { background: var(--navy); color: #fff; }
.consult-inner { display: grid; gap: 24px; align-items: center; }
.consult h2 { color: #fff; }
.consult p { color: rgb(255 255 255 / .86); max-width: 60ch; }
.consult-area { display: flex; align-items: center; gap: 8px; color: #f0d9a8 !important; }
.consult-ctas { display: flex; flex-wrap: wrap; gap: 10px; }
@media (min-width: 900px) { .consult-inner { grid-template-columns: 1.4fr 1fr; } .consult-ctas { justify-content: flex-end; } }

/* ---------- หัวหน้าเพจ ---------- */
.page-head { padding: 28px 0 12px; }
@media (min-width: 900px) { .page-head { padding: 48px 0 16px; } }
.page-head h1 { font-size: clamp(28px, 5vw, 44px); margin-bottom: 8px; }
.crumbs { font-size: 14px; color: var(--muted); margin-bottom: 12px; }
.crumbs a { color: var(--muted); }

/* ---------- รวมสินค้า ---------- */
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 10px; margin: 0 calc(var(--gutter) * -1) 8px; padding-left: var(--gutter); padding-right: var(--gutter); scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; padding: 8px 16px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); text-decoration: none; color: var(--ink); font-weight: 600; font-size: 15px; min-height: 40px; display: inline-flex; align-items: center; }
.chip.is-active { background: var(--navy); color: #fff; border-color: var(--navy); }
.filters { display: grid; grid-template-columns: 1fr auto; gap: 10px; margin-bottom: 8px; }
.search-field { grid-column: 1 / -1; display: flex; align-items: center; gap: 8px; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 0 16px; color: var(--muted); }
.search-field input { border: 0; background: none; outline: none; min-height: 46px; width: 100%; color: var(--ink); }
.search-field:focus-within { border-color: var(--navy); }
.sort-field { display: flex; align-items: center; gap: 8px; font-size: 15px; color: var(--muted); }
.sort-field select, .field input, .field select, .field textarea {
  min-height: 46px; padding: 8px 12px; border-radius: var(--radius-sm); border: 1px solid #cfc2aa; background: var(--surface); width: 100%;
}
.field textarea { min-height: 80px; resize: vertical; }
@media (min-width: 768px) { .filters { grid-template-columns: 1fr auto auto; } .search-field { grid-column: auto; } }
.result-count { color: var(--muted); font-size: 15px; margin: 4px 0 16px; }
.empty { text-align: center; padding: 48px 16px; color: var(--muted); display: grid; justify-items: center; gap: 8px; }

/* ---------- หน้าสินค้า ---------- */
.product-wrap { padding-top: 20px; padding-bottom: 56px; }
.product-layout { display: grid; gap: 24px; }
@media (min-width: 900px) { .product-layout { grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; } .gallery { position: sticky; top: 100px; } }
.gallery-main { position: relative; background: var(--tint); border-radius: var(--radius); overflow: hidden; }
.gallery-slide { margin: 0; display: none; }
.gallery-slide.is-active { display: block; }
.gallery-slide img { width: 100%; }
.thumbs { display: flex; gap: 8px; margin-top: 10px; overflow-x: auto; }
.thumb { flex: none; width: 72px; padding: 0; border: 2px solid transparent; border-radius: 8px; overflow: hidden; background: var(--tint); cursor: pointer; }
.thumb.is-active { border-color: var(--navy); }
.product-title { font-size: clamp(26px, 4vw, 38px); }
.product-price { font-size: 26px; margin: 8px 0 20px; display: flex; gap: 10px; align-items: baseline; }
.product-price .price { font-size: 28px; }
.buy { display: grid; gap: 16px; padding: 20px; background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); margin-bottom: 24px; }
.variant-set { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.variant-set legend { font-weight: 600; margin-bottom: 8px; }
.variant { position: relative; }
.variant input { position: absolute; opacity: 0; }
.variant span { display: inline-flex; align-items: center; min-height: 44px; padding: 8px 14px; border-radius: var(--radius-sm); border: 1.5px solid #cfc2aa; background: #fff; cursor: pointer; font-size: 15px; line-height: 1.4; }
.variant input:checked + span { border-color: var(--navy); background: rgb(31 58 95 / .06); color: var(--navy-deep); font-weight: 600; }
.variant input:focus-visible + span { outline: 3px solid var(--gold-soft); outline-offset: 2px; }
.variant.is-out span { color: #8a8274; background: #f1ece3; text-decoration: line-through; cursor: not-allowed; }
.qty-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.qty-label { font-weight: 600; }
.qty { display: inline-flex; align-items: center; border: 1px solid #cfc2aa; border-radius: 999px; background: #fff; }
.qty button { width: 44px; height: 44px; border: 0; background: none; display: grid; place-items: center; cursor: pointer; color: var(--navy); border-radius: 50%; }
.qty input { width: 52px; text-align: center; border: 0; background: none; min-height: 44px; -moz-appearance: textfield; }
.qty input::-webkit-inner-spin-button { -webkit-appearance: none; }
.stock-note { font-size: 14px; color: var(--muted); }
.form-msg { margin: 0; font-size: 15px; min-height: 1.4em; }
.form-msg.is-ok { color: var(--success); }
.form-msg.is-err { color: var(--danger); }
.prose { max-width: 62ch; }
.prose h2 { font-size: 22px; }
.help-box { margin-top: 24px; padding: 18px; border-radius: var(--radius); background: var(--tint); display: grid; gap: 12px; justify-items: start; }
.help-box p { margin: 0; }

/* ---------- ตะกร้า / ชำระเงิน ---------- */
.cart-layout, .checkout-layout, .order-layout { display: grid; gap: 20px; align-items: start; }
@media (min-width: 900px) {
  .cart-layout, .checkout-layout, .order-layout { grid-template-columns: 1fr 380px; gap: 32px; }
  .summary { position: sticky; top: 100px; }
}
.cart-row { display: grid; grid-template-columns: 84px 1fr; gap: 12px; padding: 14px; background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); margin-bottom: 10px; }
.cart-row img { width: 84px; border-radius: 8px; background: var(--tint); }
.cart-row h3 { font-size: 16px; margin: 0 0 2px; }
.cart-row h3 a { color: var(--ink); text-decoration: none; }
.cart-row .meta { font-size: 14px; color: var(--muted); margin: 0 0 8px; }
.cart-row .row-bottom { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.cart-row .line-err { color: var(--danger); font-size: 14px; margin: 6px 0 0; }
.remove-btn { border: 0; background: none; color: var(--muted); display: inline-flex; align-items: center; gap: 4px; cursor: pointer; font-size: 14px; min-height: 40px; padding: 0 6px; }
.summary, .panel { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; }
.summary h2, .panel h2 { font-size: 21px; }
.panel { margin: 0 0 16px; border: 0; }
.panel legend { font-weight: 700; font-size: 19px; color: var(--navy-deep); padding: 0; float: left; width: 100%; margin-bottom: 12px; }
.totals { margin: 12px 0 16px; display: grid; gap: 6px; }
.totals div { display: flex; justify-content: space-between; gap: 12px; }
.totals dt { color: var(--muted); }
.totals dd { margin: 0; font-variant-numeric: tabular-nums; }
.totals .is-discount dd { color: var(--success); }
.totals .is-total { border-top: 1px solid var(--line); padding-top: 10px; margin-top: 4px; font-weight: 700; font-size: 20px; }
.totals .is-total dt { color: var(--ink); }
.free-left { background: #f3ead6; padding: 8px 12px; border-radius: 8px; font-size: 15px; }
.field-grid { display: grid; gap: 14px; clear: both; }
@media (min-width: 600px) { .field-grid { grid-template-columns: 1fr 1fr; } .field-full { grid-column: 1 / -1; } }
.field { display: grid; gap: 4px; }
.field > span { font-weight: 600; font-size: 15px; }
.field-err { color: var(--danger); font-size: 14px; min-height: 0; }
.field.has-err input { border-color: var(--danger); }
.pay-options { display: grid; gap: 10px; clear: both; }
.pay-opt { display: flex; gap: 12px; padding: 14px; border: 1.5px solid #cfc2aa; border-radius: var(--radius-sm); cursor: pointer; align-items: flex-start; background: #fff; }
.pay-opt[hidden] { display: none; }
.pay-opt input { margin-top: 5px; accent-color: var(--navy); width: 18px; height: 18px; }
.pay-opt span { display: grid; }
.pay-opt small { color: var(--muted); font-size: 14px; }
.pay-opt:has(input:checked) { border-color: var(--navy); background: rgb(31 58 95 / .05); }
.mini-items { list-style: none; padding: 0; margin: 0 0 12px; display: grid; gap: 10px; }
.mini-items li { display: flex; justify-content: space-between; gap: 12px; font-size: 15px; }
.mini-items small { display: block; color: var(--muted); font-size: 13px; }
.coupon-row { display: flex; gap: 8px; }
.coupon-row input { flex: 1; min-width: 0; }
.form-errors { color: var(--danger); padding-left: 18px; margin: 0 0 12px; font-size: 15px; }
.form-errors:empty { display: none; }

/* ---------- หน้าออเดอร์ / ชำระเงิน ---------- */
.order-no { font-size: 1.1em; color: var(--navy-deep); letter-spacing: .03em; }
.pay-panel { text-align: center; }
.amount-label { margin: 0; color: var(--muted); }
.amount { font-size: 40px; font-weight: 700; color: var(--navy-deep); margin: 0 0 6px; font-variant-numeric: tabular-nums; }
.qr-box { display: grid; justify-items: center; gap: 4px; margin: 18px 0; }
.qr { width: 220px; height: 220px; padding: 10px; background: #fff; border-radius: 12px; }
.qr svg, .qr img { width: 100%; height: 100%; }
.banks { list-style: none; padding: 0; margin: 0 0 16px; display: grid; gap: 10px; text-align: left; }
.bank { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 14px; border-radius: var(--radius-sm); background: var(--tint); flex-wrap: wrap; }
.bank div { display: grid; }
.bank .acc { font-size: 20px; font-weight: 700; letter-spacing: .04em; color: var(--navy-deep); font-variant-numeric: tabular-nums; }
.bank small { color: var(--muted); }
.slip-form { margin-top: 20px; display: grid; gap: 12px; text-align: left; }
.drop { position: relative; display: grid; place-items: center; min-height: 160px; border: 2px dashed #cbbd9f; border-radius: var(--radius); background: #fff; cursor: pointer; text-align: center; overflow: hidden; }
.drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.drop-ui { display: grid; justify-items: center; gap: 4px; color: var(--muted); padding: 16px; pointer-events: none; }
.drop-ui small { font-size: 13px; }
.slip-preview { max-height: 360px; width: auto; margin: 12px auto; border-radius: 8px; }
.drop.has-file .drop-ui { display: none; }
.alert { display: flex; gap: 12px; padding: 14px 16px; border-radius: var(--radius-sm); background: #fbe9e4; color: #6d2214; margin-bottom: 16px; }
.alert p { margin: 0; }
.timeline { list-style: none; padding: 0; margin: 0; display: grid; gap: 0; }
.timeline li { display: grid; grid-template-columns: 20px 1fr; gap: 10px; position: relative; padding-bottom: 14px; }
.timeline li:not(:last-child)::before { content: ''; position: absolute; left: 6px; top: 16px; bottom: 0; width: 2px; background: var(--line); }
.tl-dot { width: 14px; height: 14px; border-radius: 50%; background: var(--navy); margin-top: 6px; }
.timeline li:not(:last-child) .tl-dot { background: var(--gold-soft); }
.timeline time { display: block; font-size: 14px; color: var(--muted); }
.timeline p { margin: 2px 0 0; font-size: 15px; }
.track-wrap { max-width: 640px; }
.track-form { display: grid; gap: 14px; }
.status-pill { display: inline-block; padding: 4px 14px; border-radius: 999px; background: var(--navy); color: #fff; font-weight: 600; }

/* ---------- ท้ายเว็บ ---------- */
.site-footer { background: var(--navy-deep); color: rgb(255 255 255 / .86); padding: 48px 0 24px; }
.site-footer a { color: #fff; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.footer-grid { display: grid; gap: 28px; }
@media (min-width: 768px) { .footer-grid { grid-template-columns: 1.4fr 1fr 1fr .8fr; } }
.footer-brand { display: flex; gap: 14px; align-items: flex-start; }
.footer-logo { width: 64px; height: 64px; border-radius: 50%; }
.footer-name { font-weight: 700; color: #fff; font-size: 18px; margin: 0 0 4px; }
.site-footer .muted { color: rgb(255 255 255 / .72); font-size: 15px; margin: 0 0 4px; }
.footer-h { font-size: 16px; color: #f0d9a8; margin-bottom: 12px; }
.footer-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; font-size: 15px; }
.footer-list a, .footer-list span { display: inline-flex; gap: 8px; align-items: flex-start; }
.footer-list svg { margin-top: 3px; }
.footer-bottom { margin-top: 36px; padding-top: 18px; border-top: 1px solid rgb(255 255 255 / .14); font-size: 14px; color: rgb(255 255 255 / .6); }

/* ---------- ปุ่มลอยมือถือ: ไลน์ + โทร ---------- */
.float-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 6px 10px calc(6px + env(safe-area-inset-bottom)); background: rgb(255 252 246 / .97); border-top: 1px solid var(--line); }
.float-bar a { display: flex; align-items: center; justify-content: center; gap: 8px; height: 46px; border-radius: 999px; font-weight: 600; text-decoration: none; }
.float-line { background: var(--line-green); color: #fff; }
.float-line svg rect { fill: #fff; } .float-line svg path:first-of-type { fill: var(--line-green); } .float-line svg path:last-of-type { stroke: #fff; }
.float-call { background: var(--navy); color: #fff; }
body { padding-bottom: 72px; }
@media (min-width: 768px) { .float-bar { display: none; } body { padding-bottom: 0; } }

/* ---------- อนิเมชัน: ปรากฏตอนเลื่อนถึง (เล่นครั้งเดียว) ---------- */
.js [data-reveal] { opacity: 0; transform: translateY(20px); transition: opacity .5s var(--ease), transform .5s var(--ease); transition-delay: calc(var(--i, 0) * 70ms); }
.js [data-reveal].is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .js [data-reveal] { opacity: 1; transform: none; }
}
.toast { position: fixed; left: 50%; bottom: 90px; transform: translateX(-50%); background: var(--navy-deep); color: #fff; padding: 10px 18px; border-radius: 999px; z-index: 60; font-size: 15px; box-shadow: var(--shadow-lift); display: flex; gap: 10px; align-items: center; max-width: calc(100% - 32px); }
.toast a { color: #f0d9a8; font-weight: 600; }
@media (min-width: 768px) { .toast { bottom: 32px; } }

/* ---------- พื้นที่กดบนมือถืออย่างน้อย 44px และระยะบรรทัดไทย ---------- */
h1, h2, h3, .brand-text, .card-title, .product-title { line-height: 1.4; }
.footer-list a { min-height: 44px; align-items: center; }
.footer-list a svg { margin-top: 0; }
.chip, .btn-small, .link-more { min-height: 44px; }
.crumbs a { display: inline-flex; align-items: center; min-height: 44px; }
.card-cat, .brand-text small, .mini-items small, .drop-ui small, .badge, .cart-count { font-size: 14px; }
.crumbs a { min-width: 44px; justify-content: center; }
.sort-field span { white-space: nowrap; }

/* =====================================================================
   หน้าแรก — เล่าเรื่อง "แสงที่ละมุน"
   ===================================================================== */
:root { --night: #0f1b2b; --gold-light: #e9cf98; --cream-deep: #efe4cf; }
.btn-gold { background: var(--gold-light); color: #23190a; }
.btn-gold:hover { background: #f3dcae; }
.btn-glass { background: rgb(255 255 255 / .1); color: #fff; border-color: rgb(255 255 255 / .55); backdrop-filter: blur(6px); }
.btn-glass:hover { background: rgb(255 255 255 / .2); }
.h-label { font-size: 15px; font-weight: 600; letter-spacing: .08em; color: var(--gold); margin-bottom: 18px; display: flex; align-items: center; gap: 12px; }
.h-label::before { content: ''; width: 36px; height: 1px; background: currentColor; }
.h-link { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; font-weight: 600; text-decoration: none; color: inherit; border-bottom: 1px solid currentColor; padding-bottom: 2px; }
.h-link svg { transition: transform .25s var(--ease); }
.h-link:hover svg { transform: translateX(4px); }
.h-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 28px; }
.h-head h2 { margin: 0; font-size: clamp(30px, 5vw, 56px); line-height: 1.3; }

/* หัวเว็บโปร่งบนแบนเนอร์ (เฉพาะเมื่อมี JS คอยสลับเป็นพื้นทึบตอนเลื่อน) */
.js .page-home .site-header { position: fixed; left: 0; right: 0; background: transparent; border-bottom-color: transparent; backdrop-filter: none; transition: background-color .35s var(--ease), border-color .35s var(--ease); }
.js .page-home .site-header:not(.is-solid) .brand, .js .page-home .site-header:not(.is-solid) .nav a, .js .page-home .site-header:not(.is-solid) .cart-link, .js .page-home .site-header:not(.is-solid) .menu-btn { color: #fff; }
.js .page-home .site-header:not(.is-solid) .brand-text small { color: var(--gold-light); }
.js .page-home .site-header:not(.is-solid) .nav a:hover, .js .page-home .site-header:not(.is-solid) .nav a[aria-current="page"] { background: rgb(255 255 255 / .14); color: #fff; }
.js .page-home .site-header.is-solid, .js .page-home .site-header:has(.mobile-nav:not([hidden])) { background: rgb(247 241 230 / .96); border-bottom-color: var(--line); backdrop-filter: blur(10px); }

/* ---------- แบนเนอร์ ---------- */
.h-hero { position: relative; height: 100svh; min-height: 560px; max-height: 1000px; overflow: hidden; color: #fff; background: var(--night); isolation: isolate; }
@media (max-width: 767px) { .h-hero { height: 88svh; min-height: 520px; } }
.h-hero-media, .h-hero-media .slides, .h-hero-media .slide { position: absolute; inset: 0; }
.h-hero-media { will-change: transform; }
.h-hero-media .slide-img { width: 100%; height: 100%; object-fit: cover; }
.h-hero-shade { position: absolute; inset: 0; background: linear-gradient(100deg, rgb(10 18 30 / .78) 0%, rgb(10 18 30 / .45) 45%, rgb(10 18 30 / .05) 80%), linear-gradient(0deg, rgb(10 18 30 / .55), transparent 40%); }
.h-hero-inner { position: relative; z-index: 3; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; padding-bottom: clamp(72px, 12vh, 130px); }
.h-eyebrow { color: var(--gold-light); font-weight: 600; letter-spacing: .06em; margin-bottom: 14px; }
.h-title { color: #fff; font-size: clamp(44px, 8.4vw, 112px); line-height: 1.3; letter-spacing: -.01em; max-width: 11ch; margin: 0 0 20px; font-weight: 700; }
.h-lead { color: rgb(255 255 255 / .86); font-size: clamp(17px, 1.6vw, 20px); max-width: 44ch; }
.h-ctas { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.h-scroll { position: absolute; z-index: 3; right: var(--gutter); bottom: 28px; margin: 0; display: none; align-items: center; gap: 12px; font-size: 14px; letter-spacing: .12em; color: rgb(255 255 255 / .8); writing-mode: vertical-rl; }
.h-scroll span { width: 1px; height: 64px; background: linear-gradient(rgb(255 255 255 / .9), transparent); }
@media (min-width: 900px) { .h-scroll { display: flex; } }
.h-hero .slider-ctl { z-index: 4; }
/* ม่านเปิดตอนเข้าเว็บครั้งแรก */
.h-curtain { display: none; }
.intro .h-curtain { display: block; position: absolute; inset: 0; z-index: 2; pointer-events: none; }
.h-curtain span { position: absolute; top: 0; bottom: 0; width: 50.5%; background: url(/assets/img/photos/pleated-curtain-pearl-tieback-1200.webp) center / cover; filter: brightness(.5) sepia(.25); will-change: transform; }
.h-curtain-l { left: 0; transform-origin: 0 50%; box-shadow: inset -40px 0 60px -20px rgb(0 0 0 / .6); }
.h-curtain-r { right: 0; transform-origin: 100% 50%; transform: scaleX(-1); box-shadow: inset -40px 0 60px -20px rgb(0 0 0 / .6); }
/* แบนเนอร์รูปเล็ก */
.h-hero-plain { height: auto; max-height: none; min-height: 0; padding: 140px 0 72px; }
.h-hero-plain-grid { display: grid; gap: 32px; align-items: center; }
.h-hero-figure { margin: 0; max-width: 512px; }
.h-hero-figure img { width: 100%; border-radius: 6px; }
@media (min-width: 900px) { .h-hero-plain-grid { grid-template-columns: 1.1fr .9fr; } }

/* ---------- จุดเด่น ---------- */
.h-proof { background: var(--night); color: #fff; padding: 28px 0; }
.h-proof-list { list-style: none; margin: 0 auto; display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px 16px; }
@media (min-width: 900px) { .h-proof-list { grid-template-columns: repeat(4, 1fr); } }
.h-proof-list li { display: flex; gap: 12px; align-items: flex-start; }
.h-proof-icon { color: var(--gold-light); flex: none; margin-top: 2px; }
.h-proof-list strong { display: block; font-size: 16px; line-height: 1.5; }
.h-proof-list small { display: block; font-size: 14px; color: rgb(255 255 255 / .7); line-height: 1.6; }

/* ---------- ข้อความเปิดเรื่อง ---------- */
.h-manifesto { padding: clamp(80px, 14vw, 180px) 0; background: var(--paper); }
.h-manifesto-text { font-size: clamp(26px, 4.2vw, 54px); line-height: 1.55; font-weight: 600; color: var(--navy-deep); max-width: 24ch; margin: 0; letter-spacing: -.005em; }
.js .h-manifesto-text .mw { opacity: .16; transition: none; }

/* ---------- เรื่องของแสง ---------- */
.h-light { background: var(--night); color: #fff; }
.h-light-item { display: grid; }
.h-light-media { position: relative; overflow: hidden; aspect-ratio: 4 / 5; }
.h-light-media img { width: 100%; height: 100%; object-fit: cover; }
.h-light-copy { padding: 28px var(--gutter) 56px; }
.h-light-count { font-size: 14px; letter-spacing: .1em; color: rgb(255 255 255 / .55); margin-bottom: 10px; }
.h-light-count span { color: var(--gold-light); font-weight: 700; }
.h-light-kicker { color: var(--gold-light); font-weight: 600; margin-bottom: 4px; }
.h-light-title { color: #fff; font-size: clamp(34px, 5.4vw, 72px); line-height: 1.3; margin-bottom: 14px; }
.h-light-text { color: rgb(255 255 255 / .78); font-size: 18px; max-width: 34ch; }
.h-light .h-link { color: #fff; }
@media (min-width: 900px) {
  .h-light-stage { position: relative; }
  .h-light-item { grid-template-columns: 1.25fr 1fr; min-height: 100vh; align-items: center; }
  .h-light-media { aspect-ratio: auto; height: 100vh; }
  .h-light-copy { padding: 0 clamp(32px, 6vw, 96px); }
  /* โหมดค้างหน้า (เปิดโดย home.js) */
  .is-pinned .h-light-stage { height: 100vh; }
  .is-pinned .h-light-item { position: absolute; inset: 0; }
  .is-pinned .h-light-item + .h-light-item .h-light-media { clip-path: inset(100% 0 0 0); }
  .is-pinned .h-light-item + .h-light-item .h-light-copy { opacity: 0; }
}

/* ---------- หมวดสินค้า (เลื่อนแนวนอน) ---------- */
.h-cats { padding: clamp(72px, 10vw, 120px) 0; background: var(--paper); overflow: hidden; }
.h-cats-track { display: flex; gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 4px var(--gutter) 12px; scrollbar-width: none; }
.h-cats-track::-webkit-scrollbar { display: none; }
.h-cat { flex: none; width: min(72vw, 340px); scroll-snap-align: start; text-decoration: none; color: var(--ink); }
.h-cat-media { position: relative; aspect-ratio: 3 / 4; overflow: hidden; border-radius: 4px; background: var(--tint); display: grid; place-items: center; }
.h-cat-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease); }
.h-cat-icon { color: var(--navy); }
.h-cat-meta { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; padding-top: 14px; }
.h-cat-name { font-size: 22px; font-weight: 700; color: var(--navy-deep); }
.h-cat-count { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; color: var(--muted); }
@media (hover: hover) and (pointer: fine) { .h-cat:hover .h-cat-media img { transform: scale(1.06); } }
@media (min-width: 900px) {
  .h-cats-track { gap: 24px; overflow: visible; padding-left: max(var(--gutter), calc((100vw - 1200px) / 2 + var(--gutter))); }
  .h-cat { width: clamp(280px, 26vw, 380px); }
  .is-hscroll .h-cats-track { will-change: transform; }
  .h-cats:not(.is-hscroll) .h-cats-track { overflow-x: auto; }
}

/* ---------- สินค้าแนะนำ ---------- */
.h-featured { padding: clamp(64px, 9vw, 110px) 0; background: var(--cream-deep); }
.card-media { overflow: hidden; }
.card-media img { transition: transform .7s var(--ease); }
@media (hover: hover) and (pointer: fine) { .card:hover .card-media img { transform: scale(1.04); } }

/* ---------- งานตัดเย็บ ---------- */
.h-craft { padding: clamp(80px, 12vw, 160px) 0; background: var(--paper); }
.h-craft-grid { display: grid; gap: 48px; align-items: start; }
@media (min-width: 900px) { .h-craft-grid { grid-template-columns: 1fr 1fr; gap: clamp(48px, 7vw, 110px); } .h-craft-copy { padding-top: 40px; } }
.h-craft-visual { position: relative; padding-bottom: 18%; }
.h-craft-main { margin: 0; overflow: hidden; aspect-ratio: 4 / 5; border-radius: 4px; width: 82%; }
.h-craft-main img { width: 100%; height: 118%; object-fit: cover; will-change: transform; }
.h-craft-sub { margin: 0; position: absolute; right: 0; bottom: 0; width: 46%; aspect-ratio: 3 / 4; overflow: hidden; border-radius: 4px; border: 6px solid var(--paper); }
.h-craft-sub img { width: 100%; height: 100%; object-fit: cover; }
.h-craft-copy h2 { font-size: clamp(30px, 4.4vw, 54px); line-height: 1.35; }
.h-craft-text { font-size: 18px; color: var(--muted); max-width: 46ch; margin-bottom: 36px; }
.h-steps { list-style: none; padding: 0; margin: 0; position: relative; display: grid; gap: 28px; }
.h-steps-line { position: absolute; left: 21px; top: 10px; bottom: 10px; width: 2px; background: var(--line); }
.h-steps-line span { position: absolute; inset: 0; background: var(--navy); transform-origin: top; transform: scaleY(0); }
.no-js .h-steps-line span, html:not(.js) .h-steps-line span { transform: none; }
.h-step { display: grid; grid-template-columns: 44px 1fr; gap: 18px; position: relative; }
.h-step-no { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--paper); border: 2px solid var(--line); font-weight: 700; font-size: 15px; color: var(--muted); transition: background-color .3s var(--ease), color .3s var(--ease), border-color .3s var(--ease); }
.h-step.is-on .h-step-no { background: var(--navy); border-color: var(--navy); color: #fff; }
.h-step h3 { margin: 6px 0 4px; font-size: 20px; }
.h-step p { margin: 0; color: var(--muted); }

/* ---------- นัดวัดพื้นที่ ---------- */
.h-consult { position: relative; overflow: hidden; color: #fff; background: var(--night); padding: clamp(110px, 16vw, 200px) 0; isolation: isolate; }
.h-consult-media { position: absolute; inset: 0; z-index: -2; }
.h-consult-media img { width: 100%; height: 100%; object-fit: cover; will-change: transform; }
.h-consult::before { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgb(15 27 43 / .9), rgb(15 27 43 / .6)); }
.h-consult-inner { max-width: 1200px; }
.h-consult h2 { color: #fff; font-size: clamp(32px, 5.6vw, 72px); line-height: 1.3; max-width: 16ch; }
.h-consult p { color: rgb(255 255 255 / .84); font-size: 18px; max-width: 52ch; }
.h-consult-area { display: flex; gap: 8px; align-items: center; color: var(--gold-light) !important; }

/* ---------- ตัวหนังสือแตกคำ ---------- */
.sw { display: inline-block; overflow: hidden; vertical-align: top; padding: .08em 0 .16em; margin: -.08em 0 -.16em; }
.sw > span { display: inline-block; will-change: transform; }

@media (prefers-reduced-motion: reduce) {
  .intro .h-curtain { display: none; }
  .js .h-manifesto-text .mw { opacity: 1; }
  .h-steps-line span { transform: none; }
}
.h-title, .h-light-title, .h-head h2, .h-consult h2, .h-craft-copy h2 { line-height: 1.4; }
