@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;600;700&display=swap');

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Poppins', sans-serif;
}

body {
  background: #f8f9fa;
}

.offer-banner {
  background: linear-gradient(90deg, #ff6b35, #ff8c42);
  color: white;
  padding: 8px;
  font-weight: 600;
  font-size: 14px;
}

.navbar {
  background: white;
  padding: 15px 5%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 20px rgba(0,0,0,0.1);
}

.logo {
  font-size: 24px;
  font-weight: 700;
  color: #ff6b35;
}

.nav-right {
  display: flex;
  gap: 15px;
  align-items: center;
}

.veg-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
}

.switch {
  position: relative;
  display: inline-block;
  width: 50px;
  height: 24px;
}

.switch input { display: none; }

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  transition: .4s;
  border-radius: 24px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .4s;
  border-radius: 50%;
}

input:checked + .slider {
  background-color: #4CAF50;
}

input:checked + .slider:before {
  transform: translateX(26px);
}

#searchBox {
  padding: 10px 15px;
  border: 2px solid #eee;
  border-radius: 25px;
  width: 200px;
  outline: none;
}

.cart-icon {
  position: relative;
  cursor: pointer;
  font-size: 24px;
  color: #333;
}

#cartCount {
  position: absolute;
  top: -8px;
  right: -8px;
  background: #ff6b35;
  color: white;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero {
  background: linear-gradient(rgba(0,0,0,0.5), rgba(0,0,0,0.5)), url('https://images.unsplash.com/photo-1517248135467-4c7edcad34c4?w=1200') center/cover;
  color: white;
  text-align: center;
  padding: 80px 20px;
}

.hero h1 { font-size: 48px; margin-bottom: 10px; }

.categories {
  display: flex;
  gap: 10px;
  padding: 20px 5%;
  overflow-x: auto;
}

.categories button {
  padding: 10px 25px;
  border: 2px solid #ff6b35;
  background: white;
  color: #ff6b35;
  border-radius: 25px;
  cursor: pointer;
  white-space: nowrap;
  transition: 0.3s;
  font-weight: 600;
}

.categories button.active, .categories button:hover {
  background: #ff6b35;
  color: white;
}

.menu-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 25px;
  padding: 20px 5%;
}

.food-card {
  background: white;
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 5px 20px rgba(0,0,0,0.08);
  transition: 0.3s;
  position: relative;
}

.food-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}

.food-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  cursor: pointer;
}

.wishlist-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  background: white;
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 18px;
  color: #ddd;
  box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.wishlist-btn.active {
  color: #ff4757;
}

.veg-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background: white;
  padding: 5px;
  border-radius: 5px;
}

.veg-badge .dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid #4CAF50;
  display: flex;
  align-items: center;
  justify-content: center;
}

.veg-badge .dot::after {
  content: '';
  width: 6px;
  height: 6px;
  background: #4CAF50;
  border-radius: 50%;
}

.veg-badge.non-veg .dot {
  border-color: #f44336;
}

.veg-badge.non-veg .dot::after {
  background: #f44336;
}

.food-info {
  padding: 15px;
}

.food-info h3 { margin-bottom: 5px; cursor: pointer; }
.food-info p { color: #666; font-size: 14px; margin-bottom: 8px; }

.rating {
  color: #ffc107;
  font-size: 14px;
  margin: 5px 0;
}

.food-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 10px;
}

.price { font-size: 20px; font-weight: 700; color: #ff6b35; }

.add-btn {
  background: #ff6b35;
  color: white;
  border: none;
  padding: 8px 20px;
  border-radius: 20px;
  cursor: pointer;
  font-weight: 600;
}

.quantity {
  display: flex;
  align-items: center;
  gap: 10px;
}

.quantity button {
  width: 30px;
  height: 30px;
  border: 1px solid #ddd;
  background: white;
  border-radius: 50%;
  cursor: pointer;
  font-weight: 700;
}

.cart-sidebar {
  position: fixed;
  right: -400px;
  top: 0;
  width: 400px;
  height: 100vh;
  background: white;
  box-shadow: -5px 0 20px rgba(0,0,0,0.1);
  transition: 0.3s;
  z-index: 200;
  display: flex;
  flex-direction: column;
}

.cart-sidebar.active { right: 0; }

.cart-header {
  padding: 20px;
  border-bottom: 1px solid #eee;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.cart-header i { cursor: pointer; font-size: 24px; }

#cartItems {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
}

.cart-item {
  display: flex;
  gap: 15px;
  margin-bottom: 15px;
  padding-bottom: 15px;
  border-bottom: 1px solid #f0f0f0;
}

.cart-item img {
  width: 60px;
  height: 60px;
  border-radius: 8px;
  object-fit: cover;
}

.empty-cart {
  text-align: center;
  padding: 40px 20px;
  color: #999;
}
.empty-cart i {
  font-size: 60px;
  margin-bottom: 15px;
}

.cart-footer {
  padding: 20px;
  border-top: 2px solid #eee;
}

.coupon-box {
  display: flex;
  gap: 10px;
  margin-bottom: 15px;
}
.coupon-box input {
  flex: 1;
  padding: 10px;
  border: 2px solid #eee;
  border-radius: 8px;
}
.coupon-box button {
  padding: 10px 20px;
  background: #4CAF50;
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
}

#discountMsg {
  font-size: 14px;
  margin-bottom: 10px;
  font-weight: 600;
}

.total {
  display: flex;
  justify-content: space-between;
  font-size: 16px;
  margin-bottom: 10px;
}

.total.final {
  font-size: 24px;
  color: #ff6b35;
  font-weight: 700;
  padding-top: 10px;
  border-top: 2px dashed #eee;
  margin-top: 10px;
}

.checkout-btn {
  width: 100%;
  padding: 15px;
  background: #ff6b35;
  color: white;
  border: none;
  border-radius: 10px;
  font-size: 18px;
  cursor: pointer;
  font-weight: 600;
  margin-top: 10px;
}

.history-btn {
  width: 100%;
  padding: 12px;
  background: white;
  color: #ff6b35;
  border: 2px solid #ff6b35;
  border-radius: 10px;
  margin-top: 10px;
  cursor: pointer;
  font-weight: 600;
}

.modal {
  display: none;
  position: fixed;
  z-index: 300;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.5);
}

.modal-content {
  background: white;
  margin: 5% auto;
  padding: 30px;
  width: 90%;
  max-width: 500px;
  border-radius: 15px;
  max-height: 80vh;
  overflow-y: auto;
}

.modal-content.item-detail img {
  width: 100%;
  height: 250px;
  object-fit: cover;
  border-radius: 10px;
  margin-bottom: 15px;
}

.modal-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 20px;
}

.modal-footer button {
  padding: 12px 30px;
  background: #ff6b35;
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
}

.modal-content input, .modal-content textarea, .modal-content select {
  width: 100%;
  padding: 12px;
  margin: 10px 0;
  border: 2px solid #eee;
  border-radius: 8px;
  font-size: 16px;
}

.modal-content button {
  width: 100%;
  padding: 15px;
  background: #4CAF50;
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 18px;
  cursor: pointer;
  margin-top: 10px;
  font-weight: 600;
}

.close {
  float: right;
  font-size: 28px;
  cursor: pointer;
  color: #999;
}

.toast {
  position: fixed;
  bottom: 30px;
  right: 30px;
  background: #333;
  color: white;
  padding: 15px 25px;
  border-radius: 10px;
  box-shadow: 0 5px 20px rgba(0,0,0,0.3);
  transform: translateY(200px);
  transition: 0.3s;
  z-index: 400;
}

.toast.show {
  transform: translateY(0);
}

@media (max-width: 768px) {
  .cart-sidebar { width: 100%; right: -100%; }
  #searchBox { width: 120px; }
  .hero h1 { font-size: 32px; }
  .nav-right { gap: 8px; }
  .veg-toggle span { display: none; }
}