/*
 * Premium Ecológica
 * Cart R1.4.3.1
 */


/* ============================================================
   PAGE WORKSPACE
   ============================================================ */

body.checkout-cart-index #maincontent,
body.checkout-cart-index main#maincontent,
body.checkout-cart-index .page-main,
body.checkout-cart-index .page-main.container {
    width: calc(100% - 48px) !important;
    max-width: 1500px !important;

    margin-left: auto !important;
    margin-right: auto !important;

    padding-left: 0 !important;
    padding-right: 0 !important;
}


body.checkout-cart-index .columns,
body.checkout-cart-index .column.main {
    width: 100% !important;
    max-width: none !important;

    margin: 0 !important;

    padding-left: 0 !important;
    padding-right: 0 !important;
}


/* ============================================================
   STRUCTURAL GRID
   ============================================================ */

body.checkout-cart-index .premium-cart-r143-layout {
    display: grid !important;

    grid-template-columns:
        minmax(0, 1fr)
        minmax(390px, 420px) !important;

    gap: 36px !important;

    align-items: start !important;

    width: 100% !important;
    max-width: none !important;

    margin: 0 !important;
    padding: 0 !important;
}


body.checkout-cart-index .premium-cart-r143-main {
    width: 100% !important;
    min-width: 0 !important;

    margin: 0 !important;
}


body.checkout-cart-index .premium-cart-r143-summary {
    width: 100% !important;
    min-width: 0 !important;

    margin: 0 !important;
}


/* ============================================================
   CART MAIN COLUMN
   ============================================================ */

body.checkout-cart-index
.premium-cart-r143-main
.form-cart,

body.checkout-cart-index
.premium-cart-r143-main
form,

body.checkout-cart-index
.premium-cart-r143-main
.cart,

body.checkout-cart-index
.premium-cart-r143-main
#shopping-cart-table {
    width: 100% !important;
    max-width: none !important;
}


body.checkout-cart-index
.premium-cart-r143-main
.premium-cart-item {
    width: 100% !important;
    max-width: none !important;
}


/* Update cart action stays aligned with the cart card */

body.checkout-cart-index
.premium-cart-r143-main
.actions-toolbar.cart.actions {
    width: 100% !important;

    display: flex !important;
    justify-content: flex-end !important;

    margin-top: 16px !important;
}


/* ============================================================
   SUMMARY COLUMN
   ============================================================ */

body.checkout-cart-index
.premium-cart-r143-summary
.cart-summary {
    float: none !important;

    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;

    margin: 0 !important;

    position: sticky !important;
    top: 118px !important;
}


body.checkout-cart-index
.premium-cart-r143-summary
.cart-summary-actions {
    width: 100% !important;
}


body.checkout-cart-index
.premium-cart-r143-summary
input,

body.checkout-cart-index
.premium-cart-r143-summary
select,

body.checkout-cart-index
.premium-cart-r143-summary
button {
    max-width: 100%;
}


/* Long shipping labels must wrap instead of squeezing the summary */

body.checkout-cart-index
.premium-cart-r143-summary label,

body.checkout-cart-index
.premium-cart-r143-summary span,

body.checkout-cart-index
.premium-cart-r143-summary div {
    min-width: 0;
    overflow-wrap: anywhere;
}


/* ============================================================
   NOTEBOOK
   ============================================================ */

@media (min-width: 1024px) and (max-width: 1279px) {

    body.checkout-cart-index
    .premium-cart-r143-layout {
        grid-template-columns:
            minmax(0, 1fr)
            minmax(340px, 370px) !important;

        gap: 24px !important;
    }

}


/* ============================================================
   TABLET / MOBILE
   ============================================================ */

@media (max-width: 1023px) {

    body.checkout-cart-index #maincontent,
    body.checkout-cart-index main#maincontent,
    body.checkout-cart-index .page-main,
    body.checkout-cart-index .page-main.container {
        width: calc(100% - 32px) !important;
    }


    body.checkout-cart-index
    .premium-cart-r143-layout {
        grid-template-columns:
            minmax(0, 1fr) !important;

        gap: 24px !important;
    }


    body.checkout-cart-index
    .premium-cart-r143-summary
    .cart-summary {
        position: static !important;
    }

}


@media (max-width: 639px) {

    body.checkout-cart-index #maincontent,
    body.checkout-cart-index main#maincontent,
    body.checkout-cart-index .page-main,
    body.checkout-cart-index .page-main.container {
        width: calc(100% - 24px) !important;
    }

}
