/*
 * Property cards: grid (JetEngine listing 252) and inline (listing 314).
 * docs/design/components/property-card-{grid,inline}.md, docs/design/elementor-css/post-252.css / post-314.css.
 * Widgets stack as flex-wrap items; full-width widgets get the kit's 20px spacing below them,
 * width-auto widgets (the price) do not. No purpose badge and no "/ mo" (ruling P3).
 */
.property-card {
  position: relative;
  display: flex;
  background-color: var(--color-white);
  box-shadow: var(--shadow-card);
  transition: background 0.3s, border 0.3s, border-radius 0.3s, box-shadow 0.3s;
}

.property-card__title {
  display: flex;
  width: 100%;
  font-size: var(--fs-h4);
  line-height: var(--lh-h4);
}
.property-card__title a {
  display: flex;
  align-items: center;
  justify-content: center;
  align-self: flex-start;
  color: var(--gray-700);
}
.property-card__title a:hover {
  color: var(--color-primary);
}

.property-card__address {
  width: 100%;
  color: var(--color-text);
}

.property-card__price {
  width: auto;
  color: var(--gray-700);
  font-size: var(--fs-h6);
  font-weight: 700;
  line-height: var(--lh-h6);
}

/* Spec icon list (inline items): 20px green icons, "N Cuartos" / "N Baños" / "N metros". */
.property-specs {
  display: flex;
  flex-wrap: wrap;
  margin: 0 -10px;
  padding: 0;
  list-style: none;
}
.property-specs__item {
  position: relative;
  display: flex;
  align-items: center;
  margin: 0 10px;
}
.property-specs__icon {
  display: flex;
  padding-inline-end: 8px;
}
.property-specs__icon svg {
  width: 20px;
  height: 20px;
  margin-right: 5px;
  fill: var(--color-primary);
  color: var(--color-primary);
  transition: fill 0.3s;
}
.property-specs__text {
  padding-left: 5px;
  color: var(--color-text);
  transition: color 0.3s;
}

/* ---- Grid card (252): card 370 wide in a 400 item; padding 0 30px 14px ---- */
.property-card--grid {
  flex-wrap: wrap;
  align-content: flex-start;
  width: 100%;
  max-width: 370px;
  padding: 0 30px 14px;
}
.property-card--grid .property-card__image {
  display: flex;
  justify-content: flex-start;
  width: 100%;
  margin: 0 -30px calc(var(--widget-spacing) + 10px);
}
.property-card--grid .property-card__image img {
  display: block;
  max-width: 100%;
  height: auto;
}
.property-card--grid .property-card__title {
  margin-bottom: calc(var(--widget-spacing) + 2px);
}
.property-card--grid .property-card__address {
  margin-bottom: calc(var(--widget-spacing) + 9px);
}
.property-card--grid .property-card__specs {
  width: 100%;
  margin-top: 17px;
  padding-top: 15px;
  border-top: 1px solid var(--gray-300);
}
.property-card--grid .property-specs__text {
  line-height: 24px;
}

/* ---- Inline card (314): image column 37.4 % (background cover, 74 % aspect box) + content 62.6 % ---- */
.property-card--inline {
  align-items: stretch;
  width: 100%;
}
.property-card__media {
  position: relative;
  display: block;
  width: 37.4%;
  overflow: hidden;
}
/* = WP `background-size: cover; background-position: center center` on the image column */
.property-card__media-img {
  position: absolute;
  inset: 0;
  width: 100%;
  max-width: none;
  height: 100%;
  object-fit: cover;
  object-position: center center;
}
/* card-media controller: same cover fit painted as a background layer (Chromium resamples it like WP), the <img> stays as the no-JS fallback */
.property-card__media-bg {
  position: absolute;
  inset: 0;
  background-position: center center;
  background-repeat: no-repeat;
  background-size: cover;
}
.property-card__media.has-bg .property-card__media-img {
  visibility: hidden;
}
.property-card__media::before {
  content: '';
  display: block;
  padding-bottom: 74%;
}
.property-card__body {
  display: flex;
  flex-wrap: wrap;
  align-content: flex-start;
  width: 62.6%;
  padding: 23px 30px;
}
.property-card--inline .property-card__address {
  margin-bottom: calc(var(--widget-spacing) + 2px);
  font-size: var(--fs-small);
  line-height: var(--lh-small);
}
.property-card--inline .property-card__title {
  margin-bottom: calc(var(--widget-spacing) + 9px);
}
.property-card__excerpt {
  width: 100%;
  margin-bottom: calc(var(--widget-spacing) + 8px);
}
.property-card--inline .property-card__specs {
  width: 100%;
  margin-bottom: calc(var(--widget-spacing) + 12px);
}

@media (max-width: 1024px) {
  .property-card--inline {
    flex-wrap: wrap;
  }
  .property-card__media,
  .property-card__body {
    width: 100%;
  }
  .property-card__body {
    padding: 20px;
  }
}

@media (max-width: 767px) {
  .property-card--grid {
    max-width: none;
    padding: 0 20px 14px;
  }
  .property-card--grid .property-card__image {
    margin: 0 -20px calc(var(--widget-spacing) + 10px);
  }
}
