body {
    background-image: url(pictures/cart2.jpg);
    background-repeat: no-repeat;
    background-attachment: fixed;
    background-size: 100%;
    background-position: left;
}
.main_nav_icon li:last-child a {
    border-bottom: solid 9px var(--color_greengray);
}
main {
    margin-left: 10%;
    margin-top: 5%;
}
section + h2 {
    margin-top: 3%;
}
.card {
    width: 50%;
    box-shadow: 0 0 10px #d9d9d9;
    backdrop-filter: blur(10px);
    border-radius: 10px;
}
h1,
h2 {
    padding: 0 20px;
    margin: 20px 0;
    /* text-align: center; */
    font-size: 1.6rem;
    border-left: solid 4px var(--color_yellow);
    font-weight: 700;
}
.card {
    background-color: rgba(255, 255, 255, 0.75);
    padding: 25px 20px;
    margin-top: 20px;
}
.cartcard tr th:first-child {
    width: 30%;
}
.cartcard tr th + th {
    width: 20%;
}
.card_body {
    margin: auto;
}
.cartcard .card_body ul {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
}
.cartcard li,
.itemname {
    margin: auto;
}
.oneItem {
    padding: 15px 0;
}

.iteminfo {
    display: flex;
    width: 50%;
}
.iteminfo .itempic {
    width: 30%;
}
.itempic img {
    object-fit: contain;
    width: 100%;
    height: 100%;
}
.itemtotal::before{
    content: 'NT$ '
}
.itemamout {
    height: 5rem;
    display: flex;
    justify-content: space-around;
    align-items: center;
    user-select: none;
}
.itemamout .num{
    background-color: transparent;
    width: 10px;
    border:none;
}
.itemamout span {
    margin: 0 50%;
    vertical-align: middle;
    font-size: 1rem;
    font-weight: 900;
    cursor: pointer;
}
.itemprice{
    display:none;
}

.itemamout span:hover,
td a:hover {
    color: var(--color_yellow);
}

.itemdel img {
    width: 50%;
    float: right;
}
.card_foot {
    display: flex;
    justify-content: space-between;
    margin-top: 20px;
}
.total,
.card_foot label {
    display: block;
    font-size: 1rem;
    line-height: 1.6;
}
.total,
.fee {
    width: 50%;
    margin: 20px;
}
.total ul li:last-child {
    font-size: 1.2em;
    line-height: 2;
}
.total li {
    display: flex;
    justify-content: space-between;
}
.infocard li + li input,
.paymentcard li + li + li input,
input[type="submit"] {
    background-color: inherit;
    border-radius: 5px;
    width: 80%;
    margin: 15px;
    padding: 10px;
    outline: none;
    border: none;
}
::placeholder {
    opacity: 0.6;
}
.infocard .card_body li:last-child input {
    width: 80%;
}
.infocard li label,
.paymentcard li label {
    margin: 15px 5px;
    display: block;
}
.paymentcard input[name="cardnumber"],
.paymentcard input[name="cardcvv"] {
    width: 15%;
    margin: 0;
}
.paymentcard input[name="carddate"] {
    width: 10%;
    margin: 0;
}
.paymentcard li + li + li input:first-of-type {
    margin-left: 15px;
}
.infocard p,
.paymentcard p {
    margin: 0 15px;
    padding: 10px;
}
.infocard li + li input:focus,
.paymentcard li + li + li input:focus {
    box-shadow: 2px 2px 2px rgba(212, 212, 212, 0.8);
}
input[type="submit"] {
    width: 15%;
    border: solid 0.5px var(--color_yellow);
    background-color: var(--color_yellow);
    color: white;
}
.cartcard input[type="submit"] {
    margin-top: 5%;
}
input[type="submit"]:hover {
    background-color: transparent;
    color: var(--color_yellow);
}
input[type="submit"]:active {
    box-shadow: inset 2px 2px 2px var(--color_yellow);
}

@media screen and (max-width: 1023px) {
    body {
        background-position: bottom;
        background-color: #e5eef3;
        background-attachment: fixed;
    }
    main {
        padding: 10% 5% 50% 5%;
        margin-left: 0;
    }
    .card {
        width: 90%;
        padding: 5%;
    }
    .infocard .card_foot input,
    .paymentcard .card_foot input {
        width: fit-content;
        height: 5vh;
    }
    .card_foot {
        flex-direction: column;
    }
    .fee {
        width: 90%;
    }
    .total {
        margin-left: 25px;
    }
    .iteminfo {
        width: 70%;
    }
    .iteminfo .itemname {
        width: 15%;
    }
    .itemname a {
        font-size: 1.2rem;
    }
    .itemtotal {
        width: 15%;
        font-size: 1.2rem;
        margin-left: 5%;
    }
    .itemamout {
        width: 10%;
        order: 1;
    }
    .itemdel {
        width: 10%;
    }
    .total {
        width: 100%;
    }
    .total ul {
        width: 40%;
    }
}
