/* ===========================================================
 * LK Cart Sort — toolbar links (cart page)
 * Rendered inside td.actions via woocommerce_cart_actions.
 * Floats bottom-left while the update/share/empty-cart buttons
 * stay on the right.
 * =========================================================== */

td.actions .lk-cart-sort-links {
	float: left;
	padding-top: 20px;
	display: inline-flex;
	gap: 14px;
	align-items: center;
	vertical-align: middle;
	white-space: nowrap;
	font-size: 12px;
	line-height: 1.4;
	margin-left: 14px;
}

@media (max-width: 768px) {
	td.actions .lk-cart-sort-links {
		display: none !important;
	}

	.lk-cart-section-header .product-remove {
		display: none !important;
	}

	.lk-cart-section-header .product-name {
		min-height: auto !important;
		background-color: #f6f6f6;
	}

	.lk-cart-section-header .ast-product-name {
		text-align: left;
	}
}

td.actions .lk-cart-sort-links a.lk-cart-sort-edit-toggle,
td.actions .lk-cart-sort-links a.lk-cart-sort-add-header {
	color: #666;
	text-decoration: underline;
	background: none;
	border: none;
	padding: 0;
	font-size: 12px;
	font-weight: normal;
	white-space: nowrap;
	cursor: pointer;
	box-shadow: none;
}

td.actions .lk-cart-sort-links a.lk-cart-sort-edit-toggle:hover,
td.actions .lk-cart-sort-links a.lk-cart-sort-add-header:hover {
	color: #000;
}

td.actions .lk-cart-sort-links a.lk-cart-sort-edit-toggle.is-active {
	color: #000;
	font-weight: 600;
}

td.actions .lk-cart-sort-links .lk-cart-sort-status {
	font-size: 11px;
	color: #666;
}

td.actions .lk-cart-sort-links .lk-cart-sort-status.is-error {
	color: #b00020;
}

/* ===========================================================
 * Edit mode — drag behaviour on cart page
 * =========================================================== */

body.lk-cart-sort-edit .woocommerce-cart-form tbody tr.cart_item {
	cursor: move;
	transition: background-color 0.1s ease;
}

body.lk-cart-sort-edit .woocommerce-cart-form tbody tr.cart_item:hover {
	background-color: #f6f6f6;
}

.lk-cart-sort-handle {
	display: none;
	cursor: grab;
	user-select: none;
	margin-right: 10px;
	padding: 2px 6px;
	color: #888;
	font-size: 18px;
	line-height: 1;
	letter-spacing: -3px;
	vertical-align: middle;
}

body.lk-cart-sort-edit .lk-cart-sort-handle {
	display: inline-block;
}

.lk-cart-sort-handle:active {
	cursor: grabbing;
	color: #333;
}

.lk-cart-sort-ghost {
	opacity: 0.35;
	background: #fffcdb !important;
}

.lk-cart-sort-chosen {
	background: #fff6a8 !important;
}

.lk-cart-sort-drag {
	background: #ffffff !important;
	box-shadow: 0 3px 10px rgba(0, 0, 0, 0.18);
}

/* ===========================================================
 * Section header rows — CART PAGE + CHECKOUT REVIEW TABLE
 * =========================================================== */

tr.cart_item.lk-cart-section-header {
	background: none;
}

tr.cart_item.lk-cart-section-header td {
	border-top: 1px solid #f5f5f5 !important;
	padding-top: 10px;
	padding-bottom: 10px;
}

tr.cart_item.lk-cart-section-header td.product-name {
	font-weight: bold;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	border-bottom: none !important;
}

tr.cart_item.lk-cart-section-header td.product-total {
	background: none;
	border-bottom: none !important;
}


/* Hide image + qty on header rows — broad selectors with !important
 * so they beat theme-injected inline <style> rules. */
tr.cart_item.lk-cart-section-header img,
tr.cart_item.lk-cart-section-header strong.product-quantity {
	display: none !important;
}

/* Neutralise Astra's inline flex on the product-name wrapper div
 * so the header text sits flush left. */
tr.cart_item.lk-cart-section-header td.product-name > div {
	display: block !important;
	gap: 0 !important;
}

tr.cart_item.lk-cart-section-header .ast-product-image.ast-disable-image {
	display: block;
}

tr.cart_item.lk-cart-section-header .lk-section-header-text {
	display: inline-block;
	font-size: 14px;
	font-weight: bold;
	text-transform: uppercase;
	letter-spacing: 0.5px;
}

/* Hide the leftover textarea from the old theme-based cart-order code. */
.cart-order textarea {
	display: none;
}

/* ===========================================================
 * Section header rows — SIDE CART (XootiX)
 * Class is applied by header-marker.js since XootiX doesn't
 * expose a row-class filter.
 * =========================================================== */

.xoo-wsc-product.lk-cart-section-header {
	background: #ececec;
	border: none;
	padding: 10px 12px !important;
	padding-top: 15px !important;
}

.xoo-wsc-product.lk-cart-section-header .xoo-wsc-img-col,
.xoo-wsc-product.lk-cart-section-header .xoo-wsc-qty-price,
.xoo-wsc-product.lk-cart-section-header .xoo-wsc-sm-right,
.xoo-wsc-product.lk-cart-section-header .xoo-wsc-qty-box,
.xoo-wsc-product.lk-cart-section-header .xoo-wsc-smr-del,
.xoo-wsc-product.lk-cart-section-header span.xoo-wsc-icon-trash {
	display: none !important;
}

.xoo-wsc-product.lk-cart-section-header .xoo-wsc-sum-col {
	width: 100% !important;
	padding-left: 0 !important;
}

.xoo-wsc-product.lk-cart-section-header .xoo-wsc-pname {
	font-size: 14px;
	font-weight: bold;
	text-transform: uppercase;
	letter-spacing: 0.5px;
}

.xoo-wsc-product.lk-cart-section-header .xoo-wsc-pname a {
	pointer-events: none;
	color: inherit;
	text-decoration: none;
}
