/* ==========================================
   SHOPPING CART ZONE STYLES
   ========================================== */

/* Variables et reset pour le panier */
.shopping-cart-zone * {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.shopping-cart-zone {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: #f8f9fa;
    color: #2c3e50;
    line-height: 1.6;
}

/* ==========================================
   CONTAINER ET LAYOUT
   ========================================== */
.container-zone {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

.row-zone {
    display: flex;
    flex-wrap: nowrap;
    margin: 0 -15px;
    /* height: 80vh; */
}

/* .col-cart-zone {
    overflow-y: auto;
    padding-right: 10px;
} */



.col-lg-9 {
    flex: 0 0 75%;
    max-width: 75%;
    padding: 0 15px;
}

.col-lg-3 {
    flex: 0 0 25%;
    max-width: 25%;
    padding: 0 15px;
}

/* ==========================================
   TABLEAU DU PANIER
   ========================================== */
.table-zone {
    width: 100%;
    background: white;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    border-collapse: separate;
    border-spacing: 0;
    overflow: hidden;
    margin-bottom: 30px;
}

.table-zone thead tr {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.table-zone th {
    padding: 20px 15px;
    font-weight: 600;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: white;
    border: none;
}

.product-header-zone { text-align: left; padding-left: 25px; }
.price-header-zone, .quantity-header-zone, 
.total-header-zone, .remove-header-zone { text-align: center; }

/* ==========================================
   LIGNES DU PANIER
   ========================================== */
.cart-item-zone {
    transition: all 0.3s ease;
    border-bottom: 1px solid #edf2f7;
}

.cart-item-zone:last-child {
    border-bottom: none;
}

.cart-item-zone:hover {
    background-color: #fafbfc;
}

.cart-item-zone td {
    padding: 25px 15px;
    vertical-align: middle;
}

/* ==========================================
   PRODUIT
   ========================================== */
.product-cell-zone {
    min-width: 300px;
    padding-left: 25px !important;
}

.product-zone {
    display: flex;
    align-items: center;
    gap: 20px;
}

.product-media-zone {
    flex-shrink: 0;
    width: 100px;
    height: 100px;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.product-media-zone:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.2);
}

.product-image-zone {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.product-media-zone:hover .product-image-zone {
    transform: scale(1.1);
}

.product-title-zone {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.4;
}

.product-title-zone a {
    color: #2c3e50;
    text-decoration: none;
    transition: color 0.3s ease;
}

.product-title-zone a:hover {
    color: #667eea;
}

/* ==========================================
   PRIX ET QUANTITÉ
   ========================================== */
.price-cell-zone, .total-cell-zone {
    text-align: center;
    font-weight: 600;
    font-size: 16px;
    color: #2c3e50;
}

.quantity-cell-zone {
    text-align: center;
}

.quantity-selector-zone {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.quantity-input-zone {
    width: 80px;
    height: 45px;
    text-align: center;
    font-size: 16px;
    font-weight: 600;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    transition: all 0.3s ease;
    color: #2c3e50;
}

.quantity-input-zone:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.quantity-input-zone::-webkit-inner-spin-button {
    opacity: 0.5;
    height: 24px;
}

/* ==========================================
   BOUTON SUPPRIMER
   ========================================== */
.remove-cell-zone {
    text-align: center;
}

.remove-btn-zone {
    width: 35px;
    height: 35px;
    border: none;
    border-radius: 50%;
    background: #fff;
    color: #e53e3e;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #fed7d7;
}

.remove-btn-zone:hover {
    background: whitesmoke;
    color: white;
    border-color: #e53e3e;
    transform: rotate(90deg);
}

/* ==========================================
   SECTION BAS DU PANIER (COUPON & UPDATE)
   ========================================== */
.cart-bottom-zone {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: white;
    border-radius: 20px;
    padding: 20px 25px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.03);
    margin-top: 30px;
}

.coupon-section-zone {
    flex: 1;
    max-width: 400px;
}

.input-group-zone {
    display: flex;
    gap: 10px;
}

.coupon-input-zone {
    flex: 1;
    height: 50px;
    padding: 0 20px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 15px;
    transition: all 0.3s ease;
}

.coupon-input-zone:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.apply-coupon-btn-zone {
    width: 50px;
    height: 50px;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-size: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.apply-coupon-btn-zone:hover {
    transform: translateX(5px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.update-cart-btn-zone {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 25px;
    background: #f7fafc;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    color: #4a5568;
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.update-cart-btn-zone:hover {
    background: #edf2f7;
    border-color: #cbd5e0;
    transform: translateY(-2px);
}

/* ==========================================
   RÉSUMÉ DE LA COMMANDE
   ========================================== */
.cart-summary-zone {
    background: white;
    border-radius: 20px;
    padding: 30px 25px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 100px;
}

.summary-title-zone {
    font-size: 19px;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid #edf2f7;
}

.summary-table-zone {
    width: 100%;
    margin-bottom: 25px;
}

.summary-row-zone {
    border-bottom: 1px solid #edf2f7;
}

.summary-row-zone:last-child {
    border-bottom: none;
}

.summary-label-zone, .summary-value-zone {
    padding: 15px 0;
    font-size: 15px;
}

.summary-value-zone {
    text-align: right;
    font-weight: 600;
}

/* Options de livraison */
.shipping-option-zone td {
    padding: 10px 0;
}

.radio-option-zone {
    display: flex;
    align-items: center;
    gap: 10px;
}

.radio-input-zone {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #667eea;
}

.radio-label-zone {
    font-size: 15px;
    color: #4a5568;
    cursor: pointer;
}

.shipping-price-zone {
    text-align: right;
    font-weight: 600;
    color: #2c3e50;
}

/* Estimation */
.estimate-row-zone td {
    padding: 10px 0;
    font-size: 14px;
    color: #718096;
}

.change-address-link-zone {
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.change-address-link-zone:hover {
    color: #764ba2;
    text-decoration: underline;
}

/* Total */
.total-row-zone {
    border-top: 2px solid #edf2f7;
}

.total-label-zone, .total-value-zone {
    padding: 10px 0;
    font-size: 14px;
    font-weight: 700;
    color: #2c3e50;
}

.total-value-zone {
    text-align: right;
    color: #667eea;
}

/* ==========================================
   BOUTONS D'ACTION
   ========================================== */
.checkout-btn-zone {
    display: block;
    width: 100%;
    padding: 16px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-align: center;
    text-decoration: none;
    font-weight: 700;
    font-size: 16px;
    letter-spacing: 1px;
    border-radius: 15px;
    margin: 20px 0 15px;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.checkout-btn-zone:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.4);
}

.continue-shopping-btn-zone {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 14px 20px;
    background: #f7fafc;
    border: 2px solid #e2e8f0;
    border-radius: 15px;
    color: #4a5568;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
}

.continue-shopping-btn-zone:hover {
    background: #edf2f7;
    border-color: #cbd5e0;
    transform: translateY(-2px);
}

/* ==========================================
   RESPONSIVE
   ========================================== */
@media (max-width: 991px) {
    .col-lg-9, .col-lg-3 {
        flex: 0 0 100%;
        max-width: 100%;
    }
    
    .col-lg-3 {
        margin-top: 30px;
    }
    
    .table-zone {
        display: block;
        overflow-x: auto;
    }
    
    .product-zone {
        flex-direction: column;
        align-items: flex-start;
        text-align: left;
    }
    
    .cart-bottom-zone {
        flex-direction: column;
        gap: 20px;
    }
    
    .coupon-section-zone {
        max-width: 100%;
        width: 100%;
    }
}

@media (max-width: 576px) {
    .product-cell-zone {
        min-width: 250px;
    }
    
    .product-media-zone {
        width: 80px;
        height: 80px;
    }
    
    .cart-summary-zone {
        padding: 20px 15px;
    }
}

/* ==========================================
   ANIMATIONS
   ========================================== */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.cart-item-zone {
    animation: fadeIn 0.5s ease forwards;
}

.cart-item-zone:nth-child(1) { animation-delay: 0.1s; }
.cart-item-zone:nth-child(2) { animation-delay: 0.2s; }

/* ==========================================
   UTILITAIRES
   ========================================== */
.pt-60 { padding-top: 60px; }
.pb-60 { padding-bottom: 60px; }


/* ==========================================
   BOUTON SUPPRIMER (CROIX) AMÉLIORÉ
   ========================================== */
.remove-cell-zone {
    text-align: center;
    vertical-align: middle;
}

.remove-btn-zone {
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 50%;
    background: white;
    color: #e74c3c;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #fecaca;
    position: relative;
    overflow: hidden;
}

.remove-btn-zone::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(231, 76, 60, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.3s ease, height 0.3s ease;
}

.remove-btn-zone:hover {
    background: #e74c3c;
    color: white;
    border-color: #e74c3c;
    transform: rotate(90deg) scale(1.1);
    box-shadow: 0 5px 15px rgba(231, 76, 60, 0.3);
}

.remove-btn-zone:hover::before {
    width: 100%;
    height: 100%;
}

.remove-btn-zone:active {
    transform: rotate(90deg) scale(0.95);
}

.remove-btn-zone i {
    position: relative;
    z-index: 1;
}

/* Animation pour l'icône de suppression */
@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(231, 76, 60, 0.4);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(231, 76, 60, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(231, 76, 60, 0);
    }
}

.remove-btn-zone:focus {
    outline: none;
    animation: pulse 1.5s infinite;
}

/* ==========================================
   PRODUIT AVEC INFORMATIONS
   ========================================== */
.product-wrapper-zone {
    width: 100%;
}

.product-zone {
    display: flex;
    align-items: flex-start;
    gap: 20px;
}

.product-info-zone {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.product-media-zone {
    flex-shrink: 0;
    width: 100px;
    height: 100px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.product-media-zone:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.2);
}

.product-image-zone {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.product-media-zone:hover .product-image-zone {
    transform: scale(1.1);
}

.product-title-zone {
    margin: 0 0 5px 0;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.4;
}

.product-title-zone a {
    color: #2c3e50;
    text-decoration: none;
    transition: color 0.3s ease;
}

.product-title-zone a:hover {
    color: #667eea;
}

/* ==========================================
   LIEN CONTACTER LE VENDEUR
   ========================================== */
.contact-seller-zone {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #718096;
    text-decoration: none;
    padding: 5px 0;
    border-bottom: 1px dashed #cbd5e0;
    transition: all 0.3s ease;
    max-width: fit-content;
}

.contact-seller-zone i {
    font-size: 14px;
    transition: transform 0.3s ease;
}

.contact-seller-zone:hover {
    color: #667eea;
    border-bottom-color: #667eea;
    gap: 12px;
}

.contact-seller-zone:hover i {
    transform: translateX(3px);
}

/* Animation d'entrée pour le lien */
.contact-seller-zone {
    animation: slideUp 0.5s ease forwards;
    opacity: 0;
    transform: translateY(10px);
}

.cart-item-zone:nth-child(1) .contact-seller-zone {
    animation-delay: 0.2s;
}

.cart-item-zone:nth-child(2) .contact-seller-zone {
    animation-delay: 0.4s;
}

@keyframes slideUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==========================================
   AJUSTEMENT POUR MOBILE
   ========================================== */
@media (max-width: 768px) {
    .product-zone {
        flex-direction: row;
        align-items: center;
    }
    
    .product-media-zone {
        width: 80px;
        height: 80px;
    }
    
    .contact-seller-zone {
        font-size: 12px;
    }
    
    .remove-btn-zone {
        width: 32px;
        height: 32px;
        font-size: 16px;
    }
}

/* ==========================================
   ÉTAT DE SUPPRESSION (pour JavaScript)
   ========================================== */
.cart-item-zone.removing-zone {
    animation: removeItem 0.5s ease forwards;
    pointer-events: none;
}

@keyframes removeItem {
    0% {
        opacity: 1;
        transform: translateX(0);
    }
    100% {
        opacity: 0;
        transform: translateX(100px);
    }
}