@import url('https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap');

:root { 
  --primary: #fb9f2ee2;
  --dark: #333;
  --bg: #f0eaea;
  --round: 5px;
  --font: 'Poppins', sans-serif;
}

* {
  box-sizing: border-box;
  
}

body {
  font-family: 'Poppins', Arial, sans-serif;
  margin: 0;
  padding: 0;
  background: #fff;
  color: #222;
}


body {
  display: flex;
  min-height: 100vh;
  flex-direction: column;
  padding: 0;
}

footer {
  margin-top: auto;
}

#terrenos-disponibles {
  flex: 1 0 auto;
}

html {
  margin: 0;
  padding: 0;
}

.container {
  width: 85%;
  max-width: 1100px;
  margin: 0 auto;
}

/* Header y Navegación */
/* BUSCADOR */
.buscador-inmuebles {
  background:
    radial-gradient(circle at top right, rgba(249, 145, 9, 0.05), transparent),
    #fdfdfd;  padding: 3rem 1rem 2.5rem;
  text-align: center;
  margin-bottom: 2rem;
}

.buscador-inmuebles h1 {
  font-size: 2.2rem;
  font-weight: 700;
  margin-bottom: 2rem;
  color: #1a1a1a;
  letter-spacing: -0.5px;
}

/* CONTENEDOR FORM */
.buscador-form {
  background: #ffffff;
  max-width: 1100px;
  margin: 0 auto;
  padding: 1.8rem;
  border-radius: 16px;
  box-shadow: 0 15px 40px rgba(0,0,0,0.06);
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

/* FILA PRINCIPAL */
.buscador-row {
  display: flex;
  gap: 1rem;
  width: 100%;
}

/* SELECT E INPUT PRINCIPALES */
.buscador-row select,
.buscador-row input[type="text"] {
  flex: 1;
  padding: 0.75rem 1rem;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  font-size: 0.95rem;
  background: #f9fafb;
  transition: all 0.25s ease;
}

.buscador-row select:focus,
.buscador-row input[type="text"]:focus,
.precio-group select:focus,
.precio-group input[type="text"]:focus {
  outline: none;
  border-color: #ff9800;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(255,152,0,0.15);
}

/* BOTÓN BUSCAR */
.btn-buscar {
  background: linear-gradient(135deg, #ff9800, #ff7a00);
  color: #fff;
  border: none;
  padding: 0.75rem 1.8rem;
  border-radius: 10px;
  font-size: 0.95rem;
  cursor: pointer;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.25s ease;
}

.btn-buscar:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(255,152,0,0.35);
}

/* GRUPO PRECIO */
.precio-group {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  flex-wrap: wrap;
}

.precio-group select,
.precio-group input[type="text"] {
  padding: 0.6rem 0.9rem;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  font-size: 0.9rem;
  background: #f9fafb;
  transition: all 0.25s ease;
}

/* CHECKBOX */
.precio-group label {
  font-size: 0.9rem;
  color: #555;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  cursor: pointer;
}

.precio-group input[type="checkbox"] {
  accent-color: #ff9800;
}

/* RESALTADO RESULTADOS */
.resaltado-busqueda {
  transform: scale(1.02);
  box-shadow: 0 12px 30px rgba(255, 152, 0, 0.3);
  border: 2px solid #ff9800;
  transition: all 0.3s ease;
}

/* MENSAJE SIN RESULTADOS */
.mensaje-busqueda {
  grid-column: 1 / -1;
  width: 100%;
  margin: 25px 0;
  padding: 1.5rem;
  background: #fff3e0;
  border-radius: 12px;
}

.mensaje-busqueda h3 {
  color: #ff7a00;
  margin-bottom: 8px;
}

.mensaje-busqueda p {
  color: #666;
  font-size: 0.95rem;
}

/* RESPONSIVE */
@media (max-width: 900px) {
  .buscador-row {
    flex-direction: column;
  }

  .btn-buscar {
    width: 100%;
    justify-content: center;
  }
}

/* Galería de terrenos */
#terrenos-disponibles h2 {
  text-align: center;
  font-size: 2rem;
  margin: 30px 0;
}

.galeria {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15.6rem, 1fr));
  gap: 1.25rem;
}

.linea-decorativa {
  width: 80%;
  height: 0.3rem;
  background-color: var(--primary);
  margin: 5% auto;
  border-radius: 0.3rem;
}

.card {
  background: #fff;
  border-radius: 0.6rem;
  overflow: hidden;
  box-shadow: 0 0.1rem 0.5rem rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease;
}

.card:hover {
  transform: translateY(-0.3rem);
}

.card h3 {
  margin: 0.6rem;
  font-size: 1.2rem;
  color: #333;
  text-align: center;
}

.card p {
  margin: 0 0.6rem 0.9rem;
  font-size: 0.95rem;
  color: #666;
}

.card .precio {
  font-weight: bold;
  font-size: 1.1rem;
  color: #27ae60;
  text-align: center;
  margin: 0.6rem;
}

.card .card-actions {
  padding: 0.9rem;
  text-align: center;
}

.card .btn-comprar {
  width: 100%;
  padding: 0.75rem;
  background: #27ae60;
  color: white;
  border: none;
  border-radius: 0.4rem;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
}

.card .btn-comprar:hover {
  background: #229954;
  transform: translateY(-0.1rem);
  box-shadow: 0 0.25rem 0.75rem rgba(39, 174, 96, 0.3);
}

/* Secciones */
.section {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2.5rem;
  padding: 3.1rem 1.25rem;
  flex-wrap: wrap;
  background-color: #f2f2f2bb;
  border-radius: 0.9rem;
  margin: 1.9rem 1.25rem;
  box-shadow: 0 0.25rem 0.75rem rgba(0, 0, 0, 0.304);
}

.cardd, .texto {
  flex: 1 1 25rem;
  max-width: 31.25rem;
}

.imagen {
  width: 100%;
  height: auto;
  border-radius: 0.75rem;
  box-shadow: 0 0.25rem 0.6rem rgba(0,0,0,0.15);
}

.texto h2 {
  font-size: 2rem;
  margin-bottom: 1rem;
}

.texto p {
  font-size: 1.1rem;
  margin-bottom: 1.5rem;
}

.texto a {
  display: inline-block;
  padding: 0.6rem 1.25rem;
  background-color: #f3a530;
  color: white;
  text-decoration: none;
  border-radius: 0.5rem;
  font-weight: bold;
  transition: background 0.3s ease;
}

.texto a:hover {
  background-color: #d58f22;
}

/* Modal para imagen ampliada */
.modal {
  display: none;
  position: fixed;
  z-index: 999;
  padding-top: 3.75rem;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.8);
}

.modal-contenido {
  margin: auto;
  display: block;
  max-width: 90%;
  max-height: 80%;
  border-radius: 0.6rem;
  animation: zoomIn 0.3s ease;
}

@keyframes zoomIn {
  from {
    transform: scale(0.8);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

#caption {
  text-align: center;
  color: white;
  padding: 0.6rem;
  font-size: 1.1rem;
}

.cerrar {
  position: absolute;
  top: 1.25rem;
  right: 2.2rem;
  color: white;
  font-size: 2.5rem;
  font-weight: bold;
  cursor: pointer;
}

/* Botón scroll to home */
.scrollToHome {
  border-radius: 20px;
  background: linear-gradient(135deg, #f49d32, #ff6b35);
  bottom: 20px;
  color: #ffffff;
  display: none;
  font-size: 20px;
  height: 55px;
  line-height: 55px;
  padding: 0;
  position: fixed;
  right: 20px;
  text-align: center;
  width: 55px;
  z-index: 99999;
  box-shadow: 0 8px 25px rgba(244, 157, 50, 0.4);
  border: none;
  cursor: pointer;
  font-family: 'Poppins', sans-serif;
  transition: all 0.3s ease-in-out;
}

.scrollToHome:hover {
  transform: translateY(-3px) scale(1.05);
  background: linear-gradient(135deg, #ff6b35, #e8890b);
  box-shadow: 0 12px 35px rgba(244, 157, 50, 0.6);
  color: #ffffff;
}

.scrollToHome:active {
  transform: translateY(-1px) scale(1.02);
  transition: all 0.1s ease;
}

/* Botón flotante de WhatsApp*/
.whatsapp-float {
  position: fixed;
  bottom: 20px;
  left: 20px;
  z-index: 9999;
  width: 60px;
  height: 60px;
  background-color: #25D366;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  box-shadow: 0 8px 20px rgba(37, 211, 102, 0.4);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration: none;
  color: white;
}

.whatsapp-float:hover {
  background-color: #20b954;
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 12px 30px rgba(37, 211, 102, 0.5);
}

/* Footer */
footer {
    background: var(--dark);
    color: white;
    text-align: center;
    padding: 20px 0;
    margin-top: auto;
}

footer p {
    margin: 0 0 15px 0;
    font-size: 1rem;
    font-weight: 400;
}

.redes-sociales {
    margin-top: 15px;
    display: flex;
    justify-content: center;
    gap: 20px;
}

.redes-sociales a {
    color: white;
    font-size: 24px;
    transition: all 0.3s ease;
    text-decoration: none;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid transparent;
}

.redes-sociales a:hover {
    color: var(--primary);
    background: rgba(251, 159, 46, 0.1);
    border-color: var(--primary);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(251, 159, 46, 0.3);
}

.carrusel-chorrillos {
  position: relative;
  width: 100%;
  max-width: 500px;
  margin: 0 auto;
}

.carrusel-container {
  position: relative;
  width: 100%;
  height: 18.75rem;
  overflow: hidden;
  border-radius: 0.75rem;
  box-shadow: 0 0.25rem 0.625rem rgba(0,0,0,0.15);
}

.carrusel-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 0.5s ease-in-out;
}

.carrusel-slide.active {
  opacity: 1;
}

.carrusel-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 0.75rem;
}

.carrusel-indicadores {
  text-align: center;
  margin-top: 0.9375rem;
}

.indicador {
  display: inline-block;
  width: 0.75rem;
  height: 0.75rem;
  background: #ccc;
  border-radius: 50%;
  margin: 0 0.3125rem;
  cursor: pointer;
  transition: background 0.3s ease;
}

.indicador.active {
  background: var(--primary);
}

.indicador:hover {
  background: #999;
}

.modal-visible {
  display: block !important;
}

.modal-compra.modal-visible {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

/* Responsividad */
@media (max-width: 50rem) {
  .buscador-row,
  .precio-group {
    flex-direction: column;
    align-items: stretch;
    gap: 0.5rem;
  }
  
  .buscador-row select,
  .buscador-row input[type="text"] {
    min-width: auto;
    width: 100%;
  }
  
  .galeria {
    grid-template-columns: repeat(auto-fit, minmax(12.5rem, 1fr));
    gap: 0.9rem;
  }
  
  .container {
    width: 90%;
  }
}

/* Footer responsivo */
@media (max-width: 768px) {
    footer {
        padding: 25px 15px;
    }
    
    footer p {
        font-size: 0.9rem;
        margin-bottom: 20px;
    }
    
    .redes-sociales {
        gap: 15px;
    }
    
    .redes-sociales a {
        width: 40px;
        height: 40px;
        font-size: 20px;
    }
}

/* Footer para móviles pequeños */
@media (max-width: 480px) {
    footer {
        padding: 20px 10px;
    }
    
    footer p {
        font-size: 0.85rem;
        line-height: 1.4;
    }
    
    .redes-sociales {
        gap: 12px;
        flex-wrap: wrap;
    }
    
    .redes-sociales a {
        width: 38px;
        height: 38px;
        font-size: 18px;
    }
    

}

@media (max-width: 30rem) {
  .logo {
    height: 3.1rem;
  }
  
  header.shrink .logo {
    height: 2.2rem;
  }
  
  .buscador-inmuebles h1 {
    font-size: 1.2rem;
    margin-bottom: 0.6rem;
  }
  
  .buscador-form {
    padding: 0 0.3rem;
  }
  
  .btn-buscar {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
  }
  
  .precio-group select,
  .precio-group input[type="text"] {
    min-width: 6.25rem;
    padding: 0.4rem 0.5rem;
    font-size: 0.9rem;
  }
  
  /* Galería pequeña */
  .galeria {
    padding: 0 0.3rem;
    gap: 0.6rem;
  }
  
  .card {
    margin: 0 0.3rem;
  }
  
  .card h3 {
    font-size: 1rem;
    margin: 0.5rem;
  }

  .card p {
    font-size: 0.85rem;
    margin: 0 0.5rem 0.75rem;
  }
  
  .modal-contenido {
    max-width: 95%;
  }
  
  #terrenos h2 {
    font-size: 1.3rem;
    padding: 0.6rem;
  }
  
  .container {
    width: 98%;
  }

  .section {
    margin: 0.9375rem 0.3125rem;
    padding: 1.25rem 0.625rem;
    gap: 0.9375rem;
  }
  
  .carrusel-container {
    height: 12.5rem;
  }
  
  .carrusel-chorrillos {
    max-width: 100%;
    width: 100%;
    margin-bottom: 0;
  }
  
  .carrusel-indicadores {
    margin-top: 0.5rem;
    margin-bottom: 0;
  }
  
  .texto {
    margin-top: 0;
    padding-top: 0;
  }
  
  .texto h2 {
    font-size: 1.5rem;
    margin-top: 0;
  }
  
  .texto p {
    font-size: 1rem;
  }
}

@media (max-width: 22.5rem) {
  .buscador-inmuebles {
    padding: 0.9375rem 0 0.625rem 0;
  }
  
  .buscador-inmuebles h1 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
  }
  
  .galeria {
    padding: 0 0.125rem;
    gap: 0.5rem;
  }
  
  .card {
    margin: 0 0.125rem;
    text-align: center;
  }
  
  .section {
    margin: 0.625rem 0.125rem;
    padding: 0.9375rem 0.5rem;
    gap: 0.625rem;
  }
  
  .carrusel-container {
    height: 11.25rem;
  }
  
  .carrusel-indicadores {
    margin-top: 0.3125rem;
    margin-bottom: 0;
  }
  
  .texto h2 {
    font-size: 1.3rem;
  }
  
  .texto p {
    font-size: 0.9rem;
  }
  
  .container {
    width: 99%;
  }
}

@media (max-width: 480px) {
  .scrollToHome {
    width: 45px;
    height: 45px;
    font-size: 16px;
    line-height: 45px;
    border-radius: 15px;
    bottom: 15px;
    right: 15px;
  }

  .scrollToHome:hover {
    transform: translateY(-2px) scale(1.03);
  }
}

/* CALCULADORA DE FINANCIAMIENTO */
.calculadora-section {
  background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
  padding: 2.5rem 1.25rem;
  margin: 2.5rem 0;
  border-radius: 0.9rem;
  box-shadow: 0 0.6rem 1.9rem rgba(0,0,0,0.1);
}

.calculadora-section h2 {
  text-align: center;
  color: #333;
  margin-bottom: 0.6rem;
  font-size: 2.2rem;
}

.calculadora-section p {
  text-align: center;
  color: #666;
  margin-bottom: 1.9rem;
  font-size: 1.1rem;
}

.calculadora-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
  max-width: 62.5rem;
  margin: 0 auto;
}

.calculadora-inputs {
  background: white;
  padding: 1.9rem;
  border-radius: 0.75rem;
  box-shadow: 0 0.3rem 0.9rem rgba(0,0,0,0.08);
}

.input-group {
  margin-bottom: 1.6rem;
}

.input-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: #333;
}

.input-group input,
.input-group select {
  width: 100%;
  padding: 0.75rem 0.9rem;
  border: 0.125rem solid #e1e5e9;
  border-radius: 0.5rem;
  font-size: 1rem;
  transition: border-color 0.3s;
}

.input-group input:focus,
.input-group select:focus {
  outline: none;
  border-color: #f99109;
}

.input-group input[type="range"] {
  padding: 0;
  height: 0.5rem;
  background: #e1e5e9;
  border-radius: 0.25rem;
}

#cuota-inicial-valor {
  display: inline-block;
  margin-left: 0.6rem;
  font-weight: bold;
  color: #f99109;
}

.btn-calcular {
  width: 100%;
  background: linear-gradient(135deg, #f99109 0%, #d87e07 100%);
  color: white;
  border: none;
  padding: 0.9rem;
  border-radius: 0.5rem;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s;
}

.btn-calcular:hover {
  transform: translateY(-0.125rem);
}

.calculadora-resultados {
  background: white;
  padding: 1.9rem;
  border-radius: 0.75rem;
  box-shadow: 0 0.3rem 0.9rem rgba(0,0,0,0.08);
}

.calculadora-resultados h3 {
  text-align: center;
  margin-bottom: 1.6rem;
  color: #333;
}

.resultado-item {
  display: flex;
  justify-content: space-between;
  padding: 0.9rem 0;
  border-bottom: 0.06rem solid #f0f0f0;
}

.resultado-item.total {
  border-bottom: none;
  font-weight: bold;
  font-size: 1.2rem;
  color: #f99109;
  border-top: 0.125rem solid #f99109;
  margin-top: 0.6rem;
  padding-top: 1.25rem;
}

/* MODAL DE COMPRA */
.modal-compra {
  display: grid;
  place-items: center;
  position: fixed;
  z-index: 10000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(6px);
  animation: modalFadeIn 0.3s ease-out;
}

.modal-compra-content {
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
  width: 480px;
  max-width: 95%;
  max-height: 90vh;
  position: relative;
  animation: slideIn 0.3s ease;
  border: 1px solid #e0e0e0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  margin-left: auto;
  margin-right: auto;
}

.modal-compra-header {
  background: linear-gradient(135deg, #27ae60, #2ecc71);
  color: white;
  padding: 20px 24px;
  position: relative;
  flex-shrink: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-compra-header h2 {
  margin: 0;
  font-size: 20px;
  font-weight: 600;
  text-align: center;
}

/* Botón de cierre en header del modal de compra */
.close-compra {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 24px;
  font-weight: bold;
  cursor: pointer;
  color: rgba(255, 255, 255, 0.85);
  transition: all 0.2s ease;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.1);
}

.close-compra:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-50%) scale(1.08);
}

.modal-compra-body {
  padding: 24px;
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.terreno-seleccionado {
  background: #f8f9fa;
  border-radius: 12px;
  padding: 16px;
  border-left: 4px solid #27ae60;
}

.terreno-seleccionado h3 {
  margin: 0 0 12px 0;
  color: #2c3e50;
  font-size: 16px;
  font-weight: 600;
}

.terreno-info p {
  margin: 6px 0;
  color: #555;
  font-size: 14px;
}

.datos-contacto-titulo h3 {
  margin: 8px 0 0;
  color: #333;
  font-size: 1rem;
  text-align: center;
}

.form-compra { flex: 1; }

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group label {
  font-weight: 600;
  color: #333;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 14px;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: #27ae60;
}

.form-group.full-width {
  grid-column: 1 / -1;
}

.form-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-top: 8px;
  padding-top: 12px;
  border-top: 1px solid #eee;
}

.btn-cancelar,
.btn-enviar-compra {
  padding: 10px 20px;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  min-width: 100px;
}

.btn-cancelar {
  background: #f5f5f5;
  color: #666;
  border: 1px solid #ddd;
}

.btn-cancelar:hover {
  background: #e0e0e0;
  color: #333;
}

.btn-enviar-compra {
  background: #27ae60;
  color: white;
}

.btn-enviar-compra:hover {
  background: #219a52;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(39, 174, 96, 0.3);
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideIn {
  from {
    transform: translateY(-50px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes modalFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@media (max-width: 768px) {
  .modal-compra-content {
    margin: 10% auto;
    width: 95%;
    height: auto;
    max-height: 90vh;
  }
  
  .modal-compra-body {
    padding: 20px;
  }
  
  .form-grid {
    grid-template-columns: 1fr;
  }
}

.modal-visible {
  display: block !important;
}

.search-no-results {
  text-align: center;
  padding: 40px;
  color: #666;
}

.search-icon {
  font-size: 3rem;
  margin-bottom: 20px;
  opacity: 0.5;
}

@media (max-width: 480px) {
  .scrollToHome {
    width: 45px;
    height: 45px;
    font-size: 16px;
    line-height: 45px;
    border-radius: 15px;
    bottom: 15px;
    right: 15px;
  }

  .scrollToHome:hover {
    transform: translateY(-2px) scale(1.03);
  }
}

/* ESTILOS PARA MODALES */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0,0,0,0.5);
  animation: fadeIn 0.3s;
}

.modal-content {
  background-color: #fefefe;
  margin: 5% auto;
  padding: 0;
  border-radius: 12px;
  width: 90%;
  max-width: 600px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.3);
  animation: slideIn 0.3s;
}

.modal-large {
  max-width: 900px;
}

.modal-header {
  background: linear-gradient(135deg, #f99109 0%, #d87e07 100%);
  color: white;
  padding: 20px;
  border-radius: 12px 12px 0 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-header h2 {
  margin: 0;
  font-size: 1.5rem;
}

.close {
  color: white;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
  transition: opacity 0.3s;
}

.close:hover {
  opacity: 0.7;
}

.modal-body {
  padding: 30px;
}

/* Estilos para modal de comparación */
.tabla-comparacion {
  overflow-x: auto;
}

.tabla-comparacion table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 20px;
}

.tabla-comparacion th,
.tabla-comparacion td {
  padding: 12px;
  text-align: left;
  border-bottom: 1px solid #eee;
}

.tabla-comparacion th {
  background: #f8f9fa;
  font-weight: 600;
  color: #333;
}

.comparacion-img {
  width: 100px;
  height: 80px;
  object-fit: cover;
  border-radius: 6px;
}

.comparacion-precio {
  color: #f99109;
  font-weight: bold;
  font-size: 1.1rem;
}

/* Estilos para modal de detalles */
.detalle-contenido {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
}

.detalle-imagen img {
  width: 100%;
  height: 250px;
  object-fit: cover;
  border-radius: 8px;
}

.detalle-info {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.detalle-precio {
  font-size: 2rem;
  font-weight: bold;
  color: #f99109;
}

.detalle-ubicacion,
.detalle-area {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #666;
  font-size: 1.1rem;
}

.detalle-descripcion {
  color: #333;
  line-height: 1.6;
}

.detalle-acciones {
  display: flex;
  gap: 15px;
  margin-top: 20px;
}

.btn-contactar,
.btn-favorito-modal {
  flex: 1;
  padding: 12px 20px;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
}

.btn-contactar {
  background: #25d366;
  color: white;
} 
.btn-contactar:hover {
  background: #20b954;
}

/* Responsive para modales */
@media (max-width: 768px) {
  .modal-content {
    width: 95%;
    margin: 10% auto;
  }
  
  .detalle-contenido {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  
  .detalle-acciones {
    flex-direction: column;
  }
  
  .tabla-comparacion {
    font-size: 0.9rem;
  }
  
  .comparacion-img {
    width: 80px;
    height: 60px;
  }
}

/* --- Ajustes para el Carrusel --- */
.carrusel-container {
    position: relative;
    width: 100%;
    height: auto !important; 
    min-height: auto !important;
    aspect-ratio: 4 / 3; 
    overflow: hidden;
    background-color: #f9f9f9;
}

.carrusel-slide img {
    width: 100%;
    height: 100%;
    object-fit: contain !important;
    display: block;
}

/* --- Ajuste para Celulares --- */
@media (max-width: 768px) {
    .section {
        flex-direction: column !important;
        gap: 0.5rem !important; 
        padding: 1rem !important;
    }

    .cardd, .texto {
        flex: 1 1 auto !important;
        max-width: 100% !important;
    }

    .texto {
        margin-top: 0 !important;
        padding-top: 0 !important;
        text-align: center;
    }

    .texto h2 {
        font-size: 1.5rem !important;
        margin-top: 5px !important;
        line-height: 1.2;
    }

    .texto p {
        font-size: 1rem !important;
        margin-bottom: 1rem !important;
    }
}

/* REPARACIÓN DE MENÚ LATERAL Y BOTÓN DE CIERRE  */

@media (max-width: 768px) {
    .nav-menu {
        position: fixed !important;
        top: 0;
        right: 0;
        width: 250px;
        height: 100%;
        background-color: rgba(0, 0, 0, 0.9); 
        display: flex;
        flex-direction: column;
        padding: 60px 20px 20px 20px !important;
        z-index: 10000;
        transition: 0.3s;
    }

    .close-menu {
        position: absolute !important;
        top: 15px !important;
        right: 15px !important;
        font-size: 28px !important;
        color: white !important;
        cursor: pointer;
        line-height: 1;
        z-index: 10001;
        width: auto !important;
        height: auto !important;
    }

    .nav-menu ul {
        list-style: none;
        padding: 0;
        margin: 0;
        display: flex !important;
        flex-direction: column !important; 
        align-items: flex-start !important; 
        gap: 20px; 
    }

    .nav-menu ul li a {
        color: white !important;
        text-decoration: none;
        font-size: 18px;
        font-weight: bold;
        display: block;
    }
}

.card img {
  width: 100%;
  height: 180px;   
  object-fit: contain;  
  background-color: #f4f4f4; 
  border-radius: 10px;
}

.card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

/* CARRUSEL GRANDE EN TELÉFONO*/
@media (max-width: 768px) {
  .carrusel-container {
    width: 325px !important;
    height: 29vh !important;   
    max-height: none !important;
    aspect-ratio: auto !important;

  }

  .carrusel-slide img {
    width: 100%;
    height: 100%;
    object-fit: contain;
  }
}




