/* seccion de cabecera */
body {
  font-family: "Press Start 2P", system-ui;
  background-color: white;
}

header {
  display: flex;
  justify-content: center;
  text-align: center;
  background-color: #5d04d9;
}

header img {
  padding: 15px 0px;
}

.contenido {
  display: flex;
  justify-content: space-around;
  align-items: baseline;
  flex-direction: row;
  margin-top: 90px;
  margin-bottom: 40px;
}

/* Seccion de producto */
.productos {
  display: flex;
  justify-content: center;
  flex-direction: column;
}

.productos p {
  text-transform: uppercase;
  font-family: "Press Start 2P", system-ui;
  font-size: 24px;
  margin-bottom: 30px;
  text-align: center;
}

.cards_productos {
  display: grid;
  grid-template-columns: repeat(3, 1fr); /* 3 columnas de igual tamaño */
  gap: 20px; /* Espacio entre las tarjetas */
  width: auto;
  max-width: 700px;
  height: 600px;
  padding: 15px;
  overflow-y: auto;
  overflow-x: hidden;
}
/* Estilo del scrollbar de productos */
.cards_productos {
  scrollbar-width: thin; /* Para navegadores Firefox */
  scrollbar-color: #5d04d9 #f0f0f0; /* Color del thumb y del track en Firefox */
}

/* Estilos para navegadores WebKit (Chrome, Safari) */
.cards_productos::-webkit-scrollbar {
  width: 10px; /* Ancho del scrollbar */
}

.cards_productos::-webkit-scrollbar-track {
  background: #f0f0f0; /* Color del track (parte de fondo del scrollbar) */
  border-radius: 10px; /* Bordes redondeados */
}

.cards_productos::-webkit-scrollbar-thumb {
  background: #5d04d9; /* Color del thumb (parte móvil del scrollbar) */
  border-radius: 10px; /* Bordes redondeados */
}

.cards_productos::-webkit-scrollbar-thumb:hover {
  background: #4e03a6; /* Color del thumb cuando se pasa el cursor por encima */
}


.card_detalles {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  background-color: #5d04d9;
  border: 3px solid #000000;
  padding: 20px;
  border-radius: 10px;
  width: 170px;
  height: 220px;
  margin-bottom: 20px;
}

.imagen_producto {
  width: 180px;
  height: 260px;
  overflow: hidden;
  border-radius: 10px;
  border: 3px solid #000000;
  background-color: rgb(255, 255, 255);
  margin-bottom: 10px;
  position: relative;
}

.imagen_producto img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  top: 0;
  left: 0;
}

.card_detalles p {
  font-family: "IBM Plex Mono", monospace;
  font-size: 16px;
  font-weight: 300;
  color: white;
  margin-bottom: 15px;
}

.info_compra {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.info_compra p {
  margin: 0;
  font-weight: 500;
}

.info_compra img {
  max-width: 30px;
  cursor: pointer;
}

/* seccion de crear producto */
.crear_producto {
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  flex-direction: column;
}

.crear_producto p {
  text-transform: uppercase;
  font-family: "Press Start 2P", system-ui;
  font-size: 24px;
  margin-bottom: 30px;
}

.formulario {
  display: flex;
  justify-content: center;
  flex-direction: column;
  width: 400px;
}

.formulario_contenido {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-bottom: 20px;
}

.formulario_contenido input {
  border: 3px solid #03318c;
  border-radius: 50px;
  padding: 15px 15px;
  transition: border-color 0.3s;
  width: 100%;
}
.formulario_contenido input:focus {
  border-color: #5d04d9; 
  font-family: "IBM Plex Mono", monospace;
  font-size: 16px;
  font-weight: 700;
  color: #03318c;
}

.formulario_contenido input::placeholder {
  font-family: "IBM Plex Mono", monospace;
  font-size: 16px;
  font-weight: 700;
  color: #03318c;
}

.botones {
  display: flex;
  justify-content: space-between;
  width: 400px;
}

.btn_enviar {
  background-color: #03318c;
  color: white;
  border: none;
  border-radius: 15px;
  font-family: "IBM Plex Mono", monospace;
  font-size: 16px;
  font-weight: 500;
  padding: 15px 60px;
}

.btn_limpiar {
  background-color: white;
  color: #03318c;
  border: 3px solid #03318c;
  border-radius: 15px;
  font-family: "IBM Plex Mono", monospace;
  font-size: 16px;
  font-weight: 500;
  padding: 15px 60px;
}


/* seccion de footer */
footer {
  bottom: 0;
  width: 100%;
  background-color: #5d04d9;
  color: white;
  text-align: center;
  padding: 50px 0px;
}

footer h2 {
  text-transform: uppercase;
  font-family: "IBM Plex Mono", monospace;
  font-size: 16px;
  font-weight: 500;
  margin-top: 20px;
}

footer h3 {
  text-transform: uppercase;
  font-family: "IBM Plex Mono", monospace;
  font-size: 16px;
  font-weight: 300;
  margin-top: 20px;
}


/* validacion de formulario */
.error-message {
  color: red;
  font-size: 12px; 
  margin-top: 5px;
  display: none;
}

.error-message.active {
  display: block;
}
.btn_enviar:disabled {
  background-color: #cccccc;
  cursor: not-allowed;
  color: #03318c;
  border: 3px solid #03318c;
}


/* Estilos para pantallas más pequeñas (tablet y móvil) */
@media (max-width: 768px) {
  .contenido {
    flex-direction: column;
    margin-top: 50px;
  }

  .productos {
    order: 2; 
    width: 100%; 
    margin-top: 50px;
    align-items: center;
  }

  .crear_producto {
    order: 1; 
    width: 100%; 
    align-items: center;
  }

  .formulario {
    width: 80%;
  }

  .botones {
    flex-direction: row;
    gap: 10px;
  }

  .btn_enviar, .btn_limpiar {
    width: 100%;
  }
  .cards_productos {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    width: auto;
    max-width: 550px;
    height: 600px;
    padding: 15px;
    overflow-y: auto;
    overflow-x: hidden;
}
}
