Multiple Queries with differing CSS in Paginated output
Well after a brain melting, I have come up with an answer, im not sure how pretty it is, any comments on how to tidy it up are most welcome.
&lt;!-- get the premium entries and randomize --&gt;
{% set premEntries = craft.entries.section(&quot;test&quot;).relatedTo(category).Premium('yes').orderBy('RAND()').ids() %}

&lt;!-- get the standard entries and randomize --&gt;
{% set standEntries = craft.entries.section(&quot;test&quot;).relatedTo(category).Premium('no').orderBy('RAND()').ids() %}

&lt;!-- get the total number of premium entries --&gt;
{% set premCount = craft.entries.section(&quot;test&quot;).relatedTo(category).Premium('yes').orderBy('RAND()').count() %}

&lt;!-- Divide total premium entries by Pagination per page limit --&gt;
{% set limitTotal = premCount / 12 %}

&lt;!-- Round up the linitTotal, this gives me page the premium entries finish on --&gt;
{% set limitRoundUp = ceil(limitTotal) %}

&lt;1-- This gives me the number of premium entries on the last page they appear --&gt;
{% set limitRoundDown = floor(limitTotal) %}
{% set lim3 = limitRoundDown * 12 %}
{% set lim4 = premCount - lim3 %}


&lt;!-- This merges the 2 sets of entries together into the paginated results --&gt;
{% set allEntries = standEntries |merge(premEntries) %}
{% set posts = craft.entries.id( allEntries ) %}
{% paginate posts.limit(12).orderby('Premium desc') as pageInfo, pageEntries %}     
{% set pageCount = pageInfo.totalPages %}


&lt;!--  This turns the grey background white on page 2 and beyond if there are less that 12 premium entries --&gt;
    &lt;div class=&quot;container-fluid greyouter {% if premCount &lt;= 12 %}whiteouter{% endif %}&quot;&gt;       
        &lt;div class=&quot;container&quot;&gt;
                &lt;div class=&quot;row&quot;&gt;
            
                {% for entry in pageEntries %}
                
                
    &lt;!-- this is the styling for the above, must be inside the FOR statement to be able to register the current page --&gt;    

    
                    {% if pageInfo.currentPage != '1' %}
                        &lt;style&gt;
                            .whiteouter {
                                background-color: #fff;
                                        }
                        &lt;/style&gt;
                    {% endif %}
                    
                    
    &lt;!-- this is the styling for if page 1 has no premium entries, it changes the background to white, must be inside the FOR statement to be able to register the current page --&gt; 
    
    
        {% if pageInfo.currentPage == '1' and premCount == '0' %}
            &lt;style&gt;
                .greyouter              {
                background-color: #fff;
                        }
        &lt;/style&gt;
        {% endif %}
    &lt;div class=&quot;col-lg-4 pb-5&quot;&gt; 
                
        &lt;div class=&quot;vendorboximg&quot;&gt;
            
        &lt;/div&gt;
        
        
    &lt;/div&gt;  


&lt;!--  This checks to see if this page is where the premium entries stop, and if this loop is the last premium, if so it adds a new row, no CSS required as backgorund is white anyway --&gt;

    {% if pageInfo.currentPage == limitRoundUp and loop.index == lim4 %}
     &lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;container-fluid pt-5&quot;&gt;&lt;div class=&quot;container&quot;&gt;&lt;div class=&quot;row&quot;&gt;{% endif %}


{% endfor %}
&lt;!-- Pagination numbers --&gt;
&lt;div style=&quot;width:100%&quot;&gt;
    {% include 'includes/_sect-pagination' %}
  &lt;/div&gt;