@media (min-width: 781px) {
.browse-card {
  width: 250px; 
  height: 360px;
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid #d4d4d4;
  border-radius: 10px;
  cursor: pointer;
  transition: box-shadow 0.18s ease, transform 0.18s ease;
}

.browse-card:hover {
  box-shadow: 0px 4px 12px rgba(0,0,0,0.18);
  transform: translateY(-3px);
}

.browse-img-container {
        position: relative; /* Anchor for the badge */
        width: 100%;
        height: 140px;      /* Matches your browse-thumb max-height */
        overflow: hidden;
        border-top-left-radius: 10px;
        border-top-right-radius: 10px;
    }

    /* Updated browse-thumb to fill the container */
    .browse-thumb {
        width: 100%;
        height: 100%;
        object-fit: cover;
        background-color: #fafafa;
        display: block;
    }

    /* --- Floating Rating Badge --- */
    .browse-rating-badge {
        position: absolute;
        bottom: 8px;
        left: 8px;
        z-index: 10;
        font-size: 15px;
        font-weight: bold;
        color: white !important;
        padding: 3px 7px;
        border-radius: 4px;
        box-shadow: 0 2px 4px rgba(0,0,0,0.4);
    }
        /* Styling for the parentheses and review count */
    .rating-count {
        font-size: 12px;      /* Makes it smaller than the rating */
        margin-left: 4px;       /* Adds a tiny gap after the rating number */
        font-weight: normal;    /* Keeps it from being too heavy */
    } 
    /* Rating Colors */
    .rating-high { background-color: #27ae60 !important; }
    .rating-mid  { background-color: #f39c12 !important; }
    .rating-low  { background-color: #c0392b !important; }

.browse-info {
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.browse-info h3 {
  font-size: 17px;
  font-weight: 700;
  color: #222;
  line-height: 1.25;
  margin: 0;
}

.browse-info p {
  margin: 0;
  font-size: 14px;
  color: #555;
  line-height: 1.4;
}
.browse-card-name {
  font-size: 14px;
  color: #555;
  margin: 2px 0 4px;
}
.browse-info strong {
  color: #0b4e0b;
  font-size: 16px;
}
.browse-card-description {
      font-size: 13px;
    line-height: 1.4;
    /* Limit description to 2 lines for 2-column view */
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
/* No results */
.browse-noResults {
  margin-top: 25px;
  font-size: 18px;
  color: #555;
  font-style: italic;
  text-align: left;
}
 }



/* Mobile */
@media (max-width: 780px) {
  /* Container */
  #resultsContainer {
    width: 100%;
    padding: 10px 5px;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px; /* Space between columns */
  }

  /* Card */
  .browse-card {
    width: calc(50% - 10px); /* 2-column layout */
    min-width: 150px;
    height: 320px;
    padding: 0;
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid #d4d4d4;
    border-radius: 10px;
    box-shadow: 0px 2px 6px rgba(0,0,0,0.08);
    cursor: pointer;
  }

  /* Disable hover lift on mobile */
  .browse-card:hover {
    transform: none;
    box-shadow: 0px 2px 6px rgba(0,0,0,0.08);
  }

  /* Image and rating */
.browse-img-container {
    position: relative; /* Anchor for the badge */
    width: 100%;
    height: 110px; /* Match your existing thumb height */
    background-color: #fafafa;
  }

  .browse-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
  }
  .browse-rating-badge {
    position: absolute;
    bottom: 5px;
    left: 5px;
    z-index: 10;
    font-size: 14px; /* Slightly smaller for mobile cards */
    font-weight: bold;
    color: white !important;
    padding: 2px 4px;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
  }
    .rating-count {
        font-size: 11px;      /* Makes it smaller than the rating */
        margin-left: 3px;       /* Adds a tiny gap after the rating number */
        font-weight: normal;    /* Keeps it from being too heavy */
    }

  /* Rating Colors */
  .rating-high { background-color: #27ae60 !important; }
  .rating-mid  { background-color: #f39c12 !important; }
  .rating-low  { background-color: #c0392b !important; }

  /* Info wrapper */
  .browse-info {
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 4px;
  }

  /* Title */
  .browse-info h3 {
    font-size: 15px;
    font-weight: 700;
    color: #219ebc; /* same blue as search */
    line-height: 1.2;
    margin: 6px 0 2px;

    /* Clamp to 2 lines */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  /* Name */
  .browse-card-name {
    font-size: 13px;
    color: #555;
    margin: 2px 0;
  }

  /* Price */
  .browse-info strong {
    font-size: 15px;
    font-weight: 700;
    color: #0b4e0b;
    margin: 2px 0;
  }

  /* City (plain <p>) */
  .browse-info p {
    font-size: 12px;
    color: #777;
    margin: 0;
  }

  /* Description */
  .browse-card-description {
    font-size: 12px;
    color: #666;
    line-height: 1.4;
    /* Limit description to 2 lines for 2-column view */
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  /* No results */
  .browse-noResults {
    margin-top: 30px;
    font-size: 16px;
    color: #777;
    text-align: center;
    width: 100%;
  }
}
