/* Thiện Tâm: a warmer, editorial storefront layered over the existing controls. */
:root {
  --ink: #17362f;
  --deep: #10352f;
  --deepest: #0a2723;
  --paper: #faf8f3;
  --cream: #f2eee5;
  --muted: #66766d;
  --line: #e3e0d7;
  --accent: #e5bd79;
  --rust: #a6583c;
  --radius: 24px;
  --shadow: 0 22px 56px #17362f14;
}

body { background: var(--paper); color: var(--ink); }
main { overflow: clip; }
.brand strong, .about-person h2, .seo-detail h1, .seo-detail h2,
.seo-fallback .intro h1, .seo-fallback .intro h1 em, .signin h1 {
  font-family: Cambria, 'Times New Roman', serif;
}
.wrap { max-width: 1320px; padding-inline: 32px; }
.header {
  min-height: 82px;
  padding: 14px max(32px, calc((100vw - 1256px) / 2));
  background: #faf8f3f5;
  border-bottom-color: #e9e5da;
  backdrop-filter: blur(16px);
}
.brand { gap: 12px; }
.brand .mark { width: 50px; height: 50px; }
.brand strong { font-size: 19px; letter-spacing: .09em; }
.brand small { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; }
.header nav { gap: 31px; }
.header nav > a:not(.manage-link) { transition: color .2s; }
.header nav > a:not(.manage-link):hover { color: var(--rust); }
.header-phone { color: var(--rust); font-weight: 750; }
.manage-link {
  color: var(--deep);
  background: transparent;
  border: 1px solid #b8c5b9;
  padding: 10px 18px;
  border-radius: 999px;
}
.manage-link:hover { background: var(--deep); color: white; }

/* The opening panel keeps the brand slogan in focus. */
.slogan-hero {
  position: relative;
  display: grid;
  grid-template-columns: 1fr;
  place-items: center;
  gap: 0;
  min-height: 230px;
  margin: 28px 0 0;
  padding: 44px 24px 58px;
  overflow: hidden;
  border-radius: 30px;
  background: radial-gradient(circle at 3% 0%, #345d4e 0, transparent 38%), linear-gradient(128deg, #123a32, #0c2c28 68%, #092621);
  text-align: center;
}
.slogan-hero::before {
  position: absolute;
  right: -95px;
  bottom: -400px;
  width: 520px;
  height: 520px;
  border: 1px solid #f4e6c028;
  border-radius: 50%;
  content: "";
  pointer-events: none;
}
.slogan-hero h1 {
  position: relative;
  margin: 0;
  color: var(--accent);
  font: italic 400 clamp(42px, 5.4vw, 76px)/1.18 Cambria, 'Times New Roman', serif;
  letter-spacing: -.012em;
}
/* Search and catalogue */
.search-box {
  position: relative;
  z-index: 2;
  margin: -27px 24px 0;
  padding: 24px 26px 21px;
  color: var(--ink);
  background: white;
  border: 1px solid #eee9de;
  border-radius: 20px;
  box-shadow: var(--shadow);
}
.search-box label { font-size: 17px; font-weight: 750; }
.search-row { grid-template-columns: 2fr 1fr 1fr; gap: 10px; margin-top: 12px; }
.search-box input, .search-box select {
  min-height: 52px;
  color: var(--ink);
  background: #f8f7f2;
  border: 1px solid #e5e5db;
  border-radius: 11px;
}
.search-box input:focus, .search-box select:focus { background: white; }
.search-hint { color: var(--muted); margin-top: 10px; }
.home-highlights { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin: 25px 24px 0; }
.home-highlights > div { display: grid; grid-template-columns: 42px 1fr; column-gap: 10px; padding: 13px 8px; align-items: center; }
.home-highlights > div + div { border-left: 1px solid var(--line); padding-left: 24px; }
.home-highlights span { grid-row: span 2; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; background: #e8eee7; color: var(--deep); font-size: 21px; }
.home-highlights strong { font-size: 13px; }
.home-highlights small { font-size: 12px; color: var(--muted); }
.listing-section { padding-top: 68px; padding-bottom: 78px; }
.section-heading { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; margin-bottom: 30px; }
.section-eyebrow { color: var(--rust); font-size: 11px; font-weight: 800; letter-spacing: .18em; text-transform: uppercase; }
.section-heading h2 { font: 400 clamp(32px, 3.2vw, 48px)/1.15 Cambria, 'Times New Roman', serif; letter-spacing: -.015em; margin: 8px 0; }
.section-heading p { margin: 0; color: var(--muted); }
.section-heading > a { color: var(--deep); font-size: 14px; font-weight: 750; text-decoration: underline; text-underline-offset: 5px; white-space: nowrap; }
.listing-toolbar { padding: 16px 0; border-top: 1px solid var(--line); margin-bottom: 0; }
.tabs { gap: 8px; }
.chip { background: #fff; color: var(--deep); border-color: #e5e4dc; font-weight: 700; }
.chip.active { background: var(--deep); border-color: var(--deep); }
.result-count { margin: 6px 0 18px; color: var(--muted); }
.sort select { background: #fff; border-radius: 9px; }
.listing-grid { gap: 20px; }
.listing-card {
  display: flex;
  flex-direction: column;
  background: white;
  border: 1px solid #eeeae0;
  border-radius: 22px;
  box-shadow: 0 5px 15px #123a3210;
  overflow: hidden;
  transition: transform .22s ease, box-shadow .22s ease;
}
.listing-card:hover { transform: translateY(-5px); box-shadow: 0 20px 42px #123a3222; }
.listing-photo { height: 258px; overflow: hidden; }
.listing-photo img { transition: transform .35s ease; }
.listing-card:hover .listing-photo img { transform: scale(1.035); }
.sold-stamp {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 3;
  display: grid;
  place-items: center;
  width: 154px;
  height: 154px;
  padding: 10px;
  border: 6px double #b42323;
  border-radius: 50%;
  background: #fff9f2ed;
  box-shadow: 0 0 0 4px #ffffffb8, 0 10px 26px #0005;
  color: #b42323;
  font: 900 27px/1.1 'Segoe UI', Arial, sans-serif;
  letter-spacing: .025em;
  text-align: center;
  white-space: nowrap;
  pointer-events: none;
  transform: translate(-50%, -50%) rotate(-12deg);
}
.sold-stamp::after { position: absolute; inset: 8px; border: 2px solid #b42323; border-radius: 50%; content: ""; }
.sold-date {
  position: absolute;
  top: calc(50% + 82px);
  left: 50%;
  z-index: 4;
  padding: 5px 12px;
  border: 2px solid #b42323;
  border-radius: 999px;
  background: #fff9f2;
  color: #a71919;
  font: 800 17px/1.2 'Segoe UI', Arial, sans-serif;
  white-space: nowrap;
  pointer-events: none;
  transform: translateX(-50%) rotate(-4deg);
}
.sold-date-field[hidden] { display: none; }
.badge { top: 16px; left: 16px; background: #fffaf0f2; color: var(--deep); border-radius: 100px; padding: 6px 12px; box-shadow: 0 3px 12px #0002; }
.badge.sold { background: var(--deep); }
.photo-count { right: 14px; bottom: 14px; background: #092823d9; border-radius: 999px; }
.listing-body { display: flex; flex-direction: column; flex: 1; padding: 22px 22px 18px; }
.listing-body h2, .seo-fallback .listing-body h3 {
  margin: 0;
  color: var(--deep);
  font: 750 20px/1.28 'Segoe UI', Arial, sans-serif;
  letter-spacing: -.012em;
}
.listing-body h2 a:hover, .listing-body h3 a:hover { color: var(--rust); }
.listing-updated { margin: 7px 0 0; color: var(--muted); font-size: 12px; }
.listing-facts {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-top: 19px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}
.listing-card .listing-price { display: grid; gap: 2px; min-width: 0; margin: 0; padding: 0; color: #b23824; font-size: 27px; line-height: 1.18; letter-spacing: -.02em; }
.listing-card .listing-price strong { font-weight: 800; }
.listing-card .listing-price.contact-price { color: var(--deep); font-size: 21px; }
.listing-card .listing-price small { color: var(--muted); font-size: 12px; font-weight: 500; letter-spacing: 0; }
.listing-area { display: grid; flex: none; gap: 2px; margin: 0; color: #096a82; text-align: right; line-height: 1.2; }
.listing-area strong { font-size: 19px; font-weight: 800; white-space: nowrap; }
.listing-area span { color: var(--muted); font-size: 11px; }
.listing-area.missing strong { max-width: 95px; color: var(--muted); font-size: 12px; font-weight: 650; white-space: normal; }
.listing-location { margin: 14px 0 8px; color: var(--ink); font-size: 13px; font-weight: 700; line-height: 1.45; }
.listing-excerpt {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  margin: 0 0 14px;
  color: #4e6259;
  font-size: 13px;
  line-height: 1.55;
}
.listing-meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; }
.listing-meta span { padding: 5px 9px; border-radius: 7px; background: #edf2ec; color: var(--deep); font-size: 11px; font-weight: 750; }
.listing-bottom { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); }
.listing-bottom > a:first-child { color: var(--deep); }
.listing-bottom > a:last-child { color: var(--rust); }
.listing-bottom .pending { text-align: right; }

/* Guidance and trust */
.local-guide.wrap {
  max-width: 1256px;
  margin-bottom: 70px;
  padding: 42px 52px;
  background: #ece1cf;
  border: 0;
  border-radius: 28px;
}
.local-guide h2 { max-width: 640px; font: 400 clamp(30px, 3vw, 42px)/1.13 Cambria, 'Times New Roman', serif; margin: 8px 0 16px; }
.local-guide p { max-width: 850px; color: #58675e; }
.local-guide a { display: inline-flex; gap: 8px; color: var(--deep); font-weight: 750; }
.about-section { position: relative; padding: 70px 0 76px; background: var(--deep); border-radius: 40px 40px 0 0; overflow: hidden; }
.about-section::after { content: ""; position: absolute; width: 450px; height: 450px; right: -170px; top: -290px; border: 1px solid #ffffff23; border-radius: 50%; pointer-events: none; }
.about-content { grid-template-columns: 1fr 1fr; gap: 90px; }
.about-person img { width: 92px; height: 92px; border: 3px solid var(--accent); }
.about-person h2 { font-size: 37px; }
.about-section .kicker { color: var(--accent); }
.about-section p { color: #d6e4d9; max-width: 540px; }
.about-section .button.gold { color: var(--deepest); border-color: var(--accent); background: var(--accent); }
.about-section .button.light { color: white; background: transparent; border-color: #ffffff50; }
.process-steps { gap: 10px; padding-top: 20px; }
.process-steps div { padding: 18px 15px; border: 1px solid #ffffff29; border-radius: 14px; color: #d7e4da; }
.process-steps b { color: var(--accent); }
footer { padding: 35px max(32px, calc((100vw - 1256px) / 2)); background: #0b2b26; color: white; }
footer .brand small, footer p { color: #b8cfc0; }
footer > a:last-child { color: var(--accent); font-weight: 650; }

/* Property detail */
.detail-page .breadcrumb { align-items: center; padding: 28px 0 22px; color: var(--muted); }
.detail-page .breadcrumb a { color: var(--deep); font-weight: 700; }
.detail-layout { grid-template-columns: minmax(0, 1fr) 340px; gap: 32px; }
.detail-cover { position: relative; height: 510px; border-radius: 22px; box-shadow: var(--shadow); }
.detail-cover img { object-position: center 50%; }
.detail-cover .sold-stamp, .seo-detail-cover .sold-stamp { width: 200px; height: 200px; border-width: 8px; font-size: 35px; }
.detail-cover .sold-date, .seo-detail-cover .sold-date { top: calc(50% + 108px); font-size: 19px; }
.seo-detail-cover { position: relative; margin: 20px 0; }
.seo-detail-cover .seo-detail-image { display: block; margin: 0; }
.detail-main h1 { font: 400 clamp(34px, 3.5vw, 49px)/1.13 Cambria, 'Times New Roman', serif; letter-spacing: -.015em; margin: 28px 0 12px; }
.detail-main h2 { font: 400 29px/1.2 Cambria, 'Times New Roman', serif; margin: 36px 0 18px; }
.detail-location { color: var(--muted); line-height: 1.7; }
.detail-main > .listing-price, .seo-detail > .listing-price { color: #b23824; font-size: 30px; font-weight: 800; }
.detail-main .spec-grid div:nth-child(2) dd, .seo-detail .spec-grid div:nth-child(2) dd { color: #096a82; font-size: 20px; font-weight: 800; }
.spec-grid { border-color: var(--line); background: white; border-radius: 18px; }
.spec-grid div { border-color: var(--line); }
.description { line-height: 1.8; }
.thumbs button { border-radius: 11px; }
.contact-card { top: 105px; padding: 28px; background: var(--deep); border: 0; border-radius: 22px; color: white; box-shadow: var(--shadow); }
.contact-card .note, .contact-card .agent small { color: #c7d9ce; }
.contact-card .listing-price { color: var(--accent); font: 400 39px/1.15 Cambria, 'Times New Roman', serif; margin: 14px 0; }
.contact-card hr { border-color: #ffffff29; }
.contact-card .agent { color: white; }
.contact-card .button { width: 100%; background: var(--accent); border-color: var(--accent); color: var(--deepest); }
.contact-card .button.light { color: white; background: transparent; border-color: #ffffff52; }
.contact-card .button.gold { background: #fff; border-color: #fff; }
.detail-mobile-actions { background: #fffdf9; border-top: 1px solid var(--line); }
.detail-mobile-actions .button.gold { color: var(--deepest); background: var(--accent); border-color: var(--accent); }

/* Management keeps its existing forms and uses the same visual language. */
.admin-page .admin-top h1, .admin-page .editor h1, .admin-page .signin h1 {
  color: var(--deep);
  font-family: Cambria, 'Times New Roman', serif;
  font-weight: 400;
  letter-spacing: -.015em;
}
.admin-page .admin-top { padding-top: 40px; }
.admin-page .admin-notice { border: 1px solid #eadfc6; background: #fbf3df; color: #584f37; }
.admin-page .admin-item { border-color: var(--line); box-shadow: 0 4px 12px #123a320b; }
.admin-page .admin-item .button:not(.light), .admin-page .admin-top > .button { background: var(--deep); border-color: var(--deep); }
.admin-page .admin-tools input { background: white; border-color: var(--line); }
.admin-page .editor-section { box-shadow: 0 4px 12px #123a320b; }

/* Static HTML stays present and styled while the catalogue script loads. */
.seo-fallback .slogan-hero { padding: 44px 24px 58px; margin-top: 28px; }
.seo-fallback .slogan-hero h1 { color: var(--accent); }
.seo-fallback .listing-section { padding-top: 55px; }
.seo-fallback .listing-section > h2 { font: 400 37px Cambria, 'Times New Roman', serif; }
.seo-fallback .listing-body { min-height: 180px; }
.seo-fallback .listing-body > .listing-updated { margin: 7px 0 0; font-weight: 400; }
.seo-fallback .listing-body > .listing-excerpt { margin: 0 0 14px; font-weight: 400; }
.seo-fallback .local-guide { margin-bottom: 40px; }

@media (max-width: 1100px) {
  .home-highlights small { line-height: 1.35; }
  .about-content { gap: 45px; }
}

@media (max-width: 700px) {
  .wrap { padding-inline: 16px; }
  .header { min-height: 67px; padding: 10px 16px; }
  .header .brand .mark { width: 42px; height: 42px; }
  .brand strong { font-size: 15px; }
  .brand small { font-size: 10px; letter-spacing: .05em; }
  .header nav > a:first-child, .header-phone { display: none; }
  .header .manage-link { padding: 8px 12px; font-size: 12px; color: var(--deep); background: #f0e9d9; border: 0; }
  .slogan-hero, .seo-fallback .slogan-hero { min-height: 170px; margin-top: 14px; padding: 28px 16px; border-radius: 22px; }
  .slogan-hero h1 { font-size: clamp(35px, 8.5vw, 51px); }
  .search-box { margin: 14px 0 0; padding: 17px; border-radius: 18px; }
  .search-box label { font-size: 15px; }
  .search-row { gap: 8px; margin-top: 10px; }
  .search-box input, .search-box select { min-height: 47px; font-size: 14px; }
  .search-hint, .home-highlights { display: none; }
  .listing-section { padding-top: 43px; padding-bottom: 49px; }
  .section-heading { margin-bottom: 23px; }
  .section-heading h2 { font-size: 34px; line-height: 1.13; margin: 7px 0; }
  .section-heading p { font-size: 13px; line-height: 1.5; }
  .section-heading > a { display: none; }
  .listing-toolbar { gap: 8px; padding-top: 12px; }
  .tabs { gap: 5px; }
  .chip { min-height: 40px; padding: 7px 11px; font-size: 12px; }
  .sort select { font-size: 12px; max-width: 112px; }
  .result-count { margin: 4px 0 13px; font-size: 12px; }
  .listing-grid { gap: 18px; }
  .listing-photo { height: 245px; }
  .listing-body { padding: 18px 18px 16px; }
  .listing-body h2 { font-size: 19px; }
  .listing-card .listing-price { font-size: 28px; }
  .listing-area strong { font-size: 18px; }
  .listing-excerpt { -webkit-line-clamp: 2; }
  .listing-bottom { font-size: 13px; }
  .local-guide.wrap { margin: 0 16px 42px; padding: 28px 23px; border-radius: 20px; }
  .local-guide h2 { font-size: 30px; }
  .local-guide p { font-size: 14px; }
  .about-section { padding: 42px 0 50px; border-radius: 26px 26px 0 0; }
  .about-content { display: block; }
  .about-person img { width: 72px; height: 72px; }
  .about-person h2 { font-size: 32px; }
  .about-content > div + div { margin-top: 36px; }
  .process-steps { flex-direction: column; }
  .process-steps div { padding: 12px 15px; }
  footer { padding: 32px 18px 105px; }
  .bottom-nav { background: #fffdf8ed; backdrop-filter: blur(16px); border-top: 1px solid #e9e3d6; }
  .bottom-nav a { color: var(--deep); }
  .bottom-nav a:last-child { color: var(--rust); }
  .detail-page .breadcrumb { padding: 20px 0; }
  .detail-layout { display: block; }
  .detail-cover { height: 320px; border-radius: 17px; }
  .detail-cover .sold-stamp, .seo-detail-cover .sold-stamp { width: 155px; height: 155px; border-width: 6px; font-size: 27px; }
  .detail-cover .sold-date, .seo-detail-cover .sold-date { top: calc(50% + 84px); font-size: 16px; }
  .detail-main h1 { font-size: 35px; margin-top: 24px; }
  .detail-main h2 { font-size: 26px; }
  .detail-main > .listing-price { font-size: 28px; }
  .contact-card { position: static; margin-top: 30px; }
  .detail-mobile-actions { display: flex; }
  .admin-page .admin-top { padding-top: 24px; gap: 10px; }
  .admin-page .admin-top h1 { font-size: 27px; line-height: 1.1; }
  .admin-page .admin-top > .button { max-width: 132px; text-align: center; }
  .seo-fallback .intro { padding: 28px 22px; margin-top: 14px; }
  .seo-fallback .intro h1 { font-size: 35px; }
  .seo-fallback .listing-section { padding-top: 30px; }
  .seo-fallback .listing-section > h2 { font-size: 30px; }
  .seo-fallback .local-guide { margin: 0 0 30px; }
}

@media (max-width: 380px) {
  .slogan-hero h1 { font-size: 35px; }
  .chip { padding-inline: 9px; }
}

@media (prefers-reduced-motion: reduce) {
  .listing-card, .listing-photo img, .header nav a { transition: none; }
}
