/**
 * Legend Eagle — Cart page styling.
 * Target: /gio-hang/ (cart page)
 */

.le-cart {
	padding: 30px 0 60px;
}

.le-cart-title {
	font-size: 36px;
	font-weight: 700;
	margin: 0 0 24px;
	letter-spacing: -0.5px;
}

/* ---------- Cart items ---------- */
.le-cart-items {
	display: flex;
	flex-direction: column;
	gap: 14px;
}

.le-cart-item {
	display: flex;
	gap: 18px;
	padding: 18px;
	background: #fff;
	border: 1px solid #e5e7eb;
	border-radius: 12px;
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
	transition: box-shadow 0.2s;
}

.le-cart-item:hover {
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.le-cart-item-thumb {
	flex: 0 0 110px;
	width: 110px;
	height: 110px;
	border-radius: 10px;
	overflow: hidden;
	background: #f9fafb;
}

.le-cart-item-thumb a,
.le-cart-item-thumb img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	margin: 0;
}

.le-cart-item-body {
	flex: 1;
	display: flex;
	flex-direction: column;
	min-width: 0;
	position: relative;
}

.le-cart-item-row {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 16px;
}

.le-cart-item-name {
	font-size: 16px;
	font-weight: 600;
	margin: 0;
	line-height: 1.4;
	color: #111827;
	flex: 1;
}

.le-cart-item-name a {
	color: inherit;
	text-decoration: none;
}

.le-cart-item-name a:hover {
	color: #1a1a2e;
}

.le-cart-item-price {
	font-size: 16px;
	font-weight: 700;
	color: #111827;
	white-space: nowrap;
	text-align: right;
}

.le-cart-item-price del {
	font-size: 13px;
	font-weight: 400;
	color: #9ca3af;
	display: block;
}

.le-cart-item-price ins {
	background: transparent;
	text-decoration: none;
}

.le-cart-item-meta {
	font-size: 13px;
	color: #6b7280;
	margin-top: 4px;
}

.le-cart-item-meta dl {
	margin: 0;
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.le-cart-item-meta dt {
	font-weight: 500;
}

.le-cart-item-meta dd {
	margin: 0;
}

.le-cart-item-edit {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	color: #3b82f6;
	margin-top: 6px;
	font-size: 13px;
	width: fit-content;
}

.le-cart-item-edit:hover {
	color: #1d4ed8;
}

.le-cart-item-footer {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-top: auto;
	padding-top: 14px;
}

/* Quantity selector */
.le-cart-item-qty .quantity {
	display: inline-flex;
	align-items: center;
	border: 1px solid #e5e7eb;
	border-radius: 10px;
	background: #fff;
	overflow: hidden;
	width: max-content;
}

.le-cart-item-qty .quantity button,
.le-cart-item-qty .quantity .minus,
.le-cart-item-qty .quantity .plus {
	width: 34px;
	height: 34px;
	border: 0;
	background: transparent;
	cursor: pointer;
	font-size: 16px;
	line-height: 1;
	color: #374151;
	padding: 0;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	transition: background 0.15s;
}

.le-cart-item-qty .quantity button:hover,
.le-cart-item-qty .quantity .minus:hover,
.le-cart-item-qty .quantity .plus:hover {
	background: #f3f4f6;
}

.le-cart-item-qty .quantity input.qty,
.le-cart-item-qty .quantity input.le-qty-input {
	width: 46px;
	height: 34px;
	border: 0;
	border-left: 1px solid #e5e7eb;
	border-right: 1px solid #e5e7eb;
	text-align: center;
	font-size: 14px;
	font-weight: 600;
	background: transparent;
	padding: 0;
	box-shadow: none;
	-moz-appearance: textfield;
}

.le-cart-item-qty .quantity input.qty::-webkit-outer-spin-button,
.le-cart-item-qty .quantity input.qty::-webkit-inner-spin-button {
	-webkit-appearance: none;
	margin: 0;
}

/* ---------- Remove (trash) button — matches mockup:
 *   rest  = light-red (pink) rounded-square bg, red icon
 *   hover = slightly deeper red bg, icon stays red
 * --------------------------------------------------------------------- */
/* Specificity bumped via `a.` and `.remove` to beat Flatsome's `a.remove` rule. */
a.le-cart-item-remove,
.le-cart-item-remove.remove,
.le-cart-item-remove {
	display: inline-flex !important;
	align-items: center;
	justify-content: center;
	width: 40px !important;
	height: 40px !important;
	border-radius: 10px !important;
	color: #ef4444 !important;
	background: #fee2e2 !important;
	border: 0 !important;
	transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
	font-size: 0 !important;
	line-height: 1 !important;
	text-decoration: none !important;
	cursor: pointer;
	box-shadow: none;
	text-align: center;
}

.le-cart-item-remove svg {
	display: block;
	width: 18px;
	height: 18px;
	stroke: currentColor;
	pointer-events: none;
	transition: transform 0.2s ease;
}

.le-cart-item-remove:hover,
.le-cart-item-remove:focus-visible {
	background: #fecaca;       /* deeper pink on hover */
	color: #dc2626;
	transform: none;
	box-shadow: none;
	outline: none;
}

.le-cart-item-remove:hover svg,
.le-cart-item-remove:focus-visible svg {
	transform: scale(1.08);
}

.le-cart-item-remove:active {
	background: #fca5a5;
	transform: scale(0.96);
}

/* Loading state while AJAX removal is in flight. */
.le-cart-item-remove.is-loading {
	pointer-events: none;
	opacity: 0.6;
}
.le-cart-item-remove.is-loading svg {
	animation: le-cart-remove-spin 0.8s linear infinite;
	transform-origin: center;
}
@keyframes le-cart-remove-spin {
	to { transform: rotate(360deg); }
}

/* Hide WooCommerce's default strikethrough "×" pseudo-elements. */
.le-cart-item-remove::before,
.le-cart-item-remove::after {
	display: none !important;
	content: none !important;
}

/* ---------- Sidebar summary ---------- */
.le-cart-collaterals .col-inner {
	padding: 0;
}

.le-cart-summary {
	background: #f9fafb;
	border: 1px solid #e5e7eb;
	border-radius: 12px;
	padding: 24px;
}

.le-summary-title {
	font-size: 22px;
	font-weight: 700;
	margin: 0 0 20px;
	color: #111827;
}

.le-summary-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 12px;
	gap: 12px;
}

.le-summary-label {
	font-size: 15px;
	color: #6b7280;
}

.le-summary-value {
	font-size: 15px;
	color: #374151;
	font-weight: 500;
}

.le-summary-value bdi {
	font-weight: inherit;
}

.le-summary-divider {
	height: 1px;
	background: #e5e7eb;
	margin: 16px 0;
}

.le-summary-shipping-method {
	font-size: 12px;
	color: #9ca3af;
	font-weight: 400;
	margin-left: 4px;
}

.le-summary-total .le-summary-label {
	font-size: 17px;
	font-weight: 600;
	color: #111827;
}

.le-summary-total .le-summary-value {
	font-size: 22px;
	font-weight: 700;
	color: #111827;
}

.le-checkout-btn,
.le-checkout-btn:link,
.le-checkout-btn:visited,
.le-checkout-btn:hover,
.le-checkout-btn:focus,
.le-checkout-btn:active {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	width: 100%;
	margin-top: 18px;
	padding: 14px 20px;
	background: #111827 !important;
	color: #ffffff !important;
	border-radius: 10px;
	font-size: 16px;
	font-weight: 600;
	text-transform: none;
	text-decoration: none !important;
	transition: background 0.2s;
	border: 0;
	min-height: auto;
	line-height: 1;
	letter-spacing: normal;
	box-shadow: none;
}

.le-checkout-btn:hover {
	background: #1f2937 !important;
}

.le-checkout-btn span,
.le-checkout-btn svg {
	color: #ffffff !important;
	fill: currentColor;
	stroke: currentColor;
}

.le-checkout-btn svg {
	transition: transform 0.2s;
}

.le-checkout-btn:hover svg {
	transform: translateX(2px);
}

/* Coupon form inline */
.le-coupon-form {
	margin-top: 16px;
}

.le-coupon-row {
	display: flex;
	gap: 8px;
	align-items: stretch;
}

.le-coupon-input,
.le-coupon-apply {
	box-sizing: border-box !important;
	height: 42px !important;
	line-height: 1 !important;
	font-size: 14px !important;
	margin: 0 !important;
	border-radius: 10px !important;
	border: 1px solid #d1d5db !important;
	display: inline-flex;
	align-items: center;
	text-transform: none !important;
	letter-spacing: normal !important;
	min-height: 0 !important;
}

.le-coupon-input {
	flex: 1 1 auto;
	min-width: 0;
	padding: 0 14px !important;
	background: #fff;
	color: #111827;
	box-shadow: none;
	font-weight: 400;
}

.le-coupon-input:focus {
	outline: none;
	border-color: #111827 !important;
}

.le-coupon-apply {
	flex: 0 0 auto;
	padding: 0 18px !important;
	background: #fff !important;
	color: #111827 !important;
	font-weight: 600;
	cursor: pointer;
	white-space: nowrap;
	justify-content: center;
	transition: all 0.15s;
	box-shadow: none !important;
}

.le-coupon-apply:hover {
	background: #111827 !important;
	color: #fff !important;
	border-color: #111827 !important;
}

/* Hide Flatsome's legacy cart notices / cross-sell blocks */
.le-cart .cart_totals,
.le-cart .cross-sells,
.le-cart .shop_table.shop_table_responsive {
	display: none !important;
}

/* Notices above cart items */
.le-cart-main .woocommerce-message,
.le-cart-main .woocommerce-error,
.le-cart-main .woocommerce-info {
	border-radius: 10px;
	margin-bottom: 16px;
}

/* ---------- Responsive ---------- */
@media (max-width: 849px) {
	.le-cart-title {
		font-size: 28px;
		margin-bottom: 16px;
	}

	.le-cart-item {
		padding: 14px;
		gap: 12px;
	}

	.le-cart-item-thumb {
		flex: 0 0 84px;
		width: 84px;
		height: 84px;
	}

	.le-cart-item-name {
		font-size: 14px;
	}

	.le-cart-item-price {
		font-size: 14px;
	}

	.le-cart-summary {
		padding: 20px;
		margin-top: 20px;
	}

	.le-summary-total .le-summary-value {
		font-size: 20px;
	}
}

@media (max-width: 549px) {
	.le-cart-item {
		flex-direction: row;
	}

	.le-cart-item-footer {
		padding-top: 10px;
	}

	.le-cart-item-qty .quantity button,
	.le-cart-item-qty .quantity .minus,
	.le-cart-item-qty .quantity .plus {
		width: 30px;
		height: 30px;
	}

	.le-cart-item-qty .quantity input.qty {
		width: 40px;
		height: 30px;
	}
}
