/* Nihehe homepage redesign: override layer, loaded LAST by assets/home-preview.html only.
   Real index.html does not load this file. Remove the <link> to roll back. */

/* Re-map the old palette so every untouched old rule recolours itself. */
:root {
  --ink: #132d4c;
  --paper: #f4f7fa;
  --paper-dim: #e8f6fd;
  --brass: #132d4c;
  --brass-bright: #00aee7;
  --seal-green: #132d4c;
  --line: #e3e9f0;
  --shadow: 0 8px 24px rgba(19, 45, 76, .08);
}

body {
  font-family: var(--font);
  background: var(--page);
  color: var(--brand);
}
button, input, select, textarea { font-family: var(--font); }

main { max-width: 1120px; padding: 0 16px; }
/* the old two-column grid reserved space for a map that is not on this page */
@media (min-width: 901px) {
  main { display: block; }
  .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
.card, .card * { font-family: var(--font); }
.card .view-details { border: 0; }
.card .card-updated { font-weight: 600; }

/* ---------- Hero ---------- */
.hero {
  margin-top: 16px;
  padding: 36px 20px 28px;
  background: var(--brand);
  background-image:
    radial-gradient(520px 260px at 90% -10%, rgba(0, 174, 231, .28), transparent 70%),
    radial-gradient(380px 220px at -5% 110%, rgba(0, 174, 231, .14), transparent 70%);
  border-radius: var(--radius-card);
  color: #fff;
  text-align: center;
  position: relative;
}
.hero h1 {
  font-family: var(--font);
  font-weight: 800;
  font-size: clamp(30px, 6vw, 48px);
  letter-spacing: -.02em;
  line-height: 1.1;
  margin: 0 0 22px;
  color: #fff;
}
.hero h1 em { font-style: normal; color: var(--accent); }
.hero p { display: none; }

.filter-panel {
  background: #fff;
  color: var(--brand);
  border: 0;
  border-radius: 24px;
  padding: 14px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, .22);
  max-width: 760px;
}

.property-search label {
  font-family: var(--font);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  color: var(--muted);
  margin: 2px 0 8px 6px;
  display: block;
  text-align: left;
}
.property-search-row {
  display: flex;
  gap: 8px;
  align-items: stretch;
}
.property-search-row input {
  flex: 1;
  min-width: 0;
  height: 52px;
  padding: 0 20px;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-pill);
  background: var(--page);
  color: var(--brand);
  font-size: 16px;
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease), background .2s var(--ease);
}
.property-search-row input:focus {
  border-color: var(--accent);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(0, 174, 231, .2);
  outline: none;
}
.search-hint {
  font-size: 12px;
  color: var(--muted);
  margin: 10px 0 0 6px;
  text-align: left;
}

/* Buttons */
.search-btn {
  min-height: 52px;
  padding: 0 28px;
  border: 0;
  border-radius: var(--radius-pill);
  background: var(--accent);
  color: var(--brand);
  font-family: var(--font);
  font-weight: 800;
  font-size: 15px;
  cursor: pointer;
  transition: transform .15s var(--ease), box-shadow .2s var(--ease), background .2s var(--ease);
  box-shadow: 0 6px 16px rgba(0, 174, 231, .35);
}
.search-btn:hover { background: #1bbdf3; transform: translateY(-1px); }
.search-btn:active { transform: translateY(0) scale(.98); }
.search-btn:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; }

.advanced-toggle {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin: 8px 0 0;
  padding: 0 18px;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-pill);
  background: #fff;
  color: var(--brand);
  font-family: var(--font);
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  transition: background .2s var(--ease), border-color .2s var(--ease);
}
.advanced-toggle:hover { background: var(--brand-light); border-color: var(--accent); }

.advanced-filters.open { animation: nh-fade-down .3s var(--ease); }
@keyframes nh-fade-down { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }

/* Fields */
.field label {
  font-family: var(--font);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  color: var(--muted);
  margin: 0 0 6px 4px;
  text-align: left;
}
.field select, .field input {
  height: 48px;
  padding: 0 16px;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-field);
  background: var(--page);
  color: var(--brand);
  font-size: 16px;
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease), background .2s var(--ease);
}
.field select:focus, .field input:focus {
  border-color: var(--accent);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(0, 174, 231, .2);
}
.field select:disabled { opacity: .55; }
.filter-row { margin-top: 14px; }
.budget-row .search-btn { height: 48px; min-height: 48px; }

.locate-btn {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 18px;
  margin: 12px auto 2px;
  border-radius: var(--radius-pill);
  background: var(--brand-light);
  color: var(--brand);
  font-weight: 600;
  font-size: 13px;
  text-decoration: none;
  transition: background .2s var(--ease);
}
.locate-btn:hover { background: #d3eefb; }

/* ---------- UPI checker ---------- */
.upi-checker {
  max-width: none;
  width: 100%;
  margin: 20px 0 8px;
  padding: 24px 20px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
}
.upi-checker-text h2 {
  font-family: var(--font);
  font-weight: 800;
  font-size: 20px;
  letter-spacing: -.01em;
  margin: 0 0 4px;
  color: var(--brand);
}
.upi-checker-text p { font-size: 14px; color: var(--muted); opacity: 1; }
.upi-checker-form { width: 100%; flex-wrap: nowrap; }
.upi-checker-form input {
  flex: 1;
  min-width: 0;
  height: 52px;
  padding: 0 20px;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-pill);
  background: var(--page);
  color: var(--brand);
  font-size: 16px;
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}
.upi-checker-form input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(0, 174, 231, .2);
  background: #fff;
}
.upi-checker-result {
  border: 0;
  border-radius: 20px;
  background: var(--brand-light);
  color: var(--brand);
}
.upi-result-error { color: var(--danger); font-weight: 600; }
.upi-checker-more {
  border-top: 1px solid var(--line);
  color: var(--muted);
  opacity: 1;
}
.upi-checker-more a { color: var(--brand); text-decoration: underline; text-underline-offset: 3px; }
@media (min-width: 720px) {
  .upi-checker-form { width: auto; min-width: 440px; }
}

/* ---------- Verification badges row ---------- */
.badges-row { gap: 10px; margin: 16px 0 4px; }
.badge-explain {
  padding: 8px 14px 8px 8px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--brand);
  opacity: 1;
}
.seal { background: var(--accent); color: var(--brand); font-weight: 800; }

/* ---------- Listings header ---------- */
.listings-head { margin: 28px 0 14px; }
.section-label {
  display: inline-block;
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  background: var(--brand-light);
  color: var(--brand);
  font-family: var(--font);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.listings-head h2 {
  font-family: var(--font);
  font-weight: 800;
  font-size: 26px;
  letter-spacing: -.02em;
  color: var(--brand);
  margin: 8px 0 0;
}

/* ---------- Cards ---------- */
.grid { gap: 18px; }
.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: transform .25s var(--ease), box-shadow .25s var(--ease);
  animation: nh-card-in .45s var(--ease) both;
}
.card:hover { transform: translateY(-4px); box-shadow: 0 16px 36px rgba(19, 45, 76, .14); }
.card:active { transform: scale(.99); }
.card:nth-child(2) { animation-delay: .05s; }
.card:nth-child(3) { animation-delay: .1s; }
.card:nth-child(n+4) { animation-delay: .15s; }
@keyframes nh-card-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

.card-image { border-radius: 0; }
.card-image-placeholder {
  background: linear-gradient(135deg, var(--brand) 0%, #1d4673 100%);
  color: #fff;
}
.card-image-placeholder .placeholder-mark {
  border: 2px solid var(--accent);
  color: var(--accent);
  font-family: var(--font);
  font-weight: 800;
}
.card-image-placeholder .placeholder-text {
  font-family: var(--font);
  font-weight: 600;
  letter-spacing: .06em;
  color: rgba(255, 255, 255, .85);
}
.card-body { padding: 16px 18px 18px; }
.card .price {
  display: inline-block;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  background: var(--brand);
  color: #fff;
  font-family: var(--font);
  font-weight: 800;
  font-size: 15px;
  margin-bottom: 10px;
}
.card-title {
  font-family: var(--font);
  font-weight: 800;
  font-size: 17px;
  letter-spacing: -.01em;
  color: var(--brand);
}
.card .location { color: var(--muted); font-size: 13.5px; font-weight: 600; }
.card-badges { gap: 6px; margin-top: 12px; }
.card-badge {
  padding: 5px 11px;
  border-radius: var(--radius-pill);
  background: var(--brand-light);
  color: var(--brand);
  border: 0;
  font-family: var(--font);
  font-size: 11.5px;
  font-weight: 800;
}
.card-updated { color: var(--muted); font-size: 12px; opacity: 1; }
.card .view-details {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 44px;
  margin-top: 14px;
  border-radius: var(--radius-pill);
  background: var(--page);
  color: var(--brand);
  font-family: var(--font);
  font-weight: 800;
  font-size: 13.5px;
  transition: background .2s var(--ease);
}
.card:hover .view-details { background: var(--accent); }

/* ---------- Empty state ---------- */
.empty-state {
  background: #fff;
  border: 1px dashed #c9d6e4;
  border-radius: var(--radius-card);
  padding: 40px 24px;
}
.empty-state .stamp {
  border: 0;
  border-radius: 50%;
  background: var(--brand);
  color: var(--accent);
  font-family: var(--font);
  font-weight: 800;
}
.empty-state h3 { font-family: var(--font); font-weight: 800; color: var(--brand); }
.empty-state p { color: var(--muted); opacity: 1; }

/* ---------- Detail sheet ---------- */
.detail-overlay { background: rgba(19, 45, 76, .55); backdrop-filter: blur(4px); }
.detail-panel {
  background: var(--page);
  border-radius: var(--radius-card);
  font-family: var(--font);
  color: var(--brand);
  padding: 0 24px 28px;
  animation: nh-sheet-in .35s var(--ease);
}
@keyframes nh-sheet-in { from { transform: translateY(24px); opacity: 0; } to { transform: none; opacity: 1; } }
.detail-panel *:not(svg):not(path) { font-family: var(--font); }

.detail-back {
  margin: 0 -24px 18px;
  padding: 14px 24px;
  background: rgba(244, 247, 250, .92);
  backdrop-filter: blur(8px);
  border: 0;
  border-bottom: 1px solid var(--line);
  box-shadow: none;
  color: var(--brand);
  font-size: 14px;
  font-weight: 800;
  opacity: 1;
  text-align: left;
  width: calc(100% + 48px);
  min-height: 52px;
}
.detail-back:hover { color: var(--brand); background: var(--brand-light); }

.detail-title-heading { font-weight: 800; font-size: 26px; letter-spacing: -.02em; line-height: 1.2; }
.gallery-price-overlay {
  background: var(--brand);
  border-radius: 9999px;
  padding: 10px 18px;
}
.gallery-price-overlay-price { font-weight: 800; font-size: 18px; }
.gallery-price-overlay-title { display: none; }
.property-gallery-main { border-radius: 24px; border: 0; }
.gallery-arrow { width: 44px; height: 44px; }
.gallery-count { border-radius: 9999px; padding: 5px 12px; }
.gallery-dot.active { background: var(--brand); }

.seller-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background: #fff;
  box-shadow: var(--shadow-card);
}
.seller-card-label { font-size: 11px; font-weight: 800; letter-spacing: .06em; color: var(--muted); opacity: 1; }
.seller-avatar { background: var(--brand); color: var(--accent); font-weight: 800; }
.seller-name { font-weight: 800; }
.seller-verified { background: var(--accent); color: var(--brand); font-weight: 800; }
.seller-role, .seller-rating { opacity: 1; color: var(--muted); }
.seller-card-footer { border-top-color: var(--line); opacity: 1; color: var(--muted); }
.seller-rate {
  min-height: 44px; padding: 0 16px;
  border-radius: 9999px; background: var(--brand-light);
  color: var(--brand); font-weight: 800;
}
.seller-rate:hover { background: #d3eefb; color: var(--brand); }

.detail-actions { gap: 10px; }
.detail-actions a, .detail-actions button {
  min-height: 48px;
  border-radius: 9999px;
  font-weight: 800;
  transition: transform .15s var(--ease), background .2s var(--ease);
}
.detail-actions a:active, .detail-actions button:active { transform: scale(.97); }
.detail-actions .primary { background: var(--brand); color: #fff; }
.detail-actions .primary:hover { background: var(--brand-dark); }
.detail-actions .secondary { background: var(--accent); color: var(--brand); }
.detail-actions .secondary:hover { opacity: 1; background: #1bbdf3; }
.detail-actions .outline { background: #fff; border: 1.5px solid var(--line); color: var(--brand); }

.property-facts { gap: 10px; margin-top: 18px; }
.property-fact {
  padding: 10px 12px; background: #fff; border: 1px solid var(--line); border-radius: 18px;
}
.property-fact-icon { border: 0; background: var(--brand-light); }
.property-fact-label { font-size: 10px; font-weight: 800; letter-spacing: .05em; opacity: 1; color: var(--muted); }
.property-fact-value { font-weight: 800; font-size: 13px; }

.detail-location { opacity: 1; color: var(--muted); font-weight: 600; }
.detail-badge { background: var(--brand-light); border-radius: 9999px; padding: 6px 12px 6px 6px; font-weight: 800; color: var(--brand); }
.detail-description { border-top-color: var(--line); }
.detail-section-label { font-weight: 800; letter-spacing: .06em; color: var(--muted); }
.detail-description p { opacity: 1; color: #33475f; font-size: 15px; line-height: 1.65; }
.detail-description-empty { opacity: 1; color: var(--muted); }
.detail-upi { opacity: 1; color: var(--muted); }
.detail-map { border-radius: 24px; border: 0; box-shadow: var(--shadow-card); }
.detail-map-action {
  min-height: 48px; border: 1.5px solid var(--line); border-radius: 9999px;
  background: #fff; color: var(--brand); font-weight: 800;
}
.detail-disclaimer { opacity: 1; color: var(--muted); }

/* phone: detail opens as a bottom sheet */
@media (max-width: 760px) {
  .detail-overlay { align-items: flex-end; }
  .detail-panel {
    width: 100vw; max-height: 94vh;
    border-radius: 28px 28px 0 0;
    padding: 0 16px 24px;
  }
  .detail-back { margin: 0 -16px 14px; padding: 12px 16px; width: calc(100% + 32px); }
  .detail-actions { grid-template-columns: 1fr 1fr; }
  .detail-actions .primary { grid-column: 1 / -1; }
  .property-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ---------- Chat panel ---------- */
.conversation-panel {
  border: 0;
  border-radius: 28px;
  background: #fff;
  box-shadow: 0 24px 60px rgba(19, 45, 76, .35);
  font-family: var(--font);
  transition: transform .3s var(--ease), opacity .25s var(--ease), height .25s var(--ease);
}
.conversation-panel * { font-family: var(--font); }
.conversation-header { background: var(--brand); color: #fff; border-bottom: 0; padding: 16px 18px; }
.conversation-header-title { font-weight: 800; font-size: 15px; }
.conversation-header-subtitle { opacity: .75; }
.conversation-minimize, .conversation-close { color: #fff; width: 44px; height: 44px; border-radius: 50%; }
.conversation-minimize:hover, .conversation-close:hover { background: rgba(255, 255, 255, .14); color: #fff; }
.conversation-messages { background: var(--page); }
.message { background: #fff; border: 1px solid var(--line); border-radius: 20px 20px 20px 6px; }
.message.mine { background: var(--brand); border-color: var(--brand); color: #fff; border-radius: 20px 20px 6px 20px; }
.message-body { font-size: 14px; }
.message-time { color: var(--muted); font-size: 10px; }
.date-separator span { font-family: var(--font); background: #e3ecf4; color: var(--muted); font-weight: 600; }
.conversation-compose { background: #fff; border-top: 1px solid var(--line); align-items: flex-end; }
.conversation-compose textarea {
  border: 1.5px solid var(--line); border-radius: 20px; background: var(--page);
  color: var(--brand); padding: 12px 16px;
}
.conversation-compose textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px rgba(0, 174, 231, .2); background: #fff; }
.conversation-compose button {
  min-height: 44px; padding: 0 20px; border-radius: 9999px;
  background: var(--accent); color: var(--brand); font-weight: 800;
}
.conversation-compose button:hover { background: #1bbdf3; }

footer { color: var(--muted); opacity: 1; border-top-color: var(--line); }

/* ---------- Small screens ---------- */
@media (max-width: 560px) {
  .hero { padding: 28px 12px 18px; border-radius: 24px; }
  .property-search-row { flex-direction: column; }
  .property-search-row .search-btn { width: 100%; }
  .budget-row { grid-template-columns: 1fr 1fr; }
  .budget-row .search-btn { grid-column: 1 / -1; width: 100%; }
  .filter-row { grid-template-columns: 1fr; }
  .upi-checker-form { flex-direction: column; }
  .upi-checker-form .search-btn { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .card, .advanced-filters.open { animation: none; }
  .card, .search-btn, .card:hover { transition: none; transform: none; }
}

/* ── Paid contact unlock ───────────────────────────────────────── */
.nh-unlock-slot:empty { display: none; }
.nh-unlock-slot { margin-top: 14px; display: grid; gap: 10px; }
.nh-unlock-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; min-height: 48px; padding: 0 22px; border: 0; border-radius: 9999px;
  background: #132d4c; color: #fff; font: 700 15px/1 'Plus Jakarta Sans', system-ui, sans-serif;
  cursor: pointer; transition: transform .25s cubic-bezier(.2,.8,.2,1), box-shadow .25s cubic-bezier(.2,.8,.2,1);
}
.nh-unlock-btn:hover { transform: translateY(-1px); box-shadow: 0 10px 24px rgba(19,45,76,.22); }
.nh-unlock-btn:focus-visible, .nh-unlock-input:focus-visible { outline: 3px solid #00aee7; outline-offset: 2px; }
.nh-unlock-btn.is-locked { background: #e8f6fd; color: #5b6b7f; cursor: not-allowed; box-shadow: none; transform: none; }
.nh-unlock-hint { margin: 0; font-size: 13px; line-height: 1.45; color: #5b6b7f; text-align: center; }

.nh-contact { background: #e8f6fd; border: 1px solid #e3e9f0; border-radius: 20px; padding: 16px; display: grid; gap: 8px; animation: nh-sheet-in .4s cubic-bezier(.2,.8,.2,1); }
.nh-contact-label { font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: #5b6b7f; }
.nh-contact-name { font-size: 17px; font-weight: 800; color: #132d4c; }
.nh-contact-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 48px; padding: 0 16px; border-radius: 9999px; background: #fff; color: #132d4c; text-decoration: none; font-weight: 700; }
.nh-contact-key { font-size: 13px; color: #5b6b7f; font-weight: 600; }

.nh-unlock-backdrop { position: fixed; inset: 0; z-index: 1300; background: rgba(19,45,76,.45); }
.nh-unlock-sheet {
  position: fixed; z-index: 1310; left: 50%; bottom: 0; transform: translateX(-50%);
  width: min(480px, 100%); max-height: 92vh; overflow: auto; box-sizing: border-box;
  background: #fff; border-radius: 28px 28px 0 0; padding: 24px 20px calc(24px + env(safe-area-inset-bottom));
  display: grid; gap: 12px; box-shadow: 0 -20px 60px rgba(19,45,76,.25);
  animation: nh-unlock-up .35s cubic-bezier(.2,.8,.2,1);
}
@media (min-width: 761px) { .nh-unlock-sheet { bottom: auto; top: 50%; transform: translate(-50%, -50%); border-radius: 28px; animation: nh-unlock-pop .3s cubic-bezier(.2,.8,.2,1); } }
.nh-unlock-title { margin: 0; font-size: 22px; font-weight: 800; color: #132d4c; }
.nh-unlock-text { margin: 0; color: #5b6b7f; line-height: 1.5; font-size: 15px; }
.nh-unlock-price { font-size: 34px; font-weight: 800; color: #132d4c; }
.nh-unlock-label { font-size: 13px; font-weight: 700; color: #132d4c; }
.nh-unlock-input { min-height: 52px; padding: 0 18px; border: 1.5px solid #e3e9f0; border-radius: 16px; font: 600 17px 'Plus Jakarta Sans', system-ui, sans-serif; color: #132d4c; }
.nh-unlock-error { margin: 0; min-height: 0; color: #d92d20; font-size: 14px; }
.nh-unlock-error:empty { display: none; }
.nh-unlock-pay { min-height: 52px; border: 0; border-radius: 9999px; background: #132d4c; color: #fff; font: 700 16px 'Plus Jakarta Sans', system-ui, sans-serif; cursor: pointer; }
.nh-unlock-pay:disabled { opacity: .6; cursor: progress; }
.nh-unlock-cancel { min-height: 48px; border: 0; border-radius: 9999px; background: transparent; color: #5b6b7f; font: 600 15px 'Plus Jakarta Sans', system-ui, sans-serif; cursor: pointer; }
.nh-unlock-note { margin: 0; font-size: 12.5px; color: #5b6b7f; text-align: center; line-height: 1.5; }
.nh-unlock-note a { color: #132d4c; }
.nh-unlock-spinner { width: 44px; height: 44px; border-radius: 50%; border: 4px solid #e8f6fd; border-top-color: #00aee7; animation: nh-unlock-spin .9s linear infinite; justify-self: center; }
@keyframes nh-unlock-up { from { transform: translate(-50%, 40px); opacity: 0; } to { transform: translate(-50%, 0); opacity: 1; } }
@keyframes nh-unlock-pop { from { opacity: 0; transform: translate(-50%, -48%) scale(.97); } to { opacity: 1; transform: translate(-50%, -50%); } }
@keyframes nh-unlock-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  .nh-unlock-sheet, .nh-contact, .nh-unlock-spinner { animation: none; }
  .nh-unlock-btn, .nh-unlock-btn:hover { transition: none; transform: none; }
}
