/**
 * Lab Ella - Cart Mobile Styles
 * Amélioration de l'affichage du panier sur mobile UNIQUEMENT
 * Version: 1.0.0
 */

/* ========================================
   MOBILE ONLY (< 768px)
   ======================================== */

@media (max-width: 767px) {
    
    /* Container principal */
    .custom-cart-container {
        padding: 15px 10px !important;
    }
    
    /* Titre du panier */
    .cart-title {
        font-size: 22px !important;
        margin-bottom: 20px !important;
    }
    
    /* ===== SECTION KIT ===== */
    .cart-kit-section {
        background: #fff;
        border-radius: 10px;
        padding: 15px;
        margin-bottom: 20px;
        box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    }
    
    .kit-header {
        margin-bottom: 15px;
        padding-bottom: 12px;
        border-bottom: 1px solid #f0f0f0;
    }
    
    .kit-title {
        font-size: 17px !important;
        margin-bottom: 8px !important;
    }
    
    .kit-savings {
        display: inline-block;
        background: #e8f5e9;
        color: #2e7d32;
        padding: 4px 10px;
        border-radius: 15px;
        font-size: 12px;
        font-weight: 500;
    }
    
    /* ===== ITEMS DU PANIER ===== */
    .cart-item {
        background: #fff;
        border-radius: 10px;
        padding: 12px;
        margin-bottom: 12px;
        box-shadow: 0 1px 4px rgba(0,0,0,0.08);
        position: relative;
        display: block !important;
    }
    
    /* Image et détails centrés */
    .cart-item-image {
        float: none !important;
        width: 70px !important;
        height: 70px !important;
        margin: 0 auto 12px auto !important;
        border-radius: 8px;
        overflow: hidden;
        display: block !important;
        text-align: center;
    }
    
    .cart-item-image img {
        width: 100% !important;
        height: 100% !important;
        object-fit: cover;
        display: block !important;
        margin: 0 auto !important;
    }
    
    .cart-item-details {
        overflow: visible;
        text-align: center; /* Centrer le contenu */
    }
    
    .cart-item-name {
        font-size: 15px !important;
        font-weight: 600 !important;
        line-height: 1.3 !important;
        margin-bottom: 6px !important;
        color: #2c2c2c;
    }
    
    .cart-item-name a {
        color: #2c2c2c;
        text-decoration: none;
    }
    
    .cart-item-meta {
        font-size: 13px !important;
        color: #666 !important;
        margin-top: 3px !important;
    }
    
    /* Prix et quantité en dessous */
    .cart-item-price,
    .cart-item-quantity,
    .cart-item-subtotal {
        clear: both;
        padding-top: 10px;
        margin-top: 10px;
        border-top: 1px solid #f5f5f5;
    }
    
    .cart-item-price {
        font-size: 14px !important;
        color: #666 !important;
        margin-bottom: 8px;
    }
    
    .cart-item-price::before {
        content: "Prix unitaire: ";
        font-weight: 400;
        color: #999;
        font-size: 12px;
    }
    
    .cart-item-quantity {
        margin-bottom: 10px;
    }
    
    .cart-item-quantity::before {
        content: "Quantité: ";
        font-weight: 400;
        color: #999;
        font-size: 12px;
        margin-right: 8px;
    }
    
    .qty-input {
        width: 70px !important;
        padding: 8px !important;
        border: 1px solid #ddd !important;
        border-radius: 6px !important;
        font-size: 14px !important;
        text-align: center;
    }
    
    .cart-item-subtotal {
        display: flex;
        justify-content: space-between;
        align-items: center;
        font-size: 16px !important;
        font-weight: 700 !important;
        color: #d4a574 !important;
        padding-top: 12px;
        margin-top: 10px;
        border-top: 2px solid #f0f0f0;
    }
    
    .cart-item-subtotal::before {
        content: "Sous-total:";
        font-weight: 400;
        color: #666;
        font-size: 14px;
    }
    
    /* Bouton supprimer */
    .cart-item-remove {
        position: absolute !important;
        bottom: 12px !important;
        right: 12px !important;
        top: auto !important;
    }
    
    .cart-item-remove .remove {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 28px;
        height: 28px;
        background: #f5f5f5;
        border-radius: 50%;
        color: #999;
        font-size: 18px;
        text-decoration: none;
        transition: all 0.3s;
    }
    
    .cart-item-remove .remove:hover {
        background: #ffebee;
        color: #e53935;
    }
    
    /* ===== TOTAUX ===== */
    .cart-totals {
        background: #fef9f5;
        border-radius: 10px;
        padding: 20px 15px;
        margin-top: 20px;
    }
    
    .totals-header .totals-title {
        font-size: 20px !important;
        font-weight: 600 !important;
        margin-bottom: 15px !important;
        color: #2c2c2c;
    }
    
    .totals-row {
        display: flex;
        justify-content: space-between;
        padding: 10px 0;
        font-size: 15px;
    }
    
    .totals-row.totals-total {
        border-top: 2px solid #d4a574;
        margin-top: 10px;
        padding-top: 12px;
        font-size: 18px !important;
        font-weight: 700 !important;
    }
    
    .totals-row.totals-savings {
        color: #2e7d32;
        font-weight: 500;
    }
    
    /* Bouton checkout */
    .totals-actions {
        margin-top: 15px;
    }
    
    .totals-actions {
        display: flex;
        gap: 10px;
        flex-direction: column;
    }
    
    .checkout-button,
    .continue-shopping-button {
        display: block;
        width: 100%;
        text-align: center;
        padding: 14px;
        border-radius: 8px;
        font-size: 16px;
        font-weight: 600;
        text-decoration: none;
        transition: all 0.3s;
    }
    
    .checkout-button {
        background: #d4a574;
        color: #fff !important;
        border: none;
    }
    
    .checkout-button:hover {
        background: #c49564;
    }
    
    .continue-shopping-button {
        background: #fff;
        color: #2c2c2c !important;
        border: 2px solid #d4a574;
    }
    
    .continue-shopping-button:hover {
        background: #d4a574;
        color: #fff !important;
    }
    
    /* ===== CORRECTIONS SPÉCIFIQUES ===== */
    
    /* Supprimer le scroll horizontal */
    .woocommerce-cart-form {
        overflow-x: visible !important;
    }
    
    /* Supprimer la largeur minimale */
    .cart_item {
        min-width: auto !important;
    }
    
    /* Panier vide */
    .cart-empty {
        text-align: center;
        padding: 40px 15px;
    }
    
    .cart-empty p {
        font-size: 16px;
        color: #666;
        margin-bottom: 20px;
    }
    
    .return-to-shop {
        display: inline-block;
        background: #d4a574;
        color: #fff !important;
        padding: 12px 24px;
        border-radius: 8px;
        text-decoration: none;
        font-weight: 600;
    }
}

/* ========================================
   PETIT MOBILE (< 375px)
   ======================================== */

@media (max-width: 374px) {
    .cart-item-image {
        width: 60px !important;
        height: 60px !important;
    }
    
    .cart-item-name {
        font-size: 14px !important;
    }
    
    .cart-item-meta {
        font-size: 12px !important;
    }
    
    .qty-input {
        width: 60px !important;
    }
}
