/**
 * Masquer le panier natif de PrestaShop sur la page panier
 */
/* body#cart .cart-overview,
body#cart .cart-grid-body .cart-items,
body#cart .cart-grid .cart-grid-body > .card.cart-container,
body#cart .cart-detailed,
body#cart .cart-grid-body,
body#cart #main .cart-grid .cart-overview,
body#cart section.checkout-step.-reachable.-complete,
body#checkout .cart-overview,
body#checkout .cart-grid-body .cart-items,
.page-cart .cart-overview,
.page-cart .cart-grid-body .cart-items,
.page-cart .cart-detailed-product,
#content-wrapper .cart-overview,
#content-wrapper .cart-grid-body .cart-items {
    display: none !important;
} */

/* #cart .cart-container {
    display: none !important;
} */

/**
 * S'assurer que notre panier personnalisé est visible
 */
.custom-cart-manager {
    display: block !important;
    width: 100%;
}

/**
 * Styles pour le panier personnalisé
 */
.custom-cart-section,
.other-products-section {
    margin-bottom: 30px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.custom-cart-section .panel-heading {
    padding: 15px;
}

.custom-cart-section .panel-title {
    font-size: 18px;
    font-weight: 600;
}

.cart-products-table {
    margin-bottom: 0;
}

.cart-products-table thead th {
    font-weight: 600;
    text-align: center;
    vertical-align: middle;
    padding: 12px 8px;
    border-bottom: 2px solid #ddd;
}

.cart-products-table tbody td {
    vertical-align: middle;
    padding: 15px 8px;
}

.product-image {
    text-align: center;
    width: 80px;
}

.product-name {
    font-weight: 500;
}

.product-reference {
    color: #666;
    font-size: 13px;
}

.product-quantité,
.product-prix,
.product-total,
.product-actions {
    text-align: center;
}

.quantity-selector {
    display: inline-flex;
    align-items: center;
}

.quantity-selector .btn {
    border-radius: 0;
    border: 1px solid #ccc;
}

.quantity-selector .btn:first-child {
    border-radius: 4px 0 0 4px;
}

.quantity-selector .btn:last-child {
    border-radius: 0 4px 4px 0;
}

.quantity-input {
    border-left: 0;
    border-right: 0;
    height: 34px;
    padding: 6px 8px;
}

.quantity-input:focus {
    outline: none;
    box-shadow: none;
}

.btn-remove-product {
    min-width: 36px;
}

.cart-product.updating {
    opacity: 0.5;
    position: relative;
}

.cart-product.updating::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255,255,255,0.7);
    cursor: wait;
}

.no-image {
    font-size: 11px;
    color: #999;
}

/* Responsive */
@media (max-width: 768px) {
    .cart-products-table {
        font-size: 13px;
    }
    
    .cart-products-table thead {
        display: none;
    }
    
    .cart-products-table tbody tr {
        display: block;
        margin-bottom: 20px;
        border: 1px solid #ddd;
        border-radius: 4px;
        padding: 10px;
    }
    
    .cart-products-table tbody td {
        display: block;
        text-align: left !important;
        padding: 8px;
        border: none;
    }
    
    .cart-products-table tbody td::before {
        content: attr(data-label);
        font-weight: bold;
        margin-right: 10px;
    }
    
    .product-image {
        width: 100%;
        margin-bottom: 10px;
    }
    
    .quantity-selector {
        width: 100%;
        max-width: 200px;
    }
}

/* --- STRUCTURE GÉNÉRALE --- */
.custom-cart-manager {
    margin: 20px 0;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.custom-cart-section,
.other-products-section {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
    border: 1px solid #e1e1e1;
    background-color: #fff;
}

/* --- HEADERS --- */
.custom-cart-section .panel-heading,
.other-products-section .panel-heading {
    padding: 10px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.custom-cart-section .panel-heading {
    background-color: #007bff;
    color: #fff;
    font-weight: 600;
}

.other-products-section .panel-heading {
    background-color: #f8f9fa;
    border-bottom: 1px solid #e1e1e1;
    color: #333;
}

.panel-title {
    font-size: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.lot-total {
    font-size: 15px;
    font-weight: 600;
    background: rgba(255,255,255,0.15);
    padding: 4px 10px;
    border-radius: 6px;
}

/* --- TABLE --- */
.cart-products-table {
    width: 100%;
    border-collapse: collapse;
}

.cart-products-table thead th {
    background-color: #f5f5f5;
    padding: 10px;
    font-weight: 600;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

.cart-products-table tbody td {
    padding: 10px;
    vertical-align: middle;
    border-bottom: 1px solid #eee;
}

.cart-products-table tbody tr:hover {
    background-color: #fafafa;
}

/* --- PRODUITS --- */
.product-image img {
    max-width: 60px;
    border-radius: 4px;
    border: 1px solid #ddd;
}

.no-image {
    width: 60px;
    height: 60px;
    background: #f8f8f8;
    border: 1px solid #ddd;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    color: #999;
    font-size: 12px;
}

/* --- QUANTITÉ --- */
.quantity-selector {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 120px;
    margin: 0 auto;
    border: 1px solid #ddd;
    border-radius: 6px;
    overflow: hidden;
    background: #fff;
}

.quantity-selector .btn {
    border: none;
    background: transparent;
    color: #007bff;
    font-size: 14px;
    padding: 4px 8px;
    transition: background-color 0.2s ease;
}

.quantity-selector .btn:hover {
    background-color: rgba(0,123,255,0.1);
}

.quantity-input {
    border: none;
    text-align: center;
    width: 45px;
    padding: 5px;
    font-weight: 600;
    background: transparent;
}

/* --- PRIX --- */
.product-prix,
.product-total {
    text-align: right;
    font-weight: 500;
}

.product-total {
    font-weight: 600;
    color: #000;
}

/* --- ACTIONS --- */
.product-actions {
    text-align: center;
}

.product-actions .btn {
    padding: 5px 10px;
    font-size: 13px;
    transition: all 0.2s ease;
}

.product-actions .btn:hover {
    transform: scale(1.05);
}

/* --- ÉTAT DE MISE À JOUR --- */
.cart-product.updating {
    opacity: 0.6;
    pointer-events: none;
}

/* --- RESPONSIVE --- */
@media (max-width: 768px) {
    .cart-products-table thead {
        display: none;
    }

    .cart-products-table tbody tr {
        display: flex;
        flex-direction: column;
        border-bottom: 1px solid #ddd;
        padding: 10px 0;
    }

    .cart-products-table tbody td {
        text-align: left;
        border: none;
        padding: 5px 0;
    }

    .product-actions {
        text-align: right;
    }
}

/* Fixe la largeur pour éviter que quantité et prix se collent */
.product-quantité {
    min-width: 140px;
}
.product-prix {
    min-width: 120px;
    text-align: right;
}
.product-total {
    min-width: 120px;
    text-align: right;
}