/* Rent & Share marketplace and category refinement v8 */
.home-categories {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.home-categories > a,
.home-category-search {
  min-width: 0;
  border-right: 1px solid var(--rs-line);
  border-bottom: 1px solid var(--rs-line);
}
.home-categories > a:nth-child(4n),
.home-category-search:nth-child(4n) { border-right: 0; }
.home-categories > a,
.home-category-search button {
  min-height: 122px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 14px;
  padding: 25px 20px;
  color: var(--rs-ink);
  background: transparent;
  border-radius: 0;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.35;
  text-align: left;
  text-decoration: none;
}
.home-category-search { margin: 0; }
.home-category-search button {
  width: 100%;
  border: 0;
  box-shadow: none;
  cursor: pointer;
}
.home-categories > a:hover,
.home-category-search button:hover {
  color: var(--rs-forest) !important;
  background: var(--rs-paper);
}
.home-category-search .category-icon { display: block; }

.marketplace-shell--clean {
  padding: 0;
  border: 0;
  background: transparent;
}
.marketplace-shell--clean .ContentMain { width: 100%; margin: 0; }
.home-listing-group { margin-bottom: 56px; }
.home-listing-group header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 18px;
}
.home-listing-group h3 {
  margin: 0;
  color: var(--rs-forest);
  font-family: "Newsreader", Georgia, serif;
  font-size: 32px;
  font-weight: 560;
}
.home-listing-group header a {
  color: var(--rs-forest);
  font-size: 11px;
  font-weight: 750;
  text-decoration: none;
}
.home-listing-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}
.home-listing-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--rs-line);
  border-radius: 12px;
  color: var(--rs-ink);
  background: var(--rs-white);
  text-decoration: none;
  transition: transform .2s ease, box-shadow .2s ease;
}
.home-listing-card:hover {
  color: var(--rs-forest) !important;
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(23,54,45,.09);
}
.home-listing-card img {
  width: 100%;
  height: 190px;
  display: block;
  object-fit: cover;
  background: var(--rs-paper);
}
.home-listing-card > span {
  min-height: 92px;
  display: flex;
  flex-direction: column;
  gap: 9px;
  padding: 16px;
}
.home-listing-card strong {
  overflow: hidden;
  font-size: 12px;
  line-height: 1.45;
  text-overflow: ellipsis;
}
.home-listing-card b { color: var(--rs-forest); font-size: 11px; }

/* Listing details */
.listing-detail-page .ContentMain { max-width: 900px; }
.listing-detail-page .ContentMain > div:first-of-type > table { width: 100%; }
.listing-detail-page .ContentMain > div:first-of-type > table > tbody > tr {
  display: grid;
  grid-template-columns: minmax(250px, .8fr) minmax(0, 1.2fr);
  gap: 44px;
}
.listing-detail-page .ContentMain > div:first-of-type > table > tbody > tr > td {
  width: auto !important;
  padding: 0 !important;
}
.listing-detail-page .ContentMain > div:first-of-type img:not(.ListingThumb) {
  width: min(100%, 360px);
  height: 340px;
  object-fit: contain;
  border-radius: 12px;
  background: var(--rs-white);
}
.listing-detail-page .ContentMain > div:first-of-type > table > tbody > tr > td:last-child {
  padding: 26px !important;
  border: 1px solid var(--rs-line);
  border-radius: 12px;
  background: var(--rs-white);
  line-height: 1.55;
}
.listing-actions table { width: auto !important; margin: 0; }
.listing-actions td { width: auto !important; padding-right: 10px; }
.listing-actions .ButtonDefault {
  width: auto !important;
  min-width: 180px;
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 20px;
  border-radius: 999px;
}
.listing-map iframe {
  width: 100%;
  height: 300px;
  border: 0;
  border-radius: 12px;
}

.register-page .ContentMain { max-width: 620px; }
.register-page .auth-intro { max-width: 440px; }

@media (max-width: 900px) {
  .home-categories { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .home-categories > a:nth-child(4n),
  .home-category-search:nth-child(4n) { border-right: 1px solid var(--rs-line); }
  .home-categories > a:nth-child(2n),
  .home-category-search:nth-child(2n) { border-right: 0; }
  .home-listing-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
  .home-listing-grid { grid-template-columns: 1fr; }
  .home-listing-card { display: grid; grid-template-columns: 120px minmax(0, 1fr); }
  .home-listing-card img { height: 120px; }
  .home-listing-card > span { min-height: 0; }
  .listing-detail-page .ContentMain > div:first-of-type > table > tbody > tr { grid-template-columns: 1fr; gap: 22px; }
  .listing-actions table,
  .listing-actions tbody,
  .listing-actions tr { width: 100% !important; display: grid; gap: 10px; }
  .listing-actions td { width: 100% !important; padding: 0; }
  .listing-actions .ButtonDefault { width: 100% !important; }
}
