/* ===== MODAL PANIER RAPIDE ===== */

body.s2i-menu-active {
    overflow: hidden;
    padding-right: 10px;
}

.s2i-quick-cart-modal {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 9999;
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    pointer-events: none;
}

.s2i-quick-cart-modal.is-active {
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
}

.s2i-quick-cart-overlay {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background: rgba(0, 0, 0, 0.5);
    animation: fadeIn 0.3s ease;
    pointer-events: auto;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.s2i-quick-cart-container {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    max-width: 500px;
    background: #fff;
    box-shadow: -2px 0 20px rgba(0, 0, 0, 0.2);
    overflow-y: auto;
    animation: slideInRight 0.3s ease;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
    }
    to {
        transform: translateX(0);
    }
}

.s2i-quick-cart-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: transparent;
    border: none;
    font-size: 24px;
    cursor: pointer;
    z-index: 10;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.2s;
}

.s2i-quick-cart-close:hover {
    background: #f0f0f0;
}

.s2i-quick-cart-content {
    display: flex;
    min-height: 100%;
}

/* Colonne gauche - Crossselling */
.s2i-quick-cart-left {
    width: 35%;
    padding: 30px 20px;
    background: #f8f8f8;
    border-right: 1px solid #e5e5e5;
}

.crossselling-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 20px;
    color: #333;
}

.crossselling-products {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.crossselling-product {
    background: #fff;
    border-radius: 8px;
    padding: 12px;
    transition: box-shadow 0.2s;
}

.crossselling-product:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.crossselling-product a {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: inherit;
}

.crossselling-product img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 4px;
}

.crossselling-product .product-name {
    flex: 1;
    font-size: 12px;
    font-weight: 500;
    color: #333;
}

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

/* Colonne droite - Panier */
.s2i-quick-cart-right {
    padding: 30px;
    display: flex;
    flex-direction: column;
}

.cart-title {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 25px;
    padding-right: 50px;
}

/* Liste des produits */
.cart-products-list {
    flex: 1;
    margin-bottom: 20px;
}

.cart-product-item {
    display: flex;
    gap: 15px;
    padding: 15px 0;
    border-bottom: 1px solid #e5e5e5;
}

.cart-product-item:last-child {
    border-bottom: none;
}

.cart-product-item .product-image {
    width: 80px;
    height: 80px;
    flex-shrink: 0;
}

.cart-product-item .product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 4px;
}

.product-details {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.product-name {
    font-size: 16px;
    font-weight: 500;
    margin: 0;
    color: #333;
}

.product-attributes {
    color: #666;
    margin: 0;
}

/* Quantité */
.product-quantity-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 5px 0;
}

.qty-btn {
    width: 30px;
    height: 30px;
    border: 1px solid #ddd;
    background: #fff;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.qty-btn:hover {
    background: #f0f0f0;
    border-color: #999;
}

.product-quantity {
    width: 50px;
    height: 30px;
    text-align: center;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.product-price {
    font-size: 19px;
    font-weight: 600;
    color: #000;
}

.tax-name {
    font-size : 10px;
    display: inline-block;
}

.product-remove {
    background: transparent;
    border: none;
    cursor: pointer;
    color: #e74c3c;
    transition: color 0.2s;
    padding: 5px;
}

/* Code de réduction */
.cart-voucher-block {
    padding: 15px;
    background: #f8f8f8;
    border-radius: 8px;
    margin-bottom: 20px;
}

.voucher-form {
    display: flex;
    gap: 10px;
}

.voucher-input {
    flex: 1;
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.voucher-btn {
    padding: 10px 20px;
    background: #333;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: background 0.2s;
}

.voucher-btn:hover {
    background: #555;
}

/* Résumé */
#s2i-quick-cart-modal .cart-summary {
    padding: 20px 0;
}

.summary-line {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
}

.summary-line.discount {
    color: #27ae60;
}

.summary-line.summary-total {
    font-size: 21px;
    font-weight: 600;
    padding-top: 15px;
    border-top: 1px solid #e5e5e5;
    margin-top: 10px;
}

.summary-value {
    font-weight: 500;
}

/* Boutons d'action */
.cart-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
    position: sticky;
    bottom: 0;
    background: #fff;
    padding-bottom: 20px;
    padding-top: 15px;
    z-index: 1;
}

/* Bouton commander avec animation */
.cart-order-btn {
    position: relative;
}

.btn-label-idle,
.btn-label-hover {
    display: block;
    transition: transform 0.3s ease, opacity 0.3s ease;
    color: white;
}

.btn-label-hover {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, 100%);
    opacity: 0;
    width: 100%;
}

.cart-order-btn:hover .btn-label-idle {
    transform: translateY(-100%);
    opacity: 0;
}

.cart-order-btn:hover .btn-label-hover {
    transform: translate(-50%, -50%);
    opacity: 1;
}

/* Panier vide */
.cart-empty {
    text-align: center;
    padding: 60px 20px;
    color: #999;
}

/* ===== TOAST D'AJOUT AU PANIER ===== */

.s2i-add-to-cart-toast {
    position: fixed;
    top: 80px;
    right: 20px;
    z-index: 10000;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    padding: 15px;
    min-width: 280px;
    opacity: 0;
    transform: translateX(400px);
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    pointer-events: none;
}

.s2i-add-to-cart-toast.is-visible {
    opacity: 1;
    transform: translateX(0);
    pointer-events: auto;
    animation: bounceIn 0.6s;
}

@keyframes bounceIn {
    0% {
        transform: translateX(400px);
    }
    60% {
        transform: translateX(-10px);
    }
    80% {
        transform: translateX(5px);
    }
    100% {
        transform: translateX(0);
    }
}

.toast-content {
    display: flex;
    align-items: center;
    gap: 12px;
}

.toast-image {
    width: 60px;
    height: 60px;
    flex-shrink: 0;
}

.toast-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 4px;
}

.toast-info {
    flex: 1;
}

.toast-product-name {
    font-size: 14px;
    font-weight: 600;
    margin: 0 0 5px 0;
    color: #333;
}

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

/* Responsive */
@media (max-width: 768px) {
    .s2i-quick-cart-container {
        max-width: 100%;
    }

    .s2i-quick-cart-content {
        flex-direction: column;
    }

    .s2i-quick-cart-left {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid #e5e5e5;
    }

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

    .s2i-add-to-cart-toast {
        right: 10px;
        left: 10px;
        min-width: auto;
    }
}

.cart-voucher-block {
    margin: 15px 0;
}

.voucher-toggle-btn {
    background: transparent;
    cursor: pointer;
    border: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    text-align: left;
    transition: all 0.3s ease;
}

.voucher-toggle-btn.active {
    border-bottom: none;
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
}

.toggle-icon {
    font-size: 18px;
    font-weight: bold;
    line-height: 1;
}

.voucher-form-wrapper {
    border-top: none;
    padding: 8px 0 0 0;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}


/* Codes promo appliqués */
.cart-applied-vouchers {
    margin: 15px 0;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
}

.vouchers-title {
    font-size: 14px;
    font-weight: 600;
    margin: 0 0 10px 0;
    color: #333;
}

.vouchers-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.voucher-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.voucher-item:hover {
    border-color: #ccc;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.voucher-info {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.voucher-code {
    font-weight: 600;
    color: #2c3e50;
    font-size: 13px;
    padding: 4px 8px;
    background: #e8f5e9;
    border-radius: 4px;
}

.voucher-reduction {
    color: #27ae60;
    font-weight: 600;
    font-size: 14px;
}

.voucher-remove-btn {
    background: transparent;
    border: none;
    padding: 4px;
    cursor: pointer;
    color: #999;
    transition: color 0.3s ease;
    display: flex;
    align-items: center;
}

.voucher-remove-btn:hover {
    color: #e74c3c;
}

.voucher-remove-btn .material-icons {
    font-size: 18px;
}