/* ============================================================
   CAMPO9 INMOBILIARIA - estilo Code49
   Archivo: propiedad.css
   ============================================================ */

body {
  font-family: 'Poppins', sans-serif;
  background: #fafafa;
  margin: 0;
  color: #333;
}

h1, h2, h3, h4 {
  color: #a30000;
  margin-top: 0;
}

/* ===== CONTENEDOR PRINCIPAL ===== */
.prop-container {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 25px;
  max-width: 1500px;
  margin: 30px auto;
}

/* ===== GALERÍA ===== */
.prop-gallery {
  background: #fff;
  border-radius: 2px;
  box-shadow: 0 3px 8px rgba(0,0,0,0.08);
  overflow: hidden;
}

.prop-gallery .main-img {
  width: 100%;
  height: 600px;
  background: #f5f5f5;
  display: flex;
  justify-content: center;
  align-items: center;
}

.prop-gallery .main-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .4s ease;
}

.prop-gallery .main-img img:hover {
  transform: scale(1.02);
}

.thumbs {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  padding: 10px;
  gap: 8px;
  background: #fff;
  border-top: 1px solid #eee;
}

.thumbs img {
  width: 300px;
  height: 250px;
  object-fit: cover;
  border-radius: 2px;
  cursor: pointer;
  opacity: 0.7;
  transition: all .3s ease;
}

.thumbs img.active,
.thumbs img:hover {
  border: 2px solid #a30000;
  opacity: 1;
}

/* ===== LATERAL (CORREDOR + CONTACTO) ===== */
.prop-sidebar {
  display: flex;
  flex-direction: column;
  gap: 25px;
}

.agent-card, .contact-card {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 3px 8px rgba(0,0,0,0.08);
  padding: 20px;
}

.agent-card h3, .contact-card h3 {
  font-size: 18px;
  color: #a30000;
  margin-bottom: 15px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.agent-body {
  display: flex;
  gap: 15px;
  align-items: center;
}

.agent-body img {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #a30000;
}

.agent-body div {
  font-size: 14px;
  color: #444;
}

.contact-card form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.contact-card input,
.contact-card textarea {
  border: 1px solid #ddd;
  border-radius: 6px;
  padding: 10px;
  font-size: 14px;
  font-family: inherit;
  transition: border-color .3s ease;
}

.contact-card input:focus,
.contact-card textarea:focus {
  border-color: #a30000;
  outline: none;
}

.contact-card button {
  background: #a30000;
  color: #fff;
  border: none;
  padding: 10px;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
  transition: background .3s ease;
}

.contact-card button:hover {
  background: #8a0000;
}

.btn-whatsapp {
  display: block;
  text-align: center;
  background: #a30000;
  color: #fff;
  padding: 12px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  transition: background .3s ease;
}

.btn-whatsapp i {
  margin-right: 6px;
}

.btn-whatsapp:hover {
  background: #8a0000;
}

/* ===== INFORMACIÓN PRINCIPAL ===== */
.prop-info {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 3px 8px rgba(0,0,0,0.08);
  padding: 25px;
  grid-column: 1 / 2;
  margin-top: 25px;
}

.prop-info h1 {
  font-size: 26px;
  color: #222;
}

.prop-info .price {
  font-size: 45px;
  font-weight: 400;
  color: #a30000;
  margin-bottom: 10px;
      font-family: cursive;
}

.prop-info .dolar {
  font-size: 35px;
  font-weight: 400;
  color: #000;
  margin-bottom: 10px;
      font-family: cursive;
}

.prop-info .meta {
      color: #fcf9f9;
    font-size: 15px;
    margin-bottom: 20px;
    background: #5b5858;
    padding: 10px;
    border-radius: 15px;
}

.prop-info .prop-table {
  width: 100%;
  border-collapse: collapse;
  margin: 15px 0;
}

.prop-info .prop-table td {
  padding: 6px 10px;
  border-bottom: 1px solid #eee;
  font-size: 14px;
}

.prop-info .prop-table td:first-child {
  color: #a30000;
  font-weight: 600;
  width: 130px;
}

.prop-info h2 {
  font-size: 18px;
  margin-top: 25px;
  color: #a30000;
}

.prop-info p {
  font-size: 15px;
  color: #444;
  line-height: 1.6em;
}

/* ===== MAPA ===== */
.prop-map {
  width: 100%;
  height: 400px;
  border-radius: 12px;
  margin-top: 15px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
  overflow: hidden;
}

/* ===== SIMILARES ===== */
.prop-similares {
  max-width: 1500px;
  margin: 40px auto;
  padding: 0 15px;
}

.prop-similares h3 {
  color: #a30000;
  font-size: 20px;
  margin-bottom: 15px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.sim-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill,minmax(220px,1fr));
  gap: 15px;
}

.sim-card {
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
  overflow: hidden;
  transition: transform .3s ease, box-shadow .3s ease;
}

.sim-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 5px 12px rgba(0,0,0,0.15);
}

.sim-card img {
  width: 100%;
  height: 150px;
  object-fit: cover;
}

.sim-card .body {
  padding: 10px;
}

.sim-card h4 {
  font-size: 15px;
  margin: 5px 0;
  color: #333;
}

.sim-card .price {
  color: #a30000;
  font-weight: 600;
  font-size: 14px;
}

@media (max-width:1500px){
    .prop-container {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 25px;
    max-width: 1300px;
    margin: auto 50px;
    margin-top:15px;
}
}

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
  .prop-container {
    grid-template-columns: 1fr;
  }
  .prop-sidebar {
    order: 2;
  }
  .prop-info {
    order: 1;
  }
  .prop-gallery .main-img {
    height: 300px;
  }
}
/* === Mapa estilo index === */
.prop-map {
  width: 100%;
  height: 420px;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.leaflet-container {
  width: 100%;
}

/* === Propiedades similares (mismo estilo que index) === */
.sim-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
}

.c9-card-item {
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 3px 8px rgba(0,0,0,0.08);
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.c9-card-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 12px rgba(0,0,0,0.15);
}

.c9-card-img img {
  width: 100%;
  height: 180px;
  object-fit: cover;
}

.c9-card-body {
  padding: 10px 12px 15px;
}

.c9-card-body h4 {
  font-size: 15px;
  font-weight: 600;
  color: #222;
  margin: 5px 0;
  text-transform: none;
}

.c9-card-body h4::first-letter {
  text-transform: uppercase;
}

.c9-card-body .meta {
  font-size: 13px;
  color: #777;
  margin-bottom: 5px;
}

.c9-card-body .price {
  font-weight: 700;
  color: #a30000;
  font-size: 15px;
}

@media (max-width:1600px){
    .thumbs img {
    width: 150px;
    height: 150px;
    object-fit: cover;
    border-radius: 6px;
    cursor: pointer;
    opacity: 0.7;
    transition: all .3s ease;}
    
    .prop-gallery .main-img {
    height: 500px;
  }
  
  .btn-accion {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #a30000;
    color: #fff;
    padding: 7px 10px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    transition: 0.3s;
    font-size: 14px;
    padding:10px;
}
}

@media (max-width:1400px){
    .thumbs img {
    width: 150px;
    height: 150px;
    object-fit: cover;
    border-radius: 6px;
    cursor: pointer;
    opacity: 0.7;
    transition: all .3s ease;}
    
    .prop-gallery .main-img {
    height: 300px;
  }
  .btn-accion {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #a30000;
    color: #fff;
    padding: 7px 10px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    transition: 0.3s;
    font-size: 14px;
    padding:10px;
}
}

@media (max-width:750px){
        .prop-container {
        display: grid;
        grid-template-columns: 1fr;
        gap: 25px;
        max-width: 1300px;
        margin: auto;
        margin-top: 5px;
    }
    
    .thumbs img {
    width: 100px;
    height: 80px;
    object-fit: cover;
    border-radius: 6px;
    cursor: pointer;
    opacity: 0.7;
    transition: all .3s ease;}
    
    .prop-gallery .main-img {
    height: 300px;
  }
  
  .prop-info .price {
  font-size: 30px;
  font-weight: 700;
  color: #a30000;
  margin-bottom: 10px;
  text-align:center;
}

  .prop-info .dolar {
  font-size: 20px;
  font-weight: 400;
  color: #000;
  margin-bottom: 34px;
  text-align:center;
}
}

.c9-action-buttons {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.btn-accion {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #a30000;
  color: #fff;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 600;
  transition: 0.3s;
  font-size: 14px;
  padding:10px;
}
.btn-accion:hover { background: #7a0000; color: #fff; }
.btn-accion.dorado {
  background: #ffcc00;
  color: #a30000;
}
.btn-accion.dorado:hover {
  background: #e6b800;
  color: #600000;
}

/* 🎯 Estilos especiales solo para impresión */
@media print {
  @page {
    size: A4 portrait; /* tamaño A4 vertical */
    margin: 10mm;
  }

  body {
    background: #fff !important;
    -webkit-print-color-adjust: exact; /* conserva los colores */
  }

  header, nav, footer, .c9-side, .c9-action-buttons {
    display: none !important; /* oculta menús y botones */
  }

  .c9-propiedad-detalle {
    width: 100%;
    margin: 0;
    box-shadow: none;
  }

  .postcard, .contenido-propiedad {
    page-break-inside: avoid;
    transform: scale(0.95);
    transform-origin: top center;
  }
}

.lightbox-overlay {
  position: fixed;
  inset: 0;
  background: rgb(0 0 0 / 41%);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  cursor: zoom-out;
}

.lightbox-overlay img {
  max-width: 100%;
  max-height: 90%;
  border-radius: 2px;
  box-shadow: 0 0 25px rgba(255, 255, 255, 0.3);
  animation: zoomIn 0.3s ease;
  border: 10px solid #ddd;
}

@keyframes zoomIn {
  from { opacity: 0; transform: scale(0.9); }
  to { opacity: 1; transform: scale(1); }
}

.prop-gallery img {
  cursor: zoom-in;
  transition: transform 0.2s ease;
}
.prop-gallery img:hover {
  transform: scale(1.03);
}

.lightbox-overlay button {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0,0,0,0.5);
  border: none;
  color: white;
  font-size: 2rem;
  padding: 10px 18px;
  cursor: pointer;
  border-radius: 8px;
  transition: background 0.2s;
}

.lightbox-overlay button:hover {
  background: rgba(255,255,255,0.25);
}

.lightbox-prev { left: 5%; }
.lightbox-next { right: 5%; }

.prop-video {
  margin-top: 30px;
  background: #fff;
  padding: 15px;
  border-radius: 10px;
  box-shadow: 0 3px 10px rgba(0,0,0,0.1);
}
.prop-video h3 {
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  margin-bottom: 10px;
  color: #a30000;
  display: flex;
  align-items: center;
  gap: 6px;
}
.video-wrapper {
  position: relative;
  overflow: hidden;
  border-radius: 10px;
}
.video-wrapper iframe,
.video-wrapper video {
  width: 100%;
  height: 400px;
  border: none;
  border-radius: 10px;
}

.btn-accion.azul {
    background: #a30000;
    color: #fff !important;
}
.btn-accion.azul:hover {
    background: #00447d;
}

.contador-visitas {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  padding: 6px 10px;
  background: #f8f8f8;
  border-radius: 8px;
  font-size: 13px;
  color: #444;
  width: fit-content;
}

.contador-visitas i {
  color: #a30000; /* color Campo 9 */
  font-size: 14px;
}

.contador-visitas span {
  line-height: 1;
}

.contador-visitas {
  background: #fff;
  border: 1px solid #eee;
  box-shadow: 0 2px 6px rgba(0,0,0,0.06);
}
.fecha-publicacion{
    background: #a30000;
    margin-top: 15px;
    font-size: 13px;
    color: #ffffff;
    border-top: 1px solid #eee;
    padding: 8px;
    text-align: center;
}

.bloque-fechas-admin{
        margin-top: 15px;
    padding: 10px;
    background: #2f2929;
    border-left: 4px solid #c00;
    font-size: 13px;
    color: #fffafa;
}

.bloque-fechas-admin div{
    margin:4px 0;
}

.faltante{
    color:#2e7d32;
    font-weight:bold;
}

.vencido{
    color:#c62828;
    font-weight:bold;
}
.slider-principal{
    width: 100%;
    overflow: hidden;
}

.slider-principal img{
    width: 100%;
    height: 300px; /* o el alto que uses */
    object-fit: cover;
    object-position: center; /* 🔥 ESTO ES LA CLAVE */
}

.price-wrap{
        display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
    margin-bottom: 30px;
    padding: 10px;
    background: #b9b9b982;
    border-radius: 15px;
}

.price-gs{
    font-size:50px;
    font-weight:900;
    color:#b30000;
    line-height:1;
}

.price-usd{
    font-size:42px;
    font-weight:800;
    color:#222;
    white-space:nowrap;
}

/* MOBILE */
@media(max-width:768px){

    .price-wrap{
                flex-direction: column;
        align-items: flex-start;
        border-top: 2px solid #ccc;
        padding-top: 15px;
        border-bottom: 2px solid #ccc;
        margin-bottom: 15px;
    }

    .price-gs{
        font-size:36px;
    }

    .price-usd{
        font-size:28px;
    }

}

.btn-descargar{
    display:block;
    width:100%;
    background:#009640;
    color:#fff;
    text-align:center;
    padding:14px;
    border-radius:10px;
    text-decoration:none;
    font-weight:600;
    font-size:15px;
    margin-bottom:15px;
    box-sizing:border-box;
    transition:.2s;
}

.btn-descargar:hover{
    background:#007a35;
    transform:translateY(-2px);
}

.btn-descargar i{
    margin-right:6px;
}

.btn-accion.verde{
    background:#009640;
    color:#fff;
}

.btn-accion.verde:hover{
    background:#007a35;
}

/* ==========================================
   MARCA DE AGUA IMAGEN PRINCIPAL
========================================== */

.watermark-wrap{
    position:relative;
    overflow:hidden;
}

.watermark-text{
    position:absolute;

    top:50%;
    left:50%;

    transform:
        translate(-50%,-50%)
        rotate(-25deg);

    font-size:55px;
    font-weight:900;

    color:#ffffff;

    opacity:.18;

    pointer-events:none;

    white-space:nowrap;

    z-index:50;

    text-shadow:
        2px 2px 6px rgba(0,0,0,.45);
}

/* ==========================================
   MINIATURAS CON MARCA DE AGUA
========================================== */

.thumb-wrap{
    position:relative;
    display:inline-block;
}

.thumb-watermark{
    position:absolute;

    top:50%;
    left:50%;

    transform:
        translate(-50%,-50%)
        rotate(-25deg);

    color:#fff;

    font-size:11px;

    font-weight:800;

    letter-spacing:1px;

    opacity:.45;

    pointer-events:none;

    z-index:99;

    text-shadow:
        1px 1px 3px rgba(0,0,0,.7);

    white-space:nowrap;
}