#cart {
  position: relative;
  margin-bottom: 20px;
}
#cart > .btn {
	font-size: 12px;
	line-height: 18px;
	color: #fff;
	background: var(--color-tertiary, #b9736e);
	border-color: var(--color-tertiary, #b9736e);
}
#cart > .btn:hover {
	filter: brightness(1.2);
}
#cart.open > .btn {
	background: var(--color-tertiary, #b9736e);
	border: 1px solid var(--color-tertiary, #b9736e);
	color: #fff;
	box-shadow: none;
}
#cart .dropdown-menu {
	background: var(--bg-card-default, #ffffff);
	border: 1px solid var(--color-border, #e6e6e6);
	z-index: 1001;
	min-width: 100%;
	overflow-y: auto;
	max-height: 800px;
	scrollbar-width: thin;
}
#cart .dropdown-menu li > div {
	min-width: 427px;
	padding: 0 10px;
}
#cart .dropdown-menu li p {
	margin: 20px 0;
	color: var(--text-default, #1a1a1a);
}
@media (max-width: 478px) {
	#cart .dropdown-menu {
		width: 100%;
	}
	#cart .dropdown-menu li > div {
		min-width: 100%;
	}
}

/* === 按鈕樣式 === */
.cart-toggle-btn {
  background: var(--color-tertiary, #b9736e);
  color: var(--btn-primary-text, #fff);
  border: none;
  border-radius: 5px;
  font-size: 14px;
  padding: 10px 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 300px;
  transition: all 0.25s ease;
}

.cart-toggle-btn:hover {
  background: var(--color-primary, #4E7A94);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* === 下拉主體（右對齊） === */
.cart-dropdown-menu {
  position: absolute;
  right: 0;
  left: auto;
  top: 100%;
  width: 400px;
  /*margin-top: 8px;*/
  border-radius: 5px;
  background: var(--bg-card-default, #fafafa);
  border: 1px solid var(--color-border, #e6e6e6);
  /*padding: 16px;*/
  box-shadow: 0 10px 25px rgba(0,0,0,0.12);
  animation: cartFade 0.25s ease;
  z-index: 1001;
}

@keyframes cartFade {
  from {opacity: 0; transform: translateY(-8px);}
  to {opacity: 1; transform: translateY(0);}
}

/* === 商品列 === */
.cart-items {
  display: flex;
  flex-direction: column;
  /* gap: 14px; */
  max-height: 500px;
  overflow-y: auto;
}

.cart-item {
  display: flex;
  align-items: center;
  padding: 16px;
  /*box-shadow: 0 2px 6px rgba(0,0,0,0.05);*/
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}


.cart-thumb img {
  width: 70px;
  height: 70px;
  border-radius: 3px;
  object-fit: cover;
  border: 1px solid var(--color-border, #e6e6e6);
}

.cart-detail {
  flex: 1;
  margin: 0 12px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.cart-name {
  font-weight: 600;
  font-size: 15px;
  color: var(--text-default, #1a1a1a);
  text-decoration: none;
}

.cart-name:hover {
  color: var(--color-primary, #28a745);
}

.cart-option {
  font-size: 13px;
  color: var(--text-muted, #6c757d);
}

.cart-meta {
  font-size: 14px;
  color: var(--text-default, #1a1a1a);
  display: flex;
  justify-content: space-between;
  margin-top: 3px;
}

.price {
  font-weight: 600;
  font-size: 16px;
  color: var(--color-primary, #4E7A94);
}

/* === 刪除按鈕 === */
.remove-btn {
  background: transparent;
  border: none;
  color: var(--text-muted, #6c757d);
  font-size: 16px;
  cursor: pointer;
  transition: color 0.25s ease;
}

.remove-btn:hover {
  color: var(--color-danger, #dc3545);
}

/* === 小計區 === */
.cart-summary {
  padding: 20px 20px 0 20px;
  border-top:  1px solid var(--color-border, #dce3ea);
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  color:var(--text-secondary, #5e5e5e);
}

/* === 按鈕群組 === */
.cart-actions {
  padding: 16px;
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

.cart-actions a {
  flex: 1;
  text-align: center;
  border-radius: 8px;
  padding: 9px 0;
  font-size: 15px;
  font-weight: 600;
  transition: all 0.25s ease;
}

.btn-outline {
  background: var(--bg-card-default, #fff);
  border: 1px solid var(--color-border, #e6e6e6);
  color: var(--text-default, #1a1a1a);
}

.btn-outline:hover {
  background: var(--color-border, #e6e6e6);
  color: var(--color-primary, #4E7A94);
}

.btn-primary {
  background: var(--btn-primary-bg, #4E7A94);
  color: var(--btn-primary-text, #ffffff);
  border: none;
}

.btn-primary:hover {
  background: var(--btn-primary-hover-bg, #4E7A94);
  color: var(--btn-primary-hover-text, #ffffff);
  box-shadow: 0 4px 12px rgba(95,168,211,0.3);
}

/* === 空購物車 === */
.cart-empty {
  text-align: center;
  color: var(--text-muted, #6c757d);
  font-size: 15px;
  padding: 40px 0;
}
