/* ListingPro Buildings Grid (frontend)
   "Business buildings" inspired card grid layout.
*/

.lpbg-wrap-front{
  --lpbg-cols: 4;
  --lpbg-cols-tablet: 2;
  --lpbg-cols-mobile: 1;
  --lpbg-gap: 18px;
}

.lpbg-wrap-front,
.lpbg-wrap-front *{
  box-sizing: border-box;
}

.lpbg-row{
  margin: 24px 0;
}

.lpbg-row__header{
  display:flex;
  align-items:baseline;
  justify-content:space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.lpbg-row__title{
  margin: 0;
  font-size: 20px;
  line-height: 1.2;
}

.lpbg-row__viewall{
  font-size: 14px;
  text-decoration: none;
}

.lpbg-grid{
  display:grid !important;
  gap: var(--lpbg-gap);
  grid-template-columns: repeat(var(--lpbg-cols), minmax(0, 1fr));
}

@media (max-width: 1024px){
  .lpbg-grid{ grid-template-columns: repeat(var(--lpbg-cols-tablet), minmax(0, 1fr)); }
}

@media (max-width: 640px){
  .lpbg-grid{ grid-template-columns: repeat(var(--lpbg-cols-mobile), minmax(0, 1fr)); }
}

.lpbg-card{
  border: 1px solid rgba(0,0,0,0.08);
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
}

.lpbg-card__media-link,
.lpbg-card__title-link{
  color: inherit;
  text-decoration:none;
}

.lpbg-card__media-link{ display:block; }

.lpbg-card__media{
  position: relative;
  aspect-ratio: 4 / 3;
  background: rgba(0,0,0,0.05);
}

.lpbg-badge{
  position:absolute;
  top: 10px;
  left: 10px;
  font-size: 12px;
  line-height: 1;
  padding: 6px 8px;
  border-radius: 999px;
  background: rgba(0,0,0,0.75);
  color: #fff;
}

/* Promo badge (Ad/Premium) shown on the top-right */
.lpbg-badge--promo{
  left: auto;
  right: 10px;
  background: rgba(0,0,0,0.75);
}

.lpbg-badge--open{ background: rgba(0,128,0,0.85); }
.lpbg-badge--closed{ background: rgba(160,0,0,0.85); }

.lpbg-card__img{
  width:100%;
  height:100%;
  object-fit: cover;
  display:block;
}

.lpbg-card__media--placeholder{
  background: linear-gradient(135deg, rgba(0,0,0,0.05), rgba(0,0,0,0.02));
}

.lpbg-card__body{
  padding: 12px 14px 14px;
}

.lpbg-card__title{
  margin: 0 0 6px;
  font-size: 16px;
  line-height: 1.25;
}

.lpbg-card__cats{
  font-size: 13px;
  opacity: 0.75;
}

.lpbg-card__actions{
  display:flex;
  flex-wrap:wrap;
  gap: 8px;
  margin-top: 10px;
}

/* Google action bar (Directions / Save / Nearby / Send to phone / Share) */
.lpbg-ga{
  display:flex;
  flex-wrap:wrap;
  gap: 10px;
  justify-content:space-between;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(0,0,0,0.08);
}

.lpbg-ga__item{
  flex: 1 1 18%;
  min-width: 72px;
  text-align:center;
  text-decoration:none;
  color: inherit;
  background: transparent;
  border: 0;
  padding: 0;
  cursor: pointer;
  font: inherit;
}

.lpbg-ga__icon{
  width: 44px;
  height: 44px;
  border-radius: 999px;
  background: rgba(0,0,0,0.06);
  display:flex;
  align-items:center;
  justify-content:center;
  margin: 0 auto 6px;
}

.lpbg-ga__text{
  display:block;
  font-size: 12px;
  line-height: 1.2;
  opacity: 0.9;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lpbg-ga__item:hover .lpbg-ga__icon{
  background: rgba(0,0,0,0.10);
}

.lpbg-ga__btn--copied .lpbg-ga__icon{
  background: rgba(0,128,0,0.12);
}

.lpbg-btn{
  display:inline-block;
  font-size: 13px;
  line-height: 1;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid rgba(0,0,0,0.12);
  text-decoration:none;
}

.lpbg-empty{
  padding: 12px 0;
  opacity: 0.75;
}
