/* ============================================================
   TORONTOPROPERTY.CA — HOMEPAGE STYLESHEET
   Design system: Playfair Display + Inter
   Version: 1.0 — Approved design, March 2026
   ============================================================

   FONT LOADING — add this to <head> in header.php:
   <link rel="preconnect" href="https://fonts.googleapis.com">
   <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
   <link href="https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,500;1,400&family=Inter:wght@300;400;500&display=swap" rel="stylesheet">
   ============================================================ */

/* ── CSS VARIABLES ── */
/* Global transition easing — all elements default to ease timing */
*, *::before, *::after { transition-timing-function: ease; }

:root {
  --tp-paper:   #FAFAF8;   /* page background */
  --tp-ink:     #1A1A1A;   /* headings, primary text */
  --tp-body:    #555555;   /* body paragraphs */
  --tp-blue:    #2C3D55;   /* badges, active nav, links, search btn */
  --tp-amber:   #A07830;   /* CTAs only — ghost pill, fills on hover */
  --tp-muted:   #999999;   /* secondary text, inactive nav */
  --tp-hint:    #C8C8C4;   /* labels, placeholders, meta */
  --tp-rule:    #E2E2DF;   /* dividers, card borders */
  --tp-white:   #FFFFFF;   /* card surfaces, search bar bg */
  --tp-bg:      #F2EFE8;   /* search zone — warmer cream */
  --tp-bgrule:  #D8D4CC;   /* search zone borders */
}

/* ── GLOBAL RESETS ── */
.tp-page *,
.tp-page *::before,
.tp-page *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

.tp-page {
  background: var(--tp-paper);
  font-family: 'Inter', sans-serif;
  color: var(--tp-ink);
  -webkit-font-smoothing: antialiased;
}

/* ============================================================
   1. MASTHEAD
   ============================================================ */

.tp-masthead {
  background: var(--tp-paper);
  border-bottom: 2px solid var(--tp-ink);
  padding: 13px 28px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 24px;
}

/* Logo — keep existing TORONTO/PROPERTY wordmark, just ensure sizing */
.tp-masthead .site-logo,
.tp-masthead .custom-logo-link {
  display: flex;
  flex-direction: column;
  line-height: 1;
  text-decoration: none;
}

/* Nav */
.tp-masthead .tp-nav {
  display: flex;
  justify-content: center;
  gap: 28px;
  list-style: none;
}

.tp-masthead .tp-nav a {
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  font-weight: 400;
  letter-spacing: 0.03em;
  text-transform: none;
  text-decoration: none;
  color: var(--tp-muted);
  position: relative;
  padding-bottom: 3px;
  transition: color 600ms ease;
}

/* Underline slides in from left — action not colour shift */
.tp-masthead .tp-nav a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 1.5px;
  background: var(--tp-ink);
  transition: width 600ms ease;
}

.tp-masthead .tp-nav a:hover {
  color: var(--tp-ink);
}

.tp-masthead .tp-nav a:hover::after,
.tp-masthead .tp-nav a.current-menu-item::after,
.tp-masthead .tp-nav a.active::after {
  width: 100%;
}

.tp-masthead .tp-nav a.current-menu-item,
.tp-masthead .tp-nav a.active {
  color: var(--tp-ink);
}

/* Right — tagline + date */
.tp-masthead-right {
  text-align: right;
}

.tp-masthead-tagline {
  font-family: 'Playfair Display', serif;
  font-size: 10px;
  font-style: italic;
  color: var(--tp-muted);
}

.tp-masthead-date,
.tp-date {
  font-size: 11px;
  color: #C8C8C4;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-top: 3px;
}

/* "Work with us" / Get help button */
.tp-get-help {
  font-size: 14px;
  padding: 8px 20px;
  transition: all 600ms ease;
}
.tp-get-help:hover {
  background: #A07830;
  color: #ffffff;
  transition: all 600ms ease;
}

/* ============================================================
   2. SEARCH ZONE
   NOTE: The RealtyPress search form is a PHP partial.
   Do NOT rebuild the form HTML. Style the existing elements only.
   The zone wrapper, headline and Buy·Rent labels are new HTML
   wrapping the existing form partial.
   ============================================================ */

.tp-search-zone {
  background: var(--tp-bg);
  border-bottom: 0.5px solid var(--tp-bgrule);
  padding: 36px 28px 32px;
}

.tp-search-headline {
  font-family: 'Playfair Display', serif;
  font-size: 56px;
  font-weight: 400;
  color: var(--tp-ink);
  line-height: 1.15;
  margin-bottom: 5px;
}

.tp-search-headline .tp-accent {
  color: var(--tp-blue);
}

.tp-search-subline {
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  color: var(--tp-muted);
  margin-bottom: 16px;
}

/* Buy · Rent — NOT buttons, just two words */
.tp-mode-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 16px;
}

/* These can be <span> elements with JS click handlers,
   or WordPress can output them as links */
.tp-mode-word {
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  cursor: pointer;
  transition: color 600ms ease;
  line-height: 1;
  text-decoration: none;
}

.tp-mode-word.tp-mode-active {
  color: var(--tp-ink);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}

.tp-mode-word.tp-mode-inactive {
  color: var(--tp-hint);
}

.tp-mode-word.tp-mode-inactive:hover {
  color: var(--tp-muted);
}

.tp-mode-sep {
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  color: var(--tp-rule);
  line-height: 1;
}

/* Search input row — wraps the PHP text input + GO button */
.tp-search-input-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

/* Style the RealtyPress text input wrapper */
.tp-search-zone .rp-search-input-wrap,
.tp-search-zone .search-input-wrapper,
.tp-search-zone .tp-search-field {
  flex: 1;
  display: flex;
  align-items: center;
  background: var(--tp-white);
  border: 0.5px solid var(--tp-bgrule);
  border-radius: 2px;
  padding: 0 12px 0 18px;
  height: 50px;
  gap: 10px;
}

/* Style the actual text input */
.tp-search-zone input[type="text"],
.tp-search-zone input[type="search"] {
  flex: 1;
  border: none;
  outline: none;
  font-family: 'Playfair Display', serif;
  font-style: italic;
  font-size: 15px;
  color: var(--tp-ink);
  background: transparent;
}

.tp-search-zone input[type="text"]::placeholder,
.tp-search-zone input[type="search"]::placeholder {
  color: var(--tp-hint);
}

/* Info button — small circle, secondary */
.tp-info-btn {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 1px solid var(--tp-hint);
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  color: var(--tp-hint);
  cursor: pointer;
  flex-shrink: 0;
  font-family: 'Inter', sans-serif;
  font-weight: 500;
  transition: all 600ms ease;
  line-height: 1;
}

.tp-info-btn:hover {
  border-color: var(--tp-blue);
  color: var(--tp-blue);
}

/* Info popover — hidden by default, shown on click */
.tp-info-popover {
  display: none;
  background: var(--tp-white);
  border: 0.5px solid var(--tp-rule);
  border-radius: 2px;
  padding: 16px 20px;
  margin-top: 8px;
  max-width: 500px;
}

.tp-info-popover.tp-popover-open {
  display: block;
}

.tp-info-popover-title {
  font-family: 'Playfair Display', serif;
  font-size: 13px;
  color: var(--tp-ink);
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 0.5px solid var(--tp-rule);
}

.tp-info-popover-item {
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  color: var(--tp-muted);
  padding: 6px 0;
  border-bottom: 0.5px solid var(--tp-rule);
  display: flex;
  gap: 10px;
  line-height: 1.6;
}

.tp-info-popover-item:last-child {
  border-bottom: none;
}

.tp-info-popover-item strong {
  color: var(--tp-ink);
  font-weight: 500;
}

.tp-info-popover-item a {
  color: var(--tp-blue);
  text-decoration: none;
  border-bottom: 1px solid rgba(44,61,85,0.25);
  transition: border-color 600ms ease;
}

.tp-info-popover-item a:hover {
  border-bottom-color: var(--tp-blue);
}

/* Search GO / Search listings button */
.tp-search-zone .rp-search-btn,
.tp-search-zone input[type="submit"],
.tp-search-zone button[type="submit"],
.tp-search-zone .tp-go-btn {
  background: transparent !important;
  color: var(--tp-amber) !important;
  border: 1px solid var(--tp-amber) !important;
  padding: 0 26px !important;
  height: 50px !important;
  font-size: 12px !important;
  font-family: 'Playfair Display', serif !important;
  font-style: italic !important;
  border-radius: 2px !important;
  cursor: pointer !important;
  white-space: nowrap !important;
  transition: all 600ms ease !important;
  flex-shrink: 0 !important;
  letter-spacing: 0.01em !important;
}

.tp-search-zone .rp-search-btn:hover,
.tp-search-zone input[type="submit"]:hover,
.tp-search-zone button[type="submit"]:hover,
.tp-search-zone .tp-go-btn:hover {
  background: var(--tp-amber) !important;
  color: var(--tp-white) !important;
}

/* Filter row — wraps the RealtyPress dropdowns */
.tp-filter-row {
  display: flex;
  align-items: center;
  background: var(--tp-white);
  border: 0.5px solid var(--tp-bgrule);
  border-radius: 2px;
}

/* Style each select wrapper */
.tp-filter-row .tp-fsel,
.tp-filter-row .rp-filter-item {
  flex: 1;
  position: relative;
  display: flex;
  align-items: center;
  border-right: 0.5px solid var(--tp-rule);
}

.tp-filter-row .tp-fsel:last-child,
.tp-filter-row .rp-filter-item:last-child {
  border-right: none;
}

/* Style the actual select elements */
.tp-filter-row select,
.tp-search-zone .rp-select {
  appearance: none;
  -webkit-appearance: none;
  border: none;
  outline: none;
  background: transparent;
  padding: 12px 26px 12px 14px;
  font-size: 11px;
  font-family: 'Inter', sans-serif;
  color: var(--tp-muted);
  cursor: pointer;
  width: 100%;
  transition: color 600ms ease;
}

.tp-filter-row select:focus,
.tp-search-zone .rp-select:focus {
  color: var(--tp-ink);
}

/* Custom dropdown arrow */
.tp-filter-row .tp-fsel::after,
.tp-filter-row .rp-filter-item::after {
  content: '▾';
  position: absolute;
  right: 9px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 8px;
  color: var(--tp-hint);
  pointer-events: none;
}

/* Neighbourhood tags — shown when multiple selected */
.tp-tags-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  background: var(--tp-white);
  border: 0.5px solid var(--tp-bgrule);
  border-radius: 2px;
  padding: 10px 14px;
  min-height: 50px;
  margin-bottom: 10px;
}

.tp-tag {
  display: flex;
  align-items: center;
  gap: 5px;
  background: var(--tp-blue);
  color: #fff;
  font-family: 'Inter', sans-serif;
  font-size: 10px;
  padding: 4px 10px 4px 12px;
  border-radius: 12px;
  white-space: nowrap;
}

.tp-tag-remove {
  opacity: 0.55;
  cursor: pointer;
  font-size: 13px;
  line-height: 1;
  transition: opacity 600ms ease;
  background: none;
  border: none;
  color: #fff;
  padding: 0;
}

.tp-tag-remove:hover {
  opacity: 1;
}

.tp-tags-input {
  border: none;
  outline: none;
  font-size: 12px;
  font-family: 'Playfair Display', serif;
  font-style: italic;
  background: transparent;
  color: var(--tp-ink);
  min-width: 140px;
}

.tp-tags-input::placeholder {
  color: var(--tp-hint);
}

/* ============================================================
   3. QUICK LINKS STRIP
   ============================================================ */

/* Quick links intro — space only, no extra rule */
.tp-ql-header {
  padding: 28px 28px 0;
}
.tp-ql-intro {
  font-family: 'Playfair Display', serif;
  font-style: italic;
  font-size: 14px;
  color: #999;
}

.tp-quicklinks {
  border-bottom: 0.5px solid var(--tp-rule);
  display: grid;
  grid-template-columns: repeat(5, 1fr);
}

.tp-ql-item {
  border-right: 0.5px solid var(--tp-rule);
  padding: 16px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  transition: background 600ms ease;
  cursor: pointer;
}

.tp-ql-item:last-child {
  border-right: none;
}

.tp-ql-item:hover {
  background: var(--tp-white);
}

.tp-ql-item:hover .tp-ql-arr {
  transform: translateX(5px);
  opacity: 1;
}

.tp-ql-num {
  font-family: 'Playfair Display', serif;
  font-size: 18px;
  font-style: italic;
  color: #E2E2DF;
  flex-shrink: 0;
  line-height: 1;
}

.tp-ql-text {
  flex: 1;
}

.tp-ql-label {
  font-family: 'Playfair Display', serif;
  font-size: 15px;
  color: var(--tp-ink);
  line-height: 1.3;
  white-space: nowrap;
}

.tp-ql-sub {
  font-family: 'Inter', sans-serif;
  font-size: 10px;
  color: var(--tp-muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tp-ql-arr {
  font-size: 11px;
  color: var(--tp-blue);
  opacity: 0;
  transition: all 600ms ease;
  margin-left: auto;
  flex-shrink: 0;
}

/* Last item — amber tint CTA */
.tp-ql-item.tp-ql-cta {
  background: rgba(160, 120, 48, 0.07);
}

.tp-ql-item.tp-ql-cta:hover {
  background: rgba(160, 120, 48, 0.13);
}

.tp-ql-item.tp-ql-cta .tp-ql-label {
  color: var(--tp-amber);
}

.tp-ql-item.tp-ql-cta .tp-ql-num {
  color: rgba(160, 120, 48, 0.18);
}

.tp-ql-item.tp-ql-cta .tp-ql-arr {
  color: var(--tp-amber);
  opacity: 0.5;
}

/* ============================================================
   4. SECTION HEADS (shared)
   ============================================================ */

.tp-sec {
  padding: 14px 28px;
  border-bottom: 0.5px solid var(--tp-rule);
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}

.tp-sec-title, .tp-section-title {
  font-family: 'Playfair Display', serif;
  font-size: 28px;
  font-weight: 400;
  color: var(--tp-ink);
}

.tp-sec-sub, .tp-section-sub {
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  color: var(--tp-muted);
  margin-top: 2px;
}

.tp-sec-link, .tp-section-link {
  font-family: 'Playfair Display', serif;
  font-size: 15px;
  font-style: italic;
  color: var(--tp-blue);
  text-decoration: none;
  position: relative;
}

.tp-sec-link::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--tp-blue);
  transition: width 600ms ease;
}

.tp-sec-link:hover::after {
  width: 100%;
}

/* ============================================================
   5. HERO FEATURED LISTING
   ============================================================ */

.tp-hero {
  display: grid;
  grid-template-columns: 55% 45%;
  border-bottom: 0.5px solid var(--tp-rule);
}

.tp-hero-img {
  position: relative;
  overflow: hidden;
  min-height: 320px;
}

.tp-hero-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 800ms ease;
}

.tp-hero-img:hover img {
  transform: scale(1.03);
}

.tp-hero-badge {
  position: absolute;
  top: 16px;
  left: 16px;
  background: var(--tp-blue);
  color: #fff;
  font-family: 'Inter', sans-serif;
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 5px 12px;
  z-index: 2;
}

.tp-hero-text {
  padding: 28px 30px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border-left: 0.5px solid var(--tp-rule);
  background: var(--tp-paper);
}

.tp-hero-kicker {
  font-family: 'Inter', sans-serif;
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--tp-blue);
  margin-bottom: 10px;
}

.tp-hero-address {
  font-family: 'Playfair Display', serif;
  font-size: 40px;
  font-weight: 400;
  line-height: 1.12;
  color: var(--tp-ink);
  margin-bottom: 4px;
}

.tp-hero-address em {
  font-style: italic;
}

.tp-hero-hood {
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  color: var(--tp-muted);
  margin-bottom: 16px;
}

.tp-hero-price {
  font-family: 'Playfair Display', serif;
  font-size: 38px;
  color: var(--tp-ink);
  margin-bottom: 8px;
}

.tp-hero-details {
  display: flex;
  gap: 18px;
  padding-bottom: 14px;
  border-bottom: 0.5px solid var(--tp-rule);
  margin-bottom: 14px;
}

.tp-hero-det {
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  color: var(--tp-muted);
}

.tp-hero-det span {
  color: var(--tp-ink);
  font-weight: 500;
}

.tp-hero-desc {
  font-family: 'Playfair Display', serif;
  font-size: 16px;
  font-style: italic;
  color: var(--tp-muted);
  line-height: 1.75;
  margin-bottom: 20px;
}

/* Primary CTA — solid amber pill */
.tp-cta-primary {
  display: inline-block;
  background: var(--tp-amber);
  color: #fff;
  border: none;
  padding: 11px 26px;
  font-family: 'Playfair Display', serif;
  font-style: italic;
  font-size: 15px;
  border-radius: 20px;
  cursor: pointer;
  text-decoration: none;
  transition: background 600ms ease;
  align-self: flex-start;
  letter-spacing: 0.01em;
}

.tp-cta-primary:hover {
  background: #7A5C20;
  color: #fff;
}

/* Ghost amber CTA — for guides and secondary actions */
.tp-cta-ghost {
  display: inline-block;
  background: transparent;
  color: var(--tp-amber);
  border: 1px solid var(--tp-amber);
  padding: 8px 20px;
  font-family: 'Playfair Display', serif;
  font-style: italic;
  font-size: 15px;
  border-radius: 20px;
  cursor: pointer;
  text-decoration: none;
  transition: all 600ms ease;
  align-self: flex-start;
}

.tp-cta-ghost:hover {
  background: var(--tp-amber);
  color: #fff;
}

/* ============================================================
   6. LISTING CARDS GRID
   ============================================================ */

.tp-listing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-bottom: 0.5px solid var(--tp-rule);
}

.tp-lcard {
  border-right: 0.5px solid var(--tp-rule);
  background: var(--tp-paper);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  display: block;
  transition: background 600ms ease;
}

.tp-lcard:last-child {
  border-right: none;
}

.tp-lcard:hover {
  background: var(--tp-white);
}

.tp-lcard-img-wrap {
  overflow: hidden;
  height: 180px;
  position: relative;
}

.tp-lcard-img-wrap img,
.tp-lcard-img-bg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 800ms ease;
}

.tp-lcard:hover .tp-lcard-img-wrap img,
.tp-lcard:hover .tp-lcard-img-bg {
  transform: scale(1.05);
}

.tp-lcard-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  font-family: 'Inter', sans-serif;
  font-size: 8px;
  font-weight: 500;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  padding: 4px 9px;
  z-index: 2;
}

.tp-badge-sale {
  background: var(--tp-blue);
  color: #fff;
}

.tp-badge-rent {
  background: var(--tp-paper);
  color: var(--tp-blue);
  border: 1px solid var(--tp-blue);
}

.tp-lcard-body {
  padding: 14px 16px 18px;
}

.tp-lcard-type {
  font-family: 'Inter', sans-serif;
  font-size: 9px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--tp-hint);
  margin-bottom: 5px;
}

.tp-lcard-address,
.tp-listing-address {
  font-family: 'Playfair Display', serif;
  font-size: 18px;
  line-height: 1.3;
  color: var(--tp-ink);
  margin-bottom: 2px;
}

.tp-lcard-hood {
  font-family: 'Inter', sans-serif;
  font-size: 10px;
  color: var(--tp-hint);
  margin-bottom: 10px;
}

.tp-lcard-price,
.tp-listing-price {
  font-family: 'Playfair Display', serif;
  font-size: 20px;
  color: var(--tp-ink);
  margin-bottom: 8px;
}

.tp-lcard-meta {
  display: flex;
  gap: 12px;
  padding-top: 9px;
  border-top: 0.5px solid var(--tp-rule);
}

.tp-lcard-meta span {
  font-family: 'Inter', sans-serif;
  font-size: 10px;
  color: var(--tp-muted);
}

/* ============================================================
   7. NEIGHBOURHOOD GRID
   ============================================================ */

.tp-ngrid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  grid-template-rows: 190px 190px;
  border-bottom: 0.5px solid var(--tp-rule);
}

.tp-ncard {
  position: relative;
  overflow: hidden;
  border-right: 0.5px solid var(--tp-rule);
  border-bottom: 0.5px solid var(--tp-rule);
  cursor: pointer;
  text-decoration: none;
  display: block;
}

/* Large featured card spans both rows */
.tp-ncard:nth-child(1) {
  grid-row: 1 / 3;
  border-bottom: none;
}

.tp-ncard:nth-child(2) {
  border-bottom: 0.5px solid var(--tp-rule);
}

.tp-ncard:nth-child(3) {
  border-right: none;
}

.tp-ncard:nth-child(4) {
  border-bottom: none;
}

.tp-ncard:nth-child(5) {
  border-right: none;
  border-bottom: none;
}

/* Background image */
.tp-ncard-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transition: transform 800ms ease;
}

.tp-ncard:hover .tp-ncard-bg {
  transform: scale(1.05);
}

/* Gradient overlay — strong enough to work with any photo */
.tp-ncard-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(10, 14, 20, 0.82) 0%,
    rgba(10, 14, 20, 0.15) 55%,
    transparent 100%
  );
  transition: opacity 600ms ease;
}

.tp-ncard:hover .tp-ncard-overlay {
  opacity: 0.88;
}

/* Text */
.tp-ncard-text {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 16px 18px;
  transition: transform 600ms ease;
}

.tp-ncard:hover .tp-ncard-text {
  transform: translateY(-5px);
}

.tp-ncard-name {
  font-family: 'Playfair Display', serif;
  font-size: 17px;
  font-weight: 400;
  color: #fff;
  margin-bottom: 2px;
}

.tp-ncard:nth-child(1) .tp-ncard-name {
  font-size: 24px;
}

.tp-ncard-count {
  font-family: 'Inter', sans-serif;
  font-size: 10px;
  color: rgba(255, 255, 255, 0.5);
}

.tp-ncard-explore {
  font-family: 'Playfair Display', serif;
  font-size: 11px;
  font-style: italic;
  color: rgba(255, 255, 255, 0);
  transition: color 600ms ease;
  margin-top: 4px;
  display: block;
}

.tp-ncard:hover .tp-ncard-explore {
  color: rgba(255, 255, 255, 0.75);
}

/* ============================================================
   8. GUIDES SECTION
   ============================================================ */

.tp-guides {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-bottom: 0.5px solid var(--tp-rule);
}

.tp-gcard {
  border-right: 0.5px solid var(--tp-rule);
  padding: 32px;
  background: var(--tp-paper);
  transition: background 600ms ease;
  display: flex;
  flex-direction: column;
}

.tp-gcard:last-child {
  border-right: none;
}

.tp-gcard:hover {
  background: var(--tp-white);
}

/* Amber stripe — introduces amber before the button */
.tp-gcard-stripe {
  height: 1.5px;
  background: var(--tp-amber);
  opacity: 0.3;
  margin-bottom: 18px;
  border-radius: 1px;
}

.tp-gcard-label {
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--tp-muted);
  margin-bottom: 8px;
}

.tp-gcard-title {
  font-family: 'Playfair Display', serif;
  font-size: 24px;
  font-weight: 400;
  color: var(--tp-ink);
  line-height: 1.3;
  margin-bottom: 10px;
}

.tp-gcard-title em {
  font-style: italic;
}

.tp-gcard-desc {
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  color: var(--tp-muted);
  line-height: 1.75;
  margin-bottom: 20px;
  flex: 1;
}

/* ============================================================
   9. FOOTER
   ============================================================ */

.tp-footer {
  background: var(--tp-ink);
  padding: 26px 28px 20px;
}

.tp-footer-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding-bottom: 20px;
  border-bottom: 0.5px solid rgba(255, 255, 255, 0.08);
  margin-bottom: 16px;
}

.tp-footer-logo-top {
  font-family: 'Inter', sans-serif;
  font-size: 16px;
  font-weight: 500;
  letter-spacing: 0.12em;
  color: #fff;
}

.tp-footer-logo-bottom {
  font-family: 'Inter', sans-serif;
  font-size: 9px;
  letter-spacing: 0.28em;
  color: rgba(255, 255, 255, 0.3);
  margin-top: 2px;
}

.tp-footer-tagline {
  font-family: 'Playfair Display', serif;
  font-size: 11px;
  font-style: italic;
  color: rgba(255, 255, 255, 0.28);
  margin-top: 10px;
}

.tp-footer-date {
  font-family: 'Inter', sans-serif;
  font-size: 9px;
  color: rgba(255, 255, 255, 0.18);
  margin-top: 8px;
}

.tp-footer-nav-cols {
  display: flex;
  gap: 44px;
}

.tp-footer-col-title {
  font-family: 'Inter', sans-serif;
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.22);
  margin-bottom: 10px;
}

.tp-footer-col a {
  display: block;
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.42);
  text-decoration: none;
  margin-bottom: 7px;
  transition: color 600ms ease;
}

.tp-footer-col a:hover {
  color: rgba(255, 255, 255, 0.85);
}

.tp-footer-bottom {
  display: flex;
  justify-content: space-between;
}

.tp-footer-copy {
  font-family: 'Inter', sans-serif;
  font-size: 9px;
  color: rgba(255, 255, 255, 0.18);
}

/* ============================================================
   10. INTERNAL SEARCH PAGE
   Reuses the same search zone. Additional styles for
   the listing results context.
   ============================================================ */

/* Breadcrumb */
.tp-breadcrumb {
  padding: 10px 28px;
  border-bottom: 0.5px solid var(--tp-rule);
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  color: var(--tp-muted);
}

.tp-breadcrumb a {
  color: var(--tp-muted);
  text-decoration: none;
  transition: color 600ms ease;
}

.tp-breadcrumb a:hover {
  color: var(--tp-ink);
}

.tp-breadcrumb .tp-bc-sep {
  margin: 0 6px;
  color: var(--tp-rule);
}

.tp-breadcrumb .tp-bc-current {
  color: var(--tp-ink);
}

/* Page title (neighbourhood/search results) */
.tp-page-title {
  padding: 24px 28px 20px;
  border-bottom: 0.5px solid var(--tp-rule);
}

.tp-page-title h1 {
  font-family: 'Playfair Display', serif;
  font-size: 32px;
  font-weight: 400;
  color: var(--tp-ink);
  line-height: 1.2;
}

/* Buy/Rent/All tabs for search results */
.tp-result-tabs {
  display: flex;
  gap: 0;
  padding: 0 28px;
  border-bottom: 0.5px solid var(--tp-rule);
}

.tp-result-tab {
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 10px 18px;
  cursor: pointer;
  color: var(--tp-muted);
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  transition: all 600ms ease;
}

.tp-result-tab.tp-tab-active {
  color: var(--tp-ink);
  border-bottom-color: var(--tp-blue);
}

.tp-result-tab:hover {
  color: var(--tp-ink);
}

/* Results count + sort bar */
.tp-results-bar {
  padding: 10px 28px;
  border-bottom: 0.5px solid var(--tp-rule);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.tp-results-count {
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  color: var(--tp-muted);
}

.tp-sort-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

.tp-sort-label {
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  color: var(--tp-muted);
}

.tp-sort-select {
  appearance: none;
  border: 0.5px solid var(--tp-rule);
  border-radius: 2px;
  padding: 6px 24px 6px 10px;
  font-size: 11px;
  font-family: 'Inter', sans-serif;
  color: var(--tp-ink);
  background: var(--tp-white);
  cursor: pointer;
  outline: none;
}

/* ============================================================
   11. SINGLE LISTING PAGE
   ============================================================ */

.tp-listing-hero {
  position: relative;
  height: 420px;
  overflow: hidden;
  border-bottom: 0.5px solid var(--tp-rule);
}

.tp-listing-hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.tp-listing-thumbs {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 2px;
  border-bottom: 0.5px solid var(--tp-rule);
}

.tp-listing-thumb {
  height: 70px;
  overflow: hidden;
  cursor: pointer;
}

.tp-listing-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 600ms ease;
}

.tp-listing-thumb:hover img {
  transform: scale(1.08);
}

.tp-listing-body {
  display: grid;
  grid-template-columns: 1fr 300px;
  border-bottom: 0.5px solid var(--tp-rule);
}

.tp-listing-main {
  padding: 28px;
  border-right: 0.5px solid var(--tp-rule);
}

.tp-listing-kicker {
  font-family: 'Inter', sans-serif;
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--tp-blue);
  margin-bottom: 10px;
}

.tp-listing-address {
  font-family: 'Playfair Display', serif;
  font-size: 18px;
  font-weight: 400;
  line-height: 1.12;
  color: var(--tp-ink);
  margin-bottom: 4px;
}

.tp-listing-address em {
  font-style: italic;
}

.tp-listing-hood {
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  color: var(--tp-muted);
  margin-bottom: 20px;
}

.tp-listing-desc {
  font-family: 'Playfair Display', serif;
  font-size: 14px;
  font-style: italic;
  color: var(--tp-body);
  line-height: 1.8;
  margin-bottom: 24px;
  padding-bottom: 24px;
  border-bottom: 0.5px solid var(--tp-rule);
}

.tp-listing-facts {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.tp-fact-label {
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--tp-hint);
  margin-bottom: 3px;
}

.tp-fact-val {
  font-family: 'Playfair Display', serif;
  font-size: 14px;
  color: var(--tp-ink);
}

/* Sidebar */
.tp-listing-side {
  padding: 28px;
}

.tp-listing-price {
  font-family: 'Playfair Display', serif;
  font-size: 20px;
  color: var(--tp-ink);
  margin-bottom: 4px;
}

.tp-listing-price-label {
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--tp-muted);
  margin-bottom: 20px;
}

.tp-listing-cta-stack {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 24px;
}

.tp-listing-cta-stack .tp-cta-primary {
  text-align: center;
  width: 100%;
}

.tp-listing-cta-stack .tp-cta-ghost {
  text-align: center;
  width: 100%;
}

.tp-agent {
  border-top: 0.5px solid var(--tp-rule);
  padding-top: 16px;
}

.tp-agent-label {
  font-family: 'Inter', sans-serif;
  font-size: 8px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--tp-hint);
  margin-bottom: 6px;
}

.tp-agent-name {
  font-family: 'Playfair Display', serif;
  font-size: 14px;
  color: var(--tp-ink);
  margin-bottom: 2px;
}

.tp-agent-office {
  font-family: 'Inter', sans-serif;
  font-size: 10px;
  color: var(--tp-muted);
}

/* ============================================================
   12. RESPONSIVE — basic mobile handling
   ============================================================ */

@media (max-width: 768px) {
  .tp-masthead {
    grid-template-columns: 1fr auto;
    padding: 12px 16px;
  }

  .tp-masthead .tp-nav {
    display: none; /* hamburger menu handles this */
  }

  .tp-search-zone {
    padding: 24px 16px 20px;
  }

  .tp-search-headline {
    font-size: 26px;
  }

  .tp-search-input-row {
    flex-direction: column;
    align-items: stretch;
  }

  .tp-filter-row {
    flex-wrap: wrap;
  }

  .tp-fsel {
    flex: 1 1 50%;
    border-bottom: 0.5px solid var(--tp-rule);
  }

  .tp-quicklinks {
    grid-template-columns: 1fr;
  }

  .tp-ql-item {
    border-right: none;
  }

  .tp-ql-label { white-space: normal; }
  .tp-ql-sub   { white-space: normal; }

  .tp-hero {
    grid-template-columns: 1fr;
  }

  .tp-hero-img {
    min-height: 240px;
  }

  .tp-hero-text {
    border-left: none;
    border-top: 0.5px solid var(--tp-rule);
  }

  .tp-listing-grid {
    grid-template-columns: 1fr;
  }

  .tp-lcard {
    border-right: none;
    border-bottom: 0.5px solid var(--tp-rule);
  }

  .tp-ngrid {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: repeat(3, 160px);
  }

  .tp-ncard:nth-child(1) {
    grid-column: 1 / 3;
    grid-row: 1;
  }

  .tp-guides {
    grid-template-columns: 1fr;
  }

  .tp-gcard {
    border-right: none;
    border-bottom: 0.5px solid var(--tp-rule);
  }

  .tp-listing-body {
    grid-template-columns: 1fr;
  }

  .tp-listing-side {
    border-top: 0.5px solid var(--tp-rule);
  }

  .tp-footer {
    padding: 32px 20px 24px;
    text-align: center;
  }

  .tp-footer-top {
    flex-direction: column;
    gap: 0;
    align-items: center;
  }

  .tp-footer-brand {
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .tp-footer-tagline {
    margin-top: 8px;
  }

  .tp-footer-date {
    margin-top: 6px;
  }

  .tp-footer-nav-cols {
    gap: 0;
    flex-wrap: nowrap;
    justify-content: center;
    width: 100%;
    margin-top: 28px;
  }

  .tp-footer-col {
    flex: 1;
    text-align: center;
  }

  .tp-footer-bottom {
    flex-direction: column;
    align-items: center;
    gap: 6px;
    text-align: center;
  }
}

/* ── SEARCH FIELD — neighbourhood tag pills ── */
.tp-search-field.has-tags {
  height: auto;
  min-height: 54px;
  flex-wrap: wrap;
  padding: 10px 14px 10px 20px;
  align-items: center;
  gap: 6px;
}
.tp-search-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--tp-blue);
  color: #fff;
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  font-weight: 400;
  padding: 5px 10px 5px 13px;
  border-radius: 14px;
  white-space: nowrap;
  flex-shrink: 0;
  transition: background 600ms ease;
}
.tp-search-tag:hover { background: #1e2d40; }
.tp-tag-remove {
  opacity: 0.55;
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
  transition: opacity 600ms ease;
  background: none;
  border: none;
  color: #fff;
  padding: 0;
}
.tp-tag-remove:hover { opacity: 1; }
.tp-tags-input {
  border: none;
  outline: none;
  font-family: 'Playfair Display', serif;
  font-style: italic;
  font-size: 15px;
  color: var(--tp-ink);
  background: transparent;
  min-width: 140px;
  flex: 1;
  padding: 2px 0;
}
.tp-tags-input::placeholder { color: var(--tp-hint); }
.tp-search-bar.has-tags { align-items: flex-start; }
.tp-search-bar.has-tags .tp-filters-btn,
.tp-search-bar.has-tags .tp-search-go { align-self: flex-start; }
.tp-filter-checkbox { cursor: pointer; opacity: 0.3; transition: opacity 600ms ease; }
.tp-filter-checkbox.checked { opacity: 1; color: var(--tp-blue); }

/* Mobile search bar — stack on small screens */
@media (max-width: 640px) {
  .tp-search-bar { flex-wrap: wrap; }
  .tp-search-zone .tp-search-field { flex: 1 1 100%; }
  .tp-filters-btn { flex: 1; }
  .tp-search-go { flex: 1; }
}

/* ============================================================
   HOMEPAGE LISTING CARDS — tp-card grid (matches search results)
   ============================================================ */

.tp-listing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-left: 0.5px solid #E2E2DF;
  border-top: 0.5px solid #E2E2DF;
  margin: 0 40px 60px;
}

@media (max-width: 768px) {
  .tp-listing-grid {
    grid-template-columns: 1fr;
    margin: 0 0 40px;
    border-left: none;
  }
  .tp-listing-grid .tp-card {
    border-left: none;
    border-right: none;
  }
}

.tp-listing-grid .tp-card {
  border-right: 0.5px solid #E2E2DF;
  border-bottom: 0.5px solid #E2E2DF;
  overflow: hidden;
  cursor: pointer;
  transition: background 600ms ease;
  text-decoration: none;
  display: block;
  color: inherit;
  background: #FAFAF8;
  position: relative;
}
.tp-listing-grid .tp-card:hover { background: #FFFFFF; }

.tp-listing-grid .tp-card-img {
  height: 200px;
  overflow: hidden;
  position: relative;
}
.tp-listing-grid .tp-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 800ms ease;
}
.tp-listing-grid .tp-card:hover .tp-card-img img { transform: scale(1.05); }

.tp-listing-grid .tp-card-badges {
  position: absolute; top: 10px; left: 10px;
  display: flex; gap: 5px; z-index: 1;
}
.tp-listing-grid .tp-badge {
  font-family: 'Inter', sans-serif;
  font-size: 9px; font-weight: 500;
  letter-spacing: 0.10em; text-transform: uppercase;
  padding: 3px 8px; line-height: 1.4;
}
.tp-listing-grid .tp-badge-sale { background: #2C3D55; color: #FFFFFF; }
.tp-listing-grid .tp-badge-rent { background: #FFFFFF; color: #2C3D55; border: 0.5px solid #2C3D55; }
.tp-listing-grid .tp-badge-new  { background: #A07830; color: #FFFFFF; }

.tp-listing-grid .tp-card-save {
  position: absolute; top: 10px; right: 10px;
  background: rgba(0,0,0,0.38);
  border: none; width: 28px; height: 28px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: background 600ms ease; z-index: 1;
}
.tp-listing-grid .tp-card-save:hover { background: rgba(0,0,0,0.60); }
.tp-listing-grid .tp-card-save svg {
  width: 12px; height: 12px;
  stroke: #FFFFFF; fill: none;
  stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round;
}
.tp-listing-grid .tp-card-save.saved svg { fill: #FFFFFF; }

.tp-listing-grid .tp-card-body { padding: 13px 14px 16px; }

.tp-listing-grid .tp-card-type {
  font-family: 'Inter', sans-serif;
  font-size: 9px; font-weight: 500;
  letter-spacing: 0.10em; text-transform: uppercase;
  color: #C8C8C4; margin-bottom: 5px;
}
.tp-listing-grid .tp-card-address {
  font-family: 'Playfair Display', serif;
  font-size: 17px; font-weight: 400;
  color: #1A1A1A; line-height: 1.2; margin-bottom: 2px;
}
.tp-listing-grid .tp-card-neighbourhood {
  font-family: 'Inter', sans-serif;
  font-size: 11px; color: #C8C8C4; margin-bottom: 9px;
}
.tp-listing-grid .tp-card-price {
  font-family: 'Playfair Display', serif;
  font-size: 19px; font-weight: 400;
  color: #1A1A1A; margin-bottom: 8px;
}
.tp-listing-grid .tp-card-meta {
  display: flex; gap: 10px;
  padding-top: 8px; border-top: 0.5px solid #E2E2DF;
  font-family: 'Inter', sans-serif;
  font-size: 11px; color: #999999; align-items: center;
}
.tp-listing-grid .tp-card-meta-item { display: flex; align-items: center; gap: 4px; }
.tp-listing-grid .tp-card-dom {
  font-family: 'Inter', sans-serif;
  font-size: 10px; color: #C8C8C4; margin-top: 5px;
}

/* Favourites button + badge + overlay + drawer — must match internal-pages.css */
.tp-favs-btn {
  position: relative; background: none; border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  padding: 4px; color: var(--tp-muted);
  transition: color 600ms ease; flex-shrink: 0;
}
.tp-favs-btn:hover { color: var(--tp-ink); }
.tp-favs-btn svg { width: 20px; height: 20px; }
#tp-favs-badge {
  display: none; position: absolute; top: -3px; right: -5px;
  background: var(--tp-amber); color: #fff;
  font-family: 'Inter', sans-serif; font-size: 9px; font-weight: 500;
  min-width: 16px; height: 16px; border-radius: 8px;
  align-items: center; justify-content: center;
  padding: 0 4px; line-height: 1;
}

/* Favourites overlay and drawer — must match internal-pages.css */
#tp-favs-overlay {
  position: fixed; inset: 0;
  background: rgba(10,12,18,.35);
  z-index: 500; opacity: 0; pointer-events: none;
  transition: opacity 600ms ease;
}
#tp-favs-overlay.open { opacity: 1; pointer-events: all; }
#tp-favs-drawer {
  position: fixed; top: 0; right: 0; bottom: 0;
  width: 380px; max-width: 100vw;
  background: var(--tp-paper);
  border-left: 0.5px solid var(--tp-rule);
  z-index: 501; display: flex; flex-direction: column;
  transform: translateX(100%);
  transition: transform 600ms ease;
  overflow: hidden;
}
#tp-favs-drawer.open { transform: translateX(0); }
