*{
    box-sizing: border-box;
}

body{
    margin: 0;
    padding: 0;
    font-family: 'Open Sans', sans-serif;
    background-color: #efefef;
}

.header{
    background-color: #43281c;
    color: white;
    padding: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.header img{
    height: 50px;
    margin-top: 12px;
    margin-right: 15px;
}

/* GRID LAYOUT */
.page{
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-areas:
        "order name"
        "order cc"
        "total total";
    gap: 20px;
    padding: 30px;
}

.order-box,
.name-box,
.cc-box{
    background-color: #eee1d5;
    border-radius: 20px;
    box-shadow: 0 1px 3px rgb(0 0 0 / 0.2);
    padding: 20px;
}

.order-box{ grid-area: order; }
.name-box{  grid-area: name; }
.cc-box{    grid-area: cc; }

.total{
    grid-area: total;
    padding: 20px 0;
}
.total button{
    width: 100%;
    padding: 15px;
    background-color: #43281c;
    color: white;
    border: none;
    border-radius: 15px;
    font-size: 18px;
    cursor: pointer;
    margin-top: 50px;
}

.total button:hover{
    background-color: #5c3a28;
}
.order-box h2,
.name-box h2,
.cc-box h2{
    margin-top: 0;
    color: #6b4b34;
    font-weight: 700;
}
.input-group{
    display: block;
    width: 100%;
    position: relative;
    margin-bottom: 20px;
}
.user-input{
    background-color: transparent;
    border: 2px solid #885a2d ;
    padding: 12px 16px;
    border-radius: 100px;
    width: 100%;
    text-indent: 18px;
    padding: 10px;
    outline: none;
}
.user-input-label{
    position: absolute;
    top: -6px;
    left: 30px;
    background-color: #eee1d5;
    padding: 0 6px;
    font-size: 12px;
    color: #885a2d;
}
.user-input::placeholder{
    border-color: #885a2d;
    opacity: 0.7;
}
.items{
    list-style: none;
    margin: 0px;
    padding: 0px;
}
.items > li{
    display: grid;
    grid-template-columns: 13px 1fr auto;
    grid-template-areas:
        "quantity title price"
        ".        options price";
    align-items: center;
    column-gap: 12px;
    row-gap: 6px;
    padding: 18px 0;
    border-bottom: 2px solid #d7b08a;
    margin-bottom: 15px;
    color: #101010;
}

.item-quantity{
    grid-area: quantity;
}
.item-title{
    grid-area: title;
    font-weight: 700;
}
.item-price{
     grid-area: price;
     font-weight: 700;
     text-align: right;
     align-self: start; 
}
.item-option-list{
    grid-area: options;
    margin: 0;
    padding: 4px;
    list-style: none;         
    color: #6b4b34;          
    font-size: 0.9rem;
}
.items > li:last-child{
    border-bottom: none;
}
.item-option-list li{
    margin: 2px;
    padding: 2px;
}
.total{
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}
.totals-table{
    width: 100%;
    max-width: 500px;
    margin-bottom: 10px;
    margin-top: 20px;
}
.totals-table td:last-child {
  text-align: right;
}
.totals-table td{
    padding: 8px 20px;
    color: #101010;
    font-weight: 700;
    font-size: 1.2em;
}
.final-totals td{
    font-size: 1.5em;
    color: #85827e;
}

@media (max-width: 900px){
    .page{
        grid-template-columns: 1fr;
        grid-template-areas:
            "order"
            "name"
            "cc"
            "total";
        padding: 20px;
        gap: 16px;
    }
    .order-box,
    .name-box,
    .cc-box{
        margin: 0;    
    }

    .total {
        align-items: stretch;
    }
    .totals-table{
        margin-left: auto;
        margin-right: auto;
    }
}

@media (max-width: 600px){
    .header{
        flex-direction: column;
        text-align: center;
    }

    .header img{
        margin-top: 0;
        margin-bottom: 10px;
    }

    .page{
        padding: 15px;
        gap: 12px;
    }

    .order-box,
    .name-box,
    .cc-box{
        padding: 15px;
        border-radius: 14px;
    }

    .items > li{
        grid-template-columns: auto 1fr;
        grid-template-areas:
            "quantity title"
            ".        options"
            ".        price";
        row-gap: 4px;
    }

    .items-price{
        text-align: left;
        align-self: auto;
    }

    .totals-table{
        width: 100%;
        max-width: 100%;
    }
    .totals-table td{
        font-size: 1rem;
        padding: 6px 10px;
    }
    .final-totals td{
        font-size: 1.2rem;
    }
    .total button{
        font-size: 16px;
        padding: auto;
        margin-top: 24px;
    }
}