/* แนวคิด: ส้ม–แดงเข้ม (โดดเด่น น่าเชื่อถือ) — หัวเว็บ ส่วนท้าย และหัวหน้าเป็นแถบแดงเข้ม ปุ่มหลักสีส้ม เนื้อหาบนพื้นขาวและเทาคอนกรีต */
:root {
	--red: #8B101B;
	--red-deep: #6A0C14;
	--red-hi: #A3141F;
	--red-tint: #F8E9EA;
	--orange: #E8590C;
	--orange-hover: #C2480A;
	--orange-deep: #B8460A;
	--orange-tint: #FDEFE6;
	--amber: #FFB066;
	--white: #FFFFFF;
	--concrete: #EEF0F1;
	--sunk: #E4E7EA;
	--line: #DCDFE2;
	--ink: #1F2328;
	--muted: #5B636B;
	--on-red: #FFFFFF;
	--on-red-muted: rgba(255, 255, 255, 0.78);
	--on-red-line: rgba(255, 255, 255, 0.18);
	--ok: #1F8A4C;
	--off: #B3261E;
	--shadow: 0 8px 24px rgba(31, 35, 40, 0.10);
	--shadow-sm: 0 2px 8px rgba(31, 35, 40, 0.06);
	--font-display: "IBM Plex Sans Thai", "Noto Sans Thai", system-ui, sans-serif;
	--font-body: "IBM Plex Sans Thai Looped", "Noto Sans Thai Looped", "IBM Plex Sans Thai", system-ui, sans-serif;
	--font-num: "IBM Plex Mono", ui-monospace, Menlo, monospace;
	--radius: 10px;
	--gutter: max(16px, env(safe-area-inset-left, 0px));
	--gutter-r: max(16px, env(safe-area-inset-right, 0px));
	--red-night: #3B050B;
	--red-hi2: color-mix(in srgb, var(--red-hi) 80%, var(--orange));
	--red-text: var(--red);
	--sel: var(--red);
	--orange-hi: #F8873A;
	--orange-glow: #FFA060;
	--orange-tint2: #FDEADD;
	--orange-line: #F6CDB3;
	--surface: #FFFFFF;
	--surface-2: #FBFBFC;
	--surface-3: #F4F5F6;
	--field-line: #D5D9DD;
	--shade: #1F2328;
	--warn-bg: #FFF6DA;
	--warn-line: #F1D98A;
	--warn-ink: #6B5300;
	color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 90px; }
body { margin: 0; color: var(--ink); background: var(--concrete); font-family: var(--font-body); font-size: 16.5px; line-height: 1.75; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--red-text); text-underline-offset: 3px; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--orange); outline-offset: 2px; }
[hidden] { display: none !important; }
.sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -9999px; top: 8px; z-index: 100; background: var(--surface); padding: 8px 14px; border-radius: 6px; }
.skip:focus { left: 8px; }
.wrap { max-width: 1200px; margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter-r); }
.num { font-family: var(--font-num); font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
.muted { color: var(--muted); }
.ico { flex: none; }

h1, h2, h3, .h3 { font-family: var(--font-display); line-height: 1.3; margin: 0; text-wrap: balance; color: inherit; }
h1 { font-size: clamp(2rem, 5vw, 3.4rem); font-weight: 700; }
h2 { font-size: clamp(1.45rem, 3vw, 1.95rem); font-weight: 700; }
h3, .h3 { font-size: 1.1rem; font-weight: 600; }
.lede { font-size: 1.08rem; color: var(--muted); max-width: 40em; margin: 0; }
.h-bar { position: relative; padding-bottom: 12px; }
.h-bar::after { content: ""; position: absolute; left: 0; bottom: 0; width: 56px; height: 4px; border-radius: 2px; background: var(--orange); }

/* ---------- หัวเว็บ ---------- */
.site-header { position: sticky; top: 0; z-index: 40; background: linear-gradient(90deg, var(--red-deep), var(--red) 70%); color: var(--on-red); box-shadow: 0 2px 10px rgba(0, 0, 0, 0.18); }
.head-row { display: flex; align-items: center; gap: 18px; padding-block: 10px; position: relative; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: inherit; margin-right: auto; min-width: 0; }
.brand-logo { max-height: 52px; width: auto; }
.brand-mark { flex: none; }
.brand-text { display: grid; line-height: 1.15; }
.brand-name { font-family: var(--font-display); font-weight: 700; font-size: 22px; letter-spacing: 0.03em; }
.brand-sub { font-size: 13px; opacity: 0.85; }
.nav-list { list-style: none; margin: 0; padding: 0; display: flex; gap: 2px 20px; flex-wrap: wrap; }
.nav-list a { color: var(--on-red-muted); text-decoration: none; font-family: var(--font-display); font-weight: 500; font-size: 15.5px; padding: 6px 0; display: block; }
.nav-list a:hover, .nav-list .current-menu-item > a { color: var(--on-red); }
.nav-list .current-menu-item > a { box-shadow: inset 0 -3px 0 var(--orange); }
.icon-link { color: var(--on-red); display: grid; place-items: center; width: 40px; height: 40px; border-radius: 8px; }
.icon-link:hover { background: rgba(255, 255, 255, 0.12); }
.quote-btn { display: inline-flex; align-items: center; gap: 8px; padding: 9px 16px; border-radius: 8px; background: var(--orange); color: var(--white); text-decoration: none; font-family: var(--font-display); font-weight: 600; font-size: 15px; white-space: nowrap; }
.quote-btn:hover { background: var(--orange-hover); }
.quote-ico { display: none; }
.count { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: #FFFFFF; color: var(--red); font-size: 12px; font-weight: 600; font-family: var(--font-num); }
.menu-btn { display: none; place-items: center; width: 42px; height: 42px; border: 1px solid var(--on-red-line); background: transparent; color: var(--on-red); border-radius: 8px; cursor: pointer; }
.bars, .bars::before, .bars::after { display: block; width: 18px; height: 2px; background: currentColor; position: relative; content: ""; border-radius: 1px; }
.bars::before { position: absolute; top: -6px; }
.bars::after { position: absolute; top: 6px; }
@media (max-width: 1100px) {
	.menu-btn { display: grid; }
	.site-nav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: var(--red-deep); box-shadow: var(--shadow); padding: 4px var(--gutter-r) 16px var(--gutter); }
	.site-nav.open { display: block; }
	.nav-list { flex-direction: column; }
	.nav-list a { padding: 13px 0; border-bottom: 1px solid var(--on-red-line); font-size: 16.5px; }
	.nav-list .current-menu-item > a { box-shadow: none; color: var(--amber); }
}
@media (max-width: 600px) {
	.head-row { gap: 8px; }
	.quote-label { display: none; }
	.quote-ico { display: block; }
	.quote-btn { padding: 9px 11px; }
	.brand-name { font-size: 19px; }
	.brand-sub { font-size: 12px; }
	.brand-mark { width: 38px; height: 38px; }
	.icon-link { display: none; }
}

/* ---------- ปุ่ม ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 11px 22px; border-radius: 8px; border: 2px solid var(--orange); background: var(--orange); color: var(--white); font-family: var(--font-display); font-weight: 600; font-size: 16px; line-height: 1.35; text-decoration: none; cursor: pointer; text-align: center; }
.btn:hover { background: var(--orange-hover); border-color: var(--orange-hover); }
.btn.outline, .btn.ghost { background: var(--surface); color: var(--red-text); border-color: var(--red-text); }
.btn.outline:hover, .btn.ghost:hover { background: var(--red-tint); border-color: var(--red-text); }
.btn.outline-light, .btn.ghost-light { background: transparent; color: var(--white); border-color: rgba(255, 255, 255, 0.85); }
.btn.outline-light:hover, .btn.ghost-light:hover { background: #FFFFFF; color: var(--red); border-color: #FFFFFF; }
.btn.small { padding: 7px 14px; font-size: 14.5px; border-width: 1.5px; }
.btn.block { display: flex; width: 100%; }
.btn.fit { width: fit-content; }
.btn[disabled] { opacity: 0.6; cursor: progress; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.copy { font-size: 13px; color: var(--red-text); background: var(--surface); border: 1px solid var(--line); border-radius: 6px; padding: 5px 10px; cursor: pointer; white-space: nowrap; }
.copy:hover { border-color: var(--red-text); }

/* ---------- สถานะเปิด-ปิด ---------- */
.status { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); font-size: 15px; width: fit-content; max-width: 100%; }
.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--muted); flex: none; }
.status.is-open .dot { background: var(--ok); box-shadow: 0 0 0 4px color-mix(in srgb, var(--ok) 25%, transparent); }
.status.is-closed .dot { background: var(--off); }

/* ---------- ภาพหลักหน้าแรก ---------- */
.hero { position: relative; color: var(--on-red); background: radial-gradient(120% 140% at 85% 30%, var(--red-hi) 0%, var(--red) 45%, var(--red-deep) 100%); overflow: hidden; }
.hero.has-photo { background-image: linear-gradient(90deg, color-mix(in srgb, var(--red-deep) 96%, transparent) 0%, color-mix(in srgb, var(--red) 86%, transparent) 42%, color-mix(in srgb, var(--red) 35%, transparent) 100%), var(--hero-img); background-size: cover; background-position: center right; }
.hero-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 40px; align-items: center; padding-block: 64px 72px; }
.hero.has-photo .hero-grid { grid-template-columns: minmax(0, 640px); min-height: 480px; }
.hero-copy { display: grid; gap: 18px; min-width: 0; }
.eyebrow { margin: 0; font-family: var(--font-display); font-weight: 600; color: var(--amber); font-size: 1.05rem; letter-spacing: 0.02em; }
.hero h1 { font-size: clamp(2.2rem, 5.4vw, 3.8rem); text-shadow: 0 2px 12px rgba(0, 0, 0, 0.25); }
.hero .lede { color: var(--on-red-muted); font-size: 1.15rem; }
.hero .actions { margin-top: 6px; }
.hero .status { background: rgba(0, 0, 0, 0.18); border-color: var(--on-red-line); color: var(--on-red); }
.hero-art { min-width: 0; }
.blueprint { width: 100%; height: auto; display: block; }
@media (max-width: 900px) {
	.hero-grid { grid-template-columns: 1fr; padding-block: 44px 48px; gap: 24px; }
	.hero.has-photo { background-image: linear-gradient(180deg, color-mix(in srgb, var(--red-deep) 92%, transparent), color-mix(in srgb, var(--red) 82%, transparent)), var(--hero-img); }
	.hero.has-photo .hero-grid { min-height: 0; }
	.hero-art { max-width: 460px; opacity: 0.9; }
}

/* แถบตัวเลข */
.stats-band { background: var(--red-deep); color: var(--on-red); border-top: 1px solid var(--on-red-line); }
.stats { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); }
.stats li { display: flex; align-items: center; gap: 14px; padding: 22px 20px; border-right: 1px solid var(--on-red-line); min-width: 0; }
.stats li:first-child { padding-left: 0; }
.stats li:last-child { border-right: 0; }
.stats .ico { color: var(--orange-glow); stroke-width: 1.8; }
.stats strong { display: block; font-family: var(--font-display); font-size: 1.35rem; font-weight: 700; line-height: 1.25; }
.stats span { display: block; font-size: 14px; color: var(--on-red-muted); line-height: 1.45; }
.stats-light { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); color: var(--ink); grid-template-columns: repeat(2, 1fr); }
.stats-light li { padding: 18px; border-bottom: 1px solid var(--line); }
.stats-light li:first-child { padding-left: 18px; }
.stats-light li:nth-child(2n) { border-right: 0; }
.stats-light .ico { color: var(--orange); }
.stats-light span { color: var(--muted); }
@media (max-width: 900px) {
	.stats { grid-template-columns: 1fr 1fr; }
	.stats li { padding: 16px 12px; border-bottom: 1px solid var(--on-red-line); }
	.stats li:nth-child(2n) { border-right: 0; }
	.stats li:nth-child(2n+1) { padding-left: 0; }
	.stats li .ico { width: 32px; height: 32px; }
	.stats strong { font-size: 1.1rem; }
	.stats-light li:nth-child(2n+1) { padding-left: 14px; }
}
@media (max-width: 420px) { .stats-light { grid-template-columns: 1fr; } .stats-light li { border-right: 0; } }

/* ---------- แถบเนื้อหา ---------- */
.band { padding-block: 56px; }
.band-white { background: var(--surface); border-bottom: 1px solid var(--line); }
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2.2fr); gap: 40px; align-items: center; }
.split-text { display: grid; gap: 14px; align-content: center; }
.split-text p { margin: 0; color: var(--muted); }
.split-text .btn { width: fit-content; }
.tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.tile { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; text-decoration: none; color: var(--ink); box-shadow: var(--shadow-sm); }
.tile-img { position: relative; display: block; aspect-ratio: 4 / 3; background: var(--sunk); overflow: hidden; }
.tile-img img { width: 100%; height: 100%; object-fit: cover; }
.tile-label { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 12px; font-family: var(--font-display); font-weight: 600; line-height: 1.35; }
.tile-label .ico { color: var(--orange); }
.tile:hover { border-color: var(--orange); box-shadow: var(--shadow); }
.tile:hover .tile-label { color: var(--red-text); }
.featured { margin-top: 48px; }
@media (max-width: 980px) { .split { grid-template-columns: 1fr; gap: 24px; } }
@media (max-width: 700px) { .tiles { grid-template-columns: 1fr 1fr; gap: 10px; } .band { padding-block: 40px; } }

/* บริการ (แถบแดง) */
.svc-band { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 32px; align-items: center; padding: 32px; border-radius: 16px; color: var(--on-red); background: linear-gradient(110deg, var(--red-deep) 0%, var(--red) 55%, var(--red-hi) 100%); box-shadow: var(--shadow); }
.svc-text { display: grid; gap: 14px; }
.svc-text p { margin: 0; color: var(--on-red-muted); }
.svc-text .btn { width: fit-content; }
.svc-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.svc-tile { position: relative; display: block; border-radius: var(--radius); overflow: hidden; text-decoration: none; color: var(--white); background: var(--sunk); aspect-ratio: 4 / 3.2; }
.svc-tile .tile-img { position: absolute; inset: 0; aspect-ratio: auto; height: 100%; }
.svc-label { position: absolute; left: 0; right: 0; bottom: 0; padding: 26px 12px 10px; font-family: var(--font-display); font-weight: 600; line-height: 1.35; background: linear-gradient(180deg, transparent, color-mix(in srgb, var(--red-night) 85%, transparent)); }
.svc-tile:hover .svc-label { color: var(--amber); }
.svc-tile .ph .ico { opacity: 0.6; }
@media (max-width: 900px) { .svc-band { grid-template-columns: 1fr; padding: 24px 20px; } .svc-tiles { grid-template-columns: 1fr 1fr; } }

.pg { padding-block: 44px 72px; display: grid; gap: 52px; }
.pg > * { min-width: 0; }
.sec { display: grid; gap: 20px; }
.sec-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; }

.brands { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.brands-label { font-size: 14.5px; color: var(--muted); margin-right: 6px; }
.brand-chip { font-family: var(--font-display); font-weight: 600; padding: 6px 16px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); }

/* ---------- การ์ด ---------- */
.grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); }
.grid-2 { grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); }
.grid-shop { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; }
.card { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; color: var(--ink); text-decoration: none; min-width: 0; box-shadow: var(--shadow-sm); }
a.card:hover, .pcard:hover { border-color: var(--orange); box-shadow: var(--shadow); }
a.card:hover h3, a.card:hover .h3 { color: var(--red-text); }
.card h3 a { color: inherit; text-decoration: none; }
.card h3 a:hover { color: var(--red-text); }
.thumb { position: relative; display: block; aspect-ratio: 4 / 3; background: var(--sunk); overflow: hidden; max-width: 100%; margin: 0; }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.card-body { padding: 14px 16px 16px; display: grid; gap: 5px; align-content: start; flex: 1; }
.card-body p { margin: 0; color: var(--muted); font-size: 15px; }
.card-foot { padding: 0 16px 16px; }
.meta { font-size: 13.5px; color: var(--muted); text-decoration: none; }
.price { font-family: var(--font-display); font-weight: 700; color: var(--red-text); }
.price .num { font-size: 1.15em; }
.price .per { color: var(--muted); font-weight: 500; font-family: var(--font-body); }
.price.ask { color: var(--orange-deep); font-weight: 600; }
.price-date { display: block; font-size: 13px; color: var(--muted); }
.pills { display: flex; flex-wrap: wrap; gap: 6px; align-items: flex-start; }
.pill { font-size: 12.5px; padding: 1px 9px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); }
.pill.gov { border-color: var(--red-text); color: var(--red-text); }
.pill.done { border-color: var(--ok); color: var(--ok); }
.pill.wip { border-color: var(--orange); color: var(--orange-deep); }
@media (max-width: 560px) {
	.grid, .grid-shop { grid-template-columns: 1fr 1fr; gap: 10px; }
	.grid-3, .grid-2 { grid-template-columns: 1fr; }
	.grid .card-body { padding: 10px 12px 12px; }
	.grid .card-foot { padding: 0 12px 12px; }
	.grid h3 { font-size: 1rem; }
}

/* ภาพแทน */
.ph { position: absolute; inset: 0; display: grid; place-items: center; background: linear-gradient(145deg, var(--surface-3) 0%, var(--sunk) 100%); }
.ph .ico { color: var(--red-text); opacity: 0.55; stroke-width: 1.6; }
.ph-tag { position: absolute; left: 8px; bottom: 8px; font-size: 11px; color: var(--muted); background: color-mix(in srgb, var(--surface) 90%, transparent); border-radius: 4px; padding: 0 6px; }

/* ---------- หัวหน้า (แถบแดง) ---------- */
.page-head { color: var(--on-red); background: linear-gradient(100deg, var(--red-deep) 0%, var(--red) 55%, var(--red-hi) 100%); position: relative; overflow: hidden; }
.page-head::after { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(115deg, transparent 0 22px, rgba(255, 255, 255, 0.035) 22px 23px); pointer-events: none; }
.page-head .wrap { position: relative; z-index: 1; padding-block: 34px 38px; display: grid; gap: 10px; }
.page-head h1 { font-size: clamp(1.8rem, 4.4vw, 2.7rem); }
.page-head .lede { color: var(--on-red-muted); }
.page-head .crumbs, .page-head .crumbs a { color: var(--on-red-muted); }
.page-head-inline { display: grid; gap: 10px; }
.page-head-inline h1 { font-size: clamp(1.7rem, 4vw, 2.4rem); }
.crumbs { display: flex; flex-wrap: wrap; gap: 6px; font-size: 14px; color: var(--muted); }
.crumbs a { color: var(--muted); }

/* ---------- หน้าสินค้า (มีแถบหมวดด้านข้าง) ---------- */
.shop { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 28px; align-items: start; }
.shop > *, .shop-side > *, .cat-list { min-width: 0; max-width: 100%; }
.shop-side { display: grid; gap: 16px; position: sticky; top: 92px; }
.side-box { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); }
.side-h { margin: 0; padding: 10px 16px; background: var(--orange); color: var(--white); font-family: var(--font-display); font-weight: 600; }
.cat-list { list-style: none; margin: 0; padding: 6px; display: grid; gap: 2px; }
.cat-list .chip { display: flex; justify-content: space-between; gap: 8px; border: 0; border-radius: 6px; padding: 7px 10px; background: transparent; color: var(--ink); font-size: 15px; line-height: 1.4; }
.cat-list .chip:hover { background: var(--concrete); color: var(--red-text); }
.cat-list .chip.on { background: var(--red-tint); color: var(--red-text); font-weight: 600; }
.cat-list .n { color: var(--muted); font-size: 13px; }
.side-help { padding-bottom: 14px; }
.side-help p:not(.side-h) { margin: 10px 16px; font-size: 14.5px; color: var(--muted); }
.side-help .btn { margin: 0 16px; width: calc(100% - 32px); }
.shop-main { display: grid; gap: 14px; min-width: 0; }
.searchbar { display: flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: var(--surface); box-shadow: var(--shadow-sm); }
.searchbar input { flex: 1; min-width: 0; border: 0; padding: 12px 14px; background: transparent; }
.searchbar input:focus { outline: none; }
.searchbar:focus-within { border-color: var(--orange); }
.searchbar button { border: 0; background: var(--orange); color: var(--white); padding: 0 18px; cursor: pointer; }
.searchbar button:hover { background: var(--orange-hover); }
@media (max-width: 900px) {
	.shop { grid-template-columns: 1fr; gap: 14px; }
	.shop-side { position: static; }
	.side-help { display: none; }
	.side-box { background: transparent; border: 0; box-shadow: none; overflow: visible; }
	.side-h { display: none; }
	.cat-list { display: flex; overflow-x: auto; gap: 8px; padding: 0 0 6px; scrollbar-width: thin; }
	.cat-list .chip { white-space: nowrap; border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 6px 14px; }
	.cat-list .chip.on { background: var(--sel); color: var(--white); border-color: var(--sel); }
	.cat-list .chip.on .n { color: rgba(255, 255, 255, 0.8); }
}

/* ---------- ตัวกรอง ---------- */
.filters { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; }
.pills-tabs { display: flex; flex-wrap: wrap; gap: 8px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 6px 16px; font-size: 14.5px; color: var(--ink); text-decoration: none; cursor: pointer; font-family: var(--font-display); font-weight: 500; }
.chip:hover { border-color: var(--red-text); color: var(--red-text); }
.chip.on { background: var(--sel); border-color: var(--sel); color: var(--white); }
.sel { padding: 9px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); min-width: 0; max-width: 100%; }
.count-line { margin: 0; font-size: 14px; }
.empty { padding: 32px; border: 1px dashed var(--line); border-radius: var(--radius); background: var(--surface); text-align: center; color: var(--muted); }

/* ---------- หน้ารายละเอียด ---------- */
.detail { display: grid; grid-template-columns: 1.1fr 1fr; gap: 36px; align-items: start; }
.detail > * { min-width: 0; }
@media (max-width: 880px) { .detail { grid-template-columns: 1fr; gap: 24px; } }
.gallery { display: grid; gap: 10px; }
.gallery-main { position: relative; aspect-ratio: 4 / 3; border-radius: var(--radius); overflow: hidden; background: var(--sunk); border: 1px solid var(--line); max-width: 100%; }
.gallery-main img { width: 100%; height: 100%; object-fit: cover; }
.thumbs { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; }
.thumbs button { flex: none; width: 76px; height: 57px; padding: 0; border: 2px solid transparent; border-radius: 6px; overflow: hidden; background: var(--sunk); cursor: pointer; }
.thumbs button.on { border-color: var(--orange); }
.thumbs img { width: 100%; height: 100%; object-fit: cover; }
.info { display: grid; gap: 16px; }
.info h1 { font-size: clamp(1.6rem, 3.6vw, 2.3rem); }
.price-box .price { font-size: 1.45rem; }
.buybox { display: grid; gap: 10px; padding: 18px; border: 1px solid var(--line); border-top: 4px solid var(--red); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-sm); }
.buy-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: end; }
.buy-row .field input { width: 130px; }
.buy-note { margin: 0; font-size: 13.5px; color: var(--muted); }
.spec { width: 100%; border-collapse: collapse; font-size: 15px; background: var(--surface); border-radius: 8px; overflow: hidden; }
.spec th, .spec td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.spec th { width: 40%; color: var(--muted); font-weight: 500; background: var(--surface-3); }
.delivery h2 { font-size: 1.05rem; margin-bottom: 4px; }
.delivery p { margin: 0; color: var(--muted); }
.prose { max-width: 70ch; }
.prose p { margin: 0 0 1em; }
.prose h2 { font-size: 1.35rem; margin: 1.5em 0 0.5em; }
.prose h3 { margin: 1.3em 0 0.4em; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose > :last-child { margin-bottom: 0; }
.ticks { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.ticks li { position: relative; padding-left: 28px; }
.ticks li::before { content: ""; position: absolute; left: 4px; top: 0.6em; width: 12px; height: 6px; border-left: 2.5px solid var(--orange); border-bottom: 2.5px solid var(--orange); transform: rotate(-45deg); }

.steps { list-style: none; counter-reset: s; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; }
.steps li { counter-increment: s; padding: 18px 16px; background: var(--surface); border: 1px solid var(--line); border-top: 4px solid var(--red); border-radius: var(--radius); display: grid; gap: 4px; align-content: start; }
.steps li::before { content: "ขั้นที่ " counter(s); font-family: var(--font-display); font-weight: 600; font-size: 13px; color: var(--orange-deep); }
.steps strong { font-family: var(--font-display); }
.steps span { font-size: 14.5px; color: var(--muted); }
@media (max-width: 900px) { .steps { grid-template-columns: 1fr; } }

/* ช่องรายการแบบ */
.titleblock { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); margin: 0; border: 1px solid var(--line); border-top: 4px solid var(--red); border-radius: var(--radius); background: var(--surface); overflow: hidden; }
.titleblock > div { padding: 12px 16px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); min-width: 0; }
.titleblock .wide { grid-column: 1 / -1; border-right: 0; }
.titleblock dt { font-size: 12.5px; letter-spacing: 0.03em; color: var(--muted); }
.titleblock dd { margin: 2px 0 0; font-family: var(--font-display); font-weight: 600; overflow-wrap: anywhere; }
.titleblock.one-col { grid-template-columns: 1fr; }
.titleblock.one-col > div { border-right: 0; }
.titleblock > div:last-child { border-bottom: 0; }

.phase { display: grid; gap: 12px; }
.phase-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.phase-grid .thumb { border-radius: 8px; border: 1px solid var(--line); }
.phase-grid figcaption { position: absolute; right: 8px; top: 8px; background: var(--surface); font-size: 13px; padding: 0 8px; border-radius: 4px; }

/* ---------- แถบชวนติดต่อ ---------- */
.cta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px 32px; padding: 30px 32px; border-radius: 16px; color: var(--on-red); background: linear-gradient(110deg, var(--red-deep), var(--red) 60%, var(--red-hi)); box-shadow: var(--shadow); }
.cta-text { display: grid; gap: 6px; max-width: 34em; }
.cta h2 { font-size: clamp(1.3rem, 2.6vw, 1.65rem); }
.cta p { margin: 0; color: var(--on-red-muted); }

/* ---------- ฟอร์ม ---------- */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; min-width: 0; box-shadow: var(--shadow-sm); }
.form { display: grid; gap: 16px; }
.form-h { font-size: 1.2rem; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.form-h .ico { color: var(--orange); }
.form-h .muted { font-size: 0.85em; font-weight: 500; }
.fgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.fgrid-3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 640px) { .fgrid, .fgrid-3 { grid-template-columns: 1fr; } }
.field { display: grid; gap: 6px; min-width: 0; align-content: start; }
.field label, .field .lab { font-size: 14.5px; font-weight: 500; }
.field input, .field select, .field textarea { width: 100%; padding: 10px 12px; border: 1px solid var(--field-line); border-radius: 8px; background: var(--surface); }
.field input:not([type=checkbox]), .field select { height: 46px; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--orange); box-shadow: 0 0 0 3px var(--orange-tint); }
.field textarea { resize: vertical; }
.hint { font-size: 13px; color: var(--muted); font-weight: 400; }
.req { color: var(--off); }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14.5px; }
.check input { margin-top: 5px; width: 18px; height: 18px; flex: none; accent-color: var(--orange); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-err { margin: 0; color: var(--off); font-weight: 600; }
.small-note { margin: 0; font-size: 14px; }
.tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.tab { border: 2px solid var(--line); background: var(--surface); padding: 10px 20px; border-radius: 999px; cursor: pointer; font-family: var(--font-display); font-weight: 600; font-size: 16px; color: var(--muted); }
.tab[aria-selected="true"] { background: var(--orange-tint); color: var(--orange-deep); border-color: var(--orange); }
.quote-wrap { display: grid; }
.quote-wrap .form > .actions .btn { width: 100%; padding-block: 14px; font-size: 17px; }
.tablewrap { overflow-x: auto; }
.qlist { width: 100%; border-collapse: collapse; }
.qlist th, .qlist td { padding: 10px 6px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
.qlist th { font-size: 13px; color: var(--muted); font-weight: 500; }
.qlist input { width: 96px; padding: 6px 8px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); }
.qlist .x { border: 0; background: none; color: var(--off); cursor: pointer; font-size: 14px; padding: 4px; }
.custom-item summary { cursor: pointer; color: var(--red-text); font-weight: 600; font-family: var(--font-display); }
.custom-item .fgrid { margin: 12px 0 10px; }
.drop { display: grid; gap: 4px; justify-items: center; text-align: center; padding: 22px; border: 2px dashed var(--field-line); border-radius: 8px; background: var(--surface-2); color: var(--muted); cursor: pointer; }
.drop.over { border-color: var(--orange); background: var(--orange-tint); }
.files { display: grid; gap: 6px; font-size: 14px; }
.files div { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 6px 10px; background: var(--concrete); border-radius: 6px; }
.quote-done { text-align: center; display: grid; gap: 12px; justify-items: center; padding-block: 40px; }
.quote-done p { margin: 0; max-width: 34em; }
.done-no { font-size: 1.7rem; color: var(--red-text); border: 2px dashed var(--orange); padding: 4px 18px !important; border-radius: 8px; }

/* ตัวคำนวณ */
.calc { display: grid; gap: 22px; }
.seg { display: flex; flex-wrap: wrap; gap: 0; border: 1px solid var(--line); border-radius: 10px; padding: 4px; background: var(--concrete); width: fit-content; max-width: 100%; }
.seg-btn { display: inline-flex; align-items: center; gap: 8px; border: 0; background: transparent; padding: 9px 18px; border-radius: 8px; cursor: pointer; font-family: var(--font-display); font-weight: 600; color: var(--muted); }
.seg-btn[aria-selected="true"] { background: var(--orange); color: var(--white); }
.calc-body { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 26px; align-items: stretch; }
.calc-inputs { display: grid; gap: 14px; align-content: start; }
.result { display: grid; gap: 4px; align-content: center; justify-items: center; text-align: center; padding: 24px; border-radius: var(--radius); background: var(--orange-tint); border: 1px solid var(--orange-line); }
.result-label { font-family: var(--font-display); font-weight: 600; color: var(--orange-deep); }
.result .big { font-size: clamp(2.6rem, 6vw, 3.6rem); color: var(--orange); line-height: 1.1; font-weight: 500; }
.result .unit { color: var(--orange-deep); margin-bottom: 12px; }
@media (max-width: 860px) { .calc-body { grid-template-columns: 1fr; } }

/* ติดต่อ */
.contact-top { margin-bottom: -28px; }
.contact-grid { display: grid; grid-template-columns: 1.15fr 1fr; gap: 20px; align-items: start; }
@media (max-width: 880px) { .contact-grid { grid-template-columns: 1fr; } }
.contact-grid .panel { display: grid; gap: 16px; }
.phones { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (max-width: 460px) { .phones { grid-template-columns: 1fr; } }
.phone { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 8px 8px 14px; border: 1px solid var(--line); border-radius: 8px; min-width: 0; }
.phone a { font-size: 1.1rem; color: var(--ink); text-decoration: none; }
.phone small { display: block; font-size: 12px; color: var(--muted); }
.channels { display: grid; gap: 12px; }
.channel { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.channel .ico { color: var(--orange); }
.qr { width: 110px; border: 1px solid var(--line); border-radius: 6px; }
.hours { width: 100%; border-collapse: collapse; font-size: 15px; }
.hours td { padding: 10px 4px; border-bottom: 1px solid var(--line); }
.hours td:last-child { text-align: right; }
.hours tr.closed td:last-child { color: var(--off); }
.hours tr.today td { font-weight: 600; }
.hours tr.today td:first-child::after { content: "วันนี้"; margin-left: 8px; font-size: 12px; font-weight: 600; color: var(--white); background: var(--orange); border-radius: 4px; padding: 1px 7px; }
.note { font-size: 14px; color: var(--muted); margin: 8px 0 0; }
.map-grid { display: grid; grid-template-columns: 1fr 1.4fr; gap: 20px; align-items: stretch; }
.map { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); min-height: 300px; background: var(--sunk); }
.map iframe { width: 100%; height: 100%; min-height: 300px; border: 0; display: block; }
@media (max-width: 880px) { .map-grid { grid-template-columns: 1fr; } }
.sec > h2 { display: flex; align-items: center; gap: 10px; }
.sec > h2 .ico { color: var(--orange); }

/* เกี่ยวกับเรา */
.about-grid { display: grid; grid-template-columns: 1.5fr 1fr; gap: 40px; align-items: start; }
.about-main { display: grid; gap: 36px; min-width: 0; }
.about-side { display: grid; gap: 14px; position: sticky; top: 96px; min-width: 0; }
@media (max-width: 880px) { .about-grid { grid-template-columns: 1fr; } .about-side { position: static; } }

/* บทความ */
.article { max-width: 820px; }
.article-head { display: grid; gap: 10px; }
.article-head h1 { font-size: clamp(1.7rem, 4vw, 2.5rem); }
.article-cover { border-radius: var(--radius); overflow: hidden; }
.pagination, .nav-links { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.page-numbers { padding: 6px 12px; border: 1px solid var(--line); border-radius: 6px; text-decoration: none; color: var(--ink); background: var(--surface); }
.page-numbers.current { background: var(--sel); color: var(--white); border-color: var(--sel); }

.notfound { text-align: center; display: grid; gap: 14px; justify-items: center; padding: 48px 0; }
.notfound .code { font-size: 4rem; color: var(--orange); line-height: 1; }

/* ---------- ส่วนท้าย ---------- */
.site-footer { color: var(--on-red-muted); background: linear-gradient(100deg, var(--red-deep), var(--red) 70%); font-size: 15px; margin-top: 24px; }
.site-footer a { color: var(--on-red); text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.foot-top { display: flex; flex-wrap: wrap; align-items: center; gap: 20px 32px; padding-block: 30px; border-bottom: 1px solid var(--on-red-line); }
.foot-top .brand { color: var(--on-red); margin-right: 0; }
.foot-contact { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 14px 28px; flex: 1; justify-content: center; }
.foot-contact li { display: flex; align-items: center; gap: 10px; min-width: 0; color: var(--on-red); }
.foot-contact .ico { color: var(--amber); }
.foot-social { display: flex; gap: 8px; }
.foot-social a { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 10px; background: rgba(255, 255, 255, 0.12); }
.foot-social a:hover { background: rgba(255, 255, 255, 0.22); }
.foot-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; padding-block: 26px; }
.foot-grid > * { min-width: 0; }
.foot-grid ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.foot-h { margin: 0 0 8px; font-family: var(--font-display); font-weight: 600; color: var(--on-red); }
.foot-base { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 20px; border-top: 1px solid var(--on-red-line); padding-block: 14px 18px; font-size: 13.5px; }
@media (max-width: 900px) { .foot-grid { grid-template-columns: 1fr 1fr; } .foot-contact { justify-content: flex-start; flex-direction: column; } }
@media (max-width: 520px) { .foot-grid { grid-template-columns: 1fr; } }

/* ---------- ปุ่มติดต่อด่วนบนมือถือ ---------- */
.dock { display: none; }
@media (max-width: 760px) {
	.dock { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; position: fixed; left: 0; right: 0; bottom: 0; z-index: 45; gap: 6px; background: var(--surface); border-top: 1px solid var(--line); padding: 6px max(8px, env(safe-area-inset-right, 0px)) calc(6px + env(safe-area-inset-bottom, 0px)) max(8px, env(safe-area-inset-left, 0px)); box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.08); }
	.dock a, .dock button { position: relative; display: grid; justify-items: center; gap: 1px; padding: 6px 4px; border: 0; border-radius: 8px; background: transparent; color: var(--red-text); text-decoration: none; font-size: 12.5px; font-family: var(--font-display); font-weight: 500; cursor: pointer; }
	.dock a:first-child { background: var(--orange); color: var(--white); }
	.dock .count { position: absolute; top: 0; right: 18%; height: 18px; min-width: 18px; font-size: 11px; background: var(--sel); color: var(--white); }
	body { padding-bottom: calc(68px + env(safe-area-inset-bottom, 0px)); }
}

/* ข้อความแจ้ง */
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 60; max-width: calc(100vw - 32px); background: var(--ink); color: var(--white); padding: 10px 18px; border-radius: 10px; box-shadow: var(--shadow); font-size: 15px; }
.toast a { color: var(--amber); margin-left: 8px; }
@media (max-width: 760px) { .toast { bottom: calc(84px + env(safe-area-inset-bottom, 0px)); } }

@media (prefers-reduced-motion: no-preference) {
	.status.is-open .dot { animation: ccp-pulse 2.4s ease-in-out infinite; }
	@keyframes ccp-pulse { 50% { box-shadow: 0 0 0 7px color-mix(in srgb, var(--ok) 0%, transparent); } }
	a.card, .pcard, .tile, .svc-tile { transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s; }
	a.card:hover, .pcard:hover, .tile:hover, .svc-tile:hover { transform: translateY(-2px); }
}

@media (max-width: 600px) {
	.hero-art { display: none; }
	.stats li { flex-direction: column; align-items: flex-start; gap: 6px; padding: 14px 10px; }
	.stats li .ico { width: 28px; height: 28px; }
	.stats span { font-size: 13px; }
}

/* =========================================================
   ชั้นตกแต่ง: ไล่เฉด แสงสะท้อน เงานุ่ม ให้ทุกส่วนกลมกลืนเป็นชุดเดียว
   ========================================================= */
:root {
	--grad-red: radial-gradient(70% 120% at 100% 0%, color-mix(in srgb, var(--orange-glow) 30%, transparent) 0%, color-mix(in srgb, var(--orange-glow) 0%, transparent) 60%), radial-gradient(60% 90% at 0% 100%, color-mix(in srgb, var(--red-night) 45%, transparent) 0%, color-mix(in srgb, var(--red-night) 0%, transparent) 70%), linear-gradient(118deg, var(--red-night) 0%, var(--red-deep) 26%, var(--red) 56%, var(--red-hi) 82%, var(--red-hi2) 100%);
	--grad-red-deep: radial-gradient(60% 140% at 85% 0%, color-mix(in srgb, var(--orange-glow) 16%, transparent) 0%, color-mix(in srgb, var(--orange-glow) 0%, transparent) 60%), linear-gradient(118deg, var(--red-night) 0%, color-mix(in srgb, var(--red-deep) 70%, var(--red-night)) 45%, var(--red-deep) 100%);
	--grad-orange: linear-gradient(180deg, var(--orange-hi) 0%, color-mix(in srgb, var(--orange) 75%, var(--orange-hi)) 45%, var(--orange) 60%, color-mix(in srgb, var(--orange) 50%, var(--orange-hover)) 100%);
	--grad-orange-hover: linear-gradient(180deg, color-mix(in srgb, var(--orange) 80%, var(--orange-hi)) 0%, color-mix(in srgb, var(--orange) 40%, var(--orange-hover)) 55%, var(--orange-deep) 100%);
	--sheen: linear-gradient(108deg, rgba(255, 255, 255, 0) 32%, rgba(255, 255, 255, 0.07) 46%, rgba(255, 255, 255, 0) 60%);
	--mark-faint: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 48'><path d='M24 4L44 42H31.5L24 27.5 16.5 42H4z' fill='white' fill-opacity='0.06'/></svg>");
	--shadow-sm: 0 1px 2px color-mix(in srgb, var(--shade) 4%, transparent), 0 4px 14px color-mix(in srgb, var(--shade) 6%, transparent);
	--shadow: 0 2px 4px color-mix(in srgb, var(--shade) 4%, transparent), 0 12px 32px color-mix(in srgb, var(--shade) 10%, transparent);
	--shadow-red: 0 24px 48px -16px color-mix(in srgb, var(--red-night) 55%, transparent);
	--radius: 14px;
}

body { background: radial-gradient(1400px 700px at 0% -10%, var(--surface) 0%, transparent 60%), radial-gradient(1000px 600px at 100% 40%, var(--surface-3) 0%, transparent 60%), var(--concrete); background-attachment: fixed; }

/* หัวเว็บ */
.site-header { background: var(--sheen), var(--grad-red); box-shadow: 0 1px 0 rgba(255, 255, 255, 0.06) inset, 0 10px 30px -12px color-mix(in srgb, var(--red-night) 55%, transparent); }
.site-header::before { content: ""; position: absolute; inset: 0; background: var(--mark-faint) no-repeat; background-size: 190px; background-position: right 22% center; pointer-events: none; }
.site-header::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: linear-gradient(90deg, color-mix(in srgb, var(--orange) 0%, transparent), color-mix(in srgb, var(--orange-hi) 85%, transparent) 50%, color-mix(in srgb, var(--orange) 0%, transparent)); pointer-events: none; }
.head-row { z-index: 1; }
.site-nav { background-image: var(--grad-red-deep); }
@media (min-width: 1101px) { .site-nav { background: none; } }

/* ปุ่ม */
.btn, .quote-btn { background-image: var(--grad-orange); border-color: color-mix(in srgb, var(--orange) 50%, var(--orange-hover)); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35), 0 8px 18px -6px color-mix(in srgb, var(--orange) 60%, transparent); text-shadow: 0 1px 1px rgba(120, 40, 0, 0.25); transition: transform 0.15s, box-shadow 0.15s, background 0.15s; }
.btn:hover, .quote-btn:hover { background-image: var(--grad-orange-hover); border-color: var(--orange-deep); transform: translateY(-1px); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), 0 12px 22px -8px color-mix(in srgb, var(--orange-hover) 70%, transparent); }
.btn.outline, .btn.ghost { background-image: linear-gradient(180deg, var(--surface) 0%, color-mix(in srgb, var(--red-tint) 45%, var(--surface)) 100%); text-shadow: none; box-shadow: 0 1px 0 rgba(255, 255, 255, 0.9) inset, 0 4px 12px -4px color-mix(in srgb, var(--red) 25%, transparent); }
.btn.outline:hover, .btn.ghost:hover { background-image: linear-gradient(180deg, color-mix(in srgb, var(--red-tint) 55%, var(--surface)) 0%, var(--red-tint) 100%); }
.btn.outline-light, .btn.ghost-light { background-image: linear-gradient(180deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.04)); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18); text-shadow: none; -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.btn.outline-light:hover, .btn.ghost-light:hover { background-image: none; background-color: #FFFFFF; }

/* ภาพหลัก */
.hero { background: var(--mark-faint) no-repeat right -60px bottom -80px / 560px, radial-gradient(40% 60% at 80% 80%, color-mix(in srgb, var(--orange-glow) 22%, transparent) 0%, color-mix(in srgb, var(--orange-glow) 0%, transparent) 70%), var(--sheen), var(--grad-red); }
.hero.has-photo { background-image: linear-gradient(90deg, color-mix(in srgb, var(--red-night) 96%, transparent) 0%, color-mix(in srgb, var(--red-deep) 88%, transparent) 38%, color-mix(in srgb, var(--red) 55%, transparent) 70%, color-mix(in srgb, var(--red) 15%, transparent) 100%), radial-gradient(60% 80% at 100% 0%, color-mix(in srgb, var(--orange-glow) 25%, transparent), color-mix(in srgb, var(--orange-glow) 0%, transparent) 60%), var(--hero-img); }
.hero::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 120px; background: linear-gradient(180deg, color-mix(in srgb, var(--red-night) 0%, transparent), color-mix(in srgb, var(--red-night) 35%, transparent)); pointer-events: none; }
.hero-grid { position: relative; z-index: 1; }
.eyebrow { display: inline-flex; align-items: center; gap: 10px; }
.eyebrow::before { content: ""; width: 28px; height: 2px; border-radius: 1px; background: linear-gradient(90deg, var(--amber), var(--orange-hi)); }
.hero .status { background: color-mix(in srgb, var(--red-night) 28%, transparent); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.blueprint { filter: drop-shadow(0 10px 30px color-mix(in srgb, var(--red-night) 35%, transparent)); }

/* แถบตัวเลข */
.stats-band { background: var(--sheen), var(--grad-red-deep); border-top: 1px solid rgba(255, 255, 255, 0.08); box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.2); }
.stats li { border-right-color: rgba(255, 255, 255, 0.10); }
.stats .ico { width: 54px; height: 54px; padding: 12px; border-radius: 16px; color: var(--orange-glow); background: linear-gradient(145deg, color-mix(in srgb, var(--orange-glow) 30%, transparent), color-mix(in srgb, var(--orange-glow) 6%, transparent)); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--orange-glow) 28%, transparent), 0 8px 20px -8px color-mix(in srgb, var(--orange) 50%, transparent); }
.stats-light { box-shadow: var(--shadow-sm); border-color: color-mix(in srgb, var(--shade) 6%, transparent); }
.stats-light .ico { color: var(--orange); background: linear-gradient(145deg, var(--orange-tint), var(--orange-tint2)); box-shadow: inset 0 0 0 1px var(--orange-line); }
@media (max-width: 600px) { .stats .ico, .stats li .ico { width: 40px; height: 40px; padding: 8px; border-radius: 12px; } }

/* แถบขาว */
.band-white { background: linear-gradient(180deg, var(--surface) 0%, var(--surface-2) 100%); border-bottom: 1px solid color-mix(in srgb, var(--shade) 6%, transparent); }
.h-bar::after { background: linear-gradient(90deg, var(--orange-hi), var(--orange) 50%, var(--sel)); width: 64px; }

/* การ์ด */
.card, .tile, .side-box, .panel, .titleblock, .buybox, .steps li { border-color: color-mix(in srgb, var(--shade) 7%, transparent); box-shadow: var(--shadow-sm); }
.card, .tile { border-radius: var(--radius); }
a.card:hover, .pcard:hover, .tile:hover { border-color: color-mix(in srgb, var(--orange) 45%, transparent); box-shadow: 0 2px 4px color-mix(in srgb, var(--shade) 4%, transparent), 0 18px 36px -10px color-mix(in srgb, var(--red) 22%, transparent); }
.tile-label .ico { width: 30px; height: 30px; padding: 6px; border-radius: 50%; background: linear-gradient(145deg, var(--orange-tint), var(--orange-tint2)); color: var(--orange-deep); transition: transform 0.15s; }
.tile:hover .tile-label .ico { transform: translateX(3px); background: var(--grad-orange); color: var(--white); }
.card-body h3 { letter-spacing: -0.005em; }

/* ภาพแทน */
.ph { background: radial-gradient(120% 90% at 28% 18%, var(--surface) 0%, var(--surface-3) 42%, var(--sunk) 100%); }
.ph .ico { width: 72px; height: 72px; padding: 16px; border-radius: 50%; color: color-mix(in srgb, var(--red-text) 72%, var(--surface)); opacity: 1; background: linear-gradient(160deg, var(--surface), color-mix(in srgb, var(--red-tint) 60%, var(--surface))); box-shadow: 0 1px 0 var(--surface) inset, 0 10px 24px -8px color-mix(in srgb, var(--red) 28%, transparent); stroke-width: 1.7; }
.ph-tag { box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08); }

/* บริการ + แถบชวนติดต่อ */
.svc-band, .cta { position: relative; overflow: hidden; border-radius: 22px; background: var(--mark-faint) no-repeat right -50px center / 360px, var(--sheen), var(--grad-red); box-shadow: var(--shadow-red); }
.svc-band::after, .cta::after { content: ""; position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), inset 0 0 0 1px rgba(255, 255, 255, 0.05); pointer-events: none; }
.svc-band > *, .cta > * { position: relative; z-index: 1; }
.svc-tile { border-radius: 14px; box-shadow: 0 12px 26px -12px color-mix(in srgb, var(--red-night) 60%, transparent); background: rgba(255, 255, 255, 0.06); }
.svc-tile .ph { background: radial-gradient(120% 90% at 30% 15%, rgba(255, 255, 255, 0.22) 0%, rgba(255, 255, 255, 0.06) 60%, rgba(255, 255, 255, 0.02) 100%); }
.svc-tile .ph .ico { background: linear-gradient(160deg, rgba(255, 255, 255, 0.95), rgba(255, 240, 236, 0.9)); color: var(--red); opacity: 1; }
.svc-tile .ph-tag { display: none; }
.svc-label { background: linear-gradient(180deg, color-mix(in srgb, var(--red-night) 0%, transparent) 0%, color-mix(in srgb, var(--red-night) 65%, transparent) 45%, color-mix(in srgb, var(--red-night) 90%, transparent) 100%); }

/* หัวหน้า */
.page-head { background: var(--mark-faint) no-repeat right 6% center / 300px, var(--sheen), var(--grad-red); }
.page-head::after { background: linear-gradient(180deg, color-mix(in srgb, var(--red-night) 0%, transparent) 60%, color-mix(in srgb, var(--red-night) 25%, transparent)); }

/* หน้าสินค้า */
.side-h { background: var(--grad-orange); text-shadow: 0 1px 1px rgba(120, 40, 0, 0.25); }
.searchbar { border-radius: 12px; border-color: color-mix(in srgb, var(--shade) 10%, transparent); }
.searchbar button { background: var(--grad-orange); }
.searchbar button:hover { background: var(--grad-orange-hover); }
.chip.on, .cat-list .chip.on { box-shadow: 0 6px 14px -6px color-mix(in srgb, var(--red) 55%, transparent); }
.chip.on { background: linear-gradient(135deg, color-mix(in srgb, var(--sel) 82%, #fff), var(--sel) 60%, color-mix(in srgb, var(--sel) 80%, #000)); border-color: color-mix(in srgb, var(--sel) 85%, #000); }
@media (min-width: 901px) { .cat-list .chip.on { background: linear-gradient(90deg, var(--red-tint), color-mix(in srgb, var(--red-tint) 45%, var(--surface))); box-shadow: inset 3px 0 0 var(--red-text); } }

/* ฟอร์มและตัวคำนวณ */
.panel { border-radius: 18px; }
.field input, .field select, .field textarea { background: var(--surface-2); border-color: var(--field-line); transition: border-color 0.15s, box-shadow 0.15s, background 0.15s; }
.field input:focus, .field select:focus, .field textarea:focus { background: var(--surface); box-shadow: 0 0 0 4px color-mix(in srgb, var(--orange) 14%, transparent); }
.seg { background: linear-gradient(180deg, var(--surface-3), var(--sunk)); box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.06); }
.seg-btn[aria-selected="true"], .tab[aria-selected="true"] { background: var(--grad-orange); color: var(--white); border-color: color-mix(in srgb, var(--orange) 50%, var(--orange-hover)); box-shadow: 0 6px 14px -6px color-mix(in srgb, var(--orange) 70%, transparent); text-shadow: 0 1px 1px rgba(120, 40, 0, 0.25); }
.result { border-radius: 16px; background: radial-gradient(120% 100% at 50% 0%, var(--orange-tint) 0%, var(--orange-tint2) 70%, var(--orange-tint2) 100%); border-color: var(--orange-line); box-shadow: inset 0 1px 0 var(--surface), 0 10px 24px -14px color-mix(in srgb, var(--orange) 50%, transparent); }
.result .big { background: linear-gradient(180deg, var(--orange-hi) 0%, color-mix(in srgb, var(--orange) 50%, var(--orange-hover)) 100%); -webkit-background-clip: text; background-clip: text; color: transparent; font-weight: 600; }
.done-no { background: linear-gradient(180deg, var(--orange-tint), var(--orange-tint2)); }
.buybox { border-top: 0; position: relative; overflow: hidden; }
.buybox::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 4px; background: linear-gradient(90deg, var(--sel), color-mix(in srgb, var(--sel) 50%, var(--orange)) 50%, var(--orange)); }
.steps li, .titleblock { border-top: 0; position: relative; }
.steps li::after, .titleblock::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 4px; background: linear-gradient(90deg, var(--sel), color-mix(in srgb, var(--sel) 50%, var(--orange)) 50%, var(--orange)); border-radius: 14px 14px 0 0; }
.titleblock { padding-top: 4px; }
.hours tr.today td:first-child::after { background: var(--grad-orange); }

/* ส่วนท้าย */
.site-footer { position: relative; background: var(--mark-faint) no-repeat right -40px top 20px / 380px, var(--sheen), var(--grad-red-deep); }
.site-footer::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px; background: linear-gradient(90deg, var(--red), var(--orange) 50%, var(--red)); }
.foot-contact .ico { color: var(--orange-glow); width: 40px; height: 40px; padding: 8px; border-radius: 12px; background: linear-gradient(145deg, color-mix(in srgb, var(--orange-glow) 26%, transparent), color-mix(in srgb, var(--orange-glow) 6%, transparent)); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--orange-glow) 22%, transparent); }
.foot-social a { background: linear-gradient(145deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.05)); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12); }

/* แถบปุ่มมือถือ */
.dock { background: color-mix(in srgb, var(--surface) 92%, transparent); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.dock a:first-child { background-image: var(--grad-orange); box-shadow: 0 6px 14px -6px color-mix(in srgb, var(--orange) 70%, transparent); }
.toast { background: linear-gradient(135deg, #2A2E33, #1B1E22); }

@media (prefers-reduced-motion: reduce) {
	.btn, .quote-btn, .tile-label .ico { transition: none; }
	.btn:hover, .quote-btn:hover { transform: none; }
}
.svc-tile .tile-img { background: transparent; }
.svc-tile { aspect-ratio: 4 / 3.7; }
.svc-tile .ph { place-items: start center; padding-top: 16%; }
.svc-tile .ph .ico { width: 64px; height: 64px; padding: 14px; }
.svc-label { font-size: 15.5px; }
.searchbar button { display: grid; place-items: center; }

/* ===== เครื่องคำนวณวัสดุ (หลายหมวด) ===== */
.calc-groups { display: flex; gap: 8px; overflow-x: auto; padding: 4px 2px 12px; margin-bottom: 6px; scrollbar-width: thin; -webkit-overflow-scrolling: touch; }
.cg-btn { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; border-radius: 12px; border: 1px solid color-mix(in srgb, var(--shade) 8%, transparent); background: linear-gradient(180deg, var(--surface), var(--surface-3)); color: var(--ink); font-family: var(--font-display); font-weight: 600; font-size: 15px; cursor: pointer; box-shadow: var(--shadow-sm); transition: transform 0.15s, box-shadow 0.15s; }
.cg-btn .ico { color: var(--orange); }
.cg-btn:hover { transform: translateY(-1px); box-shadow: 0 8px 18px -10px color-mix(in srgb, var(--shade) 35%, transparent); }
.cg-btn[aria-selected="true"] { background: linear-gradient(135deg, color-mix(in srgb, var(--sel) 82%, #fff), var(--sel) 55%, color-mix(in srgb, var(--sel) 75%, #000)); color: var(--white); border-color: transparent; box-shadow: 0 10px 22px -12px color-mix(in srgb, var(--red) 80%, transparent), inset 0 1px 0 rgba(255, 255, 255, 0.15); }
.cg-btn[aria-selected="true"] .ico { color: var(--amber); }
.calc-pick { display: flex; flex-wrap: wrap; gap: 8px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.pick-btn { display: inline-flex; align-items: center; gap: 7px; padding: 8px 14px; border-radius: 999px; border: 1px solid var(--sunk); background: var(--surface-2); color: var(--muted); font-family: var(--font-display); font-weight: 600; font-size: 14.5px; cursor: pointer; transition: border-color 0.15s, color 0.15s, background 0.15s; }
.pick-btn:hover { border-color: var(--orange-line); color: var(--orange-deep); }
.pick-btn[aria-pressed="true"] { background: var(--grad-orange); color: var(--white); border-color: color-mix(in srgb, var(--orange) 50%, var(--orange-hover)); box-shadow: 0 6px 14px -6px color-mix(in srgb, var(--orange) 70%, transparent); }
.pick-btn[aria-pressed="true"] .ico { color: var(--white); }
.calc .calc-body { align-items: start; }
.calc .result { justify-items: stretch; text-align: left; align-content: start; gap: 6px; position: sticky; top: 90px; }
.calc .result > .result-label, .calc .result > .big, .calc .result > .unit { text-align: center; }
.calc .result .big { font-size: clamp(2.4rem, 5vw, 3.3rem); }
.result-rows { margin: 4px 0 2px; display: grid; gap: 0; background: color-mix(in srgb, var(--surface) 65%, transparent); border: 1px solid color-mix(in srgb, var(--orange) 14%, transparent); border-radius: 12px; padding: 4px 14px; }
.result-rows > div { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; border-bottom: 1px dashed color-mix(in srgb, var(--orange-deep) 18%, transparent); font-size: 14.5px; }
.result-rows > div:last-child { border-bottom: 0; }
.result-rows dt { color: var(--muted); }
.result-rows dt { flex: 1 1 0; min-width: 0; }
.result-rows dd { flex: 0 0 auto; max-width: 64%; margin: 0; text-align: right; font-weight: 600; color: var(--ink); }
.calc-inputs .fgrid .field { align-content: end; }
.result-warn { margin: 4px 0 0; padding: 9px 12px; border-radius: 10px; background: var(--warn-bg); border: 1px solid var(--warn-line); color: var(--warn-ink); font-size: 14px; line-height: 1.55; }
.result-items { margin-top: 6px; }
.result-items .ri-h { display: block; font-family: var(--font-display); font-weight: 600; font-size: 14px; color: var(--orange-deep); margin-bottom: 4px; }
.result-items ul { list-style: none; margin: 0 0 8px; padding: 0; display: grid; gap: 4px; }
.result-items li { display: flex; justify-content: space-between; gap: 10px; font-size: 14px; line-height: 1.5; }
.result-items li b { white-space: nowrap; color: var(--ink); }
.calc .result .btn[disabled] { opacity: 0.5; cursor: not-allowed; }
.big.is-bad { color: var(--off); }
.calc-body > *, .result { min-width: 0; }
.result-checks { list-style: none; margin: 4px 0 2px; padding: 0; display: grid; gap: 6px; }
.result-checks li { display: grid; grid-template-columns: auto 1fr; gap: 2px 10px; align-items: center; padding: 8px 12px; border-radius: 10px; border: 1px solid color-mix(in srgb, var(--ok) 35%, transparent); background: color-mix(in srgb, var(--ok) 8%, var(--surface)); font-size: 14px; }
.result-checks li.warn { border-color: var(--warn-line); background: var(--warn-bg); }
.result-checks li.fail { border-color: color-mix(in srgb, var(--off) 45%, transparent); background: color-mix(in srgb, var(--off) 9%, var(--surface)); }
.rc-badge { grid-row: span 2; align-self: center; min-width: 52px; text-align: center; padding: 3px 8px; border-radius: 999px; font-size: 12.5px; font-weight: 700; color: #fff; background: var(--ok); }
.result-checks li.warn .rc-badge { background: var(--warn-ink); color: var(--warn-bg); }
.result-checks li.fail .rc-badge { background: var(--off); }
.rc-l { font-weight: 600; color: var(--ink); }
.rc-t { color: var(--muted); font-size: 13px; }
.result-table { min-width: 0; max-width: 100%; overflow: hidden; margin: 4px 0 2px; border: 1px solid color-mix(in srgb, var(--orange) 14%, transparent); border-radius: 12px; background: color-mix(in srgb, var(--surface) 65%, transparent); }
.result-table summary { cursor: pointer; padding: 9px 14px; font-weight: 600; font-size: 14.5px; color: var(--ink); }
.rt-scroll { overflow-x: auto; max-height: 360px; overflow-y: auto; }
.result-table table { width: 100%; border-collapse: collapse; font-size: 13px; }
.result-table th, .result-table td { padding: 6px 10px; text-align: right; white-space: nowrap; border-top: 1px dashed color-mix(in srgb, var(--orange-deep) 18%, transparent); }
.result-table th { white-space: normal; min-width: 64px; line-height: 1.35; vertical-align: bottom; }
.rt-note { margin: 0; padding: 8px 14px 10px; font-size: 12.5px; line-height: 1.6; color: var(--muted); border-top: 1px dashed color-mix(in srgb, var(--orange-deep) 18%, transparent); }
.result-table th { position: sticky; top: 0; background: var(--surface-2); color: var(--muted); font-weight: 600; }
.result-table th:first-child, .result-table td:first-child { text-align: center; }
.result-table tr.pos td:last-child { color: var(--ok); font-weight: 600; }
.result-formula { margin: 6px 0 0; font-size: 12.5px; line-height: 1.6; color: var(--muted); }
.link-btn { justify-self: start; margin-top: 10px; background: none; border: 0; padding: 0; color: var(--red-text); font-size: 14px; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.calc-inputs .field[hidden] { display: none; }
.calc-disclaimer { margin-top: 14px; }
.chk-group { border: 1px solid var(--line); border-radius: 12px; padding: 6px 14px 10px; margin: 12px 0 0; }
.chk-group legend { font-family: var(--font-display); font-weight: 600; padding: 0 6px; color: var(--red-text); }
.chk-row { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 0.8fr); gap: 10px; align-items: center; padding: 7px 0; border-bottom: 1px dashed var(--line); }
.chk-row:last-child { border-bottom: 0; }
.chk-row label { font-size: 15px; line-height: 1.45; }
.stepper { display: inline-flex; align-items: center; border: 1px solid var(--field-line); border-radius: 10px; overflow: hidden; background: var(--surface-2); }
.stepper button { width: 34px; height: 38px; border: 0; background: transparent; font-size: 18px; cursor: pointer; color: var(--orange-deep); }
.stepper button:hover { background: var(--orange-tint); }
.stepper input { width: 46px; height: 38px; border: 0; text-align: center; background: transparent; font-family: var(--font-num); -moz-appearance: textfield; }
.stepper input::-webkit-inner-spin-button, .stepper input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.chk-note { height: 38px; padding: 6px 10px; border: 1px solid var(--field-line); border-radius: 8px; background: var(--surface-2); min-width: 0; width: 100%; }
@media (max-width: 860px) { .calc .result { position: static; } }
@media (max-width: 640px) {
	.chk-row { grid-template-columns: minmax(0, 1fr) auto; }
	.chk-note { grid-column: 1 / -1; }
	.calc .fgrid-3 { grid-template-columns: 1fr 1fr; }
	.cg-btn { padding: 9px 13px; font-size: 14px; }
}

/* =========================================================
   ธีมสีให้ผู้เข้าชมเลือก (html[data-theme]) และขนาดตัวอักษร (html[data-fs])
   ค่าเริ่มต้นคือโทนแดง–ส้มด้านบน ธีมอื่นเปลี่ยนเฉพาะตัวแปรสี
   ========================================================= */
html[data-theme="dark"] {
	--red: #262B32; --red-deep: #1B1F25; --red-hi: #343B44; --red-night: #0F1216; --red-hi2: #3A424C;
	--red-tint: #3A2427; --red-text: #FF9A8A; --sel: #B4232C;
	--orange: #E8590C; --orange-hover: #C9500F; --orange-deep: #FFA366; --orange-hi: #F8873A; --orange-glow: #FFA060; --amber: #FFB066;
	--orange-tint: #33241B; --orange-tint2: #3B291E; --orange-line: #5C3B25;
	--concrete: #121518; --surface: #1A1E23; --surface-2: #20252B; --surface-3: #252B31; --sunk: #2B3138;
	--line: #343B43; --field-line: #404851; --ink: #E7E9EC; --muted: #A3ABB4; --shade: #000000;
	--on-red-muted: rgba(255, 255, 255, 0.74);
	--ok: #4CC27E; --off: #FF7B72; --warn-bg: #3A3216; --warn-line: #6B5A1E; --warn-ink: #F2DC8B;
	color-scheme: dark;
}
html[data-theme="navy"] {
	--red: #143F73; --red-deep: #0D2D55; --red-hi: #1E5596; --red-night: #071A33; --red-hi2: #2563AA;
	--red-tint: #E7EEF8; --red-text: #144786; --sel: #174C8C;
	--orange: #E8770C; --orange-hover: #C7630A; --orange-deep: #A65208; --orange-hi: #FFA03D; --orange-glow: #FFB35E; --amber: #FFC46E;
	--orange-tint: #FEF2E4; --orange-tint2: #FCE6CC; --orange-line: #F6D0A3;
}
html[data-theme="green"] {
	--red: #1E5B2F; --red-deep: #144322; --red-hi: #2A7841; --red-night: #0A2914; --red-hi2: #33874A;
	--red-tint: #E6F2E9; --red-text: #1D6233; --sel: #22683A;
	--orange: #E8590C; --orange-hover: #C2480A; --orange-deep: #B8460A;
}
html[data-theme="slate"] {
	--red: #333E49; --red-deep: #252E37; --red-hi: #45535F; --red-night: #161C22; --red-hi2: #50606D;
	--red-tint: #E9EDF1; --red-text: #2E3A46; --sel: #3B4855;
	--orange: #EE6A10; --orange-hover: #CC5A0C; --orange-deep: #B04D0A; --orange-hi: #FF8F3F;
	--concrete: #ECEEF0; --sunk: #E1E5E8;
}
html[data-theme="sepia"] {
	--red: #6A4128; --red-deep: #4E2F1C; --red-hi: #835534; --red-night: #31200F; --red-hi2: #93623C;
	--red-tint: #F2E4D3; --red-text: #6A3F22; --sel: #74482B;
	--orange: #C4622A; --orange-hover: #A65220; --orange-deep: #8E4519; --orange-hi: #DD8549; --orange-glow: #EDA36C; --amber: #F3C089;
	--orange-tint: #F7E8D8; --orange-tint2: #F1DBC4; --orange-line: #E3C29F;
	--concrete: #F3EBDD; --surface: #FBF6EC; --surface-2: #F8F1E5; --surface-3: #F1E8D8; --sunk: #E8DCC8;
	--line: #E2D4BE; --field-line: #D3C2A6; --ink: #3A2E24; --muted: #6F6052; --shade: #3A2A1A;
}
html[data-fs="lg"] body { zoom: 1.1; }
html[data-fs="xl"] body { zoom: 1.22; }
html[data-theme="dark"] img:not(.brand-mark-img) { filter: brightness(0.92); }
html[data-theme="dark"] .result .big { background: linear-gradient(180deg, #FFA366, #F2782B); -webkit-background-clip: text; background-clip: text; }
html[data-theme="dark"] .toast { background: linear-gradient(135deg, #2F353C, #23282E); }

/* ---------- โลโก้ ---------- */
.brand-badge { flex: none; display: grid; place-items: center; width: 74px; height: 54px; border-radius: 14px; background: #FFFFFF; box-shadow: 0 1px 0 rgba(255, 255, 255, 0.6) inset, 0 6px 16px -6px rgba(0, 0, 0, 0.45); padding: 4px; }
.brand-badge img { width: 100%; height: 100%; object-fit: contain; }
.site-footer .brand-badge { width: 84px; height: 62px; }
@media (max-width: 600px) { .brand-badge { width: 58px; height: 44px; border-radius: 12px; padding: 3px; } }

/* ---------- แผงปรับการแสดงผล ---------- */
.disp-btn { flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 8px; border: 1px solid var(--on-red-line); background: rgba(255, 255, 255, 0.06); color: var(--on-red); cursor: pointer; }
.disp-btn:hover, .disp-btn[aria-expanded="true"] { background: rgba(255, 255, 255, 0.16); }
.disp { position: absolute; right: var(--gutter-r); top: calc(100% + 8px); z-index: 50; width: min(340px, calc(100vw - 32px)); padding: 16px; border-radius: 16px; background: var(--surface); color: var(--ink); border: 1px solid var(--line); box-shadow: 0 2px 4px rgba(0, 0, 0, 0.06), 0 24px 48px -12px rgba(0, 0, 0, 0.35); display: grid; gap: 10px; }
.disp-h { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-family: var(--font-display); font-weight: 700; font-size: 17px; }
.disp-x { width: 34px; height: 34px; border: 0; border-radius: 8px; background: var(--surface-3); color: var(--muted); font-size: 20px; line-height: 1; cursor: pointer; }
.disp-lab { margin: 4px 0 0; font-size: 13.5px; color: var(--muted); font-weight: 600; }
.disp-themes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.disp-theme { display: grid; justify-items: center; gap: 6px; padding: 10px 4px 8px; border: 2px solid var(--line); border-radius: 12px; background: var(--surface-2); color: var(--ink); font-size: 12.5px; line-height: 1.3; text-align: center; cursor: pointer; font-family: var(--font-display); font-weight: 600; }
.disp-theme:hover { border-color: var(--orange-line); }
.disp-theme[aria-pressed="true"] { border-color: var(--orange); box-shadow: 0 0 0 3px color-mix(in srgb, var(--orange) 22%, transparent); }
.sw { width: 40px; height: 40px; border-radius: 50%; background: linear-gradient(135deg, var(--sw-a) 0 50%, var(--sw-b) 50% 100%); box-shadow: inset 0 0 0 3px var(--sw-c), 0 2px 6px rgba(0, 0, 0, 0.18); }
.disp-sizes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; padding: 4px; border-radius: 12px; background: var(--surface-3); }
.disp-size { border: 0; border-radius: 9px; padding: 8px 4px; background: transparent; color: var(--muted); cursor: pointer; font-family: var(--font-display); font-weight: 600; line-height: 1.1; }
.disp-size[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12); }
.disp-size small { display: block; font-size: 11px; font-weight: 500; margin-top: 2px; }
.disp-reset { justify-self: start; background: none; border: 0; padding: 2px 0; color: var(--red-text); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; font-size: 14px; }
@media (max-width: 600px) { .disp-btn { width: 38px; height: 38px; } .disp { right: 8px; } }
.brand-text { min-width: 0; }
.brand-name { white-space: nowrap; }
@media (max-width: 600px) { html[data-fs="xl"] .brand-sub, html[data-fs="lg"] .brand-sub { display: none; } }

/* ===== ตารางเครื่องใช้ไฟฟ้า (โหลดไฟฟ้า / ออฟกริด) ===== */
.calc .result .big.big-text { font-size: clamp(1.9rem, 4.6vw, 2.6rem); }
.loads { margin-top: 14px; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--surface); }
.loads-h, .load-row { display: grid; grid-template-columns: minmax(0, 1.6fr) 76px auto 64px; gap: 8px; align-items: center; padding: 7px 12px; }
.loads-h { background: var(--surface-3); font-size: 13px; font-weight: 600; color: var(--muted); }
.load-row { border-top: 1px dashed var(--line); }
.load-row .ln { font-size: 14.5px; line-height: 1.4; color: var(--muted); }
.load-row.on .ln { color: var(--ink); font-weight: 600; }
.load-row > input { height: 36px; width: 100%; min-width: 0; padding: 4px 8px; border: 1px solid var(--field-line); border-radius: 8px; background: var(--surface-2); font-family: var(--font-num); }
.load-row .stepper button { width: 30px; height: 34px; }
.load-row .stepper input { width: 38px; height: 34px; }
.load-x { margin-left: 4px; border: 0; background: none; color: var(--off); cursor: pointer; font-size: 16px; }
.load-add { display: grid; grid-template-columns: minmax(0, 1fr) 90px auto; gap: 8px; padding: 10px 12px; border-top: 1px solid var(--line); background: var(--surface-2); }
.load-add input { height: 38px; padding: 4px 10px; border: 1px solid var(--field-line); border-radius: 8px; background: var(--surface); min-width: 0; }
@media (max-width: 560px) {
	.loads-h { grid-template-columns: 70px 104px 60px; }
	.loads-h span:first-child { display: none; }
	.load-row { grid-template-areas: "n n n" "w q h"; row-gap: 6px; }
	.load-row .ln { grid-area: n; }
	.load-row > input[data-lk="w"] { grid-area: w; }
	.load-row .stepper { grid-area: q; justify-self: start; }
	.load-row > input[data-lk="h"] { grid-area: h; }
	.load-row { grid-template-columns: 70px 104px 60px; }
	.load-add { grid-template-columns: minmax(0, 1fr) 70px; }
	.load-add .btn { grid-column: 1 / -1; }
}

/* ---------- เอฟเฟกต์ภาพหลักหน้าแรก (สีเปลี่ยนตามธีม) ---------- */
:root {
	--fx-c1: var(--red-night); --fx-c2: var(--red-deep); --fx-c3: var(--red); --fx-c4: var(--red-hi); --fx-c5: var(--red-hi2);
	--fx-glow: #FF7900; --fx-gold: #FFC15A; --fx-line: #FFD9A0; --fx-grid: rgba(255, 193, 90, 0.15); --fx-dot: 1;
}
html[data-theme="dark"] { --fx-glow: #FF7A1A; --fx-gold: #FFC15A; --fx-line: #F6D29A; --fx-grid: rgba(255, 193, 90, 0.11); --fx-dot: 0.85; }
html[data-theme="navy"] { --fx-glow: #FF8A1F; --fx-gold: #FFC15A; --fx-line: #DCE9FF; --fx-grid: rgba(150, 190, 255, 0.15); --fx-dot: 1; }
html[data-theme="green"] { --fx-glow: #FFB23F; --fx-gold: #F3D27A; --fx-line: #E6F4D8; --fx-grid: rgba(220, 240, 170, 0.13); --fx-dot: 0.9; }
html[data-theme="slate"] { --fx-glow: #FF7900; --fx-gold: #FFC15A; --fx-line: #F1E3CC; --fx-grid: rgba(255, 210, 150, 0.12); --fx-dot: 0.9; }
html[data-theme="sepia"] { --fx-glow: #E59A45; --fx-gold: #F2D29A; --fx-line: #F7E6C6; --fx-grid: rgba(242, 210, 154, 0.13); --fx-dot: 0.6; }

/* 5. พื้นหลังไล่เฉดตามสีหลักของธีม (ค่าเริ่มต้น: แดงชื่นชูไพร) */
.hero.fx-hero {
	isolation: isolate;
	background:
		radial-gradient(55% 80% at 82% 18%, color-mix(in srgb, var(--fx-glow) 24%, transparent) 0%, transparent 62%),
		radial-gradient(45% 70% at 62% 100%, color-mix(in srgb, var(--fx-gold) 10%, transparent) 0%, transparent 70%),
		radial-gradient(55% 90% at 0% 100%, rgba(0, 0, 0, 0.45) 0%, transparent 65%),
		linear-gradient(108deg, transparent 28%, rgba(255, 255, 255, 0.045) 44%, transparent 58%),
		linear-gradient(118deg, var(--fx-c1) 0%, var(--fx-c2) 26%, var(--fx-c3) 50%, var(--fx-c4) 78%, var(--fx-c5) 100%);
}
.hero.fx-hero.has-photo { background: linear-gradient(90deg, color-mix(in srgb, var(--fx-c1) 96%, transparent) 0%, color-mix(in srgb, var(--fx-c2) 88%, transparent) 38%, color-mix(in srgb, var(--fx-c4) 55%, transparent) 72%, color-mix(in srgb, var(--fx-c5) 25%, transparent) 100%), radial-gradient(55% 80% at 100% 0%, color-mix(in srgb, var(--fx-glow) 24%, transparent), transparent 62%), var(--hero-img) center right / cover no-repeat; }
.hero.fx-hero::after { background: linear-gradient(180deg, transparent, color-mix(in srgb, var(--fx-c1) 40%, transparent)); }
.hero.fx-hero .eyebrow { color: var(--fx-gold); }
.hero.fx-hero h1 { color: #fff; text-shadow: 0 2px 22px color-mix(in srgb, var(--fx-glow) 28%, transparent); }
.hero.fx-hero .lede { color: rgba(255, 255, 255, 0.82); }
.hero.fx-hero .status { background: rgba(0, 0, 0, 0.25); }
.fx-layer { position: absolute; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }

/* 4. กริดวิศวกรรมหลังภาพบ้าน + เส้นบ้านสีทอง */
.fx-hero .hero-art { position: relative; }
.fx-hero .hero-art::before { content: ""; position: absolute; inset: -14% -12%; background-image: linear-gradient(var(--fx-grid) 1px, transparent 1px), linear-gradient(90deg, var(--fx-grid) 1px, transparent 1px), linear-gradient(color-mix(in srgb, var(--fx-grid) 45%, transparent) 1px, transparent 1px), linear-gradient(90deg, color-mix(in srgb, var(--fx-grid) 45%, transparent) 1px, transparent 1px); background-size: 80px 80px, 80px 80px, 16px 16px, 16px 16px; -webkit-mask-image: radial-gradient(closest-side, #000 40%, transparent 100%); mask-image: radial-gradient(closest-side, #000 40%, transparent 100%); }
.fx-hero .blueprint { position: relative; filter: drop-shadow(0 0 8px color-mix(in srgb, var(--fx-glow) 45%, transparent)); }
.fx-hero .bp-grid { display: none; }
.fx-hero .bp-house { stroke: var(--fx-line); }
.fx-hero .bp-dim { stroke: var(--fx-gold); }
.fx-hero .bp-num { fill: var(--fx-gold); }

/* 2. ใบโพเส้นทองโปร่งแสงด้านขวา */
.fx-leaf { position: absolute; right: -50px; top: -40px; height: 125%; width: auto; opacity: 0.17; transform-origin: 50% 0; filter: drop-shadow(0 0 10px color-mix(in srgb, var(--fx-gold) 40%, transparent)); }

/* 3. จุดแสงหลายระดับความลึก */
.fx-dots { position: absolute; inset: -10% 0; background-repeat: no-repeat; }
.fx-d1 { opacity: calc(0.9 * var(--fx-dot)); background-image: radial-gradient(circle at 8% 22%, var(--fx-gold) 0 1.2px, transparent 2px), radial-gradient(circle at 21% 74%, var(--fx-gold) 0 1px, transparent 1.8px), radial-gradient(circle at 37% 30%, var(--fx-gold) 0 1px, transparent 1.8px), radial-gradient(circle at 52% 82%, var(--fx-glow) 0 1.2px, transparent 2px), radial-gradient(circle at 63% 12%, var(--fx-gold) 0 1px, transparent 1.8px), radial-gradient(circle at 74% 64%, var(--fx-gold) 0 1.2px, transparent 2px), radial-gradient(circle at 86% 36%, #fff 0 0.9px, transparent 1.7px), radial-gradient(circle at 95% 80%, var(--fx-gold) 0 1px, transparent 1.8px), radial-gradient(circle at 44% 56%, #fff 0 0.8px, transparent 1.6px), radial-gradient(circle at 13% 50%, var(--fx-glow) 0 0.8px, transparent 1.6px), radial-gradient(circle at 29% 8%, var(--fx-gold) 0 0.9px, transparent 1.7px), radial-gradient(circle at 58% 40%, var(--fx-gold) 0 0.8px, transparent 1.6px); }
.fx-d2 { opacity: calc(0.55 * var(--fx-dot)); filter: blur(0.6px); background-image: radial-gradient(circle at 15% 35%, var(--fx-glow) 0 2px, transparent 3.2px), radial-gradient(circle at 31% 88%, var(--fx-gold) 0 1.8px, transparent 3px), radial-gradient(circle at 48% 12%, var(--fx-glow) 0 2px, transparent 3.2px), radial-gradient(circle at 68% 46%, var(--fx-gold) 0 1.8px, transparent 3px), radial-gradient(circle at 81% 90%, var(--fx-glow) 0 2px, transparent 3.2px), radial-gradient(circle at 92% 14%, var(--fx-gold) 0 1.8px, transparent 3px); }
.fx-d3 { opacity: calc(0.3 * var(--fx-dot)); filter: blur(2px); background-image: radial-gradient(circle at 26% 18%, var(--fx-glow) 0 4px, transparent 7px), radial-gradient(circle at 58% 70%, var(--fx-gold) 0 5px, transparent 8px), radial-gradient(circle at 78% 28%, var(--fx-glow) 0 4px, transparent 7px), radial-gradient(circle at 6% 86%, var(--fx-gold) 0 5px, transparent 8px); }

/* 1. เส้นแสงส้มทองไหลผ่านด้านล่าง */
.fx-layer::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--fx-glow) 50%, transparent) 20%, color-mix(in srgb, var(--fx-gold) 60%, transparent) 50%, color-mix(in srgb, var(--fx-glow) 50%, transparent) 80%, transparent); }
.fx-beam { position: absolute; left: 0; bottom: -1px; z-index: 1; width: 38%; height: 3px; border-radius: 3px; background: linear-gradient(90deg, transparent 0%, var(--fx-glow) 40%, var(--fx-gold) 70%, transparent 100%); box-shadow: 0 0 14px 2px color-mix(in srgb, var(--fx-glow) 55%, transparent), 0 0 36px 6px color-mix(in srgb, var(--fx-glow) 25%, transparent); transform: translateX(-110%); opacity: 0; }
.fx-b2 { width: 22%; height: 2px; bottom: 7px; }

@media (prefers-reduced-motion: no-preference) {
	.fx-beam { animation: fx-beam 7s cubic-bezier(.45, .05, .35, 1) infinite; }
	.fx-b2 { animation: fx-beam 11s cubic-bezier(.45, .05, .35, 1) 3.5s infinite; }
	.fx-d1 { animation: fx-drift 26s ease-in-out infinite alternate, fx-twinkle 5s ease-in-out infinite; }
	.fx-d2 { animation: fx-drift 38s ease-in-out -8s infinite alternate-reverse; }
	.fx-d3 { animation: fx-drift 52s ease-in-out -20s infinite alternate; }
	.fx-leaf { animation: fx-sway 14s ease-in-out infinite alternate; }
	.fx-hero .bp-house > * { stroke-dasharray: 1000; stroke-dashoffset: 1000; animation: fx-draw 2.8s cubic-bezier(.6, .1, .3, 1) .2s forwards; }
	.fx-hero .bp-dim > * { stroke-dasharray: 400; stroke-dashoffset: 400; animation: fx-draw 1.6s ease-out 1.6s forwards; }
}
@keyframes fx-beam { 0% { transform: translateX(-110%); opacity: 0; } 12% { opacity: 1; } 88% { opacity: 1; } 100% { transform: translateX(300%); opacity: 0; } }
@keyframes fx-drift { from { transform: translate3d(0, 0, 0); } to { transform: translate3d(-18px, -14px, 0); } }
@keyframes fx-twinkle { 0%, 100% { filter: brightness(1); } 50% { filter: brightness(0.55); } }
@keyframes fx-sway { from { transform: rotate(-2deg); } to { transform: rotate(2.5deg) translateY(4px); } }
@keyframes fx-draw { to { stroke-dashoffset: 0; } }

@media (max-width: 600px) {
	.fx-hero .hero-art { display: block; position: absolute; right: -14%; bottom: 8px; width: 88%; max-width: none; opacity: 0.16; z-index: 0; }
	.fx-hero .hero-copy { position: relative; z-index: 1; }
	.fx-hero .lede { text-shadow: 0 1px 10px rgba(0, 0, 0, 0.7); }
	.fx-leaf { height: 95%; right: -70px; opacity: 0.12; }
}

/* 6. กลุ่มดาวระยิบระยับ (สีตามธีม) */
:root { --fx-star: #FFEBC2; --fx-cst-line: rgba(255, 193, 90, 0.45); }
html[data-theme="dark"] { --fx-star: #FFE9C6; --fx-cst-line: rgba(255, 200, 120, 0.38); }
html[data-theme="navy"] { --fx-star: #D6E7FF; --fx-cst-line: rgba(170, 205, 255, 0.46); }
html[data-theme="green"] { --fx-star: #F1FAD4; --fx-cst-line: rgba(230, 240, 170, 0.4); }
html[data-theme="slate"] { --fx-star: #FFF3DF; --fx-cst-line: rgba(255, 215, 160, 0.38); }
html[data-theme="sepia"] { --fx-star: #F8E6C2; --fx-cst-line: rgba(242, 210, 154, 0.34); }
.fx-sky { position: absolute; inset: 0; }
.fx-cst { position: absolute; height: auto; overflow: visible; filter: drop-shadow(0 0 4px color-mix(in srgb, var(--fx-star) 70%, transparent)); }
.cst-a { left: 43%; top: 6%; width: 150px; }
.cst-b { right: 3%; top: 5%; width: 240px; }
.cst-c { left: 2.5%; bottom: 9%; width: 115px; }
.cst-l { stroke: var(--fx-cst-line); stroke-width: 1; stroke-linecap: round; stroke-dasharray: 2 0; }
.st circle { fill: var(--fx-star); }
.st-x { stroke: var(--fx-star); stroke-width: 0.7; stroke-linecap: round; opacity: 0.85; }
.st { transform-box: fill-box; transform-origin: center; }
.fx-tw { position: absolute; width: 3.5px; height: 3.5px; border-radius: 50%; background: var(--fx-star); box-shadow: 0 0 6px 1px color-mix(in srgb, var(--fx-star) 70%, transparent); }
@media (prefers-reduced-motion: no-preference) {
	.st, .fx-tw { animation: fx-star var(--t, 3s) ease-in-out var(--d, 0s) infinite; }
	.cst-l { stroke-dasharray: 600; stroke-dashoffset: 600; animation: fx-draw 4s ease-out .6s forwards, fx-cst 7s ease-in-out 4.6s infinite; }
}
@keyframes fx-star { 0%, 100% { opacity: 0.35; transform: scale(0.7); } 45% { opacity: 1; transform: scale(1.18); } 55% { opacity: 0.9; transform: scale(1); } }
@keyframes fx-cst { 0%, 100% { opacity: 1; } 50% { opacity: 0.45; } }
@media (max-width: 900px) { .cst-a { left: auto; right: 34%; top: 4%; width: 90px; } .cst-c { display: none; } }
@media (max-width: 600px) { .cst-a, .fx-tw:nth-child(n+8) { display: none; } .cst-b { width: 150px; right: 2%; top: 3%; opacity: 0.85; } }
