/* ========== PAGE PANIER WOOCOMMERCE ========== */
/* Version: 1.6.0 - Style moderne pour la page panier - Sans responsive WooCommerce */

/* Force block display on form */
.woocommerce-cart form.woocommerce-cart-form,
form.woocommerce-cart-form {
    display: block !important;
}

/* Force table display - Clean selectors without shop_table_responsive */
.woocommerce-cart table.shop_table,
.woocommerce-cart table.cart,
table.woocommerce-cart-form__contents,
.cart_totals table {
    display: table !important;
    width: 100% !important;
    table-layout: auto !important;
    border-collapse: separate !important;
    border-spacing: 0 !important;
}

/* Table structure elements */
.woocommerce-cart table thead,
.cart_totals table thead {
    display: table-header-group !important;
}

.woocommerce-cart table tbody,
.cart_totals table tbody {
    display: table-row-group !important;
}

.woocommerce-cart table tr,
.cart_totals table tr {
    display: table-row !important;
}

.woocommerce-cart table th,
.woocommerce-cart table td,
.cart_totals table th,
.cart_totals table td {
    display: table-cell !important;
    vertical-align: middle !important;
}

/* Container principal */
.woocommerce-cart .woocommerce,
.woocommerce-cart main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 3rem 2rem;
}

/* Titre de la page */
.woocommerce-cart .entry-title,
.woocommerce-cart h1 {
    text-align: center;
    font-size: 2.5rem;
    color: #2a2a1f;
    margin-bottom: 3rem;
    font-weight: 700;
}

/* Table du panier */
.woocommerce-cart-form {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06), 0 4px 16px rgba(0,0,0,0.08);
    margin-bottom: 2rem;
}

.woocommerce table.shop_table {
    border: none !important;
    border-collapse: separate;
    border-spacing: 0;
}

.woocommerce table.shop_table thead {
    background: linear-gradient(135deg, #7a9b3f 0%, #8bb350 100%);
    color: white;
}

.woocommerce table.shop_table thead th {
    padding: 1.5rem 1rem !important;
    border: none !important;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.9rem;
    color: white !important;
}

.woocommerce table.shop_table thead th:first-child {
    border-top-left-radius: 12px;
}

.woocommerce table.shop_table thead th:last-child {
    border-top-right-radius: 12px;
}

.woocommerce table.shop_table tbody tr {
    border-bottom: 1px solid #f0f0f0 !important;
    transition: background 0.3s ease;
}

.woocommerce table.shop_table tbody tr:hover {
    background: #f9f9f9;
}

.woocommerce table.shop_table tbody td {
    padding: 2rem 1rem !important;
    vertical-align: middle !important;
    border: none !important;
}

/* Image produit */
.woocommerce table.shop_table .product-thumbnail img {
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    max-width: 80px;
    height: auto;
}

/* Nom du produit */
.woocommerce table.shop_table .product-name a {
    color: #2a2a1f;
    font-weight: 600;
    font-size: 1.1rem;
    text-decoration: none;
    transition: color 0.3s ease;
}

.woocommerce table.shop_table .product-name a:hover {
    color: #7a9b3f;
}

/* Prix */
.woocommerce table.shop_table .product-price,
.woocommerce table.shop_table .product-subtotal {
    font-size: 1.2rem;
    font-weight: 700;
    color: #7a9b3f;
}

/* Quantité */
.woocommerce table.shop_table .quantity {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.woocommerce table.shop_table .quantity input.qty {
    width: 80px !important;
    padding: 0.75rem !important;
    text-align: center !important;
    border: 2px solid #e5e7eb !important;
    border-radius: 8px !important;
    font-size: 1rem !important;
    font-weight: 600 !important;
}

.woocommerce table.shop_table .quantity input.qty:focus {
    border-color: #7a9b3f !important;
    outline: none !important;
}

/* Bouton supprimer */
.woocommerce table.shop_table .product-remove a {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: 36px !important;
    height: 36px !important;
    background: #fee !important;
    border-radius: 50% !important;
    color: #e74c3c !important;
    text-decoration: none !important;
    font-size: 1.2rem !important;
    transition: all 0.3s ease !important;
}

.woocommerce table.shop_table .product-remove a:hover {
    background: #e74c3c !important;
    color: white !important;
    transform: scale(1.1);
}

/* Boutons d'action */
.woocommerce-cart .actions {
    padding-top: 1.5rem;
    border-top: 2px solid #f0f0f0;
    margin-top: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.woocommerce-cart button[name="update_cart"] {
    background: linear-gradient(135deg, #7a9b3f 0%, #8bb350 100%) !important;
    color: white !important;
    padding: 1rem 2rem !important;
    border: none !important;
    border-radius: 10px !important;
    font-weight: 700 !important;
    font-size: 1rem !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    box-shadow: 0 4px 12px rgba(122, 155, 63, 0.3);
}

.woocommerce-cart button[name="update_cart"]:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(122, 155, 63, 0.4);
}

/* Totaux du panier */
.cart-collaterals {
    margin-top: 3rem;
}

.cart_totals {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06), 0 4px 16px rgba(0,0,0,0.08);
    max-width: 500px;
    margin-left: auto;
}

.cart_totals h2 {
    font-size: 1.8rem;
    color: #2a2a1f;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #f0f0f0;
}

.cart_totals table {
    width: 100%;
    border: none !important;
}

.cart_totals table th,
.cart_totals table td {
    padding: 1rem 0 !important;
    border: none !important;
    font-size: 1.1rem;
}

.cart_totals table th {
    font-weight: 600;
    color: #5a5a5a;
}

.cart_totals table td {
    text-align: right;
    font-weight: 700;
    color: #7a9b3f;
}

.cart_totals .order-total th,
.cart_totals .order-total td {
    font-size: 1.5rem !important;
    padding-top: 1.5rem !important;
    border-top: 2px solid #f0f0f0 !important;
}

/* Bouton Commander */
.woocommerce-cart .wc-proceed-to-checkout {
    padding-top: 1.5rem;
}

.woocommerce-cart .checkout-button {
    display: block !important;
    width: 100% !important;
    background: linear-gradient(135deg, #7a9b3f 0%, #8bb350 100%) !important;
    color: white !important;
    padding: 1.5rem !important;
    border: none !important;
    border-radius: 12px !important;
    font-weight: 700 !important;
    font-size: 1.2rem !important;
    text-align: center !important;
    text-decoration: none !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    box-shadow: 0 4px 16px rgba(122, 155, 63, 0.3);
}

.woocommerce-cart .checkout-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 24px rgba(122, 155, 63, 0.4);
}

/* Panier vide */
.woocommerce-cart .cart-empty,
.woocommerce-cart .woocommerce-info {
    text-align: center;
    padding: 4rem 2rem;
    background: white;
    border-radius: 16px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    font-size: 1.2rem;
    color: #5a5a5a;
}

.woocommerce-cart .ecolodeve-empty-cart {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 1.5rem;
    align-items: center;
    padding: 2rem 2.25rem;
    margin-bottom: 2rem;
    background: linear-gradient(135deg, #ffffff 0%, #f9f6ef 100%);
    border: 1px solid rgba(122, 155, 63, 0.15);
    border-radius: 18px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06), 0 8px 24px rgba(0,0,0,0.05);
}

.woocommerce-cart .ecolodeve-empty-cart__icon {
    width: 104px;
    height: 104px;
    border-radius: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(145deg, #ffffff 0%, #f6f9ef 100%);
    border: 1px solid rgba(122, 155, 63, 0.14);
    box-shadow: 0 18px 36px rgba(122, 155, 63, 0.12);
    padding: 1rem;
}

.woocommerce-cart .ecolodeve-empty-cart__icon svg {
    width: 100%;
    height: 100%;
    display: block;
}

.woocommerce-cart .ecolodeve-empty-cart__icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.woocommerce-cart .ecolodeve-empty-cart__content h2 {
    margin: 0 0 0.5rem;
    color: #2a2a1f;
    font-size: 1.8rem;
}

.woocommerce-cart .ecolodeve-empty-cart__content p {
    margin: 0;
    color: #5f6652;
    line-height: 1.65;
    max-width: 60ch;
}

.woocommerce-cart .ecolodeve-empty-cart__actions {
    margin: 0;
}

.woocommerce-cart .ecolodeve-empty-cart__actions .button {
    margin: 0;
    white-space: nowrap;
}

.woocommerce-cart .return-to-shop {
    text-align: center;
    margin-top: 2rem;
}

.woocommerce-cart .return-to-shop .button {
    background: linear-gradient(135deg, #7a9b3f 0%, #8bb350 100%) !important;
    color: white !important;
    padding: 1rem 2.5rem !important;
    border-radius: 10px !important;
    font-weight: 700 !important;
    text-decoration: none !important;
    display: inline-block !important;
    transition: all 0.3s ease !important;
}

.woocommerce-cart .return-to-shop .button:hover {
    transform: translateY(-2px);
}

.woocommerce-cart .cross-sells,
.woocommerce-cart .cart-empty + .cross-sells,
.woocommerce-cart .ecolodeve-empty-cart + .cross-sells {
    background: white;
    border-radius: 18px;
    padding: 2rem;
    margin-top: 2rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06), 0 8px 20px rgba(0,0,0,0.05);
}

.woocommerce-cart .cross-sells h2 {
    margin: 0 0 1.5rem;
    font-size: 2rem;
    line-height: 1.15;
    color: #2a2a1f;
    text-align: left;
}

.woocommerce-cart .cross-sells ul.products {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 1.5rem !important;
    margin: 0 !important;
    padding: 0 !important;
    list-style: none !important;
}

.woocommerce-cart .cross-sells ul.products li.product {
    display: flex !important;
    flex-direction: column !important;
    justify-content: flex-start !important;
    align-items: stretch !important;
    min-height: 100% !important;
    margin: 0 !important;
    padding: 1.25rem !important;
    background: #faf9f6 !important;
    border: 1px solid #ece8de !important;
    border-radius: 16px !important;
    box-shadow: none !important;
    text-align: left !important;
    float: none !important;
    width: 100% !important;
}

.woocommerce-cart .cross-sells ul.products li.product a.woocommerce-LoopProduct-link,
.woocommerce-cart .cross-sells ul.products li.product a.woocommerce-loop-product__link {
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    justify-content: flex-start !important;
    min-height: 0 !important;
    height: auto !important;
    text-decoration: none !important;
}

.woocommerce-cart .cross-sells ul.products li.product img {
    width: 100% !important;
    max-width: 100% !important;
    height: 220px !important;
    margin: 0 0 1rem !important;
    padding: 0.75rem !important;
    object-fit: contain !important;
    background: white !important;
    border-radius: 12px !important;
}

.woocommerce-cart .cross-sells ul.products li.product .woocommerce-loop-product__title {
    margin: 0 0 0.6rem !important;
    font-size: 1.05rem !important;
    line-height: 1.35 !important;
    color: #2a2a1f !important;
    min-height: 0 !important;
    display: block !important;
}

.woocommerce-cart .cross-sells ul.products li.product .price {
    margin: 0 0 1rem !important;
    font-size: 1.1rem !important;
    color: #7a9b3f !important;
    font-weight: 700 !important;
    display: block !important;
}

.woocommerce-cart .cross-sells ul.products li.product .button {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    align-self: flex-start !important;
    width: auto !important;
    max-width: 100% !important;
    min-height: 44px !important;
    margin: auto 0 0 !important;
    padding: 0.85rem 1.25rem !important;
    border-radius: 999px !important;
    white-space: normal !important;
    writing-mode: horizontal-tb !important;
    text-orientation: mixed !important;
    word-break: normal !important;
    line-height: 1.2 !important;
    text-align: center !important;
}

.woocommerce-cart .cross-sells ul.products li.product .button::before {
    content: none !important;
}

/* Cart block: empty state and "New in store" products */
.woocommerce-cart .wp-block-woocommerce-cart {
    max-width: 1200px;
    margin: 0 auto;
}

.woocommerce-cart .wp-block-woocommerce-empty-cart-block {
    display: grid;
    gap: 1.5rem;
    justify-items: stretch;
    background: white;
    border: 1px solid #ece8de;
    border-radius: 20px;
    padding: 2.5rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06), 0 8px 20px rgba(0,0,0,0.05);
}

.woocommerce-cart .wp-block-woocommerce-empty-cart-block > * {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
}

.woocommerce-cart .wc-block-cart__empty-cart__title {
    margin: 0;
    font-size: 2rem !important;
    line-height: 1.15;
    color: #2a2a1f;
}

.woocommerce-cart .wc-block-cart__empty-cart__title.with-empty-cart-icon {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.wc-block-cart__empty-cart__title.with-empty-cart-icon::before,
.woocommerce-cart .wc-block-cart__empty-cart__title.with-empty-cart-icon::before {
    content: '' !important;
    width: 104px;
    height: 104px;
    border-radius: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: #fff !important;
    background-image: url("../images/cart-empty-tabler.svg") !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
    background-size: 78px 64px !important;
    border: 1px solid rgba(122, 155, 63, 0.14) !important;
    box-shadow: 0 18px 36px rgba(122, 155, 63, 0.12) !important;
    margin: 0 auto 1.25rem auto !important;
}

.wc-block-cart__empty-cart__title.with-empty-cart-icon svg,
.wc-block-cart__empty-cart__title.with-empty-cart-icon img:not(.ecolodeve-cart-empty-block-icon),
.woocommerce-cart .wc-block-cart__empty-cart__title.with-empty-cart-icon svg,
.woocommerce-cart .wc-block-cart__empty-cart__title.with-empty-cart-icon img:not(.ecolodeve-cart-empty-block-icon) {
    display: none !important;
}

.wc-block-cart__empty-cart__title.ecolodeve-cart-empty-title-patched::before,
.woocommerce-cart .wc-block-cart__empty-cart__title.ecolodeve-cart-empty-title-patched::before {
    display: none !important;
    content: none !important;
    background: none !important;
    mask-image: none !important;
    -webkit-mask-image: none !important;
}

.ecolodeve-cart-empty-block-icon,
.woocommerce-cart .ecolodeve-cart-empty-block-icon {
    width: 104px !important;
    height: 104px !important;
    display: block !important;
    object-fit: contain !important;
    margin: 0 auto 1.25rem auto !important;
    padding: 14px !important;
    border-radius: 28px !important;
    background: linear-gradient(145deg, #ffffff 0%, #f6f9ef 100%) !important;
    border: 1px solid rgba(122, 155, 63, 0.14) !important;
    box-shadow: 0 18px 36px rgba(122, 155, 63, 0.12) !important;
}

.woocommerce-cart .wp-block-woocommerce-empty-cart-block > .wp-block-heading:not(.wc-block-cart__empty-cart__title) {
    margin: 0.5rem 0 0;
    text-align: left !important;
    font-size: 2rem !important;
    line-height: 1.1;
    color: #2a2a1f;
}

.woocommerce-cart .wp-block-woocommerce-empty-cart-block .wp-block-separator {
    width: 100%;
    margin: 0;
    opacity: 0.4;
}

.woocommerce-cart .wc-block-grid__products,
.woocommerce-cart ul.wc-block-grid__products {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 1.5rem !important;
    margin: 0 !important;
    padding: 0 !important;
    list-style: none !important;
}

.woocommerce-cart .wp-block-woocommerce-product-collection,
.woocommerce-cart .wp-block-woocommerce-product-new,
.woocommerce-cart .wc-block-product-template,
.woocommerce-cart ul.wc-block-product-template,
.woocommerce-cart .wc-block-product-template.is-flex-container,
.woocommerce-cart ul.wc-block-product-template.is-flex-container,
.woocommerce-cart .wc-block-product-template__responsive,
.woocommerce-cart .wp-block-post-template,
.woocommerce-cart ul.wp-block-post-template {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
}

.woocommerce-cart .wc-block-product-template,
.woocommerce-cart ul.wc-block-product-template,
.woocommerce-cart .wc-block-product-template.is-flex-container,
.woocommerce-cart ul.wc-block-product-template.is-flex-container,
.woocommerce-cart .wc-block-product-template__responsive,
.woocommerce-cart .wp-block-post-template,
.woocommerce-cart ul.wp-block-post-template {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 1.5rem !important;
    margin: 0 !important;
    padding: 0 !important;
    list-style: none !important;
}

.woocommerce-cart .wc-block-grid__product,
.woocommerce-cart li.wc-block-grid__product,
.woocommerce-cart .wc-block-product,
.woocommerce-cart li.wc-block-product,
.woocommerce-cart .wp-block-post,
.woocommerce-cart li.wp-block-post {
    display: flex !important;
    flex-direction: column !important;
    justify-content: flex-start !important;
    align-items: stretch !important;
    width: auto !important;
    max-width: none !important;
    min-width: 0 !important;
    margin: 0 !important;
    padding: 1.25rem !important;
    background: #faf9f6 !important;
    border: 1px solid #ece8de !important;
    border-radius: 16px !important;
    box-shadow: none !important;
    float: none !important;
    flex: none !important;
    text-align: left !important;
}

.woocommerce-cart .wc-block-grid__product-link {
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 0.75rem !important;
    text-decoration: none !important;
}

.woocommerce-cart .wc-block-product > *,
.woocommerce-cart .wp-block-post > * {
    width: 100%;
    max-width: 100%;
    min-width: 0;
}

.woocommerce-cart .wc-block-grid__product-image,
.woocommerce-cart .wc-block-grid__product-image img,
.woocommerce-cart .wc-block-components-product-image,
.woocommerce-cart .wc-block-components-product-image img {
    width: 100% !important;
}

.woocommerce-cart .wc-block-grid__product-image img {
    height: 220px !important;
    max-width: 100% !important;
    object-fit: contain !important;
    background: white !important;
    border-radius: 12px !important;
    padding: 0.75rem !important;
}

.woocommerce-cart .wc-block-components-product-image img {
    height: 220px !important;
    max-width: 100% !important;
    object-fit: contain !important;
    background: white !important;
    border-radius: 12px !important;
    padding: 0.75rem !important;
}

.woocommerce-cart .wc-block-grid__product-title,
.woocommerce-cart .wc-block-components-product-title {
    margin: 0 !important;
    padding: 0 !important;
    font-size: 1.05rem !important;
    line-height: 1.35 !important;
    font-weight: 600 !important;
    color: #2a2a1f !important;
    text-align: left !important;
}

.woocommerce-cart .wc-block-grid__product-price,
.woocommerce-cart .wc-block-components-product-price {
    margin: 0 !important;
    font-size: 1.1rem !important;
    line-height: 1.3 !important;
    font-weight: 700 !important;
    color: #7a9b3f !important;
    text-align: left !important;
}

.woocommerce-cart .wc-block-grid__product-add-to-cart,
.woocommerce-cart .wc-block-components-product-button {
    margin: auto 0 0 !important;
    width: auto !important;
    text-align: left !important;
}

.woocommerce-cart .wc-block-grid__product-add-to-cart .wp-block-button__link,
.woocommerce-cart .wc-block-components-product-button__button,
.woocommerce-cart .wp-block-woocommerce-product-button .wp-block-button__link {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: auto !important;
    max-width: 100% !important;
    min-height: 44px !important;
    margin: 0 !important;
    padding: 0.85rem 1.25rem !important;
    border-radius: 999px !important;
    white-space: nowrap !important;
    word-break: normal !important;
    writing-mode: horizontal-tb !important;
    text-orientation: mixed !important;
    line-height: 1.2 !important;
    text-align: center !important;
}

/* Responsive */
@media (max-width: 768px) {
    .woocommerce table.shop_table {
        font-size: 0.9rem;
    }

    .woocommerce table.shop_table thead th,
    .woocommerce table.shop_table tbody td {
        padding: 1rem 0.5rem !important;
    }

    .woocommerce table.shop_table .product-name a {
        font-size: 1rem;
    }

    .cart_totals {
        max-width: 100%;
    }

    .woocommerce-cart .actions {
        flex-direction: column;
        align-items: stretch;
    }

    .woocommerce-cart .ecolodeve-empty-cart {
        grid-template-columns: 1fr;
        text-align: center;
        justify-items: center;
    }

    .woocommerce-cart .cross-sells ul.products {
        grid-template-columns: 1fr !important;
    }

    .woocommerce-cart .wp-block-woocommerce-empty-cart-block {
        padding: 1.5rem;
    }

    .woocommerce-cart .wp-block-woocommerce-empty-cart-block > .wp-block-heading:not(.wc-block-cart__empty-cart__title) {
        text-align: center !important;
        font-size: 1.6rem !important;
    }

    .woocommerce-cart .wc-block-grid__products,
    .woocommerce-cart ul.wc-block-grid__products,
    .woocommerce-cart .wc-block-product-template,
    .woocommerce-cart ul.wc-block-product-template,
    .woocommerce-cart .wc-block-product-template.is-flex-container,
    .woocommerce-cart ul.wc-block-product-template.is-flex-container,
    .woocommerce-cart .wc-block-product-template__responsive,
    .woocommerce-cart .wp-block-post-template,
    .woocommerce-cart ul.wp-block-post-template {
        grid-template-columns: 1fr !important;
    }
}

/* ==========================================================================
   CRITICAL FIX: Forced Full Width Layout for Cart Page
   Ensures the cart and its components are not squeezed into a narrow column.
   ========================================================================== */

.woocommerce-cart .container {
    max-width: 1300px !important;
    width: 100% !important;
}

.woocommerce-cart .content-section {
    max-width: 100% !important;
    width: 100% !important;
    padding: 3rem !important;
    display: block !important;
}

.woocommerce-cart .page-content-inner {
    max-width: 100% !important;
    width: 100% !important;
    margin: 0 !important;
}

.woocommerce-cart .wp-block-woocommerce-cart {
    width: 100% !important;
    max-width: 1200px !important;
    margin: 0 auto !important;
}

.woocommerce-cart .wp-block-woocommerce-empty-cart-block {
    width: 100% !important;
    max-width: 1100px !important;
    margin: 0 auto !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
}

.woocommerce-cart .wc-block-grid__products,
.woocommerce-cart ul.wc-block-grid__products,
.woocommerce-cart .wc-block-product-template,
.woocommerce-cart ul.wc-block-product-template {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
    width: 100% !important;
    gap: 20px !important;
}

.woocommerce-cart .wc-block-grid__product,
.woocommerce-cart li.wc-block-grid__product,
.woocommerce-cart .wc-block-product,
.woocommerce-cart li.wc-block-product {
    width: 100% !important;
    max-width: none !important;
    flex: 1 1 auto !important;
}


/* Safety fix for cart with items */
.woocommerce-cart .woocommerce-cart-form,
.woocommerce-cart .cart-collaterals {
    width: 100% !important;
    max-width: 1200px !important;
    margin-left: auto !important;
    margin-right: auto !important;
}


/* Modernization of the empty cart card */
.woocommerce-cart .wp-block-woocommerce-empty-cart-block {
    background: #ffffff !important;
    border: none !important;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08) !important;
    padding: 3rem !important;
}

.woocommerce-cart .wc-block-cart__empty-cart__title {
    font-size: 2.5rem !important;
    font-weight: 800 !important;
    color: #2a2a1f !important;
    margin-bottom: 2rem !important;
}

.woocommerce-cart .wc-block-cart__empty-cart__title.with-empty-cart-icon::before {
    background-color: #fff !important;
    background-image: url("../images/cart-empty-tabler.svg") !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
    background-size: 74px 62px !important;
    width: 96px !important;
    height: 96px !important;
    border: 1px solid rgba(122, 155, 63, 0.14) !important;
    border-radius: 28px !important;
    box-shadow: 0 18px 36px rgba(122, 155, 63, 0.12) !important;
    margin-bottom: 1.5rem !important;
}

.woocommerce-cart .wp-block-woocommerce-empty-cart-block .wp-block-button__link {
    background: #7a9b3f !important;
    padding: 1rem 2.5rem !important;
    border-radius: 12px !important;
    font-weight: 700 !important;
    transition: all 0.3s ease !important;
}

.woocommerce-cart .wp-block-woocommerce-empty-cart-block .wp-block-button__link:hover {
    background: #8bb350 !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 5px 15px rgba(122, 155, 63, 0.3) !important;
}

.woocommerce-cart .wp-block-woocommerce-empty-cart-block > .wp-block-heading:not(.wc-block-cart__empty-cart__title) {
    margin-top: 3rem !important;
    margin-bottom: 2rem !important;
    text-align: center !important;
    font-size: 1.8rem !important;
    position: relative !important;
    padding-bottom: 1rem !important;
}

.woocommerce-cart .wp-block-woocommerce-empty-cart-block > .wp-block-heading:not(.wc-block-cart__empty-cart__title)::after {
    content: '' !important;
    position: absolute !important;
    bottom: 0 !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    width: 60px !important;
    height: 3px !important;
    background: #7a9b3f !important;
    border-radius: 3px !important;
}


/* Center the section title in empty cart */
.woocommerce-cart .wp-block-woocommerce-empty-cart-block > .wp-block-heading:not(.wc-block-cart__empty-cart__title) {
    width: 100% !important;
    max-width: 100% !important;
    text-align: center !important;
}


/* Ensure Contact Page Grid is Robust */
.presentation-layout-grid {
    display: grid !important;
    grid-template-columns: 2.5fr 1fr !important;
    gap: 2rem !important;
}

@media (max-width: 992px) {
    .presentation-layout-grid {
        grid-template-columns: 1fr !important;
    }
}


/* Fix for heading alignment in the block */
.woocommerce-cart .wp-block-woocommerce-empty-cart-block {
    text-align: center !important;
}

.woocommerce-cart .wc-block-cart__empty-cart__title {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
}

/* Ensure the title text doesn't overlap and is well-spaced */
.woocommerce-cart .wc-block-cart__empty-cart__title {
    gap: 1rem !important;
}

/* ==========================================================================
   AMÉLIORATION DESIGN PANIER — mode catalogue / devis (responsive complet)
   - Desktop ≥1100px : 2 colonnes (produits à gauche, récap collant à droite)
   - Tablette 768–1099px : 1 colonne, tableau pleine largeur, récap à droite
   - Mobile <768px : chaque ligne produit devient une carte empilée
   ========================================================================== */

/* En-tête de page plus compact */
.woocommerce-cart .woocommerce,
.woocommerce-cart main {
    padding: 2rem 1.25rem 3rem !important;
}
.woocommerce-cart .entry-title,
.woocommerce-cart h1 {
    margin-bottom: 2rem !important;
}

/* Récupérer de la largeur sur la page panier (wrapper de contenu) */
.woocommerce-cart .content-section {
    padding-left: 1.5rem !important;
    padding-right: 1.5rem !important;
}

/* Filet de sécurité : jamais de débordement horizontal */
.woocommerce-cart form.woocommerce-cart-form {
    max-width: 100%;
}

/* Lignes produits plus compactes (vertical ET horizontal) */
.woocommerce table.shop_table tbody td {
    padding: 1.05rem 0.6rem !important;
}
.woocommerce table.shop_table thead th {
    padding: 1.2rem 0.6rem !important;
}

/* Image produit : taille homogène, fond doux pour les placeholders */
.woocommerce table.shop_table .product-thumbnail img {
    width: 64px !important;
    height: 64px !important;
    max-width: 64px !important;
    object-fit: cover;
    background: #f3efe6;
}

/* Carte récapitulatif : neutralise le `width:48%; float:right` de WooCommerce.
   Par défaut (1 colonne) : carte contrainte, alignée à droite. */
.woocommerce-cart .cart-collaterals {
    margin-top: 2rem;
    padding: 0 !important;
    width: 100% !important;
    float: none !important;
}
.woocommerce-cart .cart-collaterals .cart_totals {
    float: none !important;
    width: 100% !important;
    max-width: 460px !important;
    margin: 0 0 0 auto !important;
}

/* Ligne d'actions : code promo sur une ligne, « Mettre à jour » dessous. */
.woocommerce-cart td.actions .coupon {
    display: inline-flex !important;
    align-items: center;
    gap: 0.5rem;
    margin: 0 !important;
    vertical-align: middle !important;
}
html body.woocommerce-cart td.actions button[name="update_cart"] {
    display: block !important;
    float: none !important;
    margin: 1.25rem 0 0 !important;
    width: auto !important;
}

/* ===== Desktop ≥1100px : 2 colonnes ===== */
@media (min-width: 1100px) {
    .woocommerce-cart .woocommerce {
        display: grid;
        grid-template-columns: minmax(0, 1fr) 320px;
        gap: 0 2rem;
        align-items: start;
    }
    .woocommerce-cart .woocommerce > .woocommerce-notices-wrapper {
        grid-column: 1 / -1;
    }
    .woocommerce-cart form.woocommerce-cart-form {
        grid-column: 1;
        margin-bottom: 0 !important;
    }
    .woocommerce-cart .cart-collaterals {
        grid-column: 2;
        width: 100%;
        margin-top: 0;
    }
    .woocommerce-cart .cart-collaterals .cart_totals {
        max-width: none !important;
        margin: 0 !important;
        position: sticky;
        top: 110px;
    }
}

/* ===== Mobile <768px : lignes produits en cartes empilées ===== */
@media (max-width: 767.98px) {
    .woocommerce-cart table.shop_table thead {
        display: none !important;
    }
    .woocommerce-cart table.shop_table,
    .woocommerce-cart table.shop_table tbody {
        display: block !important;
        width: 100% !important;
    }
    .woocommerce-cart table.shop_table tbody tr {
        display: block !important;
        position: relative;
        border: 1px solid #ececec !important;
        border-radius: 12px;
        margin: 0 0 1rem !important;
        padding: 0.5rem 0.85rem 0.85rem !important;
        background: #fff;
    }
    .woocommerce-cart table.shop_table tbody td {
        display: flex !important;
        justify-content: space-between;
        align-items: center;
        gap: 1rem;
        text-align: right !important;
        padding: 0.55rem 0 !important;
        border: none !important;
        border-top: 1px solid #f4f4f4 !important;
    }
    .woocommerce-cart table.shop_table tbody td::before {
        content: attr(data-title);
        font-weight: 700;
        color: #2a2a1f;
        text-align: left;
        white-space: nowrap;
    }
    /* Image centrée en haut de la carte, sans label */
    .woocommerce-cart table.shop_table tbody td.product-thumbnail {
        justify-content: center;
        border-top: none !important;
        padding: 0.5rem 0 0.25rem !important;
    }
    .woocommerce-cart table.shop_table tbody td.product-thumbnail::before {
        display: none;
    }
    .woocommerce-cart table.shop_table .product-thumbnail img {
        width: 90px !important;
        height: 90px !important;
        max-width: 90px !important;
    }
    /* Nom produit : pleine largeur, sans label */
    .woocommerce-cart table.shop_table tbody td.product-name {
        display: block !important;
        text-align: left !important;
        font-weight: 700;
        border-top: none !important;
    }
    .woocommerce-cart table.shop_table tbody td.product-name::before {
        display: none;
    }
    /* Bouton supprimer : coin haut droit de la carte */
    .woocommerce-cart table.shop_table tbody td.product-remove {
        position: absolute;
        top: 0.4rem;
        right: 0.4rem;
        padding: 0 !important;
        border: none !important;
    }
    .woocommerce-cart table.shop_table tbody td.product-remove::before {
        display: none;
    }
    /* Ligne d'actions empilée */
    .woocommerce-cart td.actions {
        display: block !important;
    }
    .woocommerce-cart td.actions .coupon {
        display: flex !important;
        flex-wrap: wrap;
        width: 100%;
    }
    .woocommerce-cart td.actions .coupon input.input-text {
        flex: 1 1 140px;
        min-width: 0;
    }
    /* Récap pleine largeur sur mobile */
    .woocommerce-cart .cart-collaterals .cart_totals {
        max-width: none !important;
        margin: 0 !important;
    }
}

