/* CSS for modal_platillos.css */

/* Modal container */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  display: none; /* Ocultar el modal por defecto */
  align-items: center;
  justify-content: center;
  background-color: rgba(0, 0, 0, 0.7);
  z-index: 1300;
  overflow: auto;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Cuando el modal está activo */
.modal.activo {
  display: flex;
}

/* Modal content container */
.modal-contenido {
  background-color: white;
  padding: 0;
  width: 90%;
  max-width: 500px;
  border-radius: 15px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  position: relative;
  animation: slideIn 0.3s ease;
  max-height: 85vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* Close button */
.cerrar {
  position: absolute;
  top: 8px;
  right: 8px;
  color: #666;
  font-size: 20px;
  font-weight: bold;
  cursor: pointer;
  z-index: 10;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.9);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  transition: all 0.3s ease;
}

/* Close button */
.cerrar:hover {
  color: #000;
  background-color: #f0f0f0;
  transform: scale(1.1);
}

/* Contenido del modal */
.modal-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px;
}

/* Imagen dentro del modal */
.modal-image {
  width: 100%;
  height: 250px;
  object-fit: cover; /* Ajuste visual sin deformar */
  object-position: center center; /* Centrado de la imagen */
  border-radius: 10px;
  margin-bottom: 20px;
}

/* Descripción del platillo */
.modal-description {
  width: 100%;
  text-align: left;
  font-size: 16px;
  color: #333;
  margin-bottom: 20px;
  border-top: 1px solid #dddada;
  max-height: 36vh;
  overflow-y: auto;
  white-space: pre-line;
}

/* Párrafos dentro de la descripción */
.modal-description p {
  margin-bottom: 10px;
  line-height: 1.6;
  padding-top: 10px;
}

/* Precio + botón */
.precio-modal {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.precio-modal .precio {
  font-size: 20px;
  font-weight: bold;
  color: #e63946;
}

.btn-ordenar {
  padding: 10px 20px;
  background-color: #e63946;
  color: #fff;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  transition: background-color 0.3s ease;
}

.btn-ordenar:hover {
  background-color: #d62828;
}

/* Header del modal (título y etiqueta) */
.modal-header {
  padding: 20px 20px 10px;
  border-bottom: 1px solid #dddada;
  text-align: center;
}

.modal-header h2 {
  margin: 0;
  font-size: 24px;
  color: #222;
}

/* Badge de especialidad */
.badge-especialidad {
  display: inline-block;
  background-color: #f77f00;
  color: white;
  padding: 6px 12px;
  font-size: 12px;
  margin-top: 10px;
  border-radius: 15px;
  max-width: 100%;
  word-wrap: break-word;
}

/*Descripción corta card */
/* Acortar descripción del platillo*/
.descripcion-corta {
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    text-align: left;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}

.precio{
  font-size: 20px;
  font-weight: bold;
  color: #e63946;
}
.enlace-wsspmodal{
    text-decoration: none;
    color: white;
}
/* Responsive Design */
@media (max-width: 768px) {
  .modal-contenido {
    width: 95%;
    max-height: 90vh;
  }

  .modal-image {
    height: 200px;
  }

  .precio-modal {
    flex-direction: column;
    gap: 10px;
    align-items: flex-start;
  }

  .btn-ordenar {
    width: 100%;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .modal-image {
    height: 180px;
    object-position: center center; /* Centra la parte visible */
  }

  .modal-description {
    font-size: 14px;
  }

  .modal-header h2 {
    font-size: 20px;
  }

  .precio-modal .precio {
    font-size: 18px;
  }

  .btn-ordenar {
    font-size: 13px;
    padding: 8px 16px;
  }

  .badge-especialidad{
    display: block;          /* Hace que se coloque debajo de otros */
    margin-left: 0;          /* Centrado o alinear mejor */
    margin-top: 10px;
    margin-bottom: 10px;     /* Espacio con el siguiente elemento */
  }
}
