/* =========================================================
   🏡 CARDS ESTILO CODE49 – CAMPO 9 INMOBILIARIA
   ========================================================= */

.c9-card {
  background: #fff;
  border-radius: 2px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  overflow: hidden;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  position: relative;
}
.c9-card:hover {
  box-shadow: 0 4px 15px rgba(0,0,0,0.15);
  transform: translateY(-3px);
}

/* --- Imagen con fondo --- */
.c9-card-img {
  position: relative;
  overflow: hidden;
  background-size: cover;
  background-position: center;
  height: 250px;
}



/* --- Ribbon (Vendido / Alquilado) --- */
.ribbon {
  position: absolute;
  top: 12px;
  left: -35px;
  transform: rotate(-45deg);
  background: #a30000;
  color: #fff;
  font-weight: bold;
  text-transform: uppercase;
  padding: 5px 45px;
  font-size: 12px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.2);
  z-index: 5;
}
.ribbon.alquilado {
  background: #ffcc00;
  color: #111;
}

/* --- Hover Overlay --- */
.c9-hover {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.55);
  opacity: 0;
  color: #fff;
  text-align: center;
  padding: 30px 15px;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.c9-hover h4 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 8px;
}
.c9-hover p {
  font-size: 13px;
  line-height: 1.4;
  margin-bottom: 12px;
}
.c9-hover .price {
  font-size: 18px;
  color: #ffcc00;
  font-weight: bold;
}
.c9-card:hover .c9-hover {
  opacity: 1;
}
.c9-id {
  display: block;
  margin-top: 8px;
  font-size: 12px;
  color: #fff;
}

/* --- Cuerpo --- */
.c9-card-body {
  padding: 12px 15px;
  flex-grow: 1;
  background: #f9f9f9;
}
.c9-card-body .meta {
  display: flex;
  align-items: center;
  text-align: center;
  margin-bottom: 10px;
}

.c9-card-body .meta-icons {
  display: flex;
  justify-content: center;
  gap: 25px;
  margin-bottom: 6px;
}

.c9-card-body .meta-icons i {
  font-size: 22px;
  color: #444;
}

.c9-card-body .meta-text {
  font-size: 14px;
  color: #555;
}

.c9-card-body .meta i {
  color: #a30000;
  margin-right: 3px;
}
.c9-card-body .price {
  color: #a30000;
  font-size: 18px;
  font-weight: 600;
}

/* --- Acciones --- */
.c9-card-actions {
  display: flex;
  justify-content: space-between;
  border-top: 1px solid #ddd;
  background: #fff;
  padding: 0;
}

.c9-card-actions a {
  flex: 1;
  text-align: center;
  padding: 10px 0;
  font-size: 16px;
  color: #444;
  border-right: 1px solid #ddd;
  transition: all 0.2s ease;
  background: #fff;
}
.c9-card-actions a:last-child {
  border-right: none;
}

.c9-card-actions a:hover {
  background: #f5f5f5;
  color: #a30000;
}

/* --- Responsive --- */
@media (max-width: 992px) {
  .c9-card-img {
    height: 180px;
  }
}
@media (max-width: 768px) {
  .c9-card-img {
    height: 250px;
  }
  .c9-card-body .price {
    font-size: 16px;
  }
}

/* --- Meta grid estilo Code49 --- */
.meta-grid {
  display: flex;
  justify-content: space-around;
  text-align: center;
  background: #f9f9f9;
  padding: 10px 0;
}

.meta-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.meta-item i {
  font-size: 15px;
  color: #444;
}

.meta-item span {
  font-size: 11px;
  color: #555;
}

.meta-grid .meta-item:not(:last-child) {
  border-right: 1px solid #eee;
}

/* Responsive */
@media (max-width: 768px) {
  .meta-item i {
    font-size: 20px;
  }
  .meta-item span {
    font-size: 12px;
  }
}

.c9-status {
  position: absolute;
  top: 8px;
  right: 8px;
  background: #00984f; /* verde por defecto */
  color: #fff;
  padding: 3px 8px;
  font-size: 13px;
  border-radius: 5px;
  font-weight: 600;
  z-index: 3;
  text-transform: capitalize;
}

.c9-status.alquiler {
  background: #a30000; /* azul */
}

.c9-status.vendido {
  background: #a30000; /* rojo oscuro */
}

.c9-status.reservado {
  background: #ffcc00; /* dorado */
  color: #000;
}

.lote-stats {
    position: absolute;
    top: 12px;
    left: 12px;
    display: flex;
    flex-direction: column;
    gap: 5px;
    z-index: 10;
}

.badge {
    padding: 4px 8px;
    color: #fff;
    font-size: 12px;
    font-weight: bold;
    border-radius: 4px;
    line-height: 1;
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.badge-disponible { background: #28a745; } /* Verde */
.badge-reservado  { background: #ff8c00; } /* Naranja */
.badge-vendido    { background: #c70000; } /* Rojo */

.lote-stats {
    position: absolute;
    top: 10px;
    left: 10px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    z-index: 15;
}

.lote-stats .badge {
    font-size: 13px;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 4px;
    color: white;
    width: fit-content;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.badge-disponible {
    background: #2ecc71;
}

.badge-reservado {
    background: #f39c12;
}

.badge-vendido {
    background: #e74c3c;
}

.lote-stats-row {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  background: #f8f8f8;
  border-bottom: 1px solid #ddd;
}

.lote-stats-row .badge {
  display: inline-block;
  padding: 9px 12px;
  font-size: 12px;
  font-weight: 600;
  border-radius: 4px;
  color: white;
}

.badge-disponible { background: #2ecc71; }
.badge-reservado { background: #f39c12; }
.badge-vendido   { background: #e74c3c; }

.c9-stats {
  display: flex;
  width: 100%;
}

.c9-stats span:nth-child(1) {
  margin-right: auto;
}

.c9-stats span:nth-child(2) {
  margin: 0 auto;
}

.c9-stats span:nth-child(3) {
  margin-left: auto;
}

.c9-stats span {
  min-width: 80px;
  text-align: center;
}

#wa-box {
    position: fixed;
    bottom: 90px;
    left: 20px;
    width: 300px;
    background: #fff;
    border-radius: 12px;
    display: none;
    z-index: 99999;
}

.wa-header {
    background: #a30000;
    color: white;
    padding: 15px;
    font-size: 14px;
    font-weight: 300;
}

.wa-header p {
    margin: 5px 0 0;
    font-size: 11px;
}

.wa-body {
    padding: 10px;
}

.wa-contacto {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f5f5f5;
    padding: 10px;
    border-radius: 8px;
    text-decoration: none;
    color: #333;
}

.float-whats {
    position: fixed !important;
    bottom: 20px;
    left: 20px;
    z-index: 99999;
}

.wa-contacto {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f1f1f1;
    padding: 12px;
    border-radius: 10px;
    text-decoration: none;
    color: #333;
}

.wa-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.wa-avatar {
    width: 40px;
    height: 40px;
    background: #a30000;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 18px;
}

.wa-text strong {
    display: block;
    font-size: 14px;
}

.wa-text span {
    font-size: 12px;
    color: #666;
}

.wa-icon {
    color: #a30000;
    font-size: 20px;
}

.wa-texto-fijo {
    position: fixed;
    bottom: 35px;
    right: 90px;
    background: #25d366;
    color: #fff;
    padding: 8px 12px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    z-index: 99999;
    white-space: nowrap;
}

/* 🔥 triangulito estilo WhatsApp */
.wa-texto-fijo::after {
    content: "";
    position: absolute;
    right: -6px;
    top: 50%;
    transform: translateY(-50%);
    border-width: 6px;
    border-style: solid;
    border-color: transparent transparent transparent #25d366;
}

.wa-fijo {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: #25d366;
    border-radius: 50px;
    padding: 8px 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    z-index: 99999;
    box-shadow: 0 5px 20px rgba(0,0,0,0.3);
}

/* avatar */
.wa-avatar {
    width: 40px;
    height: 40px;
    background: #fff;
    color: #a30000;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

/* texto */
.wa-text strong {
    display: block;
    font-size: 13px;
    color: #a30000;
}

.wa-text span {
    font-size: 11px;
    color: #a30000;
}

.btn-fb {
    display: inline-block;
    background: #1877f2;
    color: #fff;
    padding: 10px 14px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    margin-left: 8px;
    transition: 0.3s;
}

.btn-fb:hover {
    background: #0f5dc2;
}

.acciones-compartir {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.acciones-compartir a {
    flex: 1;
    text-align: center;
}

@media (max-width: 600px) {
    .acciones-compartir {
        flex-direction: column;
    }
}

.btn-wsp, .btn-fb {
    display: block;
    padding: 12px;
    border-radius: 6px;
    font-weight: 600;
    text-decoration: none;
    color: #fff;
}

.btn-wsp {
    background: #25D366;
}

.btn-fb {
    background: #1877f2;
}