:root {
  --bg: #070707;
  --card: #111111;
  --border: #2a2a2a;
  --gold: #c99a42;
  --gold2: #e2bd72;
  --text: #f4f0e8;
  --muted: #aaa39a;
}

body {
  background: var(--bg);
}


/* ========================================
   ENCABEZADO
======================================== */

.properties-header {
  position: sticky;
  top: 0;
  z-index: 1000;
}

.properties-header .nav .active {
  color: var(--gold2);
}


/* ========================================
   HERO
======================================== */

.properties-hero {
  min-height: 390px;
  display: flex;
  align-items: center;
  border-bottom: 1px solid #261f14;

  background:
    linear-gradient(
      90deg,
      rgba(0, 0, 0, 0.94),
      rgba(0, 0, 0, 0.72) 45%,
      rgba(0, 0, 0, 0.35)
    ),
    url("/img/imagen1.png") center / cover no-repeat;
}

.properties-hero-content {
  width: min(780px, calc(100% - 40px));
  margin-left: clamp(24px, 7vw, 120px);
}

.properties-eyebrow,
.section-kicker {
  display: block;
  color: var(--gold2);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.properties-hero h1 {
  margin: 12px 0 18px;
  font-size: clamp(40px, 5vw, 68px);
  line-height: 1.02;
  text-transform: uppercase;
}

.properties-hero h1 span {
  display: block;
  color: var(--gold);
}

.properties-hero p {
  max-width: 660px;
  color: #d4cec5;
  font-size: 17px;
  line-height: 1.6;
}

.properties-search {
  width: min(650px, 100%);
  height: 58px;
  margin-top: 28px;
  padding: 0 18px;

  display: flex;
  align-items: center;
  gap: 14px;

  border: 1px solid #3b3325;
  border-radius: 10px;
  background: rgba(10, 10, 10, 0.92);
}

.properties-search i {
  color: var(--gold);
}

.properties-search input {
  width: 100%;
  height: 100%;

  border: 0;
  outline: 0;
  background: transparent;

  color: var(--text);
  font-size: 15px;
}


/* ========================================
   FILTROS
======================================== */

.catalog-controls {
  position: sticky;
  top: 88px;
  z-index: 900;

  background: rgba(7, 7, 7, 0.96);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.catalog-controls-inner {
  width: min(1500px, calc(100% - 40px));
  margin: 0 auto;
  padding: 17px 0;

  display: flex;
  justify-content: space-between;
  gap: 20px;
}

.catalog-tabs {
  display: flex;
  flex-wrap: nowrap;
  gap: 9px;

  overflow-x: auto;
  overflow-y: hidden;

  scroll-behavior: smooth;
  scrollbar-width: none;

  -webkit-overflow-scrolling: touch;
}

.catalog-tabs::-webkit-scrollbar {
  display: none;
}
.catalog-tab {
  flex: 0 0 auto;
  white-space: nowrap;

  min-height: 42px;
  padding: 0 17px;

  border: 1px solid var(--border);
  border-radius: 8px;

  background: #101010;
  color: var(--text);

  cursor: pointer;
  font-weight: 700;
}

.catalog-tab:hover,
.catalog-tab.active {
  border-color: var(--gold);
  color: #080808;

  background:
    linear-gradient(
      135deg,
      var(--gold2),
      var(--gold)
    );
}

.catalog-selects {
  display: flex;
  gap: 10px;
}

.catalog-selects select {
  min-width: 185px;
  min-height: 42px;
  padding: 0 12px;

  border: 1px solid var(--border);
  border-radius: 8px;

  background: #101010;
  color: var(--text);
}


/* ========================================
   SECCIONES
======================================== */

.catalog-section {
  width: min(1500px, calc(100% - 40px));
  margin: 0 auto;
  padding: 58px 0 16px;
}

.catalog-section + .catalog-section {
  border-top: 1px solid #171717;
}

.catalog-section-head {
  margin-bottom: 24px;

  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
}

.catalog-section-head h2 {
  margin: 6px 0 0;
  font-size: clamp(27px, 3vw, 40px);
  text-transform: uppercase;
}

.catalog-section-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.section-count {
  color: var(--muted);
  font-size: 13px;
}


/* ========================================
   BOTONES DEL CARRUSEL
======================================== */

.carousel-button {
  width: 42px;
  height: 42px;
  padding: 0;

  display: flex;
  align-items: center;
  justify-content: center;

  border: 1px solid #3c3120;
  border-radius: 50%;

  background: #111111;
  color: var(--gold2);

  cursor: pointer;
  transition:
    background 0.2s ease,
    color 0.2s ease,
    border-color 0.2s ease,
    transform 0.2s ease;
}

.carousel-button:hover {
  background: var(--gold);
  color: #080808;
  border-color: var(--gold);
  transform: translateY(-1px);
}

.carousel-button:disabled {
  opacity: 0.35;
  cursor: default;
  transform: none;
}


/* ========================================
   CARRUSEL DE PROPIEDADES
======================================== */

.properties-grid {
  width: 100%;
  padding: 5px 2px 18px;

  display: flex;
  gap: 18px;

  overflow-x: auto;
  overflow-y: hidden;

  scroll-behavior: smooth;
  scroll-snap-type: x mandatory;
  overscroll-behavior-x: contain;

  scrollbar-width: none;
  -ms-overflow-style: none;
}

.properties-grid::-webkit-scrollbar {
  display: none;
}


/* ========================================
   TARJETAS
======================================== */

.catalog-property-card {
  flex: 0 0 calc((100% - 54px) / 4);
  min-width: 0;

  overflow: hidden;
  scroll-snap-align: start;
  scroll-snap-stop: always;

  border: 1px solid var(--border);
  border-radius: 12px;

  background: var(--card);

  transition:
    transform 0.2s ease,
    border-color 0.2s ease;
}

.catalog-property-card:hover {
  transform: translateY(-4px);
  border-color: #69512b;
}

.catalog-property-link {
  display: block;
  color: inherit;
  text-decoration: none;
}

.catalog-property-image {
  position: relative;
  aspect-ratio: 4 / 3;

  overflow: hidden;
  background: #0b0b0b;
}

.catalog-property-image img {
  width: 100%;
  height: 100%;

  display: block;
  object-fit: cover;

  transition: transform 0.35s ease;
}

.catalog-property-card:hover
.catalog-property-image img {
  transform: scale(1.035);
}

.catalog-property-tag {
  position: absolute;
  top: 13px;
  left: 13px;

  padding: 8px 11px;

  border-radius: 7px;

  background:
    linear-gradient(
      135deg,
      var(--gold2),
      var(--gold)
    );

  color: #090909;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.catalog-property-code {
  position: absolute;
  right: 12px;
  bottom: 12px;

  padding: 6px 8px;

  border-radius: 6px;

  background: rgba(0, 0, 0, 0.75);
  color: #ddd5c7;

  font-size: 10px;
  font-weight: 800;
}

.catalog-property-body {
  padding: 19px;
}

.catalog-property-body h3 {
  margin: 0 0 10px;

  font-size: 18px;
  line-height: 1.25;
}

.catalog-property-location {
  min-height: 42px;
  margin: 0 0 15px;

  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.catalog-property-price {
  margin-bottom: 13px;

  color: var(--gold2);
  font-size: 22px;
  font-weight: 900;
}

.catalog-property-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;

  color: #ccc4b8;
  font-size: 12px;
}


/* ========================================
   ACCIONES DE TARJETA
======================================== */

.catalog-property-actions {
  padding: 0 19px 19px;

  display: grid;
  grid-template-columns: 1fr auto;
  gap: 9px;
}
.catalog-marketplace-button {
  width: 43px;
  padding: 0;
  background: #1877f2;
  color: #ffffff;
}

.catalog-marketplace-button:hover {
  background: #0f68d8;
}

.catalog-marketplace-button:disabled {
  opacity: 0.55;
  cursor: wait;
}

.catalog-property-actions a,
.catalog-property-actions button {
  min-height: 41px;

  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;

  border: 1px solid #342b1e;
  border-radius: 7px;

  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.catalog-view-button {
  background: #151515;
  color: var(--gold2);
  text-decoration: none;
}

.catalog-share-button {
  width: 43px;
  padding: 0;

  background: transparent;
  color: var(--gold2);
}

.catalog-property-actions a:hover,
.catalog-property-actions button:hover {
  border-color: var(--gold);
}


/* ========================================
   ESTADOS VACÍOS
======================================== */

.empty-section {
  flex: 0 0 100%;
  min-height: 120px;

  display: grid;
  place-items: center;

  border: 1px dashed #292929;
  border-radius: 10px;

  color: #817b72;
}

.empty-results {
  width: min(700px, calc(100% - 40px));
  margin: 65px auto;
  padding: 55px 25px;

  text-align: center;

  border: 1px solid var(--border);
  border-radius: 14px;

  background: #0d0d0d;
}

.empty-results i {
  color: var(--gold);
  font-size: 42px;
}

.reset-filters {
  min-height: 44px;
  margin-top: 15px;
  padding: 0 18px;

  border: 0;
  border-radius: 8px;

  background:
    linear-gradient(
      135deg,
      var(--gold2),
      var(--gold)
    );

  color: #090909;
  font-weight: 800;
  cursor: pointer;
}


/* ========================================
   TABLET GRANDE
   3 TARJETAS VISIBLES
======================================== */

@media (max-width: 1200px) {

  .catalog-property-card {
    flex-basis:
      calc((100% - 36px) / 3);
  }

}


/* ========================================
   TABLET
   2 TARJETAS VISIBLES
======================================== */

@media (max-width: 900px) {

  .catalog-controls {
    top: 74px;
  }

  .catalog-controls-inner {
    flex-direction: column;
  }

  .catalog-selects {
    width: 100%;
  }

  .catalog-selects select {
    flex: 1;
    min-width: 0;
  }

  .catalog-property-card {
    flex-basis:
      calc((100% - 18px) / 2);
  }

}


/* ========================================
   MÓVIL
   SCROLL HORIZONTAL
======================================== */

@media (max-width: 620px) {

  .properties-hero {
    min-height: 420px;
  }

  .properties-hero-content {
    width: calc(100% - 30px);
    margin: 0 auto;
  }

  .properties-hero h1 {
    font-size: 40px;
  }

  .catalog-controls-inner,
  .catalog-section {
    width: calc(100% - 24px);
  }

.catalog-controls-inner {
  gap: 12px;
}

.catalog-tabs {
  width: 100%;
  overflow-x: auto;
  flex-wrap: nowrap;

  padding-bottom: 3px;
}

.catalog-tab {
  flex: 0 0 auto;
  width: auto;

  min-height: 40px;
  padding: 0 18px;
}

.catalog-selects {
  width: 100%;
}

.catalog-selects select {
  width: 100%;
}

  .catalog-section {
    padding-top: 42px;
  }

  .catalog-section-head {
    align-items: center;
  }

  .catalog-section-head h2 {
    font-size: 24px;
  }

  .catalog-section-actions {
    gap: 0;
  }

  .section-count {
    white-space: nowrap;
  }

  .carousel-button {
    display: none;
  }

  .properties-grid {
    gap: 12px;

    padding-left: 0;
    padding-right: 36px;
    padding-bottom: 18px;

    scroll-padding-left: 0;
    scroll-snap-type: x mandatory;

    -webkit-overflow-scrolling: touch;
  }

  .catalog-property-card {
    flex: 0 0 84%;
  }

}


/* ========================================
   MÓVIL PEQUEÑO
======================================== */

@media (max-width: 420px) {

  .properties-hero h1 {
    font-size: 34px;
  }

  .catalog-section-head {
    align-items: flex-start;
  }

  .catalog-section-head h2 {
    font-size: 21px;
  }

  .catalog-property-card {
    flex-basis: 88%;
  }

  .catalog-property-body {
    padding: 16px;
  }

  .catalog-property-actions {
    padding:
      0 16px 16px;
  }

}

/* Agregar al final de css/propiedades.css */

.catalog-property-actions {
  grid-template-columns: 1fr auto auto auto;
}

.catalog-link-button {
  width: 43px;
  padding: 0;
  background: #151515;
  color: var(--gold2);
}

.catalog-link-button:hover {
  border-color: var(--gold);
  background: var(--gold);
  color: #080808;
}

.catalog-link-button:disabled {
  opacity: .55;
  cursor: wait;
}

@media (max-width: 620px) {
  .catalog-property-actions {
    grid-template-columns: 1fr auto auto auto;
  }
}
