/* Blue Editoria cart: scoped to the WooCommerce Cart block. */
.be-cart-page {
    padding-top: 22px;
    padding-bottom: 112px;
}

.be-page-hero:has(+ .be-cart-page) {
    padding-bottom: 28px;
}

.be-cart-page .wc-block-components-sidebar-layout {
    align-items: start;
    gap: 38px;
}

@media (min-width: 782px) {
    .be-cart-page .wc-block-components-sidebar-layout {
        display: grid;
        grid-template-columns: minmax(0, 1fr) 380px;
    }

    .be-cart-page .wc-block-cart__main,
    .be-cart-page .wc-block-cart__sidebar {
        min-width: 0;
        width: auto;
    }
}

.be-cart-page .wc-block-cart-items {
    border-collapse: separate;
    border-spacing: 0 12px;
}

.be-cart-page .wc-block-cart-items__header th {
    border: 0;
    color: #66718a;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.06em;
    padding: 0 16px 7px;
    text-transform: uppercase;
}

.be-cart-page .wc-block-cart-items__row td {
    background: #fff;
    border-bottom: 1px solid #e2e8f3;
    border-top: 1px solid #e2e8f3;
    padding: 22px 18px;
    vertical-align: top;
}

.be-cart-page .wc-block-cart-items__row td:first-child {
    border-bottom-left-radius: 14px;
    border-left: 1px solid #e2e8f3;
    border-top-left-radius: 14px;
}

.be-cart-page .wc-block-cart-items__row td:last-child {
    border-bottom-right-radius: 14px;
    border-right: 1px solid #e2e8f3;
    border-top-right-radius: 14px;
    color: #0a0d53;
    font-size: 18px;
    font-weight: 800;
    text-align: right;
}

.be-cart-page .wc-block-cart-item__image img {
    background: #f1f5fc;
    border-radius: 10px;
    height: 66px;
    object-fit: contain;
    padding: 10px;
    width: 66px;
}

.be-cart-page .wc-block-components-product-name {
    color: #0a0d53;
    font-size: 18px;
    font-weight: 800;
    letter-spacing: 0;
    text-decoration: none;
}

.be-cart-page .wc-block-cart-item__prices,
.be-cart-page .wc-block-components-product-metadata__description,
.be-cart-page .wc-block-components-product-details {
    color: #66718a;
    font-size: 14px;
    line-height: 1.55;
    margin-top: 5px;
}

.be-cart-page .wc-block-components-product-details {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 9px;
}

.be-cart-page .wc-block-components-product-details span {
    white-space: normal;
}

.be-cart-page tr:has(.wc-block-components-product-details__avantage-de-bienvenue) td {
    background: #f1fbf7;
    border-color: #bdeedb;
}

.be-cart-page tr:has(.wc-block-components-product-details__avantage-de-bienvenue) .wc-block-components-product-name::after {
    background: #dff8eb;
    border-radius: 999px;
    color: #12764b;
    content: "Avantage de bienvenue";
    display: inline-block;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.05em;
    margin-left: 9px;
    padding: 4px 7px;
    text-transform: uppercase;
    vertical-align: middle;
}

.be-cart-page .wc-block-cart-item__remove-link {
    color: #6c7892;
    margin-top: 10px;
}

.be-cart-page .wc-block-cart-item__remove-link:hover {
    color: #0a0d53;
}

.be-cart-page .wc-block-cart__sidebar {
    background: #fff;
    border: 1px solid #dce5f2;
    border-radius: 14px;
    box-shadow: 0 18px 42px rgba(10, 13, 83, 0.09);
    padding: 26px;
    position: sticky;
    top: 112px;
}

.be-cart-page .wc-block-cart__totals-title {
    color: #0a0d53;
    font-size: 21px;
    font-weight: 800;
    margin: 0 0 18px;
}

.be-cart-page .wc-block-components-panel__button,
.be-cart-page .wc-block-components-totals-wrapper {
    border-color: #e2e8f3;
}

.be-cart-page .wc-block-components-totals-coupon {
    background: #f6f8fd;
    border: 1px solid #e2e8f3;
    border-radius: 9px;
    margin-bottom: 17px;
}

.be-cart-page .wc-block-components-totals-item {
    padding: 20px 0;
}

.be-cart-page .wc-block-components-totals-item__label {
    color: #0a0d53;
    font-size: 18px;
    font-weight: 800;
}

.be-cart-page .wc-block-components-totals-item__value {
    color: #0a0d53;
    font-size: 25px;
    font-weight: 800;
}

.be-cart-page .wc-block-cart__submit-button {
    background: #0a0d53 !important;
    border: 1px solid #0a0d53 !important;
    border-radius: 8px !important;
    box-shadow: 0 12px 24px rgba(10, 13, 83, 0.18);
    color: #fff !important;
    font-size: 16px !important;
    font-weight: 800 !important;
    min-height: 56px;
    transition: background-color 180ms ease, transform 180ms ease, box-shadow 180ms ease;
}

.be-cart-page .wc-block-cart__submit-button:hover {
    background: #1d54d8 !important;
    box-shadow: 0 16px 26px rgba(29, 84, 216, 0.22);
    transform: translateY(-2px);
}

/* Keep the support entry point available without covering the cart summary. */
body:has(.be-cart-page) .be-contact-float {
    align-items: center;
    border-radius: 50%;
    bottom: 24px;
    display: inline-flex;
    height: 56px;
    justify-content: center;
    min-width: 0;
    padding: 0;
    right: 24px;
    width: 56px;
}

body:has(.be-cart-page) .be-contact-float-label {
    display: none;
}

@media (max-width: 781px) {
    .be-page-hero:has(+ .be-cart-page) {
        padding-bottom: 18px;
    }

    .be-cart-page {
        padding-bottom: 82px;
        padding-top: 8px;
    }

    .be-cart-page .wc-block-components-sidebar-layout {
        gap: 24px;
    }

    .be-cart-page .wc-block-cart-items__header {
        display: none;
    }

    .be-cart-page .wc-block-cart-items,
    .be-cart-page .wc-block-cart-items tbody,
    .be-cart-page .wc-block-cart-items__row {
        display: block;
        width: 100%;
    }

    .be-cart-page .wc-block-cart-items__row {
        margin-bottom: 12px;
    }

    .be-cart-page .wc-block-cart-items__row td {
        border-left: 1px solid #e2e8f3;
        border-right: 1px solid #e2e8f3;
    }

    .be-cart-page .wc-block-cart-item__image {
        border-bottom: 0 !important;
        border-bottom-left-radius: 0 !important;
        border-top-right-radius: 14px;
        display: inline-block;
        padding: 16px 0 0 16px !important;
    }

    .be-cart-page .wc-block-cart-item__product {
        border-bottom: 0 !important;
        border-bottom-right-radius: 0 !important;
        border-left: 0 !important;
        border-top-left-radius: 0 !important;
        display: inline-block;
        padding: 16px 16px 0 !important;
        vertical-align: top;
        width: calc(100% - 92px);
    }

    .be-cart-page .wc-block-cart-item__total {
        border-top: 0 !important;
        border-top-right-radius: 0 !important;
        padding: 8px 16px 16px !important;
        text-align: left !important;
    }

    .be-cart-page .wc-block-cart__sidebar {
        padding: 22px;
        position: static;
    }

    body:has(.be-cart-page) .be-contact-float {
        bottom: 84px;
        right: 16px;
    }
}
