body { font-family: Arial, sans-serif; background-color: #fff7f0; margin: 0; padding: 0; }
header { background-color: #ff6b6b; color: white; padding: 20px; text-align: center; position: sticky; top: 0; z-index: 100; }
header input {
  margin-top: 10px;
  padding: 8px;
  width: 80%;
  max-width: 500px; /* optional limit on large screens */
  border-radius: 5px;
  border: none;
}

@media(max-width: 600px) {
  header input { width: 100%; }
}

#category-display { padding: 15px; background-color: #fff3f0; text-align: center; }
#category-display h2 { margin-bottom: 10px; }
.category-buttons { display: flex; justify-content: center; flex-wrap: wrap; gap: 15px; }
.cat-btn {
  background-color: #ff6b6b;
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 20px;
  cursor: pointer;
  font-weight: bold;
  transition: background 0.3s;
}
.cat-btn:hover { background-color: #ff4b4b; }


#categories { display: flex; justify-content: center; gap: 10px; margin: 15px 0; flex-wrap: wrap; }
.category-buttons {
  display: flex;
  flex-wrap: wrap; /* allows buttons to go to next line */
  justify-content: center;
  gap: 10px;
}
.category-btn.active { background-color: #ff6b6b; color: white; }

.menu-grid { display: flex; flex-wrap: wrap; gap: 20px; justify-content: center; padding: 0 10px 120px 10px; }
.food-card { background-color: #ffe3e3; border-radius: 10px; overflow: hidden; width: 220px; text-align: center; box-shadow: 0 2px 5px rgba(0,0,0,0.2); transition: transform 0.2s; }
.food-card:hover { transform: scale(1.05); }
.food-card img { width: 100%; height: 120px; object-fit: cover; }
.food-card h3 { margin: 10px 0 5px; }
.food-card p { margin: 5px 0; }
.qty-control { display: flex; justify-content: center; align-items: center; margin: 5px 0; gap: 10px; }
.qty-control button { padding: 5px 10px; background-color: #ff6b6b; color: white; border: none; border-radius: 5px; font-weight: bold; cursor: pointer; }
.qty-control span { font-size: 16px; width: 25px; display: inline-block; text-align: center; }
.price { font-weight: bold; }

/* Cart Button */
#cart-btn {
  position: fixed;
  right: 20px;
  bottom: 20px;
  background-color: #ff6b6b;
  color: white;
  border: none;
  padding: 12px 20px;
  border-radius: 50px;
  cursor: pointer;
  font-size: 16px;
  z-index: 101;
  box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

/* Slide-In Cart Sidebar */
#cart {
  position: fixed;
  top: 0;
  right: 0;
  width: 320px;
  height: 100%;
  background-color: white;
  box-shadow: -4px 0 10px rgba(0,0,0,0.2);
  border-left: 1px solid #ccc;
  z-index: 100;
  transform: translateX(100%);
  transition: transform 0.3s ease-in-out;
  display: flex;
  flex-direction: column;
  padding: 15px;
}

#cart.open { transform: translateX(0); }

#cart-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
#cart-header h3 { margin: 0; }
#cart-close { background: none; border: none; font-size: 20px; cursor: pointer; }

#cartItems { flex: 1; overflow-y: auto; list-style: none; padding: 0; margin: 0 0 10px 0; }
#checkoutBtn { background-color: #25d366; border: none; color: white; padding: 12px; border-radius: 5px; cursor: pointer; font-weight: bold; }
#checkoutBtn:hover { background-color: #128c7e; }


@media(max-width: 600px){ .menu-grid { flex-direction: column; align-items: center; } .header input { width: 100%; } }

/* Carousel styling */
.carousel { position: relative; height: 120px; overflow: hidden; }
.carousel img { position: absolute; top: 0; left: 0; width: 100%; height: 120px; object-fit: cover; transition: opacity 0.5s; }
.category-section { margin: 20px 0; padding: 0 10px; }
.category-section h2 { margin-left: 10px; }
.carousel-container {
  display: flex;
  gap: 15px;
  overflow-x: auto;
  padding-bottom: 10px;
  scroll-behavior: smooth;
  flex-wrap: wrap; /* allow wrapping on small screens */
}
.carousel-container::-webkit-scrollbar { display: none; }

.food-card {
  flex: 1 1 200px; /* grow, shrink, base width 200px */
  max-width: 220px;
  min-width: 160px; /* ensures very small screens don't break */
  background-color: #ffe3e3;
  border-radius: 10px;
  padding: 10px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}
.food-card img { width: 100%; height: 120px; object-fit: cover; border-radius: 10px; }


