/* --------------------------------------------------------------------------
 * GRZ Gaming — narrow-screen order-summary alignment (v2.0.2)
 *
 * The legacy purchase layers center-constrained the action group on narrow
 * screens and let the summary list retain a full-width declaration alongside
 * horizontal margins. This final mobile-only layer restores a simple receipt
 * layout: label/value rows, aligned actions, and a full-width express button.
 * Desktop and the package/quantity cards are intentionally untouched.
 * ----------------------------------------------------------------------- */

@media (max-width: 620px) {
	body.single-product.grz-product-design .grz-tp-rail .grz-tp-card--summary .grz-tp-card__body {
		align-items: stretch !important;
	}

	body.single-product.grz-product-design .grz-tp-rail .grz-tp-card--summary .grz-tp-total {
		display: grid !important;
		grid-template-columns: minmax(0, 1fr) auto !important;
		align-items: start !important;
		gap: 16px;
		min-height: 0 !important;
		padding: 17px 16px 13px !important;
	}

	body.single-product.grz-product-design .grz-tp-rail .grz-tp-card--summary .grz-tp-total__label {
		align-self: start;
		justify-self: start !important;
		font-size: 16px;
		line-height: 1.2;
		text-align: left;
	}

	body.single-product.grz-product-design .grz-tp-rail .grz-tp-card--summary .grz-tp-total__prices {
		display: flex;
		min-width: 0;
		flex-direction: column;
		align-items: flex-end;
		justify-self: end !important;
		gap: 2px;
		text-align: right;
	}

	body.single-product.grz-product-design .grz-tp-rail .grz-tp-card--summary .grz-tp-total > * {
		grid-row: auto !important;
	}

	body.single-product.grz-product-design .grz-tp-rail .grz-tp-card--summary .grz-tp-total__now {
		font-size: clamp(24px, 8.8vw, 29px);
		line-height: 1;
	}

	body.single-product.grz-product-design .grz-tp-rail .grz-tp-card--summary .grz-tp-total__was {
		font-size: 10px;
		line-height: 1.2;
	}

	body.single-product.grz-product-design .grz-tp-rail .grz-tp-card--summary .grz-tp-summary-list {
		display: grid !important;
		width: auto !important;
		max-width: none !important;
		margin: 0 16px !important;
		padding: 5px 0 13px !important;
		box-sizing: border-box;
	}

	body.single-product.grz-product-design .grz-tp-rail .grz-tp-card--summary .grz-tp-summary-row {
		grid-template-columns: minmax(0, 1fr) auto !important;
		column-gap: 16px;
		width: 100%;
		min-height: 38px;
		padding: 6px 0;
	}

	body.single-product.grz-product-design .grz-tp-rail .grz-tp-card--summary .grz-tp-summary-row dt,
	body.single-product.grz-product-design .grz-tp-rail .grz-tp-card--summary .grz-tp-summary-row dd {
		min-width: 0;
		margin: 0;
	}

	body.single-product.grz-product-design .grz-tp-rail .grz-tp-card--summary .grz-tp-summary-row dd {
		justify-self: end;
		text-align: right;
	}

	body.single-product.grz-product-design .grz-tp-rail .grz-tp-card--summary .woocommerce-variation-add-to-cart,
	body.single-product.grz-product-design .grz-tp-rail .grz-tp-card--summary .grz-tp-cart-actions {
		display: block !important;
		align-self: stretch !important;
		width: 100% !important;
		max-width: none !important;
		margin: 0 !important;
		padding: 14px 16px 10px !important;
		box-sizing: border-box;
	}

	body.single-product.grz-product-design .grz-tp-rail .grz-tp-action-row,
	body.single-product.grz-product-design .grz-tp-rail .grz-tp-action-row.has-quantity,
	body.single-product.grz-product-design .grz-tp-rail .grz-tp-action-row:not(.has-quantity) {
		display: grid !important;
		grid-template-columns: 72px minmax(0, 1fr) !important;
		align-items: stretch !important;
		gap: 10px !important;
		width: 100% !important;
		height: auto !important;
		min-height: 50px;
		margin: 0 !important;
		padding: 0 !important;
	}

	body.single-product.grz-product-design .grz-tp-rail .grz-tp-action-row::before,
	body.single-product.grz-product-design .grz-tp-rail .grz-tp-action-row::after {
		display: none !important;
		content: none !important;
	}

	body.single-product.grz-product-design .grz-tp-rail .grz-tp-card--summary button.grz-tp-add-cart-secondary,
	body.single-product.grz-product-design .grz-tp-rail .grz-tp-card--summary .single_add_to_cart_button,
	body.single-product.grz-product-design .grz-tp-rail .grz-tp-card--summary button.single_add_to_cart_button.button.alt {
		align-self: stretch !important;
		height: 50px !important;
		min-height: 50px !important;
		margin: 0 !important;
		box-sizing: border-box;
	}

	body.single-product.grz-product-design .grz-tp-rail .grz-tp-action-row > * {
		grid-row: auto !important;
	}

	body.single-product.grz-product-design .grz-tp-rail .grz-tp-card--summary button.grz-tp-add-cart-secondary {
		width: 72px !important;
		min-width: 72px !important;
	}

	body.single-product.grz-product-design .grz-tp-rail .grz-tp-express-slot:not(:empty) {
		display: block !important;
		align-self: stretch !important;
		width: auto !important;
		max-width: none !important;
		margin: 0 16px 16px !important;
		padding: 0 !important;
		box-sizing: border-box;
	}

	body.single-product.grz-product-design .grz-tp-rail .grz-tp-express-slot:not(:empty) > * {
		display: flex;
		align-items: center;
		justify-content: center;
		width: 100% !important;
		max-width: none !important;
		min-height: 46px;
		margin: 0 !important;
		box-sizing: border-box;
	}
}

@media (max-width: 355px) {
	body.single-product.grz-product-design .grz-tp-rail .grz-tp-action-row,
	body.single-product.grz-product-design .grz-tp-rail .grz-tp-action-row.has-quantity,
	body.single-product.grz-product-design .grz-tp-rail .grz-tp-action-row:not(.has-quantity) {
		grid-template-columns: 66px minmax(0, 1fr) !important;
		gap: 8px !important;
	}

	body.single-product.grz-product-design .grz-tp-rail .grz-tp-card--summary button.grz-tp-add-cart-secondary {
		width: 66px !important;
		min-width: 66px !important;
	}
}
