/* Landscape and big portrait devices - general styling */
@media only screen 
and (-webkit-min-device-pixel-ratio: 1)
and (min-width: 768px)
and (max-width: 1024px) 
and (orientation: landscape),
only screen 
and (-min-moz-device-pixel-ratio: 1)
and (min-width: 768px)
and (max-width: 1024px) 
and (orientation: landscape),
only screen 
and (-o-min-device-pixel-ratio: 1/1)
and (min-width: 768px)
and (max-width: 1024px) 
and (orientation: landscape),
only screen 
and (min-device-pixel-ratio: 1)
and (min-width: 768px)
and (max-width: 1024px) 
and (orientation: landscape),
only screen 
and (in-resolution: 72dpi)
and (min-width: 768px)
and (max-width: 1024px) 
and (orientation: landscape),
only screen 
and (min-resolution: 1dppx)
and (min-width: 768px)
and (max-width: 1024px) 
and (orientation: landscape),
only screen
and (min-width: 768px)
and (max-width: 1024px) 
and (orientation: landscape),
only screen 
and (-webkit-min-device-pixel-ratio: 1)
and (min-width: 800px)
and (max-width: 1024px)
and (orientation: portrait),
only screen 
and (-min-moz-device-pixel-ratio: 1)
and (min-width: 800px)
and (max-width: 1024px)
and (orientation: portrait),
only screen 
and (-o-min-device-pixel-ratio: 1/1)
and (min-width: 800px)
and (max-width: 1024px)
and (orientation: portrait),
only screen 
and (min-device-pixel-ratio: 1)
and (min-width: 800px)
and (max-width: 1024px)
and (orientation: portrait),
only screen 
and (in-resolution: 72dpi)
and (min-width: 800px)
and (max-width: 1024px)
and (orientation: portrait),
only screen 
and (min-resolution: 1dppx)
and (min-width: 800px)
and (max-width: 1024px)
and (orientation: portrait),
only screen
and (min-width: 800px)
and (max-width: 1024px)
and (orientation: portrait) {
    #container, .container {
        width: 98%;
        padding: 3px 1%;
    }

    #header ul.nav1 {
        width: 68%;
    }
    
    #header ul.nav1 li {
        max-width: 19.8%;
        width: 20%;
        border-right: 1px solid #939598;
    }
    
    #header ul.nav1 li:last-child {
        border-right: none;
    }

    #header ul.nav1 li a {
        padding: 0;
        border-right: none;
        width: 100%;
        display: block;
        text-align: center;
    }

    #header div.headTel {
        width: 30%;
        margin: 15px 0 10px 1%;
    }

    #logo {
        width: 62%;
    }

    #basketpreview {
        width: 30%;
    }

    #cats {
        width: 61%;
    }

    #cats + form {
        width: 38%;
    }

    span.search input {
        width: 94%;
    }

    .footCols:first-child {
        width: 28%;
    }

    .footCols:nth-child(3n+1), .footCols:nth-child(3n+2) {
        margin-right: 3%;
    }

    .footCols {
        width: 30%;
    }

    div.social {
        width: 70%;
        padding: 0px 15%;
    }

    .social img {
        width: 50px;
        max-width: 30%;
        height: auto;
        max-height: 100%;
    }

    .social a img {
        margin: 0 2% 0 0;
    }

    .sidebar {
        width: 25%;
    }

    .sidebar + #content {
        width: 72%;
    }

    #subcats li {
        width: 22%;
        margin: 5px 1%;
    }

    #surname_form {
        width: 32%;
    }

    #login_form, #surname_form {
        width: 58%;
        float: right;
    }
}

/* Portrait devices (and landscape mobiles) - general styling */
@media only screen 
and (-webkit-min-device-pixel-ratio: 1)
and (max-width: 800px)
and (orientation: portrait),
only screen 
and (-min-moz-device-pixel-ratio: 1)
and (max-width: 800px)
and (orientation: portrait),
only screen 
and (-o-min-device-pixel-ratio: 1/1)
and (max-width: 800px)
and (orientation: portrait),
only screen 
and (min-device-pixel-ratio: 1)
and (max-width: 800px)
and (orientation: portrait),
only screen 
and (in-resolution: 72dpi)
and (max-width: 800px)
and (orientation: portrait),
only screen 
and (min-resolution: 1dppx)
and (max-width: 800px)
and (orientation: portrait),
only screen
and (max-width: 800px)
and (orientation: portrait),
only screen 
and (-webkit-min-device-pixel-ratio: 1)
and (max-width: 768px)
and (orientation: landscape),
only screen 
and (-min-moz-device-pixel-ratio: 1)
and (max-width: 768px)
and (orientation: landscape),
only screen 
and (-o-min-device-pixel-ratio: 1/1)
and (max-width: 768px)
and (orientation: landscape),
only screen 
and (min-device-pixel-ratio: 1)
and (max-width: 768px)
and (orientation: landscape),
only screen 
and (in-resolution: 72dpi)
and (max-width: 768px)
and (orientation: landscape),
only screen 
and (min-resolution: 1dppx)
and (max-width: 768px)
and (orientation: landscape),
only screen
and (max-width: 768px)
and (orientation: landscape) {
    #container, .container {
        width: 98%;
        padding: 3px 1%;
    }

    #header #navArea {
        width: 100%;
        position: fixed;
        top: 0;
        right: 0;
        z-index: 10;
        padding-top: 40px;
        background-color: #fff;
        border-bottom: 1px solid #939598;
    }

    #google_translate_element {
        top: 7px;
        left: 2px;
    }

    #header #hamburger {
        height: 36px;
        width: 36px;
        background: -webkit-linear-gradient(bottom, #ffffff 0%, #ffffff 5%, #939598 5%, #939598 25%, #ffffff 25%, #ffffff 40%, #939598 40%, #939598 60%, #ffffff 60%, #ffffff 75%, #939598 75%, #939598 95%, #ffffff 95%, #ffffff 100%);
        background: -moz-linear-gradient(bottom, #ffffff 0%, #ffffff 5%, #939598 5%, #939598 25%, #ffffff 25%, #ffffff 40%, #939598 40%, #939598 60%, #ffffff 60%, #ffffff 75%, #939598 75%, #939598 95%, #ffffff 95%, #ffffff 100%);
        background: -o-linear-gradient(bottom, #ffffff 0%, #ffffff 5%, #939598 5%, #939598 25%, #ffffff 25%, #ffffff 40%, #939598 40%, #939598 60%, #ffffff 60%, #ffffff 75%, #939598 75%, #939598 95%, #ffffff 95%, #ffffff 100%);
        background: linear-gradient(bottom, #ffffff 0%, #ffffff 5%, #939598 5%, #939598 25%, #ffffff 25%, #ffffff 40%, #939598 40%, #939598 60%, #ffffff 60%, #ffffff 75%, #939598 75%, #939598 95%, #ffffff 95%, #ffffff 100%);
        cursor: pointer;
        position: fixed;
        top: 2px;
        right: 2px;
    }

    #header ul.nav1 {
        width: 50%;
        height: unset;
        margin: 0;
        float: none;
        position: fixed;
        top: 40px;
        right: 0;
        border: none;
        max-height: 0;
        overflow: hidden;
        -webkit-transition-property: max-height;
        -moz-transition-property: max-height;
        -ms-transition-property: max-height;
        -o-transition-property: max-height;
        transition-property: max-height;
        -webkit-transition-duration: 600ms;
        -moz-transition-duration: 600ms;
        -ms-transition-duration: 600ms;
        -o-transition-duration: 600ms;
        transition-duration: 600ms;
        -webkit-transition-timing-function: ease-in-out;
        -moz-transition-timing-function: ease-in-out;
        -ms-transition-timing-function: ease-in-out;
        -o-transition-timing-function: ease-in-out;
        transition-timing-function: ease-in-out;
    }

    #header ul.nav1.openNav {
        max-height: 12em;
        overflow: hidden;
        border: 1px solid #939598;
    }
    
    #header ul.nav1 li {
        width: 100%;
        border-bottom: 1px solid #939598;
        float: none;
    }
    
    #header ul.nav1 li:last-child {
        border-bottom: none;
    }

    #header ul.nav1 li a {
        padding: 0;
        border-right: none;
        width: 100%;
        display: block;
        text-align: center;
    }

    #header div.headTel {
        display: none;
    }

    #logo {
        width: 62%;
        padding-top: 80px;
    }

    #basketpreview {
        width: 30%;
        margin-top: 40px;
    }

    #cats {
        width: 61%;
    }

    #cats + form {
        width: 38%;
    }

    span.search input {
        width: 94%;
    }

    .footCols:first-child {
        width: 28%;
    }

    .footCols:nth-child(3n+1), .footCols:nth-child(3n+2) {
        margin-right: 3%;
    }

    .footCols {
        width: 30%;
    }

    div.social {
        width: 70%;
        padding: 0px 15%;
    }

    .social img {
        width: 50px;
        max-width: 30%;
        height: auto;
        max-height: 100%;
    }

    .social a img {
        margin: 0 2% 0 0;
    }

    #slideshow {
        max-width: 100%;
        max-height: 66.66vw;
    }

    .sidebar {
        width: 25%;
    }

    .sidebar + #content {
        width: 72%;
    }

    #subcats li {
        width: 22%;
        margin: 5px 1%;
    }

    .shopitems .itemimage {
        width: 20%;
        height: auto;
    }

    .shopitems .itemdetails {
        width: 51%;
        margin-left: 18%;
        padding-right: 20px;
    }

    .itemaddform {
        width: 45%;
        right: -50%;
        padding-left: 10px;
        padding-right: 10px;
    }

    #surname_form {
        width: 32%!important;
    }

    #login_form {
        width: 58%!important;
        float: right;
    }

    .delivery_address p {
        width: unset !important;
    }

    .delivery_address p input[type="text"] {
        width: 50% !important;
        padding: 5px;
        border-radius: 5px;
        border: 1px solid #aaa;
    }

    table {
        max-width: 100%;
        overflow: auto;
    }
}

/* Portrait small tablets */
@media only screen 
and (-webkit-min-device-pixel-ratio: 1)
and (max-width: 620px),
only screen 
and (-min-moz-device-pixel-ratio: 1)
and (max-width: 620px),
only screen 
and (-o-min-device-pixel-ratio: 1/1)
and (max-width: 620px),
only screen 
and (min-device-pixel-ratio: 1)
and (max-width: 620px),
only screen 
and (in-resolution: 72dpi)
and (max-width: 620px),
only screen 
and (min-resolution: 1dppx)
and (max-width: 620px),
only screen
and (max-width: 620px) {
    body {
        font-size: 13px;
    }

    h1 {
        line-height: 1.2em;
    }

    #logo {
        width: 48%;
        margin: auto;
        padding-top: 60px;
        float: none;
    }

    #basketpreview {
        margin-top: 20px;
        width: 100%;
    }

    #cats {
        width: 100%;
    }

    #cats + form {
        width: 100%;
    }

    span.search input {
        width: 97%;
        width: calc(100% - 20px);
    }

    span.search button {
        top: -10px;
    }

    .footCols:first-child {
        width: 80%;
    }

    .footCols:nth-child(3n+1), .footCols:nth-child(3n+2) {
        margin-right: 0%;
        margin-bottom: 20px;
    }

    .footCols {
        width: 100%;
    }

    div.social {
        width: 30%;
        padding: 0px 35%;
    }

    .social img {
        width: 50px;
        max-width: 30%;
        height: auto;
        max-height: 100%;
    }

    .social a img {
        margin: 0 2% 0 0;
    }

    #slideshow {
        max-width: 100%;
        max-height: 66.66vw;
    }

    .sidebar {
        display: none;
        width: 100%;
    }

    .sidebar + #content {
        width: 100%;
    }

    #subcats li {
        width: 45%;
        margin: 5px 1%;
    }

    #login_form, #surname_form {
        width: 92%!important;
        width: calc(100% - 30px)!important;
    }
}

/* Portrait small tablets */
@media only screen 
and (-webkit-min-device-pixel-ratio: 1)
and (max-width: 430px),
only screen 
and (-min-moz-device-pixel-ratio: 1)
and (max-width: 430px),
only screen 
and (-o-min-device-pixel-ratio: 1/1)
and (max-width: 430px),
only screen 
and (min-device-pixel-ratio: 1)
and (max-width: 430px),
only screen 
and (in-resolution: 72dpi)
and (max-width: 430px),
only screen 
and (min-resolution: 1dppx)
and (max-width: 430px),
only screen
and (max-width: 430px) {
    .shopitems li {
        min-height: 150px;
    }
}