   /* ===== 1. FONDO OSCURO (FIXED) ===== */
  #profileModal.modal {
    position: fixed;
    inset: 0; /* Cubre toda la pantalla */
    z-index: 9999;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px); /* Efecto borroso elegante */
    
    /* Centrado Flex */
    display: flex; 
    align-items: center; 
    justify-content: center;
    
    /* Transición suave opcional */
    transition: opacity 0.3s ease;
  }

  /* CLASE PARA OCULTAR (¡IMPORTANTE!) 
     Usamos !important para asegurar que nada lo pise */
  #profileModal.hidden {
    display: none !important;
    opacity: 0;
    pointer-events: none;
  }

  /* ===== 2. TARJETA (CONTENEDOR) ===== */
  #profileModal .modal-content {
    background: #fff;
    width: 92%;
    max-width: 400px; /* Un poco más angosto para estética móvil */
    
    /* Altura máxima y Scroll interno */
    max-height: 85vh; 
    overflow-y: auto; 
    
    border-radius: 20px;
    position: relative;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    
    /* Evitar scroll feo en iOS */
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none; /* Ocultar barra scroll en Firefox */
  }
  
  /* Ocultar barra scroll en Chrome/Safari */
  #profileModal .modal-content::-webkit-scrollbar {
    display: none;
  }

  /* ===== 3. BOTÓN CERRAR ===== */
  #profileModal .close {
    position: absolute;
    top: 15px;
    right: 15px;
    z-index: 100;
    
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    
    display: flex;
    align-items: center;
    justify-content: center;
  }

  /* ===== 4. IMAGEN HERO (CONTROL DE TAMAÑO) ===== */
  .modal-hero {
    position: relative;
    width: 100%;
    /* ¡CRUCIAL! Esto evita que una foto vertical rompa el modal */
    height: 250px; 
  }

  .modal-hero img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Recorta la imagen para llenar el espacio */
    display: block;
  }

  .modal-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 20px 16px;
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
    color: #fff;
  }
  
  .modal-overlay h2 {
    margin: 0 0 4px 0;
    font-size: 20px;
  }

  /* ===== 5. CUERPO Y GALERÍA ===== */
  .modal-body {
    padding: 20px;
  }

  .description {
    font-size: 14px;
    line-height: 1.5;
    color: #666;
    margin-bottom: 20px;
    text-align: center;
  }

  .gallery {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 20px;
  }

  .gallery img {
    width: 100%;
    aspect-ratio: 1 / 1; /* Cuadradas para uniformidad */
    object-fit: cover;
    border-radius: 12px;
    background: #eee;
  }

  /* ===== 6. BOTONES ===== */
  .actions {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
  }
  
  .btn-fav, .btn-share {
    flex: 1;
    padding: 10px;
    border-radius: 50px;
    border: 1px solid #eee;
    background: #f9f9f9;
    font-size: 18px;
    cursor: pointer;
    transition: background 0.2s;
  }
  .btn-fav:hover, .btn-share:hover {
    background: #ececec;
  }

  /* Botón WhatsApp */
  .btn-ws {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    background: #25D366;
    color: #fff;
    font-weight: 600;
    padding: 14px;
    border-radius: 50px;
    text-decoration: none;
    box-shadow: 0 4px 10px rgba(37, 211, 102, 0.3);
  }
  
  .btn-lock {
    width: 100%;
    padding: 14px;
    background: #333;
    color: #fff;
    border-radius: 50px;
    border: none;
    font-weight: 600;
  }
  
  /* Badge categoría */
  .badge {
    display: inline-block;
    font-size: 10px;
    padding: 4px 8px;
    border-radius: 4px;
    background: rgba(255,255,255,0.2);
    backdrop-filter: blur(4px);
    text-transform: uppercase;
    letter-spacing: 1px;
  }
 