:root {
  --brand: #4a6cf7;
  --brand-dark: #3a57d6;
  --brand-soft: #eef2ff;
  --accent: #10b981;
  --ink: #1b2130;
  --muted: #64708a;
  --line: #eceff5;
  --bg-soft: #f7f9fc;
  --radius: 16px;
  --shadow-sm: 0 4px 16px rgba(37, 52, 92, .05);
  --shadow-md: 0 16px 40px rgba(37, 52, 92, .09);
}

* { scroll-behavior: smooth; }

body {
  font-family: 'Noto Sans Thai', system-ui, -apple-system, 'Segoe UI', sans-serif;
  color: var(--ink);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
.fb-profile-mode .hero,
.fb-profile-mode .warranty-section,
.fb-profile-mode #solution,
.fb-profile-mode #services,
.fb-profile-mode #why,
.fb-profile-mode #process,
.fb-profile-mode #packages,
.fb-profile-mode #results,
.fb-profile-mode #faq,
.fb-profile-mode #contact,
.fb-profile-mode .mobile-cta {
  display: none !important;
}
.fb-profile-mode .profile-section {
  padding-top: 0;
}
.fb-profile-mode .navbar {
  background: #fff;
}

h1, h2, h3, h4, .fw-head { font-family: 'Prompt', 'Noto Sans Thai', sans-serif; }

a { text-decoration: none; }

.section { padding: 72px 0; }
.section-sm { padding: 52px 0; }
.bg-soft { background: var(--bg-soft); }

.eyebrow {
  display: inline-block;
  font-weight: 600;
  font-size: .82rem;
  letter-spacing: .06em;
  color: var(--brand);
  background: var(--brand-soft);
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 14px;
}

.section-title { font-weight: 700; font-size: clamp(1.6rem, 3.4vw, 2.4rem); line-height: 1.3; }
.section-lead { color: var(--muted); max-width: 720px; }

/* ---------- Navbar ---------- */
.navbar { background: rgba(255, 255, 255, .92); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.navbar-brand { font-family: 'Prompt', sans-serif; font-weight: 700; letter-spacing: .04em; color: var(--ink); }
.navbar-brand span { color: var(--brand); }
.nav-link { color: var(--muted); font-weight: 500; }
.nav-link:hover, .nav-link:focus { color: var(--brand); }

/* ---------- Buttons ---------- */
.btn { border-radius: 12px; font-weight: 600; padding: 12px 22px; }
.btn-brand { background: var(--brand); color: #fff; border: none; }
.btn-brand:hover, .btn-brand:focus { background: var(--brand-dark); color: #fff; }
.btn-line { background: #06c755; color: #fff; border: none; }
.btn-line:hover, .btn-line:focus { background: #05a648; color: #fff; }
.btn-outline-ink { border: 1.5px solid var(--line); color: var(--ink); background: #fff; }
.btn-outline-ink:hover, .btn-outline-ink:focus { border-color: var(--brand); color: var(--brand); }
.btn-ghost { color: #fff; border: 1.5px solid rgba(255,255,255,.55); background: transparent; }
.btn-ghost:hover, .btn-ghost:focus { background: rgba(255,255,255,.12); color: #fff; }

/* ---------- Hero ---------- */
.hero {
  background:
    radial-gradient(1100px 560px at 85% -10%, rgba(74, 108, 247, .30), transparent 60%),
    radial-gradient(820px 460px at 5% 18%, rgba(16, 185, 129, .14), transparent 58%),
    linear-gradient(160deg, #263a8f 0%, #1e2c66 55%, #24316b 100%);
  color: #fff;
  padding: 96px 0 84px;
}
.hero h1 { font-weight: 700; font-size: clamp(1.9rem, 4.6vw, 3.1rem); line-height: 1.25; }
.hero p.lead { color: rgba(255,255,255,.82); font-size: 1.08rem; max-width: 620px; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(255,255,255,.10); border: 1px solid rgba(255,255,255,.16);
  color: #dfe3ff; border-radius: 999px; padding: 7px 16px; font-size: .85rem; margin-bottom: 18px;
}
.hero-card {
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 20px;
  padding: 22px;
  box-shadow: var(--shadow-md);
}
.hero-stat { text-align: center; padding: 14px 8px; }
.hero-stat .num { font-family: 'Prompt', sans-serif; font-weight: 700; font-size: 1.6rem; color: #fff; }
.hero-stat .lbl { font-size: .82rem; color: rgba(255,255,255,.72); }
.hero-img { width: 100%; height: auto; border-radius: 16px; display: block; }

/* ---------- Cards ---------- */
.card-soft {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow-sm); height: 100%; transition: transform .18s ease, box-shadow .18s ease;
}
.card-soft:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.card-body { padding: 26px; }

.icon-badge {
  width: 52px; height: 52px; border-radius: 14px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--brand-soft); color: var(--brand); font-size: 1.4rem; margin-bottom: 16px;
}
.icon-badge.green { background: #e6f8f1; color: var(--accent); }

/* ---------- Warranty ---------- */
.warranty-section {
  background:
    radial-gradient(900px 460px at 10% -8%, rgba(16, 185, 129, .10), transparent 58%),
    linear-gradient(180deg, #f4fcf8 0%, #fff 100%);
}
.warranty-eyebrow {
  color: #087f5b;
  background: #e8f8f0;
  border: 1px solid #b9ecd3;
}
.warranty-summary {
  max-width: 760px;
  background: rgba(232, 248, 240, .75);
  border: 1px solid #b9ecd3;
  border-radius: 14px;
  padding: 18px 22px;
  color: #244436;
}
.warranty-panel {
  max-width: 960px;
  background: #fff;
  border: 1px solid #dfe6f0;
  border-radius: 18px;
  box-shadow: var(--shadow-sm);
  padding: 30px;
}
.warranty-lock {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  background: #fff4d7;
  color: #a86b00;
  font-size: 1.25rem;
}
.warranty-box {
  height: 100%;
  border-radius: 16px;
  padding: 22px;
}
.warranty-box-title {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: 'Prompt', sans-serif;
  font-weight: 700;
  margin-bottom: 16px;
}
.warranty-box ul {
  padding-left: 1.15rem;
  color: var(--muted);
  margin-bottom: 18px;
}
.warranty-box li { margin-bottom: 10px; }
.warranty-box-positive {
  background: #f0fbf5;
  border: 1px solid #b9ecd3;
}
.warranty-box-positive .warranty-box-title,
.warranty-box-positive li::marker {
  color: #0c8a61;
}
.warranty-box-neutral {
  background: #fff8ed;
  border: 1px solid #f3d4a6;
}
.warranty-box-neutral .warranty-box-title,
.warranty-box-neutral li::marker {
  color: #b76d0b;
}

/* ---------- Social profile / portfolio ---------- */
.profile-section {
  background: #f0f2f5;
}
.social-profile {
  max-width: 1180px;
  overflow: visible;
  background: #fff;
  border: 1px solid #d8dde7;
  border-radius: 0 0 14px 14px;
  box-shadow: 0 2px 8px rgba(37, 52, 92, .06);
}
.social-cover {
  height: 360px;
  overflow: hidden;
  background: var(--brand-soft);
}
.social-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.social-profile-head {
  position: relative;
  display: flex;
  align-items: flex-end;
  gap: 18px;
  padding: 0 32px 20px;
  border-bottom: 1px solid var(--line);
}
.social-avatar {
  width: 168px;
  height: 168px;
  margin-top: -76px;
  border-radius: 50%;
  border: 5px solid #fff;
  background: #fff;
  box-shadow: var(--shadow-sm);
}
.social-profile-info { flex: 1; padding-top: 18px; }
.social-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  color: var(--muted);
  font-size: .9rem;
}
.social-meta i { color: var(--brand); margin-right: 4px; }
.social-profile-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.social-contact-btn { margin-bottom: 6px; white-space: nowrap; }
.social-tabs {
  display: flex;
  gap: 18px;
  padding: 0 32px;
  border-bottom: 1px solid var(--line);
}
.social-tabs a {
  position: relative;
  display: inline-flex;
  padding: 16px 0;
  color: var(--muted);
  font-weight: 700;
}
.social-tabs a.active,
.social-tabs a:hover { color: var(--brand); }
.social-tabs a.active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 3px;
  border-radius: 99px 99px 0 0;
  background: var(--brand);
}
.category-switch {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  padding: 16px 32px;
  border-bottom: 1px solid var(--line);
  background: #fff;
}
@media (max-width: 768px) {
  .category-switch {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 576px) {
  .category-switch {
    grid-template-columns: 1fr;
  }
  .category-switch a {
    font-size: 0.92rem;
  }
}
.category-switch a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  border-radius: 12px;
  background: #f0f2f5;
  color: #333;
  font-weight: 800;
}
.category-switch a:hover,
.category-switch a.active {
  background: var(--brand);
  color: #fff;
}
:root {
  --profile-max: 1180px;
  --feed-rail-width: 132px;
  --feed-rail-gap: 16px;
}
.fb-page-content {
  display: block;
  padding: 14px 16px 18px;
  background: #f0f2f5;
}
.portfolio-feed-shell {
  display: block;
  max-width: none;
  margin: 0;
}
.portfolio-feed-main {
  width: 100%;
}
#feed-scroll-rail-wrap {
  width: var(--feed-rail-width);
  background: transparent;
}
#feed-scroll-rail-wrap.portfolio-feed-rail-dock {
  position: fixed;
  top: var(--feed-rail-top, 320px);
  width: var(--feed-rail-width);
  height: var(--feed-rail-height, min(72vh, calc(100vh - 120px)));
  transform: translateX(8px);
  z-index: 1040;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .28s ease, visibility .28s ease, transform .28s ease;
}
#feed-scroll-rail-wrap.portfolio-feed-rail-dock.is-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(0);
}
#feed-scroll-rail-wrap.portfolio-feed-rail-dock:empty {
  display: none;
}
@media (min-width: 992px) {
  .fb-page-content {
    padding-right: calc(var(--feed-rail-width) + var(--feed-rail-gap) + 16px);
  }
  #feed-scroll-rail-wrap.portfolio-feed-rail-dock {
    right: calc((100vw - min(var(--profile-max), 100vw)) / 2 + 16px);
  }
}
@media (max-width: 991.98px) {
  :root {
    --feed-rail-width: 68px;
    --feed-rail-gap: 0px;
  }
  .fb-page-content {
    padding-left: 0;
    padding-right: 0;
  }
  #feed-scroll-rail-wrap.portfolio-feed-rail-dock,
  #feed-scroll-rail-wrap.portfolio-feed-rail-dock.is-visible {
    right: 2px;
    height: var(--feed-rail-height, min(50vh, calc(100vh - 190px)));
    z-index: 1050;
    pointer-events: none;
  }
  #feed-scroll-rail-wrap.portfolio-feed-rail-dock .feed-scroll-rail,
  #feed-scroll-rail-wrap.portfolio-feed-rail-dock .feed-scroll-track,
  #feed-scroll-rail-wrap.portfolio-feed-rail-dock .feed-scroll-preview {
    pointer-events: auto;
  }
  .feed-scroll-viewport {
    min-height: 180px;
  }
  .feed-scroll-track {
    padding-left: 12px;
    gap: 6px;
  }
  .feed-scroll-track::before {
    left: 3px;
    width: 2px;
  }
  .feed-scroll-index {
    right: 3px;
    bottom: 3px;
    min-width: 16px;
    padding: 1px 4px;
    font-size: .56rem;
  }
}
.feed-scroll-rail {
  display: block;
  width: 100%;
  height: 100%;
  background: transparent;
}
.feed-scroll-viewport {
  position: relative;
  height: 100%;
  min-height: 280px;
  overflow: hidden;
}
.feed-scroll-track {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
  height: 100%;
  padding-left: 18px;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  scrollbar-width: none;
  cursor: grab;
  background: transparent;
  scroll-behavior: smooth;
}
.feed-scroll-track.is-dragging {
  cursor: grabbing;
  user-select: none;
  scroll-behavior: auto;
}
.feed-scroll-track::-webkit-scrollbar {
  display: none;
}
.feed-scroll-track::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 5px;
  width: 3px;
  border-radius: 99px;
  background: #c5cedd;
  pointer-events: none;
}
.feed-scroll-preview {
  position: relative;
  z-index: 1;
  flex: 0 0 auto;
  width: 100%;
  aspect-ratio: 1 / 1;
  padding: 0;
  border: 0;
  border-radius: 10px;
  overflow: hidden;
  background: transparent;
  opacity: .38;
  filter: saturate(.75) brightness(.82);
  transition: opacity .25s ease, filter .25s ease;
}
.feed-scroll-preview:hover {
  opacity: .62;
  filter: saturate(.9) brightness(.92);
}
.feed-scroll-preview.is-active {
  opacity: 1;
  filter: saturate(1.05) brightness(1.08);
}
.feed-scroll-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  display: block;
  border-radius: 10px;
  pointer-events: none;
}
.feed-scroll-index {
  position: absolute;
  right: 5px;
  bottom: 5px;
  min-width: 20px;
  padding: 2px 6px;
  border-radius: 999px;
  background: rgba(15, 23, 42, .72);
  color: #fff;
  font-family: 'Prompt', sans-serif;
  font-size: .65rem;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  pointer-events: none;
  z-index: 2;
}
.feed-scroll-preview.is-active .feed-scroll-index {
  background: rgba(15, 23, 42, .82);
}
.social-post.is-spy-active {
  border-color: rgba(74, 108, 247, .28);
  box-shadow:
    0 8px 28px rgba(74, 108, 247, .12),
    0 1px 5px rgba(37, 52, 92, .05);
}
.fb-sidebar {
  position: sticky;
  top: 86px;
  display: grid;
  gap: 16px;
}
.fb-card {
  padding: 18px;
  background: #fff;
  border: 1px solid #dfe3ec;
  border-radius: 12px;
  box-shadow: 0 1px 5px rgba(37, 52, 92, .05);
}
.fb-card h3 {
  font-family: 'Prompt', sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 10px;
}
.fb-card p {
  color: var(--muted);
  margin-bottom: 14px;
}
.fb-info-list {
  list-style: none;
  padding: 0;
  margin: 0;
  color: var(--ink);
}
.fb-info-list li {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin-bottom: 12px;
}
.fb-info-list i {
  color: #65676b;
  margin-top: 3px;
}
.fb-card-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-bottom: 12px;
}
.fb-card-head h3 { margin-bottom: 0; }
.fb-card-head span {
  color: var(--muted);
  font-size: .88rem;
}
.fb-photo-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}
.fb-photo-grid a {
  display: block;
  overflow: hidden;
  aspect-ratio: 1 / 1;
  border-radius: 8px;
  background: #f0f2f5;
}
.fb-photo-grid img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.fb-feed-column {
  min-width: 0;
}
.fb-feed-column-full {
  max-width: 860px;
  width: 100%;
  margin: 0 auto;
}
.admin-mini-stat {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 0;
  border-top: 1px solid var(--line);
}
.admin-mini-stat:first-of-type { border-top: 0; }
.admin-mini-stat strong {
  color: var(--brand);
  font-family: 'Prompt', sans-serif;
  font-size: 1.2rem;
}
.admin-mini-stat span {
  color: var(--muted);
  font-size: .9rem;
}
.admin-login-card,
.admin-panel {
  width: 100%;
  margin: 16px 0 0;
  padding: 18px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 1px 5px rgba(37, 52, 92, .05);
}
.admin-panel-collapsible[hidden] {
  display: none !important;
}
.admin-inline-alert {
  margin-top: 16px;
  margin-bottom: 0;
}
.admin-online-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.admin-online-btn.is-active {
  border-color: #0c8a61;
  color: #0c8a61;
  background: #e8f8f0;
}
.online-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #0c8a61;
  box-shadow: 0 0 0 3px rgba(12, 138, 97, .18);
  flex-shrink: 0;
}
.online-now-list {
  margin-bottom: 24px;
}
.admin-insights-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}
.admin-insights-note {
  margin: 0;
  color: var(--muted);
  font-size: .9rem;
}
.admin-panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}
.category-check-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fbfcff;
}
.category-check-group .form-check {
  margin-bottom: 0;
}
.admin-login-card {
  background: #fbfcff;
}
.admin-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}
.admin-stats div {
  padding: 16px;
  border-radius: 12px;
  background: #f0f2f5;
}
.admin-stats strong {
  display: block;
  font-family: 'Prompt', sans-serif;
  font-size: 1.5rem;
  line-height: 1.1;
  color: var(--brand);
}
.admin-stats span {
  color: var(--muted);
  font-size: .88rem;
}
.admin-stats .online-stat {
  background: #e8f8f0;
  border: 1px solid #b9ecd3;
}
.admin-stats .online-stat strong {
  color: #0c8a61;
}
.visitor-log-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-bottom: 14px;
}
.visitor-log-head h3 {
  font-family: 'Prompt', sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0;
}
.visitor-log-head span {
  color: var(--muted);
  font-size: .86rem;
}
.visitor-table-wrap {
  overflow-x: auto;
}
.visitor-table {
  width: 100%;
  min-width: 860px;
  border-collapse: collapse;
  font-size: .88rem;
}
.visitor-table th,
.visitor-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.visitor-table th {
  color: #4b5565;
  background: #f0f2f5;
  font-weight: 800;
  white-space: nowrap;
}
.visitor-table td {
  color: var(--ink);
}
.visitor-url {
  max-width: 240px;
  word-break: break-all;
  color: var(--muted) !important;
}
.admin-post-form .form-control {
  border-color: #d8dde7;
  border-radius: 12px;
  padding: 11px 13px;
}
.admin-post-form .form-select {
  border-color: #d8dde7;
  border-radius: 12px;
  padding: 11px 13px;
}
.admin-post-form .form-control:focus {
  border-color: rgba(74, 108, 247, .55);
  box-shadow: 0 0 0 .2rem rgba(74, 108, 247, .12);
}
.admin-post-form .form-select:focus {
  border-color: rgba(74, 108, 247, .55);
  box-shadow: 0 0 0 .2rem rgba(74, 108, 247, .12);
}
.image-preview {
  margin-top: 12px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #f8fafc;
}
.image-preview img {
  display: block;
  width: 100%;
  max-height: 360px;
  object-fit: contain;
  background: #eef2ff;
}
.image-preview-remove {
  width: 100%;
  border: 0;
  border-top: 1px solid var(--line);
  padding: 10px 12px;
  color: #b42318;
  background: #fff;
  font-weight: 700;
}
.image-preview-remove:hover {
  background: #fff4f2;
}
.upload-dropzone {
  position: relative;
  width: 100%;
  padding: 0;
  border: 2px dashed #b8c4da;
  border-radius: 18px;
  background: linear-gradient(180deg, #fbfcff 0%, #f4f7ff 100%);
  transition: border-color .2s ease, background .2s ease, box-shadow .2s ease;
  overflow: hidden;
}
.upload-dropzone input[type="file"] {
  display: none !important;
}
.upload-dropzone.is-dragover {
  border-color: var(--brand);
  background: #eef3ff;
  box-shadow: 0 0 0 4px rgba(74, 108, 247, .12);
}
.upload-dropzone.has-files .upload-dropzone-body {
  min-height: 110px;
  padding: 20px 24px;
}
.upload-dropzone-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 6px;
  min-height: 180px;
  padding: 28px 24px;
  cursor: pointer;
  margin-bottom: 0;
  user-select: none;
}
.upload-dropzone-body:focus {
  outline: none;
  box-shadow: inset 0 0 0 2px rgba(74, 108, 247, .35);
}
.upload-dropzone-icon {
  width: 64px;
  height: 64px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #fff;
  color: var(--brand);
  font-size: 1.8rem;
  box-shadow: 0 8px 24px rgba(74, 108, 247, .12);
}
.upload-dropzone-title {
  margin: 10px 0 0;
  font-family: 'Prompt', sans-serif;
  font-weight: 700;
  color: #1f2937;
}
.upload-dropzone-sub {
  margin: 0;
  max-width: 520px;
  color: var(--muted);
  font-size: .92rem;
}
.upload-dropzone-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 12px;
  padding: 0 18px 18px;
}
.upload-preview-item {
  position: relative;
  overflow: hidden;
  aspect-ratio: 1 / 1;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #fff;
}
.upload-preview-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.upload-preview-remove {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 50%;
  background: rgba(15, 23, 42, .72);
  color: #fff;
  line-height: 1;
  font-size: 1rem;
}
.upload-preview-remove:hover {
  background: #b42318;
}
.upload-preview-badge {
  position: absolute;
  left: 8px;
  bottom: 8px;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(15, 23, 42, .72);
  color: #fff;
  font-size: .72rem;
  font-weight: 700;
}
.upload-dropzone-single .upload-dropzone-grid {
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  max-width: 360px;
}
.edit-panel {
  border-color: rgba(74, 108, 247, .24);
  background: #fbfcff;
}
.social-feed {
  padding: 0 0 8px;
}
.empty-feed-card {
  padding: 28px;
  margin-bottom: 16px;
  text-align: center;
  color: var(--muted);
  background: #fff;
  border: 1px dashed #cfd6e3;
  border-radius: 12px;
}
.social-post {
  margin: 0 0 16px;
  max-width: none;
  padding: 14px 14px 0;
  background: #fff;
  border: 1px solid #dfe3ec;
  border-radius: 12px;
  box-shadow: 0 1px 5px rgba(37, 52, 92, .05);
  overflow: hidden;
}
.social-post-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}
.social-post-head img {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--brand-soft);
}
.social-post-head span {
  color: var(--muted);
  font-size: .86rem;
}
.post-admin-actions {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}
.post-edit-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 7px 10px;
  border-radius: 8px;
  color: var(--brand);
  font-weight: 700;
  font-size: .88rem;
}
.post-edit-link:hover {
  background: var(--brand-soft);
  color: var(--brand-dark);
}
.post-delete-form {
  margin: 0;
}
.post-delete-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 7px 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #b42318;
  font-weight: 700;
  font-size: .88rem;
}
.post-delete-link:hover {
  background: #fff4f2;
  color: #912018;
}
.social-post-title {
  font-family: 'Prompt', sans-serif;
  font-weight: 700;
  margin-bottom: 6px;
}
.social-post-image {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  overflow: hidden;
  margin: 0 -14px;
  width: calc(100% + 28px);
  border: 0;
  border-top: 1px solid var(--line);
  border-radius: 0;
  background: #0f172a;
  cursor: zoom-in;
  line-height: 0;
}
.social-post-image img {
  width: 100%;
  max-width: 100%;
  height: auto;
  display: block;
  object-fit: contain;
  object-position: top center;
}
/* สกรีนจอมือถือ (แนวตั้ง) — จำกัดความสูงบนจอคอมเท่านั้น */
@media (min-width: 768px) {
  .social-post-image.is-portrait img {
    max-height: min(62vh, 580px);
  }
}
.social-post-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-around;
  gap: 8px 14px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: .9rem;
}
.social-post-actions span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 6px 10px;
  border-radius: 8px;
  font-weight: 700;
}
.social-post-actions span:hover {
  background: #f0f2f5;
}
.social-post-actions i { color: #65676b; margin-right: 6px; }
.admin-only-stat {
  color: #0c8a61;
  font-weight: 700;
}

/* ---------- Image lightbox ---------- */
body.lightbox-open {
  overflow: hidden;
}
.image-lightbox {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 32px;
  background: rgba(0, 0, 0, .86);
}
.image-lightbox.show {
  display: flex;
}
.image-lightbox img {
  max-width: min(1180px, 96vw);
  max-height: 86vh;
  object-fit: contain;
  border-radius: 10px;
  background: #111;
}
.lightbox-close {
  position: absolute;
  top: 18px;
  right: 22px;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 999px;
  color: #fff;
  background: rgba(255,255,255,.16);
  font-size: 2rem;
  line-height: 1;
}
.lightbox-close:hover {
  background: rgba(255,255,255,.28);
}
.lightbox-caption {
  position: absolute;
  left: 24px;
  right: 24px;
  bottom: 18px;
  color: #fff;
  text-align: center;
  font-weight: 700;
}

/* ---------- Feature list ---------- */
.check-list { list-style: none; padding: 0; margin: 0; }
.check-list li { display: flex; gap: 10px; align-items: flex-start; margin-bottom: 12px; color: var(--muted); }
.check-list li .ic { color: var(--accent); flex: 0 0 auto; margin-top: 4px; }

/* ---------- Process ---------- */
.step { display: flex; gap: 16px; align-items: flex-start; }
.step-num {
  flex: 0 0 auto; width: 44px; height: 44px; border-radius: 12px;
  background: var(--brand); color: #fff; font-family: 'Prompt', sans-serif; font-weight: 700;
  display: flex; align-items: center; justify-content: center; font-size: 1.1rem;
}

/* ---------- Packages ---------- */
.pkg { position: relative; }
.pkg.popular { border-color: var(--brand); box-shadow: var(--shadow-md); }
.pkg-tag {
  position: absolute; top: -13px; left: 50%; transform: translateX(-50%);
  background: var(--brand); color: #fff; font-size: .78rem; font-weight: 600;
  padding: 5px 16px; border-radius: 999px;
}
.pkg .price { font-family: 'Prompt', sans-serif; font-weight: 700; font-size: 1.35rem; color: var(--ink); }

/* ---------- FAQ ---------- */
.accordion-button { font-family: 'Prompt', sans-serif; font-weight: 600; color: var(--ink); }
.accordion-button:not(.collapsed) { background: var(--brand-soft); color: var(--brand); box-shadow: none; }
.accordion-button:focus { box-shadow: none; border-color: var(--line); }
.accordion-item { border-color: var(--line); border-radius: 12px !important; margin-bottom: 12px; overflow: hidden; }

/* ---------- Final CTA ---------- */
.cta-band {
  background: radial-gradient(720px 360px at 12% 8%, rgba(16,185,129,.22), transparent 55%),
              radial-gradient(720px 360px at 90% 110%, rgba(74,108,247,.32), transparent 55%),
              linear-gradient(160deg, #263a8f, #1e2c66);
  color: #fff; border-radius: 24px; padding: 54px 40px;
}

/* ---------- Footer ---------- */
.footer { background: #1a244f; color: rgba(255,255,255,.72); padding: 56px 0 28px; }
.footer a { color: rgba(255,255,255,.72); }
.footer a:hover { color: #fff; }
.footer h5 { color: #fff; font-family: 'Prompt', sans-serif; font-size: 1rem; margin-bottom: 16px; }
.footer .brand { font-family: 'Prompt', sans-serif; font-weight: 700; color: #fff; font-size: 1.3rem; }

/* ---------- Sticky mobile CTA ---------- */
.mobile-cta {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 1030;
  display: none; gap: 10px; padding: 10px 12px;
  background: rgba(255,255,255,.97); border-top: 1px solid var(--line);
  box-shadow: 0 -6px 20px rgba(16,20,38,.08);
}
.mobile-cta .btn { flex: 1; padding: 12px 8px; font-size: .95rem; }
@media (max-width: 767.98px) {
  .mobile-cta { display: flex; }
  body { padding-bottom: 76px; }
  .section { padding: 52px 0; }
  .hero { padding: 72px 0 60px; }
  .warranty-panel { padding: 22px; }
  .warranty-summary { padding: 16px 18px; }
  .profile-section .container { padding-left: 0; padding-right: 0; }
  .social-profile {
    border-left: 0;
    border-right: 0;
    border-radius: 0;
  }
  .social-cover { height: 190px; }
  .social-profile-head {
    align-items: flex-start;
    flex-direction: column;
    padding: 0 18px 20px;
  }
  .social-avatar {
    width: 112px;
    height: 112px;
    margin-top: -48px;
  }
  .social-profile-actions {
    flex-direction: row;
    width: 100%;
  }
  .social-contact-btn { width: 100%; }
  .social-tabs { padding: 0 18px; overflow-x: auto; }
  .category-switch {
    grid-template-columns: 1fr;
    padding: 12px;
  }
  .portfolio-feed-shell {
    max-width: none;
  }
  .fb-page-content {
    padding-top: 8px;
    padding-bottom: 12px;
  }
  .social-feed {
    padding: 0;
  }
  .social-post {
    margin: 0 0 10px;
    padding: 12px 0 0;
    border-left: 0;
    border-right: 0;
    border-radius: 0;
    box-shadow: none;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
  }
  .social-post-head,
  .social-post-title,
  .social-post .text-muted {
    padding-left: 12px;
    padding-right: 12px;
  }
  .social-post-image {
    margin: 0;
    width: 100vw;
    max-width: 100vw;
    margin-left: calc(50% - 50vw);
    border-top: 0;
  }
  .social-post-image img {
    width: 100%;
    max-width: 100%;
    max-height: none;
    height: auto;
  }
  .social-post-actions {
    justify-content: space-between;
  }
  .image-lightbox {
    padding: 12px;
  }
  .lightbox-caption {
    bottom: 12px;
    font-size: .9rem;
  }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto; }
  .card-soft { transition: none; }
  .feed-scroll-track { scroll-behavior: auto; }
}

.admin-stats-page {
  background: #f0f2f5;
}
.admin-stats-container {
  max-width: 1280px;
}
.admin-stats-main {
  padding-top: 28px;
  padding-bottom: 48px;
}
.admin-stats-head {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: flex-start;
  flex-wrap: wrap;
  margin-bottom: 24px;
}
.admin-stats-head-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
}
.admin-stats-updated {
  color: var(--muted);
  font-size: .88rem;
}
.admin-stats-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 20px;
}
.admin-stat-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.admin-stat-card span {
  color: var(--muted);
  font-size: .88rem;
}
.admin-stat-card strong {
  font-family: 'Prompt', sans-serif;
  font-size: 1.65rem;
  line-height: 1.1;
  color: var(--ink);
}
.admin-stat-card.is-online strong {
  color: #0c8a61;
}
.visitor-table-detailed {
  min-width: 1400px;
}
.visitor-activity {
  max-width: 320px;
}
.visit-status {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: .78rem;
  font-weight: 700;
  white-space: nowrap;
}
.visit-status-online {
  background: rgba(12, 138, 97, .12);
  color: #0c8a61;
}
.visit-status-offline {
  background: #eef1f6;
  color: #667085;
}
.online-now-list,
.visitor-log {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 18px 20px;
  margin-bottom: 18px;
}
@media (max-width: 991px) {
  .admin-stats-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 575px) {
  .admin-stats-summary {
    grid-template-columns: 1fr;
  }
  .admin-stats-head-actions {
    align-items: stretch;
    width: 100%;
  }
}
