* {
    box-sizing: border-box;
}

body {
    margin:0;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 16px;
    letter-spacing: 1.2px;
    background: #262626;
    color:#fff;
}

#container {
    margin: 0 auto;
    margin-bottom: 30px;
    width:100vw;
    max-width: 1200px;
    min-height:100vh;
    padding:0 20px;
    background: #333;
}

nav {
    padding:20px 0;
    border-bottom: 	2px solid #000;
}

nav .menu-button {
    background: #000;
    padding: 8px 10px;
    display:none;
}

nav > ul {
    padding:0;
    margin:0;
    display:flex;
    justify-content: space-around;
    list-style: none;
    width: 100%;
}

nav > ul > li {
    background: #000;
    font-weight: bold;
    box-shadow: 0 0px 5px rgba(139, 139, 139,0.5); 
}

nav > ul > li > a {
    display: block;
    padding:10px 25px;
    text-decoration: none;
    color:#fff;
    white-space: nowrap;
}

nav > ul > li > a:hover, nav .current {
    box-shadow: 0 0px 11px rgb(182, 182, 182);
}


#loader {
    width:128px;
    height: 128px;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: none;
}

.hidden {
    display: none;
}

/* End of global code */

.dialog {
    position:fixed;
    top:0;
    left:0;
    width:100vw;
    height:100vh;
    background: rgba(0,0, 0,0.7);
    display:none;
    justify-content: center;
    align-items: center;
}

.dialog > div {
    background: #333;
    padding:40px;
    text-align: center;
    border: 1px solid #000;
    box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);
}

.dialog > div > h2 {
    margin-top:0;
    color:rgb(255, 41, 41);
    letter-spacing: 2.2px;
}

.dialog > div > button {
    padding:12px 30px;
    font-size: 16px;
    font-weight: bold;
    margin:25px 15px 0;
    color:#fff;
    background: #000;
    border:none;
    cursor: pointer;
    border: 1px solid #fff3;
    box-shadow: 0 2px 6px 0 rgba(0, 0, 0, 0.2), 0 4px 10px 0 rgba(0, 0, 0, 0.19);
}

.dialog > div > .btn-confirm {
    background: rgb(83, 0, 0);
}



/* Start of login form */

#container > .login {
    display: flex;
    justify-content: center;
    align-items: center;
    height:100vh;
}

#container > .login > form {
    background: rgb(92, 92, 92);
    width:300px;
    display:flex;
    flex-direction: column;
    padding:20px;
}

#container > .login > form > img {
    height: 40px;
}

#container > .login > form > h2 {
    text-align: center;
}

#container > .login > form > span {
    display:none;
    text-align: center;
    background: #000;
    border-radius:15px;
    padding:8px;
    color:rgb(255, 78, 78);
    border: 2px solid rgb(255, 0, 0);
}

#container > .login > form > input {
    margin-top: 10px;
    font-size: 16px;
    padding:5px;
}

#container > .login > form > input[type="submit"] {
    background: #333;
    color:#fff;
    font-size: 18px;
    border:unset;
    cursor:pointer;
    font-weight: bold;
    padding:10px 0;
    letter-spacing: 1.5px;
}

/* End of login form */



/* Start of parts page */

.content {
    padding:30px 10px;
}

.content > #filter {
    display:grid;
    grid-template-columns: repeat(auto-fit,minmax(130px, 1fr));
    grid-gap: 20px;
    margin-bottom: 20px;
}

nav > .filter-button {
    background: #000;
    padding: 8px 10px;
    display:none;
}

.content > #filter :last-child,
.content > #filter :nth-last-child(2){
    align-self: flex-end;
}

.content > #filter label {
    display: block;
    margin-bottom: 5px;
}

.content > #filter select {
    width:100%;
    padding: 5px;
}

.content > #filter input {
    width:100%;
    padding: 5px;
}

.content > #filter button[type="submit"],
.content > #filter button[type="button"]{
    width:100%;
    padding: 5px;
    background: #000;
    color:#fff;
    font-size: 18px;
    border:unset;
    cursor:pointer;
    font-weight: bold;
    letter-spacing: 1.5px;
}

.parts {
    display:grid;
    grid-gap:20px;
    padding:0 30px; 
}

.parts > a {
    color:#fff;
    text-decoration: none;
}

.parts > a > .part {
    display: grid;
    grid-template-columns: 200px 1fr 170px;
    background: rgb(102, 102, 102);
    padding:10px;
    box-shadow: 0 1px 5px #000;
}

.parts > a > .part > .img {
    background-size: cover;
    background-position: center;
    height:150px;
    align-self: center;
}

.parts > a > .part > .text {
    padding:0 30px;
} 

.parts > a > .part > .text h3 {
    margin:15px 0;
}

.parts > a > .part > .text p {
    margin:8px 0;
}

.parts > a > .part > .price-quantity {
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: space-around;
}

.parts > a > .part > .price-quantity > span {
    padding: 10px;
    background: #000;
}

.parts .parts__categories {
    font-size:12px;
    margin-top: -12px !important;
    margin-bottom: 14px !important;
}

.parts .parts__pagination * {
    user-select:none;
    -moz-user-select: none;
}

.parts .parts__pagination a {
    text-decoration: none;
    color: #fff;
    padding: 5px 8px;
    background: rgba(255,255,255,0.1);
    cursor:not-allowed;
}

.parts .parts__pagination a:link,
.parts .parts__pagination a:visited
{
    cursor: pointer;
}

.parts a.parts__current-page {
     //background: rgb(255, 99, 0);
     color: #000;
     background: #fff;
}


.parts  .pagination-inner-mobile {
        display: none;
}
/* End of index page */



/* Start of add part page */

.content > #add-part {
    background: #262626;
    padding:30px;
    display:grid;
    grid-template-columns: repeat(auto-fit,minmax(240px, 1fr));
    grid-gap: 20px;
    margin-bottom: 20px;
}

.content > #add-part :last-child {
    align-self: flex-end;
}

.content > #add-part label {
    display: block;
    margin-bottom: 5px;
}

.content > #add-part select {
    width:100%;
    padding: 5px;
}

.content > #add-part select > option {
    background: #333;
    color:#fff;
}

.content > #add-part input {
    width:100%;
    padding: 5px;
}

.content input[type="submit"],
.content input[type="button"] {
    width:100%;
    padding: 5px;
    background: #000;
    color:#fff;
    font-size: 18px;
    border:unset;
    cursor:pointer;
    font-weight: bold;
    letter-spacing: 1.5px;
    border: 1px solid #fff3 !important;
    box-shadow: 0 2px 6px 0 rgba(0, 0, 0, 0.2), 0 4px 10px 0 rgba(0, 0, 0, 0.19);
}

.content > #add-part > .description {
    grid-column: span 2;
}

.content > #add-part > .description > textarea {
    padding:5px;
    width:100%;
}

.content > #add-part > .submit {
    grid-column-end: -1;
}

.content > #add-part > .submit > input {
    padding:10px 0;
}

/* End of add part page */



/* Start of edit page */

.content > #add-part > .submit > .btn-img {
    margin:10px 0;
    background: rgb(6, 0, 95);
}

.content > #add-part > .submit > .btn-delete {
    background: rgb(83, 0, 0);
}

h2.span {
    display: flex;
    justify-content: space-between;
}

.edit-img {
    width: 30px;
}


/* End of edit page */



/* Start of account page */

.content > #account {
    background: #262626;
    padding:30px;
    display:grid;
    grid-template-columns: repeat(auto-fit,minmax(200px, 1fr));
    grid-gap: 20px;
    margin-bottom: 20px;
}

.content > #account :last-child {
    align-self: flex-end;
    grid-column-end: -1;
}

.content > #account label {
    display: block;
    margin-bottom: 5px;
}
.content > #account input {
    width:100%;
    padding: 5px;
}

.content > #account input[type="submit"] {
    width:100%;
    padding: 5px;
    background: #000;
    color:#fff;
    font-size: 18px;
    border:unset;
    cursor:pointer;
    font-weight: bold;
    letter-spacing: 1.5px;
}


/* End of account page */




/* Start of models page */

.content > #models-groups {
    
}

.content > #models-groups .model {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    grid-row-gap: 10px;
    background: #3e3e3e;
    min-height: 55px;
    padding: 10px;
}

.content > #models-groups .model:nth-child(odd) {
    background: #262626;
}

.content > #models-groups .model > div {
    display: flex;
    align-items: center;
}

.content > #models-groups .model > div:last-child,
.content > #models-groups .model > div:nth-child(3) {
    justify-content: center;
}

.content > #models-groups .model select1 {
    padding: 5px 30px;
    background: #00a7c3;
    color: #fff;
    font-size: 16px;
    border: unset;
    cursor: pointer;
    letter-spacing: 1.5px; 
}

.content > #models-groups .model button {
    padding: 5px 30px;
    background: #2192ff;
    color: #fff;
    font-size: 16px;
    border: unset;
    cursor: pointer;
    letter-spacing: 1.5px; 
    display:none;
    
    border: 1px solid #fff3;
    box-shadow: 0 2px 6px 0 rgba(0, 0, 0, 0.2), 0 4px 10px 0 rgba(0, 0, 0, 0.19);
}

.content > #models-groups .model button:hover {
  background-color: #2192ff66;
}

.content > #models-groups .model button.error {
    background: #ff2121ff;
}

.content > #models-groups .model button.error:hover {
  background-color: #ff212166;
}

.content > #models-groups .model input[type=checkbox] {
    display:none;
}

.content > #models-groups .model .checkbox {
    display: block;
    width: 32px;
    height: 32px;
    background-color: #2192ff;
    position: relative;
}

.content > #models-groups .model input[type=checkbox]:checked ~ .checkbox::after{
    content: "\D7";
    font-size: 42px;
    position: absolute;
    top: -1px;
    left: 4px;
    line-height: 32px;
}
/* End of models page */




/* Additional models*/


.content > #additional-models .additional-models__row {
    background: #262626;
    padding:15px;
    display:grid;
    grid-template-columns: repeat(auto-fit,minmax(200px, 1fr));
    grid-gap: 20px;
    margin-bottom: 10px;
}

/*.content > #additional-models .additional-models__row:last-child {*/
/*    align-self: flex-end;*/
/*    grid-template-columns: repeat(auto-fit,minmax(1fr, 2fr));*/
/*}*/

.content > #additional-models .additional-models__row label {
    display: block;
    margin-bottom: 5px;
}

.content > #additional-models .additional-models__row select {
    width:100%;
    padding: 5px;
}

.content > #additional-models .additional-models__row select > option {
    background: #333;
    color:#fff;
}

.content > #additional-models .additional-models__row input {
    width:100%;
    padding: 5px;
}

.content > #additional-models .additional-models__row input[type="submit"]:hover {
    transform: scale(1.01, 1.2);
}

.content > #additional-models .additional-models__row > .submit > input {
    padding:10px 0;
}

/* End of Additional models page */




/* Add images page */

.add-images__images {
    background-color: #f5f5f5;
    margin-top: 10px;
    padding-left: 5px;
    padding-right: 5px;
    border-radius: 2px;
    border: 1px solid #edebeb;

    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    grid-auto-rows: 150px;
}

.add-images__images .image-select {
    position: relative;
    margin: 5px 1% 5px 5px;
    border: 1px solid #dfdfdf;
    background-color: white;
    border-radius: 3px;
    overflow: hidden;
}

.add-images__images img {
    max-height: 100%;
    max-width: 100%;
    width: auto;
    height: auto;
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    margin: auto;
}

.add-images__images .image-select:not(.empty) {
    cursor: move;
    display: flex;
}

.add-images__images .image-select.empty {
    cursor: pointer;
}

.add-images__images .image-select span {
    display: none;
    cursor: pointer;
    color: #ffffff;
    position: absolute;
    background-color: #bd0404;
    font-size: 9px;
    font-weight: bold;
    width: 100%;
    bottom: 0;
    text-align: center;
    vertical-align: middle;
    text-shadow: 1px 1px 1px #333;
    z-index: 100;
    margin: 0 auto 0;
    padding: 0 4px 1px;
}

.add-images__images .image-select span i {
    font-size: 20px;
}

.add-images__images .image-select:not(.empty):hover span {
    display: block;
}

#add-images .add-images__row {
    background: #262626;
    padding:15px;
    display:grid;
    grid-template-columns: repeat(auto-fit,minmax(200px, 1fr));
    grid-gap: 20px;
    margin-bottom: 10px;
}

#add-images .add-images__row input {
    width:100%;
    padding: 5px;
}

#add-images .add-images__row input[type="submit"]:hover {
    transform: scale(1.01, 1.2);
}

#add-images .add-images__row > .submit > input {
    padding:10px 0;
}

.upload-progress svg {
    height: 50%;
    position: relative;
    margin: 0 auto;
    top: 50%;
    transform: translateY(-50%);
}

/* End of Add Images Page */





/* PREVIEW PAGE */

/* PART */

.content #part {
    display:grid;
    grid-template-columns: 450px 2fr;
    grid-template-rows: auto 300px;
    grid-gap: 20px;
    padding:20px;
    background: #006991;
    background-image: linear-gradient(
            to right,
            #006991,
            #216b87
    );
    margin: 10px;
    margin-bottom: 0;
}


.content #part > h2 {
    font-size: 1rem;
    margin: 0;
}

.content #part > a .img {
    background: #fff;
    padding: 5px;

    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    background-origin: content-box;
    height:300px;

}

.content #part > .data {
    grid-row: span 2
}

.content #part > .data > h1 {
    text-align: center;
    color: #fff;
}

.content #part > .data > .table {
    width: 70%;
    min-width: 400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-gap: 5px;
}

.content #part > .data > .table div {
    font-weight: bold;
    color: #fff;
    border-bottom: 1px dotted rgba(0, 0, 0, 0.699);
    padding: 3px 0;
}

.content #part > .data > .table div:nth-child(even) {
    font-weight: 800;
}

.content #part > .data > .buttons  {
    display: flex;
    justify-content: center;
    margin-top: 30px;
}

.content #part > .data > .buttons > :nth-child(1)  {
    margin-right: 80px;
}

.content #part #btn-div {
    text-align: center;
    margin-top: 25px;
}

.content #part .btn {
    padding: 10px 15px;
    font-weight: bold;
    border: 2px solid rgba(255, 255, 255, 0.603);
    font-size: 1em;
    letter-spacing: 1px;
    color: #fff;
    background: rgb(0, 183, 255);
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.301), 0 4px 8px rgba(0, 0, 0, 0.301);
    position:relative;
    transition: all .2s;
}

.content #part .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.301);
}

.content #part .btn:active {
    transform: translateY(0);
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.301);
}

.content #part > .images {
    align-self: flex-start;
    padding:10px;
    background: #fff;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    grid-gap: 10px;
    box-shadow:0 0 6px rgba(255, 123, 0,0.8);
}

.content #part > .images > a .thumbnail{
    height: 90px;
    background-size: cover;
    background-position: center;
    border: 2px solid #006991;
    cursor: pointer;
}

.lightbox {
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

.content > .note {
    background: #006991;
    color: #fff;
    padding: 20px;
    margin: 0 10px;
}

.content  > .note span {
    font-weight: bold;
    font-size: 18px;
    text-decoration: underline;
}

.content > .note p {
    text-align: justify;
    margin-top: 5px;
    text-indent: 1em;
    line-height: 1.4em;
    margin-bottom: 0;
}

.span {
    grid-column: 1 / -1;
}


/* END OF PREVIEW PAGE*/









option small {
    color: gray;
}

/* CUSTOM SELECT */

/*the container must be positioned relative:*/
.custom-select {
  width: 280px;
  position: relative;
  font-family: Arial;
}
.custom-select select {
  display: none; /*hide original SELECT element:*/
}
.select-selected {
  background-color: #2192ff;
}
/*style the arrow inside the select element:*/
.select-selected:after {
  position: absolute;
  content: "";
  top: 14px;
  right: 10px;
  width: 0;
  height: 0;
  border: 6px solid transparent;
  border-color: #fff transparent transparent transparent;
}
/*point the arrow upwards when the select box is open (active):*/
.select-selected.select-arrow-active:after {
  border-color: transparent transparent #fff transparent;
  top: 7px;
}
/*style the items (options), including the selected item:*/
.select-items div,.select-selected {
  color: #ffffff;
  padding: 8px 16px;
  border: 1px solid transparent;
  border-color: transparent transparent rgba(0, 0, 0, 0.1) transparent;
  cursor: pointer;
}
/*style items (options):*/
.select-items {
  position: absolute;
  background-color: #2192ff;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 99;
}
/*hide the items when the select box is closed:*/
.select-hide {
  display: none;
}
.select-items div:hover, .same-as-selected {
  background-color: rgba(0, 0, 0, 0.4);
}


/* END CUSTOM SELECT*/


/* BOOTSTRAP NOTIFY*/

.fade.in {
    opacity: 1;
}
.alert-error {
    color: #bc1919;
    background-color: #f0d8d8;
    border-color: #e9c6c6;
}
.alert {
    padding: 20px 30px 15px 15px;
    margin-bottom: 20px;
    border: 1px solid transparent;
    border-radius: 4px;
}
.fade {
    opacity: 0;
    -webkit-transition: opacity .15s linear;
    -o-transition: opacity .15s linear;
    transition: opacity .15s linear;
}
.alert .close {
    float: right;
    font-size: 21px;
    font-weight: 700;
    line-height: 1;
    color: #000;
    text-shadow: 0 1px 0 #fff;
    filter: alpha(opacity=20);
    opacity: .2;
    padding: 0;
    background: top;
    border: none;
    cursor: pointer;
}
.alert a {
    color: #337ab7;
    text-decoration: none;
}
.alert a {
    background-color: transparent;
}

/* END BOOTSTRAP NOTIFY*/


.msg {
    color: black;
    padding: 5px;
    box-shadow: 2px 1px 8px -3px white;
    border: 1px solid #0006;
}

.msg.msg-error {
    background-color: orangered;
}

.msg.msg-success{
    background-color: lightgreen;
}



@media(max-width:1000px) {
    #content > section > #part {
        grid-template-columns: 1fr;
    }
}


@media (max-width:800px) {
    .parts > a > .part {
        display: grid;
        grid-template-columns: 200px 1fr;
    }
}

@media(max-width:660px) {

    #content > section > #part > .data > .table {
        grid-template-columns: 1fr;
        width: 100%;
        min-width: unset;
        padding: 0 20px;
    }
    #content > section > #part > .data > .table > div:nth-child(odd) {
        border: none;
    }

    #content > section > #part > .data > .buttons > :nth-child(1)  {
        margin-right: 50px;
    }
}

@media (max-width:640px) {
    nav .menu-button {
        display:inline-block;
    }

    nav > .filter-button {
        display:block;
        float:right;
    }

    nav > ul {
        padding:0;
        margin:0;
        display: none;
        flex-direction: column;
        justify-content: space-around;
        list-style: none;
        padding-top:10px;
    }

    nav > ul > li {
        margin:5px 0;
    }

    .parts{
        padding: 0;
    }

    .parts > a > .part {
        display: grid;
        grid-template-columns: 1fr;
    }
      
    .parts > a > .part > .img {
        background-size: contain;
        background-repeat: no-repeat;
    }

    .parts > a > .part > .text {
        padding: 0;
    }
    .parts > a > .part > .text h3{
        text-align: center;
        padding-bottom: 5px;
        border-bottom: 1px solid #fff;
    }

    /* End of index page */

    /* Start of add part page */

    .content > #add-part > .description {
        grid-column: 1 / -1;
    }
}

@media (max-width:480px) {
    .parts .pagination-inner-mobile {
        display: inline;
    }
    
    .parts .parts__pagination {
        justify-self: center;
    }
    
    .parts .parts__pagination a {
        padding: 8px 14px;
    }
    .pagination-inner {
        display: none;
    }
}


@media(max-width:432px) {
   #container {
        padding:0 10px;
    }
    #content {
        padding: 15px 5px;
        grid-template-columns: 1fr;
    }

    #content > aside {
        order:1;
    }
    
    .content #part {
        margin: 0;
    }
}