/* Style for the cart slide panel */
.cart-slide {
  height: 100%;
  width: 0;
  position: fixed;
  top: 0;
  right: 0;
  background-color: #e4e4e4;
  overflow-x: hidden;
  transition: 0.5s;
  z-index: 1000;
}

/* Cart Header (Title and Close Button) */
.cart-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 20px;
  background-color: #ffa726;
  color: white;
  font-size: 18px;
  font-weight: bold;
}

.cart-title {
  margin: 0;
  color: #2f3241;
}

.close-butn {
  background-color: transparent;
  color: white;
  border: none;
  font-size: 30px;
  cursor: pointer;
  padding: 0;
}

.close-btn:hover {
  color: #f1f1f1;
}

/* Cart Content */
.cart-content {
  padding: 10px;
  overflow-y: auto;
  max-height: 100%;
  background-color: #e4e4e4;
  border-radius: 10px;
}

/* Cart Total Section */
.cart-total {
  margin-top: 20px;
  padding: 15px;
  background-color: #313443;
  border-radius: 8px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.cart-total-amount {
  font-size: 18px;
  font-weight: bold;
  color: #fff;
}

.checkout-btn {
  width: 100%;
  padding: 12px;
  color: #313342;
  border: none;
  border-radius: 5px;
  font-size: 16px;
  margin-top: 15px;
  cursor: pointer;
  transition: background-color 0.3s;
  background: #ffa117;
  font-weight: bold;
}

.checkout-btn:hover {
  background-color: #ff9b07;
}
.delete-btn {
  padding: 4px 10px;
  border: none;
  background: #d20000;
  border-radius: 6px;
  color: white;
  cursor: pointer;
  font-weight: bold;
  font-size: 11px;
}
.delete-btn:hover {
  background-color: #b20000; /* Slightly darker red on hover */
}

.cart-item-name {
  font-size: 13px;
  color: #323544;
  font-weight: bold;
  padding-bottom: 0;
}

.cart-item-category {
  font-size: 13px;
  margin-bottom: 5px;
  color: #333;
  margin-left: 10px;
}

.custom-alert {
  position: fixed;
  top: 20px;
  right: 20px;
  padding: 15px;
  background-color: #4caf50;
  color: white;
  border-radius: 5px;
  z-index: 9999;
  animation: slideIn 0.5s, fadeOut 0.5s 2.5s;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

@keyframes slideIn {
  from {
    transform: translateX(100%);
  }

  to {
    transform: translateX(0);
  }
}

@keyframes fadeOut {
  from {
    opacity: 1;
  }

  to {
    opacity: 0;
  }
}

.cart-badge {
  position: absolute;
  top: -8px;
  right: 50%;
  transform: translateX(30px);
  background-color: #e20000;
  color: white;
  border-radius: 50%;
  padding: 2px 7px;
  font-size: 16px;
  min-width: 15px;
  text-align: center;
  z-index: 1;
}

/* Responsive adjustments */
@media screen and (max-width: 768px) {
  .cart-badge {
    top: -6px;
    right: 40%;
    transform: translateX(14px);
    font-size: 16px;
    min-width: 12px;
    padding: 1px 6px;
  }
  /* Define the open state */
  #cartSlide.open {
    width: 100dvw;
  }
}

@media screen and (max-width: 480px) {
  .cart-badge {
    top: -7px;
    right: 35%;
    transform: translateX(7px);
    font-size: 14px;
    min-width: 10px;
    padding: 1px 6px;
  }
  /* Define the open state */
  #cartSlide.open {
    width: 100dvw;
  }
}

/* For very small screens */
@media screen and (max-width: 320px) {
  .cart-badge {
    top: -2px;
    right: 30%;
    transform: translateX(2px);
    font-size: 14px;
    min-width: 8px;
    padding: 1px 2px;
  }
  /* Define the open state */
  #cartSlide.open {
    width: 100dvw;
  }
}

@media screen and (min-width: 480px) {
  /* Define the open state */
  #cartSlide.open {
    width: 420px;
  }
}

/* Define the default closed state */
#cartSlide {
  width: 0;
  transition: width 0.3s ease-in-out;
}


