/*
Theme Name: ListingHive Child
Template: listinghive
Version: 1.0
*/

/* =========================================
   HOMEPAGE – LISTING BLOCK – MOBILE FIX
========================================= */

@media (max-width: 767px) {

  /* Make row flex (ListingHive overrides this) */
  body.home .hp-listings .hp-row {
    display: flex !important;
    flex-wrap: wrap !important;
    margin-left: -6px;
    margin-right: -6px;
  }

  /* Force exactly 2 cards per row */
  body.home .hp-listings .hp-grid__item {
    width: 50% !important;
    max-width: 50% !important;
    flex: 0 0 50% !important;
    padding-left: 6px;
    padding-right: 6px;
  }

  /* Card sizing */
  body.home .hp-listing {
    margin-bottom: 12px;
    border-radius: 8px;
    overflow: hidden;
  }

  /* IMAGE FIX (this is where your issue was) */
  body.home .hp-listing__image {
    position: relative;
    width: 100%;
    height: 160px !important;
    overflow: hidden;
  }

  body.home .hp-listing__image img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    object-position: center center !important;
    display: block;
  }

  /* Reduce text size */
  body.home .hp-listing__title {
    font-size: 14px;
    line-height: 1.2;
    margin-bottom: 4px;
  }

  /* Hide heavy sections (optional but recommended) */
  body.home .hp-listing__attributes,
  body.home .hp-listing__footer {
    display: none !important;
  }
 }
 @media (max-width: 767px) {
  body.home .hp-listing__content {
    padding: 8px 6px;
  }
}
/* =====================================
   HOMEPAGE: KEEP 2 LISTS SIDE BY SIDE
   EVEN ON MOBILE
===================================== */

@media (max-width: 767px) {

  body.home .wp-block-columns {
    display: flex !important;
    flex-wrap: nowrap !important;
  }

  body.home .wp-block-column {
    flex: 0 0 50% !important;
    max-width: 50% !important;
  }
}


