/* Property Listings Manager — front-end styles */

.plm-listings {
  --plm-ink: #16192b;
  --plm-muted: #5c6270;
  --plm-hair: #e3e6ec;
  --plm-accent: #21365c;      /* deep navy, professional accent */
  --plm-badge-lease: #21365c;
  --plm-badge-sale: #1f6f4a;
  --plm-badge-sold: #7a7f8c;
  --plm-radius: 10px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: var(--plm-ink);
  max-width: 1200px;
  margin: 0 auto;
}

/* ---------- Filters ---------- */
.plm-filters {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  margin: 0 0 28px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--plm-hair);
}
.plm-filters input[type="text"] {
  border: 1px solid #ccd1db;
  border-radius: 8px;
  padding: 9px 12px;
  font-size: 14px;
  min-width: 160px;
}
.plm-filters button {
  background: var(--plm-accent);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 9px 18px;
  font-size: 14px;
  cursor: pointer;
}
.plm-filters button:hover { opacity: 0.9; }
.plm-filter-clear {
  font-size: 13px;
  color: var(--plm-muted);
  text-decoration: underline;
}

/* ---------- Grid ---------- */
.plm-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px 24px;
}
.plm-listings[data-columns="2"] .plm-grid { grid-template-columns: repeat(2, 1fr); }
.plm-listings[data-columns="1"] .plm-grid { grid-template-columns: 1fr; }

@media (max-width: 980px) {
  .plm-grid { grid-template-columns: repeat(2, 1fr) !important; }
}
@media (max-width: 640px) {
  .plm-grid { grid-template-columns: 1fr !important; }
}

/* ---------- Card ---------- */
.plm-card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--plm-hair);
  border-radius: var(--plm-radius);
  overflow: hidden;
  background: #fff;
  transition: box-shadow 0.15s ease, transform 0.15s ease;
}
.plm-card:hover {
  box-shadow: 0 10px 26px rgba(22, 25, 43, 0.08);
  transform: translateY(-2px);
}

.plm-card-image {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: #eef1f6;
}
.plm-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.plm-status-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  padding: 5px 10px;
  border-radius: 6px;
  color: #fff;
}
.plm-status-for_lease { background: var(--plm-badge-lease); }
.plm-status-for_sale  { background: var(--plm-badge-sale); }
.plm-status-sold      { background: var(--plm-badge-sold); }

.plm-link-icon {
  position: absolute;
  right: 10px;
  bottom: 10px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(22, 25, 43, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: background 0.15s ease, transform 0.15s ease;
}
.plm-link-icon:hover,
.plm-link-icon:focus-visible {
  background: var(--plm-accent);
  transform: scale(1.08);
  outline: 2px solid #fff;
  outline-offset: 2px;
}
.plm-link-icon svg {
  width: 17px;
  height: 17px;
}
.plm-link-icon svg path {
  stroke: #ffffff;
  stroke-width: 2;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.plm-card-body {
  padding: 16px 18px 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.plm-card-name {
  margin: 0 0 2px;
  font-size: 17px;
  font-weight: 700;
  color: var(--plm-accent);
  line-height: 1.3;
}
.plm-card-address {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--plm-ink);
}
.plm-card-citystate {
  margin: 2px 0 10px;
  font-size: 13px;
  color: var(--plm-muted);
}
.plm-card-facts,
.plm-card-price,
.plm-card-availability {
  margin: 0 0 4px;
  font-size: 13px;
  color: var(--plm-ink);
  line-height: 1.5;
}
.plm-card-price { font-weight: 700; }

.plm-card-tags {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.plm-tag {
  font-size: 11px;
  background: #f1f4fa;
  color: var(--plm-accent);
  padding: 3px 10px;
  border-radius: 100px;
  border: 1px solid #dbe2f0;
}

.plm-empty {
  color: var(--plm-muted);
  padding: 40px 0;
  text-align: center;
}

/* ---------- Pagination ---------- */
.plm-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  margin-top: 36px;
  font-size: 14px;
}
.plm-page-link {
  color: var(--plm-accent);
  text-decoration: none;
  font-weight: 600;
}
.plm-page-link:hover { text-decoration: underline; }
.plm-page-status { color: var(--plm-muted); }
