/**
 * Structure
 */


/**
 * WooCommerce Wrapper Width
 */

body[class*="woocommerce"] #page .woocommerce:not(.widget),
body[class*="woocommerce"] #page #woocommerce-wrapper,
body[class*="woocommerce"] #page .woocommerce-Tabs-panel.entry-content > *:not(.alignwide):not(.alignfull):not(.alignleft):not(.alignright):not(.wp-block-separator):not(.entry-attachment) {

	// Get wrapper width setting
	$wc-wrapper-width: map-deep-get($config-woocommerce, "wrapper-width");

	@if $wc-wrapper-width == wide {
		@extend %responsive-alignwide-nested;
	} @else if $wc-wrapper-width == full {
		@extend %responsive-alignfull-nested;
	} @else {
		// Default width
	}
}


/**
 * Vertical Space - 32px
 */
body[class*="woocommerce"] #page div.summary,
body[class*="woocommerce"] #page div.product .woocommerce-tabs .panel,
body[class*="woocommerce"] #page .products.related,
body[class*="woocommerce"] #page .up-sells,
body[class*="woocommerce"] #page .woocommerce-order,
.woocommerce-account #page .entry-content .woocommerce {

	& > *:not(:first-child) {
		margin-top: map-deep-get($config-global, "spacing", "vertical");
	}

	& > *:not(:last-child) {
		margin-bottom: map-deep-get($config-global, "spacing", "vertical");
	}

	& > *:empty + *,
	& > .form-row-last {
		margin-top: 0;
	}

	& > *:not(img):empty {
		margin: 0;
	}
}

/**
 * Vertical Space - 16px
 */
#woocommerce-wrapper ul.products li.product a,
#woocommerce-wrapper ul.products li.product-category a,
body[class*="woocommerce"] #page ul.products li.product a,
body[class*="woocommerce"] #page ul.products li.product-category a,
body[class*="woocommerce"] #page .cart-collaterals .cross-sells,
body[class*="woocommerce"] #page .cart-collaterals .cart_totals,
body[class*="woocommerce"] #page .widget_shopping_cart,
body[class*="woocommerce"] #page .widget_shopping_cart_content,
body[class*="woocommerce"] #page div.product form.variations_form,
body[class*="woocommerce"] #page div.product form.variations_form .variations,
body[class*="woocommerce"] #page div.product form.variations_form .single_variation_wrap,
body[class*="woocommerce"] #page .woocommerce-Reviews #comments,
body[class*="woocommerce"] #page .woocommerce-EditAccountForm,
body[class*="woocommerce"] #page .woocommerce-MyAccount-content,
body[class*="woocommerce"] #page .woocommerce-MyAccount-content form,
body[class*="woocommerce"] #page .woocommerce-Address,
body[class*="woocommerce"] #page .woocommerce-address-fields,
body[class*="woocommerce"] #page .woocommerce-address-fields__field-wrapper,
body[class*="woocommerce"] #page .woocommerce-billing-fields,
body[class*="woocommerce"] #page .woocommerce-column--billing-address,
body[class*="woocommerce"] #page .woocommerce-shipping-fields,
body[class*="woocommerce"] #page .woocommerce-column--shipping-address,
body[class*="woocommerce"] #page .woocommerce-products-header,
body[class*="woocommerce"] #page .woocommerce-checkout,
body[class*="woocommerce"] #page .woocommerce-order-downloads,
body[class*="woocommerce"] #page .woocommerce-order-details,
body[class*="woocommerce"] #page .woocommerce-customer-details {

	& > *:not(:first-child) {
		margin-top: map-deep-get($config-global, "spacing", "unit");
	}

	& > *:not(:last-child),
	& > .price {
		margin-bottom: map-deep-get($config-global, "spacing", "unit");
	}

	& > *:not(img):empty + *,
	& > .form-row-last {
		margin-top: 0;
	}

	& > *:empty {
		margin: 0;
	}
}
