.cart-page {
    padding: 40px 0;
    background: linear-gradient(to bottom, #f8f9fa, #ffffff);
    min-height: calc(100vh - 200px);
}

.cart-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 30px;
}

.cart-title {
    font-size: 32px;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 40px;
    position: relative;
    display: inline-block;
}

.cart-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 60px;
    height: 4px;
    background: var(--primary);
    border-radius: 2px;
}

/* Layout amélioré du contenu */
.cart-content {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 350px; /* Ajustement de la largeur des colonnes */
    gap: 40px;
    align-items: start;
}

/* Style mobile - disposition en colonne */
@media (max-width: 768px) {
    .cart-item-main {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .item-image {
        margin-bottom: 15px;
    }
    
    .item-details {
        width: 100%;
        margin-bottom: 15px;
    }
    
    .item-quantity {
        width: 100%;
        margin-bottom: 15px;
        margin-right: 0;
        justify-content: flex-start;
    }
    
    .item-total {
        width: 100%;
        text-align: left;
        margin-right: 0;
        margin-bottom: 15px;
    }
    
    .remove-item {
        position: absolute;
        top: 15px;
        right: 15px;
    }
    
    /* Pour s'assurer que le conteneur parent peut gérer le positionnement absolu */
    .cart-item {
        position: relative;
    }
}

/* Style amélioré des articles */
.cart-item {
    display: flex;
    align-items: center;
    padding: 25px;
    border-bottom: 1px solid var(--border-color);
    gap: 25px;
    transition: background-color 0.3s ease;
    position: relative;
}

.cart-item:hover {
    background-color: #fafafa;
}

.cart-item:last-child {
    border-bottom: none;
}

.item-image {
    flex-shrink: 0;
    width: 120px;
    height: 120px;
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.cart-item:hover .item-image img {
    transform: scale(1.05);
}

.item-details {
    flex: 1;
    min-width: 0; /* Permet aux détails de se rétrécir si nécessaire */
}

.item-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
    line-height: 1.4;
}

.item-seller {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 12px;
}

.item-seller::before {
    content: '🏪';
    font-size: 16px;
}

.item-seller a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
}

.item-seller a:hover {
    text-decoration: underline;
}

.item-price {
    font-size: 20px;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 6px;
}

.item-moq {
    display: inline-block;
    padding: 4px 12px;
    background: #f8f9fa;
    border-radius: 20px;
    font-size: 13px;
    color: var(--text-secondary);
}

/* Contrôles de quantité améliorés */
.item-quantity {
    display: flex;
    align-items: center;
    gap: 8px;
    border: 1px solid var(--border-color);
    padding: 5px;
    border-radius: var(--radius-md);
    background: white;
    margin-right: 20px;
}

.quantity-btn {
    width: 32px;
    height: 32px;
    border: none;
    background: #f8f9fa;
    border-radius: var(--radius-sm);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
    transition: all 0.2s ease;
}

.quantity-btn:hover {
    background: var(--primary);
    color: white;
}

.item-quantity input {
    width: 50px;
    text-align: center;
    border: none;
    padding: 4px;
    font-size: 15px;
    font-weight: 500;
    -moz-appearance: textfield;
}

.item-quantity input::-webkit-outer-spin-button,
.item-quantity input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.item-total {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    margin-right: 20px;
    white-space: nowrap;
    min-width: 120px;
    text-align: right;
}

.remove-item {
    width: 36px;
    height: 36px;
    border: none;
    background: #f8f9fa;
    border-radius: var(--radius-md);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #dc2626;
    transition: all 0.2s ease;
}

.remove-item:hover {
    background: #fee2e2;
    color: #991b1b;
}

/* Résumé de commande amélioré */
.cart-summary {
    background: white;
    border-radius: var(--radius-lg);
    padding: 30px;
    position: sticky;
    top: 20px;
    height: fit-content;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

.cart-summary h2 {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 25px;
    color: var(--text-primary);
    padding-bottom: 15px;
    border-bottom: 2px solid var(--border-color);
}

.summary-row {
    display: flex;
    justify-content: space-between;
    padding: 15px 0;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-primary);
    font-size: 15px;
}

.summary-row.total {
    border-bottom: none;
    font-size: 24px;
    font-weight: 800;
    margin-top: 15px;
    padding-top: 20px;
    border-top: 2px solid var(--border-color);
}

.checkout-btn {
    width: 100%;
    background: linear-gradient(to right, var(--primary), var(--primary-dark));
    color: white;
    border: none;
    padding: 18px;
    border-radius: var(--radius-md);
    font-size: 18px;
    font-weight: 600;
    margin-top: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.checkout-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(230, 92, 0, 0.2);
}

.continue-shopping {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: var(--text-primary);
    text-decoration: none;
    margin-top: 20px;
    padding: 12px;
    font-weight: 500;
    transition: var(--transition);
}

.continue-shopping:hover {
    color: var(--primary);
    transform: translateX(-5px);
}

/* Section des produits recommandés améliorée */
.recommended-products {
    margin-top: 80px;
    padding-top: 60px;
    border-top: 1px solid var(--border-color);
}

.recommended-products h2 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 40px;
    color: var(--text-primary);
    text-align: center;
}

.header {
    position: relative; 
    top: 0; 
    background: white;
}

.cart-page {
    padding-top: 40px;
    min-height: calc(100vh - 200px);
    background: #f5f5f5;
}

.header-top {
    background: var(--primary);
    color: white;
    padding: 8px 0;
    font-size: 13px;
}

.header-main {
    padding: 15px 20px;
    background: white;
    border-bottom: 1px solid var(--border-color);
}

.header {
    z-index: 100;
}

@media (min-width: 768px) {
    .header {
        position: sticky;
        top: 0;
    }
}


.cart-page {
    padding: 40px 0;
    background: linear-gradient(to bottom, #f8f9fa, #ffffff);
    min-height: calc(100vh - 200px);
}

.cart-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 30px;
}

/* Style pour centrer cart-items */
.cart-content {
    width: 100%;
    margin-bottom: 40px;
    display: flex;
    justify-content: center;
}

.cart-items {
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    width: 100%;
    max-width: 1000px; /* Limite la largeur pour un meilleur affichage */
}

/* Style du résumé */
.cart-summary {
    background: white;
    border-radius: var(--radius-lg);
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    width: 100%;
    max-width: 600px;
    margin: 40px auto;
}

/* Style pour les items */
.cart-item {
    display: flex;
    flex-direction: column;
    gap: 15px;
    padding: 25px;
    border-bottom: 1px solid var(--border-color);
}

.cart-item-main {
    display: flex;
    align-items: center;
    gap: 25px;
}

.cart-item:last-child {
    border-bottom: none;
}

.empty-cart {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
    text-align: center;
    background: white;
    border-radius: var(--radius-lg);
    min-height: 400px;
}

.empty-cart-icon {
    background: #FFF5EB;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.empty-cart-icon i {
    font-size: 2rem;
    color: var(--primary);
}

.empty-cart h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.empty-cart p {
    color: var(--text-secondary);
    max-width: 400px;
    margin-bottom: 2rem;
    line-height: 1.6;
}

.browse-products-btn {
    background: var(--primary);
    color: white;
    padding: 1rem 2rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    transition: all 0.3s ease;
    text-decoration: none;
}

.browse-products-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

@media (max-width: 768px) {
    .empty-cart {
        padding: 3rem 1.5rem;
        min-height: 300px;
    }
    
    .empty-cart-icon {
        width: 60px;
        height: 60px;
    }
    
    .empty-cart h2 {
        font-size: 1.25rem;
    }
}

/* Adaptations responsive */
@media (max-width: 1200px) {
    .cart-items {
        max-width: 900px;
    }
}

@media (max-width: 768px) {
    .cart-container {
        padding: 0 20px;
    }

    .cart-items {
        max-width: 100%;
    }

    .cart-item {
        flex-direction: column;
        align-items: flex-start;
        padding: 20px;
    }

    .cart-summary {
        padding: 20px;
        margin: 20px auto;
    }
}

/* Animations */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.cart-item {
    animation: slideIn 0.3s ease forwards;
}

.cart-item:nth-child(2) {
    animation-delay: 0.1s;
}

.cart-item:nth-child(3) {
    animation-delay: 0.2s;
}

/* Ajoutez ces Media Queries à la fin de votre fichier panier.css */

/* Tablettes et petits écrans */
@media (max-width: 1024px) {
    .cart-content {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .cart-summary {
        position: static;
        order: -1; /* Place le résumé au-dessus de la liste des articles */
    }

    .cart-container {
        padding: 0 20px;
    }
}

/* Tablettes */
@media (max-width: 768px) {
    .cart-item {
        grid-template-columns: 100px 1fr;
        gap: 20px;
        padding: 20px;
    }

    .item-image {
        width: 100px;
        height: 100px;
    }

    .item-details {
        grid-column: 2 / -1;
        min-width: 0;
    }

    .item-title {
        font-size: 16px;
    }

    .item-price {
        font-size: 18px;
    }

    /* Réorganisation des contrôles et total */
    .item-quantity {
        grid-column: 2;
        justify-content: flex-start;
        margin-top: 10px;
        background: none;
        padding: 0;
    }

    .item-total {
        grid-column: 2;
        text-align: left;
        font-size: 18px;
    }

    .remove-item {
        position: absolute;
        top: 15px;
        right: 15px;
    }

    /* Ajustement du conteneur d'article pour le positionnement absolu */
    .cart-item {
        position: relative;
    }
}

/* Mobiles */
@media (max-width: 480px) {
    .cart-page {
        padding: 20px 0;
    }

    .cart-title {
        font-size: 24px;
        margin-bottom: 20px;
    }

    .cart-container {
        padding: 0 15px;
    }

    .cart-summary {
        padding: 20px;
    }

    .cart-summary h2 {
        font-size: 20px;
    }

    .summary-row.total {
        font-size: 20px;
    }

    .checkout-btn {
        padding: 15px;
        font-size: 16px;
    }

    .item-quantity {
        flex-wrap: wrap;
        gap: 8px;
    }

    .quantity-btn {
        width: 32px;
        height: 32px;
    }

    .item-quantity input {
        width: 60px;
        padding: 6px;
    }

    /* Réduction de la taille des produits recommandés sur mobile */
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }

    .recommended-products {
        margin-top: 40px;
        padding-top: 30px;
    }

    .recommended-products h2 {
        font-size: 20px;
        margin-bottom: 20px;
    }
}

/* Pour les très petits écrans */
@media (max-width: 360px) {
    .products-grid {
        grid-template-columns: 1fr;
    }

    .item-image {
        width: 80px;
        height: 80px;
    }

    .cart-item {
        grid-template-columns: 80px 1fr;
        padding: 15px;
    }
}

/* Media Queries */
@media (max-width: 1200px) {
    .cart-content {
        grid-template-columns: 1fr 320px;
    }
    
    .cart-item {
        gap: 20px;
    }
}

@media (max-width: 992px) {
    .cart-content {
        grid-template-columns: 1fr;
    }
    
    .cart-summary {
        order: -1;
        position: static;
        margin-bottom: 30px;
    }
}

@media (max-width: 768px) {
    .cart-item {
        grid-template-columns: 100px 1fr;
        gap: 20px;
        padding: 20px;
    }

    .item-image {
        width: 100px;
        height: 100px;
    }

    .item-quantity,
    .item-total {
        grid-column: 2;
        justify-content: flex-start;
        margin: 10px 0;
    }

    .remove-item {
        position: absolute;
        top: 20px;
        right: 20px;
    }
}

@media (max-width: 480px) {
    .cart-container {
        padding: 0 15px;
    }

    .cart-title {
        font-size: 24px;
    }

    .cart-summary {
        padding: 20px;
    }
}

.cart-items {
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}



/* Style du conteneur de défilement */
.products-scroll {
    width: 100%;
    overflow-x: auto; /* Permet le défilement horizontal */
    overflow-y: hidden;
    padding: 20px 0;
    position: relative;
    cursor: grab;
}

/* Style de la barre de défilement horizontale */
.products-scroll::-webkit-scrollbar {
    height: 8px;
    background: #f1f1f1;
    border-radius: 4px;
}

.products-scroll::-webkit-scrollbar-thumb {
    background: var(--primary, #FF6B00);
    border-radius: 4px;
}

.products-scroll::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark, #E65C00);
}

/* Style du conteneur des produits */
.products-track {
    display: flex; /* Changé de inline-flex à flex */
    gap: 20px;
    padding: 0 20px;
    min-width: min-content; /* Important pour permettre le défilement */
}

/* Style des cartes produits */
.product-card {
    flex: 0 0 280px; /* Ne pas rétrécir, ne pas grandir, taille fixe */
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
    cursor: pointer;
}

.product-card:hover {
    transform: translateY(-5px);
}

/* Styles pour l'image et les infos du produit */
.product-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-info {
    padding: 15px;
}

.product-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 10px;
    white-space: normal; /* Permet le retour à la ligne du texte */
}

/* Pour le support sur Firefox */
.products-scroll {
    scrollbar-width: thin;
    scrollbar-color: var(--primary) #f1f1f1;
}