* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Inter', sans-serif;
  background: linear-gradient(to right, #f8fbff, #edf2f7);
  padding: 2rem;
  color: #2d2d2d;
}

h1 {
  text-align: center;
  margin-bottom: 2rem;
  color: #14213d;
  font-size: 2.5rem;
}

h2 {
  margin-bottom: 1rem;
  color: #14213d;
  font-size: 1.5rem;
}

.form {
  max-width: 500px;
  margin: 0 auto 3rem;
  background: white;
  padding: 2rem;
  border-radius: 20px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
  animation: fadeInUp 0.5s ease;
}

.form label {
  display: block;
  margin: 1rem 0 0.3rem;
  font-weight: 600;
  font-size: 0.95rem;
}

.form input {
  width: 100%;
  padding: 0.75rem;
  border-radius: 12px;
  border: 1px solid #ccc;
  font-size: 1rem;
  transition: border 0.3s;
}

.form input:focus {
  border-color: #2f8f46;
  outline: none;
}

.form button {
  width: 100%;
  margin-top: 1.5rem;
  padding: 0.9rem;
  background-color: #2f8f46;
  color: white;
  border: none;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.3s;
  touch-action: manipulation;
}

.prodotti {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 2rem;
}

.card {
  background: white;
  padding: 1rem;
  border-radius: 20px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  animation: fadeInUp 0.4s ease;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.1);
}

.card img {
  width: 100%;
  max-height: 180px;
  object-fit: cover;
  border-radius: 14px;
  margin-bottom: 1rem;
}

.card h3 {
  font-size: 1.2rem;
  margin: 0.5rem 0;
  color: #14213d;
}

.card p {
  font-size: 0.95rem;
  color: #4a4a4a;
  margin: 0.2rem 0;
  text-align: center;
}

.card button {
  margin-top: 1rem;
  padding: 0.6rem;
  width: 100%;
  border: none;
  border-radius: 10px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.3s;
  touch-action: manipulation;
}

.modifica {
  background-color: #0077b6;
  color: white;
}

.modifica:active {
  animation: pop-touch 0.2s ease-out forwards;
}

.modifica:hover {
  background-color: #023e8a;
}

.elimina {
  background-color: #ef233c;
  color: white;
}

.elimina:active {
  animation: pop-touch 0.2s ease-out forwards;
}

.elimina:hover {
  background-color: #d90429;
}

.acquista {
  background-color: #ffba08;
  color: #1a1a1a;
}

.acquista:active {
  animation: pop-touch 0.2s ease-out forwards;
}

.acquista:hover {
  background-color: #faa307;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pop-touch {
  0% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(0.9);
    opacity: 0.85;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}
