* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background: #f8f9fa;
  color: #333;
  line-height: 1.6;
}

/* barra search de plantilla */
.advanced-search {
  display: none;
}

/* Contenedor principal */
.ficha-container {
  max-width: 1400px;
  margin: 0 auto;
}

/* Header de la ficha */
.ficha-header {
  /*background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);*/
  color: white;
  padding: 40px 20px;
  text-align: center;
}

.ficha-header-content {
  max-width: 1200px;
  margin: 0 auto;
}

.titulo-principal {
  font-size: clamp(1.8rem, 4vw, 3rem);
  font-weight: 700;
  margin-bottom: 15px;
  line-height: 1.2;
}

.referencia-header {
  font-size: clamp(1rem, 1.2vw, 1.3rem);
  opacity: 0.9;
  margin-bottom: 10px;
  color: #333;
}

.ubicacion-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1.1rem;
  margin-top: 10px;
  justify-content: center;
}

.ubicacion-header i {
  color: #EB6906;
}

.ubicacion-header span {
  color: #333;
  font-size: clamp(1rem, 1.2vw, 1.3rem);
}

/* Precio destacado */
.precio-destacado {
  /*background: #f16901;
  color: #fff;*/
  color: #333;
  text-align: center;
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 700;
  position: relative;
  border-radius: 0px !important;
}

.precio-etiqueta {
  font-size: 0.9rem;
  font-weight: 400;
  opacity: 0.9;
  display: block;
  margin-bottom: 5px;
}

/* Layout principal */
.contenido-principal {
  display: grid;
  grid-template-columns: 1fr 400px;
  gap: 30px;
  max-width: 1400px;
  margin: 40px auto;
}

/* Columna izquierda - Contenido */
.columna-izquierda {
  display: flex;
  flex-direction: column;
  gap: 30px;
}

/* ========================================
   GALERÍA DE FOTOS CON CARRUSEL
   ======================================== */

.galeria-principal {
  position: relative;
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 15px rgba(0, 0, 0, 0.08);
}

/* Contenedor de foto principal con flechas */
.foto-principal-wrapper {
  position: relative;
  width: 100%;
  height: 500px;
  background: #000;
  overflow: hidden;
}

.foto-principal {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: opacity 0.3s ease;
  cursor: pointer;
}

.foto-principal:hover {
  opacity: 0.95;
}

/* Flechas de navegación foto principal */
.flecha {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.5);
  color: white;
  border: none;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  transition: all 0.3s ease;
  z-index: 10;
  backdrop-filter: blur(5px);
}

.flecha:hover {
  background: rgba(221, 39, 29, 0.9);
  transform: translateY(-50%) scale(1.1);
}

.flecha:active {
  transform: translateY(-50%) scale(0.95);
}

.flecha.flecha-izquierda {
  left: 20px;
}

.flecha.flecha-derecha {
  right: 20px;
}

/* Contador de fotos */
.contador-fotos {
  position: absolute;
  bottom: 20px;
  right: 20px;
  background: rgba(0, 0, 0, 0.7);
  color: white;
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 0.9rem;
  font-weight: 600;
  backdrop-filter: blur(5px);
  z-index: 10;
}

/* Animación de transición suave */
@keyframes fadeInImage {
  from {
    opacity: 0.5;
  }

  to {
    opacity: 1;
  }
}

.foto-principal.changing {
  animation: fadeInImage 0.3s ease;
}

/* ========================================
   LIGHTBOX MODAL
   ======================================== */

.lightbox-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.95);
  z-index: 9999;
  overflow: hidden;
  animation: fadeIn 0.3s ease;
}

.lightbox-modal.active {
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-contenido {
  position: relative;
  max-width: 95%;
  max-height: 95%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-imagen {
  max-width: 100%;
  max-height: 90vh;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 10px 50px rgba(0, 0, 0, 0.5);
  transition: opacity 0.3s ease;
}

/* Botón cerrar lightbox */
.lightbox-cerrar {
  position: absolute;
  top: 20px;
  right: 20px;
  background: rgba(255, 255, 255, 0.2);
  color: white;
  border: none;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
  z-index: 10001;
}

.lightbox-cerrar:hover {
  background: rgba(221, 39, 29, 0.9);
  transform: scale(1.1);
}

/* Flechas del lightbox */
.lightbox-flecha {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.2);
  color: white;
  border: none;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
  z-index: 10001;
}

.lightbox-flecha:hover {
  background: rgba(221, 39, 29, 0.9);
  transform: translateY(-50%) scale(1.1);
}

.lightbox-flecha.izquierda {
  left: 30px;
}

.lightbox-flecha.derecha {
  right: 30px;
}

/* Contador en lightbox */
.lightbox-contador {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.7);
  color: white;
  padding: 10px 20px;
  border-radius: 25px;
  font-size: 1rem;
  font-weight: 600;
  backdrop-filter: blur(10px);
  z-index: 10001;
}

/* Spinner de carga en lightbox */
.lightbox-loading {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 50px;
  height: 50px;
  border: 4px solid rgba(255, 255, 255, 0.3);
  border-top-color: #EB6906;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  z-index: 10000;
}

@keyframes spin {
  to {
    transform: translate(-50%, -50%) rotate(360deg);
  }
}

.lightbox-imagen.loading {
  opacity: 0;
}

/* Características rápidas */
.caracteristicas-rapidas {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 15px;
  background: white;
  padding: 25px;
  border-radius: 12px;
  box-shadow: 0 2px 15px rgba(0, 0, 0, 0.08);
}

.caracteristica-rapida {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 15px;
  background: #f8f9fa;
  border-radius: 8px;
  transition: all 0.3s;
}

.caracteristica-rapida:hover {
  background: #EB6906;
  color: white;
  transform: translateY(-3px);
}

.caracteristica-rapida i {
  font-size: 2rem;
  margin-bottom: 10px;
  color: #EB6906;
}

.caracteristica-rapida:hover i {
  color: white;
}

.caracteristica-valor {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 5px;
}

.caracteristica-label {
  font-size: clamp(1.2rem, 2vw, 1.6rem);
  opacity: 0.8;
}

/* Sección común */
.seccion {
  background: white;
  padding: 30px;
  border-radius: 12px;
  box-shadow: 0 2px 15px rgba(0, 0, 0, 0.08);
}

.seccion-titulo {
  font-size: 1.8rem;
  font-weight: 700;
  color: #222;
  margin-bottom: 20px;
  padding-bottom: 15px;
  border-bottom: 3px solid #EB6906;
}

/* Descripción */
.descripcion-texto {
  font-size: clamp(1.4rem, 2vw + 0.5rem, 2rem);
  color: #555;
  text-align: left;
}

/* Características detalladas */
.caracteristicas-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 15px;
}

.caracteristica-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 15px;
  background: #f8f9fa;
  border-radius: 8px;
  border-left: 4px solid #EB6906;
}

.caracteristica-item i {
  color: #EB6906;
  font-size: 1.2rem;
  margin-top: 2px;
}

.caracteristica-info {
  text-align: left;
}

.caracteristica-info strong {
  display: block;
  color: #222;
  font-weight: 600;
  margin-bottom: 3px;
}

.caracteristica-info span {
  color: #666;
}

/* Video y Tour Virtual */
.media-container {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  border-radius: 8px;
}

.media-container iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

/* Columna derecha - Sidebar */
.columna-derecha {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Formulario de contacto */
.formulario-contacto {
  background: white;
  padding: 30px;
  border-radius: 12px;
  box-shadow: 0 2px 15px rgba(0, 0, 0, 0.08);
  position: sticky;
  top: 20px;
}

.formulario-titulo {
  font-size: 1.5rem;
  font-weight: 700;
  color: #222;
  margin-bottom: 20px;
  text-align: center;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 8px;
  color: #333;
}

.form-control {
  width: 100%;
  padding: 12px 15px;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  font-size: 1rem;
  transition: all 0.3s;
  font-family: inherit;
}

.form-control:focus {
  outline: none;
  border-color: #EB6906;
  box-shadow: 0 0 0 3px rgba(221, 39, 29, 0.1);
}

textarea.form-control {
  resize: vertical;
  min-height: 100px;
}

.checkbox-group {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 20px 0;
}

.checkbox-group input[type="checkbox"] {
  margin-top: 4px;
  width: 18px;
  height: 18px;
  cursor: pointer;
}

.checkbox-group label {
  font-size: 0.9rem;
  line-height: 1.5;
  cursor: pointer;
}

.btn-submit {
  width: 100%;
  padding: 15px;
  background: #EB6906;
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 1.1rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.btn-submit:hover {
  background: #b91d16;
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(221, 39, 29, 0.3);
}

/* Honeypot oculto */
.honeypot {
  position: absolute;
  left: -5000px;
  opacity: 0;
  pointer-events: none;
}

/* Mensajes de alerta */
.alert {
  padding: 15px 20px;
  border-radius: 8px;
  margin-bottom: 20px;
  font-weight: 500;
}

.alert-success {
  background: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.alert-danger {
  background: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

/* Info del agente */
.info-agente {
  padding: 5px;
}

.info-agente-titulo {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 20px;
  color: #222;
}

.contacto-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid #f0f0f0;
}

.contacto-item:last-child {
  border-bottom: none;
}

.contacto-item i {
  color: #EB6906;
  font-size: 1.2rem;
  width: 25px;
}

.contacto-item a {
  color: #333;
  text-decoration: none;
  transition: color 0.3s;
}

.contacto-item a:hover {
  color: #EB6906;
}

/* Botones de acción */
.botones-accion {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 20px;
}

.btn-accion {
  padding: 12px;
  text-align: center;
  border-radius: 8px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-compartir {
  background: #4267b2;
  color: white;
}

.btn-compartir:hover {
  background: #365899;
}

.btn-imprimir {
  background: #555;
  color: white;
}

.btn-imprimir:hover {
  background: #333;
}

/* Estado reservado */
.badge-estado {
  display: inline-block;
  background: #ffc107;
  color: #000;
  padding: 8px 20px;
  border-radius: 20px;
  font-weight: 700;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 15px;
}

/* formulario ficha */

#formulario-contacto input.form-control,
#formulario-contacto textarea.form-control {
  padding: 10px 10px; /* aumenta la altura */
  font-size: clamp(1rem, 1.2vw, 1.3rem);
  border-radius: 6px; /* opcional: esquinas redondeadas */
  box-sizing: border-box; /* asegura que padding no rompa el ancho */
}

/* arreglo botones rrss */
.botones-accion a {
  color: #fff;
  transition: color 0.3s ease;
}

.checkbox-group label {
  font-size: clamp(1.5rem, 1.2vw, 1.3rem);
}
/* Animaciones */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.seccion {
  animation: fadeIn 0.6s ease-out;
}

.block-content {
  padding-top: 20px;
}

/* ========================================
   RESPONSIVE
   ======================================== */

@media (max-width: 1024px) {
  .contenido-principal {
    grid-template-columns: 1fr;
  }

  .formulario-contacto {
    position: relative;
    top: 0;
  }

  .foto-principal-wrapper {
    height: 400px;
  }

  .flecha {
    width: 45px;
    height: 45px;
    font-size: 1.1rem;
  }

  .flecha.flecha-izquierda {
    left: 15px;
  }

  .flecha.flecha-derecha {
    right: 15px;
  }
}

@media (max-width: 768px) {
  .ficha-header {
    /* padding: 30px 15px; */
    border-radius: 12px 12px 0px 0px;
    padding-bottom: 0;
  }

  .titulo-principal {
    /* font-size: 1.5rem; */
  }

  .precio-destacado {
    padding: 15px 20px;
    font-size: 2rem;
    border-radius: 0 0 12px 12px;
  }

  .contenido-principal {
    padding: 0 0px;
    margin: 20px auto;
    gap: 20px;
  }

  .foto-principal-wrapper {
    height: 300px;
  }

  .flecha {
    width: 40px;
    height: 40px;
    font-size: 1rem;
  }

  .flecha.flecha-izquierda {
    left: 10px;
  }

  .flecha.flecha-derecha {
    right: 10px;
  }

  .contador-fotos {
    bottom: 15px;
    right: 15px;
    padding: 6px 12px;
    font-size: 0.8rem;
  }

  .referencia-header {
    font-size: clamp(1.3rem, 2vw, 1.6rem);
  }
  .caracteristicas-rapidas {
    grid-template-columns: repeat(2, 1fr);
    padding: 20px;
  }

  .caracteristicas-grid {
    grid-template-columns: 1fr;
  }

  .botones-accion {
    grid-template-columns: 1fr;
  }

  .seccion {
    padding: 20px;
  }

  .seccion-titulo {
    font-size: 1.5rem;
  }

  /* Lightbox responsive */
  .lightbox-cerrar {
    top: 10px;
    right: 10px;
    width: 40px;
    height: 40px;
    font-size: 1.2rem;
  }

  .lightbox-flecha {
    width: 45px;
    height: 45px;
    font-size: 1.2rem;
  }

  .lightbox-flecha.izquierda {
    left: 15px;
  }

  .lightbox-flecha.derecha {
    right: 15px;
  }

  .lightbox-contador {
    bottom: 15px;
    padding: 8px 16px;
    font-size: 0.9rem;
  }

  #formulario-contacto input.form-control,
  #formulario-contacto textarea.form-control {
    font-size: clamp(1.4rem, 2vw, 1.8rem);
  }
  /*
  .checkbox-group label {
    font-size: clamp(1.2rem, 1.2vw, 1.5rem);
  }*/
}

@media (max-width: 480px) {
  .foto-principal-wrapper {
    height: 250px;
  }

  .flecha {
    width: 35px;
    height: 35px;
    font-size: 0.9rem;
  }

  .flecha.flecha-izquierda {
    left: 8px;
  }

  .flecha.flecha-derecha {
    right: 8px;
  }

  .contador-fotos {
    bottom: 10px;
    right: 10px;
    padding: 5px 10px;
    font-size: 0.75rem;
  }

  .caracteristicas-rapidas {
    display: flex;
    flex-wrap: wrap; /* Permite que los items pasen a nueva línea */
    justify-content: center; /* Centra horizontalmente */
    gap: 8px; /* Espacio entre items */
    padding: 1px; /* Padding uniforme */
    padding-top: 5px;
  }

  .caracteristica-rapida {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 5px;
    background: #fff !important;
    border-radius: 8px;
    transition: all 0.3s;
  }

  .caracteristica-rapida:hover {
    background: #EB6906 !important;
    color: white !important;
    transform: translateY(-3px);
  }

  .caracteristica-label {
    white-space: nowrap; /* Impide saltos de línea */
    overflow: hidden; /* Oculta texto que sobrepase */
    text-overflow: ellipsis; /* Muestra "..." si se corta */
  }

  /* Lightbox responsive móvil */
  .lightbox-cerrar {
    width: 35px;
    height: 35px;
    font-size: 1rem;
  }

  .lightbox-flecha {
    width: 40px;
    height: 40px;
    font-size: 1rem;
  }

  .lightbox-flecha.izquierda {
    left: 10px;
  }

  .lightbox-flecha.derecha {
    right: 10px;
  }

  .lightbox-contador {
    bottom: 10px;
    padding: 6px 12px;
    font-size: 0.8rem;
  }
}

@media (max-width: 400px) {
  .caracteristica-rapida {
    padding: 0;
  }
}

/* puntos '·' que surgen en algunas fichas */
.wpb_text_column ul li:before {
  display: none;
}

/* ========================================
   MAPA DE UBICACIÓN
   ======================================== */

.seccion-mapa {
  margin-top: 40px;
  padding-top: 40px;
  border-top: 1px solid #e5e5e5;
}

.seccion-mapa .seccion-titulo i {
  color: #d32f2f;
  margin-right: 10px;
}

.contenedor-mapa {
  width: 100%;
  height: 500px;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.contenedor-mapa #home-map {
  width: 100%;
  height: 100%;
}

/* Responsive */
@media (max-width: 768px) {
  .contenedor-mapa {
    height: 400px;
  }
}

@media (max-width: 480px) {
  .contenedor-mapa {
    height: 300px;
  }
}
