
/* ----------- iPhone 6, 6S, 7 and 8 ----------- */

/* Portrait */
@media only screen 
  and (min-device-width: 375px) 
  and (max-device-width: 667px) 
  and (-webkit-min-device-pixel-ratio: 2)
  and (orientation: portrait) { 
    .grid-sizer, .grid-item { width: 50%; }
}

/* Landscape */
@media only screen 
  and (min-device-width: 375px) 
  and (max-device-width: 667px) 
  and (-webkit-min-device-pixel-ratio: 2)
  and (orientation: landscape) { 
    .grid-sizer, .grid-item { width: 25%; }
}

/* ----------- iPhone 6+, 7+ and 8+ ----------- */

/* Portrait */
@media only screen 
  and (min-device-width: 414px) 
  and (max-device-width: 736px) 
  and (-webkit-min-device-pixel-ratio: 3)
  and (orientation: portrait) { 
    .grid-sizer, .grid-item { width: 50%; }
}

/* Landscape */
@media only screen 
  and (min-device-width: 414px) 
  and (max-device-width: 736px) 
  and (-webkit-min-device-pixel-ratio: 3)
  and (orientation: landscape) { 
    .grid-sizer, .grid-item { width: 25%; }
}

/* ----------- iPhone X ----------- */

/* Portrait */
@media only screen 
  and (min-device-width: 375px) 
  and (max-device-width: 812px) 
  and (-webkit-min-device-pixel-ratio: 3)
  and (orientation: portrait) { 
    .grid-sizer, .grid-item { width: 50%; }
}

/* Landscape */
@media only screen 
  and (min-device-width: 375px) 
  and (max-device-width: 812px) 
  and (-webkit-min-device-pixel-ratio: 3)
  and (orientation: landscape) { 
    .grid-sizer, .grid-item { width: 25%; }
}

/* ----------- Galaxy S6 / Pixel XL ----------- */

/* Portrait */
@media screen 
  and (device-width: 360px) 
  and (device-height: 640px) 
  and (-webkit-device-pixel-ratio: 4) 
  and (orientation: portrait) {
    .grid-sizer, .grid-item { width: 50%; }
}

/* Landscape */
@media screen 
  and (device-width: 360px) 
  and (device-height: 640px) 
  and (-webkit-device-pixel-ratio: 4) 
  and (orientation: landscape) {
    .grid-sizer, .grid-item { width: 25%; }
}

/* ----------- Google pixel / HTC One ----------- */

/* Portrait */
@media screen 
  and (device-width: 360px) 
  and (device-height: 640px) 
  and (-webkit-device-pixel-ratio: 3) 
  and (orientation: portrait) {
    .grid-sizer, .grid-item { width: 50%; }
}

/* Landscape */
@media screen 
  and (device-width: 360px) 
  and (device-height: 640px) 
  and (-webkit-device-pixel-ratio: 3) 
  and (orientation: landscape) {
    .grid-sizer, .grid-item { width: 25%; }
}

/* ----------- Galaxy S9 and over ----------- */

/* Portrait */
@media screen 
  and (device-width: 360px) 
  and (device-height: 740px) 
  and (-webkit-device-pixel-ratio: 4) 
  and (orientation: portrait) {
    .grid-sizer, .grid-item { width: 50%; }
}

/* Landscape */
@media screen 
  and (device-width: 360px) 
  and (device-height: 740px) 
  and (-webkit-device-pixel-ratio: 4) 
  and (orientation: landscape) {
    .grid-sizer, .grid-item { width: 25%; }
}


/* ----------- iPad 3, 4 and Pro 9.7" ----------- */

/* Portrait */
@media only screen 
  and (min-device-width: 768px) 
  and (max-device-width: 1024px) 
  and (orientation: portrait) 
  and (-webkit-min-device-pixel-ratio: 2) {
    .grid-sizer, .grid-item { width: 25%; }
}

/* Landscape */
@media only screen 
  and (min-device-width: 768px) 
  and (max-device-width: 1024px) 
  and (orientation: landscape) 
  and (-webkit-min-device-pixel-ratio: 2) {
    .grid-sizer, .grid-item { width: 20%; }
}

/* ----------- iPad Pro 10.5" ----------- */


/* Portrait */
/* Declare the same value for min- and max-width to avoid colliding with desktops */
/* Source: https://medium.com/connect-the-dots/css-media-queries-for-ipad-pro-8cad10e17106*/
@media only screen 
  and (min-device-width: 834px) 
  and (max-device-width: 834px) 
  and (orientation: portrait) 
  and (-webkit-min-device-pixel-ratio: 2) {
    .grid-sizer, .grid-item { width: 25%; }

}

/* Landscape */
/* Declare the same value for min- and max-width to avoid colliding with desktops */
/* Source: https://medium.com/connect-the-dots/css-media-queries-for-ipad-pro-8cad10e17106*/
@media only screen 
  and (min-device-width: 1112px) 
  and (max-device-width: 1112px) 
  and (orientation: landscape) 
  and (-webkit-min-device-pixel-ratio: 2) {
    .grid-sizer, .grid-item { width: 20%; }
}

/* ----------- iPad Pro 12.9" ----------- */

/* Portrait */
/* Declare the same value for min- and max-width to avoid colliding with desktops */
/* Source: https://medium.com/connect-the-dots/css-media-queries-for-ipad-pro-8cad10e17106*/
@media only screen 
  and (min-device-width: 1024px) 
  and (max-device-width: 1024px) 
  and (orientation: portrait) 
  and (-webkit-min-device-pixel-ratio: 2) {
    .grid-sizer, .grid-item { width: 25%; }
}

/* Landscape */
/* Declare the same value for min- and max-width to avoid colliding with desktops */
/* Source: https://medium.com/connect-the-dots/css-media-queries-for-ipad-pro-8cad10e17106*/
@media only screen 
  and (min-device-width: 1366px) 
  and (max-device-width: 1366px) 
  and (orientation: landscape) 
  and (-webkit-min-device-pixel-ratio: 2) {
    .grid-sizer, .grid-item { width: 20%; }
}

/*Global size definitions*/

@media only screen 
  and (min-device-width: 961px) {
    .grid-sizer, .grid-item { width: 20%; }
}

@media only screen 
  and (min-device-width: 481px) 
  and (max-device-width: 960px) {
    .grid-sizer, .grid-item { width: 25%; }
}

@media only screen 
  and (min-device-width: 241px) 
  and (max-device-width: 480px) {
    .grid-sizer, .grid-item { width: 50%; }
}

@media only screen 
  and (max-device-width: 240px) {
    .grid-sizer, .grid-item { width: 100%; }
}