/* ===== Rubicon: card grid layout on the For Sale results pages ===== */

/* Make the wrapper anchors behave like grid items */
#apbAdvancedPosts-b1aad389-a .apbGridPosts {
  display: grid !important;
  gap: 36px !important;
  align-items: stretch;
}

/* Desktop */
#apbAdvancedPosts-b1aad389-a .apbGridPosts.columns-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
}

/* Tablet */
@media (max-width: 1024px) {
  #apbAdvancedPosts-b1aad389-a .apbGridPosts.columns-tablet-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

/* Mobile */
@media (max-width: 767px) {
  #apbAdvancedPosts-b1aad389-a .apbGridPosts.columns-mobile-1 {
    grid-template-columns: 1fr !important;
  }
}

/* ===== Boat card (templates/partials/listing-boat-card.php) =====
   Used by every grid: For Sale (all/power/sail), Sold, and the homepage
   [featured_yachts] widget. Self-contained on purpose — the theme gives
   every <p> a ~32px bottom margin, which is what made the old cards so tall,
   so margins are set explicitly here instead of inherited. */

.bl-card {
  display: flex;
  flex-direction: column;
  background: #071c32;
  border-radius: 8px;
  overflow: hidden;
  color: #f8f4eb;
  text-decoration: none !important;
}

.bl-card .bl-card__media {
  margin: 0;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #0d2740;
}

.bl-card .bl-card__media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.bl-card .bl-card__body {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 14px 18px 16px;
}

.bl-card .bl-card__name {
  margin: 0 0 3px;
  font-family: "Barlow Condensed", "Barlow", sans-serif; /* pinned: was inherited from the theme's heading style */
  font-size: 20px;
  font-weight: 600;
  line-height: 1.2;
  text-transform: uppercase;
  color: #f8f4eb;
}

.bl-card .bl-card__body p {
  margin: 0;
  font-family: "Barlow", sans-serif;
  font-size: 15px;
  line-height: 1.4;
  color: #f8f4eb;
}

.bl-card .bl-card__price {
  font-weight: 600;
}

.bl-card .bl-card__loc {
  opacity: 0.7;
}

.bl-card .bl-card__more {
  margin-top: 6px;
  font-family: "Barlow", sans-serif;
  font-size: 14px;
  line-height: 1.6;
  color: #caa560;
}

.bl-card:hover .bl-card__more {
  text-decoration: underline;
}

/* status / "New" badge on the card photo */
.bl-card .bl-card__media { position: relative; }
.bl-card .bl-card__badge {
  position: absolute; top: 12px; left: 12px; z-index: 1;
  padding: 4px 10px; border-radius: 999px;
  font-family: "Barlow", sans-serif; font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; line-height: 1.3;
  background: #f8f4eb; color: #071c32;
}
.bl-card .bl-card__badge--sale-pending,
.bl-card .bl-card__badge--on-order { background: #caa560; color: #071c32; }
.bl-card[hidden] { display: none !important; }
