/* cart-sidebar */
.cart-sidebar {
    position: fixed;
    top: 0;
    right: -420px;
    width: 420px;
    height: 100%;
    background: #fff;
    box-shadow: 0px 5px 10px rgba(13,13,13, 0.05);
    transition: right 0.5s ease;
    z-index: 1000;
    display: flex;
    flex-direction: column;
}

.cart-sidebar.active {
    right: 0;
}

.cart-sidebar .cart-header {
    font-family: "Noto Serif TC", serif;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background: #fff;
    color: #000;
    border-bottom: 1px solid #ddd;
}

.cart-sidebar .cart-header p {
    font-size: 28px;
    font-weight: 700;
    margin: 0px;
    padding: 0px;
    flex-grow: 1;
}

.cart-sidebar .cart-header .close-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
}

.cart-sidebar .close-btn img {
    width: 20px;
    height: 20px;
}

.cart-sidebar .cart-items {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

.cart-sidebar .cart-items .content {
    font-family: "Noto Serif TC", serif;
    font-size: 20px;
    margin-top: 20px;
    color: #4f4f4f;
    text-align: center;
}

.cart-sidebar .cart-items .content a {
    color: #2f2f2f;
    font-size: 18px;
    font-weight: 700;
    text-decoration: none;
    border-bottom: 1px solid #2f2f2f;
}

.cart-sidebar .cart-items .content a:hover {
    border-bottom: 1px solid #1f1f1f;
    color: #1f1f1f;
}

.cart-sidebar .cart-item {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
    border-bottom: 1px solid #f0f0f0;
    padding-bottom: 10px;
}

.cart-sidebar .cart-item:last-child {
    border-bottom: none;
    padding-bottom: 0px;
}

.cart-sidebar .cart-item img {
    width: 90px;
    height: 90px;
    object-fit: cover;
    margin-right: 15px;
    border-radius: 5px;
    border: none;
}

.cart-item .item-info {
    flex-grow: 1;
    margin-right: 10px;
    max-width: 220px;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.cart-sidebar .item-info p {
    font-family: "Noto Serif TC", serif;
    font-weight: 700;
    margin: 0;
    font-size: 18px;
    color: #000;
}

.cart-sidebar .item-info span {
    font-family: "Noto Serif TC", serif;
    margin: 0;
    font-size: 16px;
    color: #4f4f4f;
}

.cart-sidebar .item-info p {
    font-family: "Noto Serif TC", serif;
    margin: 0;
    font-size: 16px;
    color: #4f4f4f;
}

.cart-sidebar .remove-item {
    font-family: "Noto Serif TC", serif;
    background: none;
    border: none;
    color: #2f2f2f;
    cursor: pointer;
    font-size: 16px;
}

.cart-sidebar .cart-footer {
    padding: 20px;
    background: #fff;
    border-top: 1px solid #ddd;
    text-align: center;
}

.cart-sidebar .cart-footer .total-price {
    font-family: "Noto Serif TC", serif;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 20px;
}

.cart-sidebar .cart-footer .total-price .total-label {
    font-family: "Noto Serif TC", serif;
}

.cart-sidebar .checkout-btn {
    font-family: "Noto Serif TC", serif;
    font-size: 18px;
    background: #2f2f2f;
    width: 100%;
    color: #fff;
    border: none;
    margin-top: 10px;
    padding: 10px 20px;
    cursor: pointer;
}

.cart-sidebar .checkout-btn:hover {
    background: #000;
}

.cart-sidebar .cart-btn {
    font-family: "Noto Serif TC", serif;
    font-size: 18px;
    background: #4f4f4f;
    width: 100%;
    color: #fff;
    border: none;
    padding: 10px 20px;
    cursor: pointer;
}

.cart-sidebar .cart-btn:hover {
    background: #2f2f2f;
}

@media (max-width: 400px) {
    .cart-sidebar {
        right: -370px;
        width: 370px;
    }
    
    .cart-sidebar .cart-header {
        padding: 15px;
    }
    
    .cart-sidebar .cart-header p {
        font-size: 20px;
    }
    
    .cart-sidebar .cart-header .close-btn {
        padding: 5px;
    }
    
    .cart-sidebar .close-btn img {
        width: 20px;
        height: 20px;
    }
    
    .cart-sidebar .cart-items {
        padding: 15px;
    }
    
    .cart-sidebar .cart-item {
        margin-bottom: 10px;
        padding-bottom: 10px;
    }
    
    .cart-sidebar .cart-item img {
        width: 60px;
        height: 60px;
        margin-right: 10px;
    }
    
    .cart-sidebar .item-info p {
        font-size: 16px;
    }
    
    .cart-sidebar .item-info span {
        margin: 0px 0px 0px 0px;
        font-size: 14px;
    }
    
    .cart-sidebar .item-info p {
        margin: 0px 0px 0px 0px;
        font-size: 12px;
    }
    
    .cart-sidebar .remove-item {
        font-size: 12px;
    }
    
    .cart-sidebar .cart-footer {
        padding: 15px;
    }
    
    .cart-sidebar .cart-footer .total-price {
        font-size: 18px;
        margin-bottom: 10px;
    }
    
    .cart-sidebar .checkout-btn {
        font-size: 16px;
        margin-top: 5px;
        padding: 5px 10px;
    }
    
    .cart-sidebar .cart-btn {
        font-size: 16px;
        padding: 5px 10px;
    }
}

/* cart-area */
.cart {
    font-family: "Noto Serif TC", serif;
    margin: 0 auto;
    padding: 40px 0px 40px 0px;
    max-width: 1200px;
    min-height: 760px;
    display: flex;
}

.cart .process {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    margin: 20px 0 40px 0;
}

.cart .process .number1 {
    padding: 10px 20px;
    color: #fff;
    background-color: #2f2f2f;
    border-radius: 50%;
    font-size: 18px;
    font-weight: 500;
}

.cart .process .number2 {
    padding: 10px 20px;
    color: #2f2f2f;
    font-size: 18px;
    font-weight: 500;
    background-color: #eee;
    border-radius: 50%;
}

.cart .process .text {
    margin-left: 10px;
    font-size: 20px;
    font-weight: 500;
    color: #2f2f2f;
}

.cart .cart-container {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.cart .cart-items {
    background: #fff;
    width: 100%;
    border-top: 1px solid #ddd;
    border-bottom: 1px solid #ddd;
}

.cart .empty-cart {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 160px;
}

.cart .empty-cart span {
    font-size: 18px;
    color: #2f2f2f;
    text-align: center;
}

.cart .cart-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid #eee;
    width: 100%;
    min-height: 160px;
}

.cart .cart-item:last-child {
    border-bottom: none;
    padding-bottom: 0px;
}

.cart .cart-remove {
    text-align: center;
}

.cart .cart-remove .remove-item img {
    width: 20px;
    cursor: pointer;
}

.cart .cart-image {
    border-radius: 5px;
}

.cart .cart-image img {
    width: 80px;
    height: auto;
    border-radius: 5px;
}

.cart .cart-detail {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    width: 700px;
}

.cart .cart-details {
    text-align: center;
    padding: 10px;
}

.cart .cart-details span {
    margin: 0;
    font-size: 18px;
    color: #333;
}

.cart .cart-price {
    text-align: center;
    width: 110px;
    color: #4f4f4f;
}

.cart .quantity-control {
    display: flex;
    align-items: center;
    justify-content: center;
}

.cart .quantity-control button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 35px;
    height: 35px;
    background-color: #fff;
    color: #2f2f2f;
    border: 1px solid #ddd;
    border-radius: 5px;
    cursor: pointer;
    margin: 0 5px;
}

.cart .quantity-control button img {
    width: 10px;
    height: auto;
}

.cart .quantity-control input {
    width: 50px;
    height: 35px;
    text-align: center;
    border: 1px solid #ddd;
    border-radius: 5px;
    margin: 0 5px;
}

.cart .quantity-control input[type=number]::-webkit-outer-spin-button,
.cart .quantity-control input[type=number]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.cart .cart-total {
    width: 90px;
    text-align: center;
}

.cart .cart-total span {
    font-family: "Noto Serif TC", serif;
}

.cart .cart-footer {
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    background: #fff;
    width: 30%;
    height: auto;
}

.cart .cart-footer p {
    font-size: 24px;
    font-weight: 700;
    padding-bottom: 20px;
    margin: 0px;
}

.cart .total-price {
    font-size: 20px;
    font-weight: 700;
    color: #2f2f2f;
}

.cart .total-price .price {
    font-weight: 600;
}

.cart .summary {
    gap: 10px;
    color: #4f4f4f;
}

.cart .summary-row {
    display: flex;
    justify-content: space-between;
    margin: 10px 0;
}

.cart .summary-row span {
    font-size: 16px;
}

.cart .summary-row .price {
    font-family: "Noto Serif TC", serif;
}

.cart .summary-row:last-child {
    font-weight: bold;
    color: #2f2f2f;
    padding-bottom: 20px;
}

.cart .summary-row:last-child span {
    font-size: 18px;
}

.cart .cart-button {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    width: 100%;
}

.cart .cart-button .product-btn {
    text-decoration: none;
    text-align: center;
    background-color: #eee;
    color: #4f4f4f;
    border: none;
    padding: 10px 50px;
    cursor: pointer;
    font-size: 16px;
}

.cart .cart-button .checkout-btn {
    text-decoration: none;
    text-align: center;
    background-color: #4f4f4f;
    color: #fff;
    border: none;
    padding: 10px 50px;
    cursor: pointer;
    font-size: 16px;
    width: 350px;
}

.cart .cart-button .product-btn:hover {
    background-color: #ddd;
}

.cart .cart-button .checkout-btn:hover {
    background-color: #2f2f2f;
}

@media (max-width: 1400px) {
    .cart .cart-button .checkout-btn {
        width: 335px;
    }
}

@media (max-width: 1200px) {
    .cart .cart-detail {
        width: 600px;
    }
    
    .cart .cart-button .checkout-btn {
        width: 280px;
    }
}

@media (max-width: 1030px) {
    .cart .cart-container {
        grid-template-columns: 1fr;
        gap: 10px;
        margin-top: 20px;
    }
    
    .cart .empty-cart {
        height: 160px;
    }
    
    .cart .empty-cart span {
        font-size: 18px;
    }
    
    .cart .cart-item {
        width: 100%;
        flex-direction: row;
    }
    
    .cart .cart-remove .remove-item img {
        width: 15px;
    }
    
    .cart .cart-image img {
        width: 75px;
    }
    
    .cart .cart-detail {
        width: 400px;
    }
    
    .cart .cart-details {
        padding: 0px;
    }
    
    .cart .cart-details span {
        margin: 0px;
        font-size: 14px;
    }
    
    .cart .cart-price {
        font-size: 12px;
    }
    
    .cart .quantity-control button {
        width: 25px;
        height: 25px;
        margin: 0 2.5px;
    }
    
    .cart .quantity-control button img {
        width: 7px;
    }
    
    .cart .quantity-control input {
        width: 25px;
        height: 25px;
        font-size: 10px;
        margin: 0 2.5px;
    }
    
    .cart .cart-total {
        font-size: 12px;
        width: 70px;
    }
    
    .cart .cart-footer p {
        font-size: 18px;
        padding-bottom: 10px;
    }
    
    .cart .total-price {
        font-size: 20px;
    }
    
    .cart .total-price .price {
        margin-left: 20px;
    }
    
    .cart .summary {
        margin-bottom: 10px;
    }
    
    .cart .summary-row {
        display: flex;
        justify-content: space-between;
        margin: 5px 0;
    }
    
    .cart .summary-row span {
        font-size: 14px;
    }
    
    .cart .summary-row:last-child span {
        font-size: 16px;
    }
}

@media (max-width: 990px) {
    .cart .process .number1 {
        padding: 10px 18px;
        font-size: 16px;
    }
    
    .cart .process .number2 {
        padding: 10px 18px;
        font-size: 16px;
    }
    
    .cart .process .text {
        font-size: 18px;
    }
    
    .cart .cart-button .product-btn {
        font-size: 14px;
    }

    .cart .cart-button .checkout-btn {
        font-size: 14px;
        width: 210px;
    }
}

@media (max-width: 767px) {
    .cart .process .number1 {
        padding: 10px 16px;
        font-size: 14px;
    }
    
    .cart .process .number2 {
        padding: 10px 16px;
        font-size: 14px;
    }
    
    .cart .process .text {
        font-size: 16px;
    }
    
    .cart .cart-button .checkout-btn {
        width: 155px;
    }
}

@media (max-width: 485px) {
    .cart {
        margin: 0 auto;
        padding: 30px 0px 0px 0px;
        flex-wrap: wrap;
        overflow-x: hidden;
    }
    
    .cart .process {
        padding: 0px 10px;
    }
    
    .cart .process .number1 {
        padding: 8px 14px;
        font-size: 12px;
    }
    
    .cart .process .number2 {
        padding: 8px 14px;
        font-size: 12px;
    }
    
    .cart .process .text {
        font-size: 14px;
    }
    
    .cart form {
        padding: 20px 10px;
    }
    
    .cart .cart-container {
        margin-top: 0px;
    }
    
    .cart .cart-items {
        width: 100%;
        padding: 0;
    }
    
    .cart .empty-cart {
        height: 180px;
    }
    
    .cart .empty-cart span {
        font-size: 16px;
    }
    
    .cart .cart-item {
        flex-direction: row;
    }
    
    .cart .cart-image img {
        width: 100px;
    }
    
    .cart .cart-detail {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: space-between;
        gap: 2.5px;
        width: 100px;
    }
    
    .cart .cart-details {
        padding: 0px;
    }
    
    .cart .cart-details span {
        margin: 0px;
        font-size: 14px;
    }
    
    .cart .cart-price {
        font-size: 12px;
        width: auto;
    }
    
    .cart .quantity-control button {
        width: 25px;
        height: 25px;
        margin: 0 2.5px;
    }
    
    .cart .quantity-control button img {
        width: 7px;
    }
    
    .cart .quantity-control input {
        width: 25px;
        height: 25px;
        font-size: 10px;
        margin: 0 2.5px;
    }
    
    .cart .cart-total {
        font-size: 12px;
        width: 70px;
    }
    
    .cart .cart-footer {
        width: 100%;
        margin-top: 15px;
        padding: 0 10px;
    }
    
    .cart .total-price {
        font-size: 20px;
    }
    
    .cart .total-price .price {
        margin-left: 20px;
    }
    
    .cart .summary {
        margin-bottom: 0px;
    }
    
    .cart .summary-row {
        display: flex;
        justify-content: space-between;
        margin: 5px 0;
    }
    
    .cart .summary-row:last-child {
        padding-bottom: 15px;
    }
    
}
