/* ==========================================================================
   Kesli - Page Panier - Style Postero EXACT
   ========================================================================== */

/* ==========================================================================
   Container Principal
   ========================================================================== */

.kesli-cart-wrapper {
    max-width: 1410px;
    margin: 0 auto;
    padding: 40px 15px;
}

/* Breadcrumb */
.kesli-cart-breadcrumb {
    margin-bottom: 30px;
    font-size: 13px;
    color: #999;
}

.kesli-cart-breadcrumb a {
    color: #999;
    text-decoration: none;
}

.kesli-cart-breadcrumb a:hover {
    color: #000;
}

.kesli-cart-breadcrumb .separator {
    margin: 0 8px;
    color: #ccc;
}

.kesli-cart-breadcrumb .current {
    color: #000;
}

/* ==========================================================================
   Layout 2 colonnes
   ========================================================================== */

.kesli-cart-layout {
    display: flex;
    gap: 45px;
    align-items: flex-start;
}

/* Colonne gauche - Produits */
.kesli-cart-products {
    flex: 1;
    min-width: 0;
}

/* Colonne droite - Cart Totals */
.kesli-cart-sidebar {
    width: 440px;
    flex-shrink: 0;
}

/* ==========================================================================
   Table Panier - Styles Postero EXACT
   ========================================================================== */

.kesli-cart-products table.shop_table.cart {
    width: 100%;
    margin: 0 0 55px;
    border: none;
    background: transparent;
    color: #555;
    font-size: 15px;
    font-weight: 400;
    line-height: 24px;
}

.kesli-cart-products table.shop_table.cart thead th {
    padding: 21px 21px 21px 0;
    font-size: 13px;
    font-weight: 600;
    line-height: 20.8px;
    color: #000;
    text-align: left;
    border: none;
    border-bottom: 1px solid #dedace;
    background: transparent;
}

/* Colonne Remove */
.kesli-cart-products table.shop_table.cart .product-remove {
    width: 48px;
    padding: 21px 21px 21px 0;
    text-align: left;
}

.kesli-cart-products table.shop_table.cart .product-remove .remove {
    display: block;
    width: 24px;
    height: 24px;
    font-size: 15px;
    font-weight: 400;
    line-height: 24px;
    text-align: center;
    color: #000;
    text-decoration: none;
    background: transparent;
}

.kesli-cart-products table.shop_table.cart .product-remove .remove:hover {
    color: #CA9236;
}

/* Colonne Thumbnail */
.kesli-cart-products table.shop_table.cart .product-thumbnail {
    width: 180px;
    padding: 21px 21px 21px 0;
    background: transparent !important;
}

.kesli-cart-products table.shop_table.cart .product-thumbnail a {
    display: block;
    background: transparent;
}

.kesli-cart-products table.shop_table.cart .product-thumbnail img {
    width: 120px;
    height: auto;
    margin: 0;
    display: block;
    background: transparent;
}

/* Colonne Product Name */
.kesli-cart-products table.shop_table.cart td.product-name {
    padding: 24px 24px 24px 0;
    color: #555;
    font-size: 15px;
    font-weight: 400;
    line-height: 24px;
    text-align: left;
    vertical-align: middle;
    border: none;
    border-bottom: 1px solid #dedace;
    background: transparent;
}

.kesli-cart-products table.shop_table.cart td.product-name a {
    color: #000;
    font-weight: 600;
    text-decoration: none;
}

.kesli-cart-products table.shop_table.cart td.product-name a:hover {
    color: #CA9236;
}

.kesli-cart-products table.shop_table.cart td.product-name .variation {
    margin-top: 5px;
    font-size: 13px;
    color: #888;
}

.kesli-cart-products table.shop_table.cart td.product-name .variation dt,
.kesli-cart-products table.shop_table.cart td.product-name .variation dd {
    display: inline;
    margin: 0;
    padding: 0;
}

.kesli-cart-products table.shop_table.cart td.product-name .variation dd p {
    display: inline;
    margin: 0;
}

/* Colonne Price */
.kesli-cart-products table.shop_table.cart td.product-price {
    width: 143px;
    padding: 24px 24px 24px 0;
    color: #555;
    font-size: 15px;
    font-weight: 400;
    line-height: 24px;
    text-align: left;
    vertical-align: middle;
    border: none;
    border-bottom: 1px solid #dedace;
    background: transparent;
}

/* Colonne Quantity */
.kesli-cart-products table.shop_table.cart td.product-quantity {
    width: 168px;
    padding: 24px 24px 24px 0;
    color: #555;
    font-size: 15px;
    font-weight: 400;
    line-height: 24px;
    text-align: left;
    vertical-align: middle;
    border: none;
    border-bottom: 1px solid #dedace;
    background: transparent;
}

/* Quantity selector - Utilise les mêmes classes kesli-* que la page produit */
.kesli-quantity-wrapper {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    border: 1px solid #dedace !important;
    border-radius: 0 !important;
    overflow: hidden !important;
    background: #fff !important;
}

.kesli-qty-btn {
    width: 40px !important;
    height: 50px !important;
    background: #fff !important;
    border: none !important;
    font-size: 18px !important;
    font-weight: 400 !important;
    color: #333 !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: color 0.2s ease !important;
    box-shadow: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

.kesli-qty-btn:hover {
    color: #CD6B5B !important;
    background: #fff !important;
}

.kesli-quantity,
input.kesli-quantity {
    width: 50px !important;
    height: 50px !important;
    border: none !important;
    border-left: 1px solid #dedace !important;
    border-right: 1px solid #dedace !important;
    text-align: center !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    background: #fff !important;
    box-shadow: none !important;
    -moz-appearance: textfield !important;
    -webkit-appearance: none !important;
    padding: 0 !important;
    margin: 0 !important;
    border-radius: 0 !important;
    outline: none !important;
    color: #000 !important;
}

.kesli-quantity:focus,
input.kesli-quantity:focus {
    border: none !important;
    border-left: 1px solid #dedace !important;
    border-right: 1px solid #dedace !important;
    box-shadow: none !important;
    outline: none !important;
    background: #fff !important;
}

.kesli-quantity::-webkit-outer-spin-button,
.kesli-quantity::-webkit-inner-spin-button,
input.kesli-quantity::-webkit-outer-spin-button,
input.kesli-quantity::-webkit-inner-spin-button {
    -webkit-appearance: none !important;
    margin: 0 !important;
}

/* Colonne Subtotal */
.kesli-cart-products table.shop_table.cart td.product-subtotal {
    width: 143px;
    padding: 24px 24px 24px 0;
    color: #555;
    font-size: 15px;
    font-weight: 400;
    line-height: 24px;
    text-align: left;
    vertical-align: middle;
    border: none;
    border-bottom: 1px solid #dedace;
    background: transparent;
}

/* ==========================================================================
   Actions (Coupon + Update Cart) - Styles Postero EXACT
   ========================================================================== */

.kesli-cart-actions {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 30px 0 0;
}

.kesli-coupon-form {
    display: flex;
    align-items: center;
}

.kesli-coupon-input,
input[type="text"].kesli-coupon-input,
.woocommerce input.kesli-coupon-input {
    width: 265px;
    height: 58px;
    padding: 14px 30px !important;
    margin: 0 10px 0 0;
    font-size: 15px;
    font-weight: 500;
    line-height: 21px;
    color: #555 !important;
    background: #fff !important;
    background-color: #fff !important;
    border: 1px solid #000 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    -webkit-appearance: none !important;
}

.kesli-coupon-input::placeholder {
    color: #999;
}

.kesli-coupon-input:focus,
input[type="text"].kesli-coupon-input:focus {
    outline: none;
    border-color: #000 !important;
    box-shadow: none !important;
}

.kesli-coupon-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 58px;
    padding: 14px 40px;
    font-size: 11px;
    font-weight: 600;
    line-height: 30px;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: #fff;
    background: #CD6B5B;
    border: none;
    border-radius: 0;
    cursor: pointer;
}

.kesli-coupon-btn:hover {
    background: #b85a4a;
}

.kesli-update-cart-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 58px;
    padding: 14px 40px;
    margin-left: auto;
    font-size: 11px;
    font-weight: 600;
    line-height: 30px;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: #fff;
    background: #CD6B5B;
    border: none;
    border-radius: 0;
    cursor: pointer;
}

.kesli-update-cart-btn:hover {
    background: #b85a4a;
}

.kesli-update-cart-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ==========================================================================
   Cart Totals (Sidebar) - Styles Postero EXACT
   ========================================================================== */

.kesli-cart-sidebar .cart_totals {
    padding: 30px 30px 40px;
    background: #fff;
    border: 6px solid #CD6B5B;
    border-radius: 5px;
    color: #555;
    font-size: 15px;
    font-weight: 400;
    line-height: 24px;
}

.kesli-cart-sidebar .cart_totals > h2 {
    margin: 0 0 15px;
    font-size: 28px;
    font-weight: 700;
    line-height: 30.8px;
    color: #000;
}

.kesli-cart-sidebar .cart_totals table.shop_table {
    width: 100%;
    margin: 0 0 21px;
    border: none;
    background: transparent;
}

.kesli-cart-sidebar .cart_totals table.shop_table tr {
    border-bottom: 1px solid #ebebeb;
}

.kesli-cart-sidebar .cart_totals table.shop_table tr:last-child {
    border-bottom: none;
}

.kesli-cart-sidebar .cart_totals table.shop_table th,
.kesli-cart-sidebar .cart_totals table.shop_table td {
    padding: 18px 0;
    border: none;
    background: transparent;
}

.kesli-cart-sidebar .cart_totals table.shop_table th {
    font-size: 18px;
    font-weight: 600;
    line-height: 1.6;
    color: #000;
    text-align: left;
    vertical-align: top;
}

.kesli-cart-sidebar .cart_totals table.shop_table td {
    font-size: 15px;
    font-weight: 400;
    line-height: 1.6;
    color: #555;
    text-align: right;
    vertical-align: top;
}

.kesli-cart-sidebar .cart_totals .order-total th,
.kesli-cart-sidebar .cart_totals .order-total td {
    padding-top: 25px;
}

.kesli-cart-sidebar .cart_totals .order-total td {
    font-size: 24px;
    font-weight: 700;
    color: #000;
}

.kesli-cart-sidebar .cart_totals .order-total td strong {
    font-weight: 700;
}

/* Bouton Checkout - Styles Postero EXACT */
.kesli-cart-sidebar .wc-proceed-to-checkout {
    padding: 0;
}

.kesli-cart-sidebar .wc-proceed-to-checkout a.checkout-button {
    display: block;
    width: 100%;
    height: 58px;
    padding: 14px 40px;
    font-size: 11px;
    font-weight: 600;
    line-height: 30px;
    letter-spacing: 2px;
    text-transform: uppercase;
    text-align: center;
    color: #fff !important;
    background: #CD6B5B !important;
    border: none;
    border-radius: 0;
}

.kesli-cart-sidebar .wc-proceed-to-checkout a.checkout-button:hover {
    background: #b85a4a !important;
}

/* ==========================================================================
   Cross-sells - En pleine largeur, APRÈS le bouton Commander
   ========================================================================== */

.kesli-cross-sells {
    margin-top: 60px;
    padding-top: 40px;
    border-top: 1px solid #dedace;
}

.kesli-cross-sells > h2,
.kesli-cross-sells .cross-sells > h2 {
    font-size: 28px;
    font-weight: 700;
    line-height: 1.1;
    color: #000;
    margin: 0 0 30px;
}

/* ==========================================================================
   Cross-sells Grid - Style Coups de Cœur Compact
   ========================================================================== */

.kesli-cross-sells .cross-sells-grid {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 20px !important;
    max-width: 100%;
}

.kesli-cross-sells .product-card {
    position: relative;
    cursor: pointer;
    display: flex;
    flex-direction: column;
}

.kesli-cross-sells .product-image-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    border-radius: 0;
}

.kesli-cross-sells .product-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.kesli-cross-sells .product-image-main {
    transition: opacity 0.4s ease;
}

.kesli-cross-sells .product-image-hover {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.kesli-cross-sells .product-card:hover .product-image-hover {
    opacity: 1;
}

.kesli-cross-sells .product-card:hover .product-image-main {
    opacity: 0;
}

/* Bouton Add to Cart au hover */
.kesli-cross-sells .product-hover-actions {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 10;
}

.kesli-cross-sells .product-card:hover .product-hover-actions {
    opacity: 1;
}

.kesli-cross-sells .product-hover-actions .button,
.kesli-cross-sells .product-hover-actions .add_to_cart_button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #ffffff;
    color: #000000;
    padding: 10px 16px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    border: none;
    border-radius: 0;
    cursor: pointer;
    text-decoration: none;
    white-space: nowrap;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
}

.kesli-cross-sells .product-hover-actions .button::before,
.kesli-cross-sells .product-hover-actions .add_to_cart_button::before {
    content: '';
    display: inline-block;
    width: 16px;
    height: 16px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 2L3 6v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V6l-3-4z'%3E%3C/path%3E%3Cline x1='3' y1='6' x2='21' y2='6'%3E%3C/line%3E%3Cpath d='M16 10a4 4 0 0 1-8 0'%3E%3C/path%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
}

.kesli-cross-sells .product-hover-actions .button:hover,
.kesli-cross-sells .product-hover-actions .add_to_cart_button:hover {
    background: #CD6B5B;
    color: #ffffff;
}

.kesli-cross-sells .product-hover-actions .button:hover::before,
.kesli-cross-sells .product-hover-actions .add_to_cart_button:hover::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 2L3 6v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V6l-3-4z'%3E%3C/path%3E%3Cline x1='3' y1='6' x2='21' y2='6'%3E%3C/line%3E%3Cpath d='M16 10a4 4 0 0 1-8 0'%3E%3C/path%3E%3C/svg%3E");
}

/* Infos produit compactes */
.kesli-cross-sells .product-info {
    text-align: left;
    padding: 12px 0 0;
}

.kesli-cross-sells .product-category {
    font-size: 10px;
    font-weight: 600;
    line-height: 1;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: rgb(144, 144, 144);
    margin: 0 0 5px;
    display: block;
}

.kesli-cross-sells .product-title {
    font-size: 15px;
    font-weight: 400;
    line-height: 1.4;
    color: rgb(0, 0, 0);
    margin: 0 0 5px;
}

.kesli-cross-sells .product-title a {
    color: rgb(0, 0, 0);
    text-decoration: none;
}

.kesli-cross-sells .product-title a:hover {
    color: #CD6B5B;
}

.kesli-cross-sells .product-price {
    font-size: 14px;
    font-weight: 400;
    color: rgb(0, 0, 0);
}

/* Cross-sells Responsive */
@media (max-width: 1200px) {
    .kesli-cross-sells .cross-sells-grid {
        grid-template-columns: repeat(3, 1fr) !important;
    }
}

@media (max-width: 900px) {
    .kesli-cross-sells .cross-sells-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 15px !important;
    }
}

@media (max-width: 600px) {
    .kesli-cross-sells .cross-sells-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 12px !important;
    }

    .kesli-cross-sells .product-info {
        padding: 10px 0 0;
    }

    .kesli-cross-sells .product-category {
        font-size: 9px;
    }

    .kesli-cross-sells .product-title {
        font-size: 13px;
    }

    .kesli-cross-sells .product-price {
        font-size: 13px;
    }

    .kesli-cross-sells .product-hover-actions {
        bottom: 10px;
    }

    .kesli-cross-sells .product-hover-actions .button,
    .kesli-cross-sells .product-hover-actions .add_to_cart_button {
        padding: 8px 12px;
        font-size: 10px;
    }
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 1200px) {
    .kesli-cart-layout {
        gap: 30px;
    }

    .kesli-cart-sidebar {
        width: 380px;
    }
}

@media (max-width: 1373px) {
    .kesli-cart-layout {
        flex-direction: column;
    }

    .kesli-cart-products {
        width: 100%;
    }

    .kesli-cart-sidebar {
        width: 100%;
        max-width: 450px;
    }
}

@media (max-width: 768px) {
    .kesli-cart-products table.shop_table.cart thead {
        display: none;
    }

    .kesli-cart-products table.shop_table.cart tr {
        display: flex;
        flex-wrap: wrap;
        padding: 20px 0;
        border-bottom: 1px solid #dedace;
    }

    .kesli-cart-products table.shop_table.cart td {
        padding: 5px 0;
        border: none;
    }

    .kesli-cart-products table.shop_table.cart .product-remove {
        width: auto;
    }

    .kesli-cart-products table.shop_table.cart .product-thumbnail {
        width: 80px;
    }

    .kesli-cart-products table.shop_table.cart .product-thumbnail img {
        width: 60px;
        margin: 0;
    }

    .kesli-cart-products table.shop_table.cart td.product-name {
        width: calc(100% - 140px);
    }

    .kesli-cart-products table.shop_table.cart td.product-price,
    .kesli-cart-products table.shop_table.cart td.product-quantity,
    .kesli-cart-products table.shop_table.cart td.product-subtotal {
        width: 33.333%;
        text-align: center;
        padding-top: 15px;
    }

    .kesli-cart-actions {
        flex-direction: column;
        gap: 15px;
    }

    .kesli-coupon-form {
        width: 100%;
        flex-direction: column;
    }

    .kesli-coupon-input {
        width: 100%;
        margin-right: 0;
        margin-bottom: 10px;
    }

    .kesli-coupon-btn,
    .kesli-update-cart-btn {
        width: 100%;
        margin-left: 0;
    }
}
