/**
 * 购物车数量加减 - 样式
 * 仅作用于购物车页面（body.woocommerce-cart），不影响商品页等其他位置的数量框。
 */

/* 数量框容器：− 输入框 + 三合一 */
body.woocommerce-cart .quantity {
	display: inline-flex;
	align-items: stretch;
	border: 1px solid #d1d5db;
	border-radius: 4px;
	overflow: hidden;
	background: #ffffff;
}

/* 中间的输入框：去边框，仅保留左右分隔线 */
body.woocommerce-cart .quantity .qty {
	width: 56px !important;
	height: 40px;
	margin: 0 !important;
	padding: 0 4px !important;
	border: 0 !important;
	border-left: 1px solid #d1d5db !important;
	border-right: 1px solid #d1d5db !important;
	border-radius: 0 !important;
	background: #ffffff !important;
	box-shadow: none !important;
	text-align: center;
	font-size: 15px;
	line-height: 40px;
	-moz-appearance: textfield;
	appearance: textfield;
}

/* 隐藏数字输入框的上下箭头，避免与 −/+ 按钮重复 */
body.woocommerce-cart .quantity .qty::-webkit-outer-spin-button,
body.woocommerce-cart .quantity .qty::-webkit-inner-spin-button {
	-webkit-appearance: none;
	margin: 0;
}

/* 两侧按钮 */
body.woocommerce-cart .quantity .cqs-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	padding: 0;
	border: 0;
	background: #f7f8fa;
	color: #333333;
	font-size: 18px;
	font-weight: 600;
	line-height: 1;
	cursor: pointer;
	transition: background-color 0.15s ease, opacity 0.15s ease;
}

body.woocommerce-cart .quantity .cqs-btn:hover:not(:disabled) {
	background: #e8eaed;
	color: #111111;
}

body.woocommerce-cart .quantity .cqs-btn:active:not(:disabled) {
	background: #dcdedf;
}

/* 到达最小/最大数量时禁用对应按钮 */
body.woocommerce-cart .quantity .cqs-btn:disabled {
	opacity: 0.35;
	cursor: not-allowed;
}

/* 移动端适当缩小 */
@media (max-width: 767px) {
	body.woocommerce-cart .quantity .cqs-btn {
		width: 36px;
		height: 38px;
		font-size: 16px;
	}
	body.woocommerce-cart .quantity .qty {
		width: 48px !important;
		height: 38px;
		line-height: 38px;
	}
}
