/* ========================================
   MAIN WRAPPER
======================================== */

.cpt-wrapper {
    width: 100%;
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 15px;
    box-sizing: border-box;
}


/* ========================================
   CATEGORY
======================================== */

.cpt-category {
    margin-bottom: 35px;
    border: 1px solid #e5e5e5;
    border-radius: 10px;
    overflow: hidden;
    background: #fff;
}


/* ========================================
   CATEGORY TITLE
======================================== */

.cpt-category-title {
    padding: 16px 20px;
    font-size: 22px;
    font-weight: 700;
    background: #f7f7f7;
    border-bottom: 1px solid #e5e5e5;
}


/* ========================================
   TABLE
======================================== */

.cpt-table {
    width: 100%;
}


/* Header */

.cpt-header {
    display: grid;
    grid-template-columns: 100px 1fr 150px 180px 150px;
    align-items: center;

    padding: 14px 20px;

    font-size: 14px;
    font-weight: 700;

    background: #fafafa;
    border-bottom: 1px solid #e5e5e5;
}


/* ========================================
   PRODUCT ROW
======================================== */

.cpt-product-row {
    display: grid;
    grid-template-columns: 100px 1fr 150px 180px 150px;

    align-items: center;

    min-height: 100px;

    padding: 12px 20px;

    border-bottom: 1px solid #eeeeee;

    transition: background 0.2s ease;
}


.cpt-product-row:hover {
    background: #fafafa;
}


.cpt-product-row:last-child {
    border-bottom: none;
}


/* ========================================
   IMAGE
======================================== */

.cpt-image img {
    width: 75px;
    height: 75px;

    object-fit: contain;

    border-radius: 8px;
}


/* ========================================
   PRODUCT NAME
======================================== */

.cpt-product-name a {
    color: #222;
    text-decoration: none;
    font-size: 16px;
    font-weight: 600;
}

.cpt-product-name a:hover {
    text-decoration: underline;
}


/* ========================================
   PRICE
======================================== */

.cpt-price {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.cpt-price del {
    color: #888;
    font-size: 13px;
}

.cpt-price strong {
    font-size: 17px;
}


/* ========================================
   QUANTITY
======================================== */

.cpt-quantity {
    display: flex;
    align-items: center;
    width: fit-content;

    border: 1px solid #d5d5d5;
    border-radius: 6px;

    overflow: hidden;
}


.cpt-quantity button {
    width: 40px;
    height: 40px;

    border: none;
    background: #f5f5f5;

    font-size: 22px;

    cursor: pointer;

    transition: background 0.2s ease;
}


.cpt-quantity button:hover {
    background: #e5e5e5;
}


.cpt-qty {
    width: 50px;
    height: 40px;

    padding: 0;

    border: none;

    text-align: center;

    font-size: 16px;
    font-weight: 600;

    background: #fff;

    outline: none;
}


/* Remove browser arrows */

.cpt-qty::-webkit-inner-spin-button,
.cpt-qty::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.cpt-qty {
    -moz-appearance: textfield;
}


/* ========================================
   PRODUCT TOTAL
======================================== */

.cpt-product-total {
    font-size: 17px;
    font-weight: 700;
}


/* ========================================
   SUMMARY
======================================== */

.cpt-summary {
    display: flex;

    justify-content: flex-end;
    align-items: center;

    gap: 25px;

    padding: 20px;

    margin-top: 20px;

    border-radius: 8px;

    background: #f7f7f7;
}


.cpt-total-label {
    font-size: 18px;
    font-weight: 600;
}


.cpt-grand-total {
    font-size: 24px;
    font-weight: 800;
}


/* ========================================
   BUTTONS
======================================== */

.cpt-actions {
    display: flex;
    justify-content: flex-end;
    align-items: center;

    gap: 12px;

    margin-top: 15px;
}


.cpt-add-cart,
.cpt-view-cart {
    display: inline-flex;

    align-items: center;
    justify-content: center;

    min-height: 48px;

    padding: 0 24px;

    border-radius: 6px;

    font-size: 15px;
    font-weight: 700;

    cursor: pointer;

    text-decoration: none;
}


.cpt-add-cart {
    border: none;
    background: #111;
    color: #fff;
}


.cpt-add-cart:hover {
    background: #333;
}


.cpt-view-cart {
    border: 1px solid #111;
    color: #111;
    background: #fff;
}


.cpt-view-cart:hover {
    background: #111;
    color: #fff;
}


/* ========================================
   MESSAGE
======================================== */

.cpt-message {
    display: none;

    margin-top: 15px;

    padding: 12px 15px;

    border-radius: 6px;

    font-size: 14px;
}


/* ========================================
   MOBILE
======================================== */

@media (max-width: 768px) {

    .cpt-wrapper {
        padding: 0 10px;
    }


    .cpt-category-title {
        font-size: 18px;
        padding: 14px;
    }


    .cpt-header {
        display: none;
    }


    .cpt-product-row {

        grid-template-columns: 70px 1fr;

        gap: 10px;

        padding: 15px;

        position: relative;

    }


    .cpt-image {
        grid-row: span 3;
    }


    .cpt-image img {
        width: 60px;
        height: 60px;
    }


    .cpt-product-name {
        padding-right: 5px;
    }


    .cpt-price {
        flex-direction: row;
        align-items: center;
        gap: 8px;
    }


    .cpt-quantity {
        margin-top: 5px;
    }


    .cpt-product-total {

        position: absolute;

        right: 15px;
        top: 15px;

        font-size: 15px;

    }


    .cpt-summary {

        justify-content: space-between;

        padding: 15px;

    }


    .cpt-grand-total {
        font-size: 20px;
    }


    .cpt-actions {

        flex-direction: column;

        align-items: stretch;

    }


    .cpt-add-cart,
    .cpt-view-cart {

        width: 100%;

    }

}