/* Style personnalisé pour le panier WooCommerce */

.woocommerce-cart-form {
    margin-bottom: 2rem;
}

.woocommerce-cart-form__contents {
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.woocommerce-cart-form__contents thead {
    background: #f7f7f7;
}

.woocommerce-cart-form__contents th {
    padding: 1.2rem !important;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.9em;
    border-bottom: 1px solid #e5e5e5;
}

.woocommerce-cart-form__contents td {
    padding: 1.5rem !important;
    vertical-align: middle;
}

.woocommerce-cart-form__cart-item {
    transition: background-color 0.2s ease;
}

.woocommerce-cart-form__cart-item:hover {
    background-color: #f9f9f9;
}

.product-remove {
    width: 32px;
}

.product-remove a.remove {
    display: inline-flex !important;
    align-items: center;
    gap: 8px;
    color: #e74c3c !important;
    text-decoration: none !important;
    transition: all 0.2s ease;
    padding: 5px;
    border-radius: 4px;
}

.product-remove a.remove:hover {
    color: #c0392b !important;
    background: transparent !important;
}

.product-remove a.remove i {
    font-size: 18px;
}

.product-remove .remove-label {
    display: none;
    font-size: 14px;
    font-weight: normal;
}

.product-thumbnail img {
    width: 80px;
    height: auto;
    border-radius: 4px;
}

.product-name a {
    color: #333;
    font-weight: 500;
    text-decoration: none;
}

.product-name a:hover {
    color: #000;
}

.product-price,
.product-subtotal {
    font-weight: 600;
    color: #2c3e50;
}

/* Style pour les boutons de quantité */
.quantity {
    position: relative;
    width: 100px;
    display: inline-flex;
    border: 1px solid #ddd;
    border-radius: 4px;
    overflow: hidden;
}

.quantity input {
    width: 100% !important;
    padding: 0.5rem !important;
    text-align: center;
    border: none !important;
    -moz-appearance: textfield;
}

.quantity input::-webkit-outer-spin-button,
.quantity input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.number-button .minus,
.number-button .plus {
    background: #f7f7f7;
    border: none;
    width: 30px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.2s ease;
}

.number-button .minus:hover,
.number-button .plus:hover {
    background: #e5e5e5;
}

/* Style pour les boutons d'action */
.actions {
    padding: 1.5rem !important;
    background: #f7f7f7;
    border-top: 1px solid #e5e5e5;
}

.coupon-section {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.coupon {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.coupon label {
    margin: 0;
    line-height: 1;
    display: flex;
    align-items: center;
    height: 42px; /* Même hauteur que les boutons et champs */
}

.coupon input {
    width: auto !important;
    min-width: 200px;
    padding: 0.7rem 1rem !important;
    border: 1px solid #ddd !important;
    border-radius: 4px;
    height: 42px;
    box-sizing: border-box;
}

.coupon .button {
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
}

.update-cart-section {
    display: flex;
    justify-content: flex-end;
}

.update-cart-section .button {
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
}

.button {
    padding: 0.7rem 1.5rem !important;
    background: #3498db !important;
    color: #fff !important;
    border: none !important;
    border-radius: 4px !important;
    font-weight: 600 !important;
    text-transform: uppercase;
    font-size: 0.9em !important;
    transition: background-color 0.2s ease !important;
}

.button:hover {
    background: #2980b9 !important;
}

.empty-cart-button {
    background: #e74c3c !important;
}

.empty-cart-button:hover {
    background: #c0392b !important;
}

/* Style pour le total du panier */
.cart-collaterals {
    margin-top: 2rem;
}

.cart_totals {
    float: right;
    width: 40% !important;
    padding: 2rem;
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.cart_totals h2 {
    margin-bottom: 1.5rem;
    font-size: 1.5em;
    font-weight: 600;
}

.cart_totals table {
    width: 100%;
    margin-bottom: 1.5rem;
}

.cart_totals th {
    padding: 1rem 0;
    font-weight: 500;
}

.cart_totals td {
    padding: 1rem 0;
    text-align: right;
}

.order-total th,
.order-total td {
    font-size: 1.2em;
    font-weight: 600;
    color: #2c3e50;
}

.wc-proceed-to-checkout .button {
    width: 100%;
    text-align: center;
    padding: 1rem !important;
    font-size: 1em !important;
    background: #27ae60 !important;
}

.wc-proceed-to-checkout .button:hover {
    background: #219a52 !important;
}

/* Responsive */
@media (max-width: 768px) {
    .cart_totals {
        width: 100% !important;
    }
    
    .coupon-section {
        gap: 1.5rem;
    }
    
    .coupon {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
        width: 100%;
    }
    
    .coupon label {
        height: auto;
        justify-content: flex-start;
        width: 100%;
    }
    
    .coupon input[type="text"],
    .coupon input.input-text,
    .coupon #coupon_code {
        width: 100% !important;
        min-width: auto !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }
    
    .coupon .button,
    .coupon button[name="apply_coupon"] {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }
    
    .update-cart-section {
        justify-content: stretch;
        width: 100%;
    }
    
    .update-cart-section .button,
    .update-cart-section button[name="update_cart"] {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }

    .product-remove {
        width: auto;
        text-align: left;
        padding-left: 0 !important;
    }

    .product-remove a.remove {
        width: auto !important;
        height: auto !important;
        border: none !important;
        background: transparent !important;
    }

    .product-remove .remove-label {
        display: inline-block;
    }
    
    /* Styles supplémentaires pour forcer la largeur 100% sur tous les éléments du coupon */
    .woocommerce-cart-form .shop_table .coupon input,
    .woocommerce-cart-form .shop_table .coupon .input-text,
    .woocommerce table.cart .coupon input,
    .woocommerce table.cart .coupon .input-text {
        width: 100% !important;
        max-width: 100% !important;
        min-width: auto !important;
    }
    
    .woocommerce-cart-form .shop_table .coupon .button,
    .woocommerce table.cart .coupon .button {
        width: 100% !important;
        max-width: 100% !important;
    }
    
    .woocommerce-cart-form .shop_table .actions .button,
    .woocommerce table.cart .actions .button {
        width: 100% !important;
        max-width: 100% !important;
    }
} 