<!-- start Simple Custom CSS and JS -->
<style type="text/css">
/* === Container for all listings === */
.custom-listing-grid {
  display: flex;
  justify-content: center;
  gap: 150px; /* Space between cards */
  flex-wrap: wrap;
  max-width: 1200px;
  margin: 0 auto;
}

/* === Card Wrapper === */
.custom-listing-card {
  background: #fff;
  border-radius: 20px 20px 0 0; /* Remove rounded top for sharp design */
	border-width: 0px;
  overflow: hidden;
  width: 100%;
  max-width: 360px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease;
}

.custom-listing-card:hover {
  transform: scale(1.02);
}

/* === Image Area === */
.custom-listing-image {
  width: 100%;
  height: 240px;
  overflow: hidden;
}

.custom-listing-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* === Card Content === */
.custom-listing-content {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 15px 20px;
}

/* === Title and Subtitle === */
.custom-listing-title {
  font-size: 18px !important;
	font-weight: 600;
  margin-bottom: 10px !important;
  line-height: 1.3;
  color: #283062; /* Title colour */
}

.custom-listing-subtitle {
  font-size: 16px !important;
	font-weight: 600;
  color: #b02c31 !important; /* Subtitle colour */
  text-transform: uppercase;
	margin-bottom: 10px !important;
}

/* === Icon Grid (2x2) === */
.custom-listing-icons {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px 20px;
	margin-top: 0px;
}

.custom-listing-icons div {
  display: flex;
  align-items: center;
  font-size: 16px;
  color: #283062; /* Grid text colour */
}

.custom-listing-icons img {
  width: 25px;
  height: auto;
  margin-right: 6px;
  vertical-align: middle;
}

/* === Footer (Price + Button) === */
.custom-listing-footer {
  margin-top: auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0;
	border: 0px;
}

/* === Enquire Button === */
.custom-enquire-btn {
  background: #b02c31;
  color: white;
  padding: 12px 50px 12px 40px;
  font-weight: bold;
  text-decoration: none;
  text-align: center;
  display: inline-block;
  clip-path: polygon(0 0, 90% 0, 100% 100%, 0% 100%); /* Angled button */
	border-radius: 0px !important;
}

.custom-enquire-btn:hover {
  background: #a80000;
}

/* === Price Styling === */
.custom-listing-price {
  font-weight: bold;
  font-size: 1.2rem;
  padding: 12px 20px;
  color: #283062; /* Price colour */
}

/* === SEARCH PAGE LISTINGS: 3 per row === */
.search-page-listings .custom-listing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr); /* 3 per row */
  gap: 40px; /* spacing between cards */
}

/* Responsive: 2 per row on tablets */
@media (max-width: 1024px) {
  .search-page-listings .custom-listing-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Responsive: 1 per row on mobile */
@media (max-width: 768px) {
  .search-page-listings .custom-listing-grid {
    grid-template-columns: 1fr;
  }
}
/* === Search Page Listings in 3 Columns Only === */
.page-id-123 .custom-listing-grid { /* Replace 123 with your search page ID */
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 50px; /* Adjust spacing between cards */
  justify-items: center;
}

/* Ensure cards resize correctly */
.page-id-123 .custom-listing-card {
  width: 100%;
  max-width: 360px;
}


/* === HOMEPAGE LISTINGS GRID === */
.custom-listing-grid {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 150px; /* Space between cards */
}

/* 2 cards on desktop and tablet */
@media (max-width: 1024px) {
  .custom-listing-grid {
    justify-content: center;
    gap: 40px; /* Reduce gap for tablets */
  }
  .custom-listing-card {
    flex: 0 1 45%; /* Two cards side by side */
    max-width: 45%;
  }
}

/* 1 card on mobile */
@media (max-width: 768px) {
  .custom-listing-card {
    flex: 0 1 100%; 
    max-width: 100%;
  }
}





/* --- default: three across (if not already) --- */
.custom-listing-grid.three-columns {
  /* grid fallback */
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

/* ensure cards don’t shrink weirdly if flex is used underneath */
.custom-listing-grid.three-columns .custom-listing-card {
  width: 100%;
  box-sizing: border-box;
}

/* --- breakpoint: below 1330px, two columns --- */
@media (max-width: 1330px) {
  .custom-listing-grid.three-columns {
    grid-template-columns: repeat(2, 1fr);
  }

  /* if it's flex-based instead of grid */
  .custom-listing-grid.three-columns {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
  }
  .custom-listing-grid.three-columns .custom-listing-card {
    flex: 0 0 calc(50% - 12px); /* two per row accounting for gap */
    max-width: calc(50% - 12px);
  }
}


/* existing: three across by default */
.custom-listing-grid.three-columns {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

/* below 1330px: two columns (if you kept the earlier flex fallback, keep it too) */
@media (max-width: 1330px) {
  .custom-listing-grid.three-columns {
    grid-template-columns: repeat(2, 1fr);
  }
  .custom-listing-grid.three-columns {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
  }
  .custom-listing-grid.three-columns .custom-listing-card {
    flex: 0 0 calc(50% - 12px);
    max-width: calc(50% - 12px);
    box-sizing: border-box;
  }
}

/* new: below 630px show one per row */
@media (max-width: 629px) {
  .custom-listing-grid.three-columns {
    grid-template-columns: 1fr;
    display: grid; /* prefer grid for clean 1-column */
  }
  .custom-listing-grid.three-columns .custom-listing-card {
    flex: 0 0 100% !important;
    max-width: 100% !important;
    box-sizing: border-box;
  }
}

/* desktop / default: push the top section down */
.has-top-spacer {
  margin-top: 180px !important;
}

/* tablet and below: remove the extra space */
@media (max-width: 1024px) {
  .has-top-spacer {
    margin-top: 0 !important;
  }
}
</style>
<!-- end Simple Custom CSS and JS -->
