/* Reset styles */
body,
html {
  margin: 0;
  padding: 0;
  font-family: Arial, sans-serif;
  background: #f8f9fa;
}

/* Topbar container */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: white;
  padding: 10px 20px;
  box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.1);
  position: fixed;
  /* width: 100%; */
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
}

/* Menu icon */
.menu {
  font-size: 24px;
  cursor: pointer;
  color: black;
  transition: color 0.3s ease;
}

.menu:hover {
  color: #007bff;
}

/* Centered logo */
.logo {
  /* flex-grow: 1; */
  text-align: center;
}

.logo img {
  max-height: 50px;
}

/* Cart icon */
.cart {
  position: relative;
  font-size: 24px;
  cursor: pointer;
  color: black;
  transition: color 0.3s ease;
}

.cart:hover {
  color: #007bff;
}

/* Cart count badge */
.cart-count {
  position: absolute;
  top: -5px;
  right: -10px;
  background: red;
  color: white;
  font-size: 14px;
  border-radius: 50%;
  padding: 3px 6px;
}

/* Overlay Style */
.overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 999; /* Must be below the sidebar */
}

.overlay.show {
  display: block;
}

/* Sidebar menu */
.sidebar1 {
  position: fixed;
  top: 0;
  left: -250px; /* Initially hidden */
  width: 250px;
  height: 100%;
  background-color: white;
  z-index: 1100;
  transition: left 0.3s ease-in-out;
}

.sidebar.open {
  left: 0;
  visibility: visible;
}

.sidebar ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.sidebar ul li {
  padding: 15px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.sidebar ul li a {
  text-decoration: none;
  color: black;
  display: flex;
  align-items: center;
}

.sidebar ul li a i {
  margin-right: 10px;
}

.sidebar ul li:hover {
  background: rgba(255, 255, 255, 0.1);
}

.category-item a {
  font-size: 15px;
  font-weight: normal;
  padding-top: 5px;
  color: #ccc;
  transition: color 0.3s ease;
}

/* Close Button */
.close-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  background: none;
  border: none;
  font-size: 24px;
  color: black;
  cursor: pointer;
}

/* Fixed Bottom Toolbar */
.bottom-toolbar {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background-color: white;
  display: flex;
  justify-content: space-around;
  padding: 10px 0;
  z-index: 1001; /* Make sure it's above everything */
  box-shadow: 0 -2px 5px rgba(0, 0, 0, 0.3);
}

.bottom-toolbar a {
  color: black;
  text-align: center;
  flex-grow: 1;
  text-decoration: none;
  font-size: 18px;
}

.bottom-toolbar a span {
  display: block;
  font-size: 12px;
}

/* Cart Sidebar Styles */
.cart-sidebar {
  position: fixed;
  top: 0;
  right: -100%;
  width: 300px;
  height: 100%;
  background: #fff;
  box-shadow: -2px 0 5px rgba(0, 0, 0, 0.2);
  transition: right 0.3s ease-in-out;
  padding: 20px;
  overflow-y: auto;
  z-index: 1100;
}

.cart-sidebar.open {
  right: 0;
}

.cart-sidebar h2 {
  margin-top: 0;
  font-size: 20px;
  text-align: center;
}

.cart-items {
  max-height: 300px;
  overflow-y: auto;
}

.cart-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #ddd;
  padding: 10px 0;
}

.cart-item img {
  width: 50px;
  height: 50px;
  object-fit: cover;
  border-radius: 5px;
}

.cart-item-details {
  flex-grow: 1;
  margin-left: 10px;
}

.cart-item h4 {
  margin: 0;
  font-size: 14px;
}

.cart-item p {
  margin: 5px 0;
  font-size: 12px;
  color: #666;
}

.remove-item {
  background: none;
  border: none;
  font-size: 18px;
  cursor: pointer;
  color: red;
}

.cart-total {
  font-size: 16px;
  font-weight: bold;
  text-align: right;
  margin-top: 15px;
}

.checkout-btn {
  display: block;
  width: 100%;
  padding: 10px;
  background: #28a745;
  color: white;
  font-size: 16px;
  text-align: center;
  border: none;
  cursor: pointer;
  margin-top: 10px;
  border-radius: 5px;
}

.qty-controls {
  display: flex;
  align-items: center;
  margin-top: 5px;
}

.qty-btn {
  width: 25px;
  height: 25px;
  border: none;
  background: #007bff;
  color: white;
  font-size: 16px;
  cursor: pointer;
  border-radius: 3px;
  margin: 0 5px;
}

.qty-btn:hover {
  background: #0056b3;
}

.item-qty {
  min-width: 20px;
  text-align: center;
  font-size: 14px;
}

.checkout-btn:hover {
  background: #218838;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
  .topbar {
    padding: 13px;
  }

  .logo img {
    max-height: 40px;
  }
}

/* Desktop View (larger than 768px) */
@media only screen and (min-width: 769px) {
  /* Hide the sidebar, topbar, and bottom toolbar on desktop */

  .topbar {
    display: none;
  }

  .sidebar {
    display: none; /* Hide sidebar on desktop */
  }

  .bottom-toolbar {
    display: none; /* Hide bottom toolbar on desktop */
  }

  /* Show desktop-specific layout */
  .desktop-only {
    display: block; /* Display desktop elements */
  }

  .main-content {
    transition: filter 300ms ease-in-out;
    margin-top: 0px;
  }
}
