/* Imports */

/* General styling */
* {
    margin: 0;
    padding: 0;
    text-decoration: none;
    list-style: none;
    box-sizing: border-box;
}

body {
    font-family: 'Roboto', sans-serif;
}

th, td {    
    padding: 10px;
}

h1 {
    padding: 20px 0
}

/* Heading */

.top-nav-bar {
    display: flex;
    justify-content: space-around;
    align-items: center;
    min-height: 8vh;
    box-shadow: 0 4px 2px -2px #bababa;
}

.nav-links {
    display: flex;
    justify-content: space-around;
    width: 50%;
}

.nav-links a {
    font-size: 18px;
    color: #4d4d4d;
    transition: .2s;
}

.nav-links a:hover {
    font-size: 18px;
    color: #ff9933;
}

.logo {
    font-size: 28px;
}

.logo a {
    color: #4d4d4d;
    font-weight: bold;
    text-transform: uppercase;
}

.logo > a > img {
    width: 28px;
    height: 28px;
}

.logo i {
    color: #ff9933;
    font-size: 32px;
}

.cart {
    display: inline-block;
}

.cart-num {
    display: inline-block;
    background-color: #ff9933;
    color: #fff;
    border-radius: 1em;
    padding: 2px;
}

.burger {
    display: none;
}

.burger div {
    margin: 5px;
    background-color: #4d4d4d;
    width: 25px;
    height: 3px;
}

@media screen and (max-width: 1620px){
    body {
        overflow-x: hidden;
    }

    .nav-links {
        position: absolute;
        height: 92vh;
        width: 100%;
        top: 8vh;
        display: none;
        background-color: #ff9933;
        flex-direction: column;
        align-items: center;
        transition: transform .5s ease-in;
    }
    
    .nav-links a:hover {
        color: #fff;
    }

    .burger {
        display: block;
        cursor: pointer;
    }

    .cart-num {
        background-color: #fff;
        color: #4d4d4d;
    }
}

.nav-active {
    display: flex;
}

/* Main content */

.main-content {
    width: 90%;
    text-align: center;
    margin: auto;
}

/* Login, Logout, Signin forms */

.user-form {
    padding: 1% 5%;
    display: inline-block;
    text-align: center;
}

.user-form input {
    width: 100%;
    padding: 12px 20px;
    margin: 8px 0;
    box-sizing: border-box;
}

.user-form label {
    float: left;
}

.user-form input[type='submit'] {
    font-weight: bold;
    border: 1px solid #4d4d4d;
    border-radius: 1em;
    background-color: #fff;
    transition: .5s;
}

.user-form input[type='submit']:hover {
    border: 1px solid #ff9933;
    background-color: #ff9933;
    color: #fff;
}

.errorlist {
    padding: 20px;
    border-radius: 1em;
    background-color: #ff9933;
    color: #fff;
    list-style-type: none;
}

/* Images */

img {
    width: 150px;
    height: 80px;
}

/* Index page */

.categories a{
    color: black;
    display: block;
    text-decoration: none;
    text-align: left;
    padding: 20px;
}

.categories .main-category {
    display: inline-block;
    color: #fff;
    font-weight: bold;
    font-size: 24px;
    border-radius: 15px;
    width: 45%;
    padding: 40px 20px;
    margin: auto;
    margin-top: 20px;
}

.categories .sub-categories {
    display: none;
    text-align: left;
    position: absolute; 
    left: 0;
    z-index: 9999;
    width: 100%;
    border: 1px solid #bababa;
}

.categories .sub-category{
    margin: auto;
    vertical-align: middle;
    text-align: center;
    display: inline-block;
    padding: 15px;
    font-size: 20px;
    width: 24%;
    transition: .3s ease-in-out;
}

.categories .main-category:hover + .sub-categories, .categories .sub-categories:hover {
    display: block;
    background-color: #fff;
}

.categories .sub-category:hover {
    color: #ff9933;
}

#download-remains-btn {
    margin: auto;
    padding: 40px;
    width: 50%;
    border: 1px solid #4d4d4d;
    border-radius: 2em;
    background-color: #fff;
    transition: .3s ease-in-out;
    font-size: 18px;
}

#download-remains-btn:hover {
    background-color: #ff9933;
    font-size: 28px;
    color: #fff;
    border: 1px solid #fff;
}

.download-from-remains form{
    width: 20%;
    margin: 10px auto;
    padding: 20px;
    border: 1px solid #4d4d4d;
    border-radius: 2em;
    transition: .3s;
}

.download-from-remains input[type='file']{
    display: block;
    margin: auto;
}

.download-from-remains input[type='submit']{
    border: 1px solid #4d4d4d;
    border-radius: 1em;
    padding: 5px 10px;
    margin: 5px auto;
    background-color: #fff;
    transition: .3s;
}

.download-from-remains input[type='submit']:hover {
    background-color: green;
    color: #fff;
}

.download-from-remains p {
    margin: 10px;
    border-radius: 1em;
    background-color: tomato;
    padding: 5px;
    color: #fff;
}

@media screen and (max-width: 1250px){
    .download-from-remains form {
        width: 50%;
    }
}

@media screen and (max-width: 820px) {
    .categories .main-category, .categories .sub-category{
        display: block;
        width: 100%;
    }

    .categories .main-category:hover + .sub-categories, .categories .sub-categories:hover {
        display: block;
    }

    #download-remains-btn {
        width: 100%;
    }

    .download-from-remains form {
        width: 100%;
    }
}
/* Catalog */

img:hover + .side-img {
    display: block;   
}

.side-img {
    position: absolute;
    z-index: 9999;
    display: none;
    padding: 25px;
    margin-left: 10%;
    border-radius: 0 2em 2em 2em;
    background-color: #fff;
    border: 2px solid black;
}

.side-img img { 
    width: auto;
    height: auto;
    max-width: 500px;
    max-height: 400px;
}

.info {
    border: 2px solid black;
    border-radius: 5px;
    width: 60%;
    margin: 20px auto;
    padding: 20px;
    color: black;
}

.message-to-users {
    font-size: 18px;
    text-align: justify;
}

@media screen and (max-width: 1240px) {
    .info {
        width: 90%;
    }
}

@media screen and (max-width: 740px) {
    .message-to-users {
        font-size: 14px;
    }
}



/* Catalog search */

.search {
    padding: 2%;
    margin: auto;
    width: 50%;
    text-align: center;
}

.search input, .search button {
    font-size: 24px;
    padding: 10px;
    border: 1px solid #bfbfbf;
}

.search input[type='text'] {
    border-radius: 1em 0 0 1em;
    width: 75%;
}

.search button {
    background: #ff9933;
    border-radius: 0 1em 1em 0;
}
.null-quantity {
    color: red;
    font-weight: bold;
}

@media screen and (max-width: 500px){
    .search {
        width: 100%;
    }
}

/* Catalog table */

.product-table {
    overflow-x: auto;
}

.product-table table {
    margin: auto;
    width: 90%;
}

.product-table table, .product-table th, .product-table td {
    border: 1px solid #bababa;
    border-collapse: collapse;
}

.product-table table th{
    width: 5%;
}

.cash-input, .non-cash-input {
    width: 200px;
}

.number-input {
    margin: auto;
    font-size: 18px;
    width: 100px;
}

.number-input input[type='number'] {
    width: 45%;
    height: 40px;
    text-align: center;
    -moz-appearance: textfield;
}

.number-input input::-webkit-outer-spin-button,
.number-input input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}


.number-input button[type='button'] {
    height: 40px;
    width: 20%;
    color: #4d4d4d;
    background-color: #fff;
    border: 1px solid #4d4d4d;
    border-radius: 10px;
    transition: .2s;
}
.number-input button[type='button']:hover {
    height: 40px;
    width: 20%;
    background-color: #ff9933;
    border: 1px solid #ff9933;
    color: #fff;    
    border-radius: 10px;
}

#product-btn {
    background-color: #fff;
    border: 1px solid #ff9933;
    border-radius: 1em;
    color: #ff9933;
    padding: 15px 32px;
    text-align: center;
    text-decoration: none;
    display: inline-block;
    font-size: 16px;
    transition: .2s;
}

#product-btn:hover {
    background-color: #ff9933;
    color: #fff;    
}

.product-table table tr:first-child > th:nth-child(4),
.product-table table tr:first-child > th:nth-child(5){
    border: 2px solid black;
}

.product-table table tr:not(:first-child) th:first-child,
.product-table table tr:not(:first-child) th:nth-child(4){
    border-left: 2px solid black;
}

.product-table table tr:not(:first-child) th:last-child {
    border-right: 2px solid black;
}

.product-table table tr:not(:first-child) td:nth-child(4),
.product-table table tr:not(:first-child) td:nth-child(10),
.product-table table tr:not(:first-child) td:last-child{
    border-left: 2px solid black;
}
.product-table table tr:last-child td:nth-child(4),
.product-table table tr:last-child td:nth-child(5),
.product-table table tr:last-child td:nth-child(6),
.product-table table tr:last-child td:nth-child(9),
.product-table table tr:last-child td:nth-child(10),
.product-table table tr:last-child td:nth-child(11),
.product-table table tr:last-child td:nth-child(12) {
    border-bottom: 2px solid black;
}

/* Cart */

.current-order, .past-orders {
    display: inline-block;
    width: 60%;
}

.superuser-orders {
    width: 60%;

    margin: 20px auto;
}

.cash-order, .non-cash-order {
    display: inline-block;
    width: 50%;
    vertical-align: top;
}

.order {
    width: 45%;
    border: 2px solid #bababa;
    border-radius: 1em;
    overflow-x: auto;
}

.order h2 {
    text-align: left;
    padding: 10px;
    margin: 0;
}

.order .products {
    width: 100%;    
}

.order table {
    width: 100%;
    border-top: 2px solid #bababa;
    border-collapse: collapse;
}

.order th {
    border-right: 1px solid #bababa;
    border-bottom: 1px solid #bababa;
}

.order td {
    border-right: 1px solid #bababa;
    justify-content: center;
}

.order th:last-child, .order td:last-child {
    border-right: none;
}

#delete-btn {
    border: none;
    font-size: 16px;
    padding: 5px 10px;
    background-color: #fff;
    border-radius: 10px;
    color: #bababa;
    transition: .3s;
}

#delete-btn:hover {
    background-color: tomato;
    color: #fff;
}

#final-row {
    border-top: 1px solid #bababa;
}

#quantity-input {
    width: 75%;
}

#make-order-btn {
    margin: 10px;
    font-weight: bold;
    padding: 20px;
    border: 1px solid #4d4d4d;
    border-radius: 1em;
    background-color: #fff;
    transition: .5s;
}

#make-order-btn:hover {
    background: #ff9933;
    border-color: #ff9933;
    color: #fff;
}

@media screen and (max-width: 1700px) {
    .cash-order, .non-cash-order {
        display: block;
        width: 65%;
        margin: 50px auto;
    }
}

/* Pagination */

.paginator {
    margin: 20px;
}

.paginator a {
    padding: 10px;
    border: 1px solid #4d4d4d;
    border-radius: 10px;
    color: #4d4d4d;
    transition: .2s;
}

.paginator a:hover {
    background: #ff9933;
    border: none;
    color: #fff;
}

#strong-page {
    background: #ff9933;
    border: none;
    color: #fff;
}

/* Make Order Form */

.user-data {
    width: 50%;
    margin: 20px auto;
    border: 1px solid #bababa;
    border-radius: 15px;
    font-size: 22px;
}

.user-data form {
    padding: 1% 5%;
    display: inline-block;
    text-align: center;
}

.user-data input{
    width: 100%;
    padding: 12px 20px;
    margin: 8px 0;
    box-sizing: border-box;
}

.user-data input[type='submit'] {
    font-weight: bold;
    border: 1px solid #4d4d4d;
    border-radius: 1em;
    background-color: #fff;
    transition: .5s;
}

.user-data input[type='submit']:hover {
    border: 1px solid #ff9933;
    background-color: #ff9933;
    color: #fff;
}

.user-data textarea {
    width: 100%;
    border-radius: 1em;
    padding: 5px;
    resize: none;
}

.user-data a {
    color: #4d4d4d;
}

@media screen and (max-width: 620px){
    .user-data {
        font-size: 14px;
        width: 70%
    }
}

/* Delete order */

.deliver-delete-order input{
    cursor: pointer;
    width: 15%;
    margin: 20px;
    padding: 10px;
    font-weight: bold;
    border: 1px solid #4d4d4d;
    border-radius: 1em;
    background-color: #fff;
    transition: .5s;
}

.deliver-delete-order input:hover {
    background-color: tomato;
    color: #fff;
    border: #fff;
}

.deliver-delete-order a {
    color: #4d4d4d;
}

/* One order */

.continue-btn {
    margin: 30px;
}

.continue-btn a {
    border: 1px solid #4d4d4d;
    border-radius: 1em;
    padding: 20px;
    color: #4d4d4d;
    transition: .3s;
}

.continue-btn a:hover {
    border: 1px solid #fff;
    color: #fff;
    background-color: #ff9933;
}


/* User orders */

.current-order, .past-orders {
    width: 80%;
}

.user-orders h4 {
    padding-bottom: 15px;
}

/* Delivered */
#delivered {
    color: #4d4d4d;
    border: 1px solid #4d4d4d;
    border-radius: 1em;
    padding: 10px;
}

#delivered:hover {
    color: #fff;
    background-color: #ff9933;
    border: 1px solid #ff9933;
}

/* Delete order */

.delete-order input{
    width: 15%;
    margin: 10px;
    border: 1px solid #4d4d4d;
    border-radius: 1em;
    padding: 20px;
    background-color: #fff;
    color: #4d4d4d;
    transition: .3s;
}

.delete-order input:hover {
    border: 1px solid #fff;
    background-color: tomato;
    color: #fff;
}

/* Orders */

.order-details {
    width: 45%;
    margin: 10px auto;
    border: 1px solid #bababa;
    border-radius: 1em;
    padding: 20px;
}

.order-details textarea {
    margin: 5px;
    width: 100%;
    resize: none;
    border: none;
}

.footer {
    margin-top: 20px;
    background-color: #cd7f32;
    color: #fff;
    padding: 35px;
    height: 300px;
}

.phones {
    margin-top: 20px;
}
