/* Cart Sidebar Styles */
.cart-sidebar {
    position: fixed;
    top: 0;
    right: -400px;
    width: 400px;
    height: 100vh;
    background: #1a1a1a;
    border-left: 1px solid #333;
    z-index: 10001;
    transition: right 0.3s ease;
    display: flex;
    flex-direction: column;
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.3);
}

.cart-sidebar.open {
    right: 0;
}

.cart-sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.cart-sidebar-overlay.show {
    opacity: 1;
    visibility: visible;
}

.cart-sidebar-header {
    padding: 20px;
    border-bottom: 1px solid #333;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #0a0a0a;
}

.cart-sidebar-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #ffd700;
    margin: 0;
}

.cart-sidebar-close {
    background: none;
    border: none;
    color: #999;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.cart-sidebar-close:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
}

.cart-sidebar-content {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

.cart-empty {
    text-align: center;
    padding: 40px 20px;
    color: #666;
}

.cart-empty i {
    font-size: 3rem;
    color: #444;
    margin-bottom: 1rem;
    display: block;
}

.cart-items {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.cart-item {
    background: #2a2a2a;
    border: 1px solid #333;
    border-radius: 8px;
    padding: 15px;
    display: flex;
    gap: 15px;
    transition: all 0.2s ease;
}

.cart-item:hover {
    border-color: #444;
    background: #2f2f2f;
}

.cart-item-image {
    width: 80px;
    height: 112px;
    object-fit: contain;
    border-radius: 6px;
    flex-shrink: 0;
    background: rgba(255, 255, 255, 0.05);
    padding: 4px;
}

.cart-item-details {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.cart-item-name {
    font-weight: 600;
    color: #fff;
    font-size: 0.95rem;
    line-height: 1.3;
    margin: 0;
}

.cart-item-set {
    font-size: 0.85rem;
    color: #999;
}

.cart-item-price {
    color: #ffd700;
    font-weight: 500;
}

.cart-item-controls {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: auto;
}

.quantity-control {
    display: flex;
    align-items: center;
    gap: 5px;
    background: #1a1a1a;
    border: 1px solid #444;
    border-radius: 4px;
    padding: 2px;
}

.quantity-btn {
    background: none;
    border: none;
    color: #999;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border-radius: 3px;
    transition: all 0.2s ease;
}

.quantity-btn:hover {
    background: rgba(255, 215, 0, 0.2);
    color: #ffd700;
}

.quantity-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.quantity-value {
    min-width: 30px;
    text-align: center;
    color: #fff;
    font-weight: 500;
}

.cart-item-remove {
    background: none;
    border: none;
    color: #ff5252;
    cursor: pointer;
    padding: 5px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.cart-item-remove:hover {
    background: rgba(255, 82, 82, 0.1);
}

.cart-sidebar-footer {
    padding: 20px;
    border-top: 1px solid #333;
    background: #0a0a0a;
}

.cart-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.cart-total-label {
    color: #999;
}

.cart-total-value {
    color: #ffd700;
    font-weight: 600;
    font-size: 1.3rem;
}

.cart-checkout-btn {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, #ffd700 0%, #ffa500 100%);
    color: #1a1a1a;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.cart-checkout-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 215, 0, 0.3);
}

.cart-checkout-btn:active {
    transform: translateY(0);
}

.cart-info {
    font-size: 0.85rem;
    color: #666;
    text-align: center;
    margin-top: 10px;
}

/* Loading state */
.cart-loading {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px;
    color: #666;
}

.cart-loading i {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Mobile responsive */
@media (max-width: 480px) {
    .cart-sidebar {
        width: 100%;
        right: -100%;
    }
    
    .cart-item {
        flex-direction: column;
    }
    
    .cart-item-image {
        width: 100%;
        height: 200px;
    }
}

/* Modal de confirmation personnalisé */
.cart-confirm-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #1a1a1a;
    border-radius: 12px;
    padding: 0;
    max-width: 400px;
    width: 90%;
    z-index: 10002;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    border: 1px solid #333;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

.cart-confirm-modal.show {
    opacity: 1;
    visibility: visible;
}

.cart-confirm-header {
    padding: 20px;
    border-bottom: 1px solid #333;
    text-align: center;
}

.cart-confirm-icon {
    font-size: 3rem;
    color: #ff4757;
    margin-bottom: 10px;
}

.cart-confirm-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #fff;
    margin: 0;
}

.cart-confirm-body {
    padding: 20px;
    text-align: center;
}

.cart-confirm-item {
    display: flex;
    align-items: center;
    gap: 15px;
    margin: 20px 0;
    padding: 15px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
}

.cart-confirm-item img {
    width: 80px;
    height: auto;
    max-height: 112px;
    object-fit: contain;
    border-radius: 4px;
}

.cart-confirm-item-details {
    flex: 1;
    text-align: left;
}

.cart-confirm-item-name {
    font-weight: 600;
    color: #fff;
    margin-bottom: 5px;
}

.cart-confirm-item-set {
    font-size: 0.875rem;
    color: #999;
}

.cart-confirm-message {
    color: #ccc;
    margin: 20px 0;
}

.cart-confirm-actions {
    display: flex;
    gap: 10px;
    padding: 20px;
    border-top: 1px solid #333;
}

.cart-confirm-btn {
    flex: 1;
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.cart-confirm-btn.cancel {
    background: #333;
    color: #fff;
}

.cart-confirm-btn.cancel:hover {
    background: #444;
}

.cart-confirm-btn.confirm {
    background: #ff4757;
    color: #fff;
}

.cart-confirm-btn.confirm:hover {
    background: #ff3838;
}

/* Bouton vider le panier */
.cart-clear-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 10px;
    margin-top: 10px;
    background: rgba(255, 71, 87, 0.1);
    border: 1px solid #ff4757;
    color: #ff4757;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.cart-clear-btn:hover {
    background: rgba(255, 71, 87, 0.2);
    transform: translateY(-1px);
}