/* ===== Fidalsa Listings - estilos ===== */

.fidalsa-widget {
  font-family: inherit;
  max-width: 1200px;
  margin: 1.5rem auto;
  padding: 0;
}

/* ---- Filtros ---- */
.fidalsa-filters {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.fidalsa-filters select,
.fidalsa-filters input {
  flex: 1;
  min-width: 160px;
  padding: 10px 12px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 14px;
  background: #fff;
  font-family: inherit;
}
.fidalsa-filters select:focus,
.fidalsa-filters input:focus {
  outline: none;
  border-color: #00bfa5;
}
.fidalsa-counter {
  font-size: 13px;
  color: #666;
  margin-bottom: 12px;
}

/* ---- Grid ---- */
.fidalsa-grid {
  display: grid;
  gap: 24px;
}
.fidalsa-widget[data-columnas="2"] .fidalsa-grid { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
.fidalsa-widget[data-columnas="3"] .fidalsa-grid { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.fidalsa-widget[data-columnas="4"] .fidalsa-grid { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }

/* ---- Card ---- */
.fidalsa-card {
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
  transition: box-shadow 0.25s ease;
  text-decoration: none !important;
  color: inherit;
  display: block;
}
.fidalsa-card:hover {
  box-shadow: 0 4px 16px rgba(0,0,0,0.12);
}

/* Imagen */
.fd-img-wrap {
  position: relative;
  width: 100%;
  height: 0;
  padding-bottom: 75%; /* ratio 4:3 */
  overflow: hidden;
  background: #f5f5f5;
}
.fd-img-wrap img {
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  display: block !important;
}

/* Body */
.fd-body {
  padding: 16px 4px 18px;
}

/* Título + rating en la misma línea */
.fd-title {
  margin: 0 0 4px;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.35;
  color: #222;
}
.fd-rating {
  color: #f5a623;
  font-weight: 600;
  font-size: 14px;
  margin-left: 2px;
  white-space: nowrap;
}

/* Ubicación */
.fd-location {
  margin: 0 0 6px;
  font-size: 14px;
  color: #555;
  font-weight: 400;
}

/* Specs */
.fd-specs {
  margin: 0;
  font-size: 13px;
  color: #888;
}

/* ---- Mensajes ---- */
.fidalsa-empty {
  text-align: center;
  padding: 40px;
  color: #999;
  font-style: italic;
}

/* ---- Card oculta por filtro ---- */
.fidalsa-card.fd-hidden {
  display: none;
}

/* ---- Imagen rota ---- */
.fd-img-wrap.fd-img-error {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f0f0f0;
}
.fd-img-wrap.fd-img-error img {
  display: none;
}
.fd-img-wrap.fd-img-error::after {
  content: "🏠";
  font-size: 48px;
  opacity: 0.3;
}

/* ---- Responsive ---- */
@media (max-width: 600px) {
  .fidalsa-widget[data-columnas="3"] .fidalsa-grid,
  .fidalsa-widget[data-columnas="4"] .fidalsa-grid {
    grid-template-columns: 1fr 1fr;
    gap: 14px;
  }
  .fidalsa-widget[data-columnas="2"] .fidalsa-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .fd-body { padding: 12px 2px 14px; }
  .fd-title { font-size: 13px; }
  .fd-location { font-size: 12px; }
  .fd-specs { font-size: 11px; }
}
