/* =====================================================================
   HomeLoanDD — ดีไซน์ซิสเต็ม
   สัดส่วนสี  ขาว 70% : เทาเข้ม 20% : แดงเข้ม 10%
   ===================================================================== */

:root {
  /* แดงเข้มแบบสถาบันการเงิน — ไม่ใช้แดงสดสะท้อนแสง */
  --brand:        #991B1B;
  --brand-dark:   #7F1616;
  --brand-deep:   #641111;
  --brand-light:  #B91C1C;
  --brand-tint:   #FEF2F2;
  --brand-tint-2: #FEE2E2;

  /* เทาเข้มสำหรับตัวอักษรและโครงสร้าง */
  --ink:       #1E293B;
  --ink-soft:  #334155;
  --slate:     #475569;
  --muted:     #64748B;
  --muted-2:   #94A3B8;

  --line:      #E2E8F0;
  --line-soft: #F1F5F9;

  --bg:        #FFFFFF;
  --bg-soft:   #F8FAFC;
  --bg-slate:  #0F172A;

  --ok:    #15803D;
  --ok-bg: #F0FDF4;
  --warn:  #B45309;
  --warn-bg:#FFFBEB;
  --info:  #1D4ED8;
  --info-bg:#EFF6FF;
  --purple:#6D28D9;
  --purple-bg:#F5F3FF;

  --radius:    14px;
  --radius-sm: 10px;
  --radius-lg: 20px;

  --shadow-xs: 0 1px 2px rgba(15,23,42,.06);
  --shadow-sm: 0 1px 3px rgba(15,23,42,.08), 0 1px 2px rgba(15,23,42,.04);
  --shadow:    0 4px 16px rgba(15,23,42,.08);
  --shadow-md: 0 10px 30px rgba(15,23,42,.10);
  --shadow-lg: 0 24px 60px rgba(15,23,42,.14);

  --container: 1240px;
  --header-h:  74px;

  --font: 'Prompt', 'Noto Sans Thai', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* ------------------------------------------------------------ พื้นฐาน */
*, *::before, *::after { box-sizing: border-box; }

html {
  overflow-x: clip;          /* กันเว็บเลื่อนแนวนอนโดยไม่ตั้งใจ */
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font);
  font-weight: 400;
  font-size: 16px;
  line-height: 1.7;
  color: var(--ink-soft);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5 {
  margin: 0 0 .5em;
  color: var(--ink);
  font-weight: 600;
  line-height: 1.28;
  letter-spacing: -.01em;
}
h1 { font-size: clamp(1.9rem, 4.2vw, 3rem); font-weight: 700; }
h2 { font-size: clamp(1.5rem, 3vw, 2.15rem); }
h3 { font-size: clamp(1.15rem, 2vw, 1.4rem); }
h4 { font-size: 1.06rem; }

p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

a { color: var(--brand); text-decoration: none; transition: color .16s ease; }
a:hover { color: var(--brand-light); }

img { max-width: 100%; height: auto; display: block; }
[hidden] { display: none !important; }
hr { border: 0; border-top: 1px solid var(--line); margin: 2rem 0; }

:focus-visible {
  outline: 3px solid rgba(153,27,27,.35);
  outline-offset: 2px;
  border-radius: 4px;
}

::selection { background: var(--brand-tint-2); color: var(--brand-deep); }

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 200;
  background: var(--brand); color: #fff; padding: .8rem 1.4rem;
  border-radius: 0 0 var(--radius-sm) 0; font-weight: 600;
}
.skip-link:focus { left: 0; color: #fff; }

/* ------------------------------------------------------------ เลย์เอาต์ */
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: 20px; }
.container--narrow { max-width: 860px; }
.container--mid    { max-width: 1040px; }

.section       { padding: clamp(3.5rem, 7vw, 6rem) 0; }
.section--tight{ padding: clamp(2.5rem, 5vw, 4rem) 0; }
.section--soft { background: var(--bg-soft); }
.section--tint { background: var(--brand-tint); }
.section--dark { background: var(--bg-slate); color: #CBD5E1; }
.section--dark h2, .section--dark h3 { color: #fff; }

.grid { display: grid; gap: 24px; }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }
.stack   { display: flex; flex-direction: column; gap: 1rem; }
.row     { display: flex; gap: 1rem; align-items: center; flex-wrap: wrap; }
.row--between { justify-content: space-between; }
.spacer  { flex: 1; }

.text-center { text-align: center; }
.text-muted  { color: var(--muted); }
.text-brand  { color: var(--brand); }
.text-sm     { font-size: .875rem; }
.text-xs     { font-size: .8rem; }
.nowrap      { white-space: nowrap; }
.mb-0 { margin-bottom: 0 !important; }

/* ------------------------------------------------------------ หัวเรื่องบล็อก */
.eyebrow {
  display: inline-flex; align-items: center; gap: .5rem;
  font-size: .8rem; font-weight: 600; letter-spacing: .1em;
  text-transform: uppercase; color: var(--brand);
  margin-bottom: .9rem;
}
.eyebrow::before {
  content: ''; width: 26px; height: 2px; background: var(--brand); border-radius: 2px;
}
.eyebrow--center { justify-content: center; }

.section-head { max-width: 720px; margin-bottom: 2.75rem; }
.section-head--center { margin-inline: auto; text-align: center; }
.section-head p { color: var(--muted); font-size: 1.02rem; margin-bottom: 0; }

/* ------------------------------------------------------------ ปุ่ม */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .55rem;
  padding: .82rem 1.6rem;
  font-family: inherit; font-size: .95rem; font-weight: 600; line-height: 1.2;
  border: 1.5px solid transparent; border-radius: var(--radius-sm);
  cursor: pointer; text-align: center; white-space: nowrap;
  transition: background .16s ease, color .16s ease, border-color .16s ease,
              transform .16s ease, box-shadow .16s ease;
}
.btn:active { transform: translateY(1px); }

.btn--primary {
  background: var(--brand); color: #fff;
  box-shadow: 0 2px 10px rgba(153,27,27,.24);
}
.btn--primary:hover { background: var(--brand-dark); color: #fff; box-shadow: 0 6px 20px rgba(153,27,27,.32); }

.btn--outline { background: transparent; color: var(--brand); border-color: var(--brand); }
.btn--outline:hover { background: var(--brand); color: #fff; }

.btn--ghost { background: #fff; color: var(--ink); border-color: var(--line); }
.btn--ghost:hover { border-color: var(--muted-2); color: var(--brand); background: #fff; }

.btn--slate { background: var(--ink); color: #fff; }
.btn--slate:hover { background: #0B1220; color: #fff; }

.btn--line { background: #06C755; color: #fff; }
.btn--line:hover { background: #05a948; color: #fff; }

.btn--sm  { padding: .55rem 1.05rem; font-size: .85rem; }
.btn--lg  { padding: 1.02rem 2.1rem; font-size: 1.03rem; }
.btn--block { width: 100%; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .55; pointer-events: none; }

/* ------------------------------------------------------------ ป้ายสถานะ */
.badge {
  display: inline-flex; align-items: center; gap: .35rem;
  padding: .3rem .7rem; border-radius: 999px;
  font-size: .74rem; font-weight: 600; line-height: 1.4;
  background: var(--line-soft); color: var(--slate);
}
.badge--brand  { background: var(--brand-tint);  color: var(--brand); }
.badge--ok     { background: var(--ok-bg);       color: var(--ok); }
.badge--warn   { background: var(--warn-bg);     color: var(--warn); }
.badge--info   { background: var(--info-bg);     color: var(--info); }
.badge--purple { background: var(--purple-bg);   color: var(--purple); }
.badge--muted  { background: var(--line-soft);   color: var(--muted); }
.badge--solid  { background: var(--brand);       color: #fff; }
.badge--dark   { background: rgba(15,23,42,.82); color: #fff; backdrop-filter: blur(4px); }

/* ------------------------------------------------------------ แถบบนสุด */
.topbar {
  background: var(--brand-deep); color: rgba(255,255,255,.9);
  font-size: .82rem; line-height: 1;
}
.topbar__inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; height: 38px; }
.topbar a { color: rgba(255,255,255,.9); display: inline-flex; align-items: center; gap: .4rem; }
.topbar a:hover { color: #fff; }
.topbar__links { display: flex; gap: 1.4rem; align-items: center; }
.topbar__note { display: inline-flex; align-items: center; gap: .45rem; opacity: .92; }

/* ------------------------------------------------------------ เฮดเดอร์ */
.header {
  position: sticky; top: 0; z-index: 90;
  background: rgba(255,255,255,.96);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.header--scrolled { box-shadow: var(--shadow-sm); }
.header__inner { display: flex; align-items: center; gap: 1.5rem; height: var(--header-h); }

.logo { display: flex; align-items: center; gap: .7rem; flex-shrink: 0; }
.logo img { height: 38px; width: auto; }
.logo__text { display: none; }

.nav { display: flex; align-items: center; gap: .3rem; margin-left: auto; }
.nav__link {
  position: relative; padding: .6rem .78rem; border-radius: 8px;
  color: var(--slate); font-size: .92rem; font-weight: 500; white-space: nowrap;
}
.nav__link:hover { color: var(--brand); background: var(--brand-tint); }
.nav__link[aria-current="page"] { color: var(--brand); font-weight: 600; }
.nav__link[aria-current="page"]::after {
  content: ''; position: absolute; left: .78rem; right: .78rem; bottom: .18rem;
  height: 2px; background: var(--brand); border-radius: 2px;
}
.header__cta { display: flex; align-items: center; gap: .6rem; flex-shrink: 0; }
.header__fav { position: relative; padding-inline: .7rem; }

.burger {
  display: none; width: 44px; height: 44px; padding: 0;
  background: transparent; border: 1px solid var(--line); border-radius: 10px;
  cursor: pointer; align-items: center; justify-content: center;
}
.burger span { display: block; width: 20px; height: 2px; background: var(--ink); border-radius: 2px; position: relative; transition: .2s; }
.burger span::before, .burger span::after {
  content: ''; position: absolute; left: 0; width: 20px; height: 2px; background: var(--ink); border-radius: 2px; transition: .2s;
}
.burger span::before { top: -6px; }
.burger span::after  { top: 6px; }
.burger[aria-expanded="true"] span { background: transparent; }
.burger[aria-expanded="true"] span::before { top: 0; transform: rotate(45deg); }
.burger[aria-expanded="true"] span::after  { top: 0; transform: rotate(-45deg); }

/* เมนูมือถือ */
.drawer {
  position: fixed; inset: 0; z-index: 95;
  background: rgba(15,23,42,.45); backdrop-filter: blur(2px);
  opacity: 0; visibility: hidden; transition: opacity .22s ease, visibility .22s;
}
.drawer[data-open="true"] { opacity: 1; visibility: visible; }
.drawer__panel {
  position: absolute; top: 0; right: 0; bottom: 0; width: min(340px, 88vw);
  background: #fff; padding: 1.25rem; overflow-y: auto;
  transform: translateX(100%); transition: transform .26s cubic-bezier(.4,0,.2,1);
  display: flex; flex-direction: column; gap: .2rem;
}
.drawer[data-open="true"] .drawer__panel { transform: none; }
.drawer__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1rem; }
.drawer__close { width: 40px; height: 40px; border: 1px solid var(--line); border-radius: 10px; background: #fff; font-size: 1.3rem; line-height: 1; cursor: pointer; color: var(--slate); }
.drawer__link {
  padding: .85rem .9rem; border-radius: 10px; color: var(--ink-soft);
  font-weight: 500; display: flex; justify-content: space-between; align-items: center;
}
.drawer__link:hover, .drawer__link[aria-current="page"] { background: var(--brand-tint); color: var(--brand); }
.drawer__foot { margin-top: auto; padding-top: 1.2rem; border-top: 1px solid var(--line); display: grid; gap: .6rem; }

/* ------------------------------------------------------------ ฮีโร่ */
.hero { position: relative; background: var(--bg-soft); overflow: hidden; }
.hero::before {
  content: ''; position: absolute; inset: 0;
  background:
    radial-gradient(900px 460px at 88% -8%, rgba(153,27,27,.10), transparent 62%),
    radial-gradient(700px 420px at -6% 108%, rgba(71,85,105,.10), transparent 60%);
  pointer-events: none;
}
.hero__inner {
  position: relative; display: grid; grid-template-columns: 1.02fr .98fr;
  gap: clamp(2rem, 5vw, 4.5rem); align-items: center;
  padding: clamp(3rem, 6vw, 5.5rem) 0 clamp(3.5rem, 6vw, 5rem);
}
.hero h1 { margin-bottom: 1.1rem; }
.hero h1 em { font-style: normal; color: var(--brand); }
.hero__lead { font-size: clamp(1rem, 1.5vw, 1.12rem); color: var(--slate); max-width: 46ch; margin-bottom: 1.9rem; }
.hero__actions { display: flex; flex-wrap: wrap; gap: .8rem; margin-bottom: 2.2rem; }

.hero__trust { display: flex; flex-wrap: wrap; gap: 1.4rem 2rem; }
.hero__trust-item { display: flex; align-items: center; gap: .6rem; font-size: .89rem; color: var(--slate); font-weight: 500; }
.hero__trust-item svg { width: 20px; height: 20px; color: var(--brand); flex-shrink: 0; }

.hero__media { position: relative; }
.hero__slides { position: relative; border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-lg); aspect-ratio: 1/1; background: #fff; }
.hero__slide { position: absolute; inset: 0; opacity: 0; transition: opacity .7s ease; }
.hero__slide[data-active="true"] { opacity: 1; }
.hero__slide img { width: 100%; height: 100%; object-fit: contain; }
.hero__dots { display: flex; gap: .45rem; justify-content: center; margin-top: 1rem; }
.hero__dot { width: 26px; height: 4px; border-radius: 3px; border: 0; padding: 0; background: var(--line); cursor: pointer; transition: background .2s; }
.hero__dot[aria-current="true"] { background: var(--brand); }

.hero__float {
  position: absolute; left: -18px; bottom: 28px; z-index: 2;
  background: #fff; border-radius: var(--radius); box-shadow: var(--shadow-md);
  padding: .95rem 1.15rem; display: flex; align-items: center; gap: .85rem;
  border: 1px solid var(--line);
}
.hero__float strong { display: block; color: var(--ink); font-size: 1.28rem; font-weight: 700; line-height: 1.15; }
.hero__float span   { font-size: .78rem; color: var(--muted); }
.hero__float-icon { width: 40px; height: 40px; border-radius: 10px; background: var(--brand-tint); color: var(--brand); display: grid; place-items: center; flex-shrink: 0; }
.hero__float-icon svg { width: 21px; height: 21px; }

/* ------------------------------------------------------------ แถบค้นหา */
.searchbar {
  position: relative; z-index: 5;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md); padding: 1.35rem;
  margin-top: -46px;
}
.searchbar__tabs { display: flex; gap: .4rem; margin-bottom: 1.1rem; overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; }
.searchbar__tabs::-webkit-scrollbar { display: none; }
.searchbar__tab {
  padding: .55rem 1.05rem; border-radius: 999px; border: 1.5px solid var(--line);
  background: #fff; color: var(--slate); font-family: inherit; font-size: .86rem; font-weight: 500;
  cursor: pointer; white-space: nowrap; transition: .16s;
}
.searchbar__tab:hover { border-color: var(--brand); color: var(--brand); }
.searchbar__tab[aria-selected="true"] { background: var(--brand); border-color: var(--brand); color: #fff; }
.searchbar__fields { display: grid; grid-template-columns: 1.5fr 1fr 1fr auto; gap: .7rem; align-items: end; }

/* ------------------------------------------------------------ ฟอร์ม */
.field { display: flex; flex-direction: column; gap: .38rem; min-width: 0; }
.field > label, .label {
  font-size: .82rem; font-weight: 600; color: var(--ink-soft);
  display: flex; align-items: center; gap: .3rem;
}
.label--req::after { content: '*'; color: var(--brand); }
.field__hint { font-size: .76rem; color: var(--muted); }
.field__error { font-size: .78rem; color: var(--brand-light); font-weight: 500; }

.input, .select, .textarea {
  width: 100%; padding: .72rem .9rem;
  font-family: inherit; font-size: .93rem; color: var(--ink);
  background: #fff; border: 1.5px solid var(--line); border-radius: var(--radius-sm);
  transition: border-color .16s ease, box-shadow .16s ease;
  -webkit-appearance: none; appearance: none;
}
.input::placeholder, .textarea::placeholder { color: var(--muted-2); }
.input:hover, .select:hover, .textarea:hover { border-color: #CBD5E1; }
.input:focus, .select:focus, .textarea:focus {
  outline: none; border-color: var(--brand); box-shadow: 0 0 0 3.5px rgba(153,27,27,.11);
}
.input[aria-invalid="true"], .textarea[aria-invalid="true"] { border-color: var(--brand-light); }
.textarea { min-height: 116px; resize: vertical; line-height: 1.6; }

.select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right .85rem center;
  padding-right: 2.3rem; cursor: pointer;
}

.check { display: flex; align-items: flex-start; gap: .6rem; font-size: .87rem; color: var(--slate); cursor: pointer; line-height: 1.55; }
.check input { width: 17px; height: 17px; margin: .18rem 0 0; accent-color: var(--brand); flex-shrink: 0; cursor: pointer; }

.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; }
.form-grid--3 { grid-template-columns: repeat(3, 1fr); }
.form-grid .full { grid-column: 1 / -1; }

.honeypot { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.alert {
  display: flex; gap: .75rem; padding: .95rem 1.1rem; border-radius: var(--radius-sm);
  font-size: .9rem; border: 1px solid; margin-bottom: 1.2rem; align-items: flex-start;
}
.alert svg { width: 19px; height: 19px; flex-shrink: 0; margin-top: 2px; }
.alert--ok   { background: var(--ok-bg);    border-color: #BBF7D0; color: #14532D; }
.alert--err  { background: var(--brand-tint); border-color: var(--brand-tint-2); color: var(--brand-deep); }
.alert--info { background: var(--info-bg);  border-color: #BFDBFE; color: #1E3A8A; }
.alert--warn { background: var(--warn-bg);  border-color: #FDE68A; color: #78350F; }
.alert strong { display: block; margin-bottom: .15rem; }

/* ------------------------------------------------------------ การ์ด */
.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.5rem; box-shadow: var(--shadow-xs);
}
.card--pad-lg { padding: clamp(1.5rem, 3vw, 2.4rem); }
.card--flush  { padding: 0; overflow: hidden; }

/* การ์ดบริการ */
.service-card {
  position: relative; background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.service-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: transparent; }
.service-card__media { aspect-ratio: 16/10; overflow: hidden; background: var(--line-soft); }
.service-card__media img { width: 100%; height: 100%; object-fit: contain; transition: transform .5s ease; }
.service-card:hover .service-card__media img { transform: scale(1.03); }
.service-card__body { padding: 1.4rem; display: flex; flex-direction: column; gap: .55rem; flex: 1; }
.service-card__body h3 { margin: 0; font-size: 1.12rem; }
.service-card__body p { color: var(--muted); font-size: .9rem; margin: 0; flex: 1; }
.service-card__link { display: inline-flex; align-items: center; gap: .35rem; font-weight: 600; font-size: .88rem; margin-top: .35rem; }
.service-card__link svg { width: 15px; height: 15px; transition: transform .18s; }
.service-card:hover .service-card__link svg { transform: translateX(3px); }

/* ไอคอนกลม */
.icon-box { width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; background: var(--brand-tint); color: var(--brand); flex-shrink: 0; }
.icon-box svg { width: 25px; height: 25px; }
.icon-box--slate { background: var(--line-soft); color: var(--slate); }

/* ------------------------------------------------------------ การ์ดทรัพย์ */
.plist { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 24px; }

.pcard {
  position: relative; display: flex; flex-direction: column;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.pcard:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: transparent; }

.pcard__media { position: relative; aspect-ratio: 4/3; overflow: hidden; background: var(--line-soft); }
.pcard__media img { width: 100%; height: 100%; object-fit: contain; transition: transform .55s ease; }
.pcard:hover .pcard__media img { transform: scale(1.03); }

.pcard__tags { position: absolute; top: .7rem; left: .7rem; display: flex; flex-wrap: wrap; gap: .35rem; max-width: calc(100% - 4.2rem); }
.pcard__code {
  position: absolute; top: .7rem; right: .7rem;
  background: rgba(15,23,42,.78); color: #fff; backdrop-filter: blur(4px);
  padding: .26rem .6rem; border-radius: 6px; font-size: .7rem; font-weight: 600; letter-spacing: .02em;
}
.pcard__fav {
  position: absolute; bottom: .7rem; right: .7rem; z-index: 3;
  width: 38px; height: 38px; border-radius: 50%; border: 0; cursor: pointer;
  background: rgba(255,255,255,.94); color: var(--muted);
  display: grid; place-items: center; box-shadow: var(--shadow-sm); transition: .16s;
}
.pcard__fav svg { width: 18px; height: 18px; }
.pcard__fav:hover { color: var(--brand); transform: scale(1.08); }
.pcard__fav[aria-pressed="true"] { color: var(--brand); }
.pcard__fav[aria-pressed="true"] svg { fill: currentColor; }

.pcard__body { padding: 1.15rem 1.25rem 1.35rem; display: flex; flex-direction: column; gap: .55rem; flex: 1; }
.pcard__loc { display: flex; align-items: center; gap: .3rem; font-size: .8rem; color: var(--muted); }
.pcard__loc svg { width: 14px; height: 14px; flex-shrink: 0; }
.pcard__title { margin: 0; font-size: 1.02rem; font-weight: 600; line-height: 1.45; }
.pcard__title a { color: var(--ink); }
.pcard__title a:hover { color: var(--brand); }
.pcard__title a::after { content: ''; position: absolute; inset: 0; z-index: 1; }

.pcard__price { display: flex; align-items: baseline; gap: .45rem; flex-wrap: wrap; margin-top: auto; padding-top: .3rem; }
.pcard__price strong { font-size: 1.32rem; font-weight: 700; color: var(--brand); line-height: 1.2; }
.pcard__price span { font-size: .78rem; color: var(--muted); }

.pcard__specs {
  display: flex; flex-wrap: wrap; gap: .3rem 1rem;
  padding-top: .8rem; border-top: 1px solid var(--line-soft);
  font-size: .82rem; color: var(--slate);
}
.pcard__spec { display: inline-flex; align-items: center; gap: .35rem; }
.pcard__spec svg { width: 15px; height: 15px; color: var(--muted-2); flex-shrink: 0; }

.pcard__compare { position: relative; z-index: 2; display: flex; align-items: center; gap: .45rem; font-size: .78rem; color: var(--muted); cursor: pointer; padding-top: .2rem; }
.pcard__compare input { accent-color: var(--brand); width: 15px; height: 15px; cursor: pointer; }

/* การ์ดแนวนอน (หน้ารายการแบบ list) */
.pcard--row { flex-direction: row; }
.pcard--row .pcard__media { width: 300px; aspect-ratio: auto; flex-shrink: 0; }
.pcard--row .pcard__body { padding: 1.35rem 1.5rem; }

/* ------------------------------------------------------------ ตัวกรอง */
.filters { display: grid; grid-template-columns: 288px 1fr; gap: 30px; align-items: start; }

.filter-panel {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.35rem; position: sticky; top: calc(var(--header-h) + 18px);
  max-height: calc(100vh - var(--header-h) - 40px); overflow-y: auto;
}
.filter-panel__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1.1rem; padding-bottom: .9rem; border-bottom: 1px solid var(--line); }
.filter-panel__head h3 { margin: 0; font-size: 1rem; }
.filter-group { padding: 1rem 0; border-bottom: 1px solid var(--line-soft); }
.filter-group:last-of-type { border-bottom: 0; }
.filter-group > .label { margin-bottom: .6rem; }
.filter-row { display: grid; grid-template-columns: 1fr 1fr; gap: .55rem; }

.chips { display: flex; flex-wrap: wrap; gap: .45rem; }
.chip {
  display: inline-flex; align-items: center; gap: .35rem;
  padding: .42rem .8rem; border-radius: 999px;
  border: 1.5px solid var(--line); background: #fff;
  font-family: inherit; font-size: .81rem; font-weight: 500; color: var(--slate);
  cursor: pointer; transition: .16s; text-decoration: none;
}
.chip:hover { border-color: var(--brand); color: var(--brand); }
.chip[aria-pressed="true"], .chip--active { background: var(--brand); border-color: var(--brand); color: #fff; }
.chip--clear { border-style: dashed; color: var(--muted); }
.chip--clear:hover { border-color: var(--brand-light); color: var(--brand-light); }
.chip__x { font-size: 1rem; line-height: 1; opacity: .8; }

.toolbar {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  flex-wrap: wrap; margin-bottom: 1.4rem; padding-bottom: 1.1rem; border-bottom: 1px solid var(--line);
}
.toolbar__count { font-size: .92rem; color: var(--muted); }
.toolbar__count strong { color: var(--ink); font-weight: 600; }
.toolbar__right { display: flex; align-items: center; gap: .6rem; }
.filter-toggle { display: none; }

/* ------------------------------------------------------------ แบ่งหน้า */
.pagination { display: flex; justify-content: center; align-items: center; gap: .35rem; margin-top: 3rem; flex-wrap: wrap; }
.pagination a, .pagination span {
  min-width: 42px; height: 42px; padding: 0 .7rem;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  font-size: .9rem; font-weight: 500; color: var(--slate); background: #fff;
}
.pagination a:hover { border-color: var(--brand); color: var(--brand); }
.pagination [aria-current="page"] { background: var(--brand); border-color: var(--brand); color: #fff; font-weight: 600; }
.pagination .is-disabled { opacity: .4; pointer-events: none; }

/* ------------------------------------------------------------ หน้ารายละเอียดทรัพย์ */
.pdetail { display: grid; grid-template-columns: 1fr 370px; gap: 40px; align-items: start; }

.gallery { border-radius: var(--radius); overflow: hidden; background: var(--line-soft); }
.gallery__main { position: relative; aspect-ratio: 16/10; background: var(--line-soft); }
.gallery__main img { width: 100%; height: 100%; object-fit: contain; }
.gallery__nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 44px; height: 44px; border-radius: 50%; border: 0; cursor: pointer;
  background: rgba(255,255,255,.92); color: var(--ink); display: grid; place-items: center;
  box-shadow: var(--shadow); transition: .16s;
}
.gallery__nav:hover { background: #fff; transform: translateY(-50%) scale(1.06); }
.gallery__nav--prev { left: 14px; }
.gallery__nav--next { right: 14px; }
.gallery__nav svg { width: 20px; height: 20px; }
.gallery__counter {
  position: absolute; bottom: 14px; right: 14px;
  background: rgba(15,23,42,.78); color: #fff; padding: .3rem .75rem;
  border-radius: 999px; font-size: .78rem; font-weight: 500; backdrop-filter: blur(4px);
}
.gallery__thumbs { display: flex; gap: .5rem; padding: .6rem; overflow-x: auto; background: #fff; }
.gallery__thumb {
  width: 92px; height: 68px; flex-shrink: 0; border-radius: 8px; overflow: hidden;
  border: 2px solid transparent; cursor: pointer; padding: 0; background: none; transition: .16s;
}
.gallery__thumb img { width: 100%; height: 100%; object-fit: contain; background: #fff; }
.gallery__thumb[aria-current="true"] { border-color: var(--brand); }
.gallery__thumb:hover { border-color: var(--muted-2); }

.pdetail__head { margin: 1.9rem 0 1.5rem; }
.pdetail__head h1 { font-size: clamp(1.5rem, 3vw, 2.1rem); margin-bottom: .55rem; }
.pdetail__meta { display: flex; flex-wrap: wrap; gap: .5rem 1.2rem; color: var(--muted); font-size: .9rem; align-items: center; }
.pdetail__meta span { display: inline-flex; align-items: center; gap: .35rem; }
.pdetail__meta svg { width: 15px; height: 15px; }

.specs { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.spec { background: #fff; padding: 1.1rem 1.2rem; }
.spec__label { font-size: .78rem; color: var(--muted); display: flex; align-items: center; gap: .35rem; margin-bottom: .2rem; }
.spec__label svg { width: 14px; height: 14px; }
.spec__value { font-size: 1.06rem; font-weight: 600; color: var(--ink); line-height: 1.35; }

.dl { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: .1rem 2rem; }
.dl__row { display: flex; justify-content: space-between; gap: 1rem; padding: .72rem 0; border-bottom: 1px dashed var(--line); font-size: .92rem; }
.dl__row dt { color: var(--muted); flex-shrink: 0; }
.dl__row dd { margin: 0; color: var(--ink); font-weight: 500; text-align: right; }

.ticklist { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: .55rem 1.5rem; }
.ticklist li { display: flex; align-items: flex-start; gap: .55rem; font-size: .92rem; color: var(--slate); }
.ticklist li::before {
  content: ''; width: 18px; height: 18px; flex-shrink: 0; margin-top: 3px; border-radius: 50%;
  background: var(--brand-tint) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='11' height='11' viewBox='0 0 24 24' fill='none' stroke='%23991b1b' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center/11px no-repeat;
}

.sticky-side { position: sticky; top: calc(var(--header-h) + 18px); display: grid; gap: 1rem; }

.price-box { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); }
.price-box__top { background: linear-gradient(140deg, var(--brand) 0%, var(--brand-deep) 100%); color: #fff; padding: 1.5rem; }
.price-box__label { font-size: .82rem; opacity: .82; margin-bottom: .1rem; }
.price-box__value { font-size: 2rem; font-weight: 700; line-height: 1.15; }
.price-box__sub { font-size: .82rem; opacity: .82; margin-top: .35rem; }
.price-box__body { padding: 1.25rem; display: grid; gap: .65rem; }
.price-box__row { display: flex; justify-content: space-between; font-size: .88rem; padding: .35rem 0; }
.price-box__row span { color: var(--muted); }
.price-box__row strong { color: var(--ink); font-weight: 600; }

.agent-box { display: flex; gap: .9rem; align-items: center; padding: 1.15rem; background: var(--bg-soft); border: 1px solid var(--line); border-radius: var(--radius); }
.agent-box img { width: 56px; height: 56px; border-radius: 50%; object-fit: contain; background: #fff; border: 1px solid var(--line); flex-shrink: 0; }
.agent-box strong { display: block; color: var(--ink); font-size: .96rem; }
.agent-box span { font-size: .8rem; color: var(--muted); }

/* ------------------------------------------------------------ ตารางเวลานัดชม */
.daypick { display: grid; grid-template-columns: repeat(auto-fill, minmax(94px, 1fr)); gap: .55rem; }
.daypick__btn {
  padding: .7rem .4rem; border: 1.5px solid var(--line); border-radius: var(--radius-sm);
  background: #fff; cursor: pointer; text-align: center; font-family: inherit; transition: .16s;
}
.daypick__btn:hover:not(:disabled) { border-color: var(--brand); }
.daypick__btn[aria-pressed="true"] { background: var(--brand); border-color: var(--brand); color: #fff; }
.daypick__btn:disabled { opacity: .38; cursor: not-allowed; background: var(--line-soft); }
.daypick__dow { display: block; font-size: .72rem; color: var(--muted); }
.daypick__btn[aria-pressed="true"] .daypick__dow { color: rgba(255,255,255,.85); }
.daypick__num { display: block; font-size: 1.16rem; font-weight: 600; color: var(--ink); line-height: 1.3; }
.daypick__btn[aria-pressed="true"] .daypick__num { color: #fff; }
.daypick__mon { display: block; font-size: .7rem; color: var(--muted); }
.daypick__btn[aria-pressed="true"] .daypick__mon { color: rgba(255,255,255,.85); }

.slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(126px, 1fr)); gap: .55rem; }
.slot {
  padding: .68rem .5rem; border: 1.5px solid var(--line); border-radius: var(--radius-sm);
  background: #fff; font-family: inherit; font-size: .88rem; font-weight: 500; color: var(--ink-soft);
  cursor: pointer; transition: .16s; text-align: center;
}
.slot:hover:not(:disabled) { border-color: var(--brand); color: var(--brand); }
.slot[aria-pressed="true"] { background: var(--brand); border-color: var(--brand); color: #fff; }
.slot:disabled { opacity: .4; cursor: not-allowed; text-decoration: line-through; background: var(--line-soft); }

.steps-bar { display: flex; align-items: center; gap: .5rem; margin-bottom: 2rem; flex-wrap: wrap; }
.steps-bar__item { display: flex; align-items: center; gap: .55rem; font-size: .87rem; color: var(--muted); }
.steps-bar__num { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--line-soft); color: var(--muted); font-size: .82rem; font-weight: 600; }
.steps-bar__item[data-state="active"] { color: var(--brand); font-weight: 600; }
.steps-bar__item[data-state="active"] .steps-bar__num { background: var(--brand); color: #fff; }
.steps-bar__item[data-state="done"] .steps-bar__num { background: var(--ok-bg); color: var(--ok); }
.steps-bar__sep { flex: 1; min-width: 18px; height: 1px; background: var(--line); }

/* ------------------------------------------------------------ ขั้นตอน / ตัวเลข */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1px; background: var(--line); border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); }
.stat { background: #fff; padding: 1.7rem 1.4rem; text-align: center; }
.stat__value { font-size: clamp(1.8rem, 3.4vw, 2.5rem); font-weight: 700; color: var(--brand); line-height: 1.1; }
.stat__label { font-size: .88rem; color: var(--muted); margin-top: .3rem; }

.steps { counter-reset: step; display: grid; gap: 1.5rem; }
.step { position: relative; display: flex; gap: 1.2rem; }
.step__num {
  counter-increment: step; flex-shrink: 0;
  width: 46px; height: 46px; border-radius: 14px;
  background: var(--brand); color: #fff;
  display: grid; place-items: center; font-size: 1.06rem; font-weight: 700;
}
.step__num::before { content: counter(step, decimal); }
.step h4 { margin: .35rem 0 .3rem; }
.step p { color: var(--muted); font-size: .92rem; margin: 0; }
.steps--line .step:not(:last-child)::after {
  content: ''; position: absolute; left: 23px; top: 52px; bottom: -1.5rem;
  width: 2px; background: var(--line);
}

/* ------------------------------------------------------------ รีวิว */
.review {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.6rem; display: flex; flex-direction: column; gap: .9rem; height: 100%;
}
.review__stars { display: flex; gap: .12rem; color: #F59E0B; }
.review__stars svg { width: 17px; height: 17px; fill: currentColor; }
.review__text { color: var(--slate); font-size: .93rem; line-height: 1.75; flex: 1; margin: 0; }
.review__who { display: flex; align-items: center; gap: .75rem; padding-top: .9rem; border-top: 1px solid var(--line-soft); }
.review__avatar { width: 42px; height: 42px; border-radius: 50%; background: var(--brand-tint); color: var(--brand); display: grid; place-items: center; font-weight: 600; font-size: 1rem; flex-shrink: 0; }
.review__who strong { display: block; color: var(--ink); font-size: .92rem; }
.review__who span { font-size: .78rem; color: var(--muted); }

/* ------------------------------------------------------------ ผลงานปิดดีล */
.closing {
  position: relative; border-radius: var(--radius); overflow: hidden;
  background: var(--ink); aspect-ratio: 4/3;
}
.closing img { width: 100%; height: 100%; object-fit: contain; transition: transform .5s ease; }
.closing:hover img { transform: scale(1.03); }
.closing__body {
  position: absolute; inset: auto 0 0 0; padding: 1.3rem;
  background: linear-gradient(to top, rgba(15,23,42,.94) 20%, transparent);
  color: #fff;
}
.closing__body h4 { color: #fff; margin: 0 0 .3rem; font-size: 1rem; }
.closing__amount { font-size: 1.24rem; font-weight: 700; color: #fff; }
.closing__meta { font-size: .78rem; opacity: .8; }

/* ------------------------------------------------------------ FAQ */
.faq { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: #fff; }
.faq__item { border-bottom: 1px solid var(--line); }
.faq__item:last-child { border-bottom: 0; }
.faq__q {
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 1.15rem 1.35rem; background: #fff; border: 0; cursor: pointer;
  font-family: inherit; font-size: .98rem; font-weight: 500; color: var(--ink);
  text-align: left; line-height: 1.5; transition: background .16s;
}
.faq__q:hover { background: var(--bg-soft); color: var(--brand); }
.faq__icon { flex-shrink: 0; width: 22px; height: 22px; color: var(--brand); transition: transform .24s ease; }
.faq__q[aria-expanded="true"] .faq__icon { transform: rotate(45deg); }
.faq__a { padding: 0 1.35rem; max-height: 0; overflow: hidden; transition: max-height .3s ease, padding .3s ease; }
.faq__a[data-open="true"] { padding: 0 1.35rem 1.35rem; max-height: 900px; }
.faq__a p { color: var(--muted); font-size: .92rem; line-height: 1.8; }

/* ------------------------------------------------------------ CTA */
.cta-band {
  position: relative; overflow: hidden;
  background: linear-gradient(135deg, var(--brand-deep) 0%, var(--brand) 55%, var(--brand-light) 100%);
  color: #fff; border-radius: var(--radius-lg);
  padding: clamp(2.2rem, 5vw, 3.4rem);
}
.cta-band::after {
  content: ''; position: absolute; right: -70px; top: -70px; width: 300px; height: 300px;
  border-radius: 50%; background: rgba(255,255,255,.07);
}
.cta-band__inner { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 2rem; flex-wrap: wrap; }
.cta-band h2 { color: #fff; margin-bottom: .5rem; }
.cta-band p { color: rgba(255,255,255,.88); margin: 0; max-width: 52ch; }
.cta-band .btn--ghost { background: #fff; border-color: #fff; color: var(--brand); }
.cta-band .btn--ghost:hover { background: #fff; color: var(--brand-deep); }
.cta-band .btn--outline { color: #fff; border-color: rgba(255,255,255,.55); }
.cta-band .btn--outline:hover { background: rgba(255,255,255,.14); color: #fff; border-color: #fff; }

/* ------------------------------------------------------------ IG */
.ig-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
.ig-item { position: relative; aspect-ratio: 1; border-radius: var(--radius-sm); overflow: hidden; background: var(--line-soft); display: block; }
.ig-item img { width: 100%; height: 100%; object-fit: contain; transition: transform .4s ease; }
.ig-item:hover img { transform: scale(1.03); }
.ig-item__overlay {
  position: absolute; inset: 0; display: grid; place-items: center; color: #fff;
  background: linear-gradient(160deg, rgba(131,58,180,.75), rgba(225,48,108,.75), rgba(253,161,63,.6));
  opacity: 0; transition: opacity .22s ease;
}
.ig-item:hover .ig-item__overlay { opacity: 1; }
.ig-item__overlay svg { width: 26px; height: 26px; }

/* ------------------------------------------------------------ แผนที่ */
.map-embed { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); background: var(--line-soft); }
.map-embed iframe { display: block; width: 100%; height: 100%; border: 0; }
.map-embed--tall iframe { height: 440px; }
.map-embed--short iframe { height: 300px; }

/* ------------------------------------------------------------ ฟุตเตอร์ */
.footer { background: var(--bg-slate); color: #94A3B8; padding-top: clamp(3rem, 6vw, 4.5rem); font-size: .9rem; }
.footer a { color: #94A3B8; }
.footer a:hover { color: #fff; }
.footer__grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.3fr; gap: 2.5rem; padding-bottom: 3rem; }
.footer__logo img { height: 40px; margin-bottom: 1.1rem; }
.footer h4 { color: #fff; font-size: .95rem; margin-bottom: 1.1rem; font-weight: 600; }
.footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .6rem; }
.footer__contact li { display: flex; gap: .65rem; align-items: flex-start; }
.footer__contact svg { width: 17px; height: 17px; margin-top: 3px; flex-shrink: 0; color: var(--brand-light); }
.footer__social { display: flex; gap: .55rem; margin-top: 1.2rem; }
.footer__social a {
  width: 40px; height: 40px; border-radius: 10px; background: rgba(255,255,255,.07);
  display: grid; place-items: center; transition: .18s;
}
.footer__social a:hover { background: var(--brand); color: #fff; transform: translateY(-2px); }
.footer__social svg { width: 19px; height: 19px; }
.footer__bottom {
  border-top: 1px solid rgba(255,255,255,.09); padding: 1.4rem 0;
  display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
  font-size: .82rem; color: #64748B;
}
.footer__bottom-links { display: flex; gap: 1.4rem; flex-wrap: wrap; }

/* ------------------------------------------------------------ ปุ่มลอยมือถือ */
.floatbar { display: none; }
.fab-stack { position: fixed; right: 16px; bottom: 20px; z-index: 80; display: grid; gap: .6rem; }
.fab {
  width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center;
  color: #fff; box-shadow: var(--shadow-md); transition: transform .18s ease;
}
.fab:hover { transform: scale(1.08); color: #fff; }
.fab svg { width: 25px; height: 25px; }
.fab--line { background: #06C755; }
.fab--tel  { background: var(--brand); }
.fab--top  { background: var(--ink); width: 44px; height: 44px; opacity: 0; pointer-events: none; transition: opacity .2s, transform .18s; }
.fab--top[data-show="true"] { opacity: 1; pointer-events: auto; }
.fab--top svg { width: 19px; height: 19px; }

/* ------------------------------------------------------------ แถบเปรียบเทียบ */
.compare-bar {
  position: fixed; left: 50%; bottom: 20px; transform: translate(-50%, 130%);
  z-index: 85; background: var(--ink); color: #fff;
  border-radius: 999px; padding: .7rem .8rem .7rem 1.4rem;
  display: flex; align-items: center; gap: 1rem;
  box-shadow: var(--shadow-lg); transition: transform .28s cubic-bezier(.4,0,.2,1);
  max-width: calc(100vw - 32px);
}
.compare-bar[data-show="true"] { transform: translate(-50%, 0); }
.compare-bar__count { font-size: .88rem; white-space: nowrap; }
.compare-bar__count strong { color: #fff; }
.compare-bar__clear { background: none; border: 0; color: rgba(255,255,255,.6); cursor: pointer; font-family: inherit; font-size: .82rem; text-decoration: underline; }
.compare-bar__clear:hover { color: #fff; }

/* ตารางเปรียบเทียบ */
.ctable { width: 100%; border-collapse: collapse; font-size: .9rem; background: #fff; }
.ctable th, .ctable td { padding: .9rem 1rem; border: 1px solid var(--line); text-align: left; vertical-align: top; }
.ctable thead th { background: var(--bg-soft); font-weight: 600; color: var(--ink); vertical-align: bottom; }
.ctable tbody th { background: var(--bg-soft); font-weight: 500; color: var(--muted); width: 190px; white-space: nowrap; }
.ctable td { color: var(--ink); }
.ctable__img { width: 100%; aspect-ratio: 4/3; object-fit: contain; background: var(--photo-bg); border: 1px solid var(--line); border-radius: 8px; margin-bottom: .6rem; }
.ctable__best { color: var(--brand); font-weight: 600; }

/* ------------------------------------------------------------ ว่างเปล่า */
.empty { text-align: center; padding: 4rem 1.5rem; }
.empty__icon { width: 76px; height: 76px; margin: 0 auto 1.3rem; border-radius: 50%; background: var(--bg-soft); color: var(--muted-2); display: grid; place-items: center; }
.empty__icon svg { width: 34px; height: 34px; }
.empty h3 { margin-bottom: .4rem; }
.empty p { color: var(--muted); margin-bottom: 1.5rem; }

/* ------------------------------------------------------------ Breadcrumb */
.crumbs { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; font-size: .82rem; color: var(--muted); padding: 1.1rem 0; }
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--brand); }
.crumbs span[aria-current] { color: var(--ink); font-weight: 500; }
.crumbs__sep { opacity: .5; }

/* ------------------------------------------------------------ หัวหน้าเพจย่อย */
.pagehead { position: relative; background: var(--bg-slate); color: #fff; overflow: hidden; }
.pagehead::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(760px 340px at 82% -20%, rgba(153,27,27,.5), transparent 62%);
}
.pagehead__inner { position: relative; padding: clamp(2.8rem, 6vw, 4.4rem) 0; }
.pagehead h1 { color: #fff; margin-bottom: .55rem; }
.pagehead p { color: rgba(255,255,255,.72); max-width: 62ch; margin: 0; }
.pagehead .crumbs, .pagehead .crumbs a { color: rgba(255,255,255,.6); }
.pagehead .crumbs a:hover { color: #fff; }
.pagehead .crumbs span[aria-current] { color: #fff; }

/* ------------------------------------------------------------ เครื่องคำนวณ */
.calc { display: grid; grid-template-columns: 1fr 300px; gap: 1.5rem; align-items: start; }
.calc__out { background: linear-gradient(150deg, var(--ink) 0%, #0B1220 100%); color: #fff; border-radius: var(--radius); padding: 1.6rem; }
.calc__out-label { font-size: .82rem; color: rgba(255,255,255,.65); }
.calc__out-value { font-size: 2rem; font-weight: 700; line-height: 1.2; margin: .15rem 0 .1rem; }
.calc__out-unit { font-size: .8rem; color: rgba(255,255,255,.65); }
.calc__breakdown { margin-top: 1.3rem; padding-top: 1.2rem; border-top: 1px solid rgba(255,255,255,.13); display: grid; gap: .6rem; font-size: .85rem; }
.calc__breakdown div { display: flex; justify-content: space-between; gap: 1rem; }
.calc__breakdown span { color: rgba(255,255,255,.6); }
.calc__breakdown strong { font-weight: 600; }
.range { width: 100%; accent-color: var(--brand); }

/* ------------------------------------------------------------ ตอบสนองจอเล็ก */
@media (max-width: 1100px) {
  .filters { grid-template-columns: 1fr; }
  .filter-panel { position: static; max-height: none; display: none; }
  .filter-panel[data-open="true"] { display: block; margin-bottom: 1.5rem; }
  .filter-toggle { display: inline-flex; }
  .pdetail { grid-template-columns: 1fr; }
  .sticky-side { position: static; }
  .footer__grid { grid-template-columns: 1fr 1fr; gap: 2rem; }
}

@media (max-width: 980px) {
  :root { --header-h: 66px; }
  .nav, .header__cta .btn--outline { display: none; }
  .burger { display: inline-flex; }
  .header__inner { gap: .75rem; }
  .hero__inner { grid-template-columns: 1fr; padding-top: 2.5rem; }
  .hero__media { order: -1; max-width: 460px; margin-inline: auto; width: 100%; }
  .hero__float { left: 8px; bottom: 14px; }
  .searchbar__fields { grid-template-columns: 1fr 1fr; }
  .searchbar__fields .field:first-child { grid-column: 1 / -1; }
  .searchbar__fields .btn { grid-column: 1 / -1; width: 100%; }
  .grid--4 { grid-template-columns: repeat(2, 1fr); }
  .grid--3 { grid-template-columns: repeat(2, 1fr); }
  .calc { grid-template-columns: 1fr; }
  .pcard--row { flex-direction: column; }
  .pcard--row .pcard__media { width: 100%; aspect-ratio: 4/3; }
  .topbar__links { display: none; }
  .topbar__inner { justify-content: center; }
}

@media (max-width: 720px) {
  body { font-size: 15.5px; }
  /* จอเล็ก: เหลือแค่หัวใจกับปุ่มเมนู — ปุ่มประเมินอยู่ในแถบล่างและในเมนูแล้ว */
  .header__quote span { display: none; }
  .header__quote { padding-inline: .75rem; }
  .logo img { height: 32px; }
  .section { padding: 3rem 0; }
  .grid--2, .grid--3, .grid--4 { grid-template-columns: 1fr; }
  .form-grid, .form-grid--3 { grid-template-columns: 1fr; }
  .plist { grid-template-columns: 1fr; }
  .searchbar { margin-top: -28px; padding: 1.1rem; }
  .searchbar__fields { grid-template-columns: 1fr; }
  .footer__grid { grid-template-columns: 1fr; }
  .cta-band__inner { flex-direction: column; align-items: flex-start; }
  .dl__row { flex-direction: column; gap: .1rem; }
  .dl__row dd { text-align: left; }
  .ctable tbody th { width: 130px; font-size: .82rem; }
  .gallery__thumb { width: 74px; height: 56px; }

  /* แถบติดต่อด้านล่างจอ */
  .floatbar {
    display: grid; grid-template-columns: 1fr 1fr;
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 88;
    border-top: 1px solid var(--line); background: #fff; box-shadow: 0 -4px 20px rgba(15,23,42,.1);
  }
  .floatbar a {
    display: flex; align-items: center; justify-content: center; gap: .5rem;
    padding: .95rem .5rem; font-size: .92rem; font-weight: 600;
  }
  .floatbar svg { width: 19px; height: 19px; }
  .floatbar__tel  { color: var(--brand); border-right: 1px solid var(--line); }
  .floatbar__line { color: #06C755; }
  .fab-stack { bottom: 76px; right: 12px; }
  .fab--line, .fab--tel { display: none; }
  .compare-bar { bottom: 76px; }
  body { padding-bottom: 58px; }
}

@media (max-width: 480px) {
  /* แถบเปรียบเทียบ: ยืดเต็มความกว้างจอเล็ก ปุ่มจะได้ไม่โดนตัด */
  .compare-bar {
    left: 12px; right: 12px; max-width: none;
    transform: translateY(140%);
    padding: .6rem .65rem .6rem 1rem; gap: .65rem;
  }
  .compare-bar[data-show="true"] { transform: none; }
  .compare-bar__count { font-size: .8rem; white-space: normal; }
  .compare-bar .btn { flex-shrink: 1; min-width: 0; padding-inline: .85rem; }
}

@media (max-width: 400px) {
  .header__quote { display: none; }
  .topbar__note { font-size: .76rem; }
}

@media print {
  .header, .topbar, .footer, .fab-stack, .floatbar, .compare-bar, .drawer { display: none !important; }
  body { padding: 0; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

/* ------------------------------------------------------------ แอนิเมชันเข้าหน้า */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .55s ease, transform .55s ease; }
.reveal[data-shown="true"] { opacity: 1; transform: none; }

/* =====================================================================
   ปรับปรุงรอบที่ 2 — จังหวะสีของแต่ละส่วน สัดส่วนที่สมดุล และรูปที่ไม่ถูกครอป
   ===================================================================== */

:root {
  /* พื้นหลังกรอบรูป — ทำให้ภาพที่สัดส่วนไม่พอดีดูตั้งใจ ไม่ใช่ผิดพลาด */
  --photo-bg: linear-gradient(160deg, #F8FAFC 0%, #EEF2F7 100%);
  --photo-line: #E8EDF3;

  /* ระยะห่างมาตรฐาน ใช้ทั้งเว็บให้เป็นจังหวะเดียวกัน */
  --sp-1: .25rem; --sp-2: .5rem;  --sp-3: .75rem; --sp-4: 1rem;
  --sp-5: 1.5rem; --sp-6: 2rem;   --sp-7: 3rem;   --sp-8: 4rem;
}

/* ------------------------------------------------ กรอบรูปแบบไม่ครอป
   รูปทุกใบแสดงเต็มภาพเสมอ ไม่ตัดขอบ — ส่วนที่เหลือเป็นพื้นอ่อน
   และใส่กรอบมนให้ตัวรูปเอง จะได้ดูเหมือนรูปที่วางบนการ์ด ไม่ใช่รูปขนาดผิด */
.pcard__media,
.service-card__media,
.gallery__main,
.gallery__thumbs,
.ig-item,
.closing__media,
.figure {
  background: var(--photo-bg);
}
.pcard__media       { padding: 10px; }
.service-card__media{ padding: 10px; }
.closing__media     { padding: 10px; }
.ig-item            { padding: 6px; }
.gallery__main      { padding: 14px; }

.pcard__media img,
.service-card__media img,
.closing__media img,
.ig-item img,
.gallery__main img {
  border-radius: 8px;
  box-shadow: 0 1px 6px rgba(15, 23, 42, .10);
}

/* สัดส่วนกรอบที่ทำให้ขอบว่างน้อยที่สุดสำหรับรูปทั่วไป */
.service-card__media { aspect-ratio: 5/4; }
.pcard__media        { aspect-ratio: 4/3; }

/* รูปประกอบทั่วไป (ฮีโร่ย่อย, รูปในบทความ) */
.figure {
  border-radius: var(--radius-lg);
  border: 1px solid var(--photo-line);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  padding: 12px;
}
.figure img {
  width: 100%; height: auto; display: block;
  border-radius: calc(var(--radius-lg) - 8px);
  object-fit: contain;
}
.figure--tall img { aspect-ratio: 4/5; object-fit: contain; }
.figure--square img { aspect-ratio: 1; object-fit: contain; }

/* ------------------------------------------------ จังหวะสีของแต่ละส่วน */
.section { position: relative; }

/* ขาว → เทาอ่อน → ขาว → แดงจาง … สลับให้ตาได้พัก */
.section--soft { background: var(--bg-soft); }
.section--tint {
  background: linear-gradient(180deg, var(--brand-tint) 0%, #fff 100%);
}
.section--band {
  background: var(--bg-soft);
  border-block: 1px solid var(--line);
}

/* เส้นคั่นบาง ๆ เหนือหัวข้อ ให้แต่ละส่วนแยกกันชัดโดยไม่ต้องใช้สีเยอะ */
.section--rule { border-top: 1px solid var(--line); }

/* แถบไล่สีบางเหนือส่วนที่เน้น */
.section--accent::before {
  content: ''; position: absolute; inset: 0 0 auto 0; height: 3px;
  background: linear-gradient(90deg, var(--brand) 0%, var(--brand-light) 45%, transparent 100%);
}

/* ------------------------------------------------ หัวข้อบล็อกให้สมดุลขึ้น */
.section-head { margin-bottom: clamp(2rem, 4vw, 3rem); }
.section-head h2 { margin-bottom: .6rem; }
.section-head--center p { margin-inline: auto; }
.section-head p { max-width: 60ch; }

/* หัวข้อ + ปุ่มขวา จัดให้ลงตัวทุกจอ */
.head-row {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 1.5rem; flex-wrap: wrap; margin-bottom: clamp(2rem, 4vw, 3rem);
}
.head-row .section-head { margin-bottom: 0; flex: 1 1 420px; }

/* ------------------------------------------------ การ์ดผลงานปิดดีล (ทรงใหม่ ไม่ทับข้อความบนรูป) */
.closing {
  display: flex; flex-direction: column; height: 100%;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; aspect-ratio: auto;
  transition: transform .2s ease, box-shadow .2s ease;
}
.closing:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.closing__media { aspect-ratio: 4/3; overflow: hidden; }
.closing__media img { width: 100%; height: 100%; object-fit: contain; }
.closing__body {
  position: static; padding: 1.1rem 1.2rem 1.3rem; background: #fff; color: inherit;
  display: flex; flex-direction: column; gap: .3rem; flex: 1;
}
.closing__body h4 { color: var(--ink); font-size: .98rem; margin: 0; line-height: 1.45; }
.closing__amount { font-size: 1.2rem; font-weight: 700; color: var(--brand); }
.closing__meta { font-size: .78rem; color: var(--muted); opacity: 1; margin-top: auto; padding-top: .3rem; }

/* ------------------------------------------------ ไอจี */
.ig-item { border: 1px solid var(--photo-line); }
.ig-item__overlay { border-radius: var(--radius-sm); }

/* ------------------------------------------------ ตัวเลขสถิติ ให้ดูเป็นแถบเดียวกัน */
.stats { box-shadow: var(--shadow-xs); }
.stats:has(.stat:only-child) { max-width: 320px; margin-inline: auto; }
.stat { display: flex; flex-direction: column; justify-content: center; gap: .2rem; }

/* ------------------------------------------------ วิดีโอ */
.video-frame {
  position: relative; border-radius: var(--radius-lg); overflow: hidden;
  border: 1px solid var(--line); box-shadow: var(--shadow-md);
  background: #000; aspect-ratio: 16/9;
}
.video-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* ------------------------------------------------ รายการติ๊กถูกแบบการ์ด */
.tickcards { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: .8rem; }
.tickcard {
  display: flex; gap: .7rem; align-items: flex-start;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: .9rem 1rem; font-size: .92rem; color: var(--slate);
}
.tickcard__dot {
  width: 22px; height: 22px; border-radius: 50%; flex-shrink: 0; margin-top: 1px;
  background: var(--brand-tint); color: var(--brand); display: grid; place-items: center;
}
.tickcard__dot svg { width: 13px; height: 13px; }
.tickcard strong { display: block; color: var(--ink); font-weight: 600; margin-bottom: .1rem; }

/* ------------------------------------------------ สมดุลบนจอทุกขนาด */
@media (min-width: 1500px) { :root { --container: 1320px; } }

@media (max-width: 980px) {
  .head-row { align-items: flex-start; }
  .head-row .btn { width: auto; }
}

@media (max-width: 720px) {
  .section-head p { font-size: .95rem; }
  .stats { grid-template-columns: 1fr 1fr; }
  .stat { padding: 1.2rem .8rem; }
  .tickcards { grid-template-columns: 1fr; }
  .figure { padding: 8px; }
}

@media (max-width: 420px) {
  .stats { grid-template-columns: 1fr; }
}
