/* ========================================
   CARRUSEL DESTACADOS - RESET Y BASE
======================================== */
.smp-carousel-container {
  --carousel-gap: 24px;
  --transition-speed: 0.4s;
  --primary-color: #2c3e50;
  --accent-color: #871c1c;
  --accent-secondary: #27ae60;
  --shadow-color: rgba(0, 0, 0, 0.12);
  --shadow-hover: rgba(0, 0, 0, 0.25);

  position: relative;
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 !important;
  padding: 40px 0 !important;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen,
    Ubuntu, sans-serif;
  box-sizing: border-box;
  overflow: hidden;
}

.smp-carousel-container *,
.smp-carousel-container *::before,
.smp-carousel-container *::after {
  box-sizing: border-box;
}

.smp-carousel-title {
  text-align: center;
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--primary-color);
  margin-bottom: 10px;
  padding: 0 20px;
}

.smp-carousel-subtitle {
  text-align: center;
  font-size: 1.1rem;
  color: #666;
  margin-bottom: 30px;
  padding: 0 20px;
}

/* ========================================
   WRAPPER Y TRACK
======================================== */
.smp-carousel-wrapper {
  position: relative;
  overflow: hidden !important;
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 10px 21px 20px 20px;
  /* Eliminar cualquier borde o sombra */
  border: none !important;
  box-shadow: none !important;
  outline: none !important;
  background: transparent !important;
}

.smp-carousel-track {
  display: flex;
  gap: var(--carousel-gap);
  transition: transform var(--transition-speed) cubic-bezier(0.25, 0.1, 0.25, 1);
  cursor: grab;
  /* Eliminar cualquier borde */
  border: none !important;
  outline: none !important;
}

.smp-carousel-track.dragging {
  cursor: grabbing;
  transition: none;
}

/* ========================================
   TARJETAS DE PROPIEDAD - 3 POR VISTA
======================================== */
.smp-property-card {
  /* CÃ¡lculo exacto: 100% menos los gaps, dividido entre 3 */
  flex: 0 0 calc((100% - (var(--carousel-gap) * 2)) / 3);
  width: calc((100% - (var(--carousel-gap) * 2)) / 3);
  min-width: 0;
  max-width: none;
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 8px 5px var(--shadow-color);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  position: relative;
  /* Eliminar bordes residuales */
  border: none !important;
  outline: none !important;
}

.smp-property-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 16px 15px var(--shadow-hover);
}

.smp-property-card:focus-within {
  outline: 0px solid var(--accent-color) !important; /* borde a 0 de elemento seleccionado, mantengo regla por si se edita por accesibilidad. */
  outline-offset: 2px;
}

/* Imagen */
.smp-card-image {
  position: relative !important;
  width: 100% !important;
  height: 240px !important;
  overflow: hidden !important;
  border: none !important;
}

.smp-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
  border: none !important;
}

.smp-property-card:hover .smp-card-image img {
  transform: scale(1.08);
}

/* Badges */
.smp-card-badges {
  position: absolute;
  top: 12px;
  left: 12px;
  right: 12px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  pointer-events: none;
  z-index: 2;
}

.smp-badge {
  padding: 8px 16px;
  border-radius: 25px;
  font-size: 1rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border: none !important;
}

.smp-badge-featured {
  background: #0e0e0e;
  color: #fff;
}

.smp-badge-operation {
  color: #fff;
}

.smp-badge-venta {
  background: var(--accent-color);
}

.smp-badge-alquiler {
  background: #892028;
}

/* ========================================
   CONTENIDO DE LA TARJETA
======================================== */
.smp-card-content {
  padding: 24px;
  text-align: center;
  border: none !important;
  background: #fff;
}

/* Tipo de inmueble - Estilo destacado con fondo */
.smp-card-type {
  display: inline-block;
  font-size: 1rem;
  font-weight: 670;
  color: var(--accent-color);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-bottom: 12px;
  padding: 6px 14px;
  border-radius: 20px;
}

.smp-card-title {
  font-size: 1.750rem;
  font-weight: 670;
  color: var(--primary-color);
  margin: 0 0 16px 0;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.8em;
  font-family: var(--var-primary-font) !important;

}

.smp-card-title a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease;
}

.smp-card-title a:hover,
.smp-card-title a:focus {
  color: var(--accent-color);
}

/* ========================================
   CARACTERÃSTICAS - CENTRADAS
======================================== */
.smp-card-features {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
  margin-bottom: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid #eee;
  border-top: none !important;
  border-left: none !important;
  border-right: none !important;
}

.smp-feature {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 1rem;
  color: #555;
}

.smp-feature svg {
  width: 20px;
  height: 20px;
  fill: var(--accent-color);
  opacity: 0.9;
}

.smp-feature-value {
  font-weight: 700;
  color: var(--primary-color);
}

/* Precio */
.smp-card-price {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--primary-color);
}

.smp-card-price-suffix {
  font-size: 1rem;
  font-weight: 400;
  color: #666;
}

.smp-card-price-consultar {
  font-size: 1rem;
  color: #666;
  font-style: italic;
}

/* Link invisible para accesibilidad */
.smp-card-link {
  position: absolute;
  inset: 0;
  z-index: 1;
  border: none !important;
  outline: none !important;
  background: transparent !important;
}

.smp-card-link:focus {
  outline: none !important;
}

/* ========================================
   CONTROLES DE NAVEGACIÃ“N
======================================== */
.smp-carousel-controls {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
  margin-top: 40px;
  padding: 0 20px;
}

.smp-carousel-btn {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  border: 2px solid var(--primary-color) !important;
  background: #fff;
  color: var(--primary-color);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.smp-carousel-btn:hover:not(:disabled) {
  background: var(--primary-color);
  color: #fff;
}

.smp-carousel-btn:focus {
  outline: 3px solid var(--accent-color) !important;
  outline-offset: 2px;
}

.smp-carousel-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.smp-carousel-btn svg {
  width: 24px;
  height: 24px;
  fill: currentColor;
}

/* Indicadores (dots) */
.smp-carousel-dots {
  display: flex;
  gap: 10px;
  align-items: center;
}

.smp-carousel-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid var(--primary-color) !important;
  background: transparent;
  cursor: pointer;
  padding: 0;
  transition: all 0.3s ease;
}

.smp-carousel-dot:hover {
  background: rgba(44, 62, 80, 0.3);
}

.smp-carousel-dot:focus {
  outline: 2px solid var(--accent-color) !important;
  outline-offset: 2px;
}

.smp-carousel-dot.active {
  background: var(--primary-color);
  transform: scale(1.3);
}

/* Contador */
.smp-carousel-counter {
  font-size: 0.95rem;
  color: #666;
  min-width: 70px;
  text-align: center;
  font-weight: 500;
}

/* ========================================
   RESPONSIVE - TABLETS (2 tarjetas)
======================================== */
@media (max-width: 1100px) {
  .smp-property-card {
    flex: 0 0 calc((100% - var(--carousel-gap)) / 2);
    width: calc((100% - var(--carousel-gap)) / 2);
  }

  .smp-card-image {
    height: 220px !important;
  }
}

/* ========================================
   RESPONSIVE - MÃ“VIL (1 tarjeta)
======================================== */
@media (max-width: 768px) {
  .smp-carousel-container {
    padding: 30px 0 !important;
  }

  .smp-carousel-wrapper {
    padding: 10px 15px;
  }

  .smp-carousel-title {
    font-size: 1.8rem;
  }

  .smp-carousel-subtitle {
    font-size: 1rem;
  }

  .smp-property-card {
    /* En mÃ³vil: 1 tarjeta = 100% del ancho disponible */
    flex: 0 0 100%;
    width: 100%;
  }

  .smp-card-image {
    height: 200px !important;
  }

  .smp-card-content {
    padding: 20px;
  }

  .smp-carousel-controls {
    gap: 15px;
    margin-top: 30px;
  }

  .smp-carousel-btn {
    width: 46px;
    height: 46px;
  }

  .smp-carousel-dots {
    display: none;
  }

  .smp-carousel-counter {
    display: block;
  }
}

@media (max-width: 480px) {
  .smp-card-content {
    padding: 16px;
  }

  .smp-card-features {
    gap: 14px;
  }

  .smp-card-price {
    font-size: 1.3rem;
  }

  .smp-card-title {
    font-size: 1.05rem;
  }
}

/* ========================================
   ACCESIBILIDAD
======================================== */
@media (prefers-reduced-motion: reduce) {
  .smp-carousel-track {
    transition: none;
  }

  .smp-property-card,
  .smp-property-card:hover {
    transform: none;
    transition: none;
  }

  .smp-card-image img {
    transition: none;
  }
}

/* Skip link para teclado */
.smp-skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--primary-color);
  color: #fff;
  padding: 8px 16px;
  z-index: 100;
  border-radius: 4px;
  text-decoration: none;
}

.smp-skip-link:focus {
  top: 10px;
}

/* Live region para lectores de pantalla */
.smp-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
