:root {
  --bg0: #040a1f;
  --bg1: #0a1c49;
  --bg2: #102f74;
  --gold: #d1ae67;
  --gold-soft: #f2e0b6;
  --text: #edf3ff;
  --muted: #b9c8ec;
  --line: rgba(218, 187, 119, 0.3);
  --panel: rgba(6, 20, 56, 0.72);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  color: var(--text);
  font-family: "Prompt", sans-serif;
  background:
    radial-gradient(circle at 8% 0%, rgba(209, 174, 103, 0.18), transparent 28%),
    radial-gradient(circle at 92% 10%, rgba(58, 110, 229, 0.2), transparent 30%),
    linear-gradient(180deg, var(--bg1), var(--bg0));
}

h1, h2, h3, h4 { font-family: "Cormorant Garamond", serif; margin: 0; }

.container { width: min(1140px, 92vw); margin: 0 auto; }
.section { padding: 2.8rem 0; }

.glass {
  background: var(--panel);
  backdrop-filter: blur(8px);
  border: 1px solid var(--line);
  border-radius: 20px;
}

.hero {
  position: relative;
  min-height: auto;
  border-bottom: 1px solid var(--line);
  background: #06102a;
}

.hero::before,
.hero::after { content: none; }

.nav { display: flex; justify-content: space-between; align-items: center; padding: 1.15rem 0; margin-top: 0; }
.nav.glass {
  background: transparent;
  border: 0;
  border-radius: 0;
  backdrop-filter: none;
}
.brand { display: flex; align-items: center; gap: 0.8rem; }
.brand-logo-link { display: inline-flex; border-radius: 50%; text-decoration: none; }
.brand-logo { width: 50px; height: 50px; border-radius: 50%; object-fit: cover; border: 1px solid var(--gold); box-shadow: 0 10px 30px rgba(0, 0, 0, 0.22); }
.brand-title { color: var(--gold-soft); font-size: 1.18rem; }
.brand-sub { margin: 0; color: #d2deff; font-size: 0.84rem; }

.nav-links { display: flex; gap: 1rem; flex-wrap: wrap; }
.nav-links a { text-decoration: none; color: #dce7ff; font-size: 0.9rem; opacity: 0.9; }

.hero-cover {
  min-height: clamp(210px, 38vw, 430px);
  background: url("assets/cover.jpg") center / cover no-repeat;
}

.hero-content { padding: 2.25rem 0 2.7rem; max-width: 650px; }
.eyebrow { margin: 0; color: var(--gold-soft); letter-spacing: 0; text-transform: none; font-size: 0.95rem; font-weight: 500; }
h1 { font-size: clamp(2rem, 3.2vw, 3rem); line-height: 1.18; max-width: 620px; margin-top: 0.45rem; text-wrap: balance; }
.lead { max-width: 740px; color: #d5e0ff; line-height: 1.85; }

.hero-cta { display: flex; gap: 0.75rem; flex-wrap: wrap; margin-top: 1.15rem; }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 1px solid transparent;
  padding: 0.66rem 1.1rem;
  text-decoration: none;
  font-weight: 600;
  cursor: pointer;
}
.btn-gold { background: linear-gradient(135deg, #f4e4ba, #ba8e40); color: #1d1d1d; }
.btn-outline { border-color: var(--gold); color: var(--gold-soft); background: rgba(7, 18, 43, 0.55); }

.search-wrap { margin-top: 1.2rem; }
.search-card { padding: 1rem; display: grid; grid-template-columns: repeat(6, 1fr); gap: 0.7rem; }
.field { display: flex; flex-direction: column; gap: 0.3rem; }
label { font-size: 0.86rem; color: #c6d6ff; }

select, input, textarea {
  border-radius: 12px;
  border: 1px solid rgba(223, 193, 126, 0.3);
  padding: 0.64rem;
  background: rgba(5, 14, 36, 0.84);
  color: var(--text);
  font-family: "Prompt", sans-serif;
}
input::placeholder, textarea::placeholder { color: #90a8da; }
textarea { resize: vertical; }

.search-btn { align-self: end; min-height: 44px; }

.section-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 0.7rem; margin-bottom: 1rem; }
.section-head p { margin: 0; color: var(--muted); }
.section-actions { display: flex; align-items: center; gap: 0.7rem; flex-wrap: wrap; justify-content: flex-end; }
.compact-btn { padding: 0.48rem 0.85rem; font-size: 0.84rem; }

.listing-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.card { border-radius: 18px; overflow: hidden; background: rgba(8, 22, 56, 0.8); border: 1px solid rgba(219, 189, 124, 0.24); }
.thumb {
  position: relative;
  aspect-ratio: 1 / 1;
  background: linear-gradient(220deg, rgba(209, 174, 103, 0.3), rgba(17, 48, 112, 0.9));
}
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb-shade {
  position: absolute;
  inset: auto 0 0;
  height: 42%;
  background: linear-gradient(180deg, transparent, rgba(2, 7, 23, 0.58));
  pointer-events: none;
}
.purpose-chip {
  position: absolute;
  right: 10px;
  bottom: 10px;
  border: 1px solid rgba(242, 224, 182, 0.64);
  border-radius: 999px;
  background: rgba(4, 12, 34, 0.72);
  color: #fff0c7;
  padding: 0.24rem 0.58rem;
  font-size: 0.78rem;
  font-weight: 700;
  backdrop-filter: blur(10px);
}
.pinned-chip {
  position: absolute;
  right: 10px;
  top: 10px;
  border: 1px solid rgba(255, 235, 180, 0.78);
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(244, 228, 186, 0.95), rgba(186, 142, 64, 0.92));
  color: #1d1a12;
  padding: 0.24rem 0.62rem;
  font-size: 0.76rem;
  font-weight: 800;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.24);
}
.card-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background: rgba(5, 14, 34, 0.82);
  border: 1px solid rgba(242, 224, 182, 0.6);
  color: var(--gold-soft);
  padding: 0.24rem 0.55rem;
  border-radius: 999px;
  font-size: 0.8rem;
}
.card-content { padding: 1rem; }
.card-kicker { color: #bfcdf2; font-size: 0.82rem; margin-bottom: 0.28rem; }
.meta { margin: 0.24rem 0; color: #bfd0f7; font-size: 0.9rem; }
.price { margin: 0.45rem 0 0.75rem; color: var(--gold-soft); font-weight: 700; }
.spec-row { display: flex; flex-wrap: wrap; gap: 0.35rem; margin: 0 0 0.8rem; }
.spec-row span {
  border: 1px solid rgba(218, 187, 119, 0.22);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  color: #d7e3ff;
  padding: 0.24rem 0.5rem;
  font-size: 0.76rem;
}
.detail-btn { width: 100%; }
.card-actions { display: grid; grid-template-columns: 1fr auto; gap: 0.5rem; align-items: center; }
.share-btn { padding-inline: 0.9rem; }

.services { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.service-card {
  position: relative;
  overflow: hidden;
  padding: 1.35rem;
  min-height: 178px;
  border: 1px solid rgba(242, 224, 182, 0.24);
  border-radius: 22px;
  background:
    radial-gradient(circle at 88% 12%, rgba(242, 224, 182, 0.2), transparent 30%),
    linear-gradient(145deg, rgba(15, 37, 88, 0.94), rgba(4, 12, 36, 0.98));
  box-shadow:
    0 22px 52px rgba(0, 0, 0, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
}
.service-card::before {
  content: "";
  position: absolute;
  inset: auto 1.2rem 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--gold-soft), var(--gold), transparent);
  opacity: 0.78;
}
.service-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 54px;
  height: 34px;
  margin-bottom: 0.85rem;
  padding: 0 0.72rem;
  background: linear-gradient(135deg, rgba(244, 228, 186, 0.95), rgba(186, 142, 64, 0.86));
  border: 1px solid rgba(242, 224, 182, 0.5);
  border-radius: 999px;
  color: #17140e;
  font-weight: 800;
  font-size: 0.84rem;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.22);
}
.service-card h3 { font-family: "Prompt", sans-serif; font-size: 1.12rem; letter-spacing: -0.01em; }
.service-card p { color: #d5e0ff; margin: 0.45rem 0 0; line-height: 1.72; font-size: 0.93rem; }
.service-intro { padding-bottom: 1rem; }
.service-intro h1 { max-width: 760px; margin-top: 0.35rem; }
.service-page-grid { padding-top: 1rem; }
.service-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.35rem;
  margin-bottom: 2.2rem;
}
.service-cta h2 {
  font-family: "Prompt", sans-serif;
  font-size: 1.35rem;
  margin: 0 0 0.35rem;
}
.service-cta p { margin: 0; color: #d5e0ff; line-height: 1.7; }

.partner-section { display: grid; grid-template-columns: 0.95fr 1.3fr; gap: 1rem; }
.partner-intro, .partner-form { padding: 1.2rem; }
.partner-intro p, .partner-intro ul { color: #d1ddff; line-height: 1.8; }
.partner-intro ul { padding-left: 1.1rem; margin: 0.4rem 0 0; }
.partner-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.8rem; }
.field-wide { grid-column: 1 / -1; }
.partner-message { margin: 0; color: var(--gold-soft); min-height: 1.2rem; }

.footer { border-top: 1px solid var(--line); margin-top: 1rem; }
.footer-wrap { display: flex; justify-content: space-between; gap: 1rem; padding: 1.4rem 0 2rem; color: #cfdbfd; }
.footer a { color: var(--gold-soft); text-decoration: none; }

.detail-modal {
  width: min(920px, 94vw);
  border: 1px solid var(--line);
  border-radius: 18px;
  color: var(--text);
  background: linear-gradient(180deg, rgba(11, 26, 66, 0.96), rgba(6, 16, 44, 0.96));
  padding: 1rem;
}
.detail-modal::backdrop { background: rgba(1, 6, 19, 0.72); }
.detail-head { display: flex; justify-content: space-between; align-items: center; gap: 0.7rem; }
.close-btn { border: 1px solid var(--line); background: transparent; color: #d4e0ff; border-radius: 999px; padding: 0.4rem 0.8rem; cursor: pointer; }
.detail-gallery { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.6rem; margin: 0.8rem 0; }
.detail-gallery img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 10px; }
.detail-loading {
  grid-column: 1 / -1;
  border: 1px solid rgba(242, 224, 182, 0.22);
  border-radius: 14px;
  color: #d7e3ff;
  padding: 1.2rem;
  text-align: center;
  background: rgba(255, 255, 255, 0.04);
}
.detail-specs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.4rem 1rem; }
.detail-specs p { margin: 0; color: #d6e3ff; }
.detail-desc { color: #cedbfd; line-height: 1.7; }
.detail-actions { margin-top: 0.8rem; }
.detail-actions { display: flex; gap: 0.6rem; flex-wrap: wrap; }

.hidden { display: none !important; }
.admin-login-card, .admin-panel, .admin-table-wrap { padding: 1.1rem; }
.admin-login-card { max-width: 520px; margin: 1rem auto; }
.admin-login-form { display: grid; gap: 0.8rem; }
.admin-dashboard { display: grid; gap: 1rem; }
.admin-actions { display: flex; gap: 0.6rem; flex-wrap: wrap; align-items: center; }
.admin-table-wrap { overflow-x: auto; }
.admin-table { width: 100%; min-width: 1080px; border-collapse: collapse; }
.admin-table th, .admin-table td { border-bottom: 1px solid rgba(218, 187, 119, 0.2); padding: 0.6rem; text-align: left; }
.row-actions { display: flex; gap: 0.45rem; flex-wrap: wrap; }
.action-btn { padding: 0.4rem 0.65rem; font-size: 0.84rem; }
.action-btn.is-disabled { opacity: 0.45; }
.action-btn.pin-active { background: linear-gradient(135deg, #f4e4ba, #ba8e40); color: #15130f; border-color: transparent; }
.order-actions { display: flex; align-items: center; gap: 0.35rem; flex-wrap: wrap; }
.order-number { min-width: 1.6rem; color: var(--gold-soft); font-weight: 700; }
.field-hint { margin: 0; font-size: 0.8rem; color: #a8bee9; }
.image-preview-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0.5rem; }
.preview-item { border-radius: 10px; overflow: hidden; border: 1px solid rgba(218, 187, 119, 0.28); aspect-ratio: 4 / 3; }
.preview-item img { width: 100%; height: 100%; object-fit: cover; }

.skeleton-card { pointer-events: none; }
.skeleton-box,
.skeleton-line {
  position: relative;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.075);
}
.skeleton-box::after,
.skeleton-line::after {
  content: "";
  position: absolute;
  inset: 0;
  transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, rgba(242, 224, 182, 0.16), transparent);
  animation: shimmer 1.35s infinite;
}
.skeleton-line {
  height: 12px;
  border-radius: 999px;
  margin-bottom: 0.7rem;
}
.skeleton-line.short { width: 42%; }
.skeleton-line.title { width: 86%; height: 18px; }
.skeleton-line.price-line { width: 36%; height: 18px; }
.skeleton-line.button-line { width: 100%; height: 42px; margin: 0; }

@keyframes shimmer {
  100% { transform: translateX(100%); }
}

@media (max-width: 1080px) {
  .search-card { grid-template-columns: repeat(2, 1fr); }
  .listing-grid, .services, .partner-section { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .image-preview-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
  html { scroll-padding-top: 12px; }
  body {
    background:
      radial-gradient(circle at 50% -12%, rgba(242, 224, 182, 0.18), transparent 34%),
      linear-gradient(180deg, #071743 0%, #030817 72%);
  }
  .container { width: min(91vw, 430px); }
  .section { padding: 2.05rem 0; }
  .nav {
    width: min(91vw, 430px);
    display: grid;
    grid-template-columns: 1fr;
    align-items: center;
    gap: 0.8rem;
    padding: 0.9rem 0 0.7rem;
  }
  .brand {
    width: 100%;
    justify-content: center;
    gap: 0.7rem;
    padding: 0.75rem 0.9rem;
    border: 1px solid rgba(242, 224, 182, 0.2);
    border-radius: 22px;
    background:
      radial-gradient(circle at 18% 20%, rgba(242, 224, 182, 0.14), transparent 30%),
      linear-gradient(135deg, rgba(8, 23, 61, 0.82), rgba(3, 10, 30, 0.64));
    box-shadow: 0 16px 38px rgba(0, 0, 0, 0.24);
  }
  .brand-logo { width: 48px; height: 48px; }
  .brand-title { font-size: 1.08rem; line-height: 1.08; letter-spacing: -0.01em; }
  .brand-sub { font-size: 0.7rem; line-height: 1.45; max-width: 180px; }
  .nav-links {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.55rem;
    overflow: visible;
    padding: 0;
  }
  .nav-links::-webkit-scrollbar { display: none; }
  .nav-links a[href="admin.html"] { display: none; }
  .nav-links a {
    min-width: 0;
    padding: 0.62rem 0.72rem;
    border: 1px solid rgba(242, 224, 182, 0.3);
    border-radius: 999px;
    background:
      linear-gradient(180deg, rgba(8, 21, 56, 0.74), rgba(3, 10, 28, 0.72));
    text-align: center;
    font-size: 0.78rem;
    font-weight: 600;
    color: #eaf1ff;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
  }
  .nav-links a[href="services.html"] {
    border-color: rgba(242, 224, 182, 0.52);
    color: #fff1c7;
  }
  .hero-cover {
    min-height: clamp(136px, 35vw, 176px);
    width: min(91vw, 430px);
    margin: 0.35rem auto 0.2rem;
    border: 1px solid rgba(242, 224, 182, 0.25);
    border-radius: 18px;
    background-size: cover;
    background-position: center;
    box-shadow: 0 18px 46px rgba(0, 0, 0, 0.3);
  }
  .search-wrap { margin-top: 0.8rem; }
  .services,
  .partner-section,
  .partner-form,
  .detail-specs,
  .detail-gallery {
    grid-template-columns: 1fr;
  }
  .search-card {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding: 0.78rem;
    gap: 0.58rem;
    border-radius: 20px;
    background:
      linear-gradient(180deg, rgba(11, 28, 76, 0.94), rgba(4, 12, 35, 0.96));
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.25);
  }
  .search-card .field:nth-child(5),
  .search-btn {
    grid-column: 1 / -1;
  }
  label {
    font-size: 0.72rem;
    color: #d9e4ff;
  }
  select,
  input,
  textarea {
    min-height: 44px;
    border-radius: 14px;
    font-size: 0.82rem;
    padding: 0.58rem 0.6rem;
  }
  .search-btn { min-height: 46px; margin-top: 0.08rem; }
  .section-head {
    align-items: flex-end;
    margin-bottom: 0.9rem;
  }
  .section-head h2 {
    font-family: "Prompt", sans-serif;
    font-size: 1.42rem;
    line-height: 1.2;
    letter-spacing: -0.03em;
  }
  .section-head p { font-size: 0.78rem; color: #d5def5; }
  .section-actions { justify-content: flex-end; gap: 0.4rem; }
  .compact-btn { padding: 0.42rem 0.7rem; font-size: 0.74rem; }
  .listing-grid {
    grid-template-columns: 1fr !important;
    gap: 0.95rem;
  }
  .property-card,
  .card {
    display: block !important;
    grid-template-columns: none !important;
    border-radius: 26px;
    background:
      radial-gradient(circle at 84% 10%, rgba(242, 224, 182, 0.14), transparent 30%),
      linear-gradient(180deg, rgba(13, 31, 78, 0.98), rgba(4, 12, 34, 1));
    border-color: rgba(242, 224, 182, 0.28);
    box-shadow:
      0 18px 50px rgba(0, 0, 0, 0.34),
      inset 0 1px 0 rgba(255, 255, 255, 0.04);
  }
  .property-thumb,
  .thumb {
    aspect-ratio: 1 / 1;
    min-height: 0 !important;
    width: 100%;
    border-bottom: 1px solid rgba(242, 224, 182, 0.16);
    background:
      radial-gradient(circle at 50% 35%, rgba(242, 224, 182, 0.14), transparent 40%),
      #061332;
  }
  .property-thumb img,
  .thumb img {
    width: 100% !important;
    height: 100% !important;
    object-fit: contain;
    object-position: center;
    padding: 0;
    background: #061332;
  }
  .card-content { padding: 0.95rem 1rem 1rem; }
  .card-kicker {
    color: #d4e0ff;
    font-size: 0.76rem;
    letter-spacing: 0.01em;
    margin-bottom: 0.3rem;
  }
  .card-content h3 {
    font-family: "Prompt", sans-serif;
    font-size: 1.12rem;
    line-height: 1.36;
    letter-spacing: -0.01em;
  }
  .meta { font-size: 0.8rem; color: #c6d7ff; }
  .price {
    display: inline-flex;
    align-items: center;
    margin: 0.5rem 0 0.65rem;
    padding: 0.32rem 0.68rem;
    border-radius: 999px;
    background: rgba(242, 224, 182, 0.1);
    border: 1px solid rgba(242, 224, 182, 0.2);
    font-size: 1.06rem;
    color: #ffe7ad;
  }
  .spec-row {
    gap: 0.35rem;
    margin-bottom: 0.85rem;
  }
  .spec-row span {
    padding: 0.26rem 0.55rem;
    background: rgba(255, 255, 255, 0.055);
    font-size: 0.72rem;
  }
  .detail-btn {
    min-height: 45px;
    padding: 0.62rem 0.9rem;
    font-size: 0.92rem;
    background: linear-gradient(135deg, rgba(250, 229, 181, 0.12), rgba(186, 142, 64, 0.1));
  }
  .card-actions { grid-template-columns: 1fr auto; }
  .share-btn {
    min-height: 45px;
    width: 52px;
    padding-inline: 0;
    font-size: 0;
  }
  .share-btn::before { content: "แชร์"; font-size: 0.78rem; }
  .card-badge {
    top: 12px;
    left: 12px;
    font-size: 0.74rem;
    padding: 0.28rem 0.62rem;
    backdrop-filter: blur(8px);
  }
  .purpose-chip {
    right: 12px;
    bottom: 12px;
    font-size: 0.78rem;
    padding: 0.28rem 0.68rem;
  }
  .thumb-shade { height: 50%; }
  .service-card {
    min-height: auto;
    padding: 1.1rem;
    border-radius: 22px;
  }
  .service-card::before {
    inset: auto 1.1rem 0;
  }
  .hero-content { padding: 1.7rem 0 2rem; }
  h1 { font-size: 2.05rem; max-width: 92vw; }
  .service-page-hero { padding-bottom: 0.3rem; }
  .service-intro {
    padding-top: 1.45rem;
    padding-bottom: 0.4rem;
  }
  .service-intro h1 {
    font-family: "Prompt", sans-serif;
    font-size: 1.8rem;
    line-height: 1.28;
    letter-spacing: -0.04em;
  }
  .service-intro .lead { font-size: 0.92rem; line-height: 1.8; }
  .service-page-grid { padding-top: 0.6rem; }
  .service-cta {
    flex-direction: column;
    align-items: stretch;
    padding: 1.1rem;
  }
  .service-cta h2 { font-size: 1.08rem; }
  .service-cta .btn { width: 100%; }
  .footer-wrap { flex-direction: column; }
  .admin-table { min-width: 760px; }
  .image-preview-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
