/* ✅ Basic body setup */
body {
  font-family: Arial, sans-serif;
  background: #f4f4f4;
  margin: 0;
  padding: 0;
}

/* ✅ Header styling */
header {
  background: #007bff;
  color: white;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 30px;
  flex-wrap: wrap; /* Responsive layout for small screens */
  box-shadow: 1px 0px 10px 0px rgb(41, 40, 40);
}

/* ✅ Right-side section (Cart + Buttons) */
.header-buttons {
  display: flex;
  align-items: center;
  gap: 15px;
  
}

/* ✅ Cart icon */
#cart-icon {
  cursor: pointer;
  font-size: 16px;
  background: white;
  color: #007bff;
  padding: 6px 10px;
  border-radius: 6px;
  font-weight: bold;
  transition: 0.3s;
  margin-top: 8px;
}

#cart-icon:hover {
  background: #0056b3;
  color: white;
}

/* ✅ Cart item count (red bubble) */
#cart-count {
  background: red;
  color: white;
  border-radius: 50%;
  padding: 2px 6px;
  margin-left: 4px;
  font-size: 13px;
}

.card:hover {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  transform: translateY(-5px);   /* Lift the card slightly upward */
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);   /* Add a soft shadow for 3D effect */
}

/* ✅ Buttons (Login + Register) */
.btn {
  border: none;
  border-radius: 6px;
  padding: 7px 14px;
  font-size: 17px;
  cursor: pointer;
  transition: 0.3s;
}

/* 🔵 Login button */
.login-btn {
  background: white;
  color: #007bff;
}


.login-btn:hover {
  background: #0056b3;
  color: white;
}

/* 🟢 Register button */
.register-btn {
  background: #28a745;
  color: white;
}

.register-btn:hover {
  background: #1e7e34;
}

/* ✅ Product container layout */
.container {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: center;
  padding: 20px;
}

/* ✅ Product Card design */
.card {
  width: 250px;
  border: 1px solid #ddd;
  border-radius: 10px;
  background: white;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  text-align: center;
  padding: 15px;
}

.card img {
  width: 100%;
  height: 200px;
  object-fit: contain;
}

/* ✅ Default button (for products, etc.) */
button {
  background: #007bff;
  color: white;
  border: none;
  padding: 8px 12px;
  border-radius: 5px;
  margin-top: 10px;
  cursor: pointer;
}

button:hover {
  background: #0056b3;
}

/* ✅ Cart Panel style */
.cart-panel {
  position: fixed;
  top: 0;
  right: -400px; /* Hidden by default */
  width: 350px;
  height: 100vh;
  background: white;
  box-shadow: -3px 0 10px rgba(0, 0, 0, 0.2);
  transition: right 0.3s ease;
  padding: 20px;
  overflow-y: auto;
  z-index: 1000;
}

/* ✅ When cart panel is visible */
.cart-panel.show {
  right: 0;
}

/* ✅ Cart items */
.cart-panel h3 {
  text-align: center;
  margin-bottom: 15px;
}

.cart-panel #cartItems div {
  border-bottom: 1px solid #ccc;
  margin-bottom: 10px;
  padding-bottom: 10px;
}

.cart-panel img {
  width: 60px;
  height: 60px;
  object-fit: contain;
  margin-right: 10px;
}

/* ✅ Total price */
#totalPrice {
  text-align: right;
  font-size: 18px;
  margin-top: 10px;
  font-weight: bold;
}

/* ✅ Checkout button */
#checkoutBtn {
  background: green;
  color: white;
  border: none;
  padding: 10px 12px;
  border-radius: 6px;
  width: 100%;
  margin-top: 10px;
  cursor: pointer;
  font-size: 16px;
}

#checkoutBtn:hover {
  background: darkgreen;
}

/* ✅ Checkout Modal */
.modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  justify-content: center;
  align-items: center;
}

.modal-content {
  background: white;
  padding: 20px;
  border-radius: 10px;
  text-align: center;
}

#closeModal {
  background: #007bff;
  color: white;
  border: none;
  padding: 8px 12px;
  border-radius: 5px;
  margin-top: 10px;
  cursor: pointer;
}


/* ✅ Footer Design */
footer {
  background: #007bff;
  color: white;
  text-align: center;
  padding: 15px 0;
  margin-top: 30px;
  font-size: 14px;
  box-shadow:-1px 0px 8px 0px rgb(65, 64, 64);
}

/* ✅ Footer Links */
.footer-links {
  margin-top: 8px;
}

.footer-links a {
  color: white;
  margin: 0 8px;
  text-decoration: none;
  transition: 0.3s;
}

.footer-links a:hover {
  text-decoration: underline;
  color: #d1e0ff;
}


/* 📱 Responsive header for small screens */
@media (max-width: 600px) {
  header {
    flex-direction: column;
    gap: 10px;
  }

  .header-buttons {
    flex-wrap: wrap;
    justify-content: center;
  }
}
