/* Guarda como: propiades.css */

/* ==============================================================
   REJILLA DE PROPIEDADES
   ============================================================== */
.propiedades-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
  margin: 30px 0;
  font-family: Arial, sans-serif;
}

.prop-card {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 10px 0 #e1e1e1;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-bottom: 14px;
  user-select: none;
}

.prop-card video {
  width: 100%;
  aspect-ratio: 1/1;
  object-fit: cover;
}

.prop-card .prop-title {
  font-weight: 700;
  font-size: 22px;
  margin: 14px 0 3px;
  text-align: center;
}

.prop-card .prop-location {
  font-size: 14px;
  margin-bottom: 6px;
  color: #555;
}

/* === CONTENEDOR DE BOTONES === */
.prop-card .prop-actions {
  display: flex;
  gap: 6px;
  margin: 14px 0;
  padding: 0 10px;
  justify-content: center;
}

/* === BOTONES === */
.prop-card .prop-actions button,
.prop-card .prop-actions a {
  background: #f6f6f6;
  border: none;
  border-radius: 6px;
  width: 27px;
  height: 27px;
  padding: 0;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s ease-in-out;
  box-shadow: 0 1px 2px #ddd;
  display: flex;
  align-items: center;
  justify-content: center;
  user-select: none;
  text-decoration: none;
  color: black;
}

/* Hover */
.prop-card .prop-actions button:hover,
.prop-card .prop-actions a:hover {
  background: #ddd;
  transform: scale(1.05);
}

/* === PRECIO Y REFERENCIA === */
.prop-card .prop-price {
  font-weight: 600;
  font-size: 20px;
  color: #1ea185;
  margin: 7px 0 2px 0;
}
.prop-card .prop-ref {
  font-size: 13px;
  color: #7d7d7d;
}

/* === RESPONSIVO === */
@media (max-width: 1020px) {
  .propiedades-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 700px) {
  .propiedades-grid {
    grid-template-columns: 1fr;
  }
}

/* === ICONOS === */
.prop-card .prop-actions button img,
.prop-card .prop-actions a img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  border-radius: 6px;
}

/* ==============================================================
   LIGHTBOX GENERAL (AJUSTADO)
   ============================================================== */
.custom-lightbox {
  position: fixed;
  z-index: 20000;
  top: 0; left: 0;
  width: 100vw;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.55);
  overflow: hidden; /* sin scroll */
}

.custom-lightbox .lb-body {
  position: relative;
  background: #000;
  border-radius: 14px;
  padding: 0;
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
  overflow: hidden;
  max-width: 90vw;
  max-height: 85vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.custom-lightbox .lb-close {
  position: absolute;
  top: 10px;
  right: 12px;
  z-index: 3;
  font-weight: 700;
  cursor: pointer;
  background: rgba(255,255,255,0.9);
  border-radius: 50%;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  border: none;
}
.custom-lightbox .lb-close:hover {
  background: #ffcb9a;
}

/* ==============================================================
   FILTRO DE PROPIEDADES (DISEÑO COMPACTO)
   ============================================================== */
.filtro-container {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 25px;
}

.lpi-filtro-form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
  align-items: center;
  justify-content: center;
  background: #fafafa;
  border-radius: 10px;
  padding: 16px 20px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.05);
  max-width: 1200px;
  width: 100%;
}

.lpi-filtro-form select,
.lpi-filtro-form input[type="number"] {
  padding: 8px 10px;
  border: 1px solid #ccc;
  border-radius: 6px;
  background: #fff;
  font-size: 14px;
  height: 40px;
  transition: border-color 0.2s;
  width: 100%;
}

.lpi-filtro-form select:focus,
.lpi-filtro-form input[type="number"]:focus {
  border-color: #1ea185;
  outline: none;
}

.lpi-filtro-form .btn-filtrar {
  background: #7E0C0C; /* rojo principal */
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 8px 18px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s ease-in-out;
  height: 40px;
  width: 100%;
}

.lpi-filtro-form .btn-filtrar:hover {
  background: #5E0909; /* rojo más oscuro al pasar el ratón */
  transform: scale(1.03);
}
/* === BOTÓN LIMPIAR (estilo rojo sutil) === */
.lpi-filtro-form .btn-limpiar {
  background: #fff;
  color: #7E0C0C;
  border: 1px solid #7E0C0C;
  border-radius: 6px;
  padding: 8px 16px;
  cursor: pointer;
  height: 40px;
  width: 100%;
  transition: all 0.2s;
}

.lpi-filtro-form .btn-limpiar:hover {
  background: #7E0C0C;
  color: #fff;
}

@media (max-width: 1100px) {
  .lpi-filtro-form {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  }
}

@media (max-width: 600px) {
  .lpi-filtro-form {
    grid-template-columns: 1fr;
  }
}

/* ==============================================================
   LIGHTBOX GALERÍA (CARRUSEL)
   ============================================================== */
.gallery-slider {
  position: relative;
  width: 90vw;
  max-width: 800px;
  height: 65vh; /* altura fija */
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: #000;
  border-radius: 8px;
}

.gallery-slider .slides {
  display: flex;
  transition: transform 0.4s ease-in-out;
  width: 100%;
  height: 100%;
}

.gallery-slider .slide {
  min-width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #000;
}

.gallery-slider .slide img,
.gallery-slider .slide video {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 0;
  background: #000;
  cursor: pointer;
}

/* Flechas */
.gallery-slider .nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.75);
  color: #000;
  border: none;
  font-size: 28px;
  font-weight: bold;
  border-radius: 50%;
  width: 42px;
  height: 42px;
  cursor: pointer;
  z-index: 2;
  transition: background 0.2s;
}
.gallery-slider .nav:hover {
  background: #ffcb9a;
}
.gallery-slider .nav.prev { left: 10px; }
.gallery-slider .nav.next { right: 10px; }

/* ==============================================================
   IMAGEN A PANTALLA COMPLETA (ENCIMA DEL LIGHTBOX)
   ============================================================== */
.image-overlay {
  position: fixed;
  z-index: 30000;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0,0,0,0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.3s ease;
  overflow: hidden;
}

.image-overlay .overlay-inner {
  position: relative;
  max-width: 95vw;
  max-height: 95vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.image-overlay .overlay-img {
  max-width: 95vw;
  max-height: 95vh;
  border-radius: 8px;
  object-fit: contain;
  z-index: 1;
}

.image-overlay .overlay-close {
  position: absolute;
  top: 20px;
  right: 20px;
  background: rgba(255,255,255,0.9);
  color: #000;
  border: none;
  font-size: 26px;
  font-weight: bold;
  border-radius: 50%;
  width: 42px;
  height: 42px;
  cursor: pointer;
  line-height: 1;
  transition: background 0.2s;
  z-index: 2;
}

.image-overlay .overlay-close:hover {
  background: #ffcb9a;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* ==============================================================
   MENÚ DE COMPARTIR
   ============================================================== */
.share-menu {
  position: absolute;
  background: #fff;
  border: 1px solid #ccc;
  border-radius: 8px;
  box-shadow: 0 3px 10px rgba(0,0,0,0.15);
  display: flex;
  flex-direction: column;
  z-index: 25000;
  transform: translateX(-50%);
  min-width: 160px;
  padding: 6px 0;
  animation: fadeIn 0.2s ease;
}

.share-menu a,
.share-menu button {
  background: none;
  border: none;
  text-align: left;
  padding: 8px 14px;
  font-size: 14px;
  color: #333;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s;
  width: 100%;
}

.share-menu a:hover,
.share-menu button:hover {
  background: #f2f2f2;
}

.share-menu button.copy-link {
  border-top: 1px solid #eee;
}

/*ESTILOS BOTONES INDIVIDUALES*/

/* Contenedor */
.prop-actions {
  display: flex;
  gap: 6px;
  margin: 8px 0;
  padding: 0 4px;
  justify-content: center;
}

/* Botones y enlaces */
.prop-actions button,
.prop-actions a {
  background: #f6f6f6;
  border: none;
  border-radius: 6px;
  width: 27px;
  height: 27px;
  padding: 0;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s ease-in-out;
  box-shadow: 0 1px 2px #ddd;
  display: flex;
  align-items: center;
  justify-content: center;
  user-select: none;
  text-decoration: none;
  color: black;
}

/* Hover */
.prop-actions button:hover,
.prop-actions a:hover {
  background: #ddd;
  transform: scale(1.05);
}

/* Imágenes dentro del botón */
.prop-actions button img,
.prop-actions a img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  border-radius: 6px;
}
