.market-page {
  background: #f7f6f2;
  min-height: 100vh;
}
.market-header {
  height: 82px;
  background: white;
  border-bottom: 1px solid var(--line);
  display: grid;
  grid-template-columns: 260px minmax(280px, 650px) auto;
  gap: 30px;
  align-items: center;
  padding: 0 clamp(20px, 4vw, 65px);
  position: sticky;
  top: 0;
  z-index: 8;
}
.market-header nav {
  display: flex;
  align-items: center;
  gap: 18px;
  font-size: 0.8rem;
  font-weight: 700;
}
.market-search {
  position: relative;
}
.market-search span {
  position: absolute;
  left: 15px;
  top: 50%;
  transform: translateY(-50%);
}
.market-search input {
  margin: 0;
  padding-left: 40px;
  background: #f5f5f1;
}
.market-page main {
  max-width: 1500px;
  margin: auto;
  padding: 55px clamp(18px, 4vw, 65px) 100px;
}
.market-intro {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 40px;
}
.market-intro h1 {
  font-size: clamp(2.8rem, 5vw, 5rem);
  max-width: 780px;
  margin-bottom: 0;
}
.market-promise {
  max-width: 330px;
  background: #e1ebe1;
  border-radius: 14px;
  padding: 18px;
}
.market-promise b,
.market-promise span {
  display: block;
}
.market-promise span {
  font-size: 0.75rem;
  color: var(--muted);
}
.category-strip {
  display: flex;
  gap: 9px;
  overflow: auto;
  margin: 38px 0 25px;
}
.category-strip button {
  white-space: nowrap;
  border: 1px solid var(--line);
  border-radius: 99px;
  background: white;
  padding: 11px 17px;
  font: 600 0.8rem "DM Sans";
}
.category-strip button.active {
  background: var(--forest);
  color: white;
}
.market-layout {
  display: grid;
  grid-template-columns: 210px 1fr;
  gap: 30px;
}
.market-filters {
  background: white;
  border: 1px solid var(--line);
  border-radius: 15px;
  padding: 20px;
  height: max-content;
  position: sticky;
  top: 110px;
}
.market-filters > div {
  padding: 0 0 20px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--line);
}
.market-filters b {
  display: block;
  margin-bottom: 10px;
}
.market-filters label {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 9px 0;
  font-size: 0.76rem;
}
.market-filters input {
  width: auto;
  margin: 0;
}
.market-filters select {
  font-size: 0.75rem;
}
.results-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 17px;
}
.results-heading b,
.results-heading span {
  display: block;
}
.results-heading span {
  font-size: 0.68rem;
  color: var(--muted);
}
.results-heading select {
  width: auto;
  margin: 0;
}
.market-results {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 420px));
  gap: 18px;
}
.market-card {
  position: relative;
  background: white;
  border: 1px solid var(--line);
  border-radius: 17px;
  overflow: hidden;
}
.market-photo {
  display: block;
  height: 220px;
  position: relative;
  background: linear-gradient(145deg, #c4d5c5, #71937e);
  background-size: cover;
  background-position: center;
}
.market-photo.has-real-photo:after {
  display: none;
}
.market-photo.has-project {
  background-size: contain;
  background-repeat: no-repeat;
  background-color: #e8ede7;
}
.market-photo:after {
  content: "";
  position: absolute;
  width: 55%;
  height: 47%;
  left: 23%;
  bottom: 0;
  background: #eee4d5;
  border-radius: 70px 70px 4px 4px;
}
.market-photo.sand {
  background: linear-gradient(145deg, #eadfcf, #b89571);
}
.market-photo.blue {
  background: linear-gradient(145deg, #d7e5ea, #7e9ca7);
}
.market-photo.mint {
  background: linear-gradient(145deg, #d8e6dc, #80a68d);
}
.market-photo.gold {
  background: linear-gradient(145deg, #eee1bf, #c79d4f);
}
.market-photo.local {
  background: linear-gradient(145deg, #ebe8df, #aaa899);
}
.market-photo.forest {
  background: linear-gradient(145deg, #b5cab8, #527764);
}
.trust-badge,
.promoted,
.project-badge {
  position: absolute;
  z-index: 2;
  background: white;
  border-radius: 99px;
  padding: 6px 9px;
  font-size: 0.62rem;
  font-weight: 700;
  left: 12px;
  bottom: 12px;
}
.project-badge {
  top: 12px;
  bottom: auto;
  background: #153d34;
  color: white;
}
.promoted {
  top: 12px;
  bottom: auto;
  background: #fff2dc;
  color: #80560c;
}
.market-heart {
  position: absolute;
  z-index: 3;
  right: 12px;
  top: 12px;
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 50%;
  background: white;
  font-size: 1.25rem;
}
.market-heart.saved {
  background: var(--forest);
  color: white;
}
.market-card-body {
  padding: 18px;
}
.market-card-body p {
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--leaf);
  font-weight: 700;
  margin: 0;
}
.market-card-body h2 {
  font: 600 1.35rem "Newsreader";
  margin: 5px 0;
}
.market-card-body h2 a {
  text-decoration: none;
}
.market-card-body strong,
.market-card-body span,
.market-card-body small {
  display: block;
}
.market-card-body span {
  font-size: 0.72rem;
  color: var(--muted);
  margin: 6px 0;
}
.market-card-body .market-detail {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
  line-clamp: 4;
}
.market-card-body small {
  font-weight: 700;
  color: var(--forest);
}
.market-card-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
  padding-top: 13px;
  border-top: 1px solid var(--line);
}
.market-share {
  flex: 0 0 auto;
  padding: 8px 12px;
  border: 1px solid #bfd0c8;
  border-radius: 999px;
  background: white;
  color: var(--forest);
  font: 700 0.68rem "DM Sans";
  cursor: pointer;
}
.market-empty {
  text-align: center;
  background: white;
  border-radius: 17px;
  padding: 70px;
}
.market-empty > span {
  font-size: 3rem;
}
.market-mobile-nav {
  display: none;
}
@media (max-width: 1100px) {
  .market-header {
    grid-template-columns: 180px minmax(0, 1fr) auto;
    gap: 16px;
  }
  .market-header nav {
    display: flex;
  }
  .market-header nav a:not(.button) {
    display: none;
  }
  .market-results {
    grid-template-columns: 1fr 1fr;
  }
  .market-layout {
    display: block;
  }
  .market-filters {
    display: none;
  }
}
@media (max-width: 700px) {
  .market-header {
    height: auto;
    grid-template-columns: 1fr auto;
    padding: 12px 16px;
    gap: 10px;
  }
  .market-header .brand {
    display: flex;
  }
  .market-header .market-search {
    grid-column: 1 / -1;
  }
  .market-page main {
    padding: 28px 14px 90px;
  }
  .market-intro {
    display: block;
  }
  .market-intro h1 {
    font-size: 2.6rem;
  }
  .market-promise {
    display: none;
  }
  .category-strip {
    margin: 25px 0 18px;
  }
  .market-layout {
    display: block;
  }
  .market-filters {
    display: none;
  }
  .results-heading span,
  .results-heading select {
    display: none;
  }
  .market-results {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }
  .market-photo {
    height: 155px;
  }
  .market-card-body {
    padding: 12px;
  }
  .market-card-body h2 {
    font-size: 1.05rem;
  }
  .market-card-body span {
    margin-block: 5px;
  }
  .market-mobile-nav {
    position: fixed;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    inset: auto 0 0;
    background: white;
    border-top: 1px solid var(--line);
    z-index: 9;
    padding: 7px 4px calc(7px + env(safe-area-inset-bottom));
  }
  .market-mobile-nav a {
    text-align: center;
    text-decoration: none;
    font: 600 0.56rem "DM Sans";
    color: var(--muted);
  }
  .market-mobile-nav span {
    display: block;
    font-size: 1.1rem;
  }
  .market-mobile-nav .publish-dot span {
    width: 40px;
    height: 40px;
    background: var(--forest);
    color: white;
    border-radius: 50%;
    display: grid;
    place-items: center;
    margin: -24px auto 2px;
    font-size: 1.5rem;
  }
}
@media (max-width: 520px) {
  .market-results {
    grid-template-columns: 1fr;
  }
  .market-photo {
    height: 230px;
  }
}
@media (max-width: 390px) {
  .market-results {
    grid-template-columns: 1fr;
  }
  .market-photo {
    height: 200px;
  }
}
/* El tamaño y el precio por metro: sin ellos, dos precios de terreno no se
   pueden comparar. Cuando la propia ficha discute su área, se dice y no se
   calcula el precio por metro. */
.market-area{display:block;margin:4px 0 0;color:#5d6b65;font-size:.7rem;font-weight:600}
.market-area.en-revision{color:#8a6b1f}
