/**
 * Orpixel Clean Cart - Modern 2-Column Layout
 * Designed for Online Klas
 */

/* ==========================================================================
   1. STRUCTURE GLOBALE (GRID/FLEX)
   ========================================================================== */

@media (min-width: 769px) {

    /* Conteneur principal WooCommerce */
    .woocommerce-cart .woocommerce {
        display: flex !important;
        flex-wrap: wrap !important;
        gap: 40px !important;
        align-items: flex-start !important;
    }

    /* Formulaire du panier (Gauche - 65%) */
    .woocommerce-cart-form {
        flex: 0 0 65% !important;
        max-width: 65% !important;
    }

    /* Collatéraux / Totaux (Droite - 30%) */
    .cart-collaterals {
        flex: 1 !important;
        position: sticky !important;
        top: 30px !important;
        background: #fdfdfd !important;
        padding: 25px !important;
        border-radius: 12px !important;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05) !important;
        border: 1px solid #eee !important;
    }

    .cart-collaterals .cart_totals {
        width: 100% !important;
        float: none !important;
    }
}

/* ==========================================================================
   2. DESIGN DE LA TABLE DES PRODUITS
   ========================================================================== */

.woocommerce-cart-form table.shop_table {
    border: none !important;
    border-radius: 0 !important;
    border-collapse: collapse !important;
}

.woocommerce-cart-form table.shop_table thead {
    background: transparent !important;
    border-bottom: 2px solid #f0f0f0 !important;
}

.woocommerce-cart-form table.shop_table th {
    text-transform: uppercase !important;
    font-size: 11px !important;
    letter-spacing: 1px !important;
    color: #999 !important;
    padding: 15px 0 !important;
}

.woocommerce-cart-form table.shop_table td {
    padding: 25px 0 !important;
    border-top: 1px solid #f5f5f5 !important;
}

/* Image produit */
.woocommerce-cart-form .product-thumbnail img {
    width: 80px !important;
    border-radius: 12px !important;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08) !important;
}

/* Nom du produit */
.woocommerce-cart-form .product-name a {
    font-weight: 700 !important;
    color: #333 !important;
    font-size: 16px !important;
    text-decoration: none !important;
}

/* Suppression des bordures inutiles */
.woocommerce-cart-form table.shop_table,
.woocommerce-cart-form table.shop_table td {
    border: none !important;
    border-bottom: 1px solid #eee !important;
}

/* ==========================================================================
   3. BOUTONS ET ACTIONS
   ========================================================================== */

/* Bouton Valider la commande */
.checkout-button {
    display: block !important;
    width: 100% !important;
    text-align: center !important;
    padding: 18px !important;
    background: #000 !important;
    /* Noir premium */
    color: #fff !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 1px !important;
    border-radius: 50px !important;
    transition: all 0.3s ease !important;
    font-size: 15px !important;
}

.checkout-button:hover {
    background: #333 !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2) !important;
}

/* Input coupon et boutons secondaires */
.cart-coupon .button,
.woocommerce-cart-form .button {
    background: #f5f5f7 !important;
    color: #333 !important;
    border-radius: 8px !important;
    padding: 10px 20px !important;
    font-weight: 600 !important;
    border: none !important;
}

/* ==========================================================================
   4. RESPONSIVE MOBILE
   ========================================================================== */

@media (max-width: 768px) {
    .woocommerce-cart .woocommerce {
        display: block !important;
    }

    .woocommerce-cart-form,
    .cart-collaterals {
        width: 100% !important;
        max-width: 100% !important;
        margin-bottom: 30px !important;
    }

    /* On force la table en mode bloc sur mobile pour la lisibilité */
    .woocommerce-cart-form table.shop_table_responsive tr td {
        display: block !important;
        text-align: right !important;
        padding-left: 45% !important;
        position: relative !important;
    }

    .woocommerce-cart-form table.shop_table_responsive tr td::before {
        content: attr(data-title) !important;
        position: absolute !important;
        left: 0 !important;
        font-weight: 700 !important;
        text-transform: uppercase !important;
        font-size: 10px !important;
    }
}