#planoOverlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  z-index: 9999;
  align-items: center;
  justify-content: center;
}

#planoOverlay.show {
  display: flex;
}


/* =====================================================
   CATÁLOGO PAGE
   ===================================================== */

/* --- Hero --- */
.cat-hero {
  position: relative;
  padding: 96px 0 64px;
  background: url("../images/proyecto-hero.webp") center/cover no-repeat;
  overflow: hidden;
}

.cat-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(7, 64, 117, 0.9) 0%, rgba(13, 55, 82, 0.78) 55%, rgba(13, 55, 82, 0.55) 100%);
}

.cat-hero .container {
  position: relative;
  z-index: 1;
}

.cat-hero__label {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #fff;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.35);
  padding: 4px 14px;
  border-radius: 20px;
  margin-bottom: 14px;
}

.cat-hero__title {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 800;
  color: #fff;
  margin: 0 0 14px;
}

.cat-hero__desc {
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.85);
  max-width: 560px;
  line-height: 1.7;
  margin: 0;
}

/* --- Sección --- */
.cat-section {
  padding: 56px 0 80px;
  background: #f4f6fb;
}


/* --- Tabs --- */
.cat-tabs {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 36px;
}

.cat-tab {
  padding: 8px 20px;
  border-radius: 24px;
  border: 2px solid rgba(145, 182, 214, 0.5);
  background: #fff;
  color: var(--primary2);
  font-size: 0.85rem;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.18s ease;
}

.cat-tab:hover {
  border-color: var(--primary2);
}

.cat-tab.active {
  background: var(--primary2);
  border-color: var(--primary2);
  color: #fff;
}

/* --- Grid --- */
.cat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
}

/* --- Card --- */
.cat-card {
  background: #fff;
  border-radius: 16px;
  border: 1px solid rgba(145, 182, 214, 0.3);
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  animation: fadeUp 0.3s ease both;
}

.cat-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(13, 55, 82, 0.1);
}

.cat-card.hidden {
  display: none;
}

.cat-card[data-img] {
  cursor: pointer;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Header */
.cat-card__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.cat-card__tipo {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 4px 12px;
  border-radius: 20px;
}

.cat-card__tipo.terreno  { background: rgba(255, 210, 1, 0.18); color: #8a6200; }
.cat-card__tipo.casa     { background: rgba(145, 182, 214, 0.22); color: var(--primary2); }
.cat-card__tipo.comercial { background: var(--primary2); color: var(--primary); }

.cat-card__etapa {
  font-size: 0.75rem;
  color: var(--muted);
  font-weight: 300;
}

/* Code */
.cat-card__code {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--primary2);
  letter-spacing: 0.04em;
  border-bottom: 2px solid var(--primary);
  padding-bottom: 10px;
}

/* Specs */
.cat-card__specs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.spec {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.spec--full {
  grid-column: 1 / -1;
}

.spec__label {
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.spec__val {
  font-size: 0.88rem;
  font-weight: 300;
  color: var(--text);
}

/* Beneficios comercial */
.cat-card__beneficios {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.cat-card__beneficios li {
  font-size: 0.85rem;
  color: var(--text);
}

/* Footer badges */
.cat-card__footer {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: auto;
}

.badge {
  font-size: 0.7rem;
  font-weight: 800;
  padding: 4px 12px;
  border-radius: 20px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.badge.disponible { background: #e8f8f0; color: #1a7a45; }
.badge.agotado    { background: #fce8e8; color: #c0392b; }
.badge.bono       { background: rgba(255, 210, 1, 0.18); color: #8a6200; }
.badge.nobono     { background: rgba(177, 181, 184, 0.25); color: var(--muted); }

/* Comercial highlight */
.cat-card--comercial {
  border: 2px solid var(--primary);
  background: linear-gradient(135deg, rgba(255, 210, 1, 0.08), #fff);
}

/* --- Modal Plano --- */
#planoOverlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(4px);
}

#planoOverlay.active {
  display: flex;
}

.plano-modal {
  position: relative;
  background: #fff;
  border-radius: 16px;
  padding: 16px;
  max-width: 90vw;
  max-height: 90vh;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.3);
}

.plano-img {
  display: block;
  max-width: 80vw;
  max-height: 80vh;
  border-radius: 8px;
  object-fit: contain;
}

.plano-close {
  position: absolute;
  top: -14px;
  right: -14px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: var(--primary2);
  color: #fff;
  font-size: 0.85rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* --- Responsive --- */
@media (max-width: 900px) {
  .cat-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  .cat-grid {
    grid-template-columns: 1fr;
  }
}