/* =============================================================
   Cart Page (theme override) — Minimal Shopify-like style
   ============================================================= */

.hb-cart {
	max-width: 1200px;
	margin: 0 auto;
	padding: 48px 24px 80px;
	color: #1d1d1f;
	box-sizing: border-box;
	font-family: inherit;
}

/* ── Header ───────────────────────────────────────── */
.hb-cart-header {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	gap: 16px;
	padding-bottom: 18px;
	margin-bottom: 0;
	border-bottom: 1px solid #e5e5e5;
}

.hb-cart-title {
	margin: 0;
	font-size: 30px;
	font-weight: 500;
	line-height: 1.2;
	letter-spacing: 0.2px;
	color: #1d1d1f;
}

.hb-cart-continue-link {
	font-size: 14px;
	color: #1d1d1f;
	text-decoration: underline;
	text-underline-offset: 4px;
	transition: opacity 0.15s ease;
}

.hb-cart-continue-link:hover {
	opacity: 0.7;
	color: #1d1d1f;
}

/* ── Table ────────────────────────────────────────── */
.hb-cart-table-head {
	display: grid;
	grid-template-columns: minmax(0, 2.2fr) minmax(220px, 1fr) minmax(120px, 0.6fr);
	gap: 24px;
	padding: 18px 0 14px;
	border-bottom: 1px solid #f0f0f0;
}

.hb-cart-th {
	font-size: 12px;
	font-weight: 400;
	color: #6b6b6b;
	text-transform: uppercase;
	letter-spacing: 0.8px;
}

.hb-cart-th-qty { text-align: center; }
.hb-cart-th-total { text-align: right; }

/* ── Row ──────────────────────────────────────────── */
.hb-cart-row {
	display: grid;
	grid-template-columns: minmax(0, 2.2fr) minmax(220px, 1fr) minmax(120px, 0.6fr);
	gap: 24px;
	padding: 26px 0;
	border-bottom: 1px solid #f0f0f0;
	align-items: start;
}

.hb-cart-cell {
	min-width: 0;
}

/* Product cell */
.hb-cart-cell-product {
	display: flex;
	gap: 18px;
	align-items: flex-start;
}

.hb-cart-thumb {
	display: block;
	flex-shrink: 0;
	width: 84px;
	height: 104px;
	overflow: hidden;
	background: #f5f5f5;
}

.hb-cart-thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.hb-cart-info {
	flex: 1;
	min-width: 0;
	padding-top: 4px;
}

.hb-cart-name,
.hb-cart-info > a {
	display: inline-block;
	margin: 0 0 4px;
	font-size: 14px;
	font-weight: 400;
	line-height: 1.4;
	color: #1d1d1f;
	text-decoration: none !important;
	word-break: break-word;
}

.hb-cart-name:hover {
	color: #1d1d1f;
	text-decoration: underline !important;
	text-underline-offset: 3px;
}

.hb-cart-price {
	display: block;
	margin-bottom: 6px;
	font-size: 13px;
	color: #1d1d1f;
}

.hb-cart-price .woocommerce-Price-amount,
.hb-cart-subtotal .woocommerce-Price-amount {
	color: inherit;
}

/* Variation / custom data list */
.hb-cart-info dl.variation,
.hb-cart-info .variation {
	margin: 4px 0 0;
	padding: 0;
	font-size: 13px;
	color: #6b6b6b;
	line-height: 1.6;
}

.hb-cart-info dl.variation dt,
.hb-cart-info dl.variation dd {
	display: inline;
	margin: 0;
	font-weight: normal;
	color: #6b6b6b;
}

.hb-cart-info dl.variation dt {
	margin-right: 4px;
}

.hb-cart-info dl.variation dt::after {
	content: ":";
}

.hb-cart-info dl.variation dd p {
	display: inline;
	margin: 0;
}

.hb-cart-info dl.variation dt + dd::before { content: " "; }

.hb-cart-info dl.variation > dd + dt::before {
	content: "";
	display: block;
}

.backorder_notification {
	margin: 6px 0 0;
	font-size: 12px;
	color: #c0794b;
}

/* ── Quantity & Remove ────────────────────────────── */
.hb-cart-cell-qty {
	display: flex;
	align-items: center;
	justify-content: center;
}

.hb-cart-qty-wrap {
	display: inline-flex;
	align-items: center;
	gap: 12px;
}

.hb-cart-qty {
	display: inline-flex;
	align-items: stretch;
	border: 1px solid #d4d4d4;
	border-radius: 4px;
	overflow: hidden;
	height: 38px;
	background: #ffffff;
}

.hb-qty-btn {
	background: transparent;
	border: 0;
	padding: 0 12px;
	font-size: 16px;
	color: #1d1d1f;
	cursor: pointer;
	line-height: 1;
	box-shadow: none !important;
}

.hb-qty-btn:hover,
.hb-qty-btn:focus {
	background: #f5f5f5;
	outline: none;
}

.hb-qty-input {
	width: 44px;
	height: 100%;
	border: 0;
	border-left: 1px solid #d4d4d4;
	border-right: 1px solid #d4d4d4;
	padding: 0;
	border-radius: 0;
	text-align: center;
	font-size: 14px;
	color: #1d1d1f;
	background: transparent;
	-moz-appearance: textfield;
	appearance: textfield;
	box-shadow: none !important;
}

.hb-qty-input:focus {
	outline: none;
}

.hb-qty-input::-webkit-outer-spin-button,
.hb-qty-input::-webkit-inner-spin-button {
	-webkit-appearance: none;
	margin: 0;
}

.hb-cart-sold-single {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 38px;
	height: 38px;
	border: 1px solid #d4d4d4;
	border-radius: 4px;
	font-size: 14px;
	color: #1d1d1f;
}

.hb-cart-remove {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 38px;
	height: 38px;
	color: #6b6b6b;
	text-decoration: none !important;
	border-radius: 3px;
	transition: color 0.15s ease, background-color 0.15s ease;
}

.hb-cart-remove:hover,
.hb-cart-remove:focus {
	color: #1d1d1f;
	background: #f5f5f5;
}

/* ── Total cell ───────────────────────────────────── */
.hb-cart-cell-total {
	text-align: right;
	font-size: 14px;
	color: #1d1d1f;
	padding-top: 10px;
}

.hb-cart-subtotal {
	font-weight: 400;
}

/* ── Bottom (instructions + summary) ──────────────── */
.hb-cart-bottom {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 60px;
	margin-top: 36px;
	padding-top: 36px;
	border-top: 1px solid #e5e5e5;
	align-items: start;
}

.hb-cart-instructions-label {
	display: block;
	font-size: 13px;
	color: #6b6b6b;
	margin-bottom: 8px;
	letter-spacing: 0.2px;
}

.hb-cart-instructions-input {
	width: 100%;
	border: 1px solid #d4d4d4;
	border-radius: 0;
	padding: 12px 14px;
	font-size: 14px;
	color: #1d1d1f;
	background: #ffffff;
	font-family: inherit;
	resize: vertical;
	box-shadow: none !important;
	box-sizing: border-box;
}

.hb-cart-instructions-input:focus {
	outline: none;
	border-color: #1d1d1f;
}

/* Summary */
.hb-cart-summary {
	text-align: right;
}

.hb-cart-total-row {
	display: flex;
	justify-content: flex-end;
	align-items: baseline;
	gap: 22px;
	margin-bottom: 6px;
}

.hb-cart-total-label {
	font-size: 14px;
	color: #1d1d1f;
}

.hb-cart-total-value {
	font-size: 18px;
	font-weight: 500;
	color: #1d1d1f;
}

.hb-cart-total-value .woocommerce-Price-amount {
	color: inherit;
}

.hb-cart-tax-note {
	font-size: 12px;
	color: #6b6b6b;
	margin: 0 0 18px;
	letter-spacing: 0.2px;
}

/* Check out — span button */
.hb-cart-checkout {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 52px;
	background-color: #1d1d1f;
	color: #ffffff;
	font-size: 14px;
	font-weight: 500;
	letter-spacing: 0.4px;
	cursor: pointer;
	user-select: none;
	border: 1px solid #1d1d1f;
	border-radius: 2px;
	transition: opacity 0.15s ease;
	box-sizing: border-box;
}

.hb-cart-checkout:hover {
	opacity: 0.85;
}

.hb-cart-checkout:focus-visible {
	outline: 2px solid #1d1d1f;
	outline-offset: 3px;
}

/* ── Loading state on update ──────────────────────── */
.hb-cart.hb-cart-loading {
	opacity: 0.55;
	pointer-events: none;
	transition: opacity 0.15s ease;
}

/* ── Empty cart ───────────────────────────────────── */
.hb-cart-empty .hb-cart-empty-body {
	text-align: center;
	padding: 80px 24px;
}

.hb-cart-empty-icon {
	display: block;
	margin: 0 auto 18px;
	color: #b0b0b0;
}

.hb-cart-empty-msg {
	font-size: 16px;
	color: #6b6b6b;
	margin: 0 0 24px;
}

.hb-cart-empty-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 200px;
	height: 50px;
	padding: 0 24px;
	background-color: #1d1d1f;
	color: #ffffff !important;
	font-size: 14px;
	letter-spacing: 0.3px;
	text-decoration: none !important;
	border-radius: 2px;
	transition: opacity 0.15s ease;
}

.hb-cart-empty-btn:hover {
	opacity: 0.85;
}

/* 隐藏默认的购物车折扣表单等冗余区块（如不需要） */
.hb-cart .cart-collaterals .cross-sells {
	display: none;
}

/* ── Responsive ───────────────────────────────────── */
@media (max-width: 768px) {
	.hb-cart {
		padding: 28px 16px 60px;
	}

	.hb-cart-header {
		flex-direction: column;
		align-items: flex-start;
		gap: 8px;
	}

	.hb-cart-title {
		font-size: 22px;
	}

	.hb-cart-table-head {
		display: none;
	}

	.hb-cart-row {
		grid-template-columns: 1fr;
		gap: 14px;
		padding: 20px 0;
	}

	.hb-cart-cell-qty {
		justify-content: flex-start;
	}

	.hb-cart-cell-total {
		text-align: left;
		padding-top: 0;
	}

	.hb-cart-cell-total::before {
		content: attr(data-label);
	}

	.hb-cart-thumb {
		width: 72px;
		height: 90px;
	}

	.hb-cart-bottom {
		grid-template-columns: 1fr;
		gap: 28px;
	}

	.hb-cart-summary {
		text-align: left;
	}

	.hb-cart-total-row {
		justify-content: space-between;
	}
}

@media (max-width: 480px) {
	.hb-cart-thumb {
		width: 64px;
		height: 80px;
	}

	.hb-cart-cell-product {
		gap: 12px;
	}

	.hb-cart-checkout {
		height: 48px;
	}
}
