/* Minimal interface adjustments layered on the stable security baseline. */

@media (min-width: 993px) {
	/* Freeze StoreX's desktop cart grid so long totals content cannot take space
	 * away from the product description. The visible columns total 100%:
	 * Remove 2 + Image 12 + Product 44 + Price 12 + Quantity 12 + Total 18.
	 */
	body.woocommerce-cart .shop_table.cart {
		table-layout: fixed;
		width: 100%;
	}

	body.woocommerce-cart .shop_table.cart th.product-remove,
	body.woocommerce-cart .shop_table.cart td.product-remove {
		width: 2% !important;
	}

	body.woocommerce-cart .shop_table.cart th.product-thumbnail,
	body.woocommerce-cart .shop_table.cart td.product-thumbnail {
		width: 12% !important;
	}

	body.woocommerce-cart .shop_table.cart th.product-name,
	body.woocommerce-cart .shop_table.cart td.product-name {
		width: 44% !important;
	}

	body.woocommerce-cart .shop_table.cart th.product-price,
	body.woocommerce-cart .shop_table.cart td.product-price {
		width: 12% !important;
	}

	body.woocommerce-cart .shop_table.cart th.product-quantity,
	body.woocommerce-cart .shop_table.cart td.product-quantity {
		width: 12% !important;
	}

	body.woocommerce-cart .shop_table.cart th.product-subtotal,
	body.woocommerce-cart .shop_table.cart td.product-subtotal {
		width: 18% !important;
	}

	/* StoreX reserves three desktop header columns on product pages although
	 * the middle title is hidden. Let the breadcrumb use the available row.
	 * Normal wrapping is retained if the complete trail genuinely cannot fit.
	 */
	body.single-product .header-stripe > .row,
	body.single-product .header-stripe > .container > .row {
		align-items: center;
		display: flex;
	}

	body.single-product .header-stripe > .row > div:first-child,
	body.single-product .header-stripe > .container > .row > div:first-child {
		flex: 1 1 auto;
		float: none !important;
		min-width: 0;
		width: auto !important;
	}

	body.single-product .header-stripe > .row > div:nth-child(2),
	body.single-product .header-stripe > .container > .row > div:nth-child(2) {
		display: none !important;
	}

	body.single-product .header-stripe > .row > div:nth-child(3),
	body.single-product .header-stripe > .container > .row > div:nth-child(3) {
		flex: 0 0 auto;
		float: none !important;
		margin-left: auto;
		width: auto !important;
	}

	body.single-product .header-stripe .woocommerce-breadcrumb {
		display: block !important;
		max-width: 100% !important;
		white-space: normal !important;
		width: 100% !important;
	}

	/* Preserve StoreX's seven-column table structure and colspans while making
	 * its unconditional Avail heading/checkmark consume no visible space.
	 */
	body.woocommerce-cart .shop_table.cart th.product-avail,
	body.woocommerce-cart .shop_table.cart td.avail {
		border-left: 0 !important;
		border-right: 0 !important;
		color: transparent !important;
		display: table-cell;
		font-size: 0 !important;
		line-height: 0 !important;
		max-width: 0 !important;
		overflow: hidden;
		padding: 0 !important;
		width: 0 !important;
	}

	body.woocommerce-cart .shop_table.cart td.avail > * {
		display: none !important;
	}

	/* Price is 12% of the complete table and the final three columns total 42%.
	 * Therefore 12 / 42 aligns the nested divider exactly with Price–Quantity;
	 * the remaining 30 / 42 matches the combined Quantity + Total width.
	 */
	body.woocommerce-cart .shop_table.cart td.cart-totals .cart_totals table {
		table-layout: fixed;
		width: 100%;
	}

	body.woocommerce-cart .shop_table.cart td.cart-totals .cart_totals table th {
		box-sizing: border-box;
		padding-left: 12px !important;
		padding-right: 12px !important;
		text-align: right;
		vertical-align: middle;
		white-space: nowrap;
		width: 28.5714% !important;
	}

	body.woocommerce-cart .shop_table.cart td.cart-totals .cart_totals table td {
		box-sizing: border-box;
		max-width: none !important;
		text-align: right;
		vertical-align: middle;
		width: 71.4286% !important;
	}

	body.woocommerce-cart .shop_table.cart td.cart-totals ul#shipping_method {
		box-sizing: border-box;
		margin: 0;
		max-width: none;
		text-align: left !important;
		width: 100%;
	}
}
