/* Mobile-first styles */
body {
  font-family: Arial, sans-serif;
  margin: 0;
  padding: 0;
}

header {
  text-align: center;
  padding: 20px;
  background: #f5f5f5;
}

main {
  padding: 20px;
  /* Extra bottom padding to ensure the last product is visible above the sticky cart */
  padding-bottom: 180px;
}

h1, h2 {
  margin: 0;
  padding: 0.5em 0;
}

#products {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-around;
}

.product {
  border: 1px solid #ddd;
  border-radius: 8px;
  margin: 10px;
  padding: 10px;
  width: 100%;
  box-sizing: border-box;
}

button {
  background-color: #4CAF50;
  color: white;
  padding: 10px 15px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: transform 0.1s ease-out, box-shadow 0.1s ease-out;
}

button:active {
  transform: scale(0.95);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

/* Tablet & larger screens */
@media (min-width: 600px) {
  .product {
    width: calc(45% - 20px);
  }
}

/* Desktop */
@media (min-width: 900px) {
  .product {
    width: calc(30% - 20px);
  }
}

/* Sticky cart at the bottom */
#cart {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  margin: 0 auto;
  max-width: 800px;
  background: rgba(255, 255, 255, 0.95);
  padding: 15px 20px;
  box-shadow: 0 -2px 5px rgba(0, 0, 0, 0.2);
  z-index: 1000;
  text-align: center;
}

/* Remove bullet points from cart items */
#cart-items {
  list-style: none;
  padding-left: 0;
}

/* Style for each cart item */
#cart-items li {
  margin: 5px 0;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Style for the red remove icon */
.remove {
  color: red;
  cursor: pointer;
  font-weight: bold;
  margin-left: 10px;
  font-size: 1.2em;
}

/* Spacer to ensure main content doesn't go under the sticky cart */
.spacer {
  height: 140px;
}
