/* ============================================================
   Property Card — V1b "Refined"
   Brand tokens: teal #2FB5B5 · orange #EE6B2D · ink #15161C
   Font: DM Sans (self-hosted — see ../fonts/dm-sans-*-latin.woff2)
   ============================================================ */

/* Self-hosted DM Sans, latin subset, weights 500/600/700/800.
   Files live next to this CSS in ../fonts/. Self-hosting eliminates
   the round-trip to fonts.googleapis.com + fonts.gstatic.com — the
   browser fetches the font on the same HTTP/2 connection as the page,
   so DM Sans is available on the first paint and there is no swap. */
@font-face {
  font-family: "DM Sans";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("../fonts/dm-sans-500-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "DM Sans";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../fonts/dm-sans-600-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "DM Sans";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../fonts/dm-sans-700-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "DM Sans";
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url("../fonts/dm-sans-800-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* Metric-adjusted Arial fallback. Kept as belt-and-braces: in the rare
   case the woff2 fetch is still in flight when the first paint happens
   (slow networks, cold cache), Arial scaled to ~DM Sans metrics is what
   the browser uses — so the visible swap is minimal. */
@font-face {
  font-family: "DM Sans Fallback";
  src: local("Arial");
  size-adjust: 102%;
  ascent-override: 95%;
  descent-override: 25%;
  line-gap-override: 0%;
}

.igx-card-v1b,
.igx-card-v1b * {
  box-sizing: border-box;
}

.igx-card-v1b {
  --igx-teal:   #2FB5B5;
  --igx-orange: #EE6B2D;
  --igx-ink:    #15161C;
  --igx-mute:   #6A6B73;
  --igx-quiet:  #A8A6A0;
  --igx-line:   #EFEDE7;
  --igx-divider:#E5E3DE;

  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  background: #fff;
  color: var(--igx-ink);
  font-family: "DM Sans", "DM Sans Fallback", Arial, system-ui, sans-serif;
  font-weight: 500;
  font-size: 14px;
  line-height: 1.4;
  border: 1px solid rgba(20, 22, 30, .06);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 1px 0 rgba(0, 0, 0, .04), 0 12px 36px -16px rgba(20, 22, 30, .18);
  transition: transform .25s ease, box-shadow .25s ease;
}

.igx-card-v1b:hover {
  transform: translateY(-2px);
  box-shadow: 0 1px 0 rgba(0, 0, 0, .04), 0 18px 40px -16px rgba(20, 22, 30, .24);
}

/* ---------- Image block ---------- */
.igx-card-v1b__image-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  background: #eee;
  overflow: hidden;
}

.igx-card-v1b__image-link {
  display: block;
  width: 100%;
  height: 100%;
}

.igx-card-v1b__image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.igx-card-v1b__image--placeholder {
  background: linear-gradient(135deg, #f1f5f9 0%, #e5e7eb 100%);
}

/* Subtle top gradient so chips have contrast on bright photos */
.igx-card-v1b__image-overlay {
  position: absolute;
  inset: 0 0 auto 0;
  height: 90px;
  background: linear-gradient(180deg, rgba(0, 0, 0, .18) 0%, rgba(0, 0, 0, 0) 100%);
  pointer-events: none;
}

/* ---------- Property-type chip (top-left) ---------- */
.igx-card-v1b__type-chip {
  position: absolute;
  top: 14px;
  left: 14px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px 8px 12px;
  background: #fff;
  color: var(--igx-ink);
  border: none;
  border-radius: 999px;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: -.005em;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, .18), 0 0 0 1px rgba(0, 0, 0, .04);
  transition: transform .15s ease, box-shadow .15s ease;
}

.igx-card-v1b__type-chip:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, .22), 0 0 0 1px rgba(0, 0, 0, .04);
  color: var(--igx-ink);
  text-decoration: none;
}

.igx-card-v1b__type-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--igx-teal);
  flex: 0 0 auto;
}

.igx-card-v1b__type-label {
  line-height: 1;
}

/* ---------- Compare chip (top-right) ---------- */
/* Note: the button also carries class `.igx-prop-compare-btn` so the
   global compare-flyout JS in `ignitix-compare-properties` can hook into
   it. That plugin ships its own CSS that forces a 28x28 orange square —
   we override the conflicting size/background/border rules with !important
   because the plugin CSS loads after ours and uses the same specificity. */
.igx-card-v1b__compare,
.igx-card-v1b .igx-prop-compare-btn,
button.igx-card-v1b__compare.igx-prop-compare-btn {
  position: absolute;
  top: 14px;
  right: 14px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px 8px 10px !important;
  background: #fff !important;
  color: var(--igx-ink) !important;
  border: none !important;
  border-radius: 999px !important;
  font: inherit;
  font-size: 12.5px !important;
  font-weight: 600 !important;
  line-height: 1 !important;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, .18), 0 0 0 1px rgba(0, 0, 0, .04) !important;
  transition: transform .15s ease, box-shadow .15s ease;
  /* override compare-properties 28x28 forcing */
  height: auto !important;
  width: auto !important;
  min-height: 0;
  min-width: 0;
}

.igx-card-v1b__compare:hover,
.igx-card-v1b .igx-prop-compare-btn:hover,
button.igx-card-v1b__compare.igx-prop-compare-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, .22), 0 0 0 1px rgba(0, 0, 0, .04) !important;
  background: #fff !important;
  color: var(--igx-ink) !important;
}

/* When the compare-flyout JS marks the button as "selected", flip to
   solid teal pill — clearer indicator the property is on the list. */
.igx-card-v1b__compare.igx-prop-compare-selected,
button.igx-card-v1b__compare.igx-prop-compare-btn.igx-prop-compare-selected {
  background: var(--igx-teal);
  color: #fff;
}
.igx-card-v1b__compare.igx-prop-compare-selected .igx-card-v1b__compare-icon {
  background: #fff;
  color: var(--igx-teal);
}

.igx-card-v1b__compare-icon {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--igx-teal);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}

.igx-card-v1b__compare-label {
  line-height: 1;
}

/* ---------- Discount sticker (bottom-right of image) ---------- */
.igx-card-v1b__discount {
  position: absolute;
  bottom: 14px;
  right: 14px;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: var(--igx-orange);
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  line-height: 1;
  transform: rotate(-8deg);
  box-shadow: 0 6px 16px rgba(238, 107, 45, .45);
  font-family: "DM Sans", "DM Sans Fallback", Arial, sans-serif;
  text-align: center;
}

.igx-card-v1b__discount-pct {
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -.01em;
}

.igx-card-v1b__discount-suffix {
  font-size: 8.5px;
  letter-spacing: .12em;
  margin-top: 2px;
  font-weight: 700;
  opacity: .92;
}

/* ---------- Body ---------- */
.igx-card-v1b__body {
  padding: 18px 20px 20px;
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 14px;
}

/* Location breadcrumb */
.igx-card-v1b__crumb {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--igx-ink);
}

.igx-card-v1b__crumb-pin {
  display: inline-flex;
  align-items: center;
  color: var(--igx-orange);
  flex: 0 0 auto;
}

.igx-card-v1b__crumb-text {
  font-weight: 500;
  color: var(--igx-ink);
}

.igx-card-v1b__crumb-link {
  color: var(--igx-ink);
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-thickness: 1px;
  text-decoration-color: rgba(0, 0, 0, .25);
}

.igx-card-v1b__crumb-link:hover {
  text-decoration-color: currentColor;
  color: var(--igx-ink);
}

.igx-card-v1b__crumb-sep {
  color: var(--igx-quiet);
  margin: 0 4px;
}

/* Title — 2-line clamp with reserved vertical space so cards stay equal
   height even when one title fits in a single line. */
.igx-card-v1b__title {
  margin: 0;
  font-family: "DM Sans", "DM Sans Fallback", Arial, sans-serif;
  font-weight: 600;
  font-size: 16px;
  line-height: 1.2;
  letter-spacing: -.018em;
  text-wrap: pretty;

  /* Clamp to 2 lines */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;

  /* Reserve the full 2-line height regardless of actual content
     so all cards in a row have identical heights. 2 lines × 1.2 line-height. */
  min-height: calc(2 * 1.2em);
}

.igx-card-v1b__title a {
  color: var(--igx-ink);
  text-decoration: none;
  /* The clamp lives on the <h3>; the inner <a> just inherits and stays
     clickable across both visible lines. */
  display: block;
}

.igx-card-v1b__title a:hover {
  color: var(--igx-ink);
  text-decoration: none;
}

/* Specs strip */
.igx-card-v1b__specs {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 13px;
  font-weight: 600;
  color: var(--igx-ink);
}

.igx-card-v1b__spec {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  line-height: 1;
}

.igx-card-v1b__spec-icon {
  display: inline-flex;
  align-items: center;
  color: var(--igx-teal);
}

.igx-card-v1b__spec-val {
  line-height: 1;
}

.igx-card-v1b__spec-divider {
  display: inline-block;
  width: 1px;
  height: 14px;
  background: var(--igx-divider);
}

.igx-card-v1b__spec--cap {
  color: var(--igx-mute);
  font-weight: 500;
  gap: 4px;
}

.igx-card-v1b__cap-pair {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.igx-card-v1b__cap-dot {
  margin: 0 1px;
}

/* Pushes footer to bottom for equal-height cards */
.igx-card-v1b__spacer {
  flex: 1 1 auto;
}

/* ---------- Footer (price + CTA) ---------- */
.igx-card-v1b__footer {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  border-top: 1px solid var(--igx-line);
  padding-top: 14px;
}

.igx-card-v1b__price-block {
  display: flex;
  flex-direction: column;
}

.igx-card-v1b__price-kicker {
  font-size: 11px;
  color: var(--igx-mute);
  letter-spacing: .08em;
  text-transform: uppercase;
  font-weight: 600;
  margin-bottom: 3px;
}

.igx-card-v1b__price-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
  color: var(--igx-ink);
}

.igx-card-v1b__price-row--quiet {
  color: var(--igx-quiet);
  font-size: 14px;
}

.igx-card-v1b__price-amount {
  font-weight: 800;
  font-size: 18px;
  line-height: 1;
  letter-spacing: -.015em;
}

.igx-card-v1b__price-unit {
  font-size: 13px;
  color: var(--igx-mute);
  font-weight: 500;
}

.igx-card-v1b__price-compare {
  margin-top: 3px;
  font-size: 12px;
  color: var(--igx-quiet);
  text-decoration: line-through;
}

/* CTA */
.igx-card-v1b__cta {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: var(--igx-orange);
  color: #fff;
  font: inherit;
  font-size: 13.5px;
  font-weight: 700;
  border: none;
  cursor: pointer;
  padding: 12px 16px;
  border-radius: 10px;
  white-space: nowrap;
  text-decoration: none;
  box-shadow: 0 6px 16px -8px rgba(238, 107, 45, .6);
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}

.igx-card-v1b__cta:hover {
  background: #d65f24;
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 8px 20px -8px rgba(238, 107, 45, .7);
  text-decoration: none;
}

.igx-card-v1b__cta-arrow {
  display: inline-flex;
  align-items: center;
}

/* ---------- Responsive: mobile single column ---------- */
@media (max-width: 480px) {
  .igx-card-v1b__title { font-size: 15px; }
  .igx-card-v1b__specs { font-size: 12.5px; gap: 10px; }
  .igx-card-v1b__price-amount { font-size: 17px; }
  .igx-card-v1b__cta { padding: 11px 14px; font-size: 13px; }
  .igx-card-v1b__body { padding: 16px 18px 18px; }
  .igx-card-v1b__discount {
    width: 50px;
    height: 50px;
  }
  .igx-card-v1b__discount-pct { font-size: 15px; }
}

/* ============================================================
   Back-compat: legacy classes used by older templates / APD card.
   Kept so any third-party usage (compound-properties-slider,
   all-properties-directory, compound-featured-properties) keeps
   rendering until they migrate.
   ============================================================ */
.ps-comp-loc {
  display: flex; align-items: center; gap: .35em;
  color: #475569; font-size: 13px; margin: 0 0 6px;
}
.ps-comp-loc:before {
  content: "\f3c5";
  font-family: "Font Awesome 5 Free";
  font-weight: 900;
  color: #ec6122;
  font-size: 1em;
  margin-right: .3em;
}
.ps-comp-loc a { color: #475569; text-decoration: underline; text-underline-offset: 2px; }
.ps-comp-loc a:hover { color: #334155; }
.apd-stats { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 6px 0 10px; }
.apd-stat { display: inline-flex; align-items: center; gap: 8px; min-height: 22px; }
.apd-stat i { color: #19b1bc; font-size: 18px; line-height: 1; }
.apd-sep { width: 1px; height: 18px; background: #e5e7eb; display: inline-block; }

/* ---------- Defensive override: keep "View Details" CTA text white ----------
   Porto applies `body :not(i):not([class*="fa-"]):not(button)... { color: ... !important }`
   with (0,6,1)+ specificity, which beats .igx-card-v1b__cta (0,1,0) and the
   anchor inside it. Bump our selector specificity past Porto by chaining
   html body and the card class enough times that we win the cascade. */
html body .igx-card-v1b .igx-card-v1b__cta,
html body .igx-card-v1b .igx-card-v1b__cta:link,
html body .igx-card-v1b .igx-card-v1b__cta:visited,
html body .igx-card-v1b .igx-card-v1b__cta:hover,
html body .igx-card-v1b .igx-card-v1b__cta:active,
html body .igx-card-v1b .igx-card-v1b__cta:focus,
html body .igx-card-v1b .igx-card-v1b__cta * {
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
}
