/* Grille de produits */
.tachet-cart-products {
    padding: 20px;
    background: #f9f9f9;
    border-radius: 5px;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.product-card {
    background: white;
    border: 1px solid #ddd;
    border-radius: 5px;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    transition: box-shadow 0.3s ease;
}

.product-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.product-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
    background: #f0f0f0;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-info {
    padding: 15px;
}

.product-title {
    margin: 0 0 8px 0;
    font-size: 18px;
    font-weight: bold;
    color: #333;
}

.product-supplier {
    margin: 5px 0;
    font-size: 12px;
    color: #666;
}

.product-price {
    margin: 10px 0;
    font-size: 20px;
    font-weight: bold;
    color: #d32f2f;
}

.product-stock {
    margin: 8px 0;
    font-size: 13px;
    padding: 5px 10px;
    border-radius: 3px;
    display: inline-block;
}

.product-stock.in-stock {
    background: #e8f5e9;
    color: #2e7d32;
}

.product-stock.out-of-stock {
    background: #ffebee;
    color: #c62828;
}

.product-description {
    margin: 10px 0;
    font-size: 13px;
    color: #555;
    line-height: 1.4;
}

.product-actions {
    margin-top: 15px;
    display: flex;
    gap: 10px;
    align-items: center;
}

.product-actions label {
    font-size: 13px;
    margin: 0;
    white-space: nowrap;
}

.product-quantity {
    width: 60px;
    padding: 6px;
    border: 1px solid #ddd;
    border-radius: 3px;
    font-size: 14px;
}

.add-to-cart-btn {
    flex: 1;
    padding: 8px 12px !important;
    font-size: 13px !important;
    min-width: auto !important;
}

.add-to-cart-btn.added {
    background-color: #2e7d32 !important;
    border-color: #2e7d32 !important;
}

/* Panier */
.tachet-cart-container {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
    margin-top: 30px;
    padding: 20px;
}

.cart-items {
    background: white;
    padding: 20px;
    border-radius: 5px;
    border: 1px solid #ddd;
}

.cart-items h2 {
    margin-top: 0;
}

.cart-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}

.cart-table thead {
    background: #f5f5f5;
    border-bottom: 2px solid #ddd;
}

.cart-table th {
    padding: 12px;
    text-align: left;
    font-weight: bold;
}

.cart-table td {
    padding: 12px;
    border-bottom: 1px solid #eee;
}

.item-quantity {
    width: 60px;
    padding: 5px;
    border: 1px solid #ddd;
    border-radius: 3px;
}

.remove-item-btn {
    color: #d32f2f;
    border-color: #d32f2f !important;
}

.remove-item-btn:hover {
    background-color: #ffebee !important;
}

#cart-empty-row td {
    color: #999;
    font-style: italic;
}

/* Résumé du panier */
.cart-summary {
    background: #f9f9f9;
    padding: 20px;
    border-radius: 5px;
    border: 1px solid #ddd;
    height: fit-content;
    position: sticky;
    top: 20px;
}

.cart-summary h3 {
    margin-top: 0;
    margin-bottom: 20px;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #eee;
    font-size: 14px;
}

.summary-row.total {
    border-bottom: 2px solid #ddd;
    font-weight: bold;
    font-size: 16px;
    padding: 15px 0;
    color: #d32f2f;
}

#checkout-btn {
    width: 100%;
    margin-top: 20px;
    padding: 12px !important;
    font-size: 16px !important;
    font-weight: bold;
}

#checkout-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

#continue-shopping-btn {
    width: 100%;
    margin-top: 10px;
    padding: 10px !important;
    font-size: 14px !important;
}

/* Responsive */
@media (max-width: 768px) {
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }

    .tachet-cart-container {
        grid-template-columns: 1fr;
    }

    .cart-summary {
        position: static;
    }

    .product-actions {
        flex-direction: column;
    }

    .add-to-cart-btn {
        width: 100% !important;
    }
}
