/*
 * The cart page: the Cart block. Loaded only where is_cart() is true. The line items and totals it shares with the
 * mini cart drawer are in cart-common.css; the cross-sells and the empty cart's "Новинка в магазине" are product
 * cards (cards.css), the promo code field is in inline-forms.css.
 *
 * Moved here 2026-10-22 from Fluent Snippets 70 "Cart Page Styles" (loaded wherever the URL contained "cart")
 * and 102 "Cart page".
 */

.wp-block-woocommerce-cart a {
	text-decoration: none;
}

main[data-page="cart"] h1 {
	display: flex;
	justify-content: space-around;
}

.wp-block-woocommerce-cart .wc-block-cart__submit-container a {
	color: black;
}

.wp-block-woocommerce-cart .wc-block-cart-item__prices .price.wc-block-components-product-price {
	display: flex !important;
	justify-content: flex-start;
}

/* Narrow layouts, where the totals go under the items: the total and its button straight after the items, the
   cross-sells after them. WooCommerce puts the cross-sells in the items' column, between the two; snippet 60 moved
   them out of the flow, 400px down (position: absolute; bottom: -400px), which fit only a cart of one length. */
.wp-block-woocommerce-cart .wc-block-components-sidebar-layout:is(.is-mobile, .is-small, .is-medium) > .wc-block-cart__main {
	display: contents;
}

.wp-block-woocommerce-cart .wc-block-components-sidebar-layout:is(.is-mobile, .is-small, .is-medium) > .wc-block-cart__main > * {
	flex: 0 0 100%;
	min-width: 0;
}

/* Full width by the layout's class: WooCommerce widens it by the screen's (up to 919px), and with the page's 10px a side
   is-medium lasts to 940px, where the totals stood 360px wide under full-width lines */
.wp-block-woocommerce-cart .wc-block-components-sidebar-layout:is(.is-mobile, .is-small, .is-medium) > .wc-block-cart__sidebar {
	order: 1;
	flex: 0 0 100%;
	width: 100%;
}

.wp-block-woocommerce-cart .wc-block-components-sidebar-layout:is(.is-mobile, .is-small, .is-medium) .wp-block-woocommerce-cart-cross-sells-block {
	order: 2;
}

/* The "Перейти к оформлению заказа" bar WooCommerce pins to the bottom of a phone's screen: room on its right for the
   support chat's 50px button (12px from the edge), which covered the end of it */
.wp-block-woocommerce-cart .wc-block-cart__submit-container--sticky {
	padding-right: 78px;
}

/* The 400px spacer the cart page's template has under the cart (cart-interval) held the room snippet 60's
   cross-sells took, 400px down out of the flow. They are in the flow now, and it was a giant empty band under the cart
   (Kirill, 2026-10-22). Its old rule (wide screens only) looked for it inside the Cart block, where it is not. */
.wp-block-spacer.cart-interval {
	display: none;
}

/* ── Breakpoints ─────────────────────────────────────────────────────────────── */

@media (max-width: 480px) {
	/* No sides of its own: the page's 10px (layout.css) is the cart's, as the wishlist's (Kirill, 2026-10-22: the
	   lines stood 19px in, the wishlist's 10) */
	.wp-block-woocommerce-cart :is(.is-small, .is-mobile).wc-block-components-sidebar-layout {
		padding: 0 0 16px !important;
	}

	.wp-block-woocommerce-cart .wc-block-cart .wc-block-cart-item__total {
		padding-top: 48px !important;
	}
}

@media (min-width: 480px) {
	.wp-block-woocommerce-cart .wc-block-cart .wc-block-cart-item__total {
		padding-top: 50px !important;
	}
}


/* The wide table's picture cell. It was set by the screen's width (701px and up) and stood 140px wide in is-medium's
   80px picture column too, over the name and the price (782-940px screens, 2026-10-23). */
.wp-block-woocommerce-cart .is-large td.wc-block-cart-item__image {
	width: 140px;
}
