/* =========================================================
   CART PAGE
========================================================= */
.cart-page {
    width: 100%;
    max-width: 1220px;
    margin: 0 auto;
    padding: 16px 20px 40px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 24px;
    font-family: "Be Vietnam Pro", "Segoe UI", Arial, sans-serif;
    color: #4a4541;
}

/* =========================================================
   LEFT
========================================================= */
.cart-main {
    min-width: 0;
    background: #fff;
    border: 1px solid #f0ebe7;
    border-radius: 12px;
    overflow: hidden;
}

/* =========================================================
   HEADER
========================================================= */
.cart-header {
    height: 52px;
    padding: 0 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid #f1ece8;
}

/* CHECKBOX */
.cart-select-all,
.cart-check {
    display: flex;
    align-items: center;
    cursor: pointer;
}

.cart-select-all {
    gap: 9px;
}

.cart-select-all strong {
    font-size: 14px;
    font-weight: 500;
    color: #69635e;
}

/* Ẩn checkbox mặc định */
.cart-select-all input,
.cart-check input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

/* CUSTOM CHECKBOX */
.custom-checkbox {
    width: 16px;
    height: 16px;
    border: 1.5px solid #ded7d2;
    border-radius: 4px;
    background: #fff;
    position: relative;
    flex: 0 0 16px;
}

/* CHECKED */
.cart-select-all input:checked + .custom-checkbox,
.cart-check input:checked + .custom-checkbox {
    background: #e75d82;
    border-color: #e75d82;
}

.cart-select-all input:checked + .custom-checkbox::after,
.cart-check input:checked + .custom-checkbox::after {
    content: "✓";
    position: absolute;
    left: 3px;
    top: -1px;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
}

.cart-delete-selected {
    border: none;
    background: transparent;
    color: #8a837e;
    font-family: inherit;
    font-size: 13px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
}

.cart-delete-selected:hover {
    color: #e35d78;
}

/* =========================================================
   TABLE HEADER
========================================================= */
.cart-table-head {
    display: grid;
    grid-template-columns: 1fr 100px 100px 100px 40px;
    padding: 12px 18px 12px 48px;
    color: #827a74;
    font-size: 12px;
    font-weight: 500;
    border-bottom: 1px solid #f2eeeb;
}

.cart-table-head div:not(:first-child) {
    text-align: center;
}

/* =========================================================
   CART ITEM
========================================================= */
.cart-item {
    display: grid;
    grid-template-columns: 32px minmax(0, 1fr) 100px 100px 100px 40px;
    align-items: center;
    min-height: 120px;
    padding: 14px 18px;
    border-bottom: 1px solid #f1ece8;
}

/* CHECK */
.cart-check {
    justify-content: center;
}

/* =========================================================
   PRODUCT
========================================================= */
.cart-product {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
}

.cart-product-image {
    width: 78px;
    height: 78px;
    flex: 0 0 78px;
    border-radius: 8px;
    overflow: hidden;
    background: #f8f4f0;
}

.cart-product-image img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

.cart-product-info {
    min-width: 0;
}

.cart-product-info h3 {
    margin: 0 0 5px;
    color: #3e3935;
    font-size: 14px;
    line-height: 1.4;
    font-weight: 600;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.cart-product-info p {
    margin: 3px 0;
    color: #89827d;
    font-size: 12px;
    line-height: 1.45;
}

.cart-product-info p span {
    color: #5f5954;
}

/* =========================================================
   BADGE
========================================================= */
.cart-badge {
    display: inline-block;
    margin-bottom: 4px;
    padding: 3px 7px;
    border-radius: 5px;
    background: #f36c89;
    color: #fff;
    font-size: 10px;
    font-weight: 500;
    line-height: 1;
}

/* =========================================================
   PRICE
========================================================= */
.cart-price,
.cart-total {
    text-align: center;
    font-size: 14px;
    font-weight: 600;
}

.cart-price {
    color: #e64f70;
}

.cart-total {
    color: #e64f70;
}

/* =========================================================
   QUANTITY
========================================================= */
.cart-quantity {
    width: 72px;
    height: 30px;
    margin: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border: 1px solid #eee8e3;
    border-radius: 16px;
    overflow: hidden;
}

.cart-quantity button {
    width: 26px;
    height: 100%;
    border: none;
    background: #fff;
    color: #aaa29c;
    font-size: 14px;
    cursor: pointer;
}

.cart-quantity span {
    font-size: 13px;
    color: #5d5752;
    font-weight: 500;
}

/* =========================================================
   REMOVE
========================================================= */
.cart-remove {
    border: none;
    background: transparent;
    color: #e46a80;
    font-family: inherit;
    font-size: 11px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    cursor: pointer;
}

.cart-remove i {
    font-size: 14px;
}

/* =========================================================
   BENEFITS
========================================================= */
.cart-benefits {
    margin: 28px 0 0;
    padding: 18px 22px;
    background: #fff8f6;
    border-radius: 10px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
}

.cart-benefit {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 18px;
    border-right: 1px solid #f0ded9;
}

.cart-benefit:first-child {
    padding-left: 0;
}

.cart-benefit:last-child {
    border-right: none;
}

.benefit-icon {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #e76582;
    font-size: 16px;
    flex: 0 0 28px;
}

.cart-benefit strong {
    display: block;
    margin-bottom: 3px;
    color: #635c57;
    font-size: 13px;
    font-weight: 600;
}

.cart-benefit span {
    display: block;
    color: #958d87;
    font-size: 12px;
    line-height: 1.4;
}

/* =========================================================
   ORDER SUMMARY
========================================================= */
.cart-summary {
    align-self: start;
    padding: 20px;
    background: #fff8f6;
    border-radius: 12px;
    border: 1px solid #f5e9e5;
}

.cart-summary h2 {
    margin: 0 0 18px;
    color: #413c38;
    font-size: 16px;
    font-weight: 600;
}

/* =========================================================
   SUMMARY ROW
========================================================= */
.summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
    color: #6e6761;
    font-size: 13px;
}

.summary-row strong {
    color: #554f4b;
    font-size: 13px;
    font-weight: 500;
}

.summary-row small {
    color: #9b938d;
    font-size: 12px;
}

.summary-divider {
    height: 1px;
    margin: 6px 0 14px;
    background: #eee2de;
}

/* =========================================================
   TOTAL
========================================================= */
.summary-total {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.summary-total span {
    color: #504944;
    font-size: 14px;
    font-weight: 600;
}

.summary-total strong {
    color: #e95073;
    font-size: 18px;
    font-weight: 700;
}

/* =========================================================
   CHECKOUT
========================================================= */
.checkout-btn {
    width: 100%;
    height: 42px;
    border: none;
    border-radius: 10px;
    background: #df5d82;
    color: #fff;
    font-family: inherit;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: 0.2s ease;
}

.checkout-btn:hover {
    background: #d94f76;
}

/* =========================================================
   CONTINUE
========================================================= */
.continue-shopping {
    width: 100%;
    height: 38px;
    margin-top: 10px;
    box-sizing: border-box;
    border: 1px solid #edb9c1;
    border-radius: 9px;
    background: #fff;
    color: #df6078;
    text-decoration: none;
    font-size: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.continue-shopping:hover {
    background: #fff4f4;
}

/* =========================================================
   SHIPPING NOTE
========================================================= */
.shipping-note {
    margin: 14px 0;
    color: #938b85;
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* =========================================================
   MEMORY BOX
========================================================= */
.memory-box {
    margin-top: 16px;
    padding: 14px 14px;
    display: flex;
    gap: 12px;
    border-radius: 10px;
    background: #fff0ef;
}

.memory-box-icon {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #f9d7db;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #df5f78;
    font-size: 13px;
    flex: 0 0 28px;
}

.memory-box strong {
    display: block;
    margin-bottom: 5px;
    color: #645c57;
    font-size: 13px;
    font-weight: 600;
}

.memory-box p {
    margin: 0 0 6px;
    color: #948b85;
    font-size: 12px;
    line-height: 1.55;
}

.memory-box a {
    color: #df6078;
    font-size: 12px;
    text-decoration: none;
    font-weight: 500;
}

.memory-box a i {
    margin-left: 4px;
}

/* =========================================================
   SUMMARY FEATURES
========================================================= */
.summary-features {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid #eee1dd;
}

.summary-features > div {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    text-align: center;
}

.summary-features i {
    color: #e56682;
    font-size: 16px;
}

.summary-features span {
    color: #8c847f;
    font-size: 11px;
    line-height: 1.4;
}

/* =========================================================
   TABLET
========================================================= */
@media (max-width: 900px) {
    .cart-page {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .cart-summary {
        width: 100%;
        box-sizing: border-box;
    }
}

@media (max-width: 600px) {

    /* =====================================================
       CART PAGE
    ===================================================== */

    .cart-page {
        display: block;
        width: 100%;
        padding: 0 7px 25px;
        box-sizing: border-box;
    }


    /* =====================================================
       ẨN HEADER BẢNG
    ===================================================== */

    .cart-table-head {
        display: none !important;
    }


    /* =====================================================
       ẨN SELECT ALL HEADER
    ===================================================== */

    .cart-header {
        display: none !important;
    }


    /* =====================================================
       PRODUCT ITEM
    ===================================================== */

    .cart-item {

        position: relative;

        display: block;

        width: 100%;

        min-height: 140px;

        padding: 14px 12px 13px;

        box-sizing: border-box;

        background: #fff;

        border-bottom: 1px solid #eee8e4;
    }


    /* =====================================================
       CHECKBOX
       Đưa dấu tích lên góc phải
    ===================================================== */

    .cart-item > input[type="checkbox"],
    .cart-item > .cart-checkbox {

        position: absolute;

        top: 15px;
        right: 12px;
        left: auto;

        width: 14px;
        height: 14px;

        margin: 0;

        accent-color: #e85c7d;

        z-index: 5;
    }


    /* =====================================================
       PRODUCT AREA
    ===================================================== */

    .cart-product {

        display: flex;

        align-items: flex-start;

        gap: 11px;

        width: 100%;

        margin: 0;
    }


    /* =====================================================
       IMAGE
    ===================================================== */

    .cart-product-image {

        flex: 0 0 82px;

        width: 82px;
        height: 82px;

        border-radius: 8px;

        overflow: hidden;

        background: #f7f3ef;
    }

    .cart-product-image img {

        display: block;

        width: 100%;
        height: 100%;

        object-fit: cover;
    }


    /* =====================================================
       PRODUCT INFO
    ===================================================== */

    .cart-product-info {

        min-width: 0;

        flex: 1;

        padding: 0 25px 0 0;
    }


    .cart-product-info h3 {

        margin: 0 0 4px;

        font-size: 12px;

        line-height: 1.35;

        font-weight: 600;

        color: #35312e;

        width: 100%;

        max-width: 100%;

        overflow: hidden;

        white-space: nowrap;

        text-overflow: ellipsis;
    }


    .cart-product-info p {

        margin: 2px 0;

        font-size: 9.5px;

        line-height: 1.45;

        color: #85807b;
    }


    /* =====================================================
       BADGE
    ===================================================== */

    .cart-badge {

        display: inline-block;

        margin: 0 0 4px;

        padding: 2px 6px;

        border-radius: 7px;

        background: #ed5e80;

        color: #fff;

        font-size: 8px;

        line-height: 1.2;
    }


    /* =====================================================
       ĐƠN GIÁ
       
       Nằm dưới thông tin sản phẩm
    ===================================================== */

    .cart-price {

        position: absolute;

        left: 105px;

        top: 74px;

        margin: 0;

        font-size: 11px;

        line-height: 1.2;

        font-weight: 600;

        color: #e74f72;
    }


    /* =====================================================
       QUANTITY
       
       Nằm phía dưới đơn giá
    ===================================================== */

    .cart-quantity {

        position: absolute;

        left: 105px;

        bottom: 13px;

        display: flex;

        align-items: center;

        width: 76px;

        height: 27px;

        border: 1px solid #eee6e2;

        border-radius: 15px;

        background: #fff;

        overflow: hidden;
    }


    .cart-quantity button {

        width: 25px;

        height: 100%;

        padding: 0;

        border: none;

        background: transparent;

        color: #77716f;

        font-size: 11px;

        cursor: pointer;
    }


    .cart-quantity span {

        flex: 1;

        text-align: center;

        font-size: 11px;

        color: #484441;
    }


    /* =====================================================
       THÀNH TIỀN
       
       Góc phải phía dưới
    ===================================================== */

    .cart-total {

        position: absolute;

        right: 20%;

        bottom: 19px;

        margin: 0;

        font-size: 11px;

        line-height: 1.2;

        font-weight: 600;

        color: #e74f72;
    }


    /* =====================================================
       DELETE
       
       Góc phải ngoài cùng
    ===================================================== */

    .cart-remove {

        position: absolute;

        right: 10px;

        bottom: 17px;

        display: flex;

        align-items: center;
        justify-content: center;

        width: 17px;
        height: 17px;

        margin: 0;
        padding: 0;

        border: none;

        background: transparent;

        color: #e75b78;

        font-size: 10px;

        cursor: pointer;
    }


    .cart-remove i {

        font-size: 11px;
    }


    /* =====================================================
       BENEFITS
    ===================================================== */

    .cart-benefits {
        display: none !important;
    }


    /* =====================================================
       SUMMARY
    ===================================================== */

    .cart-summary {

        width: 100%;

        margin-top: 8px;

        padding: 14px;

        box-sizing: border-box;

        border: 1px solid #eee7e3;

        border-radius: 9px;

        background: #fff;

        box-shadow:
            0 2px 10px rgba(70, 50, 40, .04);
    }


    .cart-summary h2 {

        margin: 0 0 17px;

        font-size: 15px;

        line-height: 1.3;

        font-weight: 600;

        color: #34312e;
    }


    /* =====================================================
       SUMMARY ROW
    ===================================================== */

    .summary-row {

        display: flex;

        align-items: center;
        justify-content: space-between;

        margin: 0 0 10px;

        font-size: 11px;

        line-height: 1.4;

        color: #716b67;
    }


    /* =====================================================
       SUMMARY TOTAL
    ===================================================== */

    .summary-total {

        display: flex;

        align-items: center;
        justify-content: space-between;

        margin-top: 13px;

        padding-top: 13px;

        border-top: 1px solid #eee8e4;
    }


    .summary-total span {

        font-size: 14px;

        color: #35312e;
    }


    .summary-total strong {

        font-size: 17px;

        font-weight: 600;

        color: #e74f72;
    }


    /* =====================================================
       CHECKOUT
    ===================================================== */

    .checkout-btn {

        width: 100%;

        height: 43px;

        margin-top: 13px;

        border: none;

        border-radius: 10px;

        background: #e75b82;

        color: #fff;

        font-size: 13px;

        font-weight: 500;
    }


    /* =====================================================
       CONTINUE SHOPPING
    ===================================================== */

    .continue-shopping {

        width: 100%;

        height: 39px;

        margin-top: 9px;

        border: 1px solid #edb9c2;

        border-radius: 10px;

        background: #fff;

        color: #e35d7b;

        font-size: 12px;
    }


    /* =====================================================
       SHIPPING NOTE
    ===================================================== */

    .shipping-note {

        display: flex;

        align-items: center;

        gap: 6px;

        margin-top: 15px;

        font-size: 10px;

        line-height: 1.4;

        color: #706a66;
    }


    /* =====================================================
       ẨN CÁC PHẦN KHÔNG CẦN TRÊN MOBILE
    ===================================================== */

    .summary-features {
        display: none !important;
    }
.cart-check{justify-content: right;}
}