/* ============================================================
   鼎瑋不動產 — 網站樣式
   品牌色沿用舊站深酒紅 #55002B，配印章紅/藍區分售租
   ============================================================ */

:root {
  --paper: #F3EDE5;
  --card: #FFFFFF;
  --ink: #261B19;
  --ink-soft: #6E605D;
  --plum: #BE2418;
  --plum-deep: #8C1710;
  --plum-tint: #FBEBE9;
  --gold: #A9803D;
  --sell: #B33A2B;
  --rent: #1D5A74;
  --hairline: #E8DFDB;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(36, 26, 32, .06), 0 8px 24px rgba(36, 26, 32, .07);
  --font-display: "Noto Serif TC", "PMingLiU", serif;
  --font-body: "Noto Sans TC", "Microsoft JhengHei", sans-serif;
}

/* ---------- 備選紅色配色（右下角「試配色」切換，預設＝正紅） ---------- */

:root[data-theme="crimson"] {
  --plum: #971A1A;
  --plum-deep: #6B1010;
  --plum-tint: #F7EAEA;
}

:root[data-theme="brick"] {
  --plum: #B0402A;
  --plum-deep: #7F2B1B;
  --plum-tint: #F8EDE9;
}

:root[data-theme="rose"] {
  --plum: #8F1F3E;
  --plum-deep: #611229;
  --plum-tint: #F6EAEE;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }
img { max-width: 100%; display: block; }

:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 2px;
}

.wrap {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- 頁首 ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(243, 237, 229, .94);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--hairline);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  gap: 28px;
  min-height: 68px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  margin-right: auto;
}

.brand-seal {
  width: 42px;
  height: 42px;
  flex: none;
  display: grid;
  place-items: center;
  background: var(--plum);
  color: #fff;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 20px;
  border-radius: 8px;
  letter-spacing: 0;
}

.brand-logo {
  height: 46px;
  width: auto;
  flex: none;
}

.brand-name {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 20px;
  letter-spacing: .06em;
  line-height: 1.2;
}

.brand-sub {
  display: block;
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 11px;
  color: var(--ink-soft);
  letter-spacing: .28em;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.site-nav a {
  text-decoration: none;
  font-size: 15px;
  font-weight: 500;
  padding: 8px 14px;
  border-radius: 6px;
  color: var(--ink);
}

.site-nav a:hover { background: var(--plum-tint); color: var(--plum); }
.site-nav a[aria-current="page"] { color: var(--plum); font-weight: 700; }

.tel-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--plum);
  color: #fff !important;
  font-weight: 700;
  padding: 10px 18px !important;
  border-radius: 999px !important;
  white-space: nowrap;
}
.tel-btn:hover { background: var(--plum-deep) !important; color: #fff !important; }

.login-link {
  border: 1px solid var(--plum);
  color: var(--plum) !important;
  font-weight: 700 !important;
  white-space: nowrap;
}
.login-link:hover { background: var(--plum) !important; color: #fff !important; }
.login-link:focus-visible { outline: 2px solid var(--plum); outline-offset: 2px; }

/* ---------- 首頁主視覺 ---------- */

.hero {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--hairline);
}

/* 主視覺背景圖：亮室內景（已預先虛化），僅留暖色質感 */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url("brand/hero_bg.jpg") center / cover no-repeat;
  opacity: .34;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg,
      color-mix(in srgb, var(--paper) 78%, transparent),
      color-mix(in srgb, var(--paper) 55%, transparent) 55%,
      var(--paper));
}

.hero .wrap {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 64px 1fr 460px;
  gap: 40px;
  align-items: center;
  padding-top: 72px;
  padding-bottom: 72px;
}

.hero-rail {
  writing-mode: vertical-rl;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 18px;
  letter-spacing: .55em;
  color: var(--plum);
  border-right: 1px solid var(--hairline);
  padding-right: 20px;
  height: 340px;
  align-self: start;
}

.hero-rail .rail-seal {
  display: inline-block;
  border: 2px solid var(--sell);
  color: var(--sell);
  font-size: 14px;
  padding: 6px 3px;
  margin-top: 18px;
  letter-spacing: .2em;
  border-radius: 4px;
}

.hero h1 {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(34px, 4.6vw, 52px);
  line-height: 1.32;
  letter-spacing: .04em;
  margin: 0 0 20px;
}

.hero h1 em {
  font-style: normal;
  color: var(--plum);
}

.hero-lede {
  font-size: 17px;
  color: var(--ink-soft);
  max-width: 34em;
  margin: 0 0 32px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  font-weight: 700;
  font-size: 16px;
  padding: 13px 26px;
  border-radius: 999px;
  border: 1.5px solid transparent;
}

.btn-primary { background: var(--plum); color: #fff; }
.btn-primary:hover { background: var(--plum-deep); }
.btn-ghost { border-color: var(--plum); color: var(--plum); }
.btn-ghost:hover { background: var(--plum-tint); }

.hero-tel {
  font-size: 15px;
  color: var(--ink-soft);
  width: 100%;
}
.hero-tel strong {
  font-family: var(--font-display);
  font-size: 22px;
  color: var(--ink);
  letter-spacing: .04em;
}

/* 主視覺精選卡 */
.hero-feature {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  text-decoration: none;
  display: block;
}

.hero-feature img {
  width: 100%;
  height: 380px;
  object-fit: cover;
}

.hero-feature .hf-caption {
  position: absolute;
  inset: auto 0 0 0;
  padding: 44px 22px 18px;
  background: linear-gradient(180deg, transparent, rgba(30, 8, 20, .82));
  color: #fff;
  display: flex;
  align-items: baseline;
  gap: 12px;
}

.hf-caption .hf-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 20px;
}
.hf-caption .hf-price {
  margin-left: auto;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 22px;
  color: #FFD9A0;
}

/* ---------- 區塊通用 ---------- */

.section { padding: 72px 0; }
.section + .section { border-top: 1px solid var(--hairline); }

.section-head {
  display: flex;
  align-items: baseline;
  gap: 18px;
  margin-bottom: 36px;
}

.section-head h2 {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 30px;
  letter-spacing: .06em;
  margin: 0;
}

.section-head .en {
  font-size: 13px;
  letter-spacing: .22em;
  color: var(--gold);
  text-transform: uppercase;
}

.section-head .more {
  margin-left: auto;
  font-size: 15px;
  font-weight: 500;
  color: var(--plum);
  text-decoration: none;
  white-space: nowrap;
}
.section-head .more:hover { text-decoration: underline; }

/* ---------- 物件卡片 ---------- */

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 26px;
}

.listing-card {
  background: var(--card);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  overflow: hidden;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  transition: transform .18s ease, box-shadow .18s ease;
}

.listing-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

.lc-photo {
  position: relative;
  aspect-ratio: 4 / 3;
  background: var(--plum-tint);
}

.lc-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.lc-photo .no-photo {
  height: 100%;
  display: grid;
  place-items: center;
  color: var(--plum);
  font-family: var(--font-display);
  font-size: 15px;
  letter-spacing: .2em;
}

/* 售/租印章 */
.seal {
  position: absolute;
  top: 12px;
  left: 12px;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 17px;
  color: #fff;
  border-radius: 6px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, .3);
}
.seal-sell { background: var(--sell); }
.seal-rent { background: var(--rent); }

.seal-inline {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 15px;
  color: #fff;
  border-radius: 6px;
  flex: none;
}

.lc-body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 6px; flex: 1; }

.lc-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 19px;
  letter-spacing: .03em;
  margin: 0;
}

.lc-meta {
  font-size: 13.5px;
  color: var(--ink-soft);
  display: flex;
  flex-wrap: wrap;
  gap: 4px 10px;
}

.lc-pitch {
  font-size: 14px;
  color: var(--ink-soft);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lc-price-row {
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px dashed var(--hairline);
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.lc-price {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 24px;
  letter-spacing: .02em;
}
.price-sell { color: var(--sell); }
.price-rent { color: var(--rent); }
.lc-price .u { font-size: 14px; font-weight: 700; }

.lc-unit {
  margin-left: auto;
  font-size: 13px;
  color: var(--ink-soft);
}

/* ---------- 篩選列 ---------- */

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  background: var(--card);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  padding: 14px 18px;
  margin-bottom: 30px;
}

.deal-toggle { display: inline-flex; border: 1.5px solid var(--plum); border-radius: 999px; overflow: hidden; }
.deal-toggle button {
  appearance: none;
  border: 0;
  background: transparent;
  font: inherit;
  font-weight: 700;
  padding: 8px 20px;
  cursor: pointer;
  color: var(--plum);
}
.deal-toggle button[aria-pressed="true"] { background: var(--plum); color: #fff; }

.filter-bar select {
  font: inherit;
  padding: 8px 12px;
  border: 1px solid var(--hairline);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
}
.listing-search { display:flex; align-items:center; gap:8px; font-size:13px; font-weight:700; color:var(--ink-soft); }
.listing-search input { width:250px; font:inherit; padding:8px 12px; border:1px solid var(--hairline); border-radius:8px; background:#fff; color:var(--ink); }
.listing-search input:focus, .hero-search input:focus { outline:2px solid var(--plum); outline-offset:1px; }

.hero-search { display:flex; align-items:center; width:min(100%, 520px); margin:24px 0 4px; padding:7px; background:#fff; border:1px solid rgba(190,36,24,.24); border-radius:12px; box-shadow:0 10px 22px rgba(53,25,20,.08); }
.hero-search label { padding:0 10px; font-size:13px; font-weight:700; color:var(--plum); white-space:nowrap; }
.hero-search input { min-width:0; flex:1; border:0; background:transparent; color:var(--ink); font:inherit; padding:8px 5px; }
.hero-search input:focus { outline:0; }
.hero-search button { border:0; border-radius:8px; padding:9px 17px; background:var(--plum); color:#fff; font:700 14px var(--font-body); cursor:pointer; }

.filter-count { margin-left: auto; font-size: 14px; color: var(--ink-soft); }

/* ---------- 服務項目 ---------- */

.service-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 22px;
}

.service-card {
  background: var(--card);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  padding: 26px 24px;
}

.service-card .glyph {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 26px;
  color: var(--plum);
  display: inline-block;
  border-bottom: 3px solid var(--gold);
  padding-bottom: 4px;
  margin-bottom: 14px;
}

.service-card h3 { margin: 0 0 8px; font-size: 18px; font-weight: 700; }
.service-card p { margin: 0; font-size: 14.5px; color: var(--ink-soft); }

/* ---------- 關於我們 ---------- */

.about-grid {
  display: grid;
  grid-template-columns: 1.2fr .8fr;
  gap: 48px;
  align-items: start;
}

.about-text p { margin: 0 0 16px; color: var(--ink-soft); }
.about-text p strong { color: var(--ink); }

.info-card {
  background: var(--card);
  border: 1px solid var(--hairline);
  border-left: 5px solid var(--plum);
  border-radius: var(--radius);
  padding: 26px 28px;
}

.info-card dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 10px 18px; font-size: 15px; }
.info-card dt { color: var(--ink-soft); white-space: nowrap; }
.info-card dd { margin: 0; font-weight: 500; }
.info-card a { color: var(--plum); }

.about-photo {
  margin: 0 0 22px;
}
.about-photo img {
  width: 100%;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.about-photo figcaption {
  font-size: 13px;
  color: var(--ink-soft);
  margin-top: 8px;
  text-align: right;
}

/* ---------- 代租代管 ---------- */

.management-hero { padding: 92px 0 84px; background: linear-gradient(115deg, var(--plum) 0%, #5b1713 58%, #8e3028 100%); color: #fff; }
.management-hero .wrap { max-width: 920px; }
.management-label { margin: 0 0 16px; font-size: 14px; font-weight: 700; letter-spacing: .13em; color: #f4d0c9; }
.management-hero h1 { max-width: 680px; margin: 0; font-family: var(--font-display); font-size: 48px; line-height: 1.3; letter-spacing: .05em; }
.management-hero p:not(.management-label) { max-width: 630px; margin: 22px 0 28px; line-height: 1.9; color: #f8e9e5; }
.management-hero .btn-primary { background: #fff; color: var(--plum); border-color: #fff; }
.management-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.management-grid article { min-height: 208px; padding: 24px 20px; background: #fff; border-top: 3px solid var(--plum); box-shadow: 0 8px 22px rgba(40, 22, 18, .08); }
.management-grid span { display: block; color: var(--plum); font-size: 13px; font-weight: 900; letter-spacing: .14em; }
.management-grid h3 { margin: 18px 0 10px; font-family: var(--font-display); font-size: 20px; }
.management-grid p { margin: 0; color: var(--ink-soft); line-height: 1.8; font-size: 14px; }
.management-note { background: #efe4dc; }
.management-note .wrap { display: flex; align-items: center; justify-content: space-between; gap: 36px; }
.management-note h2 { margin: 0 0 10px; font-family: var(--font-display); font-size: 28px; }
.management-note p { max-width: 650px; margin: 0; color: var(--ink-soft); line-height: 1.85; }

/* ---------- 試配色浮動切換器 ---------- */

.theme-picker {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 80;
  background: var(--card);
  border: 1px solid var(--hairline);
  border-radius: 999px;
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
}

.theme-picker .tp-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink-soft);
  letter-spacing: .1em;
}

.theme-picker button {
  appearance: none;
  border: 2px solid transparent;
  border-radius: 50%;
  width: 28px;
  height: 28px;
  cursor: pointer;
  padding: 0;
}

.theme-picker button.active {
  border-color: var(--ink);
  box-shadow: 0 0 0 2px #fff inset;
}

/* ---------- 物件詳情頁 ---------- */

.detail-top { padding: 40px 0 0; }

.crumbs { font-size: 14px; color: var(--ink-soft); margin-bottom: 18px; }
.crumbs a { color: var(--ink-soft); text-decoration: none; }
.crumbs a:hover { color: var(--plum); text-decoration: underline; }

.detail-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  margin-bottom: 8px;
}

.detail-head h1 {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(26px, 3.6vw, 38px);
  letter-spacing: .04em;
  margin: 0;
}

.detail-sub { color: var(--ink-soft); font-size: 15px; margin-bottom: 26px; }

.detail-price {
  margin-left: auto;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(26px, 3.4vw, 36px);
}
.detail-price .u { font-size: 17px; }

.detail-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 36px;
  align-items: start;
  padding-bottom: 72px;
}

.gallery-main {
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--plum-tint);
  aspect-ratio: 4 / 3;
  margin-bottom: 12px;
}
.gallery-main img { width: 100%; height: 100%; object-fit: cover; }
.gallery-main .no-photo {
  height: 100%;
  display: grid;
  place-items: center;
  color: var(--plum);
  font-family: var(--font-display);
  letter-spacing: .2em;
}

.gallery-thumbs { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
.gallery-thumbs button {
  appearance: none;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 6px;
  overflow: hidden;
  cursor: pointer;
  background: none;
  aspect-ratio: 4 / 3;
}
.gallery-thumbs button.active { border-color: var(--plum); }
.gallery-thumbs img { width: 100%; height: 100%; object-fit: cover; }

.listing-videos { margin-top: 26px; }
.listing-videos h2 { margin: 0 0 10px; font-size: 20px; }
.listing-videos video { display: block; width: 100%; max-height: 520px; background: #1a1513; border: 1px solid var(--hairline); }
.listing-videos video + video { margin-top: 12px; }

.pitch-card {
  background: var(--plum);
  color: #fff;
  border-radius: var(--radius);
  padding: 26px 28px;
  margin-bottom: 22px;
}

.pitch-card .eyebrow {
  font-size: 12px;
  letter-spacing: .3em;
  color: #E8C088;
  margin-bottom: 10px;
}

.pitch-card ul { margin: 0; padding: 0; list-style: none; }
.pitch-card li {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 18px;
  line-height: 1.9;
  letter-spacing: .05em;
}
.pitch-card li::before { content: "・"; color: #E8C088; }

.spec-card {
  background: var(--card);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 22px;
}

.spec-card h2 {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: .18em;
  color: var(--plum);
  background: var(--plum-tint);
  padding: 10px 20px;
}

.spec-card table { width: 100%; border-collapse: collapse; font-size: 15px; }
.spec-card td { padding: 9px 20px; border-top: 1px solid var(--hairline); vertical-align: top; }
.spec-card td.k { width: 96px; color: var(--ink-soft); white-space: nowrap; }
.spec-card tr:first-child td { border-top: 0; }

.contact-card {
  background: var(--card);
  border: 1px solid var(--hairline);
  border-top: 5px solid var(--plum);
  border-radius: var(--radius);
  padding: 24px 26px;
  text-align: center;
}

.contact-card .cc-name { font-family: var(--font-display); font-weight: 700; font-size: 18px; }
.contact-card .cc-tel {
  display: block;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 30px;
  color: var(--plum);
  text-decoration: none;
  margin: 6px 0 14px;
  letter-spacing: .04em;
}
.contact-card .cc-note { font-size: 13px; color: var(--ink-soft); margin-top: 12px; }

.cc-links {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 12px;
}
.cc-links .btn { padding: 9px 18px; font-size: 14.5px; }
.btn-line { border-color: #06C755; color: #06A94A; }
.btn-line:hover { background: #E8F9EF; }

.map-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  color: var(--plum);
}

/* ---------- 頁尾 ---------- */

.site-footer {
  background:
    linear-gradient(color-mix(in srgb, var(--plum-deep) 94%, transparent),
      color-mix(in srgb, var(--plum-deep) 88%, transparent)),
    url("brand/company.jpg") center / cover no-repeat;
  color: #E9DCE3;
  margin-top: 72px;
}

.site-footer .wrap {
  padding: 52px 24px 40px;
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: 40px;
}

.site-footer h3 {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 20px;
  color: #fff;
  margin: 0 0 14px;
  letter-spacing: .06em;
}

.site-footer p, .site-footer li { font-size: 14.5px; margin: 0 0 8px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer a { color: #E9DCE3; text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }

.qr-row { display: flex; gap: 16px; margin-top: 16px; }
.qr-row figure { margin: 0; text-align: center; }
.qr-row img {
  width: 88px;
  height: 88px;
  background: #fff;
  padding: 4px;
  border-radius: 6px;
}
.qr-row figcaption { font-size: 12px; color: rgba(255, 255, 255, .75); margin-top: 5px; }

.sns-row { display: flex; gap: 10px; margin-top: 14px; }
.sns-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1.5px solid rgba(255, 255, 255, .4);
  border-radius: 999px;
  padding: 8px 18px;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none !important;
}
.sns-btn:hover { border-color: #fff; }
.sns-btn.pending { opacity: .55; cursor: default; }

.footer-legal {
  border-top: 1px solid rgba(255, 255, 255, .15);
  text-align: center;
  font-size: 13px;
  color: rgba(233, 220, 227, .7);
  padding: 16px 24px;
}

/* ---------- 內頁通用（試算/需知/留言） ---------- */

.page-lede {
  color: var(--ink-soft);
  max-width: 46em;
  margin: -10px 0 28px;
}

.subnav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 34px;
}

.subnav a {
  text-decoration: none;
  font-size: 14.5px;
  font-weight: 700;
  color: var(--plum);
  border: 1.5px solid var(--plum);
  border-radius: 999px;
  padding: 7px 16px;
}
.subnav a:hover, .subnav a.on { background: var(--plum); color: #fff; }

/* ---------- 試算卡片 ---------- */

.calc-card {
  background: var(--card);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  padding: 26px 28px;
  margin-bottom: 26px;
  scroll-margin-top: 90px;
}

.calc-card h3 {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 22px;
  letter-spacing: .06em;
  margin: 0 0 18px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.calc-no {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  background: var(--plum);
  color: #fff;
  font-size: 15px;
  border-radius: 8px;
  flex: none;
}

.calc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 14px 18px;
  margin-bottom: 18px;
}

.calc-grid label {
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--ink-soft);
}

.calc-grid input, .calc-grid select {
  font: inherit;
  font-weight: 500;
  color: var(--ink);
  padding: 10px 12px;
  border: 1px solid var(--hairline);
  border-radius: 8px;
  background: #fff;
}

.calc-grid label.chk {
  flex-direction: row;
  align-items: center;
  gap: 8px;
  align-self: end;
  padding-bottom: 10px;
}
.calc-grid label.chk input { width: 18px; height: 18px; }

.calc-result { margin-top: 16px; }
.calc-result.has-result {
  background: var(--plum-tint);
  border-radius: 8px;
  padding: 16px 20px;
}

.rs-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 6px 0;
  font-size: 15px;
}
.rs-row span { color: var(--ink-soft); }
.rs-row b { text-align: right; }
.rs-row.total {
  border-top: 1.5px dashed var(--plum);
  margin-top: 6px;
  padding-top: 12px;
}
.rs-row.total b {
  font-family: var(--font-display);
  font-size: 21px;
  color: var(--plum);
}
.rs-note { font-size: 12.5px; color: var(--ink-soft); margin: 10px 0 0; }

.tools-disclaimer {
  font-size: 13px;
  color: var(--ink-soft);
  border-top: 1px solid var(--hairline);
  padding-top: 18px;
  margin-top: 10px;
}

/* ---------- 買賣需知 ---------- */

.kn-article {
  background: var(--card);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  padding: 30px 34px;
  margin-bottom: 26px;
  scroll-margin-top: 90px;
  max-width: 100%;
}

.kn-article h3 {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 24px;
  letter-spacing: .08em;
  margin: 0 0 6px;
  color: var(--plum);
}

.kn-article .kn-en {
  font-size: 12px;
  letter-spacing: .22em;
  color: var(--gold);
  text-transform: uppercase;
  margin-bottom: 18px;
}

.kn-article h4 {
  font-size: 17px;
  font-weight: 700;
  margin: 24px 0 8px;
  padding-left: 12px;
  border-left: 4px solid var(--gold);
}

.kn-article p { margin: 0 0 12px; color: #4A4046; }
.kn-article ol, .kn-article ul { margin: 0 0 12px; padding-left: 24px; color: #4A4046; }
.kn-article li { margin-bottom: 4px; }

.fee-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin: 12px 0 16px;
}

.fee-col {
  border: 1px solid var(--hairline);
  border-radius: 8px;
  overflow: hidden;
}

.fee-col h5 {
  margin: 0;
  padding: 8px 16px;
  font-size: 15px;
  color: #fff;
  letter-spacing: .2em;
}
.fee-col.buyer h5 { background: var(--sell); }
.fee-col.seller h5 { background: var(--rent); }
.fee-col ul { list-style: none; margin: 0; padding: 10px 16px; }
.fee-col li { padding: 5px 0; border-bottom: 1px dashed var(--hairline); font-size: 14.5px; }
.fee-col li:last-child { border-bottom: 0; }

.kn-table { width: 100%; border-collapse: collapse; font-size: 14.5px; margin: 8px 0 14px; }
.kn-table th { background: var(--plum-tint); color: var(--plum); text-align: left; padding: 8px 14px; }
.kn-table td { padding: 8px 14px; border-top: 1px solid var(--hairline); }

.link-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
}

.link-card {
  display: block;
  background: var(--card);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  padding: 18px 20px;
  text-decoration: none;
  transition: transform .15s ease, box-shadow .15s ease;
}
.link-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.link-card b { display: block; font-size: 16px; margin-bottom: 4px; color: var(--plum); }
.link-card span { font-size: 13px; color: var(--ink-soft); }

/* ---------- 需求留言 ---------- */

.needs-grid {
  display: grid;
  grid-template-columns: .9fr 1.1fr;
  gap: 32px;
  align-items: start;
}

.form-card {
  background: var(--card);
  border: 1px solid var(--hairline);
  border-top: 5px solid var(--plum);
  border-radius: var(--radius);
  padding: 26px 28px;
}

.form-card h3 {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 21px;
  margin: 0 0 16px;
  letter-spacing: .06em;
}

.form-card .fields { display: flex; flex-direction: column; gap: 12px; }
.form-card label { display: flex; flex-direction: column; gap: 5px; font-size: 13.5px; font-weight: 700; color: var(--ink-soft); }
.form-card input, .form-card select, .form-card textarea {
  font: inherit;
  font-weight: 500;
  color: var(--ink);
  padding: 10px 12px;
  border: 1px solid var(--hairline);
  border-radius: 8px;
  background: #fff;
}
.form-card textarea { resize: vertical; }
.form-card .form-note { font-size: 12.5px; color: var(--ink-soft); margin: 10px 0 14px; }
.form-card .ok-msg { color: #2E7D4F; font-weight: 700; margin-top: 12px; display: none; }

.board-head {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 14px;
}
.board-head h3 { font-family: var(--font-display); font-weight: 900; font-size: 21px; margin: 0; letter-spacing: .06em; }
.board-head span { font-size: 13px; color: var(--ink-soft); }

.msg-list { display: flex; flex-direction: column; gap: 12px; }

.msg-card {
  background: var(--card);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  padding: 14px 18px;
}

.msg-card .msg-top { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.kind-chip {
  font-size: 12.5px;
  font-weight: 700;
  color: #fff;
  border-radius: 6px;
  padding: 2px 10px;
}
.kind-buy { background: var(--sell); }
.kind-rent { background: var(--rent); }
.kind-sell { background: var(--gold); }
.msg-card .msg-name { font-weight: 700; }
.msg-card .msg-date { margin-left: auto; font-size: 12.5px; color: var(--ink-soft); }
.msg-card .msg-body { font-size: 14.5px; color: #4A4046; white-space: pre-wrap; }

.msg-empty {
  text-align: center;
  color: var(--ink-soft);
  border: 1px dashed var(--hairline);
  border-radius: var(--radius);
  padding: 40px 20px;
}

/* ---------- 響應式 ---------- */

@media (max-width: 960px) {
  .needs-grid { grid-template-columns: 1fr; }
  .fee-cols { grid-template-columns: 1fr; }
  .hero .wrap { grid-template-columns: 1fr; padding-top: 48px; padding-bottom: 48px; }
  .hero-rail { display: none; }
  .hero-feature img { height: 300px; }
  .about-grid { grid-template-columns: 1fr; }
  .management-grid { grid-template-columns: repeat(2, 1fr); }
  .detail-grid { grid-template-columns: 1fr; }
  .site-footer .wrap { grid-template-columns: 1fr; gap: 28px; }
}

@media (max-width: 720px) {
  .site-header .wrap { flex-wrap: wrap; padding-top: 10px; padding-bottom: 10px; gap: 8px; }
  .site-nav { order: 3; width: 100%; justify-content: space-between; gap: 4px; overflow: visible; }
  .site-nav > a:not([href*="deal=sell"]):not([href*="deal=rent"]):not([href="management.html"]) { display: none; }
  .site-nav > a[href*="deal=sell"],
  .site-nav > a[href*="deal=rent"],
  .site-nav > a[href="management.html"] { flex: 1 1 0; padding: 9px 4px; text-align: center; white-space: nowrap; font-size: 14px; }
  .site-footer a[href="needs.html"] {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    margin-top: 14px;
    padding: 10px 14px;
    border-radius: 7px;
    background: var(--plum);
    color: #fff;
    font-weight: 700;
    text-decoration: none;
  }
  .brand-name { font-size: 17px; }
  .management-hero { padding: 62px 0; }
  .management-hero h1 { font-size: 35px; }
  .management-grid { grid-template-columns: 1fr; }
  .management-note .wrap { display: block; }
  .management-note .btn { margin-top: 22px; }
  .section { padding: 48px 0; }
  .section-head { flex-wrap: wrap; gap: 8px 14px; }
  .filter-count { width: 100%; margin-left: 0; }
  .listing-search { width:100%; }
  .listing-search input { flex:1; width:auto; }
  .hero-search { display:grid; grid-template-columns:auto 1fr auto; }
  .gallery-thumbs { grid-template-columns: repeat(4, 1fr); }
}
