.toast {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background-color: #e8be69;
  color: white;
  padding: 12px 25px;
  border-radius: 6px;
  font-size: 17px;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.2);
  animation: fadeIn 0.3s ease;
  z-index: 9999;
}

@keyframes toastfadeIn {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

/* Nền mờ */
.cart-popup {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.5);
  display: none;
  z-index: 9999;
}

/* Hộp popup trượt từ phải */
.cart-popup-content {
  position: absolute;
  top: 0;
  right: -400px; /* ẩn bên ngoài màn hình */
  width: 350px;
  height: 100%;
  background: #fff;
  padding: 20px;
  transition: right 0.4s ease;
}

/* Khi mở */
.cart-popup.show .cart-popup-content {
  right: 0;
}

/* Nút đóng */
.close-btn {
  font-size: 24px;
  cursor: pointer;
  float: right;
}

.checkout-btn{
    background-color: #8e9396; /* Màu nền */
    color: white; /* Màu chữ */
    padding: 0px; /* Khoảng cách giữa chữ và biên của nút */
    text-align: center; /* Canh giữa chữ trong nút */
    text-decoration: none; /* Loại bỏ gạch chân */
    display: inline-block; /* Hiển thị nút như một phần tử inline */
    font-size: 16px; /* Kích thước chữ */
    border: none; /* Loại bỏ viền mặc định */
    border-radius: 5px; /* Bo góc cho nút */
    cursor: pointer; /* Hiển thị con trỏ chuột kiểu bàn tay */
    transition: background-color 0.3s; /* Hiệu ứng chuyển màu nền */
    width: 100%;
    margin-top: 12px;
    max-width: 150px;
    height: 30px;
    box-sizing: border-box;
 }

   
.checkout-btn:hover {
    background: linear-gradient(45deg, #db1c1c, #f1672c);
    box-shadow: 0 0 5px rgba(32, 31, 31, 0.8);
    transform: translateY(-3px);
        }

        .checkout-btn:active{
        transform: scale(0.95);
        }

        .cart-popup-content p{
            margin-top: 10px;
            
        }
        .cart-popup-content h3{
            margin-bottom:  10px;
            
        }
        /* thông báo */
        .cart-icon {
        position: relative;
        }

        .cart-count {
            position: absolute;
            top: -14px;
            left: 8px;
            background: red;
            color: white;
            font-size: 12px;
            width: 15px;
            height: 18px;
            border-radius: 50%;
            text-align: center;
            line-height: 18px;
            display: none;
        }



      .cart-img {
        width: 57px;
        height: 85px;
        object-fit: cover;
        border-radius: 8px;
        border: 1px solid #ddd;
      }

        
        .cart-item {
        
        display: grid;
        grid-template-columns: 
         54px /* img */ 61px /* tên */ 70px /* + /- */ 59px /* giá */ 32px;
        align-items: center;
        gap: 10px;
        margin-bottom: 12px;
        
        }

        .cart-qty {
        display: flex;
        align-items: center;
        gap: 6px;
        border-radius: 33px; 
        background: #f3f3f3;
        }

  .cart-qty button {
    width: 35px;
    height: 35px;
    border: none;
    cursor: pointer;
    background: #999999;
    color: #211a1a;
    font-size: 16px; /* Điều chỉnh kích thước chữ nếu cần */
    font-weight: bold;
    border-radius: 25%; /* Tạo hình tròn */
    transition: background-color 0.3s ease, transform 0.3s ease; /* Hiệu ứng chuyển đổi mượt mà */
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Hiệu ứng khi di chuột vào */
.cart-qty button:hover {
    background-color: #e0e0e0;
    transform: scale(1.1); /* Phóng to nút khi hover */
}

/* Hiệu ứng khi nút được chọn */
.cart-qty button:focus {
    outline: none;
    box-shadow: 0 0 5px rgba(101, 44, 44, 0.2);
}

/* Hiệu ứng khi nhấn nút */
.cart-qty button:active {
    transform: scale(0.98); /* Thu nhỏ nút khi click */
    background-color: #d4d4d4;
}

/* Thêm animation khi tải nút */
.cart-qty button {
    animation: fadeIn 0.8s ease-in-out;
}

/* Hiệu ứng fade-in khi tải */
@keyframes trashfadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.cart-qty .trash {
    color: #e53935;
    font-size: 16px;
    transition: all 0.25s ease;
}

.cart-qty .trash:hover {
    background: rgba(205, 11, 11, 0.15);
    transform: scale(1.15) rotate(-10deg);
}

        .cart-price {
        min-width: 80px;
        font-weight: bold;
        }
      .remove-item{
        background-color: #8e9396;
        text-decoration: none;
        border: none;
        border-radius: 2px;
        cursor: pointer;
        transition: transform 0.2s ease, opacity 0.2s ease;

      }

      .remove-item:hover {
  transform: scale(1.2);
  opacity: 0.8;
}

/* animation khi xóa */
.cart-item.removing {
  animation: fadeOut 0.3s ease forwards;
}

@keyframes fadeOut {
  to {
    opacity: 0;
    transform: translateX(30px);
  }
}
