/* =========================================
   LISTING GRIDS
========================================= */

.my-listings-grid,
.public-profile-listings {
  display: grid;

  grid-template-columns:
    repeat(3, minmax(0, 1fr));

  gap: 22px;

  width: 100%;
}


/* =========================================
   SHARED NO IMAGE
========================================= */

.listing-card-no-image,
.public-profile-no-image {
  display: flex;

  align-items: center;
  justify-content: center;

  width: 100%;
  height: 100%;

  color:
    var(--muted);

  background:
    linear-gradient(
      135deg,
      #eef2f6,
      #e2e8f0
    );

  font-size:
    0.84rem;

  font-weight: 700;
}


/* =========================================
   SHARED PRICE BADGES
========================================= */

.profile-image-price,
.public-profile-listing-price {
  position: absolute;

  left: 14px;
  bottom: 14px;

  z-index: 2;

  margin: 0;

  padding:
    8px 13px;

  color:
    #ffffff;

  background-color:
    rgba(
      24,
      36,
      51,
      0.94
    );

  border-radius: 9px;

  font-size:
    1.05rem;

  font-weight: 850;

  line-height: 1;

  box-shadow:
    0 4px 12px
    rgba(
      15,
      23,
      42,
      0.24
    );
}


/* =========================================
   SHARED CARD CONTENT
========================================= */

.listing-card-content,
.public-profile-listing-content {
  display: flex;

  flex-direction: column;

  flex: 1;

  padding: 18px;
}


/* =========================================
   SHARED LISTING INFO
========================================= */

.profile-listing-info-row,
.public-profile-listing-info-row {
  display: flex;

  align-items: flex-end;
  justify-content: space-between;

  gap: 16px;

  width: 100%;
}


.profile-listing-info-left,
.public-profile-listing-info-left {
  flex: 1;

  min-width: 0;
}


.profile-listing-location,
.public-profile-listing-location {
  min-width: 0;

  margin:
    0 0 5px;

  overflow: hidden;

  color:
    var(--text);

  font-size:
    0.88rem;

  font-weight: 650;

  line-height: 1.35;

  white-space: nowrap;

  text-overflow:
    ellipsis;
}


.profile-listing-delivery,
.public-profile-listing-delivery {
  margin: 0;

  color:
    var(--muted);

  font-size:
    0.84rem;

  font-weight: 600;

  line-height: 1.35;
}


.profile-listing-posted-time,
.public-profile-listing-posted-time {
  flex-shrink: 0;

  margin: 0;

  color:
    var(--light-muted);

  font-size:
    0.76rem;

  font-weight: 500;

  line-height: 1.35;

  white-space: nowrap;

  text-align: right;
}


/* =========================================
   TABLET
========================================= */

@media screen and (max-width: 1000px) {

  .my-listings-grid,
  .public-profile-listings {
    grid-template-columns:
      repeat(2, minmax(0, 1fr));
  }

}


/* =========================================
   MOBILE
========================================= */

@media screen and (max-width: 768px) {

  .my-listings-grid {
    grid-template-columns:
      repeat(2, minmax(0, 1fr));

    gap:
      10px;
  }


  .public-profile-listings {
    grid-template-columns:
      1fr;
  }


  .listing-card-image {
    height:
      auto;

    aspect-ratio:
      1 / 1;
  }


  .public-profile-listing-image {
    height:
      220px;
  }


  .listing-card-content {
    padding:
      10px;
  }


  .public-profile-listing-content {
    padding:
      16px;
  }


  .profile-listing-info-row,
  .public-profile-listing-info-row {
    gap: 10px;
  }


  .profile-listing-location,
  .public-profile-listing-location {
    font-size:
      0.85rem;
  }


  .profile-listing-delivery,
  .public-profile-listing-delivery {
    font-size:
      0.82rem;
  }


  .profile-listing-posted-time,
  .public-profile-listing-posted-time {
    font-size:
      0.72rem;
  }

}


/* =========================================
   DESKTOP HOME LISTING GRID
========================================= */

@media screen and (min-width: 1200px) {

  .my-listings-grid {
    grid-template-columns:
      repeat(4, minmax(0, 1fr));

    gap:
      16px;
  }


  .listing-card-content {
    padding:
      14px;
  }


  .listing-card-image {
    height:
      auto;

    aspect-ratio:
      4 / 3;
  }


  .profile-image-price {
    left:
      10px;

    bottom:
      10px;

    padding:
      6px 9px;

    font-size:
      0.88rem;
  }


  .profile-listing-location {
    font-size:
      0.8rem;
  }


  .profile-listing-delivery {
    font-size:
      0.76rem;
  }

}
