/* General Reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: Arial, sans-serif;
}

body {
  background: #f5f5f5;
  color: #333;
  transition: background 0.3s, color 0.3s;
}

header {
  background: #3e5166;
  color: #fff;
  padding: 15px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

header h1 {
  font-size: 22px;
}

/* Navbar */
.navbar {
  background: #67788a;
  color: white;
  padding: 15px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 100;
}

/* Categories Section */
.categories {
  text-align: center;
  margin-top: 20px;   /* 👈 Upar se gap */
  margin-bottom: 20px; /* Neeche bhi thoda gap */
}

.categories button {
  margin: 5px;
  padding: 10px 18px;
  border: none;
  background: #007bff;
  color: white;
  border-radius: 5px;
  cursor: pointer;
  transition: background 0.3s, transform 0.2s;
}

.categories button:hover {
  background: #0056b3;
  transform: scale(1.05);
}

header button {
  padding: 8px 12px;
  border: none;
  background: #fff;
  color: #007bff;
  cursor: pointer;
  border-radius: 5px;
  transition: transform 0.2s, background 0.3s;
}

header button:hover {
  background: #eaeaea;
  transform: scale(1.05);
}

/* Product Grid */
#product-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  padding: 20px;
}

.product {
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 15px;
  text-align: center;
  transition: transform 0.3s, box-shadow 0.3s;
  animation: fadeIn 0.6s ease-in;
}

.product img {
  width: 100%;
  height: 150px;
  object-fit: cover;
  border-radius: 5px;
  transition: transform 0.3s;
}

.product:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.2);
}

.product:hover img {
  transform: scale(1.05);
}

.product h3 {
  margin: 10px 0;
  font-size: 18px;
}

.product button {
  padding: 8px 15px;
  border: none;
  background: #007bff;
  color: #fff;
  border-radius: 5px;
  cursor: pointer;
  transition: transform 0.2s, background 0.3s;
}

.product button:hover {
  background: #0056b3;
  transform: scale(1.1);
}

/* Cart Sidebar */
#cart-sidebar {
  position: fixed;
  top: 0;
  right: -350px;
  width: 300px;
  height: 100%;
  background: #fff;
  box-shadow: -2px 0 6px rgba(0, 0, 0, 0.2);
  transition: right 0.4s ease;
  padding: 20px;
  overflow-y: auto;
  z-index: 1000;
  opacity: 0;
}

#cart-sidebar.active {
  right: 0;
  opacity: 1;
  animation: slideIn 0.4s ease-out;
}

#cart-sidebar h2 {
  margin-bottom: 15px;
  font-size: 20px;
  text-align: center;
}

#cart-items p {
  margin: 10px 0;
  font-size: 14px;
  animation: fadeIn 0.4s ease-in;
}

#cart-total {
  margin-top: 15px;
  font-weight: bold;
}

#checkoutBtn {
  margin-top: 15px;
  width: 100%;
  padding: 10px;
  border: none;
  background: #28a745;
  color: #fff;
  font-size: 16px;
  border-radius: 5px;
  cursor: pointer;
  transition: transform 0.2s, background 0.3s;
}

#checkoutBtn:hover {
  background: #218838;
  transform: scale(1.05);
}

/* Dark Mode */
.dark-mode {
  background: #121212;
  color: #f5f5f5;
}

.dark-mode header {
  background: #222;
}

.dark-mode .product {
  background: #1e1e1e;
  border-color: #444;
}

.dark-mode #cart-sidebar {
  background: #1e1e1e;
  color: #fff;
}

footer {
  background: #222;
  color: white;
  text-align: center;
  padding: 15px;
  margin-top: 30px;
  font-size: 14px;
  position: relative;
  bottom: 0;
  width: 100%;
}

footer p {
  margin: 0;
  letter-spacing: 1px;
}
