/* Basic reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Body styles */
body {
  font-family: Arial, sans-serif;
  background-color: #f0f0f0;
}

/* Cash register container */
.cash-register {
  max-width: 600px;
  margin: 50px auto;
  background-color: #fff;
  padding: 20px;
  border-radius: 10px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

/* Title styles */
h1 {
  text-align: center;
  margin-bottom: 20px;
  color: #333;
}

/* Products section */
.products {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

.product {
  padding: 10px 20px;
  border: none;
  background-color: #4CAF50;
  color: #fff;
  font-size: 16px;
  cursor: pointer;
  border-radius: 5px;
  transition: background-color 0.3s ease, transform 0.3s ease;
}

.product:hover {
  background-color: #45a049;
  transform: translateY(-3px); /* Move button slightly up on hover */
}

.product:focus,
button:focus {
  outline: none;
}

/* Custom product input */
.add-product {
  margin-top: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

input[type="text"],
input[type="number"] {
  margin-bottom: 10px;
  padding: 8px;
  border: 1px solid #ccc;
  border-radius: 5px;
  width: 200px;
}

input[type="text"]:focus,
input[type="number"]:focus {
  outline: none;
  border-color: #4CAF50;
  box-shadow: 0 0 5px rgba(76, 175, 80, 0.5);
}

button {
  padding: 10px 20px;
  border: none;
  background-color: #f44336;
  color: #fff;
  font-size: 16px;
  cursor: pointer;
  border-radius: 5px;
  transition: background-color 0.3s ease, transform 0.3s ease;
  margin-right: 10px;
}

button:hover,
.overlay-btn:hover {
  background-color: #d32f2f;
  transform: translateY(-3px); /* Move button slightly up on hover */
}

/* Cart section */
.cart {
  margin-top: 30px;
  border-top: 1px solid #ccc;
  padding-top: 20px;
}

.cart h2 {
  margin-bottom: 10px;
  color: #333;
}

#cart-items li {
  margin-bottom: 5px;
  font-size: 16px;
  /* Animation styles */
  animation: fadeIn 0.5s ease; /* Apply the fadeIn animation */
}

p {
  margin-top: 10px;
  font-size: 18px;
  color: #333;
}

/* Animation */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* General movement animation */
.move-up {
  animation: moveUp 0.5s ease; /* Apply the moveUp animation */
}

@keyframes moveUp {
  from {
    transform: translateY(0);
  }
  to {
    transform: translateY(-10px); /* Move elements 10px up */
  }
}

/* Add overlay styles */
.overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  display: none;
  justify-content: center;
  align-items: center;
}

.overlay-content {
  text-align: center;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.overlay-btn {
  padding: 10px 20px;
  border: none;
  background-color: #f44336;
  color: #fff;
  font-size: 16px;
  cursor: pointer;
  border-radius: 5px;
  transition: background-color 0.3s ease, transform 0.3s ease;
  margin: 5px;
  display: block;
}

/* Apply animation to the overlay menu buttons */
.overlay-btn {
  animation: moveUp 0.5s ease;
}

@keyframes moveUp {
  from {
    transform: translateY(20px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}
