/* ===================== 購物車側邊欄 UI ===================== */

.cart_last .lastbadge {
	width:140px;
	height:140px;
  background: url(../images/true.png) center no-repeat;
  position:absolute;
	background-position: center center;
	background-size: contain ;
	cursor: pointer;
}
.cart_left .topbadge {
  position:absolute;
  background: #ddd;
  color: #fff;
  padding: 0px 16px;
  margin-left: 5px;
  font-size: 44px;
  font-weight:600
}
.top_icon .topbadge {
  background: red;
  color: #fff;
  border-radius: 14px;
  padding: 1px 6px;
  margin-left: 40px;
  font-weight:600
}
.footer .btmbadge {
  background: red;
  color: #fff;
  border-radius: 14px;
  padding: 1px 6px;
  margin-left: 66px;
  font-weight:600
}
.cart-sidebar {
  position: fixed;
  top: 0;
  right: -380px;
  width: 350px;
  height: 100%;
  background: #fff;
  box-shadow: -3px 0 20px rgba(0,0,0,0.25);
  z-index: 999;
  display: flex;
  flex-direction: column;
  transition: 0.35s;
}

.cart-sidebar.open {
  right: 0;
}

.cart-header {
  text-align: center;
  display: flex;
  justify-content: space-between;
  padding: 16px;
  font-size: 20px;
  border-bottom: 1px solid #ddd;
}

.cart-header a.close-cart {
	background: url(../images/icon5.png) center no-repeat;
	background-position: center center;
	background-size: contain ;
	cursor: pointer;
}

.cart-body {
  flex: 1;
  overflow-y: auto;
  padding: 10px 16px;
}

#cartItems {
  list-style: none;
  padding: 0;
  margin: 0;
}

.cart-item {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 14px;
  border-bottom: 1px solid #eee;
  padding-bottom: 12px;
}

.cart-item img {
  width: 70px;
  height: 70px;
  object-fit: cover;
  border-radius: 6px;
}

.cart-info {
  flex: 1;
}

.cart-title {
  font-size: 15px;
  font-weight: 600;
}

.cart-price {
  margin-top: 4px;
  color: #ff4d4d;
  font-size: 16px;
}

.qty-control {
  display: flex;
  align-items: center;
  margin-top: 6px;
}

.qty-btn {
  width: 26px;
  height: 26px;
  background: #ddd;
  border-radius: 4px;
  text-align: center;
  cursor: pointer;
}

.qty {
  margin: 0 8px;
  width: 26px;
  text-align: center;
}

.remove-item {
  cursor: pointer;
  color: #ff3333;
  font-size: 14px;
  margin-left: 6px;
}

.cart-footer {
  padding: 16px;
  border-top: 1px solid #ddd;
}

.total {
  font-size: 18px;
  margin-bottom: 12px;
}

.checkout-btn {
  width: 100%;
  background: #ff5050;
  color: #fff;
  padding: 12px 0;
  font-size: 18px;
  border-radius: 8px;
  cursor: pointer;
}

.checkout-btn:active {
  opacity: 0.8;
}

/* 遮罩 */
.cart-mask {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  display: none;
  z-index: 998;
}
.cart-mask.show {
  display: block;
}

@media only screen and (max-width: 768px) {
.cart_last .lastbadge {
	width:38px;
  background: url(../images/true.png) no-repeat;
  position:absolute;
	background-size: contain ;
	cursor: pointer;
}
.cart_left .topbadge {
  position:absolute;
  background: #ddd;
  color: #fff;
  padding: 1px 8px;
  margin-left: 5px;
  font-size: 22px;
  font-weight:600
}
	
}