.ecPage .wc-empty-cart-message {
    display: none
}

.ecPage thead {
    display: none !important
}

.ecPage .sM {
    font-family: "Poppins", Sans-serif;
    font-size: 12px !important;
    font-weight: 400 !important;
    line-height: 24px;
}

.ecPage .sM::before {
    content: ".";
    font-size: 1px;
    display: block;
    line-height: 0.5px;
}

.ecPage .elementor-jet-cart-table tr.cart_item {
    border-width: 1px 0px !important;
    border-style: solid;
    border-color: #C6C1BC !important;

}

.ecPage td {
    padding-bottom: 32px !important;
}

.ecPage td.product-thumbnail {
    max-width: 95px;
    width: 95px;
}

.ecPage td.product-name {
    display: flex;
    align-content: flex-start;
}

.ecPage .woocommerce-cart-form {
    padding-right: 10vw;
}

.ecPage .cart-row>.e-con-inner {
    flex-direction: column;

}

.ecPage .elementor-widget-jet-cart-table>.elementor-widget-container {
    width: 100%;
    display: flex;
    flex-direction: row;

}



.ecPage .e-cart__column.e-cart__column-end {
    display: none !important
}

.ecPage .elementor-widget-jet-cart-totals {
    width: 33%;
    border-radius: 10px;
    padding: 24px 26px;
    box-shadow: 0px 4px 20px 0px #00000040;
    height: fit-content;
}

@media (min-width: 768px) {
    .ecPage .elementor-widget-jet-cart-totals {
        position: sticky;
        top: 120px;
    }
}


.ecPage .cart_totals tr::before {
    content: " ";
    width: 77px;
    height: 1px;
    position: absolute;
    background-color: #DAD9D8;
}

.ecPage td[data-title="Subtotal"]::before {
    content: 'Sous-total' !important;
    color: #000000 !important;
    font-size: 14px !important;
    font-weight: 300 !important;
    line-height: 24px !important;

}

.ecPage td[data-title="Total"] span {
    font-weight: 600 !important;
}

.ecPage td[data-title="Subtotal"] {
    padding: 16px 0px 24px 0px !important
}

.ecPage td[data-title="Total"]::before {
    font-size: 18px !important;
    font-weight: 400 !important;
    line-height: 24px !important;
    font-family: "Poppins", Sans-serif;
}

.ecPage .cart_totals h2 {
    font-size: 18px !important;
    font-weight: 600 !important;
    line-height: 24px !important;
    font-family: "Poppins", Sans-serif;
}

@media only screen and (max-width:1024px) {
    .ecPage .elementor-widget-jet-cart-table>.elementor-widget-container {

        flex-direction: column;
        justify-content: center;
    }

    .ecPage .elementor-widget-jet-cart-totals {
        width: 100%;
        margin-top: 30px;
    }

    .ecPage .elementor-jet-cart-table {
        width: 100%;
        justify-content: center;
    }

    .ecPage .cart-row {
        padding: 0px 20px;
    }

    .ecPage .elementor-jet-cart-table table.shop_table_responsive tr td::before {
        content: none !important;
    }

    .ecPage td.product-name a,
    .woocommerce table.shop_table_responsive tr td {
        text-align: left !important;
    }

    .ecPage .elementor-widget-woocommerce-cart .woocommerce table.cart tr:first-child {
        border-top: 1px solid #C6C1BC !important;
    }

    .ecPage tr.cart-subtotal,
    .ecPage tr.order-total {
        width: 100% !important;
    }

    /* ✅ CORRECTION : Les td doivent faire 50% chacun pour un bon alignement */
    .ecPage tr.cart-subtotal td,
    .ecPage tr.order-total td {
        width: 50% !important;
    }
}

@media only screen and (max-width:480px) {

    .ecPage .woocommerce table.shop_table_responsive tr {
        display: flex;
        justify-content: space-between;
        flex-direction: column;
    }

    .ecPage td[data-title="Total"]::after {
        width: 100%;

    }

    .ecPage td {
        padding: 0px 0px !important;
    }

    .ecPage .product-thumbnail {
        width: 87px !important;
        height: 87px !important;
    }

    .ecPage .product-name {
        width: 55% !important;
    }

    .ecPage .woocommerce-cart-form__cart-item {
        flex-wrap: wrap !important;
        flex-direction: row !important;
        row-gap: 24px;
        padding: 32px 0px !important;
    }

    .ecPage .product-price,
    .ecPage .product-quantity {
        order: 1;
    }

    .ecPage .product-remove a {
        width: 45px !important;
        height: 45px !important;
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
    }

    .ecPage .product-price {
        align-self: center;
    }

    .ecPage .woocommerce table.cart tr:first-child {
        border-top: 2px solid #DAD9D8 !important;
    }

    .ecPage td[data-title="Total"]::after {
        background-size: contain;
    }
}

.woocommerce-shipping-estimate-html,
.woocommerce-shipping-calculator {
    display: none !important;
}

.woocommerce-shipping-contents small {
    font-size: .9rem !important;
}

/* Classes pour contrôler l'affichage via JavaScript */
.hide-shipping-calculator .woocommerce-shipping-calculator,
.hide-shipping-calculator .woocommerce-shipping-estimate-html {
    display: none !important;
}

/* Masquer le lien calculateur dans tous les cas */
.shipping-calculator-button {
    display: none !important;
}

/* ========================================
   IMPORTANT : Règles commentées pour permettre
   à Advanced Shipping Packages de fonctionner
   ======================================== */

/*
.cart-collaterals .shipping,
.woocommerce-shipping-totals,
.woocommerce-shipping-calculator,
#shipping_method,
.shipping-calculator-form,
.woocommerce-shipping-fields,
.shipping-calculator-button,
.woocommerce-shipping-estimate-html,
tr.shipping th,
tr.shipping td,
.cart-subtotal+.shipping {
    display: none !important;
}
*/

/* ==========================================
   STYLES POUR LE TFOOT DE LA PAGE COMMANDE
   ========================================== */

/* Cibler uniquement le tfoot et ses lignes (Sous-total, livraison, Total) */
tfoot tr.cart-subtotal td,
tfoot tr.cart-subtotal th,
tfoot tr td,
tfoot tr th {
    width: 50% !important;
    max-width: 50% !important;
    box-sizing: border-box;
}

/* Alignement du texte - Colonne de gauche */
tfoot tr td:first-child,
tfoot tr th:first-child {
    text-align: left !important;
}

/* Alignement du texte - Colonne de droite */
tfoot tr td:last-child,
tfoot tr th:last-child {
    text-align: right !important;
}

/* Masquer aussi dans le checkout - COMMENTÉ pour Advanced Shipping Packages */
/*
.woocommerce-checkout .woocommerce-shipping-totals,
.woocommerce-checkout #shipping_method,
.checkout .shipping {
    display: none !important;
}
*/

/* Garder visible seulement notre système personnalisé */
.clpac-shipping-subtotals,
.clpac-shipping-selector {
    display: block !important;
}

/* ==========================================
   COULEUR DES SÉLECTEURS (CHECKBOX & RADIO)
   Utilise la couleur primaire du site
   ========================================== */

/* Checkbox et Radio buttons dans le récapitulatif du panier */
.ecPage input[type="checkbox"],
.ecPage input[type="radio"],
.woocommerce-cart input[type="checkbox"],
.woocommerce-cart input[type="radio"],
.cart_totals input[type="checkbox"],
.cart_totals input[type="radio"],
.woocommerce-shipping-methods input[type="radio"],
#clpac_merge_packages {
    accent-color: var(--e-global-color-primary) !important;
}

/* Si la variable CSS n'est pas disponible, fallback sur la couleur primaire */
:root {
    --clpac-primary-color: var(--e-global-color-primary, #BA5C33);
}

/* Application alternative si accent-color ne fonctionne pas */
.ecPage input[type="checkbox"]:checked,
.ecPage input[type="radio"]:checked {
    filter: hue-rotate(0deg) saturate(100%) brightness(100%);
}

/* Masquer le bouton "Update cart" et sa cellule parente */
.ecPage td.actions,
.ecPage button[name="update_cart"],
td.actions,
button[name="update_cart"],
.woocommerce-cart-form td.actions {
    display: none !important;
}

/* Masquer également la ligne entière contenant les actions */
.woocommerce-cart-form tr:has(td.actions) {
    display: none !important;
}

/* Réinitialiser la taille du bouton radio "Click and collect" */
.woocommerce-shipping-methods li.clpac-styled input[type="radio"].shipping_method,
.woocommerce-shipping-methods input[type="radio"]#shipping_method_1_local_pickup2 {
    width: auto !important;
    height: auto !important;
}

/* ==========================================================================
   CHECKOUT > TABLEAU "VOTRE COMMANDE" - TFOOT (Ciblage ultra-spécifique)
   ========================================================================== */

/* Forcer les colonnes du tfoot à 50% avec haute spécificité */
#order_review .woocommerce-checkout-review-order-table tfoot tr>th,
#order_review .woocommerce-checkout-review-order-table tfoot tr>td {
    width: 50% !important;
    max-width: 50% !important;
    box-sizing: border-box;
    display: table-cell !important;
    vertical-align: top;
}

/* Colonne libellés (gauche) - Sous-total, Click and Collect, Total */
#order_review .woocommerce-checkout-review-order-table tfoot tr>th:first-child,
#order_review .woocommerce-checkout-review-order-table tfoot tr>td:first-child {
    text-align: start !important;
}

/* Colonne montants (droite) - 849,00 €, etc. */
#order_review .woocommerce-checkout-review-order-table tfoot tr>th:last-child,
#order_review .woocommerce-checkout-review-order-table tfoot tr>td:last-child {
    text-align: end !important;
    white-space: normal;
}

/* Protection contre les règles responsives WooCommerce */
.woocommerce-checkout #order_review .woocommerce-checkout-review-order-table tfoot tr>td,
.woocommerce-checkout #order_review .woocommerce-checkout-review-order-table tfoot tr>th {
    text-align: inherit !important;
}

/* ========== SPÉCIFICITÉ MAXIMALE contre les règles Elementor ========== */
/* Surcharge la règle Elementor width: 10% avec spécificité (1,5,2) */
.elementor-2510 .elementor-element.elementor-element-82157cb #order_review .woocommerce-checkout-review-order-table tfoot tr td,
.elementor-2510 .elementor-element.elementor-element-82157cb #order_review .woocommerce-checkout-review-order-table tfoot tr th,
body .elementor-2510 .elementor-element.elementor-element-82157cb #order_review .woocommerce-checkout-review-order-table tfoot td,
body .elementor-2510 .elementor-element.elementor-element-82157cb #order_review .woocommerce-checkout-review-order-table tfoot th,
body.woocommerce-checkout .elementor .elementor-element #order_review .woocommerce-checkout-review-order-table tfoot td,
body.woocommerce-checkout .elementor .elementor-element #order_review .woocommerce-checkout-review-order-table tfoot th {
    width: 50% !important;
    max-width: 50% !important;
    display: table-cell !important;
    box-sizing: border-box;
}

/* Colonne de gauche - alignement start */
.elementor-2510 .elementor-element.elementor-element-82157cb #order_review .woocommerce-checkout-review-order-table tfoot tr td:first-child,
.elementor-2510 .elementor-element.elementor-element-82157cb #order_review .woocommerce-checkout-review-order-table tfoot tr th:first-child,
body .elementor-2510 .elementor-element.elementor-element-82157cb #order_review .woocommerce-checkout-review-order-table tfoot td:first-child,
body .elementor .elementor-element #order_review .woocommerce-checkout-review-order-table tfoot td:first-child,
body .elementor .elementor-element #order_review .woocommerce-checkout-review-order-table tfoot th:first-child {
    text-align: start !important;
}

/* Colonne de droite - alignement end (droite) */
.elementor-2510 .elementor-element.elementor-element-82157cb #order_review .woocommerce-checkout-review-order-table tfoot tr td:last-child,
.elementor-2510 .elementor-element.elementor-element-82157cb #order_review .woocommerce-checkout-review-order-table tfoot tr th:last-child,
body .elementor-2510 .elementor-element.elementor-element-82157cb #order_review .woocommerce-checkout-review-order-table tfoot td:last-child,
body .elementor .elementor-element #order_review .woocommerce-checkout-review-order-table tfoot td:last-child,
body .elementor .elementor-element #order_review .woocommerce-checkout-review-order-table tfoot th:last-child {
    text-align: end !important;
    white-space: normal;
}

/* ========== Alignement des sélecteurs de livraison à droite ========== */
/* Forcer la liste des méthodes de livraison (radio buttons) à s'afficher à droite */
#order_review .woocommerce-checkout-review-order-table tfoot td ul.woocommerce-shipping-methods,
#order_review .woocommerce-checkout-review-order-table tfoot td .woocommerce-shipping-methods {
    display: flex;
    flex-direction: column;
    align-items: flex-end !important;
    text-align: end !important;
    width: 100%;
}

/* Aligner chaque li (option de livraison) à droite */
#order_review .woocommerce-checkout-review-order-table tfoot td ul.woocommerce-shipping-methods li {
    display: flex;
    align-items: center;
    width: 100%;
    flex-direction: row;
    gap: 8px;
    margin-bottom: 5px !important;
}

/* Le label à droite du radio button */
#order_review .woocommerce-checkout-review-order-table tfoot td ul.woocommerce-shipping-methods li label {
    margin: 0;
    text-align: end !important;
}

/* Le contenu des détails sous le radio (plat feuille, etc.) aussi à droite */
#order_review .woocommerce-checkout-review-order-table tfoot td .woocommerce-shipping-contents {
    text-align: end !important;
}

.woocommerce-shipping-methods {
    clear: both;
}

.woocommerce-shipping-methods li,
.wc_payment_method li {
    display: flex;
    background-color: #f7f7f7 !important;
    border: 1px solid #e5e5e5 !important;
    padding: 12px !important;
    align-items: center;
    gap: 10px;
    font-size: 16px;
    border-radius: 5px;
}

.woocommerce-shipping-methods li input,
.wc_payment_method li input {
    margin: 0 !important;
    transform: scale(1.25);
}

/* ==========================================================================
   CHECKOUT > TABLEAU "VOTRE COMMANDE" - THEAD & TBODY (Produits)
   ========================================================================== */

/* Headers du tableau - Produit à gauche, Sous-total à droite */
#order_review .woocommerce-checkout-review-order-table thead th.product-name {
    text-align: left !important;
    width: 50% !important;
}

#order_review .woocommerce-checkout-review-order-table thead th.product-total {
    text-align: right !important;
    width: 50% !important;
}

/* Lignes produits - Noms à gauche, prix à droite */
#order_review .woocommerce-checkout-review-order-table tbody td.product-name {
    text-align: left !important;
    width: 50% !important;
}

#order_review .woocommerce-checkout-review-order-table tbody td.product-total {
    text-align: right !important;
    width: 50% !important;
}

/* Spécificité maximale pour battre Elementor */
body .elementor-2510 .elementor-element.elementor-element-82157cb #order_review .woocommerce-checkout-review-order-table thead th.product-name,
body.woocommerce-checkout .elementor .elementor-element #order_review .woocommerce-checkout-review-order-table thead th.product-name {
    text-align: left !important;
    width: 50% !important;
}

body .elementor-2510 .elementor-element.elementor-element-82157cb #order_review .woocommerce-checkout-review-order-table thead th.product-total,
body.woocommerce-checkout .elementor .elementor-element #order_review .woocommerce-checkout-review-order-table thead th.product-total {
    text-align: right !important;
    width: 50% !important;
}

body .elementor-2510 .elementor-element.elementor-element-82157cb #order_review .woocommerce-checkout-review-order-table tbody td.product-name,
body.woocommerce-checkout .elementor .elementor-element #order_review .woocommerce-checkout-review-order-table tbody td.product-name {
    text-align: left !important;
    width: 50% !important;
}

body .elementor-2510 .elementor-element.elementor-element-82157cb #order_review .woocommerce-checkout-review-order-table tbody td.product-total,
body.woocommerce-checkout .elementor .elementor-element #order_review .woocommerce-checkout-review-order-table tbody td.product-total {
    text-align: right !important;
    width: 50% !important;
}

/* ========== SURCHARGE ULTIME : Bat le Custom CSS Elementor (ligne 137) ========== */
/* Cette règle Elementor force width: 10% sur TOUS les td, on la surcharge ici */
body.woocommerce-checkout .elementor-2510 .elementor-element.elementor-element-82157cb #order_review .woocommerce-checkout-review-order-table thead th.product-name,
html body.woocommerce-checkout .elementor-2510 .elementor-element.elementor-element-82157cb #order_review .woocommerce-checkout-review-order-table thead th.product-name {
    text-align: left !important;
    width: 50% !important;
    max-width: 50% !important;
}

body.woocommerce-checkout .elementor-2510 .elementor-element.elementor-element-82157cb #order_review .woocommerce-checkout-review-order-table thead th.product-total,
html body.woocommerce-checkout .elementor-2510 .elementor-element.elementor-element-82157cb #order_review .woocommerce-checkout-review-order-table thead th.product-total {
    text-align: right !important;
    width: 50% !important;
    max-width: 50% !important;
}

body.woocommerce-checkout .elementor-2510 .elementor-element.elementor-element-82157cb #order_review .woocommerce-checkout-review-order-table tbody td.product-name,
html body.woocommerce-checkout .elementor-2510 .elementor-element.elementor-element-82157cb #order_review .woocommerce-checkout-review-order-table tbody td.product-name {
    text-align: left !important;
    width: 50% !important;
    max-width: 50% !important;
}

body.woocommerce-checkout .elementor-2510 .elementor-element.elementor-element-82157cb #order_review .woocommerce-checkout-review-order-table tbody td.product-total,
html body.woocommerce-checkout .elementor-2510 .elementor-element.elementor-element-82157cb #order_review .woocommerce-checkout-review-order-table tbody td.product-total {
    text-align: right !important;
    width: 50% !important;
    max-width: 50% !important;
}

/* ========== PRODUCTION : Force TOUS les td/th du tableau à 50% ========== */
/* Surcharge ABSOLUE - bat le width: 10% d'Elementor (ligne 137 de post-2510.css) */

/* CRITIQUE : Forcer le tableau à respecter les largeurs des colonnes */
.elementor-2510 .elementor-element-82157cb #order_review .woocommerce-checkout-review-order-table {
    table-layout: fixed !important;
    width: 100% !important;
}

.elementor-2510 .elementor-element-82157cb #order_review .woocommerce-checkout-review-order-table td {
    width: 50% !important;
    max-width: 50% !important;
    min-width: 50% !important;
}

.elementor-2510 .elementor-element-82157cb #order_review .woocommerce-checkout-review-order-table th {
    width: 50% !important;
    max-width: 50% !important;
    min-width: 50% !important;
}

/* Spécificité maximale avec html */
html .elementor-2510 .elementor-element-82157cb #order_review .woocommerce-checkout-review-order-table td {
    width: 50% !important;
    max-width: 50% !important;
}

html .elementor-2510 .elementor-element-82157cb #order_review .woocommerce-checkout-review-order-table th {
    width: 50% !important;
    max-width: 50% !important;
}

/* Alignement texte : Colonne gauche à gauche, colonne droite à droite */
.elementor-2510 .elementor-element-82157cb #order_review .woocommerce-checkout-review-order-table td:first-child,
.elementor-2510 .elementor-element-82157cb #order_review .woocommerce-checkout-review-order-table th:first-child {
    text-align: left !important;
}

.elementor-2510 .elementor-element-82157cb #order_review .woocommerce-checkout-review-order-table td:last-child,
.elementor-2510 .elementor-element-82157cb #order_review .woocommerce-checkout-review-order-table th:last-child {
    text-align: right !important;
}

.elementor-widget-woocommerce-cart .woocommerce .input-text.qty {
    border: none !important;
    text-align: center !important;
}


.elementor-widget-woocommerce-cart .woocommerce table.shop_table .button {
    font-size: 17px !important;
    font-weight: 500 !important;
}

.shop_table.cart td.product-remove .remove {
    font-size: 13px !important;
    max-width: 24px !important;
    max-height: 24px !important;
    padding: 0 !important;
}

.woocommerce-shipping-totals td:before {
    font-size: 15px !important;
}

.cart-summary-widget {
    color: #7C7469;
}

@media screen and (min-width: 1024px) {
    .ecPage .elementor-jet-cart-table {
        width: 66%;
        margin-left: 40px;
    }

    .cart-summary-widget {
        margin-left: 100px;
    }
}