/* estilos.css (ejemplo básico) */
body {
  font-family: 'Poppins', sans-serif;
  margin: 0;
  padding: 0;
}

/* Contenedor general que centra todo y empuja el footer */
.lista-container {
    min-height: 70vh; 
    padding: 40px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Hoja blanca */
.lista-blanca {
    width: 100%;
    max-width: 900px;
    background: #ffffff;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    margin-top: 20px;
    min-height: 300px;
}

/* -------------------------------------------------- */
/* -------- NUEVO DISEÑO CON CÓDIGO EN EL CENTRO ---- */
/* -------------------------------------------------- */

.item-lista {
  display: grid;
  grid-template-columns: 1fr 300px 120px 110px;
  align-items: center;
  gap: 20px;
  padding: 14px 0;
  border-bottom: 1px solid #e3e3e3;
}

/* NOMBRE */
.nombre-prod {
  font-size: 17px;
  font-weight: 600;
  max-width: 300px;
  word-break: break-word;
}

/* CÓDIGO (CENTRADO) */
.codigo-prod {
  margin-right: 100px;
  font-size: 14px;
  font-weight: 600;
  text-align: center;
  background: #f1f1f1;
  padding: 6px 10px;
  color: #555;
  border-radius: 8px;
  display: inline-block;
}

/* CANTIDAD */
.cantidad-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.cantidad-box label {
  font-size: 13px;
  color: #555;
}

.cantidad-box input {
  width: 65px;
  padding: 6px;
  font-size: 15px;
  border: 2px solid #f30817;
  border-radius: 8px;
  text-align: center;
  outline: none;
  transition: 0.2s;
}

.cantidad-box input:focus {
  border-color: #c30612;
  box-shadow: 0 0 6px rgba(243, 8, 23, 0.4);
}

/* BOTÓN ELIMINAR */
.btn-eliminar {
  background: #ff4b4b;
  color: white;
  padding: 7px 14px !important;
  border-radius: 7px;
  font-size: 14px;
  cursor: pointer;
  border: none;
}

.btn-eliminar:hover {
  background: #d93c3c;
}

/* ==== SECCIÓN CORREO ===== */
/* ========================= */

.campo-correo {
  width: 100%;
  max-width: 500px;
  margin: 0 auto 25px auto;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.campo-correo label {
  font-size: 15px;
  font-weight: 600;
  color: #333;
}

.campo-correo input {
  padding: 12px 15px;
  font-size: 15px;
  border-radius: 10px;
  border: 2px solid #f30817;
  outline: none;
  transition: 0.25s ease;
  text-align: center;
  font-family: 'Poppins', sans-serif;
}

.campo-correo input:focus {
  border-color: #c30612;
  box-shadow: 0 0 8px rgba(243, 8, 23, 0.3);
}

.campo-correo input::placeholder {
  color: #999;
  font-size: 14px;
}

/* BOTONES INFERIORES */
.acciones-lista {
  display: flex;
  justify-content: space-between;
  gap: 15px;
  padding-top: 10px;
  border-top: 1px solid #eee;
}

.acciones-lista button {
  flex: 1;
  background-color: #f30817;
  color: white;
  border: none;
  padding: 12px 18px;
  font-size: 15px;
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
  transition: 0.25s ease;
  box-shadow: 0 3px 8px rgba(0,0,0,0.15);
}

.acciones-lista button:hover {
  background-color: #c30612;
  transform: translateY(-2px);
  box-shadow: 0 5px 14px rgba(0,0,0,0.22);
}

.acciones-lista button:active {
  transform: translateY(0px);
  box-shadow: 0 3px 8px rgba(0,0,0,0.15);
}

/* ========================================================= */
/* ==================    RESPONSIVE    ===================== */
/* ========================================================= */

/* ---------- 1280px (optimización pantallas grandes) ---------- */
@media (max-width: 1280px) {
  .lista-blanca {
    max-width: 800px;
  }

  .item-lista {
    grid-template-columns: 1fr 250px 120px 100px;
    gap: 15px;
  }

  .nombre-prod {
    font-size: 16px;
  }
}


/* ---------- 900px (tablets medianas) ---------- */
@media (max-width: 900px) {
  .item-lista {
    grid-template-columns: 1fr 180px 100px 90px;
    gap: 12px;
  }

  .codigo-prod {
    margin-right: 20px;
    font-size: 13px;
    padding: 5px 8px;
  }

  .nombre-prod {
    font-size: 15px;
    max-width: 250px;
  }

  .cantidad-box input {
    width: 55px;
    padding: 5px;
  }

  .btn-eliminar {
    padding: 6px 10px !important;
    font-size: 13px;
  }
}


/* ---------- 600px (celulares grandes) ---------- */
@media (max-width: 600px) {
  .item-lista {
    grid-template-columns: 1fr 1fr;
    grid-template-areas:
        "nombre nombre"
        "codigo cantidad"
        "eliminar eliminar";
    text-align: center;
    padding: 18px 0;
  }

  .nombre-prod {
    grid-area: nombre;
    max-width: 100%;
    font-size: 16px;
  }

  .codigo-prod {
    grid-area: codigo;
    margin: 0 auto;
    font-size: 13px;
  }

  .cantidad-box {
    grid-area: cantidad;
    margin: 0 auto;
  }

  .btn-eliminar {
    grid-area: eliminar;
    margin: 10px auto 0;
    width: 80%;
  }
}


/* ---------- 480px (celulares pequeños) ---------- */
@media (max-width: 480px) {
  .lista-blanca {
    padding: 20px;
  }

  .item-lista {
    gap: 10px;
  }

  .nombre-prod {
    font-size: 15px;
  }

  .codigo-prod {
    font-size: 12px;
    padding: 4px 6px;
  }

  .cantidad-box input {
    width: 50px;
  }

  .btn-eliminar {
    width: 100%;
    font-size: 13px;
    padding: 8px;
  }

  .acciones-lista {
    flex-direction: column;
  }

  .acciones-lista button {
    width: 100%;
  }
}
