.card-grid,
.listing-grid {
  display: grid;
  gap: 18px;
}

.four-card-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.feature-card,
.listing-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 12px 28px rgba(58, 42, 31, 0.08);
}

.feature-card {
  min-height: 190px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 22px;
  transition: transform 160ms ease, border-color 160ms ease;
}

.feature-card:hover {
  transform: translateY(-3px);
  border-color: rgba(181, 122, 61, 0.45);
}

.feature-card span {
  color: var(--secondary);
  font-size: 1.25rem;
  font-weight: 800;
}

.feature-card p {
  margin: 8px 0 0;
  color: rgba(28, 28, 28, 0.68);
}

.listing-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.center-listing-group {
  display: grid;
  gap: 16px;
  grid-column: 1 / -1;
}

.center-listing-group + .center-listing-group {
  margin-top: 18px;
}

.center-listing-group__heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  padding: 0 2px 8px;
  border-bottom: 1px solid var(--line);
}

.center-listing-group__heading h2 {
  margin: 0;
  color: var(--secondary);
  font-size: 1.4rem;
}

.center-listing-group__heading span {
  color: rgba(28, 28, 28, 0.62);
  font-size: 0.92rem;
  font-weight: 800;
}

.filter-bar {
  display: grid;
  grid-template-columns: minmax(220px, 1.4fr) minmax(160px, 0.8fr) minmax(160px, 0.8fr) auto;
  gap: 12px;
  align-items: end;
  margin: 0 0 22px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.filter-bar label {
  color: var(--secondary);
  font-weight: 800;
}

.filter-bar input,
.filter-bar select {
  margin-top: 6px;
}

.listing-card {
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 100%;
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.listing-card:hover {
  transform: translateY(-2px);
  border-color: rgba(169, 85, 24, 0.26);
  box-shadow: 0 18px 42px rgba(58, 42, 31, 0.13);
}

.listing-photo {
  position: relative;
  aspect-ratio: 5 / 3.4;
  display: grid;
  place-items: center;
  color: rgba(255, 255, 255, 0.82);
  background: linear-gradient(135deg, #2a2119, #8f4a19);
  font-weight: 800;
  overflow: hidden;
}

.listing-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.listing-photo__badge {
  position: absolute;
  left: 12px;
  bottom: 12px;
  max-width: calc(100% - 24px);
  padding: 6px 10px;
  color: var(--white);
  background: rgba(34, 29, 24, 0.78);
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 800;
}

.listing-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 18px 18px 16px;
}

.listing-title-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
  margin-bottom: 8px;
}

.listing-title-row h3 {
  margin: 0 0 8px;
  color: var(--secondary);
  font-size: 1.2rem;
  line-height: 1.25;
  white-space: pre-line;
}

.listing-title-row span {
  padding: 5px 8px;
  color: var(--copper);
  background: rgba(169, 85, 24, 0.1);
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 800;
  white-space: nowrap;
}

.listing-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 14px;
  color: rgba(28, 28, 28, 0.66);
  font-size: 0.92rem;
}

.listing-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 8px;
  background: rgba(243, 231, 210, 0.6);
  border-radius: 6px;
}

.listing-body p {
  margin: 0 0 16px;
  color: rgba(28, 28, 28, 0.72);
  line-height: 1.58;
}

.listing-actions {
  margin-top: auto;
  display: grid;
  gap: 8px;
}

.listing-actions a,
.listing-detail-button {
  min-height: 36px;
  padding: 8px 10px;
  color: var(--green);
  background: rgba(0, 122, 122, 0.12);
  border: 0;
  border-radius: 6px;
  font: inherit;
  font-size: 0.86rem;
  font-weight: 800;
  cursor: pointer;
}

.listing-detail-button.primary-action {
  width: 100%;
  color: var(--white);
  background: var(--copper);
}

.listing-action-links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.listing-action-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.listing-actions a[href*="wa.me"] {
  color: var(--white);
  background: var(--green);
}

.listing-actions a[href*="maps"] {
  color: var(--secondary);
  background: var(--sand);
}

.listing-modal {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(34, 29, 24, 0.68);
}

.listing-modal__panel {
  width: min(920px, 100%);
  max-height: min(760px, 90vh);
  overflow: auto;
  padding: 22px;
  color: var(--primary);
  background: var(--white);
  border-radius: 8px;
  box-shadow: 0 24px 80px rgba(34, 29, 24, 0.28);
}

.listing-modal__close {
  float: right;
  min-height: 36px;
  padding: 8px 12px;
  color: var(--secondary);
  background: var(--sand);
}

.listing-modal__media {
  aspect-ratio: 16 / 9;
  margin-bottom: 18px;
  display: grid;
  place-items: center;
  color: var(--white);
  background: linear-gradient(135deg, #3a2a1f, #a95518);
  border-radius: 8px;
  overflow: hidden;
}

.listing-modal__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.listing-modal h2 {
  margin: 0 0 10px;
  color: var(--secondary);
}

.listing-modal p {
  white-space: pre-line;
}

.submit-listing-card {
  min-height: 260px;
  border: 1px dashed rgba(169, 85, 24, 0.42);
  background: linear-gradient(180deg, rgba(243, 231, 210, 0.58), #ffffff);
}

.submit-listing-card__body {
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 12px;
  padding: 24px;
}

.submit-listing-card h3 {
  margin: 0;
  color: var(--secondary);
}

.submit-listing-card p {
  margin: 0;
  color: rgba(28, 28, 28, 0.68);
}

.submit-listing-card a {
  width: fit-content;
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  margin-top: 6px;
  padding: 9px 14px;
  color: var(--white);
  background: var(--copper);
  border-radius: 6px;
  font-weight: 800;
}
