:root {
    /* --text: #42372D;
    --title: #5D4D3E;
    --orange: #F78A00;
    --background: #FBFAF9;
    --control: #F4F1EF;
    --control-bck: #EFE9E4; */

    --text: #242526;
    --title: #242526;
    --orange: #0C4D83;
    --background: #F2F2F2;
    --control: #F2F2F2;
    --control-bck: #F2F2F2;
}

*::-webkit-scrollbar {
    width: 6px !important;
    margin-right: 4px;
}
  
*::-webkit-scrollbar-track {
    background: none;
}
  
*::-webkit-scrollbar-thumb {
    background: #42372D00 !important;
    border-radius: 12px !important;
    transition: all 1.4s cubic-bezier(0.075, 0.82, 0.165, 1);
}

*:hover::-webkit-scrollbar-thumb {
    background: #42372D !important;
}

h2{
    color: var(--title);
}

.orange{
    color: var(--orange) !important;
}

.thin{
    font-weight: normal;
}

.gray{
    color: #A19B96 !important;
}

.margin-t-16{
    margin-top: 16px !important;
}

.flex-v{
    display: flex;
    flex-direction: column;
}

.flex-h{
    display: flex;
    gap: 16px;
}

.flex-1{
    flex: 1;
}

body{
    margin: 0 auto;
    overflow-x: hidden;
}

.loader{
    background: url('../loading.gif');
    background-size: contain;
    width: 200px;
    height: 200px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    opacity: 0.5;
}

.width-100{
    width: 100%;
}

.width-50{
    width: 50%;
}

.tel a {
    text-decoration: none;
    font-size: 20px;
    color: #A90000;
    font-weight: 600;
}

.tel a:hover {
    opacity: 0.8;
}

.tel a:before {
    content: '';
    width: 12px;
    height: 12px;
    position: absolute;
    margin-left: -18px;
    -webkit-transform: translateY(50%);
    transform: translateY(50%);
    background: url(../phone.png) no-repeat center center;
    background-size: contain;
}

#app{
    width: 100vw;
    height: 100vh;
    overflow-y: hidden;
    display: flex;
    font-family: 'Proxima Nova' !important;
}

.row{
    display: flex;
}

.button{
    background: var(--orange);
    color: white;
    padding: 8px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 20px;
}

.input{
    display: flex;
    background: var(--control);
    border-radius: 8px;
}

.columns-32{
    display: flex;
    gap: 32px;
    align-items: baseline;
}

.input input{
    font-size: 20px;
    padding: 12px;
    background: none;
    border: none;
    color: var(--text);
    width: 100%;
    font-family: 'Proxima Nova';
}

.input textarea{
    font-size: 20px;
    padding: 12px;
    background: none;
    border: none;
    color: var(--text);
    font-family: 'Proxima Nova';
    width: 100%;
    resize: none;
}

.button.shadow{
    background: var(--control);
    color: var(--title);
}

.items-container {
    flex: 2.5;
}

.items-wrapper{
    background: none;
    overflow-y: scroll;
    flex: 2.5;
    padding: 8px 4vw;
    position: relative;
    height: calc(100vh - 162px);
    /* box-shadow: -4px 0px 16px rgb(0 0 0 / 5%) inset; */
}

.header-panel{
    display: flex;
    flex-direction: column;
    /* align-items: end; */
    justify-content: space-between;
    background: #FBFAF9;
    top: 0;
    z-index: 2;
}

.info-row{
    display: flex;
    background: #F2F2F2;
    padding: 8px 4em;
    justify-content: space-between;
}

.logo-row{
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 4em 8px 4em;
    background-color: white;
    border-bottom: 1px #F1F1F1 solid;
}

.logo-row .logo{
    display: flex;
    align-items: center;
}

.logo-row .logo_title{
    color: #23417A;
    cursor: pointer;
}

.logo-row .logo_title .red{
    color: #A90000;
}

.logo-row .logo-wrapper h3{
    letter-spacing: 0.04em;
    text-transform: uppercase;
    font-size: 13.5px;
    font-weight: normal;
    margin-top: -2px;
}

.logo-row img{
    margin-right: 8px;
    height: 48px;
    cursor: pointer;
}

.logo-wrapper{
    /* margin-bottom: 6px; */
}

.header-panel h1{
    margin: 0;
}

.breads{
    font-size: 16px;
    margin: 0;
    padding: 8px 4em;
}

.breads span{
    opacity: 0.5;
    cursor: default;
}

.breads .hoverable:hover{
    opacity: 1;
    cursor: pointer;
}

.date-picker{
    display: flex;
    background: var(--control);
    padding: 18px 12px;
    border-radius: 8px;
    height: max-content;
    width: max-content;
    cursor: pointer;
    gap: 8px;
    transition: all .4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.date-picker:hover{
    transform: scale(1.05);
}

.date-picker .icon{
    width: 18px;
    margin-top: 2px;
}

.date-picker input{
    background: none;
    border: none;
    font-family: "Proxima Nova";
    font-weight: 600;
    font-size: 20px;
    color: var(--text);
    text-align: left;
    width: 140px;
    cursor: pointer;
}

.date-picker input:focus-visible {
    outline: none !important;
}

.date-picker:focus-within{
    box-shadow: 0px 0px 0px 2px var(--orange);
    transform: scale(1.05);
}

.wrapper{
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 1fr 1fr 1fr 1fr;
    transition: all .4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.card-wrapper{
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.product{
    background: white;
    border-radius: 8px;
    padding: 16px;
    box-shadow: 0px 2px 16px rgb(0 0 0 / 15%);
    border: 2px solid white;
    position: relative;
    cursor: pointer;
    height: calc(100% - 32px);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.product .image{
    width: 200px;
    height: 200px;
    margin: 0 auto;
    margin-bottom: 16px;
}

.product .image.loading{
    background: linear-gradient(90deg, #ececec 0%, #f6f6f6 50%, #ececec 100%);
    background-size: 200% 100%;
    animation: loading 0.8s cubic-bezier(0.25, 1, 0.5, 1) infinite;
    border-radius: 100%;
}

.product .title{
    font-weight: 600;
    font-size: 20px;
    line-height: 1.2em;
    margin-bottom: 4px;
    display: flex;
    align-items: flex-end;
    color: var(--title);
    transition: all 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}

.product:hover .title{
    transform: translateY(-18px);
}

.cat:hover .title{
    transform: translateY(-8px);
}

.product .price-row{
    display: flex;
    align-items: baseline;
    gap: 8px;
    transition: all 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}

.product:hover .price-row{
    opacity: 0;
}

.product .price-row .price{
    font-weight: 600;
    font-size: 20px;
    line-height: 24px;
    color: var(--orange);
}

.product .price-row .old-price{
    font-weight: 600;
    font-size: 16px;
    text-decoration-line: line-through;
    color: rgba(93, 77, 62, 0.5);
}

.product .panel-row{
    display: flex;
    align-items: baseline;
    gap: 8px;
    position: absolute;
    bottom: 16px;
    background: white;
    opacity: 0;
    transition: all 0.8s cubic-bezier(0.25, 1, 0.5, 1);
    width: calc(100% - 32px);
}

.product:hover .panel-row{
    opacity: 1;
}

.product .counter{
    display: flex;
    width: 100%;
}

.product .counter .number{
    flex: 0.25;
    font-size: 20px;
    color: var(--text) !important;
    text-align: center;
    border-top: 2px solid var(--orange);
    border-bottom: 2px solid var(--orange); 
    font-weight: bold;
    padding-top: 6px;
}

.product .counter .button{
    width: 16px;
    padding-left: 16px;
}

.product .counter .button:first-child{
    border-radius: 8px 0 0 8px;
}

.product .counter .button:last-child{
    border-radius: 0 8px 8px 0;
}

.product.selected{
    border: 2px solid var(--orange);
}

.product.notAvaliable img{
    opacity: 0.2;
}

.product.notAvaliable .title{
    opacity: 0.2;
}

.product.notAvaliable .price{
    color: #CA7508;
}


/* --- Back-category --- */

.product.back-card{
    background: var(--control-bck);
    border: none;
    box-shadow: none;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 32px;
}

.product.back-card .title{
    font-size: 24px;
    text-align: center;
    color: var(--text);
    opacity: 0.5;
}

.product.back-card .icon{
    width: 80px;
    height: 80px;
}

/* --- product-page --- */

.product-page{
    position: absolute;
    top: 0;
    left: 0;
    display: grid;
    grid-auto-rows: 1fr 96px;
    border-radius: 16px;
    box-shadow: 0px 4px 16px rgb(0 0 0 / 5%);
    z-index: 2;
    width: -webkit-fill-available;
    height: calc(100vh - 5vw - 74px);
    overflow: hidden;
    /* margin: 2vw 4vw; */
    margin-top: 0;
}

.product-page-wrapper{
    display: grid;
    grid-auto-flow: column;
    grid-template-columns: 1.5fr 2fr;
    overflow-y: scroll;
    background: white;
}

.product-page-wrapper img{
    width: 100%;
}

.product-page-wrapper .description{
    padding: 32px;
}

.product-page-wrapper .specs .row{
    display: grid;
    grid-template-columns: 1fr 1fr;
    padding: 16px 0;
}

.product-page-wrapper .specs .row:nth-child("even"){
    background: aliceblue;
}

.product-page-wrapper h1{
    color: var(--title);
}

.product-page-wrapper p{
    color: var(--text);
    white-space: break-spaces !important;
}

.product-page-panel{
    display: flex;
    width: calc(100% - 48px);
    justify-content: flex-end;
    box-shadow: 0px -4px 16px rgb(0 0 0 / 15%);
    border-radius: 0px 0px 16px 16px;
    gap: 12px;
    padding: 18px 24px;
    background: white;
}

.product-page-panel .button{
    font-size: 24px;
    display: flex;
    align-items: center;
    padding: 8px 24px;
    width: max-content;
}

.product-page-panel .counter{
    display: flex;
    flex-direction: row;
    height: 100%;
}

.product-page-panel .counter .number{
    flex: 0.25;
    font-size: 20px;
    color: var(--text) !important;
    text-align: center;
    border-top: 2px solid var(--orange);
    border-bottom: 2px solid var(--orange); 
    font-weight: bold;
    padding-top: 6px;
    display: flex;
    padding: 0 32px;
    align-items: center;
}

.product-page-panel .counter .button{
    width: 16px;
    padding-left: 16px;
}

.product-page-panel .counter .button:first-child{
    border-radius: 8px 0 0 8px;
}

.product-page-panel .counter .button:last-child{
    border-radius: 0 8px 8px 0;
}

.popup .product-page-panel{
    display: flex;
    width: 100% !important;
    box-shadow: none !important;
}

/* --- CART --- */

.cart{
    flex: 1;
    padding: 0 36px;
    box-shadow: -4px 0px 16px rgba(0, 0, 0, 0.05);
    overflow-x: hidden;
    height: 100%;
}

.cart h1{
    color: var(--title);
    margin-top: 64px;    
}

.cart-wrapper{
    display: flex;
    flex-direction: column;
    height: 100%;
}

.cart-wrapper .list{
    flex: 1;
    overflow: hidden scroll;
    margin: 0 -32px;
    padding: 0 32px;
}

.cart-element{
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: var(--text);
    border-bottom: 1px solid #E7E6E5;
    padding: 16px;
    margin: 0 -24px;

    animation: fadeInLeft .6s cubic-bezier(0.075, 0.82, 0.165, 1) forwards;
}

.cart-element img{
    width: 64px;
    height: 64px;
}

.cart-element .image{
    width: 64px;
    height: 64px;
    background: whitesmoke;
    border-radius: 100%;
    margin: 0 auto;
    position: relative;
}

.cart-element:hover .icon{
    opacity: 1;
}

.cart-element:hover .image{
    background: none;
}

.cart-element:hover img{
    opacity: 0.25;
}

.cart-element .icon{
    position: absolute;
    width: 50%;
    height: 50%;
    top: 16px;
    left: 16px;
    opacity: 0;
    transition: all .4s cubic-bezier(0.075, 0.82, 0.165, 1);
    cursor: pointer;
}

.cart-element .title{
    flex: 1;
    margin: 0 16px;
    word-break: break-all;
    font-weight: 600;
}

.cart-element .title .unavaliable{
    color: var(--orange);
}

.cart-element .count{
    margin: 0 32px;
    font-weight: 600;
}

.cart-element.notAvaliable{
    opacity: 0.5 !important;
}

.cart-header{
    color: var(--orange);
    font-weight: 600;
    display: flex;
    margin: 0 -8px;
}

.cart-header .title{
    flex: 1;
}

.cart-header .count{
    padding: 0 16px;
}

.cart-wrapper .gray{
    width: 70%;
}

.cart-wrapper .button{
    background: var(--orange);
    color: white;
    padding: 12px 18px 8px 18px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 20px;
}

.menu{
    display: flex;
    align-items: center;
    gap: 24px;
}

.menu a{
    font-weight: 600;
    font-size: 18px;
    color: var(--title);
    opacity: 0.5;
    cursor: pointer;
}

.menu a:hover{
    opacity: 1;
}

/** counts **/

.counts{
    /* box-shadow: 6px -4px 32px rgb(0 0 0 / 10%); */
    border-top: 1px #F1F1F1 solid;
    margin: 0 -36px;
    padding: 24px 28px;
}

.counts .row{
    display: flex;
    justify-content: space-between;
    font-weight: 600;
    font-size: 16px;
    line-height: 24px;
    margin: 8px 0;
}

/** form **/

#telNo:invalid+span:after {
    position: absolute; content: '✖';
    padding-left: 5px;
    color: #8b0000;
}
  
#telNo:valid+span:after {
    position: absolute;
    content: '✓';
    padding-left: 5px;
    color: #009000;
}

/** finish **/

.backdrop{
    position: fixed;
    width: 100vw;
    height: 100vh;
    z-index: 3;
    background: #00000066 !important;
    color: var(--text);
    top: 0;
    left: 0;
}

.backdrop .page{
    background: white;
    padding: 16px 16px 0 16px !important;
    border-radius: 8px;
    width: 80%;
    margin: 16px auto;
    height: calc(100% - 64px);
    overflow: hidden;
}

.popup{
    padding: 16px 64px !important;
}

.backdrop .page .code{
    background: var(--control);
    padding: 8px 16px;
    margin: 0 6px;
    border-radius: 8px;
    color: var(--text);
    font-weight: bold;
}

/* lightpick */

.lightpick__day.is-start-date.is-in-range, .lightpick__day.is-end-date.is-in-range.is-flipped, .lightpick__day.is-end-date.is-in-range, .lightpick__day.is-start-date.is-in-range.is-flipped {
    background-color: #f78a00 !important;
}

.lightpick__day.is-in-range {
    background-color: rgb(247 138 0 / 42%) !important;
}

.lightpick__day {
    font-size: 16px !important;
    font-family: 'Proxima Nova' !important;
}

.lightpick__day-of-the-week {
    font-size: 15px !important;
    font-family: 'Proxima Nova' !important;
}

.lightpick__month-title > .lightpick__select-months {
    font-family: 'Proxima Nova' !important;
}

.lightpick__day.is-in-range:hover {
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ccircle fill='rgb(247 138 0 / 42%)' cx='16' cy='16' r='16'/%3E%3C/svg%3E") !important;
}

.lightpick__day.is-start-date, .lightpick__day.is-end-date, .lightpick__day.is-start-date:hover, .lightpick__day.is-end-date:hover, .lightpick__day.is-start-date.is-end-date, {
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Ccircle fill='#f78a00' cx='16' cy='16' r='16'/%3E%3C/svg%3E") !important;
}

.lightpick__month-title > .lightpick__select-months {
    font-family: 'Proxima Nova' !important;
}
/* icons */

.icon{
    background-size: contain;
    background-repeat: no-repeat;
}

.icon.date{
    background-image: url('../assets/date.svg');
}

.icon.back{
    background-image: url('../assets/back-arrow.svg');
}

.icon.times{
    background-image: url('../assets/times.svg');
}

.testPreCart{
    display: none;
}

.show{
    display: block !important;
}

/** ANIMATIONS **/

@keyframes fadeInLeft{
    0%{
        opacity: 0;
        transform: translateX(-100%);
    }
    100%{
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes loading{
    0%{
        background-position-x: 0%;
    }
    100%{
        background-position-x: 200%;
    }
}

/** MEDIA **/

/* Small devices (landscape phones, 576px and up)*/
/* @media (max-width: 575.98px) { 
    .cart{
        display: none !important;
    }

    .card-wrapper{
        grid-template-columns: repeat(3, 29vw) !important;
    }

    .product .title{
        font-size: 16px !important;
    }

    .items-wrapper{
        box-shadow: none;
    }
} */

/* Medium devices (tablets, 768px and up)*/
/* @media (max-width: 767.98px) { } */

/* Large devices (desktops, 992px and up)*/
/* @media (max-width: 991.98px) { 

    .product .image{
        width: 15vw;
        height: 15vw;
    }
 
} */

/* Extra large devices (large desktops, 1200px and up)*/
/* @media (max-width: 1199.98px) { 

    .card-wrapper{
        grid-template-columns: repeat(3, 20vw);
    }

 }

@media (max-width: 1499.98px) { 

    .items-wrapper {
        padding: 2vw;
    }

    .card-wrapper{
        grid-template-columns: repeat(3, 20vw);
    }

} */


@media only screen and (max-width: 1599px) {

    .card-wrapper {
        grid-template-columns: repeat(3, 1fr);
        gap: 16px;
    }

    .items-wrapper {
        flex: 2;
    }

}

@media only screen and (max-width: 1199px) {

    .card-wrapper {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }

    .items-wrapper {
        flex: 0.75;
    }

}

@media only screen and (max-width: 1023px) {
    body {
        min-height: 100vh;
        min-height: -webkit-fill-available;
      }
      html {
        height: -webkit-fill-available;
      }
    #app {
        width: 100vw;
        height: -webkit-fill-available;
    }

    .backdrop .page {
        border-radius: 0px;
        height: 100%;
        width: 100%;
        margin: 0;
        overflow: scroll;
    }

    .address, .breads{
        display:none;
    }

    .tel a {
        font-size: 32px;
    }
    
    .tel a:before {
        width: 28px;
        height: 28px;
        margin-left: -32px;
        -webkit-transform: translateY(25%);
        transform: translateY(25%);
        background: url(../phone.png) no-repeat center center;
        background-size: contain;
    }

    .testPreCart{
        /* position: absolute; */
        width: 100%;
        bottom: 0;
        display: block;
        width: calc(100% - 4em);
        padding: 2em 2em;
        font-size: 32px;
        border-top: 2px #F1F1F1 solid;
        background-color: white;
        z-index: 1;

        will-change:transform;
        transform: translateZ(0);
    }

    .card-wrapper {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
        margin: 16px 0;
    }

    .product{
        border-width: 4px;
    }

    .product.product.selected{
        box-shadow: 0px 2px 32px rgb(12 77 131 / 24%);
        border-width: 4px;
    }

    .product .image {
        width: 350px;
        height: 350px;
        margin: 50px 0px 50px 25px;
    }
    
    .product .title, .product.product.back-card .title{
        font-size: 32px;
    }

    .product.product.back-card .icon{
        width: 160px;
        height: 160px;
    }

    .product .panel-row{
        display: none;
    }

    .product .price-row{
        transition: none;
    }

    .product .price-row .price{
        font-size: 32px;
        margin: 12px 0;
    } 

    .product-page-wrapper {
        grid-auto-flow: row;
        grid-template-columns: none;
    }

    .product-page-panel {
        height: max-content;
    }

    .product-page-panel .button {
        font-size: 36px;
        padding: 0.75em 1.25em;
    }

    .cart{
        position: absolute;
        z-index: 3;
        background: white;
        display:none;
        width: 100%;
        font-size: 32px;
    }

    .counts .row {
        font-size: 34px;
        line-height: 48px;
    }

    .input input {
        font-size: 48px;
    }

    .cart-wrapper .button {
        padding: 24px 24px 8px 24px;
        font-size: 46px;
    }

    .items-container{
        display: grid;
        height: -webkit-fill-avaliable;
        grid-auto-rows: 140px 1fr 140px;
    }

    .items-wrapper {
        /* height: 100%; */
    }

    .product-page {
        border-radius: 0;
        grid-auto-rows: 1fr max-content;
        height: 100%;
    }

  }

  /*https://qna.habr.com/q/440692*/