:root {
    --card-w: calc(100vw - 30px);
    --card-media-h: 230px;
}

.section {
  margin-top: 0;
}

.section__title {
  margin: 16px 0 14px;
  font-size: 22px;
  letter-spacing: -0.01em;
}

.cards {
  display: flex;
  flex-wrap: nowrap;
  overflow: hidden;
  gap: 18px;
}

.card {
  background: rgba(255, 255, 255, 0.65);
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 24px;
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  flex: 0 0 var(--card-w);
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease;
  will-change: transform;
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.14);
}

@media (prefers-reduced-motion: reduce) {
  .card {
    transition: none;
  }

  .card:hover {
    transform: none;
  }
}

.card__media {
  position: relative;
  height: var(--card-media-h);
  border-radius: 24px;
  margin: 12px 12px 0;
  overflow: hidden;
  background: #cbd5e1;
  background-size: cover;
  background-position: center;
}

.card__media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.02), rgba(15, 23, 42, 0.10));
}

.badge {
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  height: 28px;
  padding: 0 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.06em;
  background: rgba(255, 255, 255, 0.92);
  color: var(--brand);
  box-shadow: 0 10px 20px rgba(15, 23, 42, 0.10);
}

.card__body {
  padding: 14px 18px 18px;
}

.card__name {
  font-weight: 800;
  font-size: 16px;
  margin-bottom: 8px;
}

.card__row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
}

.card__price {
  font-weight: 900;
  color: var(--brand);
  font-size: 18px;
}

.card__loc {
  color: var(--muted-2);
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 52%;
}

.section--home .cards {
  display: grid;
  width: 100%;
  grid-template-columns: repeat(auto-fit, minmax(280px, 440px));
  grid-auto-rows: auto;
  gap: clamp(12px, 2vw, 28px);
  overflow: visible;
  justify-content: center;
}

.card--home {
  width: 100%;
  max-width: 440px;
  min-height: 0;
  display: grid;
  grid-template-rows: 1fr auto;
  border-radius: 24px;
  background: var(--surface);
  border: 1px solid rgba(226, 232, 240, 0.9);
  box-shadow: var(--shadow-soft);
  margin: 0 auto;
}

.card__media--home {
  height: 220px;
  margin: 0;
  border-radius: 24px 24px 0 0;
}

.card__body--home {
  padding: 10px 12px 12px;
  border-top: 1px solid rgba(15, 23, 42, 0.08);
  background: #ffffff;
}

.card__meta {
  font-size: 11px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #111827;
  margin-bottom: 8px;
}

.card__name--home {
    font-size: 16px;
    line-height: 1.15;
    min-height: 0;
    margin-bottom: 5px;
    text-align: center;
    margin-top: 5px;
}

.Home_layout__sections {
  grid-template-columns: minmax(0, 1fr);
}

@media (min-width: 660px) {
  :root {
    --card-w: 330px;
    --card-media-h: 230px;
  }
}

@media (min-width: 860px) {
  .section--home {
    height: 100%;
  }

  .section--home .cards {
    height: calc(100vh - 200px);
    min-height: 100%;
    grid-auto-rows: 1fr;
    align-content: stretch;
    align-items: stretch;
  }

  .section--home .card--home {
    height: 100%;
  }

  .section--home .card__media--home {
    height: 100%;
  }
}

@media (max-width: 1200px) {
  .section--home .cards {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .section--home .cards .card--home {
    grid-column: auto !important;
    grid-row: auto !important;
  }

  .Home_layout__sections {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 860px) {
  .section--home .cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .Home_layout__sections {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 520px) {
  .section--home .cards {
    grid-template-columns: 1fr;
  }

  .Home_layout__sections {
    grid-template-columns: minmax(0, 1fr);
  }
}
