/* ========================================
   購物車/詢價車 下拉選單樣式
======================================== */

/* PC 版本 */
.cart-dropdown-wrapper {
	position: relative;
}

/* 覆蓋 member-item 的 overflow:hidden */
.member-item {
	overflow: visible !important;
}

.cart-dropdown-toggle {
	position: relative;
	cursor: pointer;
	padding: 8px 12px;
	display: flex;
	align-items: center;
	gap: 5px;
	transition: all 0.3s;
}

.cart-dropdown-toggle:hover {
	background: rgba(0,0,0,0.05);
	border-radius: 8px;
}

.total-badge {
	background: transparent;
	color: inherit;
	border-radius: 0;
	min-width: auto;
	height: auto;
	font-size: 12px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0;
	font-weight: bold;
	line-height: 1;
}

.cart-dropdown-menu {
	display: none; /* 預設隱藏 */
	position: absolute;
	top: calc(100% + 10px);
	right: 0;
	background: white;
	border-radius: 8px;
	box-shadow: 0 4px 20px rgba(0,0,0,0.15);
	min-width: 200px;
	z-index: 1000;
	overflow: hidden;
}

.cart-dropdown-menu::before {
	content: '';
	position: absolute;
	top: -8px;
	right: 15px;
	width: 0;
	height: 0;
	border-left: 8px solid transparent;
	border-right: 8px solid transparent;
	border-bottom: 8px solid white;
}

.cart-dropdown-item {
	display: flex;
	align-items: center;
	padding: 15px 20px;
	color: #333;
	text-decoration: none;
	transition: all 0.3s;
	border-bottom: 1px solid #f0f0f0;
}

.cart-dropdown-item:last-child {
	border-bottom: none;
}

.cart-dropdown-item:hover {
	background: #f8f9fa;
}

.cart-dropdown-item i {
	font-size: 18px;
	margin-right: 12px;
	width: 20px;
}

.cart-dropdown-item .fa-shopping-cart {
	color: #e74c3c;
}

.cart-dropdown-item .fa-clipboard-list {
	color: #3498db;
}

.item-label {
	flex: 1;
	font-size: 14px;
}

.item-badge {
	min-width: auto;
	height: auto;
	border-radius: 0;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-size: 12px;
	font-weight: bold;
	color: inherit;
	line-height: 1;
	padding: 0;
}

/* Mobile 版本 */
.mobile-cart-dropdown {
	position: relative;
	display: inline-block;
}

.mobile-cart-toggle {
	position: relative;
	display: flex;
	align-items: center;
	gap: 5px;
}

.mobile-cart-menu {
	display: none; /* 預設隱藏 */
	position: absolute;
	top: calc(100% + 10px);
	right: 0;
	background: white;
	border-radius: 8px;
	box-shadow: 0 4px 20px rgba(0,0,0,0.15);
	min-width: 180px;
	z-index: 1000;
	overflow: hidden;
}

.mobile-cart-menu::before {
	content: '';
	position: absolute;
	top: -8px;
	right: 15px;
	width: 0;
	height: 0;
	border-left: 8px solid transparent;
	border-right: 8px solid transparent;
	border-bottom: 8px solid white;
}

.mobile-cart-item {
	display: flex;
	align-items: center;
	padding: 12px 15px;
	color: #333;
	text-decoration: none;
	transition: all 0.3s;
	border-bottom: 1px solid #f0f0f0;
}

.mobile-cart-item:last-child {
	border-bottom: none;
}

.mobile-cart-item:hover {
	background: #f8f9fa;
}

.mobile-cart-item i {
	font-size: 16px;
	margin-right: 10px;
	width: 18px;
}

.mobile-cart-item .fa-shopping-cart {
	color: #e74c3c;
}

.mobile-cart-item .fa-clipboard-list {
	color: #3498db;
}

.mobile-cart-item span:nth-child(2) {
	flex: 1;
	font-size: 14px;
}

.mobile-cart-item .badge {
	min-width: auto;
	height: auto;
	border-radius: 0;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-size: 12px;
	font-weight: bold;
	color: inherit;
	line-height: 1;
	padding: 0;
}
